From a8e48bd3ace6ca38d34079c92f72947f06946c15 Mon Sep 17 00:00:00 2001 From: Andre Muezerie Date: Fri, 15 May 2026 14:17:24 -0400 Subject: [PATCH 1/2] Network: Removed trailing spaces --- network/config/bindview/BINDING.CPP | 12 +- network/config/bindview/BINDVIEW.H | 2 +- network/config/bindview/NetCfgAPI.cpp | 4 +- network/config/bindview/NetCfgAPI.h | 2 +- network/config/bindview/RESOURCE.H | 2 +- network/modem/fakemodem/driver.c | 6 +- network/ndis/extension/base/SxApi.h | 566 ++-- network/ndis/extension/base/SxBase.c | 234 +- network/ndis/extension/base/SxBase.h | 6 +- network/ndis/extension/base/SxLibrary.c | 200 +- network/ndis/extension/base/SxLibrary.h | 210 +- .../samples/forward/MSForwardExtPolicy.mof | 8 +- .../forward/MSForwardExtPolicyStatus.mof | 8 +- .../extension/samples/forward/MsForwardExt.c | 798 +++--- .../extension/samples/forward/MsForwardExt.h | 26 +- .../extension/samples/forward/setRoute.ps1 | 4 +- .../samples/passthrough/MsPassthroughExt.c | 86 +- network/ndis/filter/filter.c | 68 +- network/ndis/mux/driver/60/miniport.c | 518 ++-- network/ndis/mux/driver/60/mux.c | 68 +- network/ndis/mux/driver/60/mux.h | 56 +- network/ndis/mux/driver/60/protocol.c | 494 ++-- network/ndis/mux/driver/60/public.h | 2 +- network/ndis/mux/notifyob/adapter.cpp | 34 +- network/ndis/mux/notifyob/common.cpp | 20 +- network/ndis/mux/notifyob/common.h | 8 +- network/ndis/mux/notifyob/dllmain.cpp | 2 +- network/ndis/mux/notifyob/list.h | 6 +- network/ndis/mux/notifyob/notify.RC | 2 +- network/ndis/mux/notifyob/notify.cpp | 112 +- network/ndis/mux/notifyob/notify.h | 4 +- network/ndis/mux/notifyob/notifyn.idl | 2 +- network/ndis/mux/notifyob/public.h | 2 +- network/ndis/mux/notifyob/virtual.cpp | 14 +- network/ndis/mux/notifyob/virtual.h | 2 +- network/ndis/ndisprot/6x/sys/60/ndisprot60.rc | 2 +- .../ndis/ndisprot/6x/sys/630/ndisprot630.rc | 2 +- network/ndis/ndisprot/6x/sys/debug.h | 2 +- network/ndis/ndisprot/6x/sys/excallbk.c | 52 +- network/ndis/ndisprot/6x/sys/macros.h | 12 +- network/ndis/ndisprot/6x/sys/ndisbind.c | 190 +- network/ndis/ndisprot/6x/sys/ndisprot.h | 8 +- network/ndis/ndisprot/6x/sys/ntdisp.c | 76 +- network/ndis/ndisprot/6x/sys/protuser.h | 2 +- network/ndis/ndisprot/6x/sys/recv.c | 2 +- network/ndis/ndisprot/6x/sys/send.c | 50 +- .../ndis/ndisprot_kmdf/notifyob/dllmain.cpp | 12 +- network/ndis/netvmini/6x/ctrlpath.c | 162 +- network/ndis/netvmini/6x/hardware.h | 14 +- network/ndis/netvmini/6x/miniport.c | 2 +- network/ndis/netvmini/6x/mphal.c | 42 +- network/ndis/netvmini/6x/mphal.h | 2 +- network/ndis/netvmini/6x/qos.c | 2 +- network/ndis/netvmini/6x/rssv2.c | 208 +- network/ndis/netvmini/6x/rssv2lib.c | 58 +- network/ndis/netvmini/6x/rssv2lib.h | 14 +- network/ndis/netvmini/6x/tcbrcb.c | 8 +- network/ndis/netvmini/6x/tcbrcb.h | 2 +- network/ndis/netvmini/6x/vmq.c | 2 +- network/ndis/netvmini/6x/vmq.h | 58 +- .../cpp/SampleRadioInstance.cpp | 8 +- .../cpp/SampleRadioManager.cpp | 16 +- .../radio/RadioManagerSample/cpp/dllmain.cpp | 6 +- .../exe/Framework_RPCClientInterface.cpp | 22 +- .../WFPSampler/exe/Framework_WFPSampler.cpp | 34 +- .../exe/HelperFunctions_CommandLine.cpp | 157 +- .../exe/Scenarios_AdvancedPacketInjection.cpp | 24 +- .../exe/Scenarios_AdvancedPacketInjection.h | 2 +- .../exe/Scenarios_AppContainers.cpp | 14 +- .../WFPSampler/exe/Scenarios_AppContainers.h | 2 +- .../WFPSampler/exe/Scenarios_BasicAction.cpp | 18 +- .../exe/Scenarios_BasicPacketExamination.cpp | 14 +- .../exe/Scenarios_BasicPacketExamination.h | 2 +- .../exe/Scenarios_BasicPacketInjection.cpp | 20 +- .../exe/Scenarios_BasicPacketModification.cpp | 24 +- .../exe/Scenarios_BasicPacketModification.h | 2 +- .../exe/Scenarios_BasicStreamInjection.cpp | 28 +- .../exe/Scenarios_FastPacketInjection.cpp | 12 +- .../exe/Scenarios_FastStreamInjection.cpp | 12 +- .../exe/Scenarios_FlowAssociation.cpp | 16 +- .../exe/Scenarios_PendAuthorization.cpp | 22 +- .../exe/Scenarios_PendAuthorization.h | 2 +- .../exe/Scenarios_PendEndpointClosure.cpp | 16 +- .../exe/Scenarios_PendEndpointClosure.h | 2 +- .../trans/WFPSampler/exe/Scenarios_Proxy.cpp | 22 +- .../trans/WFPSampler/idl/WFPSamplerRPC.IDL | 4 +- network/trans/WFPSampler/inc/Identifiers.h | 868 +++--- .../trans/WFPSampler/inc/ProviderContexts.h | 2 +- network/trans/WFPSampler/inc/WFPArrays.h | 36 +- .../lib/HelperFunctions_FwpmCallout.cpp | 14 +- .../lib/HelperFunctions_FwpmCallout.h | 2 +- .../lib/HelperFunctions_FwpmEngine.cpp | 6 +- .../lib/HelperFunctions_FwpmEngine.h | 2 +- .../lib/HelperFunctions_FwpmFilter.cpp | 52 +- .../lib/HelperFunctions_FwpmFilter.h | 2 +- .../lib/HelperFunctions_FwpmLayer.cpp | 26 +- .../lib/HelperFunctions_FwpmLayer.h | 2 +- .../lib/HelperFunctions_FwpmProvider.cpp | 18 +- .../lib/HelperFunctions_FwpmProvider.h | 2 +- .../HelperFunctions_FwpmProviderContext.cpp | 14 +- .../lib/HelperFunctions_FwpmProviderContext.h | 2 +- .../lib/HelperFunctions_FwpmSubLayer.cpp | 20 +- .../lib/HelperFunctions_FwpmSubLayer.h | 2 +- .../lib/HelperFunctions_FwpmTransaction.cpp | 8 +- .../lib/HelperFunctions_FwpmTransaction.h | 2 +- .../WFPSampler/lib/HelperFunctions_GUID.cpp | 16 +- .../lib/HelperFunctions_IPAddress.cpp | 14 +- .../lib/HelperFunctions_IPAddress.h | 2 +- .../WFPSampler/lib/HelperFunctions_Log.cpp | 6 +- .../lib/HelperFunctions_MACAddress.cpp | 8 +- .../WFPSampler/lib/HelperFunctions_Macros.h | 56 +- .../lib/HelperFunctions_Process.cpp | 6 +- .../WFPSampler/lib/HelperFunctions_Process.h | 2 +- .../lib/HelperFunctions_Registry.cpp | 10 +- .../WFPSampler/lib/HelperFunctions_SID.cpp | 20 +- .../lib/HelperFunctions_Service.cpp | 20 +- .../WFPSampler/lib/HelperFunctions_Service.h | 2 +- .../lib/HelperFunctions_Strings.cpp | 10 +- .../lib/HelperFunctions_ThreadPools.cpp | 10 +- .../lib/HelperFunctions_ThreadPools.h | 2 +- .../lib/HelperFunctions_ThreadsAndEvents.cpp | 22 +- .../lib/HelperFunctions_WinSock.cpp | 52 +- .../WFPSampler/lib/HelperFunctions_WinSock.h | 2 +- .../svc/Framework_RPCServerInterface.cpp | 16 +- .../svc/Framework_WFPSamplerService.cpp | 32 +- .../svc/Framework_WindowsFirewall.cpp | 12 +- .../svc/Scenarios_AdvancedPacketInjection.cpp | 38 +- .../svc/Scenarios_AppContainers.cpp | 42 +- .../WFPSampler/svc/Scenarios_BasicAction.cpp | 76 +- .../svc/Scenarios_BasicPacketExamination.cpp | 36 +- .../svc/Scenarios_BasicPacketInjection.cpp | 40 +- .../svc/Scenarios_BasicPacketModification.cpp | 42 +- .../svc/Scenarios_BasicStreamInjection.cpp | 34 +- .../svc/Scenarios_FastPacketInjection.cpp | 42 +- .../svc/Scenarios_FastStreamInjection.cpp | 36 +- .../svc/Scenarios_FlowAssociation.cpp | 28 +- .../svc/Scenarios_PendAuthorization.cpp | 32 +- .../svc/Scenarios_PendEndpointClosure.cpp | 36 +- .../trans/WFPSampler/svc/Scenarios_Proxy.cpp | 36 +- ...ctions_AdvancedPacketInjectionCallouts.cpp | 148 +- .../ClassifyFunctions_BasicActionCallouts.cpp | 36 +- .../ClassifyFunctions_BasicActionCallouts.h | 2 +- ...nctions_BasicPacketExaminationCallouts.cpp | 166 +- ...Functions_BasicPacketExaminationCallouts.h | 2 +- ...Functions_BasicPacketInjectionCallouts.cpp | 146 +- ...ctions_BasicPacketModificationCallouts.cpp | 756 ++--- ...unctions_BasicPacketModificationCallouts.h | 2 +- ...Functions_BasicStreamInjectionCallouts.cpp | 54 +- ...fyFunctions_BasicStreamInjectionCallouts.h | 4 +- ...yFunctions_FastPacketInjectionCallouts.cpp | 90 +- ...ifyFunctions_FastPacketInjectionCallouts.h | 6 +- ...yFunctions_FastStreamInjectionCallouts.cpp | 42 +- ...ifyFunctions_FastStreamInjectionCallouts.h | 4 +- ...ssifyFunctions_FlowAssociationCallouts.cpp | 12 +- ...ifyFunctions_PendAuthorizationCallouts.cpp | 70 +- ...ssifyFunctions_PendAuthorizationCallouts.h | 2 +- ...yFunctions_PendEndpointClosureCallouts.cpp | 48 +- ...ifyFunctions_PendEndpointClosureCallouts.h | 2 +- .../sys/ClassifyFunctions_ProxyCallouts.cpp | 174 +- .../sys/ClassifyFunctions_ProxyCallouts.h | 2 +- ...ctions_AdvancedPacketInjectionCallouts.cpp | 18 +- ...Functions_BasicPacketInjectionCallouts.cpp | 18 +- ...ctions_BasicPacketModificationCallouts.cpp | 24 +- ...unctions_BasicPacketModificationCallouts.h | 2 +- ...Functions_BasicStreamInjectionCallouts.cpp | 26 +- ...onFunctions_BasicStreamInjectionCallouts.h | 2 +- ...nFunctions_FastPacketInjectionCallouts.cpp | 10 +- ...nFunctions_FastStreamInjectionCallouts.cpp | 8 +- ...ionFunctions_PendAuthorizationCallouts.cpp | 22 +- .../sys/CompletionFunctions_ProxyCallouts.cpp | 22 +- .../sys/CompletionFunctions_ProxyCallouts.h | 2 +- .../trans/WFPSampler/sys/Framework_Events.cpp | 60 +- .../WFPSampler/sys/Framework_PowerStates.cpp | 34 +- .../sys/Framework_WFPSamplerCalloutDriver.cpp | 46 +- .../sys/Framework_WFPSamplerCalloutDriver.h | 4 +- .../sys/HelperFunctions_ExposedCallouts.cpp | 50 +- .../sys/HelperFunctions_ExposedCallouts.h | 6 +- .../sys/NotifyFunctions_AdvancedCallouts.cpp | 16 +- .../sys/NotifyFunctions_AdvancedCallouts.h | 2 +- .../sys/NotifyFunctions_BasicCallouts.cpp | 18 +- .../sys/NotifyFunctions_BasicCallouts.h | 2 +- .../sys/NotifyFunctions_FastCallouts.cpp | 12 +- .../sys/NotifyFunctions_FastCallouts.h | 2 +- .../sys/NotifyFunctions_FlowDelete.cpp | 4 +- .../sys/NotifyFunctions_FlowDelete.h | 2 +- .../WFPSampler/sys/NotifyFunctions_Include.h | 2 +- .../sys/NotifyFunctions_PendCallouts.cpp | 20 +- .../sys/NotifyFunctions_PendCallouts.h | 6 +- .../sys/NotifyFunctions_ProxyCallouts.cpp | 20 +- .../sys/NotifyFunctions_ProxyCallouts.h | 6 +- .../sys/SubscriptionFunctions_BFEState.cpp | 10 +- .../syslib/HelperFunctions_ClassifyData.cpp | 60 +- ...HelperFunctions_DeferredProcedureCalls.cpp | 160 +- .../HelperFunctions_DeferredProcedureCalls.h | 4 +- .../syslib/HelperFunctions_FlowContext.cpp | 16 +- .../syslib/HelperFunctions_FwpObjects.cpp | 830 +++--- .../syslib/HelperFunctions_FwpObjects.h | 8 +- .../syslib/HelperFunctions_Headers.cpp | 334 +-- .../syslib/HelperFunctions_Headers.h | 4 +- .../syslib/HelperFunctions_ICMPMessages.h | 2 +- .../syslib/HelperFunctions_InjectionData.cpp | 78 +- .../syslib/HelperFunctions_InjectionData.h | 2 +- .../syslib/HelperFunctions_Macros.h | 66 +- .../syslib/HelperFunctions_NDIS.cpp | 42 +- .../syslib/HelperFunctions_NetBuffer.cpp | 22 +- .../syslib/HelperFunctions_PendData.cpp | 50 +- .../syslib/HelperFunctions_PendData.h | 2 +- .../syslib/HelperFunctions_RedirectData.cpp | 48 +- .../syslib/HelperFunctions_WorkItems.cpp | 206 +- .../syslib/HelperFunctions_WorkItems.h | 2 +- network/trans/ddproxy/sys/DD_drv.c | 90 +- network/trans/ddproxy/sys/DD_proxy.c | 160 +- network/trans/inspect/sys/TL_drv.c | 80 +- network/trans/inspect/sys/inspect.c | 142 +- network/trans/inspect/sys/inspect.h | 2 +- network/trans/inspect/sys/utils.h | 26 +- network/trans/msnmntr/exe/monitor.cpp | 64 +- network/trans/msnmntr/exe/mtrace.cmd | 18 +- network/trans/msnmntr/inc/ioctl.h | 2 +- network/trans/msnmntr/inc/mntrguid.h | 2 +- network/trans/msnmntr/sys/ctl.c | 8 +- network/trans/msnmntr/sys/init.c | 10 +- network/trans/msnmntr/sys/msnmntr.c | 18 +- network/trans/msnmntr/sys/msnmntr.h | 12 +- network/trans/msnmntr/sys/notify.c | 22 +- network/trans/msnmntr/sys/notify.h | 2 +- network/trans/stmedit/sys/InlineEdit.c | 28 +- network/trans/stmedit/sys/LwQueue.c | 8 +- network/trans/stmedit/sys/LwQueue.h | 2 +- network/trans/stmedit/sys/OobEdit.c | 70 +- network/trans/stmedit/sys/StreamEdit.c | 126 +- network/trans/stmedit/sys/StreamEdit.h | 14 +- network/trans/stmedit/sys/Trace.h | 2 +- network/wlan/WDI/COMMON/1x_eapol.h | 4 +- network/wlan/WDI/COMMON/1x_kmsm_eapolkey.h | 58 +- network/wlan/WDI/COMMON/1x_rc4.h | 14 +- network/wlan/WDI/COMMON/AES_OCB.h | 16 +- network/wlan/WDI/COMMON/AMSDU_Aggregation.h | 8 +- network/wlan/WDI/COMMON/ActionTimer.h | 22 +- network/wlan/WDI/COMMON/ApEngine.c | 792 +++--- network/wlan/WDI/COMMON/ApEngine.h | 20 +- network/wlan/WDI/COMMON/Authenticator.c | 256 +- network/wlan/WDI/COMMON/Authenticator.h | 42 +- network/wlan/WDI/COMMON/BAGen.c | 162 +- network/wlan/WDI/COMMON/BssCoexistence.c | 64 +- network/wlan/WDI/COMMON/CcxGen.h | 24 +- network/wlan/WDI/COMMON/ChannelInfo.c | 130 +- network/wlan/WDI/COMMON/ChannelInfo.h | 12 +- network/wlan/WDI/COMMON/CustomizedScan.c | 312 +-- network/wlan/WDI/COMMON/CustomizedScan.h | 8 +- network/wlan/WDI/COMMON/DFS.c | 152 +- network/wlan/WDI/COMMON/DFS.h | 14 +- network/wlan/WDI/COMMON/DbgCmd.h | 58 +- network/wlan/WDI/COMMON/DbgMon.h | 16 +- network/wlan/WDI/COMMON/Debug.c | 84 +- network/wlan/WDI/COMMON/Debug.h | 42 +- network/wlan/WDI/COMMON/Defrag.c | 52 +- network/wlan/WDI/COMMON/Defrag.h | 6 +- network/wlan/WDI/COMMON/Dot11d.c | 424 +-- network/wlan/WDI/COMMON/Dot11d.h | 44 +- network/wlan/WDI/COMMON/DriverInterface.c | 82 +- network/wlan/WDI/COMMON/DrvLog.h | 2 +- network/wlan/WDI/COMMON/DrvLogImp.c | 46 +- network/wlan/WDI/COMMON/DrvLogImp.h | 20 +- network/wlan/WDI/COMMON/Frame_Buf.c | 26 +- network/wlan/WDI/COMMON/Frame_Buf.h | 4 +- network/wlan/WDI/COMMON/GeneralFunc.c | 50 +- network/wlan/WDI/COMMON/GeneralFunc.h | 22 +- network/wlan/WDI/COMMON/HTGen.c | 348 +-- network/wlan/WDI/COMMON/HTGen.h | 20 +- network/wlan/WDI/COMMON/HashTable.c | 68 +- network/wlan/WDI/COMMON/Hotspot20.c | 26 +- network/wlan/WDI/COMMON/IOTGen.h | 2 +- network/wlan/WDI/COMMON/MgntActQueryParam.c | 340 +-- network/wlan/WDI/COMMON/MgntActQueryParam.h | 10 +- network/wlan/WDI/COMMON/MgntActSetParam.c | 726 ++--- network/wlan/WDI/COMMON/MgntActSetParam.h | 34 +- network/wlan/WDI/COMMON/MgntConstructPacket.c | 546 ++-- network/wlan/WDI/COMMON/MgntConstructPacket.h | 4 +- network/wlan/WDI/COMMON/MgntEngine.c | 364 +-- network/wlan/WDI/COMMON/MgntGen.c | 746 ++--- network/wlan/WDI/COMMON/MgntGen.h | 24 +- network/wlan/WDI/COMMON/MgntLink.c | 2072 +++++++------- network/wlan/WDI/COMMON/MgntLink.h | 40 +- network/wlan/WDI/COMMON/MgntSendPacket.c | 274 +- network/wlan/WDI/COMMON/MgntSendPacket.h | 10 +- network/wlan/WDI/COMMON/MimoPs.c | 18 +- network/wlan/WDI/COMMON/MimoPs.h | 2 +- network/wlan/WDI/COMMON/MultiChannels.h | 20 +- network/wlan/WDI/COMMON/MultiPorts.c | 224 +- network/wlan/WDI/COMMON/MultiPorts.h | 18 +- network/wlan/WDI/COMMON/OffChnlTx.h | 4 +- network/wlan/WDI/COMMON/P2P.c | 2470 ++++++++--------- network/wlan/WDI/COMMON/P2P.h | 152 +- network/wlan/WDI/COMMON/P2PSvc.c | 230 +- network/wlan/WDI/COMMON/P2PSvc.h | 6 +- network/wlan/WDI/COMMON/P2PSvcType.h | 12 +- network/wlan/WDI/COMMON/P2PSvc_ActionInfo.c | 42 +- network/wlan/WDI/COMMON/P2PSvc_Construct.c | 164 +- network/wlan/WDI/COMMON/P2PSvc_Internal.h | 56 +- network/wlan/WDI/COMMON/P2PSvc_Object.c | 274 +- network/wlan/WDI/COMMON/P2PSvc_PD.c | 424 +-- network/wlan/WDI/COMMON/P2PSvc_ParamSpec.c | 48 +- network/wlan/WDI/COMMON/P2PSvc_SD.c | 26 +- network/wlan/WDI/COMMON/P2PSvc_SearchResult.c | 90 +- network/wlan/WDI/COMMON/P2PSvc_Utility.c | 68 +- network/wlan/WDI/COMMON/P2P_AdditionalIe.c | 2 +- network/wlan/WDI/COMMON/P2P_AdditionalIe.h | 6 +- network/wlan/WDI/COMMON/P2P_Attribute.c | 82 +- network/wlan/WDI/COMMON/P2P_Attribute.h | 20 +- network/wlan/WDI/COMMON/P2P_Build.c | 20 +- network/wlan/WDI/COMMON/P2P_Build_Action.c | 80 +- network/wlan/WDI/COMMON/P2P_Build_Mgnt.c | 108 +- .../wlan/WDI/COMMON/P2P_Build_PublicAction.c | 164 +- network/wlan/WDI/COMMON/P2P_Channel.c | 14 +- network/wlan/WDI/COMMON/P2P_Channel.h | 4 +- network/wlan/WDI/COMMON/P2P_DevList.c | 176 +- network/wlan/WDI/COMMON/P2P_DevList.h | 4 +- network/wlan/WDI/COMMON/P2P_Indication.c | 68 +- network/wlan/WDI/COMMON/P2P_Indication.h | 4 +- network/wlan/WDI/COMMON/P2P_Internal.h | 34 +- network/wlan/WDI/COMMON/P2P_Parse.c | 374 +-- network/wlan/WDI/COMMON/P2P_ProtocolSpec.h | 8 +- network/wlan/WDI/COMMON/P2P_Public.h | 6 +- network/wlan/WDI/COMMON/P2P_Receive.c | 188 +- network/wlan/WDI/COMMON/P2P_SendAction.c | 232 +- network/wlan/WDI/COMMON/P2P_SendMgnt.c | 6 +- network/wlan/WDI/COMMON/P2P_Synch.h | 4 +- network/wlan/WDI/COMMON/P2P_TempPublic.h | 74 +- network/wlan/WDI/COMMON/P2P_Util.c | 22 +- network/wlan/WDI/COMMON/ParserGen.c | 240 +- network/wlan/WDI/COMMON/ParserGen.h | 12 +- network/wlan/WDI/COMMON/PowerSave.h | 18 +- network/wlan/WDI/COMMON/Protocol802_11.c | 250 +- network/wlan/WDI/COMMON/Protocol802_11.h | 66 +- network/wlan/WDI/COMMON/QosGen.c | 316 +-- network/wlan/WDI/COMMON/QosGen.h | 26 +- network/wlan/WDI/COMMON/RC4.h | 20 +- network/wlan/WDI/COMMON/ROGUEAP.h | 22 +- network/wlan/WDI/COMMON/RadioMeasurement.h | 8 +- network/wlan/WDI/COMMON/Receive.c | 406 +-- network/wlan/WDI/COMMON/Receive.h | 22 +- network/wlan/WDI/COMMON/RxReorder.c | 22 +- network/wlan/WDI/COMMON/RxReorder.h | 2 +- network/wlan/WDI/COMMON/SMBios.h | 4 +- network/wlan/WDI/COMMON/SecurityGen.c | 958 +++---- network/wlan/WDI/COMMON/SecurityGen.h | 126 +- network/wlan/WDI/COMMON/TCPOFFLOADGen.h | 8 +- network/wlan/WDI/COMMON/TCPOFFLOAD_Typt.h | 6 +- network/wlan/WDI/COMMON/TDLSGen.h | 8 +- network/wlan/WDI/COMMON/TSGen.c | 104 +- network/wlan/WDI/COMMON/Transmit.c | 600 ++-- network/wlan/WDI/COMMON/Transmit.h | 8 +- network/wlan/WDI/COMMON/TransmitDesc.c | 238 +- network/wlan/WDI/COMMON/TransmitDesc.h | 8 +- network/wlan/WDI/COMMON/UsbModeSwitch.h | 18 +- network/wlan/WDI/COMMON/VHTGen.c | 182 +- network/wlan/WDI/COMMON/VHTGen.h | 20 +- network/wlan/WDI/COMMON/WOLPattern.c | 126 +- network/wlan/WDI/COMMON/WOLPattern.h | 2 +- network/wlan/WDI/COMMON/WPS.c | 60 +- network/wlan/WDI/COMMON/WPS.h | 18 +- network/wlan/WDI/COMMON/WPS_Def.h | 2 +- network/wlan/WDI/COMMON/Wapi.h | 40 +- network/wlan/WDI/COMMON/Widi.h | 2 +- network/wlan/WDI/COMMON/pool.c | 20 +- network/wlan/WDI/COMMON/pool.h | 4 +- network/wlan/WDI/COMMON/sources.sample.list | 4 +- network/wlan/WDI/COMMON/sources.tpl.win | 2 +- network/wlan/WDI/HAL/HalADCSampling.h | 16 +- network/wlan/WDI/HAL/HalCam.h | 60 +- network/wlan/WDI/HAL/HalComDef.h | 60 +- network/wlan/WDI/HAL/HalComDesc.h | 202 +- network/wlan/WDI/HAL/HalComFirmware.h | 46 +- network/wlan/WDI/HAL/HalComLed.h | 42 +- network/wlan/WDI/HAL/HalComPhyCfg.h | 60 +- network/wlan/WDI/HAL/HalComReg.h | 146 +- network/wlan/WDI/HAL/HalComTxPwrCfg.h | 34 +- network/wlan/WDI/HAL/HalComTxPwrLmtCfg.h | 2 +- network/wlan/WDI/HAL/HalDM.h | 30 +- network/wlan/WDI/HAL/HalEEPROM.h | 16 +- network/wlan/WDI/HAL/HalEfuse.h | 70 +- network/wlan/WDI/HAL/HalH2cIOCmd.h | 22 +- network/wlan/WDI/HAL/HalIcGlue.h | 24 +- network/wlan/WDI/HAL/HalJaguarPhyReg.h | 36 +- network/wlan/WDI/HAL/HalMacID.h | 12 +- network/wlan/WDI/HAL/HalPG.h | 28 +- network/wlan/WDI/HAL/HalPhy.h | 28 +- network/wlan/WDI/HAL/HalPowerSave.h | 8 +- network/wlan/WDI/HAL/HalPwrSeqCmd.h | 14 +- network/wlan/WDI/HAL/HalSIC.h | 2 +- network/wlan/WDI/HAL/HalSdio.h | 222 +- network/wlan/WDI/HAL/HalTxFeedback.h | 4 +- network/wlan/WDI/HAL/halCmdPkt.h | 118 +- network/wlan/WDI/HAL/halDbgCmd.h | 78 +- .../wlan/WDI/HAL/phydm/development_note.txt | 364 +-- .../WDI/HAL/phydm/development_note2012.txt | 1478 +++++----- network/wlan/WDI/HAL/phydm/halhwimg.h | 6 +- network/wlan/WDI/HAL/phydm/halphyrf_ap.h | 30 +- network/wlan/WDI/HAL/phydm/halphyrf_ce.h | 14 +- network/wlan/WDI/HAL/phydm/halphyrf_win.h | 18 +- network/wlan/WDI/HAL/phydm/mp_precomp.h | 2 +- network/wlan/WDI/HAL/phydm/phydm.h | 182 +- network/wlan/WDI/HAL/phydm/phydm_acs.h | 14 +- network/wlan/WDI/HAL/phydm/phydm_adaptivity.h | 18 +- network/wlan/WDI/HAL/phydm/phydm_antdect.h | 14 +- network/wlan/WDI/HAL/phydm/phydm_antdiv.h | 54 +- .../wlan/WDI/HAL/phydm/phydm_beamforming.h | 46 +- .../wlan/WDI/HAL/phydm/phydm_cfotracking.h | 2 +- network/wlan/WDI/HAL/phydm/phydm_debug.h | 24 +- network/wlan/WDI/HAL/phydm/phydm_dig.h | 22 +- .../HAL/phydm/phydm_dynamicbbpowersaving.h | 12 +- .../wlan/WDI/HAL/phydm/phydm_dynamictxpower.h | 24 +- .../wlan/WDI/HAL/phydm/phydm_edcaturbocheck.h | 18 +- network/wlan/WDI/HAL/phydm/phydm_hwconfig.h | 24 +- network/wlan/WDI/HAL/phydm/phydm_interface.h | 78 +- .../wlan/WDI/HAL/phydm/phydm_noisemonitor.h | 8 +- network/wlan/WDI/HAL/phydm/phydm_pathdiv.h | 58 +- .../WDI/HAL/phydm/phydm_powertracking_ap.h | 58 +- .../WDI/HAL/phydm/phydm_powertracking_ce.h | 74 +- .../WDI/HAL/phydm/phydm_powertracking_win.h | 74 +- network/wlan/WDI/HAL/phydm/phydm_pre_define.h | 28 +- network/wlan/WDI/HAL/phydm/phydm_precomp.h | 32 +- network/wlan/WDI/HAL/phydm/phydm_rainfo.h | 2 +- network/wlan/WDI/HAL/phydm/phydm_reg.h | 4 +- .../wlan/WDI/HAL/phydm/phydm_regdefine11ac.h | 4 +- .../wlan/WDI/HAL/phydm/phydm_regdefine11n.h | 4 +- network/wlan/WDI/HAL/phydm/phydm_rxhp.h | 7 +- network/wlan/WDI/HAL/phydm/phydm_types.h | 60 +- network/wlan/WDI/HAL/phydm/rtchnlplan.h | 586 ++-- .../wlan/WDI/HAL/phydm/rtl8723b/hal8723breg.h | 72 +- .../WDI/HAL/phydm/rtl8723b/halhwimg8723b_bb.h | 36 +- .../WDI/HAL/phydm/rtl8723b/halhwimg8723b_fw.h | 36 +- .../HAL/phydm/rtl8723b/halhwimg8723b_mac.h | 36 +- .../WDI/HAL/phydm/rtl8723b/halhwimg8723b_rf.h | 36 +- .../HAL/phydm/rtl8723b/halphyrf_8723b_ce.h | 20 +- .../HAL/phydm/rtl8723b/halphyrf_8723b_win.h | 20 +- .../wlan/WDI/HAL/phydm/rtl8723b/mp_precomp.h | 2 +- .../HAL/phydm/rtl8723b/phydm_regconfig8723b.h | 14 +- .../WDI/HAL/phydm/rtl8723b/phydm_rtl8723b.h | 2 +- .../wlan/WDI/HAL/rtl8723B/Hal8723BDefCom.h | 12 +- network/wlan/WDI/HAL/rtl8723B/Hal8723BDesc.h | 12 +- network/wlan/WDI/HAL/rtl8723B/Hal8723BEfuse.h | 36 +- .../wlan/WDI/HAL/rtl8723B/Hal8723BFirmware.h | 18 +- .../wlan/WDI/HAL/rtl8723B/Hal8723BPhyCfg.h | 78 +- .../wlan/WDI/HAL/rtl8723B/Hal8723BPhyReg.h | 122 +- .../wlan/WDI/HAL/rtl8723B/Hal8723BPwrSeq.h | 10 +- network/wlan/WDI/HAL/rtl8723B/Hal8723BRf.h | 36 +- .../HAL/rtl8723B/rtl8723bs/Hal8723BSdioDef.h | 8 +- .../HAL/rtl8723B/rtl8723bs/Hal8723BSdioLed.h | 10 +- network/wlan/WDI/HAL/sources.list.WlanS | 6 +- network/wlan/WDI/HAL/sources.tpl.WlanS.props | 10 +- network/wlan/WDI/HEADER/BssCoexistence.h | 2 +- network/wlan/WDI/HEADER/CcxType.h | 86 +- network/wlan/WDI/HEADER/ChannelType.h | 2 +- network/wlan/WDI/HEADER/CustomOid.h | 64 +- network/wlan/WDI/HEADER/DriverInterfaceDef.h | 10 +- network/wlan/WDI/HEADER/EndianFree.h | 24 +- network/wlan/WDI/HEADER/GeneralDef.h | 4 +- network/wlan/WDI/HEADER/HTType.h | 46 +- network/wlan/WDI/HEADER/HalDef.h | 354 +-- network/wlan/WDI/HEADER/HashTable.h | 24 +- network/wlan/WDI/HEADER/LinkList.h | 6 +- network/wlan/WDI/HEADER/PlatformDef.h | 98 +- network/wlan/WDI/HEADER/PlatformSdio.h | 20 +- network/wlan/WDI/HEADER/Precomp.h | 8 +- .../wlan/WDI/HEADER/Precomp.h.WlanS.sample | 8 +- network/wlan/WDI/HEADER/PrecompInc_sample.h | 30 +- network/wlan/WDI/HEADER/QoSType.h | 36 +- network/wlan/WDI/HEADER/RegCommon.h | 272 +- network/wlan/WDI/HEADER/RmDef.h | 50 +- network/wlan/WDI/HEADER/SecurityType.h | 48 +- network/wlan/WDI/HEADER/TDLSType.h | 16 +- network/wlan/WDI/HEADER/TSType.h | 4 +- network/wlan/WDI/HEADER/TypeDef.h | 642 ++--- network/wlan/WDI/HEADER/WiDiType.h | 10 +- network/wlan/WDI/HEADER/WlanDriverEvents.h | 46 +- network/wlan/WDI/HEADER/platform-os-version.h | 4 +- network/wlan/WDI/PLATFORM/DIRS.NDIS6 | 4 +- .../wlan/WDI/PLATFORM/NDIS6/CCX_Extension.h | 2 +- network/wlan/WDI/PLATFORM/NDIS6/CCX_Predef.h | 104 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.c | 220 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.h | 16 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_AP_Def.h | 110 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.c | 306 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.h | 18 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.c | 192 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.h | 2 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.c | 216 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.h | 148 +- .../wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.c | 232 +- .../wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.h | 4 +- .../WDI/PLATFORM/NDIS6/N62C_QuerySetOID.c | 54 +- .../WDI/PLATFORM/NDIS6/N62C_QuerySetOID.h | 2 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.c | 384 +-- network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.h | 32 +- network/wlan/WDI/PLATFORM/NDIS6/N62C_def.h | 84 +- network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.c | 1656 +++++------ network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.h | 4 +- .../wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.c | 334 +-- .../wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.h | 6 +- network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.c | 318 +-- network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.h | 10 +- .../wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.c | 518 ++-- .../wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.h | 8 +- network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.c | 952 +++---- network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.h | 40 +- network/wlan/WDI/PLATFORM/NDIS6/N6C_Oids.c | 280 +- .../wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.c | 444 +-- .../wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.h | 10 +- network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.c | 1758 ++++++------ network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.h | 8 +- network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c | 1002 +++---- network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.h | 278 +- network/wlan/WDI/PLATFORM/NDIS6/Ndis_OID.h | 4 +- .../wlan/WDI/PLATFORM/NDIS6/SDIO/CppDrvReg.h | 2 +- network/wlan/WDI/PLATFORM/NDIS6/SDIO/Mp_Req.c | 80 +- .../NDIS6/SDIO/N6SdioPlatformWindows.c | 1060 +++---- .../NDIS6/SDIO/N6SdioPlatformWindows.h | 30 +- .../WDI/PLATFORM/NDIS6/SDIO/N6Sdio_DrvIF.c | 246 +- .../NDIS6/SDIO/N6Sdio_PlatformSdioWdf.c | 62 +- .../NDIS6/SDIO/N6Sdio_PlatformSdioWdf.h | 10 +- .../NDIS6/SDIO/N6Sdio_PlatformSdioWdm.c | 458 +-- .../NDIS6/SDIO/N6Sdio_PlatformSdioWdm.h | 16 +- .../WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.c | 472 ++-- .../WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.h | 4 +- .../WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c | 1342 ++++----- .../WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.h | 24 +- .../PLATFORM/NDIS6/SDIO/N6Sdio_mechanism.c | 2 +- .../WDI/PLATFORM/NDIS6/SDIO/N6Sdio_typedef.h | 82 +- .../wlan/WDI/PLATFORM/NDIS6/SDIO/n60_sdio.inc | 2 +- .../wlan/WDI/PLATFORM/NDIS6/SDIO/n62_sdio.inc | 2 +- .../PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props | 20 +- .../wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlans.rc | 2 +- .../wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlansmp.rc | 2 +- .../WDI/PLATFORM/NDIS6/SDIO/sources.lib.list | 2 +- .../wlan/WDI/PLATFORM/NDIS6/SDIO/sources.list | 2 +- .../WDI/PLATFORM/NDIS6/SDIO/sources.tpl.win | 2 +- network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.h | 6 +- network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.h | 34 +- .../wlan/WDI/PLATFORM/NDIS6/WDI_Extension.c | 232 +- .../wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.c | 420 +-- .../wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.h | 2 +- network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.c | 109 +- network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.h | 2 +- network/wlan/WDI/PLATFORM/NDIS6/WDI_def.h | 10 +- network/wlan/WDI/PLATFORM/NDIS6/new.cpp | 2 +- network/wlan/WDI/PLATFORM/NdisComm/NdisComm.c | 410 +-- network/wlan/WDI/PLATFORM/NdisComm/NdisComm.h | 8 +- network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.c | 174 +- network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.h | 18 +- network/wlan/WDI/PLATFORM/NdisComm/NdisOid.c | 16 +- network/wlan/WDI/PLATFORM/NdisComm/NdisOid.h | 4 +- .../wlan/WDI/PLATFORM/NdisComm/sources.list | 2 +- .../WDI/PLATFORM/NdisComm/sources.tpl.win | 4 +- network/wlan/ihvsampleui/IHVClassFactory.cpp | 20 +- .../wlan/ihvsampleui/IHVRegistryHelper.cpp | 102 +- network/wlan/ihvsampleui/IHVRegistryHelper.h | 14 +- network/wlan/ihvsampleui/IHVSample.idl | 14 +- network/wlan/ihvsampleui/IHVSampleExtUI.cpp | 142 +- network/wlan/ihvsampleui/IHVSampleExtUI.h | 38 +- .../wlan/ihvsampleui/IHVSampleExtUICon.cpp | 102 +- network/wlan/ihvsampleui/IHVSampleExtUICon.h | 32 +- .../wlan/ihvsampleui/IHVSampleExtUIKey.cpp | 110 +- network/wlan/ihvsampleui/IHVSampleExtUIKey.h | 34 +- .../wlan/ihvsampleui/IHVSampleExtUISec.cpp | 112 +- network/wlan/ihvsampleui/IHVSampleExtUISec.h | 32 +- network/wlan/ihvsampleui/IHVSampleProfile.cpp | 4 +- network/wlan/ihvsampleui/IHVSampleProfile.h | 4 +- network/wlan/ihvsampleui/IHVSampleUI.cpp | 18 +- network/wlan/ihvsampleui/IHVSampleUI.rc | 2 +- network/wlan/ihvsampleui/precomp.h | 2 +- network/wlan/ihvsampleui/utils.cpp | 2 +- network/wsk/echosrv/wsksmple.c | 188 +- network/wwan/cxwmbclass/datapipe.cpp | 8 +- network/wwan/cxwmbclass/inc/align.h | 4 +- network/wwan/cxwmbclass/inc/mbbmessages.h | 378 +-- network/wwan/cxwmbclass/rxqueue.cpp | 8 +- 578 files changed, 27373 insertions(+), 27370 deletions(-) diff --git a/network/config/bindview/BINDING.CPP b/network/config/bindview/BINDING.CPP index b37710042..460d2f3c0 100644 --- a/network/config/bindview/BINDING.CPP +++ b/network/config/bindview/BINDING.CPP @@ -10,7 +10,7 @@ // o How to enumerate binding interfaces. // o How to enable/disable bindings. // -// Notes: +// Notes: // // Author: Alok Sinha 15-May-01 // @@ -183,7 +183,7 @@ VOID WriteBindingPath (FILE *fp, fwprintf( fp, L"\n%s", lpszName ); } } - + ReleaseRef( pencbp ); } else { @@ -389,7 +389,7 @@ VOID ListBindings (INetCfgComponent *pncc, HTREEITEM hTreeItem; ULONG ulIndex; HRESULT hr; - + hr = HrGetBindingPathEnum( pncc, EBP_BELOW, &pencbp ); @@ -429,7 +429,7 @@ VOID ListBindings (INetCfgComponent *pncc, ulIndex++; } - + ReleaseRef( pencbp ); } else { @@ -533,7 +533,7 @@ VOID ListInterfaces (INetCfgBindingPath *pncbp, // // Function: HandleBindingPathOperation // -// Purpose: +// Purpose: // // Arguments: // hwndOwner [in] Owner window. @@ -778,7 +778,7 @@ FindBindingPath ( &pncc ); if ( hr == S_OK ) { - + hr = HrGetBindingPathEnum( pncc, EBP_BELOW, &pencbp ); diff --git a/network/config/bindview/BINDVIEW.H b/network/config/bindview/BINDVIEW.H index 2753b7536..1a1d4a80f 100644 --- a/network/config/bindview/BINDVIEW.H +++ b/network/config/bindview/BINDVIEW.H @@ -7,7 +7,7 @@ // // Contents: Function Prototypes // -// Notes: +// Notes: // // Author: Alok Sinha 15-May-01 // diff --git a/network/config/bindview/NetCfgAPI.cpp b/network/config/bindview/NetCfgAPI.cpp index 5080bb41d..bdbb8e529 100644 --- a/network/config/bindview/NetCfgAPI.cpp +++ b/network/config/bindview/NetCfgAPI.cpp @@ -248,7 +248,7 @@ HRESULT HrInstallNetComponent (IN INetCfg *pnc, { hr = E_OUTOFMEMORY; break; - } + } ZeroMemory(DirWithDrive, (_MAX_DRIVE + _MAX_DIR) * sizeof(WCHAR)); // @@ -329,7 +329,7 @@ HRESULT HrInstallNetComponent (IN INetCfg *pnc, { CoTaskMemFree(DirWithDrive); DirWithDrive = NULL; - } + } return hr; } diff --git a/network/config/bindview/NetCfgAPI.h b/network/config/bindview/NetCfgAPI.h index b4d6f5526..310b36b29 100644 --- a/network/config/bindview/NetCfgAPI.h +++ b/network/config/bindview/NetCfgAPI.h @@ -7,7 +7,7 @@ // // Contents: Functions Prototypes // -// Notes: +// Notes: // // Author: Alok Sinha 15-May-01 // diff --git a/network/config/bindview/RESOURCE.H b/network/config/bindview/RESOURCE.H index 3fb76696a..06cd36818 100644 --- a/network/config/bindview/RESOURCE.H +++ b/network/config/bindview/RESOURCE.H @@ -32,7 +32,7 @@ #define IDI_DISABLE 40007 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 109 diff --git a/network/modem/fakemodem/driver.c b/network/modem/fakemodem/driver.c index 572e462fc..8484d95f2 100644 --- a/network/modem/fakemodem/driver.c +++ b/network/modem/fakemodem/driver.c @@ -232,7 +232,7 @@ Return Value: &defQueue // pointer to default queue ); __analysis_assume(queueConfig.EvtIoStop == 0); - + if (!NT_SUCCESS (status)) { // @@ -256,7 +256,7 @@ Return Value: &fmDeviceData->FmReadQueue ); __analysis_assume(queueConfig.EvtIoStop == 0); - + if (!NT_SUCCESS (status)) { KdPrint( ("WdfIoQueueCreate failed 0x%x\n", status)); return status; @@ -276,7 +276,7 @@ Return Value: &fmDeviceData->FmMaskWaitQueue ); __analysis_assume(queueConfig.EvtIoStop == 0); - + if (!NT_SUCCESS (status)) { KdPrint( ("WdfIoQueueCreate failed 0x%x\n", status)); return status; diff --git a/network/ndis/extension/base/SxApi.h b/network/ndis/extension/base/SxApi.h index 64dca5f74..d52d5a037 100644 --- a/network/ndis/extension/base/SxApi.h +++ b/network/ndis/extension/base/SxApi.h @@ -47,7 +47,7 @@ extern PWCHAR SxExtServiceName; extern ULONG SxExtAllocationTag; // -// The request ID used to identify OIDs initiated from this extension. +// The request ID used to identify OIDs initiated from this extension. // extern ULONG SxExtOidRequestId; @@ -55,19 +55,19 @@ extern ULONG SxExtOidRequestId; /*++ SxExtInitialize - + Routine Description: This function is called from the SxBase Library during DriverEntry. An extension should allocate/initalize all global data in this function. - + Arguments: NULL - + Return Value: NDIS_STATUS_SUCCESS succeeds driver entry. - + NDIS_STATUS_*** fails driver entry. - + --*/ NDIS_STATUS SxExtInitialize(); @@ -76,17 +76,17 @@ SxExtInitialize(); /*++ SxExtUninitialize - + Routine Description: This function is called from the SxBase Library during DriverUnload. An extension should free/reset all global data in this function. - + Arguments: NULL - + Return Value: VOID - + --*/ VOID SxExtUninitialize(); @@ -95,28 +95,28 @@ SxExtUninitialize(); /*++ SxExtCreateSwitch - + Routine Description: This function is called when an extension binds to a new switch. All switch specific data should be allocated during this function. OIDs cannot be sent from this function, and both the control and data paths are inactive. - + Arguments: Switch - the Switch Object currently being created - + ExtensionContext - Extension context specific to the switch being createf. This context will be passed back to the extension for all function calls in SxApi - + Return Value: NDIS_STATUS_SUCCESS succeeds switch creation. - + NDIS_STATUS_RESOURCES fails switch creation because of insufficient resources. - + NDIS_STATUS_FAILURE fails switch creation. - + --*/ NDIS_STATUS SxExtCreateSwitch( @@ -124,25 +124,25 @@ SxExtCreateSwitch( _Outptr_result_maybenull_ PNDIS_HANDLE *ExtensionContext ); - + /*++ SxExtDeleteSwitch - + Routine Description: This function is called when an extension binds to a new switch. All switch specific data should be allocated/initialized during this function. - + Arguments: Switch - the Switch being deleted - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being deleted. - + Return Value: VOID - + --*/ VOID SxExtDeleteSwitch( @@ -150,54 +150,54 @@ SxExtDeleteSwitch( _In_ NDIS_HANDLE ExtensionContext ); - + /*++ SxExtActivateSwitch - + Routine Description: This function is called to activate a switch. The function can be called while the switch is Running or Paused and should be used to bootstrap the switch if it was not Active when it was created. - + Arguments: Switch - the Switch being activated - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being restarted. - + Return Value: VOID - ---*/ + +--*/ VOID SxExtActivateSwitch( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext ); - + /*++ SxExtRestartSwitch - + Routine Description: This function is called to restart a switch from a paused state. - + Arguments: Switch - the Switch being restarted - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being restarted. - + Return Value: NDIS_STATUS_SUCCESS succeeds switch restart. - + NDIS_STATUS_RESOURCES fails switch restart because of insufficient resources. - + NDIS_STATUS_FAILURE fails switch restart. - + --*/ NDIS_STATUS SxExtRestartSwitch( @@ -209,20 +209,20 @@ SxExtRestartSwitch( /*++ SxExtPauseSwitch - + Routine Description: This function is called to pause a switch from a running state. - + Arguments: Switch - the Switch being paused - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being paused - + Return Value: VOID - ---*/ + +--*/ VOID SxExtPauseSwitch( _In_ PSX_SWITCH_OBJECT Switch, @@ -233,24 +233,24 @@ SxExtPauseSwitch( /*++ SxExtCreatePort - + Routine Description: This function is called to create a new port on a switch. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the Port being created - + Return Value: NDIS_STATUS_SUCCESS to succeed port creation - + NDIS_STATUS_*** to fail port creation - ---*/ + +--*/ NDIS_STATUS SxExtCreatePort( _In_ PSX_SWITCH_OBJECT Switch, @@ -258,26 +258,26 @@ SxExtCreatePort( _In_ PNDIS_SWITCH_PORT_PARAMETERS Port ); - + /*++ SxExtUpdatePort - + Routine Description: This function is called to update an already created port. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the port being updated - + Return Value: VOID - ---*/ + +--*/ VOID SxExtUpdatePort( _In_ PSX_SWITCH_OBJECT Switch, @@ -285,32 +285,32 @@ SxExtUpdatePort( _In_ PNDIS_SWITCH_PORT_PARAMETERS Port ); - + /*++ SxExtCreateNic - + Routine Description: This function is called to create a new NIC to be connected to a switch. The extension may allocate context for this NIC, and traffic may start to flow from this NIC, but it may not be used as a destination until SxExtConnectNic has been called. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being created - + Return Value: NDIS_STATUS_SUCCESS to succeed NIC creation - + NDIS_STATUS_*** to fail NIC creation - ---*/ + +--*/ NDIS_STATUS SxExtCreateNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -318,28 +318,28 @@ SxExtCreateNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtConnectNic - + Routine Description: This function is called to connect a NIC to a switch. After returning from this function the extension can use this NIC as a destination. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being connected - + Return Value: VOID - ---*/ + +--*/ VOID SxExtConnectNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -347,26 +347,26 @@ SxExtConnectNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtUpdateNic - + Routine Description: This function is called to update an already created NIC. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being updated - + Return Value: VOID - ---*/ + +--*/ VOID SxExtUpdateNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -374,28 +374,28 @@ SxExtUpdateNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtDisconnectNic - + Routine Description: This function is called to disconnect a NIC from a switch. After returning from this function the extension cannot use this NIC as a destination. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being disconnected - + Return Value: VOID - ---*/ + +--*/ VOID SxExtDisconnectNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -403,26 +403,26 @@ SxExtDisconnectNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtDeleteNic - + Routine Description: This function is called to delete a NIC from a switch. No futher traffic/control will be recieved for this NIC. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being deleted - + Return Value: VOID - + --*/ VOID SxExtDeleteNic( @@ -431,11 +431,11 @@ SxExtDeleteNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtTeardownPort - + Routine Description: This function is called to start deletion of a port on a switch. Upon recieving this call, no further references may be taken @@ -443,15 +443,15 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the Port being deleted - + Return Value: VOID - + --*/ VOID SxExtTeardownPort( @@ -464,7 +464,7 @@ SxExtTeardownPort( /*++ SxExtDeletePort - + Routine Description: This function is called to finish deletion of a port on a switch. Upon recieving this call, no traffic/control will be recieved @@ -472,70 +472,70 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the Port being deleted - + Return Value: VOID - + --*/ VOID -SxExtDeletePort( +SxExtDeletePort( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_PORT_PARAMETERS Port ); - + /*++ SxExtSaveNic - + Routine Description: This function is called to retrieve save data for a given NIC. This function will be called until all extensions have finished saving data. - + An new save for this NIC will not start until SxExtSaveNicComplete has been received. - + If returning NDIS_STATUS_SUCCESS from this function, and BytesWritten > 0 you must write to the ExtensionId, ExtensionFriendlyName, SaveDataSize and SaveData fields in SaveState. SxExtUniqueName MUST be written to ExtensionId. SxExtFriendlyName should be written to ExtensionFriendlyName. - + If returning NDIS_STATUS_SUCCESS with BytesWritten == 0, DO NOT write any data to any fields. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information and buffer to save to - + BytesWritten - the # of bytes written to the save buffer - + BytesNeeded - the length of the save buffer needed - + Return Value: NDIS_STATUS_SUCCESS - if the buffer was successfully written, or not needed and BytesWritten is set to 0 - + NDIS_STATUS_BUFFER_TOO_SHORT - if the buffer is too short for the necessary save, write the length needed in BytesNeeded NDIS_STATUS_*** - to fail the save operation - + --*/ NDIS_STATUS -SxExtSaveNic( +SxExtSaveNic( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _Inout_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -547,123 +547,123 @@ SxExtSaveNic( /*++ SxExtSaveNicComplete - + Routine Description: This function is called to notify the extension that saving the given NIC has been completed by all extensions. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information - + Return Value: VOID - ---*/ + +--*/ VOID -SxExtSaveNicComplete( +SxExtSaveNicComplete( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState ); - + /*++ SxExtNicRestore - + Routine Description: This function is called to restore previously saved data. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information - + BytesRestored - the number of bytes restored from the saved data - + Return Value: NDIS_STATUS_SUCCESS - if this data belongs to this extension, and was successfully restored (BytesRestored written) OR this data does not belong to this extension - (BytesRestored == 0) - + (BytesRestored == 0) + NDIS_STATUS_*** - there was an error while attempting to restore this data - ---*/ + +--*/ NDIS_STATUS -SxExtNicRestore( +SxExtNicRestore( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState, _Out_ PULONG BytesRestored ); - + /*++ SxExtNicRestoreComplete - + Routine Description: This function is called to signify the end of a restore operation. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information - + Return Value: VOID - ---*/ + +--*/ VOID -SxExtNicRestoreComplete( +SxExtNicRestoreComplete( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState ); - - + + /*++ SxExtAddSwitchProperty - + Routine Description: This function is called to add a property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be applied - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtAddSwitchProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -675,31 +675,31 @@ SxExtAddSwitchProperty( /*++ SxExtUpdateSwitchProperty - + Routine Description: This function is called to update a property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be updated - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtUpdateSwitchProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -707,28 +707,28 @@ SxExtUpdateSwitchProperty( _In_ PNDIS_SWITCH_PROPERTY_PARAMETERS SwitchProperty ); - + /*++ SxExtDeleteSwitchProperty - + Routine Description: This function is called to delete a property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be deleted - + Return Value: TRUE - if the policy belongs to this extension - + FALSE - otherwise - ---*/ + +--*/ BOOLEAN SxExtDeleteSwitchProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -740,32 +740,32 @@ SxExtDeleteSwitchProperty( /*++ SxExtAddPortProperty - + Routine Description: This function is called to add a property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + PortProperty - the property to be applied - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtAddPortProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -777,32 +777,32 @@ SxExtAddPortProperty( /*++ SxExtUpdatePortProperty - + Routine Description: This function is called to update a property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + PortProperty - the property to be applied - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtUpdatePortProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -810,29 +810,29 @@ SxExtUpdatePortProperty( _In_ PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS PortProperty ); - + /*++ SxExtDeletePortProperty - + Routine Description: This function is called to delete a property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be deleted - + Return Value: TRUE - if the policy is not consumed by this extension - + FALSE - otherwise - ---*/ + +--*/ BOOLEAN SxExtDeletePortProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -840,33 +840,33 @@ SxExtDeletePortProperty( _In_ PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS PortProperty ); - + /*++ SxExtQuerySwitchFeatureStatus - + Routine Description: This function is called to query the status of a custom property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchFeatureStatus - the property buffer - + BytesNeeded - if SwitchFeatureStatus is too small, this should be set to the size buffer needed - + Return Value: TRUE - return true if this property belongs to this extension, if BytesNeeded > 0, the buffer will be reallocated and this function will be called again - + FALSE - otherwise - + --*/ BOOLEAN SxExtQuerySwitchFeatureStatus( @@ -880,29 +880,29 @@ SxExtQuerySwitchFeatureStatus( /*++ SxExtQueryPortFeatureStatus - + Routine Description: This function is called to query the status of a custom property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + PortFeatureStatus - the property buffer - + BytesNeeded - if PortFeatureStatus is too small, this should be set to the size buffer needed - + Return Value: TRUE - return true if this property belongs to this extension, if BytesNeeded > 0, the buffer will be reallocated and this function will be called again - + FALSE - otherwise - + --*/ BOOLEAN SxExtQueryPortFeatureStatus( @@ -911,12 +911,12 @@ SxExtQueryPortFeatureStatus( _Inout_ PNDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS PortFeatureStatus, _Inout_ PULONG BytesNeeded ); - - + + /*++ SxExtProcessNicRequest - + Routine Description: This function is called upon the reciept of an OID_SWITCH_NIC_REQUEST to the extension. @@ -927,30 +927,30 @@ Routine Description: a valid SourcePortId and SourceNicIndex, which it has taken a reference on. The extension can change the OidRequest if it needs to. - + !! This function should only be used by forwarding extensions. !! Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + OidRequest - the OID wrapped by the NIC request - + SourcePortId - the source PortId to set - + SourceNicIndex - the source NicIndex to set - + DestinationPortId - the destination PortId to set - + DestinationNicIndex - the destination NicIndex to set - + Return Value: NDIS_STATUS_SUCCESS - sends OID - + NDIS_STATUS_*** - complete OID with given status - + --*/ NDIS_STATUS SxExtProcessNicRequest( @@ -967,7 +967,7 @@ SxExtProcessNicRequest( /*++ SxExtProcessNicRequestComplete - + Routine Description: This function is called upon the completion of an OID_SWITCH_NIC_REQUEST that this extension has previously altered. @@ -978,18 +978,18 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NicOidRequest - the OID buffer, encapsulated with source/destination info - + Status - the status the OID completed with - + Return Value: NDIS_STATUS - the status to complete the OID request with - ---*/ + +--*/ NDIS_STATUS SxExtProcessNicRequestComplete( _In_ PSX_SWITCH_OBJECT Switch, @@ -1001,12 +1001,12 @@ SxExtProcessNicRequestComplete( _In_ NDIS_SWITCH_NIC_INDEX DestinationNicIndex, _In_ NDIS_STATUS Status ); - + /*++ SxExtProcessNicStatus - + Routine Description: This function is called upon the reciept of an NDIS_STATUS_SWITCH_NIC_STATUS to the extension. @@ -1015,29 +1015,29 @@ Routine Description: failure status. If the extension wishes to drop the status indiction, it should return failure status, though this should be done very sparingly and carefully. - + !! This function should only be used by forwarding extensions. !! Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + StatusIndication - the indication wrapped by the NIC status indication - + SourcePortId - the source PortId of the indication - + SourceNicIndex - the source NicIndex of the indication - + Return Value: NDIS_STATUS_SUCCESS - return to continue forwarding this indication - + NDIS_STATUS_*** - if the extension wants to modify the status if modifying the status the extension should indicate its own modified status using SxLibIssueNicStatusIndicationUnsafe as soon as possible - + --*/ NDIS_STATUS SxExtProcessNicStatus( @@ -1048,11 +1048,11 @@ SxExtProcessNicStatus( _In_ NDIS_SWITCH_NIC_INDEX SourceNicIndex ); - + /*++ SxExtStartNetBufferListsIngress - + Routine Description: This function is called upon the receipt on an NBL on ingress. The extension should call SxLibSendNetBufferListsIngress to continue @@ -1063,19 +1063,19 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL to be sent - + SendFlags - the send flags from NDIS, equivalent to NDIS send flags for NdisFSendNetBufferLists - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartNetBufferListsIngress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1088,7 +1088,7 @@ SxExtStartNetBufferListsIngress( /*++ SxExtStartNetBufferListsEgress - + Routine Description: This function is called upon the receipt on an NBL on egress. The extension should call SxLibSendNetBufferListsEgress to continue @@ -1098,21 +1098,21 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL to be sent - + NumberOfNetBufferLists - the number of NBLs in NetBufferLists - + ReceiveFlags - the receive flags from NDIS, equivalent to NDIS receive flags for NdisFIndicateReceiveNetBufferLists - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartNetBufferListsEgress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1122,11 +1122,11 @@ SxExtStartNetBufferListsEgress( _In_ ULONG ReceiveFlags ); - + /*++ SxExtStartCompleteNetBufferListsEgress - + Routine Description: This function is called upon the completion of an NBL on egress. The extension must call SxLibCompleteNetBufferListsEgress @@ -1134,19 +1134,19 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL being completed - + ReturnFlags - the return flags from NDIS, equivalent to NDIS return flags for NdisFReturnNetBufferLists - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartCompleteNetBufferListsEgress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1155,16 +1155,16 @@ SxExtStartCompleteNetBufferListsEgress( _In_ ULONG ReturnFlags ); - + /*++ SxExtStartCompleteNetBufferListsIngress - + Routine Description: This function is called upon the completion of an NBL on ingress. The extension must call SxLibCompleteNetBufferListsIngress once it has finished processing the NBL. - + If there are NBLs injected by this extension in NetBufferLists, the extension must NOT call SxLibCompleteNetBufferListsIngress, and instead call SxLibCompletedInjectedNetBufferLists with the number @@ -1172,20 +1172,20 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL being completed - + SendCompleteFlags - the send complete flags from NDIS, equivalent to NDIS send complete flags for NdisFSendNetBufferListsComplete - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartCompleteNetBufferListsIngress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1193,4 +1193,4 @@ SxExtStartCompleteNetBufferListsIngress( _In_ PNET_BUFFER_LIST NetBufferLists, _In_ ULONG SendCompleteFlags ); - + diff --git a/network/ndis/extension/base/SxBase.c b/network/ndis/extension/base/SxBase.c index f45f8b791..0d9bc91ab 100644 --- a/network/ndis/extension/base/SxBase.c +++ b/network/ndis/extension/base/SxBase.c @@ -42,7 +42,7 @@ SxpNdisProcessMethodOid( _Out_ PULONG BytesNeeded ); - + // // DriverEntry // http://msdn.microsoft.com/en-us/library/ff544113(v=VS.85).aspx @@ -59,7 +59,7 @@ DriverEntry( NDIS_STRING serviceName; UNREFERENCED_PARAMETER(RegistryPath); - + // // Initialize extension specific data. // @@ -86,10 +86,10 @@ DriverEntry( fChars.FriendlyName = SxExtensionFriendlyName; fChars.UniqueName = SxExtensionGuid; fChars.ServiceName = serviceName; - + fChars.SetOptionsHandler = SxNdisSetOptions; fChars.SetFilterModuleOptionsHandler = SxNdisSetFilterModuleOptions; - + fChars.AttachHandler = SxNdisAttach; fChars.DetachHandler = SxNdisDetach; fChars.PauseHandler = SxNdisPause; @@ -100,14 +100,14 @@ DriverEntry( fChars.CancelSendNetBufferListsHandler = SxNdisCancelSendNetBufferLists; fChars.ReceiveNetBufferListsHandler = SxNdisReceiveNetBufferLists; fChars.ReturnNetBufferListsHandler = SxNdisReturnNetBufferLists; - + fChars.OidRequestHandler = SxNdisOidRequest; fChars.OidRequestCompleteHandler = SxNdisOidRequestComplete; fChars.CancelOidRequestHandler = SxNdisCancelOidRequest; - + fChars.NetPnPEventHandler = SxNdisNetPnPEvent; fChars.StatusHandler = SxNdisStatus; - + NdisAllocateSpinLock(&SxExtensionListLock); InitializeListHead(&SxExtensionList); @@ -129,7 +129,7 @@ DriverEntry( } NdisFreeSpinLock(&SxExtensionListLock); - + SxExtUninitialize(); } @@ -150,7 +150,7 @@ SxNdisUnload( UNREFERENCED_PARAMETER(DriverObject); SxExtUninitialize(); - + NdisFDeregisterFilterDriver(SxDriverHandle); NdisFreeSpinLock(&SxExtensionListLock); } @@ -171,7 +171,7 @@ SxNdisSetOptions( UNREFERENCED_PARAMETER(DriverContext); return NDIS_STATUS_SUCCESS; } - + // // FilterSetModuleOptions Function @@ -206,7 +206,7 @@ SxNdisAttach( NDIS_SWITCH_CONTEXT switchContext; NDIS_SWITCH_OPTIONAL_HANDLERS switchHandler; PSX_SWITCH_OBJECT switchObject; - + UNREFERENCED_PARAMETER(SxDriverContext); DEBUGP(DL_TRACE, ("===>SxAttach: NdisFilterHandle %p\n", NdisFilterHandle)); @@ -291,11 +291,11 @@ SxNdisAttach( switchObject->ControlFlowState = SxSwitchAttached; switchObject->DataFlowState = SxSwitchPaused; - + NdisAcquireSpinLock(&SxExtensionListLock); InsertHeadList(&SxExtensionList, &switchObject->Link); NdisReleaseSpinLock(&SxExtensionListLock); - + Cleanup: if (status != NDIS_STATUS_SUCCESS) @@ -331,20 +331,20 @@ SxNdisDetach( // NT_ASSERT(switchObject->DataFlowState == SxSwitchPaused); switchObject->ControlFlowState = SxSwitchDetached; - + KeMemoryBarrier(); - + while(switchObject->PendingOidCount > 0) { NdisMSleep(1000); } - + SxExtDeleteSwitch(switchObject, switchObject->ExtensionContext); NdisAcquireSpinLock(&SxExtensionListLock); RemoveEntryList(&switchObject->Link); NdisReleaseSpinLock(&SxExtensionListLock); - + ExFreePool(switchObject); // @@ -375,15 +375,15 @@ SxNdisPause( ("===>NDISLWF SxPause: SxInstance %p\n", FilterModuleContext)); SxExtPauseSwitch(switchObject, switchObject->ExtensionContext); - + // // Set the flag that the filter is going to pause. // NT_ASSERT(switchObject->DataFlowState == SxSwitchRunning); switchObject->DataFlowState = SxSwitchPaused; - + KeMemoryBarrier(); - + while(switchObject->PendingInjectedNblCount > 0) { NdisMSleep(1000); @@ -413,7 +413,7 @@ SxNdisRestart( DEBUGP(DL_TRACE, ("===>SxRestart: FilterModuleContext %p\n", FilterModuleContext)); - + status = SxExtRestartSwitch(switchObject, switchObject->ExtensionContext); if (status != NDIS_STATUS_SUCCESS) @@ -424,7 +424,7 @@ SxNdisRestart( NT_ASSERT(switchObject->DataFlowState == SxSwitchPaused); switchObject->DataFlowState = SxSwitchRunning; - + DEBUGP(DL_TRACE, ("<===SxRestart: FilterModuleContext %p, status %x\n", FilterModuleContext, @@ -452,11 +452,11 @@ SxNdisOidRequest( PVOID *cloneRequestContext; BOOLEAN completeOid = FALSE; ULONG bytesNeeded = 0; - + status = NDIS_STATUS_SUCCESS; DEBUGP(DL_TRACE, ("===>SxOidRequest: OidRequest %p.\n", OidRequest)); - + NdisInterlockedIncrement(&switchObject->PendingOidCount); status = NdisAllocateCloneOidRequest(switchObject->NdisFilterHandle, @@ -471,15 +471,15 @@ SxNdisOidRequest( cloneRequestContext = (PVOID*)(&clonedRequest->SourceReserved[0]); *cloneRequestContext = OidRequest; - + switch (clonedRequest->RequestType) - { + { case NdisRequestSetInformation: status = SxpNdisProcessSetOid(switchObject, clonedRequest, &completeOid); break; - + case NdisRequestMethod: status = SxpNdisProcessMethodOid(switchObject, clonedRequest, @@ -488,7 +488,7 @@ SxNdisOidRequest( break; } - + if (completeOid) { NdisFreeCloneOidRequest(switchObject->NdisFilterHandle, clonedRequest); @@ -580,7 +580,7 @@ SxNdisOidRequestComplete( NdisOidRequest->DATA.METHOD_INFORMATION.BytesNeeded; originalRequest->DATA.METHOD_INFORMATION.BytesWritten = NdisOidRequest->DATA.METHOD_INFORMATION.BytesWritten; - + if (NdisOidRequest->DATA.METHOD_INFORMATION.Oid == OID_SWITCH_NIC_REQUEST && switchObject->OldNicRequest != NULL) { @@ -593,23 +593,23 @@ SxNdisOidRequestComplete( nicOidRequestBuf->DestinationPortId, nicOidRequestBuf->DestinationNicIndex, Status); - + originalRequest->DATA.METHOD_INFORMATION.InformationBuffer = switchObject->OldNicRequest; switchObject->OldNicRequest = NULL; ExFreePoolWithTag(nicOidRequestBuf, SxExtAllocationTag); } - + break; case NdisRequestSetInformation: header = originalRequest->DATA.SET_INFORMATION.InformationBuffer; - + originalRequest->DATA.SET_INFORMATION.BytesRead = NdisOidRequest->DATA.SET_INFORMATION.BytesRead; originalRequest->DATA.SET_INFORMATION.BytesNeeded = NdisOidRequest->DATA.SET_INFORMATION.BytesNeeded; - + if (NdisOidRequest->DATA.METHOD_INFORMATION.Oid == OID_SWITCH_PORT_CREATE && Status != NDIS_STATUS_SUCCESS) { @@ -623,7 +623,7 @@ SxNdisOidRequestComplete( SxExtDeleteNic(switchObject, switchObject->ExtensionContext, (PNDIS_SWITCH_NIC_PARAMETERS)header); - + } break; @@ -647,7 +647,7 @@ SxNdisOidRequestComplete( Status); DEBUGP(DL_TRACE, ("<===SxOidRequestComplete.\n")); - + Cleanup: NdisInterlockedDecrement(&switchObject->PendingOidCount); } @@ -667,7 +667,7 @@ SxNdisSendNetBufferLists( ) { PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; - + UNREFERENCED_PARAMETER(PortNumber); SxExtStartNetBufferListsIngress(switchObject, @@ -713,7 +713,7 @@ SxNdisReceiveNetBufferLists( ) { PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; - + UNREFERENCED_PARAMETER(PortNumber); SxExtStartNetBufferListsEgress(switchObject, @@ -773,9 +773,9 @@ SxNdisNetPnPEvent( ) { PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; - + if (NetPnPEvent->NetPnPEvent.NetEvent == NetEventSwitchActivate) - { + { // // Switch Activation must be passed along regardless of successful // initialization. @@ -783,7 +783,7 @@ SxNdisNetPnPEvent( SxExtActivateSwitch(switchObject, switchObject->ExtensionContext); } - + return NdisFNetPnPEvent(switchObject->NdisFilterHandle, NetPnPEvent); } @@ -804,14 +804,14 @@ SxNdisStatus( PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; PNDIS_SWITCH_NIC_STATUS_INDICATION nicIndication; PNDIS_STATUS_INDICATION originalIndication; - + if (StatusIndication->Header.Type != NDIS_OBJECT_TYPE_STATUS_INDICATION || StatusIndication->Header.Revision != NDIS_STATUS_INDICATION_REVISION_1 || StatusIndication->Header.Size < NDIS_SIZEOF_STATUS_INDICATION_REVISION_1) { goto Cleanup; } - + // // Only NDIS_STATUS_SWITCH_NIC_STAUTUS indications need to be processed // by switch extensions. @@ -820,24 +820,24 @@ SxNdisStatus( { goto Cleanup; } - + nicIndication = StatusIndication->StatusBuffer; - + if (nicIndication->Header.Type != NDIS_OBJECT_TYPE_STATUS_INDICATION || nicIndication->Header.Revision != NDIS_SWITCH_NIC_STATUS_INDICATION_REVISION_1 || nicIndication->Header.Size < NDIS_SIZEOF_SWITCH_NIC_STATUS_REVISION_1) { goto Cleanup; } - + originalIndication = nicIndication->StatusIndication; - + status = SxExtProcessNicStatus(switchObject, switchObject->ExtensionContext, originalIndication, nicIndication->SourcePortId, nicIndication->SourceNicIndex); - + Cleanup: if (status == NDIS_STATUS_SUCCESS) { @@ -846,7 +846,7 @@ SxNdisStatus( } return; - + } @@ -861,26 +861,26 @@ SxpNdisProcessSetOid( NDIS_OID oid = OidRequest->DATA.SET_INFORMATION.Oid; PNDIS_OBJECT_HEADER header; ULONG bytesRestored = 0; - + *Complete = FALSE; - + header = OidRequest->DATA.SET_INFORMATION.InformationBuffer; - + if (OidRequest->DATA.SET_INFORMATION.InformationBufferLength != 0 && - OidRequest->DATA.SET_INFORMATION.InformationBufferLength < + OidRequest->DATA.SET_INFORMATION.InformationBufferLength < sizeof(NDIS_OBJECT_HEADER)) { status = NDIS_STATUS_NOT_SUPPORTED; *Complete = TRUE; goto Cleanup; } - + if (OidRequest->DATA.SET_INFORMATION.InformationBufferLength == 0) { *Complete = FALSE; goto Cleanup; } - + switch(oid) { case OID_SWITCH_PROPERTY_ADD: @@ -893,7 +893,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_PROPERTY_ADD) { status = SxExtAddSwitchProperty(Switch, @@ -906,7 +906,7 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_PROPERTY_PARAMETERS)header); } - + if (status == NDIS_STATUS_NOT_SUPPORTED) { status = NDIS_STATUS_SUCCESS; @@ -916,7 +916,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + break; case OID_SWITCH_PROPERTY_DELETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || @@ -927,13 +927,13 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtDeleteSwitchProperty(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PROPERTY_DELETE_PARAMETERS)header); - + break; - + case OID_SWITCH_PORT_PROPERTY_ADD: case OID_SWITCH_PORT_PROPERTY_UPDATE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || @@ -944,7 +944,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_PORT_PROPERTY_ADD) { status = SxExtAddPortProperty(Switch, @@ -957,7 +957,7 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS)header); } - + if (status == NDIS_STATUS_NOT_SUPPORTED) { status = NDIS_STATUS_SUCCESS; @@ -967,9 +967,9 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + break; - + case OID_SWITCH_PORT_PROPERTY_DELETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS_REVISION_1 || @@ -979,13 +979,13 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtDeletePortProperty(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS)header); - + break; - + case OID_SWITCH_PORT_CREATE: case OID_SWITCH_PORT_UPDATED: case OID_SWITCH_PORT_TEARDOWN: @@ -998,26 +998,26 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_PORT_CREATE) { status = SxExtCreatePort(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); - + if (status != NDIS_STATUS_SUCCESS) { *Complete = TRUE; } } else if (oid == OID_SWITCH_PORT_UPDATED) - { + { SxExtUpdatePort(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); } else if (oid == OID_SWITCH_PORT_TEARDOWN) - { + { SxExtTeardownPort(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); @@ -1028,9 +1028,9 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); } - + break; - + case OID_SWITCH_NIC_CREATE: case OID_SWITCH_NIC_CONNECT: case OID_SWITCH_NIC_UPDATED: @@ -1044,7 +1044,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_NIC_CREATE) { status = SxExtCreateNic(Switch, @@ -1056,7 +1056,7 @@ SxpNdisProcessSetOid( } } else if (oid == OID_SWITCH_NIC_CONNECT) - { + { SxExtConnectNic(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_NIC_PARAMETERS)header); @@ -1079,9 +1079,9 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_NIC_PARAMETERS)header); } - + break; - + case OID_SWITCH_NIC_RESTORE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 || @@ -1090,12 +1090,12 @@ SxpNdisProcessSetOid( status = NDIS_STATUS_NOT_SUPPORTED; goto Cleanup; } - + status = SxExtNicRestore(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_NIC_SAVE_STATE)header, &bytesRestored); - + if (status != NDIS_STATUS_SUCCESS) { *Complete = TRUE; @@ -1104,8 +1104,8 @@ SxpNdisProcessSetOid( { *Complete = TRUE; } - - break; + + break; case OID_SWITCH_NIC_SAVE_COMPLETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || @@ -1116,13 +1116,13 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + SxExtSaveNicComplete(Switch, Switch->ExtensionContext, - (PNDIS_SWITCH_NIC_SAVE_STATE)header); + (PNDIS_SWITCH_NIC_SAVE_STATE)header); break; - + case OID_SWITCH_NIC_RESTORE_COMPLETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 || @@ -1132,17 +1132,17 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + SxExtNicRestoreComplete(Switch, Switch->ExtensionContext, - (PNDIS_SWITCH_NIC_SAVE_STATE)header); + (PNDIS_SWITCH_NIC_SAVE_STATE)header); break; - + default: break; } - + Cleanup: return status; } @@ -1165,12 +1165,12 @@ SxpNdisProcessMethodOid( NDIS_SWITCH_NIC_INDEX destNic, sourceNic; ULONG bytesWritten = 0; ULONG bytesNeeded = 0; - + *Complete = FALSE; *BytesNeeded = 0; - + header = OidRequest->DATA.METHOD_INFORMATION.InformationBuffer; - + switch(oid) { case OID_SWITCH_FEATURE_STATUS_QUERY: @@ -1182,19 +1182,19 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtQuerySwitchFeatureStatus(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_FEATURE_STATUS_PARAMETERS)header, BytesNeeded); - + if (*BytesNeeded > 0) { status = NDIS_STATUS_BUFFER_TOO_SHORT; } - + break; - + case OID_SWITCH_PORT_FEATURE_STATUS_QUERY: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_FEATURE_STATUS_PARAMETERS_REVISION_1 || @@ -1204,19 +1204,19 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtQueryPortFeatureStatus(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS)header, BytesNeeded); - + if (*BytesNeeded > 0) { status = NDIS_STATUS_BUFFER_TOO_SHORT; } - + break; - + case OID_SWITCH_NIC_REQUEST: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_OID_REQUEST_REVISION_1 || @@ -1226,14 +1226,14 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + nicOidRequest = (PNDIS_SWITCH_NIC_OID_REQUEST)header; - + sourcePort = nicOidRequest->SourcePortId; sourceNic = nicOidRequest->SourceNicIndex; destPort = nicOidRequest->DestinationPortId; destNic = nicOidRequest->DestinationNicIndex; - + status = SxExtProcessNicRequest(Switch, Switch->ExtensionContext, nicOidRequest->OidRequest, @@ -1241,13 +1241,13 @@ SxpNdisProcessMethodOid( &sourceNic, &destPort, &destNic); - + if (status != NDIS_STATUS_SUCCESS) { *Complete = TRUE; goto Cleanup; } - + if (sourcePort != nicOidRequest->SourcePortId || sourceNic != nicOidRequest->SourceNicIndex || destPort != nicOidRequest->DestinationPortId || @@ -1255,31 +1255,31 @@ SxpNdisProcessMethodOid( { ASSERT(Switch->OldNicRequest == NULL); Switch->OldNicRequest = nicOidRequest; - + newNicOidRequest = (PNDIS_SWITCH_NIC_OID_REQUEST)ExAllocatePool2( POOL_FLAG_NON_PAGED, sizeof(NDIS_SWITCH_NIC_OID_REQUEST), SxExtAllocationTag); - + if (newNicOidRequest == NULL) { status = NDIS_STATUS_RESOURCES; *Complete = TRUE; goto Cleanup; } - + newNicOidRequest->Header = nicOidRequest->Header; newNicOidRequest->SourcePortId = sourcePort; newNicOidRequest->SourceNicIndex = sourceNic; newNicOidRequest->DestinationPortId = destPort; newNicOidRequest->DestinationNicIndex = destNic; newNicOidRequest->OidRequest = nicOidRequest->OidRequest; - + OidRequest->DATA.METHOD_INFORMATION.InformationBuffer = newNicOidRequest; } - + break; - + case OID_SWITCH_NIC_SAVE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 || @@ -1289,13 +1289,13 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + status = SxExtSaveNic(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_NIC_SAVE_STATE)header, &bytesWritten, &bytesNeeded); - + if (status == NDIS_STATUS_SUCCESS && bytesWritten > 0) { @@ -1311,13 +1311,13 @@ SxpNdisProcessMethodOid( { *Complete = TRUE; } - + break; - + default: break; } - + Cleanup: return status; } @@ -1351,7 +1351,7 @@ Return Value: { PSX_OID_REQUEST oidRequest; ULONG bytesNeeded; - + UNREFERENCED_PARAMETER(Switch); bytesNeeded = 0; @@ -1381,7 +1381,7 @@ Return Value: // Save away the completion status. // oidRequest->Status = Status; - + // // Save bytesNeeded // diff --git a/network/ndis/extension/base/SxBase.h b/network/ndis/extension/base/SxBase.h index 5d34ee03e..8418ff940 100644 --- a/network/ndis/extension/base/SxBase.h +++ b/network/ndis/extension/base/SxBase.h @@ -58,18 +58,18 @@ typedef struct _SX_SWITCH_OBJECT // SX_SWITCH_DATAFLOW_STATE DataFlowState; SX_SWITCH_CONTROLFLOW_STATE ControlFlowState; - + // // Management fields. // volatile LONG PendingInjectedNblCount; volatile LONG PendingOidCount; - + // // Control Path Management. // PNDIS_SWITCH_NIC_OID_REQUEST OldNicRequest; - + } SX_SWITCH_OBJECT, *PSX_SWITCH_OBJECT; typedef struct _SX_OID_REQUEST diff --git a/network/ndis/extension/base/SxLibrary.c b/network/ndis/extension/base/SxLibrary.c index c4b12d45b..196582f39 100644 --- a/network/ndis/extension/base/SxLibrary.c +++ b/network/ndis/extension/base/SxLibrary.c @@ -34,29 +34,29 @@ SxLibSendNetBufferListsIngress( PNET_BUFFER_LIST *curDropNbl = &dropNbl; NDIS_SWITCH_PORT_ID curSourcePort; NDIS_STRING filterReason; - + dispatch = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendFlags); sameSource = NDIS_TEST_SEND_FLAG(SendFlags, NDIS_SEND_FLAGS_SWITCH_SINGLE_SOURCE); - + InterlockedAdd(&Switch->PendingInjectedNblCount, NumInjectedNetBufferLists); KeMemoryBarrier(); - + if (Switch->DataFlowState != SxSwitchRunning) { RtlInitUnicodeString(&filterReason, L"Extension Paused"); - + sendCompleteFlags = (dispatch) ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0; sendCompleteFlags |= (sameSource) ? NDIS_SEND_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE : 0; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(NetBufferLists); - + if (sameSource) { for (curNbl = NetBufferLists; curNbl != NULL; curNbl = curNbl->Next) { ++numNbls; } - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -66,11 +66,11 @@ SxLibSendNetBufferListsIngress( numNbls, NetBufferLists, &filterReason); - + SxExtStartCompleteNetBufferListsIngress(Switch, Switch->ExtensionContext, NetBufferLists, - sendCompleteFlags); + sendCompleteFlags); } else { @@ -79,9 +79,9 @@ SxLibSendNetBufferListsIngress( { nextNbl = curNbl->Next; curNbl->Next = NULL; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl); - + if(curSourcePort == fwdDetail->SourcePortId) { *curDropNbl = curNbl; @@ -99,7 +99,7 @@ SxLibSendNetBufferListsIngress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsIngress(Switch, Switch->ExtensionContext, dropNbl, @@ -111,7 +111,7 @@ SxLibSendNetBufferListsIngress( curSourcePort = fwdDetail->SourcePortId; } } - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -121,21 +121,21 @@ SxLibSendNetBufferListsIngress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsIngress(Switch, Switch->ExtensionContext, dropNbl, sendCompleteFlags); - } - + } + goto Cleanup; } - + NdisFSendNetBufferLists(Switch->NdisFilterHandle, NetBufferLists, NDIS_DEFAULT_PORT_NUMBER, SendFlags); - + Cleanup: return; } @@ -159,23 +159,23 @@ SxLibSendNetBufferListsEgress( PNET_BUFFER_LIST dropNbl = NULL; PNET_BUFFER_LIST *curDropNbl = &dropNbl; NDIS_STRING filterReason; - + dispatch = NDIS_TEST_RECEIVE_AT_DISPATCH_LEVEL(ReceiveFlags); sameSource = NDIS_TEST_RECEIVE_FLAG(ReceiveFlags, NDIS_RECEIVE_FLAGS_SWITCH_SINGLE_SOURCE); - + if (Switch->DataFlowState != SxSwitchRunning) { RtlInitUnicodeString(&filterReason, L"Extension Paused"); - + returnFlags = (dispatch) ? NDIS_RETURN_FLAGS_DISPATCH_LEVEL : 0; returnFlags |= NDIS_RETURN_FLAGS_SWITCH_SINGLE_SOURCE; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(NetBufferLists); - + if (sameSource) { sourcePortId = fwdDetail->SourcePortId; - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -185,7 +185,7 @@ SxLibSendNetBufferListsEgress( NumberOfNetBufferLists, NetBufferLists, &filterReason); - + SxExtStartCompleteNetBufferListsEgress(Switch, Switch->ExtensionContext, NetBufferLists, @@ -199,9 +199,9 @@ SxLibSendNetBufferListsEgress( { nextNbl = curNbl->Next; curNbl->Next = NULL; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl); - + if(curSourcePort == fwdDetail->SourcePortId) { *curDropNbl = curNbl; @@ -219,7 +219,7 @@ SxLibSendNetBufferListsEgress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsEgress(Switch, Switch->ExtensionContext, dropNbl, @@ -231,7 +231,7 @@ SxLibSendNetBufferListsEgress( curSourcePort = fwdDetail->SourcePortId; } } - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -241,22 +241,22 @@ SxLibSendNetBufferListsEgress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsEgress(Switch, Switch->ExtensionContext, dropNbl, returnFlags); - } - + } + goto Cleanup; } - + NdisFIndicateReceiveNetBufferLists(Switch->NdisFilterHandle, NetBufferLists, NDIS_DEFAULT_PORT_NUMBER, NumberOfNetBufferLists, ReceiveFlags); - + Cleanup: return; } @@ -407,17 +407,17 @@ SxLibIssueOidRequest( { *BytesNeeded = bytesNeeded; } - + if (!asyncCompletion) { NdisInterlockedDecrement(&Switch->PendingOidCount); } - + if (oidRequest != NULL) { ExFreePoolWithTag(oidRequest, SxExtAllocationTag); } - + return status; } @@ -429,11 +429,11 @@ SxLibGetSwitchParametersUnsafe( ) { NDIS_STATUS status; - + SwitchParameters->Header.Revision = NDIS_SWITCH_PARAMETERS_REVISION_1; SwitchParameters->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; SwitchParameters->Header.Size = sizeof(NDIS_SWITCH_PARAMETERS); - + status = SxLibIssueOidRequest(Switch, NdisRequestQueryInformation, OID_SWITCH_PARAMETERS, @@ -443,7 +443,7 @@ SxLibGetSwitchParametersUnsafe( 0, 0, NULL); - + return status; } @@ -458,32 +458,32 @@ SxLibGetPortArrayUnsafe( ULONG BytesNeeded = 0; PNDIS_SWITCH_PORT_ARRAY portArray = NULL; ULONG arrayLength = 0; - - do + + do { if (portArray != NULL) { ExFreePoolWithTag(portArray, SxExtAllocationTag); } - + if (BytesNeeded != 0) { arrayLength = BytesNeeded; portArray = ExAllocatePool2(POOL_FLAG_NON_PAGED, arrayLength, SxExtAllocationTag); - + if (portArray == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + portArray->Header.Revision = NDIS_SWITCH_PORT_ARRAY_REVISION_1; portArray->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; portArray->Header.Size = (USHORT)arrayLength; } - + status = SxLibIssueOidRequest(Switch, NdisRequestQueryInformation, OID_SWITCH_PORT_ARRAY, @@ -493,9 +493,9 @@ SxLibGetPortArrayUnsafe( 0, 0, &BytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - + *PortArray = portArray; Cleanup: if (status != NDIS_STATUS_SUCCESS && @@ -503,7 +503,7 @@ SxLibGetPortArrayUnsafe( { ExFreePoolWithTag(portArray, SxExtAllocationTag); } - + return status; } @@ -518,32 +518,32 @@ SxLibGetNicArrayUnsafe( ULONG BytesNeeded = 0; PNDIS_SWITCH_NIC_ARRAY nicArray = NULL; ULONG arrayLength = 0; - - do + + do { if (nicArray != NULL) { ExFreePoolWithTag(nicArray, SxExtAllocationTag); } - + if (BytesNeeded != 0) { arrayLength = BytesNeeded; nicArray = ExAllocatePool2(POOL_FLAG_NON_PAGED, arrayLength, SxExtAllocationTag); - + if (nicArray == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + nicArray->Header.Revision = NDIS_SWITCH_PORT_ARRAY_REVISION_1; nicArray->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; nicArray->Header.Size = (USHORT)arrayLength; } - + status = SxLibIssueOidRequest(Switch, NdisRequestQueryInformation, OID_SWITCH_NIC_ARRAY, @@ -553,9 +553,9 @@ SxLibGetNicArrayUnsafe( 0, 0, &BytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - + *NicArray = nicArray; Cleanup: if (status != NDIS_STATUS_SUCCESS && @@ -563,7 +563,7 @@ SxLibGetNicArrayUnsafe( { ExFreePoolWithTag(nicArray, SxExtAllocationTag); } - + return status; } @@ -581,13 +581,13 @@ SxLibGetSwitchPropertyUnsafe( ULONG bytesNeeded = 0; PNDIS_SWITCH_PROPERTY_ENUM_PARAMETERS outputBuffer = NULL; USHORT outputBufferLength = sizeof(NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS); - + propertyParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; propertyParameters.Header.Revision = NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_REVISION_1; - + propertyParameters.PropertyType = PropertyType; propertyParameters.SerializationVersion = NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1; - + // // For Built-in properties, the ID is unnecessary. // @@ -601,18 +601,18 @@ SxLibGetSwitchPropertyUnsafe( { ASSERT(PropertyType != NdisSwitchPropertyTypeCustom); } - + outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - - do + + do { if (bytesNeeded != 0) { @@ -622,20 +622,20 @@ SxLibGetSwitchPropertyUnsafe( outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } } - + if(outputBufferLength >= sizeof(propertyParameters)) { NdisMoveMemory(outputBuffer, &propertyParameters, sizeof(propertyParameters)); - + } - + status = SxLibIssueOidRequest(Switch, NdisRequestMethod, OID_SWITCH_PROPERTY_ENUM, @@ -645,19 +645,19 @@ SxLibGetSwitchPropertyUnsafe( 0, 0, &bytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - -Cleanup: + +Cleanup: if (status != NDIS_STATUS_SUCCESS && outputBuffer != NULL) { ExFreePoolWithTag(outputBuffer, SxExtAllocationTag); outputBuffer = NULL; } - + *SwitchPropertyEnumParameters = outputBuffer; - + return status; } @@ -676,14 +676,14 @@ SxLibGetPortPropertyUnsafe( ULONG bytesNeeded = 0; PNDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS outputBuffer = NULL; USHORT outputBufferLength = sizeof(NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS); - + propertyParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; propertyParameters.Header.Revision = NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_REVISION_1; - + propertyParameters.PortId = PortId; propertyParameters.PropertyType = PropertyType; propertyParameters.SerializationVersion = NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1; - + // // For Built-in properties, the ID is unnecessary. // @@ -697,18 +697,18 @@ SxLibGetPortPropertyUnsafe( { ASSERT(PropertyType != NdisSwitchPortPropertyTypeCustom); } - + outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - - do + + do { if (bytesNeeded != 0) { @@ -718,20 +718,20 @@ SxLibGetPortPropertyUnsafe( outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } } - + if(outputBufferLength >= sizeof(propertyParameters)) { outputBuffer->Header.Size = outputBufferLength; NdisMoveMemory(outputBuffer, &propertyParameters, sizeof(propertyParameters)); } - + status = SxLibIssueOidRequest(Switch, NdisRequestMethod, OID_SWITCH_PORT_PROPERTY_ENUM, @@ -741,9 +741,9 @@ SxLibGetPortPropertyUnsafe( 0, 0, &bytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - + Cleanup: if (status != NDIS_STATUS_SUCCESS && outputBuffer != NULL) @@ -751,9 +751,9 @@ SxLibGetPortPropertyUnsafe( ExFreePoolWithTag(outputBuffer, SxExtAllocationTag); outputBuffer = NULL; } - + *PortPropertyEnumParameters = outputBuffer; - + return status; } @@ -788,27 +788,27 @@ SxLibIssueNicStatusIndicationUnsafe( NDIS_STATUS_INDICATION statusIndication; NDIS_STATUS_INDICATION wrappedIndication; NDIS_SWITCH_NIC_STATUS_INDICATION nicIndication; - + NdisZeroMemory(&wrappedIndication, sizeof(wrappedIndication)); - + wrappedIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; wrappedIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; wrappedIndication.Header.Size = NDIS_SIZEOF_STATUS_INDICATION_REVISION_1; - + wrappedIndication.SourceHandle = Switch->NdisFilterHandle; wrappedIndication.PortNumber = NDIS_DEFAULT_PORT_NUMBER; - + wrappedIndication.StatusCode = StatusCode; wrappedIndication.StatusBuffer = StatusBuffer; wrappedIndication.StatusBufferSize = StatusBufferSize; - + NdisZeroMemory(&nicIndication, sizeof(nicIndication)); - + nicIndication.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; nicIndication.Header.Revision = NDIS_SWITCH_NIC_STATUS_INDICATION_REVISION_1; nicIndication.Header.Size = NDIS_SIZEOF_SWITCH_NIC_STATUS_REVISION_1; nicIndication.StatusIndication = &wrappedIndication; - + if (IsDestination) { nicIndication.DestinationPortId = PortId; @@ -819,20 +819,20 @@ SxLibIssueNicStatusIndicationUnsafe( nicIndication.SourcePortId = PortId; nicIndication.SourceNicIndex = NicIndex; } - + NdisZeroMemory(&statusIndication, sizeof(statusIndication)); - + statusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; statusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; statusIndication.Header.Size = NDIS_SIZEOF_STATUS_INDICATION_REVISION_1; - + statusIndication.SourceHandle = Switch->NdisFilterHandle; statusIndication.PortNumber = NDIS_DEFAULT_PORT_NUMBER; - + statusIndication.StatusCode = NDIS_STATUS_SWITCH_NIC_STATUS; statusIndication.StatusBuffer = &nicIndication; statusIndication.StatusBufferSize = sizeof(nicIndication); - + NdisFIndicateStatus(Switch->NdisFilterHandle, &statusIndication); } diff --git a/network/ndis/extension/base/SxLibrary.h b/network/ndis/extension/base/SxLibrary.h index 2d9a30af6..325b93615 100644 --- a/network/ndis/extension/base/SxLibrary.h +++ b/network/ndis/extension/base/SxLibrary.h @@ -18,32 +18,32 @@ Module Name: /*++ SxLibSendNetBufferListsIngress - + Routine Description: This function is called to forward NBLs on ingress. The extension MUST call this function, or call SxLibCompleteNetBufferListsIngress for every NBL in NetBufferLists, recieved in SxExtStartNetBufferListsIngress. - + This function can also be called to inject NBLs. If there are NBLs in NetBufferLists that are initiated by the extension, NumInjectedNetBufferLists must be the number of new NBLs. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + SendFlags - the SendFlags equivalent to NDIS flags for NdisFSendNetBufferLists - + NumInjectedNetBufferLists - the number of NBLs in NetBufferLists initiated by the extension - + Return Value: VOID - + --*/ VOID SxLibSendNetBufferListsIngress( @@ -53,31 +53,31 @@ SxLibSendNetBufferListsIngress( _In_ ULONG NumInjectedNetBufferLists ); - + /*++ SxLibSendNetBufferListsEgress - + Routine Description: This function is called to forward NBLs on egress. The extension MUST call this function, or call SxLibCompleteNetBufferListsEgress for every NBL in NetBufferLists recieved in SxExtStartNetBufferListsEgress. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + NumberOfNetBufferLists - the number of NBLs in NetBufferLists - + ReceiveFlags - the ReceiveFlags equivalent to NDIS flags for NdisFIndicateReceiveNetBufferLists - + Return Value: VOID - + --*/ VOID SxLibSendNetBufferListsEgress( @@ -87,28 +87,28 @@ SxLibSendNetBufferListsEgress( _In_ ULONG ReceiveFlags ); - + /*++ SxLibCompleteNetBufferListsEgress - + Routine Description: This function is called to complete NBLs on egress. The extension MUST call this function for all NBLs recieved in SxExtStartCompleteNetBufferListsEgress. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + ReturnFlags - the ReceiveFlags equivalent to NDIS flags for NdisFReturnNetBufferLists - + Return Value: VOID - + --*/ VOID SxLibCompleteNetBufferListsEgress( @@ -120,25 +120,25 @@ SxLibCompleteNetBufferListsEgress( /*++ SxLibCompleteNetBufferListsIngress - + Routine Description: This function is called to complete NBLs on ingress. The extension MUST call this function, or SxLibCompletedInjectedNetBufferLists for all NBLs recieved in SxExtStartCompleteNetBufferListsEgress. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + SendCompleteFlags - the ReceiveFlags equivalent to NDIS flags for NdisFSendNetBufferListsComplete - + Return Value: VOID - + --*/ VOID SxLibCompleteNetBufferListsIngress( @@ -147,32 +147,32 @@ SxLibCompleteNetBufferListsIngress( _In_ ULONG SendCompleteFlags ); - + /*++ SxLibCompletedInjectedNetBufferLists - + Routine Description: This function is called after completing NBLs injected by the extension. - + Arguments: Switch - the Switch context - + NumInjectedNetBufferLists - the number of NBLs completed - + Return Value: VOID - + --*/ VOID SxLibCompletedInjectedNetBufferLists( _In_ PSX_SWITCH_OBJECT Switch, _In_ ULONG NumInjectedNetBufferLists - ); + ); + - /*++ SxLibIssueOidRequest @@ -185,7 +185,7 @@ Routine Description: NOTE: this assumes that the calling routine ensures validity of the filter handle until this returns. - + This function can only be called at PASSIVE_LEVEL. Arguments: @@ -203,8 +203,8 @@ Routine Description: OutputBufferLength - valid only for method request. MethodId - valid only for method request. - - Timeout - The timeout in seconds for the OID. + + Timeout - The timeout in seconds for the OID. BytesNeeded - place to return bytes read/written. @@ -225,88 +225,88 @@ SxLibIssueOidRequest( _In_ UINT Timeout, _Out_ PULONG BytesNeeded ); - + /*++ SxLibGetSwitchParametersUnsafe - + Routine Description: This function is called to get the current state of the switch. - + Arguments: Switch - the Switch context - + SwitchParameters - the returned switch parameters - + Return Value: NDIS_STATUS_SUCCESS - if SwitchParameters was successfully returned - + NDIS_STATUS_*** - otherwise - ---*/ + +--*/ NDIS_STATUS SxLibGetSwitchParametersUnsafe( _In_ PSX_SWITCH_OBJECT Switch, _Out_ PNDIS_SWITCH_PARAMETERS SwitchParameters ); - + /*++ SxLibGetPortArrayUnsafe - + Routine Description: This function is called to get the current array of ports. - + NOTE: It is necessary to synchonize this with SxExtPortCreate and SxExtPortTeardown. - + Arguments: Switch - the Switch context - + PortArray - the returned port array - + Return Value: NDIS_STATUS_SUCCESS - if PortArray was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetPortArrayUnsafe( _In_ PSX_SWITCH_OBJECT Switch, _Out_ PNDIS_SWITCH_PORT_ARRAY *PortArray - ); + ); + - /*++ SxLibGetNicArrayUnsafe - + Routine Description: This function is called to get the current array of NICs. - + NOTE: It is necessary to synchonize this with SxExtNicConnect and SxExtNicDisconnect. - + Arguments: Switch - the Switch context - + NicArray - the returned NIC array - + Return Value: NDIS_STATUS_SUCCESS - if NicArray was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetNicArrayUnsafe( @@ -317,32 +317,32 @@ SxLibGetNicArrayUnsafe( /*++ SxLibGetSwitchPropertyUnsafe - + Routine Description: This function is called to get the current array of the switch property queried. - + NOTE: It is necessary to synchonize this with SxExtAddSwitchProperty and SxExtDeleteSwitchProperty. - + Arguments: Switch - the Switch context - + PropertyType - the PropertyType to query for - + PropertyId - the GUID of the property (from mof file) - + PropertyVersion - the version of the property - + SwitchPropertyEnumParameters - the returned property enum - + Return Value: NDIS_STATUS_SUCCESS - if SwitchPropertyEnumParameters was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetSwitchPropertyUnsafe( @@ -355,32 +355,32 @@ SxLibGetSwitchPropertyUnsafe( /*++ SxLibGetPortPropertyUnsafe - + Routine Description: This function is called to get the current array of the switch property queried. - + NOTE: It is necessary to synchonize this with SxExtAddPortProperty and SxExtDeletePortProperty. - + Arguments: Switch - the Switch context - + PortId - the port to query from - + PropertyType - the PropertyType to query for - + PropertyId - the GUID of the property (from mof file) - + PortPropertyEnumParameters - the returned property enum - + Return Value: NDIS_STATUS_SUCCESS - if PortPropertyEnumParameters was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetPortPropertyUnsafe( @@ -394,25 +394,25 @@ SxLibGetPortPropertyUnsafe( /*++ SxLibRevokeVfUnsafe - + Routine Description: This function is called revoke the VF assignment for the given VM. - + NOTE: This must be synchonized with SxExtNicConnect and SxExtNicDisconnect for the PortId given, and ReferenceSwitchNic must have been successfully called. - + Arguments: Switch - the Switch context - + PortId - the port the VM is connected to - + Return Value: VOID - ---*/ + +--*/ VOID SxLibRevokeVfUnsafe( _In_ PSX_SWITCH_OBJECT Switch, @@ -422,35 +422,35 @@ SxLibRevokeVfUnsafe( /*++ SxLibIssueNicStatusIndicationUnsafe - + Routine Description: This function is called issue a NIC status indication. - + NOTE: This must be synchonized with SxExtNicConnect and SxExtNicDisconnect for the PortId given, and ReferenceSwitchNic must have been successfully called. - + Arguments: Switch - the Switch context - + StatusCode - the status code to indicate - + PortId - the port to indicate to/from - + NicIndex - the nic index to indicate to/from - + IsDestination - TRUE if PortId/NicIndex is destination info FALSE if PortId/NicIndex is source info - + StatusBuffer - the StatusBuffer for the indication - + StatusBufferSize - the size of StatusBuffer - + Return Value: VOID - ---*/ + +--*/ VOID SxLibIssueNicStatusIndicationUnsafe( _In_ PSX_SWITCH_OBJECT Switch, @@ -461,4 +461,4 @@ SxLibIssueNicStatusIndicationUnsafe( _In_opt_ PVOID StatusBuffer, _In_ ULONG StatusBufferSize ); - + diff --git a/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof b/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof index 88105b2f3..7d719ac3f 100644 --- a/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof +++ b/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof @@ -6,9 +6,9 @@ // #pragma namespace("\\\\.\\root\\virtualization\\v2") -[ Dynamic, +[ Dynamic, UUID("EB29F0F2-F5DC-45C6-81BB-3CD9F219BBBB"), - ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), + ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), Provider("VmmsWmiInstanceAndMethodProvider"), Locale(0x409), InterfaceVersion("1"), @@ -16,7 +16,7 @@ DisplayName("MSForwardExt MAC Address Policy") : Amended, Description("Source MAC Addresses to allow sends on MSForwardExt.") : Amended] class MSForwardExt_MacAddressRule : Msvm_EthernetSwitchFeatureSettingData { - + // // MAC Address set on switch to allow sends from. // @@ -29,4 +29,4 @@ class MSForwardExt_MacAddressRule : Msvm_EthernetSwitchFeatureSettingData { Description ( "Mac Address") : Amended] uint8 MacAddress[] = {}; -}; +}; diff --git a/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof b/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof index c9d509e83..c8e32760e 100644 --- a/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof +++ b/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof @@ -6,9 +6,9 @@ // #pragma namespace("\\\\.\\root\\virtualization\\v2") -[ Dynamic, +[ Dynamic, UUID("A3E2AFF5-E6FA-4E52-AB74-13250BF7E8CF"), - ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), + ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), Provider("VmmsWmiInstanceAndMethodProvider"), Applicability("2"), Locale(0x409), @@ -17,7 +17,7 @@ DisplayName("MSForwardExt MAC Address Policy Status") : Amended, Description("The current array of PortIds with policy set to allow sends") : Amended] class MSForwardExt_MacAddressRuleStatus : Msvm_EthernetSwitchData { - + // // Array of PortId's currently allowing sends. // @@ -28,4 +28,4 @@ class MSForwardExt_MacAddressRuleStatus : Msvm_EthernetSwitchData { Description ( "Currently Allowed Port Ids") : Amended] uint32 AllowedPortIds[] = {}; -}; +}; diff --git a/network/ndis/extension/samples/forward/MsForwardExt.c b/network/ndis/extension/samples/forward/MsForwardExt.c index cabd6401e..69583156d 100644 --- a/network/ndis/extension/samples/forward/MsForwardExt.c +++ b/network/ndis/extension/samples/forward/MsForwardExt.c @@ -50,15 +50,15 @@ const NDIS_SWITCH_OBJECT_ID MacAddressPolicyStatusGuid = { 0x4E52, {0xAB, 0x74, 0x13, 0x25, 0x0B, 0xF7, 0xE8, 0xCF} }; - - + + NDIS_STATUS SxExtInitialize() /*++ - + Routine Description: No global information needed. - + --*/ { return NDIS_STATUS_SUCCESS; @@ -68,10 +68,10 @@ Routine Description: VOID SxExtUninitialize() /*++ - + Routine Description: No global information needed. - + --*/ { return; @@ -85,41 +85,41 @@ SxExtCreateSwitch( PNDIS_HANDLE *ExtensionContext ) /*++ - + Routine Description: This function allocated the switch context, and initializes its necessary members. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMSFORWARD_CONTEXT switchContext; - + switchContext = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(MSFORWARD_CONTEXT), SxExtAllocationTag); - + if (switchContext == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + NdisZeroMemory(switchContext, sizeof(MSFORWARD_CONTEXT)); InitializeListHead(&switchContext->NicList); InitializeListHead(&switchContext->PropertyList); - + switchContext->DispatchLock = NdisAllocateRWLock(Switch->NdisFilterHandle); if (switchContext->DispatchLock == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + switchContext->IsInitialRestart = TRUE; - + *ExtensionContext = (NDIS_HANDLE)switchContext; - + Cleanup: if (status != NDIS_STATUS_SUCCESS) { @@ -140,17 +140,17 @@ SxExtDeleteSwitch( NDIS_HANDLE ExtensionContext ) /*++ - + Routine Description: This function deletes the switch by freeing all memory previously allocated. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; - + UNREFERENCED_PARAMETER(Switch); - + MsForwardClearNicListUnsafe(switchContext); MsForwardClearPropertyListUnsafe(switchContext); NdisFreeRWLock(switchContext->DispatchLock); @@ -167,7 +167,7 @@ SxExtActivateSwitch( { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; MsForwardInitSwitch(Switch, switchContext); - + return; } @@ -179,7 +179,7 @@ SxExtRestartSwitch( NDIS_HANDLE ExtensionContext ) /*++ - + Routine Description: This function initializes the switch if it is the first restart. First it queries all of the MAC addresses set as custom @@ -188,7 +188,7 @@ Routine Description: Then it queries the NIC list and verifies it can support all of the NICs currently connected to the switch, and adds the NICs to the NIC list. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -198,12 +198,12 @@ Routine Description: if (switchContext->IsInitialRestart) { status = SxLibGetSwitchParametersUnsafe(Switch, &switchParameters); - + if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + if (switchParameters.IsActive) { status = MsForwardInitSwitch(Switch, switchContext); @@ -212,11 +212,11 @@ Routine Description: goto Cleanup; } } - + switchContext->IsInitialRestart = FALSE; } - -Cleanup: + +Cleanup: return status; } @@ -228,15 +228,15 @@ SxExtPauseSwitch( NDIS_HANDLE ExtensionContext ) /*++ - + Routine Description: No pause funtionality required. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -249,16 +249,16 @@ SxExtCreatePort( PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track ports, only NICs. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return NDIS_STATUS_SUCCESS; } @@ -271,16 +271,16 @@ SxExtUpdatePort( PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track ports, only NICs. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } @@ -293,18 +293,18 @@ SxExtCreateNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Allocate NIC, add to NIC list, and correlate with policy. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; NDIS_STATUS status = NDIS_STATUS_SUCCESS; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -312,9 +312,9 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); - + status = MsForwardAddNicUnsafe(switchContext, Nic->PermanentMacAddress, Nic->PortId, @@ -322,9 +322,9 @@ Routine Description: Nic->NicType, FALSE); - + NdisReleaseRWLock(switchContext->DispatchLock, &lockState); - + return status; } @@ -337,18 +337,18 @@ SxExtConnectNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Mark already created NIC as connected. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; PMSFORWARD_NIC_LIST_ENTRY nicEntry = NULL; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -356,7 +356,7 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); if (Nic->NicType == NdisSwitchNicTypeExternal && Nic->NicIndex != 0 && @@ -372,7 +372,7 @@ Routine Description: nicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, Nic->PortId, Nic->NicIndex); - + if(nicEntry != NULL) { nicEntry->Connected = TRUE; @@ -395,21 +395,21 @@ SxExtUpdateNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: This extension doesn't use any of the fields that can be updated. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID SxExtDisconnectNic( PSX_SWITCH_OBJECT Switch, @@ -417,18 +417,18 @@ SxExtDisconnectNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Mark already created NIC as disconnected. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; PMSFORWARD_NIC_LIST_ENTRY nicEntry = NULL; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -436,12 +436,12 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); if (Nic->NicType == NdisSwitchNicTypeExternal) { if (Nic->NicIndex == switchContext->ExternalNicIndex) - { + { --(switchContext->NumDestinations); switchContext->ExternalNicConnected = FALSE; } @@ -451,7 +451,7 @@ Routine Description: nicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, Nic->PortId, Nic->NicIndex); - + if(nicEntry != NULL) { nicEntry->Connected = FALSE; @@ -466,7 +466,7 @@ Routine Description: NdisReleaseRWLock(switchContext->DispatchLock, &lockState); } - + _Use_decl_annotations_ VOID SxExtDeleteNic( @@ -475,18 +475,18 @@ SxExtDeleteNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Delete created NIC, free related memory and remove from NIC list. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -494,7 +494,7 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); if (Nic->NicType == NdisSwitchNicTypeExternal && Nic->NicIndex == switchContext->ExternalNicIndex) @@ -523,10 +523,10 @@ SxExtTeardownPort( PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track port state. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -537,16 +537,16 @@ Routine Description: _Use_decl_annotations_ VOID -SxExtDeletePort( +SxExtDeletePort( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track port state. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -555,9 +555,9 @@ Routine Description: } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS -SxExtSaveNic( +SxExtSaveNic( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -565,63 +565,63 @@ SxExtSaveNic( PULONG BytesNeeded ) /*++ - + Routine Description: This extension does not save any data. - + --*/ -{ +{ UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesWritten = 0; *BytesNeeded = 0; return NDIS_STATUS_SUCCESS; } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID -SxExtSaveNicComplete( +SxExtSaveNicComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState ) /*++ - + Routine Description: This extension does not save any data. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS -SxExtNicRestore( +SxExtNicRestore( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, PULONG BytesRestored ) /*++ - + Routine Description: This extension does not save any data. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesRestored = 0; return NDIS_STATUS_SUCCESS; } @@ -629,22 +629,22 @@ Routine Description: _Use_decl_annotations_ VOID -SxExtNicRestoreComplete( +SxExtNicRestoreComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState ) /*++ - + Routine Description: This extension does not save any data. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } @@ -657,12 +657,12 @@ SxExtAddSwitchProperty( PNDIS_SWITCH_PROPERTY_PARAMETERS SwitchProperty ) /*++ - + Routine Description: This extension enforces one custom switch policy. The function verifies the switch property is our MAC policy and then adds it to the property list. - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; @@ -670,14 +670,14 @@ Routine Description: PMSFORWARD_MAC_ADDRESS_POLICY macPolicy; PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + if (SwitchProperty->PropertyType != NdisSwitchPropertyTypeCustom) { goto Cleanup; } - + // // Check if MAC Address Policy for this extension. // @@ -687,17 +687,17 @@ Routine Description: { goto Cleanup; } - + if (SwitchProperty->PropertyVersion != MAC_ADDRESS_POLICY_VERSION) { goto Cleanup; } - + if (SwitchProperty->SerializationVersion != MAC_ADDRESS_POLICY_SERIALIZATION_VERSION) { goto Cleanup; } - + // // Wait for lists to be initialized. // @@ -705,31 +705,31 @@ Routine Description: { NdisMSleep(100); } - + customPolicy = NDIS_SWITCH_PROPERTY_PARAMETERS_GET_PROPERTY(SwitchProperty); macPolicy = NDIS_SWITCH_PROPERTY_CUSTOM_GET_BUFFER(customPolicy); - + if (macPolicy->MacAddressLength != 6) { status = NDIS_STATUS_DATA_NOT_ACCEPTED; - } + } else { NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); - + status = MsForwardAddMacPolicyUnsafe(switchContext, macPolicy, &SwitchProperty->PropertyInstanceId); - + NdisReleaseRWLock(switchContext->DispatchLock, &lockState); } - + Cleanup: return status; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS SxExtUpdateSwitchProperty( PSX_SWITCH_OBJECT Switch, @@ -737,15 +737,15 @@ SxExtUpdateSwitchProperty( PNDIS_SWITCH_PROPERTY_PARAMETERS SwitchProperty ) /*++ - + Routine Description: This extension enforces one custom switch policy, but does not allow updates for that policy. - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); @@ -753,7 +753,7 @@ Routine Description: { goto Cleanup; } - + // // Check if MAC Address Policy for this extension. // @@ -763,19 +763,19 @@ Routine Description: { goto Cleanup; } - + if (SwitchProperty->PropertyVersion != MAC_ADDRESS_POLICY_VERSION) { goto Cleanup; } - + if (SwitchProperty->SerializationVersion != MAC_ADDRESS_POLICY_SERIALIZATION_VERSION) { goto Cleanup; } status = NDIS_STATUS_DATA_NOT_ACCEPTED; - + Cleanup: return status; } @@ -789,25 +789,25 @@ SxExtDeleteSwitchProperty( PNDIS_SWITCH_PROPERTY_DELETE_PARAMETERS SwitchProperty ) /*++ - + Routine Description: This extension enforces one custom switch policy. The function verifies the switch property is our MAC policy and then deletes it from the property list. - + --*/ { BOOLEAN delete = FALSE; PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + if (SwitchProperty->PropertyType != NdisSwitchPropertyTypeCustom) { goto Cleanup; } - + // // Check if MAC Address Policy for this extension. // @@ -817,7 +817,7 @@ Routine Description: { goto Cleanup; } - + // // Wait for lists to be initialized. // @@ -825,23 +825,23 @@ Routine Description: { NdisMSleep(100); } - - + + delete = TRUE; NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); - + MsForwardDeleteMacPolicyUnsafe(switchContext, &SwitchProperty->PropertyInstanceId); - + NdisReleaseRWLock(switchContext->DispatchLock, &lockState); - + Cleanup: return delete; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS SxExtAddPortProperty( PSX_SWITCH_OBJECT Switch, @@ -849,20 +849,20 @@ SxExtAddPortProperty( PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS PortProperty ) /*++ - + Routine Description: This extension does not enforce VLAN. Because of this the extension fails the adding of these policies. - + !! REAL FORWARDING EXTENSIONS SHOULD SUPPORT THESE PROPERTIES !! - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + switch(PortProperty->PropertyType) { case NdisSwitchPortPropertyTypeCustom: @@ -870,14 +870,14 @@ Routine Description: // No Custom Port Properties. // break; - + case NdisSwitchPortPropertyTypeSecurity: // // This extension does need to look at security policy, pass it down. // An extension must always pass through Hyper-V security policy. // break; - + case NdisSwitchPortPropertyTypeVlan: // // Forwarding extensions must either enforce VLAN, or fail @@ -886,7 +886,7 @@ Routine Description: // status = NDIS_STATUS_DATA_NOT_ACCEPTED; break; - + case NdisSwitchPortPropertyTypeProfile: // // No Processing of Port Profile. @@ -897,7 +897,7 @@ Routine Description: return status; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS SxExtUpdatePortProperty( PSX_SWITCH_OBJECT Switch, @@ -905,20 +905,20 @@ SxExtUpdatePortProperty( PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS PortProperty ) /*++ - + Routine Description: This extension does not enforce VLAN. Because of this the extension fails the updating of these policies. - + !! REAL FORWARDING EXTENSIONS SHOULD SUPPORT THESE PROPERTIES !! - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + switch(PortProperty->PropertyType) { case NdisSwitchPortPropertyTypeCustom: @@ -926,14 +926,14 @@ Routine Description: // No Custom Port Properties. // break; - + case NdisSwitchPortPropertyTypeSecurity: // // This extension does need to look at security policy, pass it down. // An extension must always pass through Hyper-V security policy. // break; - + case NdisSwitchPortPropertyTypeVlan: // // Forwarding extensions must either enforce VLAN, or fail @@ -942,7 +942,7 @@ Routine Description: // status = NDIS_STATUS_DATA_NOT_ACCEPTED; break; - + case NdisSwitchPortPropertyTypeProfile: // // No Processing of Port Profile. @@ -961,21 +961,21 @@ SxExtDeletePortProperty( PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS PortProperty ) /*++ - + Routine Description: This extension does not enforce VLAN. These policies are policies that should be supported by this extension, so it returns TRUE to complete the deletion. - + !! REAL FORWARDING EXTENSIONS SHOULD SUPPORT THESE PROPERTIES !! - + --*/ { BOOLEAN delete = FALSE; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + switch(PortProperty->PropertyType) { case NdisSwitchPortPropertyTypeCustom: @@ -983,14 +983,14 @@ Routine Description: // No Custom Port Properties. // break; - + case NdisSwitchPortPropertyTypeSecurity: // // This extension does need to look at security policy, pass it down. // An extension must always pass through Hyper-V security policy. // break; - + case NdisSwitchPortPropertyTypeVlan: // // Forwarding extensions must either enforce VLAN, or fail @@ -999,7 +999,7 @@ Routine Description: // delete = TRUE; break; - + case NdisSwitchPortPropertyTypeProfile: // // No Processing of Port Profile. @@ -1020,11 +1020,11 @@ SxExtQuerySwitchFeatureStatus( PULONG BytesNeeded ) /*++ - + Routine Description: This extension reports the status of its custom MAC policy by returning the list of PortId's currently allowing sends. - + --*/ { BOOLEAN consumed = FALSE; @@ -1041,26 +1041,26 @@ Routine Description: PNDIS_SWITCH_PORT_ID portIdArray; ULONG arrayIndex = 0; ULONG customBufferLength = 0; - + UNREFERENCED_PARAMETER(Switch); - + if (SwitchFeatureStatus->FeatureStatusType != NdisSwitchFeatureStatusTypeCustom) { goto Cleanup; } - + if (!RtlEqualMemory(&SwitchFeatureStatus->FeatureStatusId, &MacAddressPolicyStatusGuid, sizeof(NDIS_SWITCH_OBJECT_ID))) { goto Cleanup; } - + if (SwitchFeatureStatus->SerializationVersion != MAC_ADDRESS_POLICY_STATUS_SERIALIZATION_VERSION) { goto Cleanup; } - + // // Wait for lists to be initialized. // @@ -1068,52 +1068,52 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockRead(switchContext->DispatchLock, &lockState, 0); lockHeld = TRUE; - + if (switchContext->ExternalPortId != NDIS_SWITCH_DEFAULT_PORT_ID) { ++numAllowedSourcePorts; } - + if (!IsListEmpty(nicList)) { curEntry = nicList->Flink; - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (nic->AllowSends) { ++numAllowedSourcePorts; } curEntry = curEntry->Flink; - + } while(curEntry != nicList); } - + customBufferLength = sizeof(MSFORWARD_MAC_ADDRESS_POLICY_STATUS) + (sizeof(NDIS_SWITCH_PORT_ID) * numAllowedSourcePorts); sizeNeeded = NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_PARAMETERS_REVISION_1 + NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1 + customBufferLength; - + consumed = TRUE; - + if (SwitchFeatureStatus->FeatureStatusBufferLength < sizeof(NDIS_SWITCH_FEATURE_STATUS_CUSTOM)) { *BytesNeeded = sizeNeeded; goto Cleanup; } - + customStatusBuffer = (PNDIS_SWITCH_FEATURE_STATUS_CUSTOM) (((PUINT8)SwitchFeatureStatus) + SwitchFeatureStatus->FeatureStatusBufferOffset); - + if (customStatusBuffer->Header.Type != NDIS_OBJECT_TYPE_DEFAULT || customStatusBuffer->Header.Revision != NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1 || customStatusBuffer->Header.Size != NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1) @@ -1121,42 +1121,42 @@ Routine Description: consumed = FALSE; goto Cleanup; } - - - + + + if (customStatusBuffer->FeatureStatusCustomBufferLength < customBufferLength) { *BytesNeeded = sizeNeeded; goto Cleanup; } - + macAddressPolicyBuffer = (PMSFORWARD_MAC_ADDRESS_POLICY_STATUS) (((PUINT8)customStatusBuffer) + customStatusBuffer->FeatureStatusCustomBufferOffset); - + macAddressPolicyBuffer->PortArrayLength = numAllowedSourcePorts; macAddressPolicyBuffer->PortArrayOffset = sizeof(MSFORWARD_MAC_ADDRESS_POLICY_STATUS); - + portIdArray = (PNDIS_SWITCH_PORT_ID) (((PUINT8)macAddressPolicyBuffer) + macAddressPolicyBuffer->PortArrayOffset); - - + + if (switchContext->ExternalPortId != NDIS_SWITCH_DEFAULT_PORT_ID) { portIdArray[arrayIndex] = switchContext->ExternalPortId; ++arrayIndex; } - + if (!IsListEmpty(nicList)) { curEntry = nicList->Flink; - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (nic->AllowSends) { portIdArray[arrayIndex] = nic->PortId; @@ -1164,7 +1164,7 @@ Routine Description: } curEntry = curEntry->Flink; - + } while(curEntry != nicList); } @@ -1178,7 +1178,7 @@ Routine Description: return consumed; } - + _Use_decl_annotations_ BOOLEAN @@ -1189,17 +1189,17 @@ SxExtQueryPortFeatureStatus( PULONG BytesNeeded ) /*++ - + Routine Description: This extension has no custom port properties. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortFeatureStatus); UNREFERENCED_PARAMETER(BytesNeeded); - + return FALSE; } @@ -1216,24 +1216,24 @@ SxExtProcessNicRequest( PNDIS_SWITCH_NIC_INDEX DestinationNicIndex ) /*++ - + Routine Description: - The only NIC request this extension cares about is + The only NIC request this extension cares about is OID_NIC_SWITCH_ALLOCATE_VF. We must fail all VF allocations so that traffic flows through the extension and we can enforce policy. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SourcePortId); UNREFERENCED_PARAMETER(SourceNicIndex); UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); - + // // Do not allow VF allocations, as all VM traffic must flow // through our extension. @@ -1243,7 +1243,7 @@ Routine Description: { status = NDIS_STATUS_FAILURE; } - + return status; } @@ -1261,11 +1261,11 @@ SxExtProcessNicRequestComplete( NDIS_STATUS Status ) /*++ - + Routine Description: This function will never be called because we do not redirect or edit any NIC requests. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -1276,13 +1276,13 @@ Routine Description: UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); UNREFERENCED_PARAMETER(Status); - + // // This function should never be called as we don't set any // source/destination info in SxExtProcessNicRequest. // ASSERT(FALSE); - + return Status; } @@ -1297,11 +1297,11 @@ SxExtProcessNicStatus( NDIS_SWITCH_NIC_INDEX SourceNicIndex ) /*++ - + Routine Description: This extension does not need to process any status indications. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -1309,7 +1309,7 @@ Routine Description: UNREFERENCED_PARAMETER(StatusIndication); UNREFERENCED_PARAMETER(SourcePortId); UNREFERENCED_PARAMETER(SourceNicIndex); - + return NDIS_STATUS_SUCCESS; } @@ -1323,7 +1323,7 @@ SxExtStartNetBufferListsIngress( ULONG SendFlags ) /*++ - + Routine Description: The function sets the destination lists of the NBLs forwarded through the switch. @@ -1331,13 +1331,13 @@ Routine Description: Internal NIC, or NICs with MAC Policy set. The extension determines the source by searching for the source MAC address in the NIC list. - + The extension sets destinations by looking at the destination MAC address. If the destination MAC address is a multicast or broadcast address, the extension broadcasts the NBL to all ports, except the source. If the destination MAC is a VM, the extension sets the VM as the destitation. Otherwise the extension sets the External port as the destination. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; @@ -1368,13 +1368,13 @@ Routine Description: PNET_BUFFER_LIST nativeForwardedNbls = NULL; PNET_BUFFER_LIST *nextExtForwardNbl = &extForwardedNbls; PNET_BUFFER_LIST *nextNativeForwardedNbl = &nativeForwardedNbls; - + dispatch = NDIS_TEST_SEND_FLAG(SendFlags, NDIS_SEND_FLAGS_DISPATCH_LEVEL); sameSource = NDIS_TEST_SEND_FLAG(SendFlags, NDIS_SEND_FLAGS_SWITCH_SINGLE_SOURCE); - + sendCompleteFlags |= (dispatch) ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0; SendFlags |= NDIS_SEND_FLAGS_SWITCH_DESTINATION_GROUP; - + // // Take DispatchLock so no NICs disconnect while we're setting destinations. // @@ -1384,9 +1384,9 @@ Routine Description: fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(NetBufferLists); sourcePort = fwdDetail->SourcePortId; sourceIndex = (NDIS_SWITCH_NIC_INDEX)fwdDetail->SourceNicIndex; - + sendCompleteFlags |= NDIS_SEND_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE; - + sourceNicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, sourcePort, sourceIndex); @@ -1398,11 +1398,11 @@ Routine Description: { ++numDropNbls; } - - *nextDropNbl = NetBufferLists; - + + *nextDropNbl = NetBufferLists; + RtlInitUnicodeString(&filterReason, L"Blocked by Source MAC Policy"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1412,10 +1412,10 @@ Routine Description: numDropNbls, dropNbl, &filterReason); - + goto Cleanup; } - + // // If nicEntry is not found, and is not external port, // we must have failed to allocate this port. @@ -1428,11 +1428,11 @@ Routine Description: { ++numDropNbls; } - + *nextDropNbl = NetBufferLists; - + RtlInitUnicodeString(&filterReason, L"Low Resources"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1442,11 +1442,11 @@ Routine Description: numDropNbls, dropNbl, &filterReason); - + goto Cleanup; - } + } } - + // // Split NBL list into NBLs to be forwarded by us, and those that require // native forwarding. @@ -1467,14 +1467,14 @@ Routine Description: nextExtForwardNbl = &(curNbl->Next); } } - + for (curNbl = extForwardedNbls; curNbl != NULL; curNbl = nextNbl) { nextNbl = curNbl->Next; curNbl->Next = NULL; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl); - + // // First check for allowed source if not same source. // @@ -1482,15 +1482,15 @@ Routine Description: { sourcePort = fwdDetail->SourcePortId; sourceIndex = (NDIS_SWITCH_NIC_INDEX)fwdDetail->SourceNicIndex; - + sourceNicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, sourcePort, sourceIndex); - + if (sourceNicEntry != NULL && !sourceNicEntry->AllowSends) { RtlInitUnicodeString(&filterReason, L"Blocked by Source MAC Policy"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1500,7 +1500,7 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; @@ -1509,7 +1509,7 @@ Routine Description: sourcePort != switchContext->ExternalPortId) { RtlInitUnicodeString(&filterReason, L"Low Resources"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1519,13 +1519,13 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; - } + } } - + // // Ethernet Header is a guaranteed safe access. // @@ -1535,7 +1535,7 @@ Routine Description: LowPagePriority | MdlMappingNoExecute); curHeader = (PMSFORWARD_ETHERNET_HEADER) (curBuffer + (NET_BUFFER_LIST_FIRST_NB(curNbl))->CurrentMdlOffset); - + // // Check for broadcast. (Broadcast if multicast) // @@ -1551,11 +1551,11 @@ Routine Description: sendNbl, SendFlags, 0); - + sendNbl = NULL; nextSendNbl = &sendNbl; } - + if (fwdDetail->NumAvailableDestinations < (switchContext->NumDestinations - 1)) { status = Switch->NdisSwitchHandlers.GrowNetBufferListDestinations( @@ -1563,7 +1563,7 @@ Routine Description: curNbl, (switchContext->NumDestinations - 1 - fwdDetail->NumAvailableDestinations), &broadcastArray); - + if (status != NDIS_STATUS_SUCCESS) { RtlInitUnicodeString(&filterReason, L"Failed to grow destination list."); @@ -1576,7 +1576,7 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; @@ -1589,7 +1589,7 @@ Routine Description: curNbl, &broadcastArray); } - + MsForwardMakeBroadcastArrayUnsafe(switchContext, broadcastArray, sourcePort, @@ -1607,26 +1607,26 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } - + status = Switch->NdisSwitchHandlers.UpdateNetBufferListDestinations( Switch->NdisSwitchContext, curNbl, (switchContext->NumDestinations - 1), broadcastArray); ASSERT(status == NDIS_STATUS_SUCCESS); - + *nextSendNbl = curNbl; nextSendNbl = &(curNbl->Next); broadcast = TRUE; - + continue; } - + if (RtlEqualMemory(prevMacAddress, curHeader->Destination, @@ -1641,7 +1641,7 @@ Routine Description: curHeader->Destination); // // Not a VM or host, send to external. - // + // if (destinationNicEntry == NULL) { // @@ -1659,12 +1659,12 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } - + if (sourcePort == switchContext->ExternalPortId) { RtlInitUnicodeString(&filterReason, L"Destination == Source"); @@ -1677,12 +1677,12 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } - + curDestinationPort = switchContext->ExternalPortId; curDestinationIndex = switchContext->ExternalNicIndex; } @@ -1703,27 +1703,27 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } } - + RtlMoveMemory(prevMacAddress, curHeader->Destination, sizeof(prevMacAddress)); newDestination.PortId = curDestinationPort; newDestination.NicIndex = curDestinationIndex; newDestination.PreserveVLAN = 0; - + ASSERT(fwdDetail->NumAvailableDestinations > 0); status = Switch->NdisSwitchHandlers.AddNetBufferListDestination( Switch->NdisSwitchContext, curNbl, &newDestination); ASSERT(status == NDIS_STATUS_SUCCESS); - - if(sendNbl != NULL && + + if(sendNbl != NULL && (broadcast || (prevDestinationPort != curDestinationPort || prevDestinationIndex != curDestinationIndex))) @@ -1732,14 +1732,14 @@ Routine Description: sendNbl, SendFlags, 0); - + sendNbl = NULL; nextSendNbl = &sendNbl; } - + *nextSendNbl = curNbl; nextSendNbl = &(curNbl->Next); - + // // Done processing this NBL. // @@ -1747,10 +1747,10 @@ Routine Description: prevDestinationIndex = curDestinationIndex; broadcast = FALSE; } - + Cleanup: NdisReleaseRWLock(switchContext->DispatchLock, &lockState); - + if (sendNbl != NULL) { SxLibSendNetBufferListsIngress(Switch, @@ -1758,7 +1758,7 @@ Routine Description: SendFlags, 0); } - + if (nativeForwardedNbls != NULL) { SxLibSendNetBufferListsIngress(Switch, @@ -1766,7 +1766,7 @@ Routine Description: SendFlags, 0); } - + if (dropNbl != NULL) { SxLibCompleteNetBufferListsIngress(Switch, @@ -1786,14 +1786,14 @@ SxExtStartNetBufferListsEgress( ULONG ReceiveFlags ) /*++ - + Routine Description: No egress processing necessary. - + --*/ { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibSendNetBufferListsEgress(Switch, NetBufferLists, NumberOfNetBufferLists, @@ -1810,14 +1810,14 @@ SxExtStartCompleteNetBufferListsEgress( ULONG ReturnFlags ) /*++ - + Routine Description: No egress processing necessary. - + --*/ { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsEgress(Switch, NetBufferLists, ReturnFlags); @@ -1833,14 +1833,14 @@ SxExtStartCompleteNetBufferListsIngress( ULONG SendCompleteFlags ) /*++ - + Routine Description: No ingress complete processing necessary. - + --*/ { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsIngress(Switch, NetBufferLists, SendCompleteFlags); @@ -1857,46 +1857,46 @@ MsForwardAddNicUnsafe( _In_ BOOLEAN Connected ) /*++ - + Routine Description: Add given NIC to the NIC list and correlate with MAC policy. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMSFORWARD_NIC_LIST_ENTRY nicEntry = NULL; PLIST_ENTRY nicList = &SwitchContext->NicList; - + if (NicType == NdisSwitchNicTypeExternal) { goto Cleanup; } - + nicEntry = MsForwardFindNicByPortIdUnsafe(SwitchContext, - PortId, + PortId, NicIndex); - + if (nicEntry == NULL) { nicEntry = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(MSFORWARD_NIC_LIST_ENTRY), SxExtAllocationTag); - + if (nicEntry == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + NdisZeroMemory(nicEntry, sizeof(MSFORWARD_NIC_LIST_ENTRY)); NdisMoveMemory(nicEntry->MacAddress, MacAddress, MSFORWARD_MAC_LENGTH); - + nicEntry->PortId = PortId; nicEntry->NicIndex = NicIndex; nicEntry->NicType = NicType; nicEntry->Connected = Connected; - + if (NicType == NdisSwitchNicTypeInternal) { nicEntry->AllowSends = TRUE; @@ -1905,10 +1905,10 @@ Routine Description: { nicEntry->AllowSends = MsForwardNicHasPolicy(SwitchContext, MacAddress); } - + InsertHeadList(nicList, &nicEntry->ListEntry); } - + Cleanup: return status; } @@ -1921,46 +1921,46 @@ MsForwardAddMacPolicyUnsafe( _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ) /*++ - + Routine Description: Add the given policy to the policy list and correlate with the NIC list. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMSFORWARD_MAC_POLICY_LIST_ENTRY newPolicy; PMSFORWARD_NIC_LIST_ENTRY nic; - + newPolicy = MsForwardFindPolicyByMacAddressUnsafe(SwitchContext, MacPolicyBuffer->MacAddress); - + if (newPolicy == NULL) { newPolicy = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(MSFORWARD_MAC_POLICY_LIST_ENTRY), SxExtAllocationTag); - + if (newPolicy == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + NdisMoveMemory(&newPolicy->MacAddress, MacPolicyBuffer->MacAddress, sizeof(newPolicy->MacAddress)); - + NdisMoveMemory(&newPolicy->PropertyInstanceId, PropertyInstanceId, sizeof(NDIS_SWITCH_OBJECT_INSTANCE_ID)); - + InsertHeadList(&SwitchContext->PropertyList, &newPolicy->ListEntry); - + nic = MsForwardFindNicByMacAddressUnsafe(SwitchContext, MacPolicyBuffer->MacAddress); - + if (nic != NULL) { nic->AllowSends = TRUE; @@ -1970,7 +1970,7 @@ Routine Description: { status = NDIS_STATUS_DATA_NOT_ACCEPTED; } - + Cleanup: return status; } @@ -1982,30 +1982,30 @@ MsForwardDeleteMacPolicyUnsafe( _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ) /*++ - + Routine Description: Delete the given MAC policy, and coorelate with the NIC list. - + --*/ { PMSFORWARD_MAC_POLICY_LIST_ENTRY deletePolicy; PMSFORWARD_NIC_LIST_ENTRY nic; - + deletePolicy = MsForwardFindPolicyByPropertyInstanceIdUnsafe( SwitchContext, PropertyInstanceId); - + if (deletePolicy != NULL) { nic = MsForwardFindNicByMacAddressUnsafe(SwitchContext, deletePolicy->MacAddress); - + if (nic != NULL) { nic->AllowSends = FALSE; } - + RemoveEntryList(&deletePolicy->ListEntry); ExFreePoolWithTag(deletePolicy, SxExtAllocationTag); } @@ -2019,38 +2019,38 @@ MsForwardFindNicByPortIdUnsafe( _In_ NDIS_SWITCH_NIC_INDEX NicIndex ) /*++ - + Routine Description: Search for the NIC needed by port ID. - + --*/ { PLIST_ENTRY nicList = &SwitchContext->NicList; PLIST_ENTRY curEntry = nicList->Flink; PMSFORWARD_NIC_LIST_ENTRY nic = NULL; - + if (IsListEmpty(nicList)) { goto Cleanup; } - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (nic->PortId == PortId && nic->NicIndex == NicIndex) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != nicList); - + nic = NULL; - + Cleanup: return nic; } @@ -2062,39 +2062,39 @@ MsForwardFindNicByMacAddressUnsafe( _In_reads_bytes_(6) PUCHAR MacAddress ) /*++ - + Routine Description: Search for the NIC needed by MAC Address. - + --*/ { PLIST_ENTRY nicList = &SwitchContext->NicList; PLIST_ENTRY curEntry = nicList->Flink; PMSFORWARD_NIC_LIST_ENTRY nic = NULL; - + if (IsListEmpty(nicList)) { goto Cleanup; } - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (RtlEqualMemory(MacAddress, nic->MacAddress, sizeof(nic->MacAddress))) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != nicList); - + nic = NULL; - + Cleanup: return nic; } @@ -2106,39 +2106,39 @@ MsForwardFindPolicyByMacAddressUnsafe( _In_reads_bytes_(6) PUCHAR MacAddress ) /*++ - + Routine Description: Search for the policy needed by MAC address. - + --*/ { PLIST_ENTRY propertyList = &SwitchContext->PropertyList; PLIST_ENTRY curEntry = propertyList->Flink; PMSFORWARD_MAC_POLICY_LIST_ENTRY policy = NULL; - + if (IsListEmpty(propertyList)) { goto Cleanup; } - + do { policy = CONTAINING_RECORD(curEntry, MSFORWARD_MAC_POLICY_LIST_ENTRY, ListEntry); - + if (RtlEqualMemory(MacAddress, policy->MacAddress, sizeof(policy->MacAddress))) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != propertyList); - + policy = NULL; - + Cleanup: return policy; } @@ -2150,44 +2150,44 @@ MsForwardFindPolicyByPropertyInstanceIdUnsafe( _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ) /*++ - + Routine Description: Search for the policy needed by PropertyInstanceId. - + --*/ { PLIST_ENTRY propertyList = &SwitchContext->PropertyList; PLIST_ENTRY curEntry = propertyList->Flink; PMSFORWARD_MAC_POLICY_LIST_ENTRY policy = NULL; - + if (IsListEmpty(propertyList)) { goto Cleanup; } - + do { policy = CONTAINING_RECORD(curEntry, MSFORWARD_MAC_POLICY_LIST_ENTRY, ListEntry); - + if (RtlEqualMemory(PropertyInstanceId, &policy->PropertyInstanceId, sizeof(policy->PropertyInstanceId))) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != propertyList); - + policy = NULL; - + Cleanup: return policy; } - + NDIS_STATUS MsForwardDeleteNicUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -2195,56 +2195,56 @@ MsForwardDeleteNicUnsafe( _In_ NDIS_SWITCH_NIC_INDEX NicIndex ) /*++ - + Routine Description: Remove the NIC represented by the PortId and NicIndex from the NIC list and free its memory. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - + PMSFORWARD_NIC_LIST_ENTRY nicEntry = MsForwardFindNicByPortIdUnsafe(SwitchContext, PortId, NicIndex); - + if (nicEntry == NULL) { ASSERT(FALSE); goto Cleanup; } - + RemoveEntryList(&nicEntry->ListEntry); ExFreePoolWithTag(nicEntry, SxExtAllocationTag); -Cleanup: +Cleanup: return status; } - - + + VOID MsForwardClearNicListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ) /*++ - + Routine Description: Remove all NICs from the list and free all memory. - + --*/ { PMSFORWARD_NIC_LIST_ENTRY nic; PLIST_ENTRY nicList = &SwitchContext->NicList; PLIST_ENTRY headList = NULL; - + while (!IsListEmpty(nicList)) { headList = RemoveHeadList(nicList); - + nic = CONTAINING_RECORD(headList, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + ExFreePoolWithTag(nic, SxExtAllocationTag); } @@ -2257,24 +2257,24 @@ MsForwardClearPropertyListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ) /*++ - + Routine Description: Remove all properties from the list and free all memory. - + --*/ { PMSFORWARD_MAC_POLICY_LIST_ENTRY policy; PLIST_ENTRY propertyList = &SwitchContext->PropertyList; PLIST_ENTRY headList = NULL; - + while (!IsListEmpty(propertyList)) { headList = RemoveHeadList(propertyList); - + policy = CONTAINING_RECORD(headList, MSFORWARD_MAC_POLICY_LIST_ENTRY, ListEntry); - + ExFreePoolWithTag(policy, SxExtAllocationTag); } @@ -2288,17 +2288,17 @@ MsForwardNicHasPolicy( _In_reads_bytes_(6) PUCHAR MacAddress ) /*++ - + Routine Description: Returns TRUE if there is a correlated policy to the MAC address given. - + --*/ { return (MsForwardFindPolicyByMacAddressUnsafe(SwitchContext, MacAddress) != NULL); } - + VOID MsForwardMakeBroadcastArrayUnsafe( @@ -2308,11 +2308,11 @@ MsForwardMakeBroadcastArrayUnsafe( _In_ NDIS_SWITCH_NIC_INDEX SourceNicIndex ) /*++ - + Routine Description: Creates the destination array of all connected NICs excluding the source given. - + --*/ { PLIST_ENTRY nicList = &SwitchContext->NicList; @@ -2320,17 +2320,17 @@ Routine Description: PMSFORWARD_NIC_LIST_ENTRY nic = NULL; UINT32 index = BroadcastArray->NumDestinations; PNDIS_SWITCH_PORT_DESTINATION destination; - + if (IsListEmpty(nicList)) { goto Cleanup; } - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if ((SourcePortId == nic->PortId && SourceNicIndex == nic->NicIndex) || !nic->Connected) @@ -2345,18 +2345,18 @@ Routine Description: continue; } } - + destination = NDIS_SWITCH_PORT_DESTINATION_AT_ARRAY_INDEX(BroadcastArray, index); NdisZeroMemory(destination, sizeof(NDIS_SWITCH_PORT_DESTINATION)); - + destination->PortId = nic->PortId; destination->NicIndex = nic->NicIndex; - + ++index; curEntry = curEntry->Flink; - + } while(curEntry != nicList); - + if (SourcePortId != SwitchContext->ExternalPortId && SwitchContext->ExternalNicConnected) { @@ -2364,7 +2364,7 @@ Routine Description: destination->PortId = SwitchContext->ExternalPortId; destination->NicIndex = SwitchContext->ExternalNicIndex; } - + Cleanup: return; } @@ -2376,10 +2376,10 @@ MsForwardInitSwitch( _In_ PMSFORWARD_CONTEXT SwitchContext ) /*++ - + Routine Description: Initializes the switch state. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -2393,7 +2393,7 @@ Routine Description: PNDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS portPropertyParameters = NULL; PNDIS_SWITCH_PORT_PROPERTY_ENUM_INFO portPropertyInfo = NULL; PNDIS_SWITCH_PORT_PROPERTY_VLAN vlanProperty; - + ASSERT(!SwitchContext->IsActive); // @@ -2403,25 +2403,25 @@ Routine Description: NdisSwitchPropertyTypeCustom, (PNDIS_SWITCH_OBJECT_ID)&MacAddressPolicyGuid, &switchPropertyParameters); - + if (status != NDIS_STATUS_SUCCESS) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + switchPropertyInfo = NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_GET_FIRST_INFO(switchPropertyParameters); - + for (arrIndex = 0; arrIndex < switchPropertyParameters->NumProperties; ++arrIndex) { // - // Should always get back v1 or later. It is safe to access the + // Should always get back v1 or later. It is safe to access the // v1 version of the structure if newer property is retrieved. // - ASSERT(switchPropertyInfo->PropertyVersion >= + ASSERT(switchPropertyInfo->PropertyVersion >= MAC_ADDRESS_POLICY_VERSION); customPropertyInfo = @@ -2433,35 +2433,35 @@ Routine Description: status = MsForwardAddMacPolicyUnsafe(SwitchContext, macAddressPolicy, &switchPropertyInfo->PropertyInstanceId); - + if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + switchPropertyInfo = NDIS_SWITCH_PROPERTY_ENUM_INFO_GET_NEXT(switchPropertyInfo); } // // Now, get NIC list. - // + // status = SxLibGetNicArrayUnsafe(Switch, &nicArray); if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + for (arrIndex = 0; arrIndex < nicArray->NumElements; ++arrIndex) { curNic = NDIS_SWITCH_NIC_AT_ARRAY_INDEX(nicArray, arrIndex); - + status = Switch->NdisSwitchHandlers.ReferenceSwitchPort( Switch->NdisSwitchContext, curNic->PortId); - + ASSERT(status == NDIS_STATUS_SUCCESS); - + // // Get VLAN Port property to ensure no VLAN set. // @@ -2470,26 +2470,26 @@ Routine Description: NdisSwitchPortPropertyTypeVlan, NULL, &portPropertyParameters); - + if (status != NDIS_STATUS_SUCCESS) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + portPropertyInfo = NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_GET_FIRST_INFO(portPropertyParameters); // - // Should always get back v1 or later. It is safe to access the v1 + // Should always get back v1 or later. It is safe to access the v1 // version of the structure if newer property is retrieved. // - ASSERT(portPropertyInfo->PropertyVersion >= + ASSERT(portPropertyInfo->PropertyVersion >= NDIS_SWITCH_PORT_PROPERTY_VLAN_REVISION_1); vlanProperty = NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO_GET_PROPERTY(portPropertyInfo); - + // // Real production code should support VLAN, // and not fail SxExtRestartSwitch. @@ -2500,13 +2500,13 @@ Routine Description: status = NDIS_STATUS_FAILURE; goto Cleanup; } - + status = Switch->NdisSwitchHandlers.DereferenceSwitchPort( Switch->NdisSwitchContext, curNic->PortId); - + ASSERT(status == NDIS_STATUS_SUCCESS); - + // // If a VF is assigned to a NIC, then the traffic // flows through the VF and not the switch. This means @@ -2518,36 +2518,36 @@ Routine Description: Switch->NdisSwitchContext, curNic->PortId, curNic->NicIndex); - + ASSERT(status == NDIS_STATUS_SUCCESS); - + SxLibRevokeVfUnsafe(Switch, curNic->PortId); - + status = Switch->NdisSwitchHandlers.DereferenceSwitchNic( Switch->NdisSwitchContext, curNic->PortId, curNic->NicIndex); - + ASSERT(status == NDIS_STATUS_SUCCESS); } - + // // Now we've verified we can support the NIC, so // check if there's a property for it, and add it to // the NIC list. - // + // status = MsForwardAddNicUnsafe(SwitchContext, curNic->PermanentMacAddress, curNic->PortId, curNic->NicIndex, curNic->NicType, (curNic->NicState == NdisSwitchNicStateConnected)); - + if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + if (curNic->NicType == NdisSwitchNicTypeExternal && curNic->NicIndex != 0 && SwitchContext->ExternalPortId == 0) @@ -2562,7 +2562,7 @@ Routine Description: ++(SwitchContext->NumDestinations); } } - + SwitchContext->IsActive = TRUE; Cleanup: @@ -2570,17 +2570,17 @@ Routine Description: { ExFreePoolWithTag(switchPropertyParameters, SxExtAllocationTag); } - + if (portPropertyParameters != NULL) { ExFreePoolWithTag(portPropertyParameters, SxExtAllocationTag); } - + if (nicArray != NULL) { ExFreePoolWithTag(nicArray, SxExtAllocationTag); } - + return status; } diff --git a/network/ndis/extension/samples/forward/MsForwardExt.h b/network/ndis/extension/samples/forward/MsForwardExt.h index ed6ac6297..5884fa7af 100644 --- a/network/ndis/extension/samples/forward/MsForwardExt.h +++ b/network/ndis/extension/samples/forward/MsForwardExt.h @@ -28,7 +28,7 @@ typedef struct _MSFORWARD_CONTEXT NDIS_SWITCH_PORT_ID ExternalPortId; NDIS_SWITCH_NIC_INDEX ExternalNicIndex; BOOLEAN ExternalNicConnected; - + // // This sample uses linked lists for the NICs and property // lookup. THIS IS NOT RECOMMENDED. @@ -36,7 +36,7 @@ typedef struct _MSFORWARD_CONTEXT LIST_ENTRY NicList; LIST_ENTRY PropertyList; PNDIS_RW_LOCK_EX DispatchLock; - + UINT32 NumDestinations; BOOLEAN IsInitialRestart; } MSFORWARD_CONTEXT, *PMSFORWARD_CONTEXT; @@ -119,7 +119,7 @@ extern const NDIS_SWITCH_OBJECT_ID MacAddressPolicyStatusGuid; // // Switch Property Macros -// +// #define MAC_ADDRESS_POLICY_VERSION 0x0100 #define MAC_ADDRESS_POLICY_SERIALIZATION_VERSION NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1 @@ -142,26 +142,26 @@ MsForwardAddNicUnsafe( _In_ NDIS_SWITCH_NIC_TYPE NicType, _In_ BOOLEAN Connected ); - + NDIS_STATUS MsForwardDeleteNicUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_ NDIS_SWITCH_PORT_ID PortId, _In_ NDIS_SWITCH_NIC_INDEX NicIndex ); - + VOID MsForwardClearNicListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ); - + PMSFORWARD_NIC_LIST_ENTRY MsForwardFindNicByPortIdUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_ NDIS_SWITCH_PORT_ID PortId, _In_ NDIS_SWITCH_NIC_INDEX NicIndex ); - + PMSFORWARD_NIC_LIST_ENTRY MsForwardFindNicByMacAddressUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -174,7 +174,7 @@ MsForwardAddMacPolicyUnsafe( _In_ PMSFORWARD_MAC_ADDRESS_POLICY MacPolicyBuffer, _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ); - + VOID MsForwardDeleteMacPolicyUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -185,25 +185,25 @@ VOID MsForwardClearPropertyListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ); - + PMSFORWARD_MAC_POLICY_LIST_ENTRY MsForwardFindPolicyByMacAddressUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_reads_bytes_(6) PUCHAR MacAddress ); - + PMSFORWARD_MAC_POLICY_LIST_ENTRY MsForwardFindPolicyByPropertyInstanceIdUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ); - + BOOLEAN MsForwardNicHasPolicy( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_reads_bytes_(6) PUCHAR MacAddress ); - + VOID MsForwardMakeBroadcastArrayUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -211,7 +211,7 @@ MsForwardMakeBroadcastArrayUnsafe( _In_ NDIS_SWITCH_PORT_ID SourcePortId, _In_ NDIS_SWITCH_NIC_INDEX SourceNicIndex ); - + NDIS_STATUS MsForwardInitSwitch( _In_ PSX_SWITCH_OBJECT Switch, diff --git a/network/ndis/extension/samples/forward/setRoute.ps1 b/network/ndis/extension/samples/forward/setRoute.ps1 index 71899087b..bfb21f8df 100644 --- a/network/ndis/extension/samples/forward/setRoute.ps1 +++ b/network/ndis/extension/samples/forward/setRoute.ps1 @@ -10,7 +10,7 @@ function StringToMacAddress([String]$MacString) $macArray = @(); $byteOne = 0; $byteTwo = 0; - + for($i = 0; $i -lt 6; $i++) { $byteChars = $MacString.ToCharArray(2*$i, 2); @@ -44,7 +44,7 @@ foreach($vm in $vmArr) { $vmName = $vm.Name $adapters = Get-VmNetworkAdapter -VmName $vmName - + foreach($adapter in $adapters) { Write-Host "Setting Policy for $vmName..." diff --git a/network/ndis/extension/samples/passthrough/MsPassthroughExt.c b/network/ndis/extension/samples/passthrough/MsPassthroughExt.c index e99eeac5b..1bf50f099 100644 --- a/network/ndis/extension/samples/passthrough/MsPassthroughExt.c +++ b/network/ndis/extension/samples/passthrough/MsPassthroughExt.c @@ -47,7 +47,7 @@ SxExtCreateSwitch( ) { UNREFERENCED_PARAMETER(Switch); - + *ExtensionContext = NULL; return NDIS_STATUS_SUCCESS; } @@ -62,7 +62,7 @@ SxExtDeleteSwitch( { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -76,7 +76,7 @@ SxExtActivateSwitch( { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -95,7 +95,7 @@ SxExtRestartSwitch( } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID SxExtPauseSwitch( PSX_SWITCH_OBJECT Switch, @@ -104,7 +104,7 @@ SxExtPauseSwitch( { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -120,7 +120,7 @@ SxExtCreatePort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return NDIS_STATUS_SUCCESS; } @@ -136,7 +136,7 @@ SxExtUpdatePort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } @@ -152,7 +152,7 @@ SxExtCreateNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return NDIS_STATUS_SUCCESS; } @@ -168,7 +168,7 @@ SxExtConnectNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -184,7 +184,7 @@ SxExtUpdateNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -200,7 +200,7 @@ SxExtDisconnectNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -216,7 +216,7 @@ SxExtDeleteNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -232,14 +232,14 @@ SxExtTeardownPort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } _Use_decl_annotations_ VOID -SxExtDeletePort( +SxExtDeletePort( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_PORT_PARAMETERS Port @@ -248,14 +248,14 @@ SxExtDeletePort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } _Use_decl_annotations_ NDIS_STATUS -SxExtSaveNic( +SxExtSaveNic( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -266,7 +266,7 @@ SxExtSaveNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesWritten = 0; *BytesNeeded = 0; return NDIS_STATUS_SUCCESS; @@ -275,7 +275,7 @@ SxExtSaveNic( _Use_decl_annotations_ VOID -SxExtSaveNicComplete( +SxExtSaveNicComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState @@ -284,14 +284,14 @@ SxExtSaveNicComplete( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS -SxExtNicRestore( +SxExtNicRestore( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -301,7 +301,7 @@ SxExtNicRestore( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesRestored = 0; return NDIS_STATUS_SUCCESS; } @@ -309,7 +309,7 @@ SxExtNicRestore( _Use_decl_annotations_ VOID -SxExtNicRestoreComplete( +SxExtNicRestoreComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState @@ -318,7 +318,7 @@ SxExtNicRestoreComplete( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } @@ -334,7 +334,7 @@ SxExtAddSwitchProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -350,7 +350,7 @@ SxExtUpdateSwitchProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -366,7 +366,7 @@ SxExtDeleteSwitchProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchProperty); - + return FALSE; } @@ -382,7 +382,7 @@ SxExtAddPortProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -398,7 +398,7 @@ SxExtUpdatePortProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -414,7 +414,7 @@ SxExtDeletePortProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortProperty); - + return FALSE; } @@ -432,7 +432,7 @@ SxExtQuerySwitchFeatureStatus( UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchFeatureStatus); UNREFERENCED_PARAMETER(BytesNeeded); - + return FALSE; } @@ -450,10 +450,10 @@ SxExtQueryPortFeatureStatus( UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortFeatureStatus); UNREFERENCED_PARAMETER(BytesNeeded); - + return FALSE; } - + _Use_decl_annotations_ NDIS_STATUS @@ -474,7 +474,7 @@ SxExtProcessNicRequest( UNREFERENCED_PARAMETER(SourceNicIndex); UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); - + return NDIS_STATUS_SUCCESS; } @@ -500,10 +500,10 @@ SxExtProcessNicRequestComplete( UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); UNREFERENCED_PARAMETER(Status); - + return NDIS_STATUS_SUCCESS; } - + _Use_decl_annotations_ NDIS_STATUS @@ -520,7 +520,7 @@ SxExtProcessNicStatus( UNREFERENCED_PARAMETER(StatusIndication); UNREFERENCED_PARAMETER(SourcePortId); UNREFERENCED_PARAMETER(SourceNicIndex); - + return NDIS_STATUS_SUCCESS; } @@ -535,7 +535,7 @@ SxExtStartNetBufferListsIngress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibSendNetBufferListsIngress(Switch, NetBufferLists, SendFlags, @@ -543,7 +543,7 @@ SxExtStartNetBufferListsIngress( } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID SxExtStartNetBufferListsEgress( PSX_SWITCH_OBJECT Switch, @@ -554,7 +554,7 @@ SxExtStartNetBufferListsEgress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibSendNetBufferListsEgress(Switch, NetBufferLists, NumberOfNetBufferLists, @@ -572,7 +572,7 @@ SxExtStartCompleteNetBufferListsEgress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsEgress(Switch, NetBufferLists, ReturnFlags); @@ -589,9 +589,9 @@ SxExtStartCompleteNetBufferListsIngress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsIngress(Switch, NetBufferLists, SendCompleteFlags); } - + diff --git a/network/ndis/filter/filter.c b/network/ndis/filter/filter.c index 7145b8878..2ccda62aa 100644 --- a/network/ndis/filter/filter.c +++ b/network/ndis/filter/filter.c @@ -108,7 +108,7 @@ Return Value: // // TODO: Most handlers are optional, however, this sample includes them - // all for illustrative purposes. If you do not need a particular + // all for illustrative purposes. If you do not need a particular // handler, set it to NULL and NDIS will more efficiently pass the // operation through on your behalf. // @@ -250,7 +250,7 @@ Return Value: NDIS_STATUS_FAILURE: FilterAttach could not set up this instance of this filter and it has called NdisWriteErrorLogEntry with parameters specifying the reason for failure. -N.B.: FILTER can use NdisRegisterDeviceEx to create a device, so the upper +N.B.: FILTER can use NdisRegisterDeviceEx to create a device, so the upper layer can send Irps to the filter. --*/ @@ -275,7 +275,7 @@ N.B.: FILTER can use NdisRegisterDeviceEx to create a device, so the upper // Verify the media type is supported. This is a last resort; the // the filter should never have been bound to an unsupported miniport // to begin with. If this driver is marked as a Mandatory filter (which - // is the default for this sample; see the INF file), failing to attach + // is the default for this sample; see the INF file), failing to attach // here will leave the network adapter in an unusable state. // // Your setup/install code should not bind the filter to unsupported @@ -401,10 +401,10 @@ Return Value: NDIS_STATUS_SUCCESS if filter pauses successfully, NDIS_STATUS_PENDING if not. No other return value is allowed (pause must succeed, eventually). -N.B.: When the filter is in Pausing state, it can still process OID requests, +N.B.: When the filter is in Pausing state, it can still process OID requests, complete sending, and returning packets to NDIS, and also indicate status. - After this function completes, the filter must not attempt to send or - receive packets, but it may still process OID requests and status + After this function completes, the filter must not attempt to send or + receive packets, but it may still process OID requests and status indications. --*/ @@ -429,7 +429,7 @@ N.B.: When the filter is in Pausing state, it can still process OID requests, // // Do whatever work is required to bring the filter into the Paused state. // - // If you have diverted and queued any send or receive NBLs, return them + // If you have diverted and queued any send or receive NBLs, return them // now. // // If you send or receive original NBLs, stop doing that and wait for your @@ -498,7 +498,7 @@ Return Value: #if 0 // - // The code is here just to demonstrate how to call NDIS to write an + // The code is here just to demonstrate how to call NDIS to write an // event to the eventlog. // PWCHAR ErrorString = L"Ndislwf"; @@ -518,7 +518,7 @@ Return Value: // // This sample doesn't actually do anything with the configuration handle; // it is opened here for illustrative purposes. If you do not need to - // read configuration, you may omit the code manipulating the + // read configuration, you may omit the code manipulating the // ConfigurationHandle. // @@ -530,9 +530,9 @@ Return Value: NdisRestartAttributes = RestartParameters->RestartAttributes; // - // If NdisRestartAttributes is not NULL, then the filter can modify generic - // attributes and add new media specific info attributes at the end. - // Otherwise, if NdisRestartAttributes is NULL, the filter should not try to + // If NdisRestartAttributes is not NULL, then the filter can modify generic + // attributes and add new media specific info attributes at the end. + // Otherwise, if NdisRestartAttributes is NULL, the filter should not try to // modify/add attributes. // if (NdisRestartAttributes != NULL) @@ -777,7 +777,7 @@ NOTE: Called at <= DISPATCH_LEVEL (unlike a miniport's MiniportOidRequest) // // If your filter driver does not need to modify any OID requests, then // you may simply omit this routine entirely; NDIS will pass OID requests - // down on your behalf. This is more efficient than implementing a + // down on your behalf. This is more efficient than implementing a // routine that does nothing but clone all requests, as in the sample here. // @@ -864,8 +864,8 @@ Routine Description: If your filter driver does not intercept and hold onto any OID requests, then you do not need to implement this routine. You may simply omit it. Furthermore, if the filter only holds onto OID requests so it can pass - down a clone (the most common case) the filter does not need to implement - this routine; NDIS will then automatically request that the lower-level + down a clone (the most common case) the filter does not need to implement + this routine; NDIS will then automatically request that the lower-level filter/miniport cancel your cloned OID. Most filters do not need to implement this routine. @@ -1021,7 +1021,7 @@ Routine Description: NOTE: called at <= DISPATCH_LEVEL - FILTER driver may call NdisFIndicateStatus to generate a status indication to + FILTER driver may call NdisFIndicateStatus to generate a status indication to all higher layer modules. --*/ @@ -1037,8 +1037,8 @@ NOTE: called at <= DISPATCH_LEVEL // // The filter may do processing on the status indication here, including // intercepting and dropping it entirely. However, the sample does nothing - // with status indications except pass them up to the higher layer. It is - // more efficient to omit the FilterStatus handler entirely if it does + // with status indications except pass them up to the higher layer. It is + // more efficient to omit the FilterStatus handler entirely if it does // nothing, but it is included in this sample for illustrative purposes. // @@ -1154,7 +1154,7 @@ NOTE: called at PASSIVE_LEVEL NDIS_STATUS Status = NDIS_STATUS_SUCCESS; // - // The filter may do processing on the event here, including intercepting + // The filter may do processing on the event here, including intercepting // and dropping it entirely. However, the sample does nothing with Net PNP // events, except pass them up to the next higher layer. It is more // efficient to omit the FilterNetPnPEvent handler entirely if it does @@ -1179,10 +1179,10 @@ Routine Description: Send complete handler - This routine is invoked whenever the lower layer is finished processing + This routine is invoked whenever the lower layer is finished processing sent NET_BUFFER_LISTs. If the filter does not need to be involved in the send path, you should remove this routine and the FilterSendNetBufferLists - routine. NDIS will pass along send packets on behalf of your filter more + routine. NDIS will pass along send packets on behalf of your filter more efficiently than the filter can. Arguments: @@ -1260,7 +1260,7 @@ Routine Description: This function is an optional function for filter drivers. If provided, NDIS will call this function to transmit a linked list of NetBuffers, described by a NetBufferList, over the network. If this handler is NULL, NDIS will skip calling - this filter when sending a NetBufferList and will call the next lower + this filter when sending a NetBufferList and will call the next lower driver in the stack. A filter that doesn't provide a FilerSendNetBufferList handler can not originate a send on its own. @@ -1324,7 +1324,7 @@ Routine Description: } FILTER_RELEASE_LOCK(&pFilter->Lock, DispatchLevel); } - + // // If necessary, queue the NetBufferLists in a local structure for later // processing. However, do not queue them for "too long", or else the @@ -1332,7 +1332,7 @@ Routine Description: // NBL for an unbounded amount of time, then allocate memory, perform a // deep copy, and complete the original NBL. // - + NdisFSendNetBufferLists(pFilter->FilterHandle, NetBufferLists, PortNumber, SendFlags); @@ -1365,8 +1365,8 @@ Routine Description: Arguments: FilterInstanceContext - our filter context area - NetBufferLists - a linked list of NetBufferLists that this - filter driver indicated in a previous call to + NetBufferLists - a linked list of NetBufferLists that this + filter driver indicated in a previous call to NdisFIndicateReceiveNetBufferLists ReturnFlags - flags specifying if the caller is at DISPATCH_LEVEL @@ -1383,7 +1383,7 @@ Routine Description: // // If your filter injected any receive packets into the datapath to be - // received, you must identify their NBLs here and remove them from the + // received, you must identify their NBLs here and remove them from the // chain. Do not attempt to receive-return your NBLs down to the lower // layer. // @@ -1405,7 +1405,7 @@ Routine Description: } } - + // Return the received NBLs. If you removed any NBLs from the chain, make // sure the chain isn't empty (i.e., NetBufferLists!=NULL). @@ -1449,7 +1449,7 @@ Routine Description: filter when processing a receive indication and will call the next higher driver in the stack. A filter that doesn't provide a FilterReceiveNetBufferLists handler cannot provide a - FilterReturnNetBufferLists handler and cannot a initiate an original receive + FilterReturnNetBufferLists handler and cannot a initiate an original receive indication on its own. Arguments: @@ -1460,7 +1460,7 @@ Routine Description: ReceiveFlags - N.B.: It is important to check the ReceiveFlags in NDIS_TEST_RECEIVE_CANNOT_PEND. - This controls whether the receive indication is an synchronous or + This controls whether the receive indication is an synchronous or asynchronous function call. --*/ @@ -1509,7 +1509,7 @@ N.B.: It is important to check the ReceiveFlags in NDIS_TEST_RECEIVE_CANNOT_PEND // // if NDIS_TEST_RECEIVE_CANNOT_PEND(ReceiveFlags): // For each NBL that is NOT dropped, temporarily unlink it from - // the linked list, and indicate it up alone with + // the linked list, and indicate it up alone with // NdisFIndicateReceiveNetBufferLists and the // NDIS_RECEIVE_FLAGS_RESOURCES flag set. Then immediately // relink the NBL back into the chain. When all NBLs have been @@ -1520,8 +1520,8 @@ N.B.: It is important to check the ReceiveFlags in NDIS_TEST_RECEIVE_CANNOT_PEND // Return the first chain with NdisFReturnNetBufferLists, and // indicate up the rest with NdisFIndicateReceiveNetBufferLists. // - // Note: on the receive path for Ethernet packets, one NBL will have - // exactly one NB. So (assuming you are receiving on Ethernet, or are + // Note: on the receive path for Ethernet packets, one NBL will have + // exactly one NB. So (assuming you are receiving on Ethernet, or are // attached above Native WiFi) you do not need to worry about dropping // one NB, but trying to indicate up the remaining NBs on the same NBL. // In other words, if the first NB should be dropped, drop the whole NBL. @@ -1589,7 +1589,7 @@ Routine Description: This function cancels any NET_BUFFER_LISTs pended in the filter and then calls the NdisFCancelSendNetBufferLists to propagate the cancel operation. - If your driver does not queue any send NBLs, you may omit this routine. + If your driver does not queue any send NBLs, you may omit this routine. NDIS will propagate the cancelation on your behalf more efficiently. Arguments: diff --git a/network/ndis/mux/driver/60/miniport.c b/network/ndis/mux/driver/60/miniport.c index f30c4b624..627218c7b 100644 --- a/network/ndis/mux/driver/60/miniport.c +++ b/network/ndis/mux/driver/60/miniport.c @@ -79,7 +79,7 @@ NDIS_OID VElanSupportedOids[] = OID_PNP_REMOVE_WAKE_UP_PATTERN, #if IEEE_VLAN_SUPPORT OID_GEN_VLAN_ID, -#endif +#endif OID_PNP_ENABLE_WAKE_UP }; @@ -121,8 +121,8 @@ Return Value: NET_IFINDEX HigherLayerIfIndex, LowerLayerIfIndex; NDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributesContent; const PNDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributes = &MiniportAttributesContent; - - + + #if IEEE_VLAN_SUPPORT NDIS_STRING strVlanId = NDIS_STRING_CONST("VlanID"); @@ -136,9 +136,9 @@ Return Value: UNREFERENCED_PARAMETER(MiniportDriverContext); - + // - // Start off by retrieving our virtual miniport context (VELAN) and + // Start off by retrieving our virtual miniport context (VELAN) and // storing the Miniport handle in it. // @@ -179,20 +179,20 @@ Return Value: MiniportAttributesContent.RegistrationAttributes.CheckForHangTimeInSeconds = 0; MiniportAttributesContent.RegistrationAttributes.InterfaceType = 0; - - + + NDIS_DECLARE_MINIPORT_ADAPTER_CONTEXT(VELAN); Status = NdisMSetMiniportAttributes(MiniportAdapterHandle, MiniportAttributes); - + if (Status != NDIS_STATUS_SUCCESS) { break; } - + // // Access configuration parameters for this miniport. @@ -220,14 +220,14 @@ Return Value: ConfigurationHandle); // - // If there is a NetworkAddress override, use it + // If there is a NetworkAddress override, use it // - if (((Status == NDIS_STATUS_SUCCESS) + if (((Status == NDIS_STATUS_SUCCESS) && (i == ETH_LENGTH_OF_ADDRESS)) - && ((!ETH_IS_MULTICAST(NetworkAddress)) + && ((!ETH_IS_MULTICAST(NetworkAddress)) && (ETH_IS_LOCALLY_ADMINISTERED (NetworkAddress)))) { - + ETH_COPY_NETWORK_ADDRESS( pVElan->CurrentAddress, NetworkAddress); @@ -241,7 +241,7 @@ Return Value: // ignore error reading the network address // Status = NDIS_STATUS_SUCCESS; - + #if IEEE_VLAN_SUPPORT // // Read VLAN ID @@ -269,11 +269,11 @@ Return Value: else { - + pVElan->VlanId = VLANID_DEFAULT; Status = NDIS_STATUS_SUCCESS; } -#endif +#endif NdisCloseConfiguration(ConfigurationHandle); @@ -286,7 +286,7 @@ Return Value: MiniportAttributesContent.GeneralAttributes.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES; MiniportAttributesContent.GeneralAttributes.Header.Revision = NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_1; - MiniportAttributesContent.GeneralAttributes.Header.Size = sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES); + MiniportAttributesContent.GeneralAttributes.Header.Size = sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES); MiniportAttributesContent.GeneralAttributes.MediaType = VELAN_MEDIA_TYPE; MiniportAttributesContent.GeneralAttributes.MtuSize = pVElan->pAdapt->BindParameters.MtuSize; @@ -294,10 +294,10 @@ Return Value: MiniportAttributesContent.GeneralAttributes.MaxRcvLinkSpeed = pVElan->pAdapt->BindParameters.MaxRcvLinkSpeed; MiniportAttributesContent.GeneralAttributes.XmitLinkSpeed = pVElan->pAdapt->BindParameters.XmitLinkSpeed; MiniportAttributesContent.GeneralAttributes.RcvLinkSpeed = pVElan->pAdapt->BindParameters.RcvLinkSpeed; - + MUX_ACQUIRE_ADAPT_READ_LOCK(pVElan->pAdapt, &LockState); - + // // Miniport below has indicated some status indication // @@ -305,21 +305,21 @@ Return Value: MiniportAttributesContent.GeneralAttributes.MediaDuplexState = pVElan->pAdapt->LastIndicatedLinkState.MediaDuplexState; MiniportAttributesContent.GeneralAttributes.XmitLinkSpeed = pVElan->pAdapt->LastIndicatedLinkState.XmitLinkSpeed; MiniportAttributesContent.GeneralAttributes.RcvLinkSpeed = pVElan->pAdapt->LastIndicatedLinkState.RcvLinkSpeed; - + pVElan->LastIndicatedStatus = NDIS_STATUS_LINK_STATE; pVElan->LastIndicatedLinkState = pVElan->pAdapt->LastIndicatedLinkState; - + MiniportAttributesContent.GeneralAttributes.LookaheadSize = pVElan->pAdapt->BindParameters.LookaheadSize; MiniportAttributesContent.GeneralAttributes.MaxMulticastListSize = pVElan->pAdapt->BindParameters.MaxMulticastListSize; MiniportAttributesContent.GeneralAttributes.MacAddressLength = pVElan->pAdapt->BindParameters.MacAddressLength; - + MiniportAttributesContent.GeneralAttributes.PhysicalMediumType = pVElan->pAdapt->BindParameters.PhysicalMediumType ; - MiniportAttributesContent.GeneralAttributes.AccessType = pVElan->pAdapt->BindParameters.AccessType ; - MiniportAttributesContent.GeneralAttributes.DirectionType = pVElan->pAdapt->BindParameters.DirectionType; - MiniportAttributesContent.GeneralAttributes.ConnectionType = pVElan->pAdapt->BindParameters.ConnectionType ; - MiniportAttributesContent.GeneralAttributes.IfType = pVElan->pAdapt->BindParameters.IfType ; + MiniportAttributesContent.GeneralAttributes.AccessType = pVElan->pAdapt->BindParameters.AccessType ; + MiniportAttributesContent.GeneralAttributes.DirectionType = pVElan->pAdapt->BindParameters.DirectionType; + MiniportAttributesContent.GeneralAttributes.ConnectionType = pVElan->pAdapt->BindParameters.ConnectionType ; + MiniportAttributesContent.GeneralAttributes.IfType = pVElan->pAdapt->BindParameters.IfType ; MiniportAttributesContent.GeneralAttributes.IfConnectorPresent = FALSE; // RFC 2665 TRUE if physical adapter if (pVElan->pAdapt->BindParameters.RcvScaleCapabilities) @@ -330,7 +330,7 @@ Return Value: { MiniportAttributesContent.GeneralAttributes.RecvScaleCapabilities = NULL; } - + MiniportAttributesContent.GeneralAttributes.MacOptions = NDIS_MAC_OPTION_NO_LOOPBACK; @@ -339,7 +339,7 @@ Return Value: NDIS_MAC_OPTION_8021Q_VLAN); #endif - + MiniportAttributesContent.GeneralAttributes.SupportedPacketFilters = pVElan->pAdapt->BindParameters.SupportedPacketFilters; MiniportAttributesContent.GeneralAttributes.SupportedStatistics = NDIS_STATISTICS_XMIT_OK_SUPPORTED | @@ -351,7 +351,7 @@ Return Value: NDIS_STATISTICS_TRANSMIT_QUEUE_LENGTH_SUPPORTED | NDIS_STATISTICS_GEN_STATISTICS_SUPPORTED; - + NdisMoveMemory(&MiniportAttributesContent.GeneralAttributes.CurrentMacAddress, &pVElan->CurrentAddress, ETH_LENGTH_OF_ADDRESS); @@ -369,7 +369,7 @@ Return Value: pVElan->MiniportInitPending = FALSE; } while (FALSE); - + // // If we had received an UnbindAdapter notification on the underlying // adapter, we would have blocked that thread waiting for the IM Init @@ -391,13 +391,13 @@ Return Value: // HigherLayerIfIndex = MiniportInitParameters->IfIndex; LowerLayerIfIndex = pVElan->pAdapt->BindParameters.BoundIfIndex; - + Status = NdisIfAddIfStackEntry(HigherLayerIfIndex, LowerLayerIfIndex); if (Status == NDIS_STATUS_SUCCESS) { - pVElan->IfIndex = HigherLayerIfIndex; + pVElan->IfIndex = HigherLayerIfIndex; } // @@ -407,7 +407,7 @@ Return Value: } else - { + { pVElan->MiniportAdapterHandle = NULL; } @@ -415,9 +415,9 @@ Return Value: { pVElan->MiniportInitPending = FALSE; } - + // TODO: check to see if we can set the init event in a failure case? - + NdisSetEvent(&pVElan->MiniportInitEvent); DBGPRINT(MUX_LOUD, ("<== MPInitialize: VELAN %p, Status %x\n", pVElan, Status)); @@ -445,7 +445,7 @@ Routine Description: Return Value: - NDIS_STATUS_SUCCESS + NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED Return code from the MPForwardOidRequest below. @@ -472,14 +472,14 @@ Return Value: DBGPRINT(MUX_LOUD, ("==> MPQueryInformation: VElan %p, Request %p\n",pVElan, NdisRequest)); - + Oid = NdisRequest->DATA.QUERY_INFORMATION.Oid; InformationBuffer = NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer; InformationBufferLength = NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength; BytesWritten = (ULONG*) &(NdisRequest->DATA.QUERY_INFORMATION.BytesWritten); BytesNeeded = (ULONG*) &(NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded); - - + + // Initialize the result *BytesWritten = 0; *BytesNeeded = 0; @@ -512,16 +512,16 @@ Return Value: break; case OID_GEN_CURRENT_LOOKAHEAD: - case OID_GEN_MAXIMUM_LOOKAHEAD: + case OID_GEN_MAXIMUM_LOOKAHEAD: ulInfo = pVElan->LookAhead; pInfo = (PVOID) &ulInfo; - break; - + break; + case OID_GEN_MAXIMUM_FRAME_SIZE: ulInfo = ETH_MAX_PACKET_SIZE - ETH_HEADER_SIZE; #if IEEE_VLAN_SUPPORT ulInfo -= VLAN_TAG_HEADER_SIZE; - + #endif pInfo = (PVOID) &ulInfo; break; @@ -532,17 +532,17 @@ Return Value: ulInfo = (ULONG) ETH_MAX_PACKET_SIZE; #if IEEE_VLAN_SUPPORT ulInfo -= VLAN_TAG_HEADER_SIZE; -#endif +#endif pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_MAC_OPTIONS: - ulInfo = NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | + ulInfo = NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | NDIS_MAC_OPTION_TRANSFERS_NOT_PEND | NDIS_MAC_OPTION_NO_LOOPBACK; #if IEEE_VLAN_SUPPORT ulInfo |= (NDIS_MAC_OPTION_8021P_PRIORITY | - NDIS_MAC_OPTION_8021Q_VLAN); + NDIS_MAC_OPTION_8021Q_VLAN); #endif pInfo = (PVOID) &ulInfo; break; @@ -555,15 +555,15 @@ Return Value: ulInfo = ETH_MAX_PACKET_SIZE * pVElan->MaxBusySends; #if IEEE_VLAN_SUPPORT ulInfo -= VLAN_TAG_HEADER_SIZE * pVElan->MaxBusySends; -#endif +#endif pInfo = (PVOID) &ulInfo; break; case OID_GEN_RECEIVE_BUFFER_SPACE: ulInfo = ETH_MAX_PACKET_SIZE * pVElan->MaxBusyRecvs; #if IEEE_VLAN_SUPPORT - ulInfo -= VLAN_TAG_HEADER_SIZE * pVElan->MaxBusyRecvs; -#endif + ulInfo -= VLAN_TAG_HEADER_SIZE * pVElan->MaxBusyRecvs; +#endif pInfo = (PVOID) &ulInfo; break; @@ -576,7 +576,7 @@ Return Value: pInfo = VendorDesc; ulInfoLen = sizeof(VendorDesc); break; - + case OID_GEN_VENDOR_DRIVER_VERSION: ulInfo = VELAN_VENDOR_ID; pInfo = (PVOID) &ulInfo; @@ -644,7 +644,7 @@ Return Value: NeededLength = sizeof(ulInfo64); break; - + case OID_GEN_RCV_OK: ulInfo64 = pVElan->GoodReceives; pInfo = &ulInfo64; @@ -659,9 +659,9 @@ Return Value: } NeededLength = sizeof(ulInfo64); - + break; - + case OID_GEN_XMIT_ERROR: ulInfo = pVElan->TxAbortExcessCollisions + pVElan->TxDmaUnderrun + @@ -670,7 +670,7 @@ Return Value: pVElan->TransmitFailuresOther; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_RCV_ERROR: ulInfo = pVElan->RcvCrcErrors + pVElan->RcvAlignmentErrors + @@ -679,26 +679,26 @@ Return Value: #if IEEE_VLAN_SUPPORT ulInfo += (pVElan->RcvVlanIdErrors + - pVElan->RcvFormatErrors); + pVElan->RcvFormatErrors); #endif pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_RCV_NO_BUFFER: ulInfo = pVElan->RcvResourceErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_RCV_CRC_ERROR: ulInfo = pVElan->RcvCrcErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_TRANSMIT_QUEUE_LENGTH: ulInfo = pVElan->RegNumTcb; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_STATISTICS: ulInfoLen = sizeof (NDIS_STATISTICS_INFO); NdisZeroMemory(&StatisticsInfo, sizeof(NDIS_STATISTICS_INFO)); @@ -709,7 +709,7 @@ Return Value: StatisticsInfo.SupportedStatistics = NDIS_STATISTICS_FLAGS_VALID_RCV_DISCARDS | NDIS_STATISTICS_FLAGS_VALID_RCV_ERROR | NDIS_STATISTICS_FLAGS_VALID_XMIT_ERROR; - + StatisticsInfo.ifInDiscards = (ULONG64)pVElan->RcvCrcErrors + (ULONG64)pVElan->RcvAlignmentErrors + @@ -735,53 +735,53 @@ Return Value: ulInfo = pVElan->RcvAlignmentErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_ONE_COLLISION: ulInfo = pVElan->OneRetry; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_MORE_COLLISIONS: ulInfo = pVElan->MoreThanOneRetry; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_DEFERRED: ulInfo = pVElan->TxOKButDeferred; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_MAX_COLLISIONS: ulInfo = pVElan->TxAbortExcessCollisions; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_RCV_OVERRUN: ulInfo = pVElan->RcvDmaOverrunErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_UNDERRUN: ulInfo = pVElan->TxDmaUnderrun; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_HEARTBEAT_FAILURE: ulInfo = pVElan->TxLostCRS; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_TIMES_CRS_LOST: ulInfo = pVElan->TxLostCRS; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_LATE_COLLISIONS: ulInfo = pVElan->TxLateCollisions; pInfo = (PVOID) &ulInfo; break; - -#if IEEE_VLAN_SUPPORT + +#if IEEE_VLAN_SUPPORT case OID_GEN_VLAN_ID: ulInfo = pVElan->VlanId; pInfo = (PVOID) &ulInfo; @@ -808,27 +808,27 @@ Return Value: if(ulInfoLen) { NdisMoveMemory(InformationBuffer, pInfo, ulInfoLen); - + if (NeededLength > ulInfoLen) { *BytesNeeded = NeededLength; } } - + } else { // too short *BytesNeeded = (NeededLength > ulInfoLen ? NeededLength : ulInfoLen); - + Status = NDIS_STATUS_BUFFER_TOO_SHORT; } } } else { - + // // Send this request to the binding below. @@ -843,10 +843,10 @@ Return Value: pVElan, Oid, Status)); } - + DBGPRINT(MUX_LOUD, ("<== MPQueryInformation: VElan %p, Request %p returning %08lx\n",pVElan, NdisRequest, Status)); - + return(Status); } @@ -887,13 +887,13 @@ Return Value: ULONG InformationBufferLength; PULONG BytesRead; PULONG BytesNeeded; - + // Should we forward the request to the miniport below? BOOLEAN bForwardRequest = FALSE; NDIS_STATUS_INDICATION StatusIndication; DBGPRINT(MUX_LOUD, ("==> MPSetInformation: VElan %p, Request %p\n", pVElan, NdisRequest)); - + NdisZeroMemory(&StatusIndication, sizeof(NDIS_STATUS_INDICATION)); Oid = NdisRequest->DATA.SET_INFORMATION.Oid; InformationBuffer = NdisRequest->DATA.SET_INFORMATION.InformationBuffer; @@ -925,48 +925,48 @@ Return Value: Status = NDIS_STATUS_INVALID_LENGTH; break; } - + NewDeviceState = (*(PNDIS_DEVICE_POWER_STATE)InformationBuffer); - + // // Check if the VELAN adapter goes from lower power state to D0 - // - if ((MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) + // + if ((MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) && (!MUX_IS_LOW_POWER_STATE(NewDeviceState))) { // // Indicate the media status is necessary - // + // if (pVElan->LastIndicatedStatus != pVElan->LatestUnIndicateStatus) { - + StatusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; StatusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; StatusIndication.Header.Size = sizeof(NDIS_STATUS_INDICATION); - + StatusIndication.SourceHandle = pVElan->MiniportAdapterHandle; StatusIndication.StatusCode = pVElan->LatestUnIndicateStatus; if (pVElan->LatestUnIndicateStatus == NDIS_STATUS_LINK_STATE) { StatusIndication.StatusBuffer = &pVElan->LatestUnIndicateLinkState; StatusIndication.StatusBufferSize = sizeof(NDIS_LINK_STATE); - + } else { StatusIndication.StatusBuffer = NULL; StatusIndication.StatusBufferSize = 0; } - + NdisMIndicateStatusEx(pVElan->MiniportAdapterHandle, &StatusIndication); - + pVElan->LastIndicatedStatus = pVElan->LatestUnIndicateStatus; if (pVElan->LatestUnIndicateStatus == NDIS_STATUS_LINK_STATE) { pVElan->LastIndicatedLinkState = pVElan->LatestUnIndicateLinkState; } - + } else { @@ -976,33 +976,33 @@ Return Value: &pVElan->LastIndicatedLinkState, sizeof(NDIS_LINK_STATE))) { - + StatusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; StatusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; StatusIndication.Header.Size = sizeof(NDIS_STATUS_INDICATION); - + StatusIndication.SourceHandle = pVElan->MiniportAdapterHandle; StatusIndication.StatusCode = pVElan->LatestUnIndicateStatus; StatusIndication.StatusBuffer = &pVElan->LatestUnIndicateLinkState; StatusIndication.StatusBufferSize = sizeof(NDIS_LINK_STATE); - + NdisMIndicateStatusEx(pVElan->MiniportAdapterHandle, &StatusIndication); pVElan->LastIndicatedStatus = pVElan->LatestUnIndicateStatus; pVElan->LastIndicatedLinkState = pVElan->LatestUnIndicateLinkState; } } - } + } } // // Check if the VELAN adapter goes from D0 to lower power state - // - if ((!MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) + // + if ((!MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) && (MUX_IS_LOW_POWER_STATE(NewDeviceState))) { // - // Initialize LastUnIndicateStatus - // + // Initialize LastUnIndicateStatus + // pVElan->LatestUnIndicateStatus = pVElan->LastIndicatedStatus; if (pVElan->LastIndicatedStatus == NDIS_STATUS_LINK_STATE) @@ -1010,7 +1010,7 @@ Return Value: pVElan->LatestUnIndicateLinkState = pVElan->LastIndicatedLinkState; } } - + NdisMoveMemory(&pVElan->MPDevicePowerState, InformationBuffer, *BytesNeeded); @@ -1062,17 +1062,17 @@ Return Value: pVElan->RestoreLookaheadSize = TRUE; *(UNALIGNED PULONG)InformationBuffer += VLAN_TAG_HEADER_SIZE; } -#endif +#endif bForwardRequest = TRUE; break; - + #if IEEE_VLAN_SUPPORT case OID_GEN_VLAN_ID: if (InformationBufferLength == sizeof(ULONG)) { NdisMoveMemory((&pVElan->VlanId), InformationBuffer, sizeof(ULONG)); - } + } else { *BytesNeeded = sizeof(ULONG); @@ -1081,13 +1081,13 @@ Return Value: break; #endif - + default: Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + if (bForwardRequest == FALSE) { if (Status == NDIS_STATUS_SUCCESS) @@ -1104,7 +1104,7 @@ Return Value: } DBGPRINT(MUX_LOUD, ("<== MPSetInformation: VElan %p, Request %p returning %08lx\n",pVElan, NdisRequest, Status)); - + return(Status); } @@ -1127,7 +1127,7 @@ Return Value: NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED - + --*/ { @@ -1140,7 +1140,7 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; UNREFERENCED_PARAMETER(pVElan); - + DBGPRINT(MUX_LOUD, ("==> MPMethodRequest: VElan %p, Request %p\n", pVElan, NdisRequest)); @@ -1250,7 +1250,7 @@ Routine Description: Arguments: MiniportAdapterContext Pointer to the pVElan - HaltAction The reason adapter is being halted + HaltAction The reason adapter is being halted Return Value: @@ -1262,7 +1262,7 @@ Return Value: NET_IFINDEX LowerLayerIfIndex; UNREFERENCED_PARAMETER(HaltAction); - + DBGPRINT(MUX_LOUD, ("==> MPHalt: VELAN %p\n", pVElan)); @@ -1316,12 +1316,12 @@ Return Value: if (pVElan->IfIndex != 0) { LowerLayerIfIndex = pVElan->pAdapt->BindParameters.BoundIfIndex; - + NdisIfDeleteIfStackEntry(pVElan->IfIndex, LowerLayerIfIndex); pVElan->IfIndex = 0; } - + // // Unlink the VELAN from its parent ADAPT structure. This will @@ -1329,7 +1329,7 @@ Return Value: // pVElan->MiniportAdapterHandle = NULL; PtUnlinkVElanFromAdapter(pVElan); - + DBGPRINT(MUX_LOUD, ("<== MPHalt: pVElan %p\n", pVElan)); } @@ -1350,7 +1350,7 @@ Routine Description: Arguments: pVElan Pointer to a VElan Adapter - Request Pointer to an NDIS request to be forwarded to the below adapter. + Request Pointer to an NDIS request to be forwarded to the below adapter. Return Value: @@ -1363,7 +1363,7 @@ Return Value: PMUX_NDIS_REQUEST pMuxNdisRequest = &pVElan->Request; PADAPT pAdapt = pVElan->pAdapt; - + DBGPRINT(MUX_LOUD, ("==> MPForwardOidRequest: VELAN %p, Request %p\n", pVElan, Request)); @@ -1373,7 +1373,7 @@ Return Value: // // If the miniport below is going away, fail the request - // + // NdisAcquireSpinLock(&pVElan->Lock); if (pVElan->DeInitializing == TRUE) { @@ -1382,7 +1382,7 @@ Return Value: Status = NDIS_STATUS_FAILURE; break; } - NdisReleaseSpinLock(&pVElan->Lock); + NdisReleaseSpinLock(&pVElan->Lock); // // If the virtual miniport edge is at a low power @@ -1394,14 +1394,14 @@ Return Value: Status = NDIS_STATUS_ADAPTER_NOT_READY; break; } - + NdisAcquireSpinLock(&pVElan->Lock); pMuxNdisRequest->Cancelled = FALSE; pMuxNdisRequest->OrigRequest = Request; pMuxNdisRequest->pCallback = PtCompleteForwardedRequest; pMuxNdisRequest->Request.RequestType = Request->RequestType; pMuxNdisRequest->Refcount = 1; - NdisReleaseSpinLock(&pVElan->Lock); + NdisReleaseSpinLock(&pVElan->Lock); pMuxNdisRequest->Request.Header.Type = NDIS_OBJECT_TYPE_OID_REQUEST; pMuxNdisRequest->Request.Header.Revision = NDIS_OID_REQUEST_REVISION_1; @@ -1412,17 +1412,17 @@ Return Value: case NdisRequestQueryInformation: case NdisRequestQueryStatistics: pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.Oid = Request->DATA.QUERY_INFORMATION.Oid; - pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer = + pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer = Request->DATA.QUERY_INFORMATION.InformationBuffer; - pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = + pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = Request->DATA.QUERY_INFORMATION.InformationBufferLength; break; case NdisRequestSetInformation: pMuxNdisRequest->Request.DATA.SET_INFORMATION.Oid = Request->DATA.SET_INFORMATION.Oid; - pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBuffer = + pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBuffer = Request->DATA.SET_INFORMATION.InformationBuffer; - pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBufferLength = + pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBufferLength = Request->DATA.SET_INFORMATION.InformationBufferLength; break; @@ -1444,7 +1444,7 @@ Return Value: Status = NDIS_STATUS_FAILURE; break; } - + // If the lower binding has been notified of a low // power state, queue this request; it will be picked // up again when the lower binding returns to D0. @@ -1454,7 +1454,7 @@ Return Value: DBGPRINT(MUX_INFO, ("ForwardRequest: VELAN %p, Adapt %p power" " state is %d, queueing OID %x\n", pVElan, pVElan->pAdapt, - pVElan->pAdapt->PtDevicePowerState, + pVElan->pAdapt->PtDevicePowerState, Request->DATA.QUERY_INFORMATION.Oid)); pVElan->QueuedRequest = TRUE; @@ -1471,19 +1471,19 @@ Return Value: break; } NdisReleaseSpinLock(&pVElan->Lock); - + NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { - NdisReleaseSpinLock(&pAdapt->Lock); - Status = NDIS_STATUS_CLOSING; + NdisReleaseSpinLock(&pAdapt->Lock); + Status = NDIS_STATUS_CLOSING; } else { - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest(pVElan->BindingHandle, &pMuxNdisRequest->Request); } @@ -1508,7 +1508,7 @@ Return Value: *(UNALIGNED PULONG)(Request->DATA.SET_INFORMATION.InformationBuffer) -= VLAN_TAG_HEADER_SIZE; } #endif - + return (Status); } @@ -1520,8 +1520,8 @@ MPSetPacketFilter( /*++ Routine Description: - This routine will set up the VELAN so that it accepts packets - that match the specified packet filter. The only filter bits + This routine will set up the VELAN so that it accepts packets + that match the specified packet filter. The only filter bits that can truly be toggled are for broadcast and promiscuous. The MUX driver always sets the lower binding to promiscuous @@ -1529,7 +1529,7 @@ Routine Description: receives too soon. That is, we set the packet filter on the lower binding to a non-zero value iff at least one of the VELANs has a non-zero filter value. - + NOTE: setting the lower binding to promiscuous mode can impact CPU utilization. The only reason we set the lower binding to promiscuous mode in this sample is that we need to be able @@ -1538,18 +1538,18 @@ Routine Description: are set to be equal to that of the adapter below, it is sufficient to set the lower packet filter to the bitwise OR'ed value of packet filter settings on all VELANs. - + Arguments: pVElan - pointer to VELAN - PacketFilter - the new packet filter - + PacketFilter - the new packet filter + Return Value: NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED - + --*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1561,7 +1561,7 @@ Return Value: LOCK_STATE LockState; DBGPRINT(MUX_LOUD, ("==> MPSetPacketFilter VELAN %p, Filter %x\n", pVElan, PacketFilter)); - + do { // @@ -1572,7 +1572,7 @@ Return Value: Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + AdapterFilter = 0; pAdapt = pVElan->pAdapt; @@ -1622,7 +1622,7 @@ Return Value: bSendUpdate = TRUE; pAdapt->PacketFilter = MUX_ADAPTER_PACKET_FILTER; } - + MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); if (bSendUpdate) @@ -1640,7 +1640,7 @@ Return Value: while (FALSE); DBGPRINT(MUX_LOUD, ("<== MPSetPacketFilter VELAN %p, Status %x\n", pVElan, Status)); - + return(Status); } @@ -1718,19 +1718,19 @@ Return Value: NdisZeroMemory(pVElan->McastAddrs, VELAN_MAX_MCAST_LIST * sizeof(MUX_MAC_ADDRESS)); - + NdisMoveMemory(&pVElan->McastAddrs[0], InformationBuffer, InformationBufferLength); - + pVElan->McastAddrCount = InformationBufferLength / sizeof(MUX_MAC_ADDRESS); - + MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); } while (FALSE); DBGPRINT(MUX_LOUD, ("<== MPSetMulticastList VELAN %p, Status %8x\n", pVElan, Status)); - + return (Status); } @@ -1746,7 +1746,7 @@ Routine Description: Careful! Uses static storage for string. Used to simplify DbgPrints of MAC addresses. - + Arguments: IN Pointer to MAC address array @@ -1755,23 +1755,23 @@ Return Value: A string format of the given mac address ---*/ +--*/ { static UCHAR String[20]; static PCHAR HexChars = "0123456789abcdef"; PUCHAR EthAddr = (PUCHAR) In; UINT i; PUCHAR s; - + for (i = 0, s = String; i < 6; i++, EthAddr++) { -#pragma prefast(suppress: __WARNING_POTENTIAL_BUFFER_OVERFLOW, "s is bounded by check above"); +#pragma prefast(suppress: __WARNING_POTENTIAL_BUFFER_OVERFLOW, "s is bounded by check above"); *s++ = HexChars[(*EthAddr) >> 4]; *s++ = HexChars[(*EthAddr) & 0xf]; } *s = '\0'; - - return String; + + return String; } @@ -1788,7 +1788,7 @@ Routine Description: a MAC address for the VELAN. Other implementations are possible, including using the MAC address of the underlying adapter as the MAC address of the VELAN. - + Arguments: pVElan - Pointer to velan structure @@ -1802,7 +1802,7 @@ Return Value: ETH_COPY_NETWORK_ADDRESS( pVElan->CurrentAddress, pVElan->PermanentAddress); - + DBGPRINT(MUX_LOUD, ("%d CurrentAddress %s\n", pVElan->VElanNumber, MacAddrToString(&pVElan->CurrentAddress))); DBGPRINT(MUX_LOUD, ("%d PermanentAddress %s\n", @@ -1838,15 +1838,15 @@ Return Value: { // TBD - add code/comments about processing this. // - + DBGPRINT(MUX_LOUD, ("==> MPDevicePnPEvent: AdapterContext %08lp, DevicePnPEvent %x\n",MiniportAdapterContext, NetDevicePnPEvent->DevicePnPEvent)); UNREFERENCED_PARAMETER(MiniportAdapterContext); UNREFERENCED_PARAMETER(NetDevicePnPEvent); - + DBGPRINT(MUX_LOUD, ("<== MPDevicePnPEvent: AdapterContext %08lp, DevicePnPEvent %x\n",MiniportAdapterContext, NetDevicePnPEvent->DevicePnPEvent)); - + return; } @@ -1882,7 +1882,7 @@ Return Value: UNREFERENCED_PARAMETER(ShutdownAction); DBGPRINT(MUX_LOUD,("<== MPAdapterShutdown: VElan %p, ShutdwonAction %x\n", pVElan, ShutdownAction)); - + return; } @@ -1897,7 +1897,7 @@ Routine Description: This handler is used to unload the miniport Arguments: - DriverObject Pointer to the system's driver object structure + DriverObject Pointer to the system's driver object structure for this driver. Return Value: @@ -1906,11 +1906,11 @@ Return Value: --*/ { - + #if !DBG UNREFERENCED_PARAMETER(DriverObject); #endif - + DBGPRINT(MUX_LOUD, ("==> MPUnload: DriverObj %p\n", DriverObject)); if (ProtHandle != NULL) { @@ -1919,8 +1919,8 @@ Return Value: NdisMDeregisterMiniportDriver(DriverHandle); NdisFreeSpinLock(&GlobalLock); - - DBGPRINT(MUX_LOUD, ("<== MPUnload: DriverObj %p\n", DriverObject)); + + DBGPRINT(MUX_LOUD, ("<== MPUnload: DriverObj %p\n", DriverObject)); } NDIS_STATUS @@ -1947,7 +1947,7 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; DBGPRINT(MUX_LOUD, ("==> MPPause: VElan %p\n", pVElan)); - + UNREFERENCED_PARAMETER(MiniportPauseParameters); DBGPRINT(MUX_LOUD,("==>MPPause Adapter %08lp\n",MiniportAdapterContext)); @@ -1960,7 +1960,7 @@ Return Value: NdisReleaseSpinLock(&pVElan->PauseLock); - + DBGPRINT(MUX_LOUD,("<== MPPause,VElan %p, Status %8x\n", pVElan, Status)); @@ -1993,41 +1993,41 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PNDIS_RESTART_ATTRIBUTES NdisRestartAttributes; PNDIS_RESTART_GENERAL_ATTRIBUTES NdisGeneralAttributes; - + UNREFERENCED_PARAMETER(MiniportRestartParameters); DBGPRINT(MUX_LOUD,("==> MPRestart Adapter %p\n",MiniportAdapterContext)); - + // - // Here the driver can change its restart attributes + // Here the driver can change its restart attributes // NdisRestartAttributes = MiniportRestartParameters->RestartAttributes; // // If NdisRestartAttributes is not NULL, then miniport can modify generic attributes and add - // new media specific info attributes at the end. Otherwise, NDIS restarts the miniport because + // new media specific info attributes at the end. Otherwise, NDIS restarts the miniport because // of other reason, miniport should not try to modify/add attributes // if (NdisRestartAttributes != NULL) { ASSERT(NdisRestartAttributes->Oid == OID_GEN_MINIPORT_RESTART_ATTRIBUTES); - + NdisGeneralAttributes = (PNDIS_RESTART_GENERAL_ATTRIBUTES)NdisRestartAttributes->Data; UNREFERENCED_PARAMETER(NdisGeneralAttributes); - + // // Check to see if we need to change any attributes, for example, the driver can change the current // MAC address here. Or the driver can add media specific info attributes. // } - + NdisAcquireSpinLock(&pVElan->PauseLock); pVElan->Paused = FALSE; NdisReleaseSpinLock(&pVElan->PauseLock); - + DBGPRINT(MUX_LOUD,("<== MPRestart: Adapter %p, Status %8x\n", MiniportAdapterContext, Status)); @@ -2066,7 +2066,7 @@ Return Value: PIM_NBL_ENTRY SendContext; ULONG SendCompleteFlags = 0; BOOLEAN DispatchLevel = FALSE; - + DBGPRINT(MUX_VERY_LOUD,("==> MPSendNetBufferLists: MiniportAdapterContext %p, NetBufferLists %p\n",MiniportAdapterContext,NetBufferLists)); DispatchLevel = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendFlags); @@ -2078,19 +2078,19 @@ Return Value: NET_BUFFER_LIST_NEXT_NBL(CurrentNetBufferList) = NULL; MUX_ACQUIRE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + if (pAdapt->BindingState != MuxAdapterBindingRunning) { Status = NDIS_STATUS_REQUEST_ABORTED; MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + break; } - + pAdapt->OutstandingSends ++; - + MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + do { Status = NdisAllocateNetBufferListContext(CurrentNetBufferList, @@ -2102,7 +2102,7 @@ Return Value: { break; } - + SendContext = (PIM_NBL_ENTRY)NET_BUFFER_LIST_CONTEXT_DATA_START(CurrentNetBufferList); NdisZeroMemory(SendContext, sizeof(IM_NBL_ENTRY)); SendContext->PreviousSourceHandle = CurrentNetBufferList->SourceHandle; @@ -2136,20 +2136,20 @@ Return Value: CurrentNetBufferList, PortNumber, SendFlags); - + } while(FALSE); if (Status != NDIS_STATUS_SUCCESS) { MUX_ACQUIRE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); pAdapt->OutstandingSends --; - + if ((pAdapt->OutstandingSends == 0) && (pAdapt->PauseEvent != NULL)) { NdisSetEvent(pAdapt->PauseEvent); pAdapt->PauseEvent = NULL; } - + MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); // // Handle failure case @@ -2192,7 +2192,7 @@ Return Value: DBGPRINT(MUX_VERY_LOUD,("<== MPSendNetBufferLists, MiniportAdapterContext %p, NetBufferLists %p\n",MiniportAdapterContext,NetBufferLists)); } -VOID +VOID MPReturnNetBufferLists( IN NDIS_HANDLE MiniportAdapterContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -2218,10 +2218,10 @@ Return Value: PVELAN pVElan = (PVELAN)MiniportAdapterContext; PNET_BUFFER_LIST CurrentNetBufferList = NULL; ULONG NumberOfNetBufferLists = 0; -#ifdef IEEE_VLAN_SUPPORT +#ifdef IEEE_VLAN_SUPPORT NDIS_STATUS Status; #endif - + DBGPRINT(MUX_VERY_LOUD,("==> MPReturnNetBufferLists: MiniportAdapterContext %p, NetBufferList %p\n",MiniportAdapterContext,NetBufferLists)); CurrentNetBufferList = NetBufferLists; @@ -2242,12 +2242,12 @@ Return Value: // Free the context that was allocated in PtReceiveNBL // NdisFreeNetBufferListContext(CurrentNetBufferList, - sizeof(RECV_NBL_ENTRY)); -#endif + sizeof(RECV_NBL_ENTRY)); +#endif CurrentNetBufferList = NET_BUFFER_LIST_NEXT_NBL(CurrentNetBufferList); } - + NdisReturnNetBufferLists(pVElan->BindingHandle, NetBufferLists, ReturnFlags); @@ -2256,9 +2256,9 @@ Return Value: DBGPRINT(MUX_VERY_LOUD,("<== MPReturnNetBufferLists: MiniportAdapterContext %p, NetBufferList %p\n",MiniportAdapterContext,NetBufferLists)); } - -VOID + +VOID MPCancelSendNetBufferLists( IN NDIS_HANDLE MiniportAdapterContext, IN PVOID CancelId @@ -2289,13 +2289,13 @@ Return Value: PVELAN pVElan = (PVELAN)MiniportAdapterContext; DBGPRINT(MUX_LOUD,("==> MPCancelSendNetBufferLists: VElan %p, CancelId %p\n", pVElan, CancelId)); - + NdisCancelSendNetBufferLists(pVElan->pAdapt->BindingHandle,CancelId); - + DBGPRINT(MUX_LOUD,("<== MPCancelSendNetBufferLists: VElan %p, CancelId %p\n", pVElan, CancelId)); } -VOID +VOID MPCancelOidRequest( IN NDIS_HANDLE MiniportAdapterContext, IN PVOID RequestId @@ -2304,9 +2304,9 @@ MPCancelOidRequest( Routine Description: - The miniport entry point to hanadle cancellation of a request. This function + The miniport entry point to hanadle cancellation of a request. This function checks to see if the CancelRequest should be terminated at this level - or passed down to the next driver. + or passed down to the next driver. Arguments: @@ -2321,9 +2321,9 @@ Return Value: PVELAN pVElan = (PVELAN)MiniportAdapterContext; PMUX_NDIS_REQUEST pMuxNdisRequest = &pVElan->Request; BOOLEAN fCancelRequest = FALSE; - + DBGPRINT(MUX_LOUD, ("==> MPCancelOidRequest: VELAN %p, RequestId %p\n", pVElan, RequestId)); - + NdisAcquireSpinLock(&pVElan->Lock); if (pMuxNdisRequest->OrigRequest != NULL) { @@ -2335,22 +2335,22 @@ Return Value: } } - - NdisReleaseSpinLock(&pVElan->Lock); + + NdisReleaseSpinLock(&pVElan->Lock); // - // If we find the request, just send down the cancel, otherwise return because there is only + // If we find the request, just send down the cancel, otherwise return because there is only // one request pending from upper layer on the miniport // if (fCancelRequest) { NdisCancelOidRequest(pVElan->pAdapt->BindingHandle, &pMuxNdisRequest->Request); - PtCompleteForwardedRequest(pVElan->pAdapt, - pMuxNdisRequest, + PtCompleteForwardedRequest(pVElan->pAdapt, + pMuxNdisRequest, NDIS_STATUS_REQUEST_ABORTED); } - + DBGPRINT(MUX_LOUD, ("<== MPCancelOidRequest: VELAN %p, RequestId %p\n", pVElan, RequestId)); } @@ -2365,13 +2365,13 @@ MuxAllocateMdl( /*++ Routine Description: - This function is called by NDIS in order to allocate an MDL and memory when - there isn't unused data space in the net buffer when NdisRetreatNetBufferDataStart + This function is called by NDIS in order to allocate an MDL and memory when + there isn't unused data space in the net buffer when NdisRetreatNetBufferDataStart is called Arguments: BufferSize Pointer to allocation size being requested - + Return Value: NOTE: This function always returns NULL. This is so that MUX can allocate memory and MDL @@ -2384,7 +2384,7 @@ NOTE: This function always returns NULL. This is so that MUX can allocate memory return NULL; } -NDIS_STATUS +NDIS_STATUS MPHandleSendTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList @@ -2420,15 +2420,15 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait PVOID pVa; PMDL Mdl, FirstMdl, SecondMdl, PrevMdl; ULONG BytesToSkip; - ULONG BufferLength; + ULONG BufferLength; PVOID Storage; PNET_BUFFER MdlAllocatedNetBuffers = NULL; DBGPRINT(MUX_LOUD, ("==> MPHandleSendTaggingNB: VELAN %p, NetBufferList %p\n", pVElan, NetBufferList)); - + NdisPacket8021qInfo.Value = NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo); SendContext = (PIM_NBL_ENTRY)NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); - + do { Status = NDIS_STATUS_SUCCESS; @@ -2474,7 +2474,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { // // Find the start address of the frame - // + // Storage = NULL; pEthFrame = NdisGetDataBuffer(CurrentNetBuffer, ETH_HEADER_SIZE, @@ -2490,7 +2490,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait Mdl = NET_BUFFER_CURRENT_MDL(CurrentNetBuffer); PrevMdl = NULL; - + // // Retreat the net buffer list // @@ -2511,7 +2511,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { // // Advance the NetBuffer so that we can allocate MDLs instead - // + // NdisAdvanceNetBufferDataStart(CurrentNetBuffer, VLAN_TAG_HEADER_SIZE, FALSE, @@ -2520,11 +2520,11 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait Status = NDIS_STATUS_RESOURCES; } } - + if (Status == NDIS_STATUS_RESOURCES) { do - { + { // // There is no more unused data space in the NetBuffer, need to allocate // a new MDL and memory @@ -2537,7 +2537,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // The following loop is to find the start address of the data after // the ethernet header. This may be either in the first MDL // or in the second. - // + // while (TRUE) { pVa = NULL; @@ -2550,7 +2550,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // // Have we gone far enough into the packet? - // + // if (BytesToSkip == 0) { break; @@ -2559,7 +2559,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // // Does the current buffer contain bytes past the Ethernet // header? If so, stop. - // + // if (BufferLength > BytesToSkip) { pVa = (PVOID)((PUCHAR)pVa + BytesToSkip); @@ -2572,7 +2572,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // to the next buffer. // BytesToSkip -= BufferLength; - Mdl = NDIS_MDL_LINKAGE(Mdl); + Mdl = NDIS_MDL_LINKAGE(Mdl); } if (pVa == NULL) @@ -2596,7 +2596,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait } NdisZeroMemory((PVOID)pNetBufferContext, sizeof(IM_SEND_NB_ENTRY)); - + pEthFrameNew = ((PUCHAR) pNetBufferContext) + sizeof(IM_SEND_NB_ENTRY); // @@ -2606,7 +2606,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait SecondMdl = NdisAllocateMdl(pVElan->MiniportAdapterHandle, pVa, // byte following the Eth+tag headers BufferLength); - + FirstMdl = NdisAllocateMdl(pVElan->MiniportAdapterHandle, pEthFrameNew, ETH_HEADER_SIZE + VLAN_TAG_HEADER_SIZE); @@ -2631,16 +2631,16 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait Status = NDIS_STATUS_RESOURCES; break; } - + // - // All allocations are successful. + // All allocations are successful. // Copy the Ethernet header to the newly allocated memory // Leave space for the VLAN tag // NdisMoveMemory(pEthFrameNew, pEthFrame, 2 * ETH_LENGTH_OF_ADDRESS); - - NdisMoveMemory(pEthFrameNew + (2 * ETH_LENGTH_OF_ADDRESS) + VLAN_TAG_HEADER_SIZE, - pEthFrame + (2 * ETH_LENGTH_OF_ADDRESS), + + NdisMoveMemory(pEthFrameNew + (2 * ETH_LENGTH_OF_ADDRESS) + VLAN_TAG_HEADER_SIZE, + pEthFrame + (2 * ETH_LENGTH_OF_ADDRESS), 2); // @@ -2659,9 +2659,9 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait PrevMdl = NDIS_MDL_LINKAGE(PrevMdl); } - pNetBufferContext->PrevMdl = PrevMdl; + pNetBufferContext->PrevMdl = PrevMdl; } - + pNetBufferContext->CurrentMdlOffset = NET_BUFFER_CURRENT_MDL_OFFSET(CurrentNetBuffer); // @@ -2685,10 +2685,10 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // Adjust the NetBuffer to use the new Mdls // NDIS_MDL_LINKAGE(FirstMdl) = SecondMdl; - + NDIS_MDL_LINKAGE(SecondMdl) = NDIS_MDL_LINKAGE(Mdl); - - NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) - + + NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) - NET_BUFFER_CURRENT_MDL_OFFSET(CurrentNetBuffer); NET_BUFFER_DATA_LENGTH(CurrentNetBuffer) += VLAN_TAG_HEADER_SIZE; @@ -2717,10 +2717,10 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait else if (Status == NDIS_STATUS_SUCCESS) { // - // There was enough unused space in the NetBuffer to - // accomodate the VLAN tag. + // There was enough unused space in the NetBuffer to + // accomodate the VLAN tag. // Get new start address of frame - // + // Storage = NULL; pEthFrameNew = NdisGetDataBuffer(CurrentNetBuffer, VLAN_TAG_HEADER_SIZE, @@ -2734,7 +2734,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait VLAN_TAG_HEADER_SIZE, FALSE, NULL); - + Status = NDIS_STATUS_INVALID_PACKET; } else @@ -2744,14 +2744,14 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // NdisMoveMemory(pEthFrameNew, pEthFrame, 2 * ETH_LENGTH_OF_ADDRESS); } - + } if (Status != NDIS_STATUS_SUCCESS) { break; } - + pTpid = (PUSHORT)((PUCHAR)pEthFrameNew + 2 * ETH_LENGTH_OF_ADDRESS); *pTpid = TPID; pTagHeader = (PVLAN_TAG_HEADER)(pTpid + 1); @@ -2781,7 +2781,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { SET_VLAN_ID_TO_TAG(pTagHeader, pVElan->VlanId); } - + CurrentNetBuffer = NET_BUFFER_NEXT_NB(CurrentNetBuffer); } @@ -2789,7 +2789,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { SendContext->Flags |= MUX_RETREAT_DATA; SendContext->MdlAllocatedNetBuffers = MdlAllocatedNetBuffers; - NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = 0; + NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = 0; } else { @@ -2806,7 +2806,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait return Status; } -VOID +VOID MPRestoreSendNBL( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, @@ -2825,20 +2825,20 @@ Routine Description: Return Value: --*/ - + { PNET_BUFFER CurrentNetBuffer; PNET_BUFFER CurrentMdlAllocatedNetBuffer, SavedMdlAllocatedNetBuffer; PIM_SEND_NB_ENTRY NetBufferContext; PVOID pVa = NULL; ULONG BufferLength; - PUCHAR pFrame = NULL, pDst = NULL; + PUCHAR pFrame = NULL, pDst = NULL; PMDL FirstMdl, SecondMdl; PVOID Storage; CurrentNetBuffer = NET_BUFFER_LIST_FIRST_NB(NetBufferList); CurrentMdlAllocatedNetBuffer = MdlAllocatedNetBuffers; - + while (CurrentNetBuffer != LastNetBuffer) { SavedMdlAllocatedNetBuffer = CurrentMdlAllocatedNetBuffer; @@ -2848,9 +2848,9 @@ Return Value: // if (CurrentMdlAllocatedNetBuffer) { - NdisQueryMdl(NET_BUFFER_CURRENT_MDL(CurrentMdlAllocatedNetBuffer), - &pVa, - &BufferLength, + NdisQueryMdl(NET_BUFFER_CURRENT_MDL(CurrentMdlAllocatedNetBuffer), + &pVa, + &BufferLength, NormalPagePriority | MdlMappingNoExecute); if( pVa == NULL ){ //you may do something @@ -2872,10 +2872,10 @@ Return Value: //check why NetBufferContext is NULL } else{ - NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) + + NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) + NetBufferContext->CurrentMdlOffset; - - NET_BUFFER_DATA_LENGTH(CurrentMdlAllocatedNetBuffer) -= VLAN_TAG_HEADER_SIZE; + + NET_BUFFER_DATA_LENGTH(CurrentMdlAllocatedNetBuffer) -= VLAN_TAG_HEADER_SIZE; NET_BUFFER_CURRENT_MDL_OFFSET(CurrentMdlAllocatedNetBuffer) = NetBufferContext->CurrentMdlOffset; @@ -2889,22 +2889,22 @@ Return Value: { NET_BUFFER_FIRST_MDL(CurrentMdlAllocatedNetBuffer) = NetBufferContext->CurrentMdl; } - - CurrentMdlAllocatedNetBuffer = NetBufferContext->NextNetBuffer; + + CurrentMdlAllocatedNetBuffer = NetBufferContext->NextNetBuffer; // // Free the MDLs and the memory allocated // - NdisFreeMdl(SecondMdl); + NdisFreeMdl(SecondMdl); NdisFreeMdl(FirstMdl); - NdisFreeToNPagedLookasideList(&pVElan->TagLookaside, (PVOID) NetBufferContext); + NdisFreeToNPagedLookasideList(&pVElan->TagLookaside, (PVOID) NetBufferContext); } } // - // Advance the NET_BUFFERs until the NET_BUFFER for which + // Advance the NET_BUFFERs until the NET_BUFFER for which // the MDLs were allocated // while ((CurrentNetBuffer != SavedMdlAllocatedNetBuffer) && @@ -2930,13 +2930,13 @@ Return Value: RtlMoveMemory(pDst, pFrame, (2 * ETH_LENGTH_OF_ADDRESS)); } - + NdisAdvanceNetBufferDataStart(CurrentNetBuffer, VLAN_TAG_HEADER_SIZE, FALSE, - NULL); - - CurrentNetBuffer = NET_BUFFER_NEXT_NB(CurrentNetBuffer); + NULL); + + CurrentNetBuffer = NET_BUFFER_NEXT_NB(CurrentNetBuffer); } if (SavedMdlAllocatedNetBuffer) diff --git a/network/ndis/mux/driver/60/mux.c b/network/ndis/mux/driver/60/mux.c index 1ff8698be..4654d3735 100644 --- a/network/ndis/mux/driver/60/mux.c +++ b/network/ndis/mux/driver/60/mux.c @@ -1,8 +1,8 @@ /*++ Copyright (c) 1992-2000 Microsoft Corporation - + Module Name: - + mux.c Abstract: @@ -31,7 +31,7 @@ Revision History: #if DBG // // Debug level for mux driver -// +// INT muxDebugLevel = MUX_WARN; #endif //DBG @@ -103,9 +103,9 @@ Routine Description: DriverObject - pointer to the system's driver object structure for this driver - + RegistryPath - system's registry path for this driver - + Return Value: STATUS_SUCCESS if all initialization is successful, STATUS_XXX @@ -119,13 +119,13 @@ Return Value: NDIS_HANDLE MiniportDriverContext; NDIS_HANDLE ProtocolDriverContext; NDIS_STRING Name; - + NdisInitializeListHead(&AdapterList); NdisInitializeListHead(&VElanList); MiniportDriverContext=NULL; ProtocolDriverContext=NULL; - + MUX_INIT_MUTEX(&GlobalMutex); MUX_INIT_MUTEX(&ControlDeviceMutex); NdisAllocateSpinLock(&GlobalLock); @@ -147,7 +147,7 @@ Return Value: MChars.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; MChars.Header.Size = sizeof(NDIS_MINIPORT_DRIVER_CHARACTERISTICS); MChars.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_1; - + MChars.MajorNdisVersion = MUX_MAJOR_NDIS_VERSION; MChars.MinorNdisVersion = MUX_MINOR_NDIS_VERSION; @@ -198,15 +198,15 @@ Return Value: PChars.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; PChars.Header.Size = sizeof(NDIS_PROTOCOL_DRIVER_CHARACTERISTICS); PChars.Header.Revision = NDIS_PROTOCOL_DRIVER_CHARACTERISTICS_REVISION_1; - + PChars.MajorNdisVersion = MUX_PROT_MAJOR_NDIS_VERSION; PChars.MinorNdisVersion = MUX_PROT_MINOR_NDIS_VERSION; - + PChars.MajorDriverVersion = MUX_MAJOR_DRIVER_VERSION; PChars.MinorDriverVersion = MUX_MINOR_DRIVER_VERSION; PChars.SetOptionsHandler = PtSetOptions; - + // // Make sure the protocol-name matches the service-name // (from the INF) under which this protocol is installed. @@ -254,11 +254,11 @@ MpSetOptions( Routine Description: This routine registers the optional handlers for the MUX MINIPORT driver with NDIS. - + Arguments: NdisDriverHandle Mux miniport driver handle - DriverContext Specifies a handle to a driver-allocated context area where the driver + DriverContext Specifies a handle to a driver-allocated context area where the driver maintains state and configuration information Return Value: @@ -283,11 +283,11 @@ PtSetOptions( Routine Description: This routine registers the optional handlers for the MUX PROTOCOL driver with NDIS. - + Arguments: NdisDriverHandle Mux protocol driver handle - DriverContext Specifies a handle to a driver-allocated context area where the driver + DriverContext Specifies a handle to a driver-allocated context area where the driver maintains state and configuration information Return Value: @@ -346,16 +346,16 @@ Return Value: MUX_ACQUIRE_MUTEX(&ControlDeviceMutex); ++MiniportCount; - + if (1 == MiniportCount) { NdisZeroMemory(DispatchTable, (IRP_MJ_MAXIMUM_FUNCTION+1) * sizeof(PDRIVER_DISPATCH)); - + DispatchTable[IRP_MJ_CREATE] = PtDispatch; DispatchTable[IRP_MJ_CLEANUP] = PtDispatch; DispatchTable[IRP_MJ_CLOSE] = PtDispatch; DispatchTable[IRP_MJ_DEVICE_CONTROL] = PtDispatch; - + NdisInitUnicodeString(&DeviceName, NTDEVICE_STRING); NdisInitUnicodeString(&DeviceLinkUnicodeString, GLOBAL_LINKNAME_STRING); @@ -377,7 +377,7 @@ Return Value: &DeviceObjectAttributes, &ControlDeviceObject, &NdisDeviceHandle); - + } MUX_RELEASE_MUTEX(&ControlDeviceMutex); @@ -416,36 +416,36 @@ Return Value: PVOID buffer; UNREFERENCED_PARAMETER(DeviceObject); - + irpStack = IoGetCurrentIrpStackLocation(Irp); DBGPRINT(MUX_LOUD, ("==>PtDispatch %d\n", irpStack->MajorFunction)); - + switch (irpStack->MajorFunction) { case IRP_MJ_CREATE: break; - + case IRP_MJ_CLEANUP: break; - + case IRP_MJ_CLOSE: - break; - - case IRP_MJ_DEVICE_CONTROL: + break; + + case IRP_MJ_DEVICE_CONTROL: { - - buffer = Irp->AssociatedIrp.SystemBuffer; + + buffer = Irp->AssociatedIrp.SystemBuffer; inlen = irpStack->Parameters.DeviceIoControl.InputBufferLength; UNREFERENCED_PARAMETER(buffer); UNREFERENCED_PARAMETER(inlen); - - switch (irpStack->Parameters.DeviceIoControl.IoControlCode) + + switch (irpStack->Parameters.DeviceIoControl.IoControlCode) { // // Add code here to handle ioctl commands. // } - break; + break; } default: break; @@ -458,7 +458,7 @@ Return Value: return status; -} +} NDIS_STATUS @@ -492,7 +492,7 @@ Return Value: ASSERT(MiniportCount > 0); --MiniportCount; - + if (0 == MiniportCount) { // @@ -511,6 +511,6 @@ Return Value: DBGPRINT(MUX_INFO, ("<== PtDeregisterDevice: %x\n", Status)); return Status; - + } diff --git a/network/ndis/mux/driver/60/mux.h b/network/ndis/mux/driver/60/mux.h index dcdef9372..a36ee52d2 100644 --- a/network/ndis/mux/driver/60/mux.h +++ b/network/ndis/mux/driver/60/mux.h @@ -124,7 +124,7 @@ VOID #define MUX_ADAPTER_PACKET_FILTER \ NDIS_PACKET_TYPE_PROMISCUOUS - + #define MIN_PACKET_POOL_SIZE 255 #define MAX_PACKET_POOL_SIZE 4096 @@ -466,7 +466,7 @@ typedef struct _ADAPT NDIS_MEDIUM Medium ; // - // BindParameters passed to protocol giving it information on + // BindParameters passed to protocol giving it information on // the miniport below // NDIS_BIND_PARAMETERS BindParameters; @@ -474,7 +474,7 @@ typedef struct _ADAPT NDIS_RECEIVE_SCALE_CAPABILITIES RcvScaleCapabilities; NDIS_LINK_STATE LastIndicatedLinkState; MUX_ADAPTER_BINDING_STATE BindingState; - + ULONG OutstandingSends; PNDIS_EVENT PauseEvent; NDIS_SPIN_LOCK Lock; @@ -552,7 +552,7 @@ typedef struct _VELAN // serializes requests to a miniport, we only need one of these // per VELAN. // - MUX_NDIS_REQUEST Request; + MUX_NDIS_REQUEST Request; // Have we queued a request because the lower binding is // at a low power state? BOOLEAN QueuedRequest; @@ -609,7 +609,7 @@ typedef struct _VELAN // Multicast list MUX_MAC_ADDRESS McastAddrs[VELAN_MAX_MCAST_LIST]; ULONG McastAddrCount; - + NDIS_STATUS LastIndicatedStatus; NDIS_STATUS LatestUnIndicateStatus; @@ -626,7 +626,7 @@ typedef struct _VELAN ULONG RcvFormatErrors; ULONG RcvVlanIdErrors; BOOLEAN RestoreLookaheadSize; - NPAGED_LOOKASIDE_LIST TagLookaside; + NPAGED_LOOKASIDE_LIST TagLookaside; #endif NET_IFINDEX IfIndex; @@ -661,22 +661,22 @@ typedef struct _VELAN #if IEEE_VLAN_SUPPORT -#define TPID 0x0081 +#define TPID 0x0081 // // Define tag_header structure // typedef struct _VLAN_TAG_HEADER { - UCHAR TagInfo[2]; + UCHAR TagInfo[2]; } VLAN_TAG_HEADER, *PVLAN_TAG_HEADER; // // Macro definitions for VLAN support -// -#define VLAN_TAG_HEADER_SIZE 4 +// +#define VLAN_TAG_HEADER_SIZE 4 -#define VLANID_DEFAULT 0 +#define VLANID_DEFAULT 0 #define VLAN_ID_MAX 0xfff #define VLAN_ID_MIN 0x0 @@ -686,7 +686,7 @@ typedef struct _VLAN_TAG_HEADER // // Get information for tag headre -// +// #define GET_CANONICAL_FORMAT_ID_FROM_TAG(_pTagHeader) \ ((_pTagHeader)->TagInfo[0] & CANONICAL_FORMAT_ID_MASK) @@ -698,23 +698,23 @@ typedef struct _VLAN_TAG_HEADER // // Clear the tag header struct -// +// #define INITIALIZE_TAG_HEADER_TO_ZERO(_pTagHeader) \ { \ (_pTagHeader)->TagInfo[0] = 0; \ (_pTagHeader)->TagInfo[1] = 0; \ } - + // // Set VLAN information to tag header // Before we called all the set macro, first we need to initialize pTagHeader to be 0 // #define SET_CANONICAL_FORMAT_ID_TO_TAG(_pTagHeader, _CanonicalFormatId) \ (_pTagHeader)->TagInfo[0] |= ((UCHAR)(_CanonicalFormatId) << 4) - + #define SET_USER_PRIORITY_TO_TAG(_pTagHeader, _UserPriority) \ (_pTagHeader)->TagInfo[0] |= ((UCHAR)(_UserPriority) << 5) - + #define SET_VLAN_ID_TO_TAG(_pTagHeader, _VlanId) \ { \ (_pTagHeader)->TagInfo[0] |= (((UCHAR)((_VlanId) >> 8)) & 0x0f); \ @@ -724,7 +724,7 @@ typedef struct _VLAN_TAG_HEADER // // Copy tagging information in the indicated frame to per packet info -// +// #define COPY_TAG_INFO_FROM_HEADER_TO_PACKET_INFO(_Ieee8021qInfo, _pTagHeader) \ { \ (_Ieee8021qInfo).TagHeader.UserPriority = ((_pTagHeader->TagInfo[0] & USER_PRIORITY_MASK) >> 5); \ @@ -744,7 +744,7 @@ typedef struct _VLAN_TAG_HEADER // // Every NBL that is indicated up to a protocol needs to advance the buffer -// in case the VLAN tag is present. It should be restored before returning the +// in case the VLAN tag is present. It should be restored before returning the // packet to the miniport. This structure is used for that purpose // typedef struct _RECV_NBL_ENTRY @@ -770,11 +770,11 @@ typedef struct _IM_SEND_NB_ENTRY #endif //IEEE_VLAN_SUPPORT -typedef struct _IM_NBL_ENTRY +typedef struct _IM_NBL_ENTRY { NDIS_HANDLE PreviousSourceHandle; PVELAN pVElan; -#if IEEE_VLAN_SUPPORT +#if IEEE_VLAN_SUPPORT ULONG Flags; PNET_BUFFER MdlAllocatedNetBuffers; #endif @@ -847,7 +847,7 @@ typedef struct _IM_NBL_ENTRY #define ASSERT_AT_PASSIVE() \ ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL) - + #define ASSERT_AT_DISPATCH() \ ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL) @@ -912,13 +912,13 @@ MuxAllocateMdl( IN OUT PULONG BufferSize ); -NDIS_STATUS +NDIS_STATUS MPHandleSendTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList ); -VOID +VOID MPRestoreSendNBL( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, @@ -926,21 +926,21 @@ MPRestoreSendNBL( IN PNET_BUFFER MdlAllocatedNetBuffers ); -NDIS_STATUS +NDIS_STATUS PtHandleReceiveTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, - IN PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo + IN PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo ); -NDIS_STATUS +NDIS_STATUS PtStripVlanTagNB( IN PNET_BUFFER_LIST NetBufferList, OUT PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo, - OUT PRECV_NBL_ENTRY RecvContext + OUT PRECV_NBL_ENTRY RecvContext ); -NDIS_STATUS +NDIS_STATUS PtRestoreReceiveNBL( IN PNET_BUFFER_LIST NetBufferList ); diff --git a/network/ndis/mux/driver/60/protocol.c b/network/ndis/mux/driver/60/protocol.c index 908e4de27..b2b1e209d 100644 --- a/network/ndis/mux/driver/60/protocol.c +++ b/network/ndis/mux/driver/60/protocol.c @@ -67,11 +67,11 @@ Return Value: UNREFERENCED_PARAMETER(ProtocolDriverContext); UNREFERENCED_PARAMETER(BindContext); - + pConfigString = (PNDIS_STRING)BindParameters->ProtocolSection; - + DBGPRINT(MUX_LOUD, ("==> Protocol BindAdapter: %ws\n", pConfigString->Buffer)); - + do { if (BindParameters->Header.Type != NDIS_OBJECT_TYPE_BIND_PARAMETERS || @@ -80,12 +80,12 @@ Return Value: Status = NDIS_STATUS_INVALID_PARAMETER; break; } - + // // Allocate memory for Adapter struct plus the config // string with two extra WCHARs for NULL termination. // - Length = sizeof(ADAPT) + + Length = sizeof(ADAPT) + pConfigString->MaximumLength + sizeof(WCHAR); pAdapt = NdisAllocateMemoryWithTagPriority(ProtHandle, Length , MUX_TAG, LowPoolPriority); @@ -94,14 +94,14 @@ Return Value: Status = NDIS_STATUS_RESOURCES; break; } - + // // Initialize the adapter structure // - NdisZeroMemory(pAdapt, sizeof(ADAPT)); + NdisZeroMemory(pAdapt, sizeof(ADAPT)); + + (VOID)PtReferenceAdapter(pAdapt, (PUCHAR)"openadapter"); - (VOID)PtReferenceAdapter(pAdapt, (PUCHAR)"openadapter"); - // // Copy in the Config string - we will use this to open the @@ -109,13 +109,13 @@ Return Value: // pAdapt->ConfigString.MaximumLength = pConfigString->MaximumLength; pAdapt->ConfigString.Length = pConfigString->Length; - pAdapt->ConfigString.Buffer = (PWCHAR)((PUCHAR)pAdapt + + pAdapt->ConfigString.Buffer = (PWCHAR)((PUCHAR)pAdapt + sizeof(ADAPT)); NdisMoveMemory(pAdapt->ConfigString.Buffer, pConfigString->Buffer, pConfigString->Length); - pAdapt->ConfigString.Buffer[pConfigString->Length/sizeof(WCHAR)] = + pAdapt->ConfigString.Buffer[pConfigString->Length/sizeof(WCHAR)] = ((WCHAR)0); NdisInitializeEvent(&pAdapt->Event); @@ -173,9 +173,9 @@ Return Value: break; } pAdapt->Flags |= MUX_BINDING_ACTIVE; - + pAdapt->BindingState = MuxAdapterBindingPaused; - + pAdapt->Medium = MediumArray[MediumIndex]; // @@ -188,20 +188,20 @@ Return Value: MUX_RELEASE_MUTEX(&GlobalMutex); // - // Copy all the relevant information about the Adapter into + // Copy all the relevant information about the Adapter into // the local structure // pAdapt->BindParameters = *BindParameters; - + if (BindParameters->RcvScaleCapabilities) { pAdapt->RcvScaleCapabilities = (*BindParameters->RcvScaleCapabilities); pAdapt->BindParameters.RcvScaleCapabilities = &pAdapt->RcvScaleCapabilities; } - - pAdapt->PowerManagementCapabilities = (*BindParameters->PowerManagementCapabilities); - + pAdapt->PowerManagementCapabilities = (*BindParameters->PowerManagementCapabilities); + + PtPostProcessPnPCapabilities(&pAdapt->PowerManagementCapabilities, sizeof(pAdapt->PowerManagementCapabilities)); @@ -211,7 +211,7 @@ Return Value: pAdapt->BindParameters.ProtocolSection= NULL; pAdapt->BindParameters.AdapterName = NULL; pAdapt->BindParameters.PhysicalDeviceObject = NULL; - + // // Start all VELANS configured on this adapter. // @@ -222,12 +222,12 @@ Return Value: break; } - + } while(FALSE); if (Status != NDIS_STATUS_SUCCESS) { - + if (pAdapt != NULL) { // @@ -237,7 +237,7 @@ Return Value: { // // Close the binding the driver opened above - // + // PtCloseAdapter(pAdapt); MUX_ACQUIRE_MUTEX(&GlobalMutex); @@ -250,7 +250,7 @@ Return Value: pAdapt = NULL; } } - + DBGPRINT(MUX_INFO, ("<== PtBindAdapter: pAdapt %p, Status %x\n", pAdapt, Status)); @@ -268,7 +268,7 @@ PtOpenAdapterComplete( Routine Description: - Completion routine for NdisOpenAdapter issued from within the + Completion routine for NdisOpenAdapter issued from within the PtBindAdapter. Simply unblock the caller. Arguments: @@ -318,7 +318,7 @@ Return Value: // Insert code here to query Adapter info if needed // UNREFERENCED_PARAMETER(pAdapt); - + } @@ -370,7 +370,7 @@ Return Value: // pMuxNdisRequest->pCallback = PtCompleteBlockingRequest; NdisInitializeEvent(&pMuxNdisRequest->Event); - + pMuxNdisRequest->Request.Header.Type = NDIS_OBJECT_TYPE_OID_REQUEST; pMuxNdisRequest->Request.Header.Revision = NDIS_OID_REQUEST_REVISION_1; pMuxNdisRequest->Request.Header.Size = sizeof(NDIS_OID_REQUEST); @@ -381,29 +381,29 @@ Return Value: InformationBuffer; pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = InformationBufferLength; - + NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { Status = NDIS_STATUS_CLOSING; - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); } else { NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest(pAdapt->BindingHandle, - &pMuxNdisRequest->Request); + &pMuxNdisRequest->Request); } if (Status != NDIS_STATUS_PENDING) { NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests --; - + if ((pAdapt->OutstandingRequests == 0) && (pAdapt->CloseEvent != NULL)) { NdisSetEvent(pAdapt->CloseEvent); @@ -411,11 +411,11 @@ Return Value: } NdisReleaseSpinLock(&pAdapt->Lock); } - else + else { NdisWaitEvent(&pMuxNdisRequest->Event, 0); Status = pMuxNdisRequest->Status; - } + } } while (FALSE); @@ -496,7 +496,7 @@ Return Value: InformationBuffer; pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength = InformationBufferLength; - + break; case NdisRequestSetInformation: @@ -505,31 +505,31 @@ Return Value: InformationBuffer; pNdisRequest->DATA.SET_INFORMATION.InformationBufferLength = InformationBufferLength; - + break; - + default: ASSERT(FALSE); break; } - + NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { - NdisReleaseSpinLock(&pAdapt->Lock); - Status = NDIS_STATUS_CLOSING; + NdisReleaseSpinLock(&pAdapt->Lock); + Status = NDIS_STATUS_CLOSING; } else { - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest( pAdapt->BindingHandle, pNdisRequest); } - + if (Status != NDIS_STATUS_PENDING) { PtRequestComplete( @@ -553,13 +553,13 @@ PtCloseAdapter( Routine Description: - Call either when the protocol is unbinding or the miniport is halting to set + Call either when the protocol is unbinding or the miniport is halting to set the packet filters back to zero and multicast filter back to zero Arguments: pAdapter Pointer to a virtual adapter - + Return Value: None @@ -573,7 +573,7 @@ Return Value: NDIS_EVENT CloseEvent; DBGPRINT(MUX_LOUD, ("==> PtCloseAdapter: Adapt %p\n", pAdapt)); - + ASSERT (KeGetCurrentIrql() == PASSIVE_LEVEL); // @@ -581,15 +581,15 @@ Return Value: // from the adapter below is required for NDIS 6.0 protocols // PtRequestAdapterSync(pAdapt, - NdisRequestSetInformation, + NdisRequestSetInformation, OID_GEN_CURRENT_PACKET_FILTER, - &PacketFilter, + &PacketFilter, sizeof(PacketFilter)); PtRequestAdapterSync(pAdapt, - NdisRequestSetInformation, + NdisRequestSetInformation, OID_802_3_MULTICAST_LIST, - MCastBuf, + MCastBuf, MCastBufSize); // // Stop sending requests and wait for outstanding requests to complete @@ -602,16 +602,16 @@ Return Value: if (pAdapt->OutstandingRequests != 0) { NdisInitializeEvent(&CloseEvent); - pAdapt->CloseEvent = &CloseEvent; + pAdapt->CloseEvent = &CloseEvent; NdisReleaseSpinLock(&pAdapt->Lock); - NdisWaitEvent(&CloseEvent, 0); + NdisWaitEvent(&CloseEvent, 0); NdisAcquireSpinLock(&pAdapt->Lock); } NdisReleaseSpinLock(&pAdapt->Lock); // // Now Close the binding with the adapter below // - + NdisResetEvent(&pAdapt->Event); Status = NdisCloseAdapterEx(pAdapt->BindingHandle); @@ -625,7 +625,7 @@ Return Value: } pAdapt->BindingHandle = NULL; - + DBGPRINT(MUX_LOUD, ("<== PtCloseAdapter: Adapt %p\n", pAdapt)); } @@ -660,7 +660,7 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; UNREFERENCED_PARAMETER(UnbindContext); - + DBGPRINT(MUX_LOUD, ("==> PtUnbindAdapter: Adapt %p\n", pAdapt)); // @@ -700,9 +700,9 @@ Return Value: // run StopVElan at passive IRQL. // MUX_RELEASE_ADAPT_READ_LOCK(pAdapt, &LockState); - + PtStopVElan(pVElan); - + PtDereferenceVElan(pVElan, (PUCHAR)"UnbindTemp"); MUX_ACQUIRE_ADAPT_READ_LOCK(pAdapt, &LockState); @@ -755,7 +755,7 @@ Return Value: // // Remove the adapter from the global AdapterList // - + MUX_ACQUIRE_MUTEX(&GlobalMutex); RemoveEntryList(&pAdapt->Link); @@ -763,16 +763,16 @@ Return Value: MUX_RELEASE_MUTEX(&GlobalMutex); NdisFreeSpinLock(&pAdapt->Lock); - + // // Free all the resources associated with this Adapter except the - // ADAPT struct itself, because that will be freed by - // PtDereferenceAdapter call when the reference drops to zero. + // ADAPT struct itself, because that will be freed by + // PtDereferenceAdapter call when the reference drops to zero. // Note: Every VELAN associated with this Adapter takes a ref count // on it. So the adapter memory wouldn't be freed until all the VELANs - // are shutdown. + // are shutdown. // - + PtDereferenceAdapter(pAdapt, (PUCHAR)"Unbind"); DBGPRINT(MUX_LOUD, ("<== PtUnbindAdapter: Adapt %p, Status=%08lx\n", pAdapt, Status)); @@ -795,7 +795,7 @@ Routine Description: Arguments: ProtocolBindingContext Pointer to the adapter structure - + Return Value: None. @@ -804,12 +804,12 @@ Return Value: { PADAPT pAdapt =(PADAPT)ProtocolBindingContext; - DBGPRINT(MUX_LOUD, ("==> PtCloseAdapterComplete: Adapt %p\n", + DBGPRINT(MUX_LOUD, ("==> PtCloseAdapterComplete: Adapt %p\n", pAdapt)); NdisSetEvent(&pAdapt->Event); - DBGPRINT(MUX_LOUD, ("<== PtCloseAdapterComplete: Adapt %p\n", + DBGPRINT(MUX_LOUD, ("<== PtCloseAdapterComplete: Adapt %p\n", pAdapt)); } @@ -843,27 +843,27 @@ Return Value: PMUX_NDIS_REQUEST pMuxNdisRequest; - DBGPRINT(MUX_LOUD, ("==> PtRequestComplete: Adapt %p, Request %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("==> PtRequestComplete: Adapt %p, Request %p, Status %8x\n", pAdapt, NdisRequest, Status)); //get the Super-structure for NDIS_REQUEST before getting the callback functions //so make sure NdisRequest is a filled into a MUX_NDIS_REQUEST before using this function pMuxNdisRequest = CONTAINING_RECORD(NdisRequest, MUX_NDIS_REQUEST, Request); - + ASSERT(pMuxNdisRequest->pCallback != NULL); - + // // Completion is handled by the callback routine: // - (*pMuxNdisRequest->pCallback)(pAdapt, + (*pMuxNdisRequest->pCallback)(pAdapt, pMuxNdisRequest, Status); NdisAcquireSpinLock(&pAdapt->Lock); - + pAdapt->OutstandingRequests --; - + if ((pAdapt->OutstandingRequests == 0) && (pAdapt->CloseEvent != NULL)) { NdisSetEvent(pAdapt->CloseEvent); @@ -872,7 +872,7 @@ Return Value: NdisReleaseSpinLock(&pAdapt->Lock); - DBGPRINT(MUX_LOUD, ("<== PtRequestComplete: Adapt %p, Request %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("<== PtRequestComplete: Adapt %p, Request %p, Status %8x\n", pAdapt, NdisRequest, Status)); } @@ -914,9 +914,9 @@ Return Value: BOOLEAN fCompleteRequest = FALSE; UNREFERENCED_PARAMETER(pAdapt); - - DBGPRINT(MUX_LOUD, ("==> PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", + + DBGPRINT(MUX_LOUD, ("==> PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); // // Get the originating VELAN. The VELAN will not be dereferenced @@ -926,10 +926,10 @@ Return Value: ASSERT(pVElan != NULL); ASSERT(pMuxNdisRequest == &pVElan->Request); - + if (Status != NDIS_STATUS_SUCCESS) { - DBGPRINT(MUX_WARN, ("PtCompleteForwardedRequest: pVElan %p, OID %x, Status %x\n", + DBGPRINT(MUX_WARN, ("PtCompleteForwardedRequest: pVElan %p, OID %x, Status %x\n", pVElan, pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.Oid, Status)); @@ -944,9 +944,9 @@ Return Value: OrigRequest = pMuxNdisRequest->OrigRequest; pMuxNdisRequest->OrigRequest = NULL; } - - NdisReleaseSpinLock(&pVElan->Lock); + + NdisReleaseSpinLock(&pVElan->Lock); if (fCompleteRequest == FALSE) { @@ -961,9 +961,9 @@ Return Value: case NdisRequestQueryInformation: case NdisRequestQueryStatistics: - OrigRequest->DATA.QUERY_INFORMATION.BytesWritten = + OrigRequest->DATA.QUERY_INFORMATION.BytesWritten = pNdisRequest->DATA.QUERY_INFORMATION.BytesWritten; - OrigRequest->DATA.QUERY_INFORMATION.BytesNeeded = + OrigRequest->DATA.QUERY_INFORMATION.BytesNeeded = pNdisRequest->DATA.QUERY_INFORMATION.BytesNeeded; // @@ -995,8 +995,8 @@ Return Value: OrigRequest->DATA.QUERY_INFORMATION.BytesNeeded= pNdisRequest->DATA.SET_INFORMATION.BytesNeeded; -#if IEEE_VELAN_SUPPORT - if ((pNdisRequest->DATA.SET_INFORMATION.Oid == OID_GEN_CURRENT_LOOKAHEAD) +#if IEEE_VELAN_SUPPORT + if ((pNdisRequest->DATA.SET_INFORMATION.Oid == OID_GEN_CURRENT_LOOKAHEAD) && (pVElan->RestoreLookaheadSize == TRUE)) { pVElan->RestoreLookaheadSize = FALSE; @@ -1013,8 +1013,8 @@ Return Value: switch (Oid) { case OID_GEN_CURRENT_LOOKAHEAD: - - + + NdisMoveMemory(&pVElan->LookAhead, pNdisRequest->DATA.SET_INFORMATION.InformationBuffer, sizeof(ULONG)); @@ -1036,7 +1036,7 @@ Return Value: MUX_DECR_PENDING_SENDS(pVElan); - DBGPRINT(MUX_LOUD, ("<== PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("<== PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); } @@ -1070,7 +1070,7 @@ Return Value: PNDIS_PM_WAKE_UP_CAPABILITIES pPMstruct; DBGPRINT(MUX_LOUD, ("==> PtPostProcessPnPCapabilities\n")); - + if (InformationBufferLength >= sizeof(NDIS_PNP_CAPABILITIES)) { pPNPCapabilities = (PNDIS_PNP_CAPABILITIES)InformationBuffer; @@ -1114,9 +1114,9 @@ Return Value: { UNREFERENCED_PARAMETER(pAdapt); - DBGPRINT(MUX_LOUD, ("==> PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("==> PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); - + // // The request was originated from this driver. Wake up the // thread blocked for its completion. @@ -1124,7 +1124,7 @@ Return Value: pMuxNdisRequest->Status = Status; NdisSetEvent(&pMuxNdisRequest->Event); - DBGPRINT(MUX_LOUD, ("<== PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("<== PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); } @@ -1208,7 +1208,7 @@ Return Value: { break; } - + MUX_ACQUIRE_ADAPT_READ_LOCK(pAdapt, &LockState); if (GeneralStatus == NDIS_STATUS_LINK_STATE) @@ -1219,7 +1219,7 @@ Return Value: p != &pAdapt->VElanList; p = p->Flink) { - + pVElan = CONTAINING_RECORD(p, VELAN, Link); MUX_INCR_PENDING_RECEIVES(pVElan); @@ -1229,7 +1229,7 @@ Return Value: // if ((pVElan->MiniportInitPending) || (pVElan->MiniportHalting) || - (pVElan->MiniportAdapterHandle == NULL) || + (pVElan->MiniportAdapterHandle == NULL) || MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) { MUX_DECR_PENDING_RECEIVES(pVElan); @@ -1237,7 +1237,7 @@ Return Value: { // // Keep track of the lastest status to indicated when VELAN power is on - // + // ASSERT(GeneralStatus == NDIS_STATUS_LINK_STATE); pVElan->LatestUnIndicateStatus = GeneralStatus; @@ -1247,12 +1247,12 @@ Return Value: pVElan->LatestUnIndicateLinkState = *(PNDIS_LINK_STATE)StatusIndication->StatusBuffer; } } - + continue; } // - // Save the last indicated status when + // Save the last indicated status when pVElan->LastIndicatedStatus = GeneralStatus; if (GeneralStatus == NDIS_STATUS_LINK_STATE) { @@ -1260,27 +1260,27 @@ Return Value: } // // Allocate a new status indication and set the destination handle to null to ensure that the status - // is indicated to protocols bound to mux velans. Copy only the fields that makes sense to pass up. For - // instance, do not copy PortNumber, RequestId, Flags, Guid, NdisReserved. Port Number is really not - // necessary to copy and pass up for the scenario because the port number is an entity that makes sense + // is indicated to protocols bound to mux velans. Copy only the fields that makes sense to pass up. For + // instance, do not copy PortNumber, RequestId, Flags, Guid, NdisReserved. Port Number is really not + // necessary to copy and pass up for the scenario because the port number is an entity that makes sense // between the protocol and the underlying miniport pair. - // - + // + NdisZeroMemory(&NewStatusIndication, sizeof(NDIS_STATUS_INDICATION)); - + NewStatusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; NewStatusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; NewStatusIndication.Header.Size = sizeof(NDIS_STATUS_INDICATION); - + NewStatusIndication.StatusCode = StatusIndication->StatusCode; NewStatusIndication.SourceHandle = pVElan->MiniportAdapterHandle; NewStatusIndication.DestinationHandle = NULL; - + NewStatusIndication.StatusBuffer = StatusIndication->StatusBuffer; NewStatusIndication.StatusBufferSize = StatusIndication->StatusBufferSize; NdisMIndicateStatusEx(pVElan->MiniportAdapterHandle, &NewStatusIndication); - + // // Mark this so that we forward a status complete // indication as well. @@ -1293,7 +1293,7 @@ Return Value: MUX_RELEASE_ADAPT_READ_LOCK(pAdapt, &LockState); } while (FALSE); - + DBGPRINT(MUX_LOUD, ("<== PtStatus: Adapt %p, Status %x\n", pAdapt, GeneralStatus)); } @@ -1333,7 +1333,7 @@ Return Value: ETH_COMPARE_NETWORK_ADDRESSES_EQ(pVElan->McastAddrs[i], pDstMac, &AddrCompareResult); - + if (AddrCompareResult == 0) { break; @@ -1451,9 +1451,9 @@ Return Value: bPacketMatch = FALSE; } } - + DBGPRINT(MUX_VERY_LOUD, ("<== PtMatchPacketToVElan: VElan %p, PacketMatch %x\n", pVElan, bPacketMatch)); - + return (bPacketMatch); } @@ -1489,7 +1489,7 @@ Return Value: // // Store the new power state. // - + pAdapt->PtDevicePowerState = *(PNDIS_DEVICE_POWER_STATE)pNetPnPEventNotification->NetPnPEvent.Buffer; DBGPRINT(MUX_LOUD, ("==> PnPNetEventSetPower: Adapt %p, SetPower to %d\n", @@ -1531,7 +1531,7 @@ Return Value: // break; } - + DBGPRINT(MUX_INFO, ("SetPower: Adapt %p, waiting for pending IO to complete\n", pAdapt)); @@ -1563,23 +1563,23 @@ Return Value: pVElan->QueuedRequest = FALSE; NdisReleaseSpinLock(&pVElan->Lock); - + NdisAcquireSpinLock(&pAdapt->Lock); - + pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { - NdisReleaseSpinLock(&pAdapt->Lock); - Status = NDIS_STATUS_CLOSING; + NdisReleaseSpinLock(&pAdapt->Lock); + Status = NDIS_STATUS_CLOSING; } else { - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest( pAdapt->BindingHandle, &pVElan->Request.Request); - } + } if (Status != NDIS_STATUS_PENDING) { PtRequestComplete(pAdapt, @@ -1598,7 +1598,7 @@ Return Value: DBGPRINT(MUX_LOUD, ("<== PnPNetEventSetPower: Adapt %p, SetPower to %d\n", pAdapt, pAdapt->PtDevicePowerState)); - + return (NDIS_STATUS_SUCCESS); } @@ -1633,7 +1633,7 @@ Return Value: PLIST_ENTRY p; NDIS_EVENT PauseEvent; - DBGPRINT(MUX_LOUD, ("==> PtPnPHandler: Adapt %p, NetPnPEvent %d\n", pAdapt, + DBGPRINT(MUX_LOUD, ("==> PtPnPHandler: Adapt %p, NetPnPEvent %d\n", pAdapt, pNetPnPEventNotification->NetPnPEvent.NetEvent)); switch (pNetPnPEventNotification->NetPnPEvent.NetEvent) @@ -1661,7 +1661,7 @@ Return Value: } MUX_RELEASE_MUTEX(&GlobalMutex); - + Status = NDIS_STATUS_SUCCESS; break; case NetEventIMReEnableDevice: @@ -1675,8 +1675,8 @@ Return Value: PtBootStrapVElans(pAdapt, pNetPnPEventNotification->NetPnPEvent.Buffer); } - - + + MUX_RELEASE_MUTEX(&GlobalMutex); Status = NDIS_STATUS_SUCCESS; @@ -1688,23 +1688,23 @@ Return Value: pAdapt->BindingState = MuxAdapterBindingPausing; ASSERT(pAdapt->PauseEvent == NULL); - + if (pAdapt->OutstandingSends != 0) { NdisInitializeEvent(&PauseEvent); - + pAdapt->PauseEvent = &PauseEvent; - + NdisReleaseSpinLock(&pAdapt->Lock); NdisWaitEvent(&PauseEvent, 0); - + NdisAcquireSpinLock(&pAdapt->Lock); } - + pAdapt->BindingState = MuxAdapterBindingPaused; NdisReleaseSpinLock(&pAdapt->Lock); - + Status = NDIS_STATUS_SUCCESS; break; @@ -1712,15 +1712,15 @@ Return Value: pAdapt->BindingState = MuxAdapterBindingRunning; Status = NDIS_STATUS_SUCCESS; break; - - + + default: Status = NDIS_STATUS_SUCCESS; break; } - DBGPRINT(MUX_LOUD, ("<== PtPnPHandler: Adapt %p, NetPnPEvent %d, Status %8x\n", pAdapt, + DBGPRINT(MUX_LOUD, ("<== PtPnPHandler: Adapt %p, NetPnPEvent %d, Status %8x\n", pAdapt, pNetPnPEventNotification->NetPnPEvent.NetEvent, Status)); return Status; } @@ -1742,12 +1742,12 @@ Routine Description: routines are protected by NDIS against pre-emption by UnbindAdapter. If this routine will be called from any other context, it should be protected against a simultaneous call to our UnbindAdapter handler. - + Arguments: pAdapt - Pointer to Adapter structure - pVElanKey - Points to a Unicode string naming the VELAN to create. - + pVElanKey - Points to a Unicode string naming the VELAN to create. + Return Value: NDIS_STATUS_SUCCESS if we either found a duplicate VELAN or @@ -1759,11 +1759,11 @@ Return Value: { NDIS_STATUS Status; PVELAN pVElan; - + Status = NDIS_STATUS_SUCCESS; pVElan = NULL; - DBGPRINT(MUX_LOUD, ("=> PtCreateAndStartVElan: Adapter %p, ElanKey %ws\n", + DBGPRINT(MUX_LOUD, ("=> PtCreateAndStartVElan: Adapter %p, ElanKey %ws\n", pAdapt, pVElanKey->Buffer)); do @@ -1788,9 +1788,9 @@ Return Value: break; } } - + pVElan = NULL; - + if (pVElanKey != NULL) { pVElan = PtAllocateAndInitializeVElan(pAdapt, pVElanKey); @@ -1824,9 +1824,9 @@ Return Value: pVElan = NULL; break; } - + PtDereferenceVElan(pVElan,(UCHAR*) "CreatVelan"); - + } while (FALSE); @@ -1871,7 +1871,7 @@ Return Value: do { Length = sizeof(VELAN) + pVElanKey->Length + sizeof(WCHAR); - + // // Allocate a VELAN data structure. // @@ -1890,27 +1890,27 @@ Return Value: NdisZeroMemory(pVElan, Length); NdisInitializeListHead(&pVElan->Link); NdisInitializeListHead(&pVElan->GlobalLink); - + // // Initialize the built-in request structure to signify // that it is used to forward NDIS requests. // pVElan->Request.pVElan = pVElan; NdisInitializeEvent(&pVElan->Request.Event); - + // // Store in the key name. // pVElan->CfgDeviceName.Length = 0; - pVElan->CfgDeviceName.Buffer = (PWCHAR)((PUCHAR)pVElan + - sizeof(VELAN)); - pVElan->CfgDeviceName.MaximumLength = + pVElan->CfgDeviceName.Buffer = (PWCHAR)((PUCHAR)pVElan + + sizeof(VELAN)); + pVElan->CfgDeviceName.MaximumLength = pVElanKey->Length + sizeof(WCHAR); (VOID)NdisUpcaseUnicodeString(&pVElan->CfgDeviceName, pVElanKey); pVElan->CfgDeviceName.Buffer[pVElanKey->Length/sizeof(WCHAR)] = ((WCHAR)0); - // + // // Initialize LastIndicatedStatus to media connect // pVElan->LastIndicatedStatus = NDIS_STATUS_LINK_STATE; @@ -1962,7 +1962,7 @@ Return Value: #ifdef IEEE_VLAN_SUPPORT // // Allocate lookaside list for tag headers. - // + // NdisInitializeNPagedLookasideList ( &pVElan->TagLookaside, NULL, @@ -1974,9 +1974,9 @@ Return Value: #endif // - // Finally link this VELAN to the Adapter's VELAN list. + // Finally link this VELAN to the Adapter's VELAN list. // - PtReferenceVElan(pVElan, (PUCHAR)"adapter"); + PtReferenceVElan(pVElan, (PUCHAR)"adapter"); MUX_ACQUIRE_ADAPT_WRITE_LOCK(pAdapt, &LockState); @@ -1989,7 +1989,7 @@ Return Value: MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); NdisAcquireSpinLock(&GlobalLock); - InsertTailList(&VElanList, &pVElan->GlobalLink); + InsertTailList(&VElanList, &pVElan->GlobalLink); NdisReleaseSpinLock(&GlobalLock);; } while (FALSE); @@ -2034,7 +2034,7 @@ Return Value: NdisFreeSpinLock(&pVElan->PauseLock); #ifdef IEEE_VLAN_SUPPORT - NdisDeleteNPagedLookasideList(&pVElan->TagLookaside); + NdisDeleteNPagedLookasideList(&pVElan->TagLookaside); #endif NdisFreeMemory(pVElan, 0, 0); @@ -2056,11 +2056,11 @@ Routine Description: ASSUMPTION: this is only called in the context of unbinding from the underlying miniport. If it may be called from elsewhere, this should protect itself from re-entrancy. - + Arguments: pVElan - Pointer to VELAN to be stopped. - + Return Value: None @@ -2151,16 +2151,16 @@ Return Value: } else { - if (bMiniportInitCancelled || + if (bMiniportInitCancelled || ((MiniportAdapterHandle == NULL) && !pVElan->MiniportHalting)) { - + // // No NDIS events can come to this VELAN since it // was never initialized as a miniport. We need to unlink // it explicitly here. // - PtUnlinkVElanFromAdapter(pVElan); + PtUnlinkVElanFromAdapter(pVElan); } } @@ -2177,18 +2177,18 @@ PtUnlinkVElanFromAdapter( Routine Description: Utility routine to unlink a VELAN from its parent ADAPT structure. - + Arguments: pVElan - Pointer to VELAN to be unlinked. - + Return Value: None --*/ { - PADAPT pAdapt = pVElan->pAdapt; + PADAPT pAdapt = pVElan->pAdapt; LOCK_STATE LockState; DBGPRINT(MUX_LOUD, ("==> PtUnlinkVElanFromAdapter: VELAN %p, Adapt %p\n", pVElan, pAdapt)); @@ -2198,7 +2198,7 @@ Return Value: // // Remove this VELAN from the global list // - + NdisAcquireSpinLock(&GlobalLock); RemoveEntryList(&pVElan->GlobalLink); NdisReleaseSpinLock(&GlobalLock); @@ -2210,7 +2210,7 @@ Return Value: RemoveEntryList(&pVElan->Link); pAdapt->VElanCount--; - + MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); pVElan->pAdapt = NULL; PtDereferenceVElan(pVElan, (PUCHAR)"adapter"); @@ -2239,7 +2239,7 @@ Routine Description: Return Value: Pointer to matching VELAN or NULL if not found. - + --*/ { PLIST_ENTRY p; @@ -2250,7 +2250,7 @@ Return Value: ASSERT_AT_PASSIVE(); - DBGPRINT(MUX_LOUD, ("==> PtFindElan: Adapter %p, ElanKey %ws\n", pAdapt, + DBGPRINT(MUX_LOUD, ("==> PtFindElan: Adapter %p, ElanKey %ws\n", pAdapt, pVElanKey->Buffer)); pVElan = NULL; @@ -2262,8 +2262,8 @@ Return Value: // // Make an up-cased copy of the given string. // - VElanKeyName.Buffer = NdisAllocateMemoryWithTagPriority(pAdapt->BindingHandle, - pVElanKey->MaximumLength, + VElanKeyName.Buffer = NdisAllocateMemoryWithTagPriority(pAdapt->BindingHandle, + pVElanKey->MaximumLength, MUX_TAG, LowPoolPriority); if (VElanKeyName.Buffer == NULL) @@ -2288,13 +2288,13 @@ Return Value: pVElan = CONTAINING_RECORD(p, VELAN, Link); if ((VElanKeyName.Length == pVElan->CfgDeviceName.Length) && - (memcmp(VElanKeyName.Buffer, pVElan->CfgDeviceName.Buffer, + (memcmp(VElanKeyName.Buffer, pVElan->CfgDeviceName.Buffer, VElanKeyName.Length) == 0)) { Found = TRUE; break; } - + p = p->Flink; } @@ -2314,7 +2314,7 @@ Return Value: NdisFreeMemory(VElanKeyName.Buffer, VElanKeyName.Length, 0); } - DBGPRINT(MUX_LOUD, ("<== PtFindElan: Adapter %p, ElanKey %ws, VElan %p\n", pAdapt, + DBGPRINT(MUX_LOUD, ("<== PtFindElan: Adapter %p, ElanKey %ws, VElan %p\n", pAdapt, pVElanKey->Buffer, pVElan)); return pVElan; } @@ -2324,7 +2324,7 @@ NDIS_STATUS PtBootStrapVElans( IN PADAPT pAdapt, IN PNDIS_STRING InstanceName OPTIONAL - + ) /*++ @@ -2348,7 +2348,7 @@ Return Value: NDIS_STRING DeviceStr = NDIS_STRING_CONST("UpperBindings"); PWSTR buffer; LOCK_STATE LockState; - NDIS_CONFIGURATION_OBJECT ConfigObject; + NDIS_CONFIGURATION_OBJECT ConfigObject; DBGPRINT(MUX_LOUD, ("==> PtBootStrapElans: adapter %p\n", pAdapt)); // @@ -2356,7 +2356,7 @@ Return Value: // Status = NDIS_STATUS_SUCCESS; AdapterConfigHandle = NULL; - + do { DBGPRINT(MUX_LOUD, ("PtBootStrapElans: Starting ELANs on adapter %p\n", pAdapt)); @@ -2380,12 +2380,12 @@ Return Value: DBGPRINT(MUX_ERROR, ("PtBootStrapElans: OpenProtocolConfiguration failed\n")); Status = NDIS_STATUS_OPEN_FAILED; break; - } + } // // Read the "UpperBindings" reserved key that contains a list // of device names representing our miniport instances corresponding - // to this lower binding. The UpperBindings is a + // to this lower binding. The UpperBindings is a // MULTI_SZ containing a list of device names. We will loop through // this list and initialize the virtual miniports. // @@ -2408,7 +2408,7 @@ Return Value: while(*buffer != L'\0') { NDIS_STRING DeviceName; - + NdisInitUnicodeString(&DeviceName, buffer); if (InstanceName != NULL) @@ -2422,7 +2422,7 @@ Return Value: else { - Status = PtCreateAndStartVElan(pAdapt, &DeviceName); + Status = PtCreateAndStartVElan(pAdapt, &DeviceName); } if (NDIS_STATUS_SUCCESS != Status) { @@ -2431,19 +2431,19 @@ Return Value: } buffer = (PWSTR)((PUCHAR)buffer + DeviceName.Length + sizeof(WCHAR)); }; - + } while (FALSE); // // Close config handles - // + // if (NULL != AdapterConfigHandle) { NdisCloseConfiguration(AdapterConfigHandle); } // // If the driver cannot create any velan for the adapter - // + // if (Status != NDIS_STATUS_SUCCESS) { MUX_ACQUIRE_ADAPT_WRITE_LOCK(pAdapt, &LockState); @@ -2455,10 +2455,10 @@ Return Value: Status = NDIS_STATUS_SUCCESS; } MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); - } - + } + DBGPRINT(MUX_LOUD, ("<== PtBootStrapElans: adapter %p, Status %8x\n", pAdapt, Status)); - + return Status; } @@ -2484,7 +2484,7 @@ Return Value: --*/ { - + NdisInterlockedIncrement((PLONG)&pVElan->RefCount); #if !DBG @@ -2506,7 +2506,7 @@ PtDereferenceVElan( Routine Description: - Subtract a reference from an VElan structure. + Subtract a reference from an VElan structure. If the reference count becomes zero, deallocate it. Arguments: @@ -2534,13 +2534,13 @@ Return Value: { // // Free memory if there is no outstanding reference. - // Note: Length field is not required if the memory + // Note: Length field is not required if the memory // is allocated with NdisAllocateMemoryWithTagPriority. // PtDeallocateVElan(pVElan); } - - DBGPRINT(MUX_LOUD, ("DereferenceElan: VElan %p (%s) new count %d\n", + + DBGPRINT(MUX_LOUD, ("DereferenceElan: VElan %p (%s) new count %d\n", pVElan, String, rc)); return (rc); } @@ -2567,13 +2567,13 @@ Return Value: --*/ { - + #if !DBG UNREFERENCED_PARAMETER(String); #endif NdisInterlockedIncrement((PLONG)&pAdapt->RefCount); - + DBGPRINT(MUX_LOUD, ("ReferenceAdapter: Adapter %p (%s) new count %d\n", pAdapt, String, pAdapt->RefCount)); @@ -2589,7 +2589,7 @@ PtDereferenceAdapter( Routine Description: - Subtract a reference from an Adapter structure. + Subtract a reference from an Adapter structure. If the reference count becomes zero, deallocate it. Arguments: @@ -2618,20 +2618,20 @@ Return Value: { // // Free memory if there is no outstanding reference. - // Note: Length field is not required if the memory + // Note: Length field is not required if the memory // is allocated with NdisAllocateMemoryWithTagPriority. // NdisFreeMemory(pAdapt, 0, 0); } - DBGPRINT(MUX_LOUD, ("DereferenceAdapter: Adapter %p (%s) new count %d\n", + DBGPRINT(MUX_LOUD, ("DereferenceAdapter: Adapter %p (%s) new count %d\n", pAdapt, String, rc)); return (rc); } -VOID +VOID PtReceiveNBL( IN NDIS_HANDLE ProtocolBindingContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -2642,7 +2642,7 @@ PtReceiveNBL( /*++ Routine Description: - ReceiveNetBufferList handler. + ReceiveNetBufferList handler. Arguments: ProtocolBindingContext Pointer to our PADAPT structure @@ -2673,12 +2673,12 @@ NOTE: This receive code path is not efficient, we will optimize it later. UCHAR Data[6]={0,0,0,0,0,0}; //BOOLEAN DispatchLevel; BOOLEAN bReturnNbl; - + #ifdef IEEE_VLAN_SUPPORT NDIS_STATUS NdisStatus; NDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo; BOOLEAN bAllocatedContext; - PRECV_NBL_ENTRY RecvContext; + PRECV_NBL_ENTRY RecvContext; #endif UNREFERENCED_PARAMETER(NumberOfNetBufferLists); @@ -2702,20 +2702,20 @@ NOTE: This receive code path is not efficient, we will optimize it later. // Return immediately if (pAdapt->PacketFilter == 0) - { + { if (NDIS_TEST_RECEIVE_CAN_PEND(ReceiveFlags) == TRUE) { NdisReturnNetBufferLists(pAdapt->BindingHandle, NetBufferLists, ReturnFlags); - } + } return; } while (NetBufferLists != NULL) { CurrentNetBufferList = NetBufferLists; - + NetBufferLists = NET_BUFFER_LIST_NEXT_NBL(NetBufferLists); NET_BUFFER_LIST_NEXT_NBL(CurrentNetBufferList) = NULL; @@ -2729,7 +2729,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. do { // Collect some information about the packet - pDstMac = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(CurrentNetBufferList), + pDstMac = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(CurrentNetBufferList), 6, (PVOID)Data, 1, @@ -2747,7 +2747,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. bIsBroadcast = ETH_IS_BROADCAST(pDstMac); #ifdef IEEE_VLAN_SUPPORT - // + // // Create Receive context to save information about tag // NdisStatus = NdisAllocateNetBufferListContext(CurrentNetBufferList, @@ -2761,8 +2761,8 @@ NOTE: This receive code path is not efficient, we will optimize it later. bAllocatedContext = TRUE; - RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(CurrentNetBufferList); - NdisZeroMemory(RecvContext, sizeof(RECV_NBL_ENTRY)); + RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(CurrentNetBufferList); + NdisZeroMemory(RecvContext, sizeof(RECV_NBL_ENTRY)); // // Strip off the VLAN Tag if present @@ -2772,7 +2772,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. // // If the VLAN tag is not present in the buffer, ignore this NBL // - DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p size < VLAN_TAG_HEADER_SIZE\n",CurrentNetBufferList)); + DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p size < VLAN_TAG_HEADER_SIZE\n",CurrentNetBufferList)); break; } @@ -2780,21 +2780,21 @@ NOTE: This receive code path is not efficient, we will optimize it later. { // // If the VLAN info is already in the NBL, take this information it - // - DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p already has Ieee8021QNetBufferListInfo\n",CurrentNetBufferList)); - - RtlCopyMemory((PVOID UNALIGNED) &NdisPacket8021qInfo, &NET_BUFFER_LIST_INFO(CurrentNetBufferList, Ieee8021QNetBufferListInfo),sizeof(NdisPacket8021qInfo)); + // + DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p already has Ieee8021QNetBufferListInfo\n",CurrentNetBufferList)); + + RtlCopyMemory((PVOID UNALIGNED) &NdisPacket8021qInfo, &NET_BUFFER_LIST_INFO(CurrentNetBufferList, Ieee8021QNetBufferListInfo),sizeof(NdisPacket8021qInfo)); } else { - NdisStatus = PtStripVlanTagNB(CurrentNetBufferList, &NdisPacket8021qInfo, RecvContext); + NdisStatus = PtStripVlanTagNB(CurrentNetBufferList, &NdisPacket8021qInfo, RecvContext); if (NdisStatus != NDIS_STATUS_SUCCESS) { break; } } -#endif +#endif // Lock down the VLAN list on the adapter so that no insertions // deletions to this list happen while we loop through it. The packet @@ -2833,7 +2833,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. MUX_DECR_PENDING_RECEIVES(pVElan); continue; } - + NdisAcquireSpinLock(&pVElan->PauseLock); if (!pVElan->Paused) @@ -2894,7 +2894,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. } else { - NdisReleaseSpinLock(&pVElan->PauseLock); + NdisReleaseSpinLock(&pVElan->PauseLock); MUX_DECR_PENDING_RECEIVES(pVElan); } @@ -2906,7 +2906,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. if (bReturnNbl == TRUE) { -#ifdef IEEE_VLAN_SUPPORT +#ifdef IEEE_VLAN_SUPPORT // // Free the context only if we are returning the NBL here. // Otherwise MPReturnNetBufferLists will free it. @@ -2914,9 +2914,9 @@ NOTE: This receive code path is not efficient, we will optimize it later. if (bAllocatedContext) { NdisFreeNetBufferListContext(CurrentNetBufferList, - sizeof(RECV_NBL_ENTRY)); + sizeof(RECV_NBL_ENTRY)); } -#endif +#endif // // The NetBufferList is not pending with any upper protocol. @@ -2933,7 +2933,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. { NET_BUFFER_LIST_NEXT_NBL(LastReturnNetBufferList) = CurrentNetBufferList; } - + LastReturnNetBufferList = CurrentNetBufferList; NET_BUFFER_LIST_NEXT_NBL(LastReturnNetBufferList) = NULL; } @@ -2958,7 +2958,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. } -VOID +VOID PtSendNBLComplete( IN NDIS_HANDLE ProtocolBindingContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -2996,7 +2996,7 @@ Return Value: ProtocolBindingContext,NetBufferLists)); DispatchLevel = NDIS_TEST_SEND_COMPLETE_AT_DISPATCH_LEVEL(SendCompleteFlags); - + while(NetBufferLists) { CurrentNetBufferList = NetBufferLists; @@ -3019,12 +3019,12 @@ Return Value: sizeof(IM_NBL_ENTRY)); #ifdef IEEE_VLAN_SUPPORT - + if ((Flags & MUX_RETREAT_DATA) != 0) { - MPRestoreSendNBL(pVElan, - CurrentNetBufferList, - NULL, + MPRestoreSendNBL(pVElan, + CurrentNetBufferList, + NULL, MdlAllocatedNetBuffers); } @@ -3043,7 +3043,7 @@ Return Value: CurrentNetBufferList, SendCompleteFlags); - + MUX_DECR_PENDING_SENDS(pVElan); MUX_ACQUIRE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); @@ -3056,14 +3056,14 @@ Return Value: } MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + } DBGPRINT(MUX_VERY_LOUD,("<== PtSendNBLComplete: ProtocolBindingContext %p, NetBufferLists %p\n",ProtocolBindingContext,NetBufferLists)); } #ifdef IEEE_VLAN_SUPPORT -NDIS_STATUS +NDIS_STATUS PtHandleReceiveTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, @@ -3081,7 +3081,7 @@ Routine Description: Arguments: pVElan Pointer to the VELAN structure NetBufferList Pointer to the indicated packet from the lower miniport - NdisPacket8021qInfo 802.1Q tag information + NdisPacket8021qInfo 802.1Q tag information Return Value: NDIS_STATUS_SUCCESS @@ -3101,9 +3101,9 @@ Return Value: DBGPRINT(MUX_VERY_LOUD,("==> PtHandleReceiveTaggingNB: VElan %p, NetBufferList %p, NdisPacket8021qInfo %p\n",pVElan,NetBufferList, NdisPacket8021qInfo)); do { - RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); - RecvContext->Flags = 0; - + RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); + RecvContext->Flags = 0; + // // If the vlan ID of the virtual miniport is 0, the miniport should // act like it doesn't support VELAN tag processing @@ -3144,7 +3144,7 @@ Return Value: MUX_INCR_STATISTICS(&pVElan->RcvVlanIdErrors); break; - } + } Storage=NULL; pFrame = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(NetBufferList), 2 * ETH_LENGTH_OF_ADDRESS + VLAN_TAG_HEADER_SIZE, @@ -3158,9 +3158,9 @@ Return Value: Status = NDIS_STATUS_INVALID_PACKET; break; } - + pTpid = (USHORT UNALIGNED *)((PUCHAR)pFrame + 2 * ETH_LENGTH_OF_ADDRESS); - + // //Strip header only if it's present in the packet // @@ -3175,8 +3175,8 @@ Return Value: RtlMoveMemory(pDst, pFrame, 2 * ETH_LENGTH_OF_ADDRESS); - NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = NdisPacket8021qInfo->Value; - + NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = NdisPacket8021qInfo->Value; + NdisAdvanceNetBufferDataStart(NET_BUFFER_LIST_FIRST_NB(NetBufferList), VLAN_TAG_HEADER_SIZE, FALSE, @@ -3189,7 +3189,7 @@ Return Value: return Status; } -NDIS_STATUS +NDIS_STATUS PtStripVlanTagNB( IN PNET_BUFFER_LIST NetBufferList, OUT PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo, @@ -3218,7 +3218,7 @@ Return Value: PVOID pFrame = NULL; NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PVOID Storage; - + DBGPRINT(MUX_VERY_LOUD,("==> PtStripVlanTagNB: NetBufferList %p, NdisPacket8021qInfo %p\n",NetBufferList, NdisPacket8021qInfo)); do @@ -3254,14 +3254,14 @@ Return Value: COPY_TAG_INFO_FROM_HEADER_TO_PACKET_INFO(*NdisPacket8021qInfo, pTagHeader); RtlCopyMemory((PVOID UNALIGNED) &RecvContext->TagHeader, pTagHeader, 2); - + } while(FALSE); DBGPRINT(MUX_VERY_LOUD,("<== PtStripVlanTagNB: NetBufferList %p, NdisPacket8021qInfo %p, Status %8x\n",NetBufferList, NdisPacket8021qInfo, Status)); return Status; } -NDIS_STATUS +NDIS_STATUS PtRestoreReceiveNBL( IN PNET_BUFFER_LIST NetBufferList ) @@ -3288,7 +3288,7 @@ Return Value: do { - ReceiveNblEntry = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); + ReceiveNblEntry = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); // // Check ifthe NBL was modified @@ -3297,7 +3297,7 @@ Return Value: { break; } - + // // Retreat the net buffer list // @@ -3310,10 +3310,10 @@ Return Value: { break; } - + // // Find the start address of the frame - // + // Storage=NULL; pFrame = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(NetBufferList), 2 * ETH_LENGTH_OF_ADDRESS + VLAN_TAG_HEADER_SIZE, @@ -3325,7 +3325,7 @@ Return Value: { ASSERT(0); Status = NDIS_STATUS_INVALID_PACKET; - break; + break; } // @@ -3333,13 +3333,13 @@ Return Value: // original state // Tpid = TPID; - + NdisMoveMemory(pFrame, pFrame + VLAN_TAG_HEADER_SIZE, (2 * ETH_LENGTH_OF_ADDRESS)); - + NdisMoveMemory(pFrame + (2 * ETH_LENGTH_OF_ADDRESS), &Tpid, 2); - + NdisMoveMemory(pFrame + (2 * ETH_LENGTH_OF_ADDRESS) + sizeof(Tpid), &ReceiveNblEntry->TagHeader, 2); - + NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = 0; } while (FALSE); diff --git a/network/ndis/mux/driver/60/public.h b/network/ndis/mux/driver/60/public.h index 972939c76..ddf13b240 100644 --- a/network/ndis/mux/driver/60/public.h +++ b/network/ndis/mux/driver/60/public.h @@ -12,7 +12,7 @@ Module Name: Author: - + Environment: user and kernel diff --git a/network/ndis/mux/notifyob/adapter.cpp b/network/ndis/mux/notifyob/adapter.cpp index a208aa576..99bfe6e80 100644 --- a/network/ndis/mux/notifyob/adapter.cpp +++ b/network/ndis/mux/notifyob/adapter.cpp @@ -114,7 +114,7 @@ CMuxPhysicalAdapter::~CMuxPhysicalAdapter (VOID) // // Function: CMuxPhysicalAdapter::LoadConfiguration // -// Purpose: Read the registry to get the device IDs of the +// Purpose: Read the registry to get the device IDs of the // virtual miniports installed on the adapter and // crate an instance to represent each virtual miniport. // @@ -142,7 +142,7 @@ HRESULT CMuxPhysicalAdapter::LoadConfiguration (VOID) TraceMsg( L"-->CMuxPhysicalAdapter::LoadConfiguration.\n" ); // - // Build the registry key using the adapter guid under which + // Build the registry key using the adapter guid under which // device IDs of the virtual miniports are stored. // @@ -159,7 +159,7 @@ HRESULT CMuxPhysicalAdapter::LoadConfiguration (VOID) L"%s\\%s", c_szAdapterList, szAdapterGuid ); - + szAdapterGuidKey[MAX_PATH]='\0'; lResult = RegCreateKeyExW( HKEY_LOCAL_MACHINE, szAdapterGuidKey, @@ -211,14 +211,14 @@ HRESULT CMuxPhysicalAdapter::LoadConfiguration (VOID) if ( lResult == ERROR_SUCCESS ) { lpMiniport = lpMiniportList; - + #ifndef PASSTHRU_NOTIFY // // In case of mux, c_szUpperBindings is a REG_MULTI_SZ string. // - + lpMiniport[dwBytes-1] = '\0'; while ( wcslen(lpMiniport) ) { @@ -510,14 +510,14 @@ HRESULT CMuxPhysicalAdapter::Remove (VOID) // // Arguments: // IN eApplyAction: Action that was last performed. -// +// // // Returns: S_OK. // // Notes: // More than one action could have been performed by the user // but this function is called only once at the end. So, the argument -// only denotes the very last action performed. For example, if the +// only denotes the very last action performed. For example, if the // user deletes one miniport and adds two miniports then, the argument // will denote an add action. // @@ -705,14 +705,14 @@ HRESULT CMuxPhysicalAdapter::ApplyRegistryChanges (ConfigAction eApplyAction) // Arguments: // IN pfCallback : SendPnpConfig Callback interface. // IN eApplyAction: Action that was last performed. -// +// // // Returns: S_OK. // // Notes: // More than one action could have been performed by the user // but this function is called only once at the end. So, the argument -// only denotes the very last action performed. For example, if the +// only denotes the very last action performed. For example, if the // user deletes one miniport and adds two miniports then, the argument // will denote an add action. // @@ -727,7 +727,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( DWORD i; HRESULT hr; -#ifdef CUSTOM_EVENTS +#ifdef CUSTOM_EVENTS LPWSTR lpDevice; WCHAR szMiniportGuid[MAX_PATH+1]; DWORD dwBytes; @@ -739,7 +739,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( UNREFERENCED_PARAMETER(eApplyAction); TraceMsg( L"-->CMuxPhysicalAdapter::ApplyPnpChanges.\n" ); -#ifdef CUSTOM_EVENTS +#ifdef CUSTOM_EVENTS // // Find the instance of the adapter to get its bindname. @@ -767,7 +767,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( hr ); } -#endif +#endif dwMiniportCount = m_MiniportsToAdd.ListCount(); @@ -848,7 +848,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( } free( lpDevice ); } -#endif +#endif } dwMiniportCount = m_MiniportsToRemove.ListCount(); @@ -935,11 +935,11 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( free( lpDevice ); } } -#endif +#endif } -#ifdef CUSTOM_EVENTS +#ifdef CUSTOM_EVENTS CoTaskMemFree( lpszBindName ); #endif @@ -956,7 +956,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( // Purpose: Cancel any changes made. // // Arguments: None -// +// // // Returns: S_OK. // @@ -980,7 +980,7 @@ HRESULT CMuxPhysicalAdapter::CancelChanges (VOID) // Purpose: Find out if there is no miniport installed on the adapter. // // Arguments: None -// +// // // Returns: TRUE if all the miniports associated with this adapter have been // uninstalled and there is none pending to be added, otherwise FALSE. diff --git a/network/ndis/mux/notifyob/common.cpp b/network/ndis/mux/notifyob/common.cpp index 5ca2ca7f7..671d08f5b 100644 --- a/network/ndis/mux/notifyob/common.cpp +++ b/network/ndis/mux/notifyob/common.cpp @@ -103,8 +103,8 @@ void DumpBindingPath (INetCfgBindingPath *pncbp) IEnumNetCfgBindingInterface *pencbi; INetCfgBindingInterface *pncbi; DWORD dwIndex; - ULONG ulCount; -#endif + ULONG ulCount; +#endif hr = pncbp->GetPathToken( &lpsz ); @@ -190,9 +190,9 @@ void DumpBindingPath (INetCfgBindingPath *pncbp) else { TraceMsg( L" EnumBindingInterfaces failed, (HRESULT = %x)\n", - hr ); + hr ); } -#endif +#endif return; } @@ -203,7 +203,7 @@ void DumpComponent (INetCfgComponent *pncc) ULONG ulStatus; HRESULT hr; hr = pncc->GetDisplayName( &lpsz ); - + if ( hr == S_OK ) { TraceMsg( L" \t\tComponent: %s\n", @@ -393,7 +393,7 @@ HRESULT HrFindInstance (INetCfg *pnc, *ppnccMiniport = pncc; } } - } + } ReleaseObj( pencc ); } @@ -552,14 +552,14 @@ DeleteFromMultiSzValue ( lpCurrentValueTemp[dwLen-1]='\0'; while( wcslen(lpCurrentValueTemp) > 0) { - //if a register in the existing register sequence do not match szMiniportGuid, copy to new register sequence + //if a register in the existing register sequence do not match szMiniportGuid, copy to new register sequence if ( _wcsicmp(lpCurrentValueTemp, szMiniportGuid) != 0 ) { StringCchCopyW ( lpNewValueTemp, wcslen(lpCurrentValueTemp), //size of the register lpCurrentValueTemp ); - + *(lpNewValueTemp+=wcslen(lpCurrentValueTemp)+1)='\0'; - + lpNewValueTemp += wcslen(lpNewValueTemp) + 1; dwNewLen += (DWORD)wcslen(lpNewValueTemp) + 1; } @@ -605,7 +605,7 @@ AddDevicePrefix ( LPWSTR lpNewStr; size_t cchNewStr = wcslen(lpStr) + wcslen(c_szDevicePrefix) + 1; - lpNewStr = (LPWSTR)malloc( cchNewStr * sizeof(WCHAR) ); + lpNewStr = (LPWSTR)malloc( cchNewStr * sizeof(WCHAR) ); if ( lpNewStr ) { StringCchCopyW (lpNewStr, diff --git a/network/ndis/mux/notifyob/common.h b/network/ndis/mux/notifyob/common.h index 517641f78..4e6896ca1 100644 --- a/network/ndis/mux/notifyob/common.h +++ b/network/ndis/mux/notifyob/common.h @@ -27,14 +27,14 @@ enum ConfigAction { - eActUnknown, - eActInstall, - eActAdd, + eActUnknown, + eActInstall, + eActAdd, eActRemove, eActUpdate, eActPropertyUIAdd, eActPropertyUIRemove -}; +}; // // PnP ID, also referred to as Hardware ID, of the protocol interface. diff --git a/network/ndis/mux/notifyob/dllmain.cpp b/network/ndis/mux/notifyob/dllmain.cpp index 636f2c8ad..e91c1d747 100644 --- a/network/ndis/mux/notifyob/dllmain.cpp +++ b/network/ndis/mux/notifyob/dllmain.cpp @@ -80,7 +80,7 @@ STDAPI DllCanUnloadNow(void) TraceMsg( L"-->DllCanUnloadNow(HRESULT = %x).\n", hr ); - return hr; + return hr; } ///////////////////////////////////////////////////////////////////////////// diff --git a/network/ndis/mux/notifyob/list.h b/network/ndis/mux/notifyob/list.h index b52b75e7d..0ba64b452 100644 --- a/network/ndis/mux/notifyob/list.h +++ b/network/ndis/mux/notifyob/list.h @@ -5,7 +5,7 @@ // // File: LIST . H // -// Contents: +// Contents: // // Notes: List manipulation functions. // @@ -20,7 +20,7 @@ #include -template class List { +template class List { struct Node { X item; Y key; @@ -107,7 +107,7 @@ template HRESULT List::Remove (X *item) return S_OK; } - + template HRESULT List::RemoveThis (X item) { Node *temp; diff --git a/network/ndis/mux/notifyob/notify.RC b/network/ndis/mux/notifyob/notify.RC index 4888e3058..78a8eb95c 100644 --- a/network/ndis/mux/notifyob/notify.RC +++ b/network/ndis/mux/notifyob/notify.RC @@ -19,7 +19,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "Remove a Miniport",IDC_REMOVE,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,39,73,75,10 - CONTROL "Add a Miniport",IDC_ADD,"Button",BS_AUTORADIOBUTTON | + CONTROL "Add a Miniport",IDC_ADD,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,36,61,10 LTEXT "Removal of miniport happens in FIFO order",IDC_STATIC, 39,93,135,8 diff --git a/network/ndis/mux/notifyob/notify.cpp b/network/ndis/mux/notifyob/notify.cpp index 3d0a55ff9..542e12e10 100644 --- a/network/ndis/mux/notifyob/notify.cpp +++ b/network/ndis/mux/notifyob/notify.cpp @@ -6,7 +6,7 @@ // File: N O T I F Y . C P P // // Contents: Sample notify object code -// +// // Notes: // // Author: Alok Sinha @@ -103,10 +103,10 @@ CMuxNotify::~CMuxNotify (VOID) // //---------------------------------------------------------------------------- -// INetCfgComponentControl -// +// INetCfgComponentControl +// // The following functions provide the INetCfgComponentControl interface. -// +// //---------------------------------------------------------------------------- // @@ -125,7 +125,7 @@ CMuxNotify::~CMuxNotify (VOID) // STDMETHODIMP CMuxNotify::Initialize (INetCfgComponent* pncc, - INetCfg* pnc, + INetCfg* pnc, BOOL fInstalling) { HRESULT hr = S_OK; @@ -150,7 +150,7 @@ STDMETHODIMP CMuxNotify::Initialize (INetCfgComponent* pncc, // - // If this not an installation, then we need to + // If this not an installation, then we need to // initialize all of our data and classes // @@ -222,7 +222,7 @@ STDMETHODIMP CMuxNotify::ApplyRegistryChanges(VOID) m_AdaptersToAdd.Find( i, &pAdapter ); - + pAdapter->ApplyRegistryChanges( eActAdd ); } @@ -240,7 +240,7 @@ STDMETHODIMP CMuxNotify::ApplyRegistryChanges(VOID) m_AdaptersToRemove.Find( i, &pAdapter ); - + pAdapter->ApplyRegistryChanges( eActRemove ); } @@ -276,7 +276,7 @@ STDMETHODIMP CMuxNotify::ApplyRegistryChanges(VOID) // // Returns: S_OK. // -// Notes: +// Notes: STDMETHODIMP CMuxNotify::ApplyPnpChanges ( INetCfgPnpReconfigCallback* pfCallback) @@ -353,10 +353,10 @@ STDMETHODIMP CMuxNotify::ApplyPnpChanges ( //---------------------------------------------------------------------------- -// INetCfgComponentSetup -// +// INetCfgComponentSetup +// // The following functions provide the INetCfgComponentSetup interface. -// +// //---------------------------------------------------------------------------- // ---------------------------------------------------------------------- @@ -445,7 +445,7 @@ STDMETHODIMP CMuxNotify::ReadAnswerFile (PCWSTR pszAnswerFile, UNREFERENCED_PARAMETER(pszAnswerFile); UNREFERENCED_PARAMETER(pszAnswerSection); - + TraceMsg( L"-->CMuxNotify INetCfgSetup::ReadAnswerFile.\n" ); // We will pretend here that szParamReadFromAnswerFile was actually @@ -498,20 +498,20 @@ STDMETHODIMP CMuxNotify::Removing (VOID) //---------------------------------------------------------------------------- -// INetCfgComponentNotifyBinding -// +// INetCfgComponentNotifyBinding +// // The following functions provide the INetCfgComponentNotifyBinding interface. -// +// //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // // Function: CMuxNotify::QueryBindingPath // -// Purpose: This is specific to the component being installed. This will +// Purpose: This is specific to the component being installed. This will // ask us if we want to bind to the Item being passed into // this routine. We can disable the binding by returning -// NETCFG_S_DISABLE_QUERY +// NETCFG_S_DISABLE_QUERY // // // Arguments: @@ -522,7 +522,7 @@ STDMETHODIMP CMuxNotify::Removing (VOID) // // Notes: // -STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, +STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, IN INetCfgBindingPath *pncbp) { UNREFERENCED_PARAMETER(pncbp); @@ -543,7 +543,7 @@ STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, // // Function: CMuxNotify::NotifyBindingPath // -// Purpose: We are now being told to bind to the component passed to us. +// Purpose: We are now being told to bind to the component passed to us. // // // Arguments: @@ -557,7 +557,7 @@ STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, -STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, +STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, IN INetCfgBindingPath *pncbp) { INetCfgComponent *pnccLower; @@ -608,7 +608,7 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, // // We are interested only in binding to a // physical ethernet adapters. - // + // if ( dwCharcteristics & NCF_PHYSICAL ) { @@ -631,7 +631,7 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, m_eApplyAction = eActRemove; } } - } // Physical Adapters. + } // Physical Adapters. else if (dwCharcteristics & NCF_VIRTUAL) { } @@ -651,7 +651,7 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, } // Got the upper and lower components. - } + } TraceMsg( L"<--CMuxNotify INetCfgNotifyBinding::NotifyBindingPath(HRESULT = %x).\n", S_OK ); @@ -664,9 +664,9 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, //---------------------------------------------------------------------------- // INetCfgComponentNotifyGlobal -// +// // The following functions provide the INetCfgComponentNotifyGlobal interface. -// +// //---------------------------------------------------------------------------- // ---------------------------------------------------------------------- @@ -749,9 +749,9 @@ STDMETHODIMP CMuxNotify::SysQueryBindingPath (DWORD dwChangeFlag, if ( hr == S_OK ) { // - // We are interested only in bindings to physical + // We are interested only in bindings to physical // ethernet adapters. - // + // if ( dwCharcteristics & NCF_PHYSICAL ) { @@ -774,7 +774,7 @@ STDMETHODIMP CMuxNotify::SysQueryBindingPath (DWORD dwChangeFlag, } #endif - } // Physical Adapters. + } // Physical Adapters. else { if (dwCharcteristics & NCF_VIRTUAL) { @@ -784,7 +784,7 @@ STDMETHODIMP CMuxNotify::SysQueryBindingPath (DWORD dwChangeFlag, if ( !_wcsicmp(pszwInfIdLower, c_szMuxMiniport) && !_wcsicmp(pszwInfIdUpper, c_szMuxProtocol) ) { - + TraceMsg( L" Disabling the binding between %s " L"and %s.\n", pszwInfIdUpper, @@ -886,10 +886,10 @@ STDMETHODIMP CMuxNotify::SysNotifyComponent (DWORD dwChangeFlag, //---------------------------------------------------------------------------- -// INetCfgComponentPropertyUi -// +// INetCfgComponentPropertyUi +// // The following functions provide the INetCfgComponentPropertyUi interface. -// +// //---------------------------------------------------------------------------- // ---------------------------------------------------------------------- @@ -1034,7 +1034,7 @@ STDMETHODIMP CMuxNotify::CancelProperties (VOID) // // Returns: S_OK on success, otherwise an error code // -// Notes: +// Notes: // STDMETHODIMP CMuxNotify::ApplyProperties (VOID) { @@ -1118,7 +1118,7 @@ STDMETHODIMP CMuxNotify::QueryPropertyUi (IUnknown * pUnk) reinterpret_cast(&pLanConnUiInfo)); ReleaseObj( pLanConnUiInfo ); - } + } #endif TraceMsg(L"<--CMuxNotify INetCfgPropertyUi::QueryPropertyUi(HRESULT = %x).\n", @@ -1133,7 +1133,7 @@ STDMETHODIMP CMuxNotify::QueryPropertyUi (IUnknown * pUnk) // // Purpose: Save the LAN connection context. // -// Arguments: +// Arguments: // IN pUnk: Pointer to IUnknown. // // Returns: S_OK on success, otherwise an error code @@ -1169,7 +1169,7 @@ STDMETHODIMP CMuxNotify::SetContext (IUnknown * pUnk) // // Function: CMuxNotify::HrLoadAdapterConfiguration // -// Purpose: This loads the Miniport and adapters that have already been +// Purpose: This loads the Miniport and adapters that have already been // installed into our own data structures // // Arguments: None. @@ -1209,7 +1209,7 @@ HRESULT CMuxNotify::HrLoadAdapterConfiguration (VOID) // // If dwDisp indicates that a new key is created then, we know there // is no adapter currently listed underneath and we simply - // return, otherwise, we enumerate the subkeys, each one representing an + // return, otherwise, we enumerate the subkeys, each one representing an // adapter. // @@ -1299,7 +1299,7 @@ HRESULT CMuxNotify::HrLoadAdapterConfiguration (VOID) // Purpose: Get the upper and lower component of the first interface // of a binding path. // -// Arguments: +// Arguments: // IN pncbp : Binding path. // OUT ppnccUpper: Upper component. // OUT ppnccLower: Lower component. @@ -1327,7 +1327,7 @@ HRESULT CMuxNotify::HrGetUpperAndLower (INetCfgBindingPath* pncbp, hr = pncbp->EnumBindingInterfaces(&pencbi); if (S_OK == hr) { - + // // get the first binding interface // @@ -1368,7 +1368,7 @@ HRESULT CMuxNotify::HrGetUpperAndLower (INetCfgBindingPath* pncbp, // Purpose: Create an instance representing the physical adapter and install // a virtual miniport. // -// Arguments: +// Arguments: // IN pnccAdapter: Pointer to the physical adapter. // // Returns: S_OK, or an error. @@ -1411,7 +1411,7 @@ HRESULT CMuxNotify::HrAddAdapter (INetCfgComponent *pnccAdapter) else { hr = HRESULT_FROM_WIN32( ERROR_NOT_ENOUGH_MEMORY ); } - } + } TraceMsg( L"<--CMuxNotify::HrAddAdapter(HRESULT = %x).\n", hr ); @@ -1426,7 +1426,7 @@ HRESULT CMuxNotify::HrAddAdapter (INetCfgComponent *pnccAdapter) // Purpose: Deletes the instance representing the physical adapter // and uninstalls all the virtual miniports. // -// Arguments: +// Arguments: // IN pnccAdapter: Pointer to the physical adapter. // // Returns: S_OK, or an error. @@ -1453,7 +1453,7 @@ HRESULT CMuxNotify::HrRemoveAdapter (INetCfgComponent *pnccAdapter) if ( hr == S_OK ) { - m_AdaptersToRemove.Insert( pAdapter, + m_AdaptersToRemove.Insert( pAdapter, guidAdapter ); hr = pAdapter->Remove(); @@ -1463,7 +1463,7 @@ HRESULT CMuxNotify::HrRemoveAdapter (INetCfgComponent *pnccAdapter) // Restore the bindings of other protocols to the physical // adapter. // - + EnableBindings( pnccAdapter, TRUE ); #endif @@ -1482,14 +1482,14 @@ HRESULT CMuxNotify::HrRemoveAdapter (INetCfgComponent *pnccAdapter) // // Purpose: Installs a virtual miniport. // -// Arguments: +// Arguments: // IN pAdapter : Pointer to the physical adapter class instance. // IN pguidAdapter: Pointer to the GUID of the adapter. // // Returns: S_OK, or an error. // // -// Notes: +// Notes: // HRESULT CMuxNotify::HrAddMiniport (CMuxPhysicalAdapter *pAdapter, @@ -1502,15 +1502,15 @@ HRESULT CMuxNotify::HrAddMiniport (CMuxPhysicalAdapter *pAdapter, TraceMsg( L"-->CMuxNotify::HrAddMiniport.\n" ); // - // Limit the number of virtual miniports + // Limit the number of virtual miniports // if ((pAdapter->MiniportCount() + pAdapter->MiniportAddCount()) >= MAX_VIRTUAL_MP_PER_ADAPTER) { - hr = HRESULT_FROM_WIN32( ERROR_NO_SYSTEM_RESOURCES ); + hr = HRESULT_FROM_WIN32( ERROR_NO_SYSTEM_RESOURCES ); TraceMsg( L" Virtual miniport limit reached\n" ); } - if ( hr == S_OK ) + if ( hr == S_OK ) { #pragma prefast(suppress:8197, "The instance is freed in the destructor") pMiniport = new CMuxVirtualMiniport( m_pnc, @@ -1578,14 +1578,14 @@ HRESULT CMuxNotify::HrAddMiniport (CMuxPhysicalAdapter *pAdapter, // // Purpose: Uninstalls a virtual miniport. // -// Arguments: +// Arguments: // IN pAdapter : Pointer to the physical adapter class instance. // IN pguidAdapter: Pointer to the GUID of the adapter. // // Returns: S_OK, or an error. // // -// Notes: +// Notes: // HRESULT CMuxNotify::HrRemoveMiniport (CMuxPhysicalAdapter *pAdapter, @@ -1673,7 +1673,7 @@ LRESULT CMuxNotify::OnOk (IN HWND hWndPage) if ( ::SendMessage(GetDlgItem(hWndPage, IDC_ADD), BM_GETCHECK, 0, 0) == BST_CHECKED ) { - + m_eApplyAction = eActPropertyUIAdd; } else { @@ -1785,7 +1785,7 @@ INT_PTR CALLBACK NotifyDialogProc (HWND hWnd, LPNMHDR pnmh = (LPNMHDR)lParam; switch (pnmh->code) { - + case PSN_KILLACTIVE: // @@ -1851,7 +1851,7 @@ UINT CALLBACK NotifyPropSheetPageProc(HWND hWnd, // // Function: CMuxNotify::EnableBindings // -// Purpose: Enable/Disable the bindings of other protocols to +// Purpose: Enable/Disable the bindings of other protocols to // the physical adapter. // // Arguments: @@ -1869,7 +1869,7 @@ VOID CMuxNotify::EnableBindings (INetCfgComponent *pnccAdapter, IEnumNetCfgBindingPath *pencbp; INetCfgBindingPath *pncbp; HRESULT hr; - + TraceMsg( L"-->CMuxNotify::EnableBindings.\n" ); diff --git a/network/ndis/mux/notifyob/notify.h b/network/ndis/mux/notifyob/notify.h index 08f16e00c..4d5cc9361 100644 --- a/network/ndis/mux/notifyob/notify.h +++ b/network/ndis/mux/notifyob/notify.h @@ -43,7 +43,7 @@ class CMuxNotify : // Must inherit from CComObjectRoot(Ex) for reference count // management and default threading model. // - + public CComObjectRoot, // @@ -185,7 +185,7 @@ class CMuxNotify : STDMETHOD (SysNotifyBindingPath) ( IN DWORD dwChangeFlag, IN INetCfgBindingPath* pncbp); - + STDMETHOD (SysNotifyComponent) ( IN DWORD dwChangeFlag, IN INetCfgComponent* pncc); diff --git a/network/ndis/mux/notifyob/notifyn.idl b/network/ndis/mux/notifyob/notifyn.idl index 319ddbfda..bcdd6b678 100644 --- a/network/ndis/mux/notifyob/notifyn.idl +++ b/network/ndis/mux/notifyob/notifyn.idl @@ -5,7 +5,7 @@ // // File: NOTIFYN.IDL // -// Contents: +// Contents: // // Notes: // diff --git a/network/ndis/mux/notifyob/public.h b/network/ndis/mux/notifyob/public.h index 3d6147fcf..25be17d5c 100644 --- a/network/ndis/mux/notifyob/public.h +++ b/network/ndis/mux/notifyob/public.h @@ -12,7 +12,7 @@ Module Name: Author: - + Environment: user and kernel diff --git a/network/ndis/mux/notifyob/virtual.cpp b/network/ndis/mux/notifyob/virtual.cpp index fd3cce0e0..da5c16908 100644 --- a/network/ndis/mux/notifyob/virtual.cpp +++ b/network/ndis/mux/notifyob/virtual.cpp @@ -173,10 +173,10 @@ HRESULT CMuxVirtualMiniport::Install (VOID) INetCfgComponent *pnccMiniport; HRESULT hr; LPWSTR *pmszwRefs=NULL; - OBO_TOKEN *pOboToken=NULL; + OBO_TOKEN *pOboToken=NULL; DWORD dwSetupFlags=0; LPCWSTR pszwAnswerFile=NULL; - LPCWSTR pszwAnswerSections=NULL; + LPCWSTR pszwAnswerSections=NULL; TraceMsg( L"-->CMuxVirtualMiniport::Install.\n" ); @@ -189,7 +189,7 @@ HRESULT CMuxVirtualMiniport::Install (VOID) hr = pncClass->QueryInterface( IID_INetCfgClassSetup, (void **)&pncClassSetup ); if ( hr == S_OK ) { - + hr = pncClassSetup->Install( c_szMuxMiniport, pOboToken, dwSetupFlags, @@ -205,7 +205,7 @@ HRESULT CMuxVirtualMiniport::Install (VOID) TraceMsg( L" Failed to get the instance guid, uninstalling " L" the miniport.\n" ); - + pncClassSetup->DeInstall( pnccMiniport, pOboToken, pmszwRefs ); @@ -278,7 +278,7 @@ HRESULT CMuxVirtualMiniport::DeInstall (VOID) if ( hr == S_OK ) { TraceMsg( L" Found the miniport instance to uninstall.\n" ); - + hr = pncClassSetup->DeInstall( pnccMiniport, pOboToken, pmszwRefs ); @@ -351,7 +351,7 @@ HRESULT CMuxVirtualMiniport::ApplyRegistryChanges(ConfigAction eApplyAction) L"%s\\%s", c_szAdapterList, szAdapterGuid ); - + szAdapterGuidKey[MAX_PATH]='\0'; lResult = RegCreateKeyExW( HKEY_LOCAL_MACHINE, szAdapterGuidKey, @@ -509,7 +509,7 @@ HRESULT CMuxVirtualMiniport::ApplyRegistryChanges(ConfigAction eApplyAction) // // Function: CMuxVirtualMiniport::ApplyPnpChanges // -// Purpose: +// Purpose: // // Arguments: // IN eApplyAction: Action performed. diff --git a/network/ndis/mux/notifyob/virtual.h b/network/ndis/mux/notifyob/virtual.h index 5cb8f050f..dd31ea74d 100644 --- a/network/ndis/mux/notifyob/virtual.h +++ b/network/ndis/mux/notifyob/virtual.h @@ -48,7 +48,7 @@ class CMuxVirtualMiniport GUID *guidAdapter); virtual ~CMuxVirtualMiniport(VOID); - + HRESULT LoadConfiguration(VOID); VOID GetAdapterGUID (GUID *); diff --git a/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc b/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc index 59a37c530..96ee82a46 100644 --- a/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc +++ b/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc @@ -10,7 +10,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: ndisprot.rc - + Abstract: Internal resource file for driver. diff --git a/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc b/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc index f50de3f9a..b2594f2e4 100644 --- a/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc +++ b/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc @@ -10,7 +10,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: ndisprot.rc - + Abstract: Internal resource file for driver. diff --git a/network/ndis/ndisprot/6x/sys/debug.h b/network/ndis/ndisprot/6x/sys/debug.h index 64de34536..89c359070 100644 --- a/network/ndis/ndisprot/6x/sys/debug.h +++ b/network/ndis/ndisprot/6x/sys/debug.h @@ -80,7 +80,7 @@ ndisprotReleaseSpinLock( IN ULONG LineNumber ); -extern +extern VOID ndisprotFreeDbgLock( VOID diff --git a/network/ndis/ndisprot/6x/sys/excallbk.c b/network/ndis/ndisprot/6x/sys/excallbk.c index baa2298c0..48ec71b70 100644 --- a/network/ndis/ndisprot/6x/sys/excallbk.c +++ b/network/ndis/ndisprot/6x/sys/excallbk.c @@ -12,7 +12,7 @@ Module Name: ExCallbk.c Abstract: The routines in this module helps to solve driver load order - dependency between this sample and NDISWDM sample. These + dependency between this sample and NDISWDM sample. These routines are not required in a typical protocol driver. By default this module is not included in the sample. You include these routines by adding EX_CALLBACK defines to the 'sources' file. Read the @@ -52,7 +52,7 @@ typedef VOID (* NOTIFY_PRESENCE_CALLBACK)(OUT PVOID Source); #endif // ALLOC_PRAGMA -BOOLEAN +BOOLEAN ndisprotRegisterExCallBack() { OBJECT_ATTRIBUTES ObjectAttr; @@ -63,9 +63,9 @@ ndisprotRegisterExCallBack() DEBUGP(DL_LOUD, ("--> ndisprotRegisterExCallBack\n")); PAGED_CODE(); - + do { - + RtlInitUnicodeString(&CallBackObjectName, NDISPROT_CALLBACK_NAME); InitializeObjectAttributes(&ObjectAttr, @@ -73,13 +73,13 @@ ndisprotRegisterExCallBack() OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, NULL, NULL); - + Status = ExCreateCallback(&CallbackObject, &ObjectAttr, TRUE, TRUE); - + if (!NT_SUCCESS(Status)) { @@ -87,7 +87,7 @@ ndisprotRegisterExCallBack() bResult = FALSE; break; } - + CallbackRegisterationHandle = ExRegisterCallback(CallbackObject, ndisprotCallback, (PVOID)NULL); @@ -101,8 +101,8 @@ ndisprotRegisterExCallBack() ExNotifyCallback(CallbackObject, (PVOID)CALLBACK_SOURCE_NDISPROT, (PVOID)NULL); - - + + }while(FALSE); if(!bResult) { @@ -116,16 +116,16 @@ ndisprotRegisterExCallBack() { ObDereferenceObject(CallbackObject); CallbackObject = NULL; - } + } } DEBUGP(DL_LOUD, ("<-- ndisprotRegisterExCallBack\n")); return bResult; - + } -VOID +VOID ndisprotUnregisterExCallBack() { DEBUGP(DL_LOUD, ("--> ndisprotUnregisterExCallBack\n")); @@ -142,10 +142,10 @@ ndisprotUnregisterExCallBack() { ObDereferenceObject(CallbackObject); CallbackObject = NULL; - } - + } + DEBUGP(DL_LOUD, ("<-- ndisprotUnregisterExCallBack\n")); - + } VOID @@ -156,40 +156,40 @@ ndisprotCallback( ) { NOTIFY_PRESENCE_CALLBACK func; - - DEBUGP(DL_LOUD, ("==>ndisprotoCallback: Source %lx, CallbackAddr %p\n", + + DEBUGP(DL_LOUD, ("==>ndisprotoCallback: Source %lx, CallbackAddr %p\n", Source, CallbackAddr)); - + // // if we are the one issuing this notification, just return // - if (Source == CALLBACK_SOURCE_NDISPROT) { + if (Source == CALLBACK_SOURCE_NDISPROT) { return; } - + // // Notification is coming from NDISWDM // let it know that you are here // ASSERT(Source == (PVOID)CALLBACK_SOURCE_NDISWDM); - + if(Source == (PVOID)CALLBACK_SOURCE_NDISWDM) { ASSERT(CallbackAddr); - + if (CallbackAddr == NULL) { DEBUGP(DL_ERROR, ("Callback called with invalid address %p\n", CallbackAddr)); - return; + return; } func = CallbackAddr; - + func(CALLBACK_SOURCE_NDISPROT); } - + DEBUGP(DL_LOUD, ("<==ndisprotoCallback: Source, %lx\n", Source)); - + } #endif diff --git a/network/ndis/ndisprot/6x/sys/macros.h b/network/ndis/ndisprot/6x/sys/macros.h index d750129ce..59ddc18d1 100644 --- a/network/ndis/ndisprot/6x/sys/macros.h +++ b/network/ndis/ndisprot/6x/sys/macros.h @@ -76,7 +76,7 @@ Revision History: NdisReleaseSpinLock(_pLock); \ } \ } - + #define NPROT_FREE_LOCK(_pLock) NdisFreeSpinLock(_pLock) #define NPROT_FREE_DBG_LOCK() @@ -94,17 +94,17 @@ Revision History: #define NPROT_REMOVE_HEAD_LIST(_pList) RemoveHeadList(_pList) - + #define NPROT_RCV_NBL_TO_LIST_ENTRY(_pNbl) \ (&((PNPROT_RECV_NBL_RSVD)(NET_BUFFER_LIST_PROTOCOL_RESERVED(_pNbl)))->Link) #define NPROT_RCV_NBL_FROM_LIST_ENTRY(_pEnt) \ (((PNPROT_RECV_NBL_RSVD)(CONTAINING_RECORD(_pEnt, NPROT_RECV_NBL_RSVD, Link)))->pNetBufferList) - + // // Send net buffer list context -// +// #define NPROT_IRP_FROM_SEND_NBL(_pNbl) \ (((PNPROT_SEND_NETBUFLIST_RSVD)((_pNbl)->Context->ContextData + (_pNbl)->Context->Offset))->pIrp) @@ -128,7 +128,7 @@ Revision History: // Cancel IDs are generated by using the partial cancel ID we got from // NDIS ORed with a monotonically increasing locally generated ID. // -#define NPROT_CANCEL_ID_LOW_MASK (((ULONG_PTR)-1) >> 8) +#define NPROT_CANCEL_ID_LOW_MASK (((ULONG_PTR)-1) >> 8) #define NPROT_GET_NEXT_CANCEL_ID() \ (PVOID)(Globals.PartialCancelId | \ @@ -188,7 +188,7 @@ Revision History: #define NPROT_TEST_FLAGS(_FlagsVar, _Mask, _BitsToCheck) \ (((_FlagsVar) & (_Mask)) == (_BitsToCheck)) - + #define NDIS_STATUS_TO_NT_STATUS(_NdisStatus, _pNtStatus) \ { \ diff --git a/network/ndis/ndisprot/6x/sys/ndisbind.c b/network/ndis/ndisprot/6x/sys/ndisbind.c index 87d1f70b4..7ad3c4d5e 100644 --- a/network/ndis/ndisprot/6x/sys/ndisbind.c +++ b/network/ndis/ndisprot/6x/sys/ndisbind.c @@ -74,7 +74,7 @@ Return Value: NDIS_STATUS Status; UNREFERENCED_PARAMETER(ProtocolDriverContext); - + do { // @@ -120,12 +120,12 @@ Return Value: pOpenContext->State = NdisprotInitializing; // - // Here we reference the open context to make sure that even if + // Here we reference the open context to make sure that even if // ndisprotCreateBinding failed, open context is still valid - // + // NPROT_REF_OPEN(pOpenContext); // - // Set up the NDIS binding, ndisprotCreateBinding does the cleanup for the + // Set up the NDIS binding, ndisprotCreateBinding does the cleanup for the // binding if somehow it fails to create the binding, the // Status = ndisprotCreateBinding( @@ -134,21 +134,21 @@ Return Value: BindContext, (PUCHAR)BindParameters->AdapterName->Buffer, BindParameters->AdapterName->Length); - - + + if (Status != NDIS_STATUS_SUCCESS) { // // Dereference the open context because we referenced it before we call // ndisprotCreateBinding - // + // NPROT_DEREF_OPEN(pOpenContext); break; } // // Dereference the open context because we referenced it before we call // ndisprotCreateBinding - // + // NPROT_DEREF_OPEN(pOpenContext); } while (FALSE); @@ -216,7 +216,7 @@ Return Value: PNDISPROT_OPEN_CONTEXT pOpenContext; UNREFERENCED_PARAMETER(UnbindContext); - + pOpenContext = (PNDISPROT_OPEN_CONTEXT)ProtocolBindingContext; NPROT_STRUCT_ASSERT(pOpenContext, oc); @@ -272,7 +272,7 @@ Return Value: NPROT_SIGNAL_EVENT(&pOpenContext->BindEvent); } - + NDIS_STATUS NdisprotPnPEventHandler( IN NDIS_HANDLE ProtocolBindingContext, @@ -308,7 +308,7 @@ Return Value: switch (pNetPnPEventNotification->NetPnPEvent.NetEvent) { - case NetEventSetPower: + case NetEventSetPower: NPROT_STRUCT_ASSERT(pOpenContext, oc); pOpenContext->PowerState = *(PNET_DEVICE_POWER_STATE)pNetPnPEventNotification->NetPnPEvent.Buffer; @@ -359,14 +359,14 @@ Return Value: // // Wait all sends to be complete. // - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); pOpenContext->State = NdisprotPausing; // // we could also complete the PnP Event asynchrously. // - while (TRUE) + while (TRUE) { if (pOpenContext->PendedSendCount == 0) break; @@ -379,19 +379,19 @@ Return Value: NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); } - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); // // Return all queued receives. // ndisprotFlushReceiveQueue(pOpenContext); pOpenContext->State = NdisprotPaused; - + break; case NetEventRestart: - + ASSERT(pOpenContext->State == NdisprotPaused); // // Get the updated attributes @@ -403,7 +403,7 @@ Return Value: break; } BufferLength = pNetPnPEventNotification->NetPnPEvent.BufferLength; - + ASSERT(BufferLength == sizeof(NDIS_PROTOCOL_RESTART_PARAMETERS)); RestartParameters = (PNDIS_PROTOCOL_RESTART_PARAMETERS)Buffer; @@ -412,7 +412,7 @@ Return Value: pOpenContext->State = NdisprotRunning; break; - + case NetEventQueryRemoveDevice: case NetEventCancelRemoveDevice: case NetEventReconfigure: @@ -431,7 +431,7 @@ Return Value: return (Status); } - + VOID NdisprotProtocolUnloadHandler( VOID @@ -500,7 +500,7 @@ Return Value: NET_FRAME_TYPE FrameTypeArray[2] = {NDIS_ETH_TYPE_802_1X, NDIS_ETH_TYPE_802_1Q}; #if DBG PNDISPROT_OPEN_CONTEXT pTmpOpenContext; -#endif +#endif DEBUGP(DL_LOUD, ("CreateBinding: open %p/%x, device [%s]\n", pOpenContext, pOpenContext->Flags, pBindingInfo)); @@ -512,7 +512,7 @@ Return Value: // // Check if we already have a binding to this device. // -#if DBG +#if DBG pTmpOpenContext = ndisprotLookupDevice(pBindingInfo, BindingInfoLength); ASSERT(pTmpOpenContext == NULL); @@ -527,7 +527,7 @@ Return Value: Status = NDIS_STATUS_FAILURE; break; } -#endif +#endif NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); @@ -548,10 +548,10 @@ Return Value: } NPROT_COPY_MEM(pOpenContext->DeviceName.Buffer, pBindingInfo, BindingInfoLength); -#pragma prefast(suppress: 12009, "DeviceName length will not cause overflow") +#pragma prefast(suppress: 12009, "DeviceName length will not cause overflow") *(PWCHAR)((PUCHAR)pOpenContext->DeviceName.Buffer + BindingInfoLength) = L'\0'; NdisInitUnicodeString(&pOpenContext->DeviceName, pOpenContext->DeviceName.Buffer); - + NdisZeroMemory(&PoolParameters, sizeof(NET_BUFFER_LIST_POOL_PARAMETERS)); PoolParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; @@ -561,39 +561,39 @@ Return Value: PoolParameters.ContextSize = sizeof(NPROT_SEND_NETBUFLIST_RSVD); PoolParameters.fAllocateNetBuffer = TRUE; PoolParameters.PoolTag = NPROT_ALLOC_TAG; - + pOpenContext->SendNetBufferListPool = NdisAllocateNetBufferListPool( Globals.NdisProtocolHandle, - &PoolParameters); + &PoolParameters); if (pOpenContext->SendNetBufferListPool == NULL) { DEBUGP(DL_WARN, ("CreateBinding: failed to alloc" " send net buffer list pool\n")); - + Status = NDIS_STATUS_RESOURCES; break; } - PoolParameters.ContextSize = 0; - + PoolParameters.ContextSize = 0; + pOpenContext->RecvNetBufferListPool = NdisAllocateNetBufferListPool( Globals.NdisProtocolHandle, &PoolParameters); - + if (pOpenContext->RecvNetBufferListPool == NULL) { DEBUGP(DL_WARN, ("CreateBinding: failed to alloc" " recv net buffer list pool.\n")); - + Status = NDIS_STATUS_RESOURCES; break; } - + // // Assume that the device is powered up. // pOpenContext->PowerState = NetDeviceStateD0; - + // // Open the adapter. // @@ -614,8 +614,8 @@ Return Value: NDIS_DECLARE_PROTOCOL_OPEN_CONTEXT(NDISPROT_OPEN_CONTEXT); Status = NdisOpenAdapterEx(Globals.NdisProtocolHandle, (NDIS_HANDLE)pOpenContext, - &OpenParameters, - BindContext, + &OpenParameters, + BindContext, &pOpenContext->BindingHandle); if (Status == NDIS_STATUS_PENDING) @@ -651,18 +651,18 @@ Return Value: // Get MAC options. // pOpenContext->MacOptions = BindParameters->MacOptions; - - + + // // Get the max frame size. // pOpenContext->MaxFrameSize = BindParameters->MtuSize; - + // // Get the media connect status. // GenericUlong = BindParameters->MediaConnectState; - + if (GenericUlong == NdisMediaStateConnected) { NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_MEDIA_FLAGS, NPROTO_MEDIA_CONNECTED); @@ -772,7 +772,7 @@ Return Value: { ASSERT(pOpenContext->ClosingEvent == NULL); pOpenContext->ClosingEvent = NULL; - + NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_BIND_FLAGS, NPROTO_BIND_CLOSING); if (pOpenContext->PendedSendCount != 0) @@ -780,7 +780,7 @@ Return Value: pOpenContext->ClosingEvent = &ClosingEvent; NPROT_INIT_EVENT(&ClosingEvent); } - + DoCloseBinding = TRUE; } @@ -790,10 +790,10 @@ Return Value: { ULONG PacketFilter = 0; ULONG BytesRead = 0; - + // // Set Packet filter to 0 before closing the binding - // + // Status = ndisprotDoRequest( pOpenContext, NDIS_DEFAULT_PORT_NUMBER, @@ -807,10 +807,10 @@ Return Value: { DEBUGP(DL_WARN, ("ShutDownBinding: set packet filter failed: %x\n", Status)); } - + // // Set multicast list to null before closing the binding - // + // Status = ndisprotDoRequest( pOpenContext, NDIS_DEFAULT_PORT_NUMBER, @@ -856,7 +856,7 @@ Return Value: NPROT_ASSERT(Status == NDIS_STATUS_SUCCESS); pOpenContext->BindingHandle = NULL; - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_BIND_FLAGS, NPROTO_BIND_IDLE); @@ -867,7 +867,7 @@ Return Value: } } while (FALSE); - + // // Remove it from the global list. @@ -977,7 +977,7 @@ Return Value: pOpenContext, pOpenContext->PendedSendCount)); NPROT_WAIT_EVENT(pOpenContext->ClosingEvent, 0); - + } if (DoCancelReads) @@ -1024,7 +1024,7 @@ Return Value: { NDIS_HANDLE ProtocolHandle; - DEBUGP(DL_INFO, ("ProtocolUnload: ProtocolHandle %lp\n", + DEBUGP(DL_INFO, ("ProtocolUnload: ProtocolHandle %lp\n", Globals.NdisProtocolHandle)); if (Globals.NdisProtocolHandle != NULL) @@ -1037,7 +1037,7 @@ Return Value: } } - + NDIS_STATUS ndisprotDoRequest( IN PNDISPROT_OPEN_CONTEXT pOpenContext, @@ -1115,7 +1115,7 @@ Return Value: pNdisRequest->RequestId = NPROT_GET_NEXT_CANCEL_ID(); Status = NdisOidRequest(pOpenContext->BindingHandle, pNdisRequest); - + if (Status == NDIS_STATUS_PENDING) { @@ -1129,9 +1129,9 @@ Return Value: *pBytesProcessed = (RequestType == NdisRequestQueryInformation)? pNdisRequest->DATA.QUERY_INFORMATION.BytesWritten: pNdisRequest->DATA.SET_INFORMATION.BytesRead; - + // - // The driver below should set the correct value to BytesWritten + // The driver below should set the correct value to BytesWritten // or BytesRead. But now, we just truncate the value to InformationBufferLength // if (*pBytesProcessed > InformationBufferLength) @@ -1188,7 +1188,7 @@ Return Value: Status = NDIS_STATUS_INVALID_DATA; break; } - + NPROT_STRUCT_ASSERT(pOpenContext, oc); NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); @@ -1244,8 +1244,8 @@ Return Value: { Status = NDIS_STATUS_ADAPTER_NOT_READY; } - - NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); + + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); // // Let go of the binding. // @@ -1345,8 +1345,8 @@ Return Value: PNDISPROT_OPEN_CONTEXT pOpenContext; NDIS_STATUS GeneralStatus; PNDIS_LINK_STATE LinkState; - - + + pOpenContext = (PNDISPROT_OPEN_CONTEXT)ProtocolBindingContext; NPROT_STRUCT_ASSERT(pOpenContext, oc); @@ -1360,7 +1360,7 @@ Return Value: } GeneralStatus = StatusIndication->StatusCode; - + DEBUGP(DL_INFO, ("Status: Open %p, Status %x\n", pOpenContext, GeneralStatus)); @@ -1378,7 +1378,7 @@ Return Value: // // We continue and make note of status indications // - + // // NOTE that any actions we take based on these // status indications should take into account @@ -1389,7 +1389,7 @@ Return Value: switch(GeneralStatus) { case NDIS_STATUS_RESET_START: - + NPROT_ASSERT(!NPROT_TEST_FLAGS(pOpenContext->Flags, NPROTO_RESET_FLAGS, NPROTO_RESET_IN_PROGRESS)); @@ -1405,7 +1405,7 @@ Return Value: NPROT_ASSERT(NPROT_TEST_FLAGS(pOpenContext->Flags, NPROTO_RESET_FLAGS, NPROTO_RESET_IN_PROGRESS)); - + NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_RESET_FLAGS, NPROTO_NOT_RESETTING); @@ -1413,9 +1413,9 @@ Return Value: break; case NDIS_STATUS_LINK_STATE: - + ASSERT(StatusIndication->StatusBufferSize >= sizeof(NDIS_LINK_STATE)); - + LinkState = (PNDIS_LINK_STATE)StatusIndication->StatusBuffer; if (LinkState->MediaConnectState == MediaConnectStateConnected) @@ -1430,15 +1430,15 @@ Return Value: NPROTO_MEDIA_FLAGS, NPROTO_MEDIA_DISCONNECTED); } - - break; - + + break; + default: break; } } while (FALSE); - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); } @@ -1571,7 +1571,7 @@ Return Value: // DEBUGP(DL_INFO, ("QueryBinding: found open %p\n", pOpenContext)); - + pQueryBinding->DeviceNameOffset = 0; pQueryBinding->DeviceNameLength = pOpenContext->DeviceName.Length; pQueryBinding->DeviceDescrOffset = 0; @@ -1615,7 +1615,7 @@ Return Value: NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); break; } - + pQueryBinding->DeviceDescrOffset = DeviceDescrOffset; *pBytesReturned += StringBytesWritten; @@ -1798,7 +1798,7 @@ Return Value: pOpenContext, pOpenContext->Flags, Oid, Status)); return (Status); - + } NDIS_STATUS @@ -1846,7 +1846,7 @@ Return Value: // // We should check the OID is settable by the user mode apps - // + // if (!ndisprotValidOid(Oid)) { DEBUGP(DL_WARN, ("SetOid: Oid %x cannot be set\n", Oid)); @@ -1854,7 +1854,7 @@ Return Value: Status = NDIS_STATUS_INVALID_DATA; break; } - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); if (!NPROT_TEST_FLAGS(pOpenContext->Flags, NPROTO_BIND_FLAGS, NPROTO_BIND_ACTIVE)) @@ -1912,7 +1912,7 @@ Return Value: BOOLEAN ndisprotValidOid( - IN NDIS_OID Oid + IN NDIS_OID Oid ) /*++ @@ -1923,7 +1923,7 @@ Routine Description: Arguments: Oid - The OID which the user tries to set. - + Return Value: TRUE if the OID is allowed to set @@ -1943,7 +1943,7 @@ Return Value: break; } } - + return (i < NumOids); } @@ -1965,13 +1965,13 @@ Routine Description: pOpenContext - pointer to open context RestartParameters - pointer to ndis restart parameters - + Return Value: None NOTE: Protocols should query any attribute: - 1. the attribute is not included in the RestartAttributes + 1. the attribute is not included in the RestartAttributes and 2. The protocol cares about whether the attributes is changed by underlying driver. --*/ @@ -1986,30 +1986,30 @@ NOTE: Protocols should query any attribute: WCHAR FilterNameBuffer[NPROT_MAX_FILTER_NAME_LENGTH]; PNDIS_RESTART_ATTRIBUTES NdisRestartAttributes; PNDIS_RESTART_GENERAL_ATTRIBUTES NdisGeneralAttributes; - + DEBUGP(DL_LOUD, ("ndisprotRestart: Open %p", pOpenContext)); // // Check the filter stack changes // if (RestartParameters->FilterModuleNameBuffer != NULL) { - + Buffer = RestartParameters->FilterModuleNameBuffer; - + while (RestartParameters->FilterModuleNameBufferLength > TotalLength) { - + BufferLength = *(PUSHORT)Buffer; - + TotalLength += BufferLength + sizeof(USHORT); Length = BufferLength + sizeof(USHORT); - + if (BufferLength >= (NPROT_MAX_FILTER_NAME_LENGTH * sizeof(WCHAR))) { BufferLength = (NPROT_MAX_FILTER_NAME_LENGTH - 1) * sizeof(WCHAR); } NdisMoveMemory(FilterNameBuffer, Buffer + sizeof(USHORT), BufferLength); - + BufferLength /= sizeof(WCHAR); // @@ -2020,17 +2020,17 @@ NOTE: Protocols should query any attribute: { FilterNameBuffer[BufferLength] = 0; } - + DEBUGP(DL_INFO, ("Filter: %ws\n", FilterNameBuffer)); - + Buffer += Length; } } // // Checked for updated attributes - // + // NdisRestartAttributes = RestartParameters->RestartAttributes; - + // // NdisProt is only interested in the generic attributes. // @@ -2042,20 +2042,20 @@ NOTE: Protocols should query any attribute: } NdisRestartAttributes = NdisRestartAttributes->Next; } - + // // Pick up the new attributes of interest // if (NdisRestartAttributes != NULL) { NdisGeneralAttributes = (PNDIS_RESTART_GENERAL_ATTRIBUTES)NdisRestartAttributes->Data; - + pOpenContext->MacOptions = NdisGeneralAttributes->MacOptions; pOpenContext->MaxFrameSize = NdisGeneralAttributes->MtuSize; - } - + } + DEBUGP(DL_LOUD, ("ndisprotRestart: Open %p", pOpenContext)); - + } - + diff --git a/network/ndis/ndisprot/6x/sys/ndisprot.h b/network/ndis/ndisprot/6x/sys/ndisprot.h index b4efbaf40..e497c89f1 100644 --- a/network/ndis/ndisprot/6x/sys/ndisprot.h +++ b/network/ndis/ndisprot/6x/sys/ndisprot.h @@ -121,10 +121,10 @@ typedef struct _NDISPROT_OPEN_CONTEXT PFILE_OBJECT pFileObject; // Set on OPEN_DEVICE NDIS_HANDLE BindingHandle; - NDIS_HANDLE SendNetBufferListPool; + NDIS_HANDLE SendNetBufferListPool; // let every net buffer list contain one net buffer(don't know how many net buffers can be include in one list. NDIS_HANDLE RecvNetBufferListPool; - + ULONG MacOptions; ULONG MaxFrameSize; ULONG DataBackFillSize; @@ -148,12 +148,12 @@ typedef struct _NDISPROT_OPEN_CONTEXT ULONG oc_sig; // Signature for sanity NDISPROT_OPEN_STATE State; - PNPROT_EVENT ClosingEvent; + PNPROT_EVENT ClosingEvent; UCHAR CurrentAddress[NPROT_MAC_ADDR_LEN]; UCHAR MCastAddress[MAX_MULTICAST_ADDRESS][NPROT_MAC_ADDR_LEN]; } NDISPROT_OPEN_CONTEXT, *PNDISPROT_OPEN_CONTEXT; - + #define oc_signature 'OiuN' // diff --git a/network/ndis/ndisprot/6x/sys/ntdisp.c b/network/ndis/ndisprot/6x/sys/ntdisp.c index 21ceeaebb..c212f57dc 100644 --- a/network/ndis/ndisprot/6x/sys/ntdisp.c +++ b/network/ndis/ndisprot/6x/sys/ntdisp.c @@ -61,12 +61,12 @@ Routine Description: Return Value: NT Status code - + --*/ { NDIS_PROTOCOL_DRIVER_CHARACTERISTICS protocolChar = {0}; NTSTATUS status = STATUS_SUCCESS; - NDIS_STRING protoName = NDIS_STRING_CONST("NDISPROT"); + NDIS_STRING protoName = NDIS_STRING_CONST("NDISPROT"); UNICODE_STRING ntDeviceName; UNICODE_STRING win32DeviceName; BOOLEAN fSymbolicLink = FALSE; @@ -74,7 +74,7 @@ Return Value: NDIS_HANDLE ProtocolDriverContext={0}; UNREFERENCED_PARAMETER(pRegistryPath); - + DEBUGP(DL_LOUD, ("DriverEntry\n")); Globals.pDriverObject = pDriverObject; @@ -96,7 +96,7 @@ Return Value: FILE_DEVICE_SECURE_OPEN, FALSE, &deviceObject); - + if (!NT_SUCCESS (status)) { // @@ -117,7 +117,7 @@ Return Value: } fSymbolicLink = TRUE; - + deviceObject->Flags |= DO_DIRECT_IO; Globals.ControlDeviceObject = deviceObject; @@ -126,7 +126,7 @@ Return Value: // // Initialize the protocol characterstic structure - // + // #if (NDIS_SUPPORT_NDIS630) {C_ASSERT(sizeof(protocolChar) >= NDIS_SIZEOF_PROTOCOL_DRIVER_CHARACTERISTICS_REVISION_2);} protocolChar.Header.Type = NDIS_OBJECT_TYPE_PROTOCOL_DRIVER_CHARACTERISTICS, @@ -159,7 +159,7 @@ Return Value: // // Register as a protocol driver // - + status = NdisRegisterProtocolDriver(ProtocolDriverContext, // driver context &protocolChar, &Globals.NdisProtocolHandle); @@ -190,16 +190,16 @@ Return Value: pDriverObject->MajorFunction[IRP_MJ_CLEANUP] = NdisprotCleanup; pDriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = NdisprotIoControl; - + pDriverObject->DriverUnload = NdisprotUnload; status = STATUS_SUCCESS; - + } while (FALSE); - + if (!NT_SUCCESS(status)) { @@ -216,14 +216,14 @@ Return Value: IoDeleteSymbolicLink(&win32DeviceName); fSymbolicLink = FALSE; } - + if (Globals.NdisProtocolHandle) { NdisDeregisterProtocolDriver(Globals.NdisProtocolHandle); Globals.NdisProtocolHandle = NULL; - } + } } - + return status; } @@ -252,7 +252,7 @@ Return Value: UNICODE_STRING win32DeviceName; PAGED_CODE(); UNREFERENCED_PARAMETER(DriverObject); - + DEBUGP(DL_LOUD, ("Unload Enter\n")); // @@ -261,7 +261,7 @@ Return Value: // RtlInitUnicodeString(&win32DeviceName, DOS_DEVICE_NAME); - IoDeleteSymbolicLink(&win32DeviceName); + IoDeleteSymbolicLink(&win32DeviceName); if (Globals.ControlDeviceObject) @@ -310,7 +310,7 @@ Return Value: NTSTATUS NtStatus = STATUS_SUCCESS; PAGED_CODE(); UNREFERENCED_PARAMETER(pDeviceObject); - + pIrpSp = IoGetCurrentIrpStackLocation(pIrp); pIrpSp->FileObject->FsContext = NULL; @@ -352,7 +352,7 @@ Return Value: PNDISPROT_OPEN_CONTEXT pOpenContext; PAGED_CODE(); UNREFERENCED_PARAMETER(pDeviceObject); - + pIrpSp = IoGetCurrentIrpStackLocation(pIrp); pOpenContext = pIrpSp->FileObject->FsContext; @@ -378,7 +378,7 @@ Return Value: return NtStatus; } - + NTSTATUS NdisprotCleanup( @@ -410,9 +410,9 @@ Return Value: ULONG PacketFilter; ULONG BytesProcessed; - + UNREFERENCED_PARAMETER(pDeviceObject); - + pIrpSp = IoGetCurrentIrpStackLocation(pIrp); pOpenContext = pIrpSp->FileObject->FsContext; @@ -437,7 +437,7 @@ Return Value: &BytesProcessed, FALSE // Don't wait for device to be powered on ); - + if (NdisStatus != NDIS_STATUS_SUCCESS) { DEBUGP(DL_INFO, ("Cleanup: Open %p, set packet filter (%x) failed: %x\n", @@ -449,7 +449,7 @@ Return Value: // NdisStatus = NDIS_STATUS_SUCCESS; } - + // // Mark this endpoint. // @@ -533,7 +533,7 @@ Return Value: // If we don't get this event in 5 seconds, time out. // NPROT_ASSERT((FunctionCode & 0x3) == METHOD_BUFFERED); - + if (NPROT_WAIT_EVENT(&Globals.BindsComplete, 5000)) { NtStatus = STATUS_SUCCESS; @@ -546,9 +546,9 @@ Return Value: break; case IOCTL_NDISPROT_QUERY_BINDING: - + NPROT_ASSERT((FunctionCode & 0x3) == METHOD_BUFFERED); - + Status = ndisprotQueryBinding( pIrp->AssociatedIrp.SystemBuffer, pIrpSp->Parameters.DeviceIoControl.InputBufferLength, @@ -636,7 +636,7 @@ Return Value: NtStatus = STATUS_DEVICE_NOT_CONNECTED; } break; - + default: NtStatus = STATUS_NOT_SUPPORTED; @@ -715,9 +715,9 @@ Return Value: NPROT_ASSERT(pOpenContext->pFileObject != NULL); DEBUGP(DL_WARN, ("ndisprotOpenDevice: Open %p/%x already associated" - " with another FileObject %p\n", + " with another FileObject %p\n", pOpenContext, pOpenContext->Flags, pOpenContext->pFileObject)); - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); NPROT_DEREF_OPEN(pOpenContext); // ndisprotOpenDevice failure @@ -729,17 +729,17 @@ Return Value: // pFileObject->FsContext with NULL, if they are equal, the function puts pOpenContext // into FsContext, and return NULL. Otherwise, it return pFileObject->FsContext without // changing anything. - // - + // + if ((pCurrentOpenContext = InterlockedCompareExchangePointer (& (pFileObject->FsContext), pOpenContext, NULL)) != NULL) { // // pFileObject->FsContext already is used by other open // DEBUGP(DL_WARN, ("ndisprotOpenDevice: FileObject %p already associated" - " with another Open %p/%x\n", + " with another Open %p/%x\n", pFileObject, pCurrentOpenContext, pCurrentOpenContext->Flags)); //BUG - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); NPROT_DEREF_OPEN(pOpenContext); // ndisprotOpenDevice failure @@ -766,7 +766,7 @@ Return Value: &BytesProcessed, TRUE // Do wait for power on ); - + if (NdisStatus != NDIS_STATUS_SUCCESS) { DEBUGP(DL_WARN, ("openDevice: Open %p: set packet filter (%x) failed: %x\n", @@ -781,10 +781,10 @@ Return Value: // for this file object later // pCurrentOpenContext = InterlockedCompareExchangePointer (& (pFileObject->FsContext), NULL, pOpenContext); - - + + NPROT_ASSERT(pCurrentOpenContext == pOpenContext); - + NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_OPEN_FLAGS, NPROTO_OPEN_IDLE); pOpenContext->pFileObject = NULL; @@ -797,7 +797,7 @@ Return Value: } *ppOpenContext = pOpenContext; - + NtStatus = STATUS_SUCCESS; } while (FALSE); @@ -859,7 +859,7 @@ Return Value: { DEBUGP(DL_INFO, ("DerefOpen: Open %p, Flags %x, ref count is zero!\n", pOpenContext, pOpenContext->Flags)); - + NPROT_ASSERT(pOpenContext->BindingHandle == NULL); NPROT_ASSERT(pOpenContext->RefCount == 0); NPROT_ASSERT(pOpenContext->pFileObject == NULL); diff --git a/network/ndis/ndisprot/6x/sys/protuser.h b/network/ndis/ndisprot/6x/sys/protuser.h index 823d1ef5d..3235626c7 100644 --- a/network/ndis/ndisprot/6x/sys/protuser.h +++ b/network/ndis/ndisprot/6x/sys/protuser.h @@ -87,6 +87,6 @@ typedef struct _NDISPROT_QUERY_BINDING ULONG DeviceDescrLength; // in bytes } NDISPROT_QUERY_BINDING, *PNDISPROT_QUERY_BINDING; - + #endif // __NPROTUSER__H diff --git a/network/ndis/ndisprot/6x/sys/recv.c b/network/ndis/ndisprot/6x/sys/recv.c index a7291992d..491af7510 100644 --- a/network/ndis/ndisprot/6x/sys/recv.c +++ b/network/ndis/ndisprot/6x/sys/recv.c @@ -312,7 +312,7 @@ Return Value: // Copy as much data as possible from the receive packet to // the IRP MDL. // - + pDst = NULL; NdisQueryMdl(pIrp->MdlAddress, &pDst, &BytesRemaining, NormalPagePriority | MdlMappingNoExecute); NPROT_ASSERT(pDst != NULL); // since it was already mapped diff --git a/network/ndis/ndisprot/6x/sys/send.c b/network/ndis/ndisprot/6x/sys/send.c index 73cc282b6..17b31051f 100644 --- a/network/ndis/ndisprot/6x/sys/send.c +++ b/network/ndis/ndisprot/6x/sys/send.c @@ -35,7 +35,7 @@ NdisprotWrite( Routine Description: - Dispatch routine to handle IRP_MJ_WRITE. + Dispatch routine to handle IRP_MJ_WRITE. Arguments: @@ -73,7 +73,7 @@ Return Value: NtStatus = STATUS_INVALID_HANDLE; break; } - + NPROT_STRUCT_ASSERT(pOpenContext, oc); if (pIrp->MdlAddress == NULL) @@ -86,7 +86,7 @@ Return Value: // // Try to get a virtual address for the MDL. // - + pEthHeader = NULL; NdisQueryMdl(pIrp->MdlAddress, &pEthHeader, &DataLength, NormalPagePriority | MdlMappingNoExecute); @@ -127,14 +127,14 @@ Return Value: NtStatus = STATUS_INVALID_PARAMETER; break; } - + if (!NPROT_MEM_CMP(pEthHeader->SrcAddr, pOpenContext->CurrentAddress, NPROT_MAC_ADDR_LEN)) { DEBUGP(DL_WARN, ("Write: Failing with invalid Source address")); NtStatus = STATUS_INVALID_PARAMETER; break; } - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); @@ -147,13 +147,13 @@ Return Value: NtStatus = STATUS_INVALID_HANDLE; break; - } + } if (pOpenContext->State != NdisprotRunning || pOpenContext->PowerState != NetDeviceStateD0) { NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); - + DEBUGP(DL_INFO, ("Device is not ready.\n")); NtStatus = STATUS_UNSUCCESSFUL; break; @@ -169,11 +169,11 @@ Return Value: pMdl, 0, // Data offset DataLength); - + if (pNetBufferList == NULL) { NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); - + DEBUGP(DL_FATAL, ("Write: open %p, failed to alloc send net buffer list\n", pOpenContext)); NtStatus = STATUS_INSUFFICIENT_RESOURCES; @@ -192,11 +192,11 @@ Return Value: NPROT_SEND_NBL_RSVD(pNetBufferList)->RefCount = 1; // - // We set up a cancel ID on each send NetBufferList (which maps to a Write IRP), + // We set up a cancel ID on each send NetBufferList (which maps to a Write IRP), // and save the NetBufferList pointer in the IRP. If the IRP gets cancelled, we use // NdisCancelSendNetBufferLists() to cancel the NetBufferList. // - + CancelId = NPROT_GET_NEXT_CANCEL_ID(); NDIS_SET_NET_BUFFER_LIST_CANCEL_ID(pNetBufferList, CancelId); pIrp->Tail.Overlay.DriverContext[0] = (PVOID)pOpenContext; @@ -225,7 +225,7 @@ Return Value: pData = MmGetSystemAddressForMdlSafe(pMdl, NormalPagePriority | MdlMappingNoExecute); NPROT_ASSERT(pEthHeader == pData); - DEBUGP(DL_VERY_LOUD, + DEBUGP(DL_VERY_LOUD, ("Write: MDL %p, MdlFlags %x, SystemAddr %p, %d bytes\n", pIrp->MdlAddress, pIrp->MdlAddress->MdlFlags, pData, DataLength)); @@ -235,10 +235,10 @@ Return Value: pNetBufferList->SourceHandle = pOpenContext->BindingHandle; ASSERT (NDIS_MDL_LINKAGE(pMdl) == NULL); - + SendFlags |= NDIS_SEND_FLAGS_CHECK_FOR_LOOPBACK; - NdisSendNetBufferLists( + NdisSendNetBufferLists( pOpenContext->BindingHandle, pNetBufferList, NDIS_DEFAULT_PORT_NUMBER, @@ -285,7 +285,7 @@ Return Value: BOOLEAN FoundIrp = FALSE; UNREFERENCED_PARAMETER(pDeviceObject); - + pOpenContext = (PNDISPROT_OPEN_CONTEXT) pIrp->Tail.Overlay.DriverContext[0]; if (pOpenContext == NULL) { @@ -295,10 +295,10 @@ Return Value: IoReleaseCancelSpinLock(pIrp->CancelIrql); return; } - + NPROT_REF_OPEN(pOpenContext); IoReleaseCancelSpinLock(pIrp->CancelIrql); - + NPROT_STRUCT_ASSERT(pOpenContext, oc); // @@ -320,7 +320,7 @@ Return Value: NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); - if (FoundIrp) + if (FoundIrp) { PVOID CancelId; @@ -344,11 +344,11 @@ Return Value: // DEBUGP(DL_INFO, ("CancelWrite: cancelling nbl %p on Open %p\n", pIrp->Tail.Overlay.DriverContext[1], pOpenContext)); - + NdisCancelSendNetBufferLists( pOpenContext->BindingHandle, CancelId); - + } // // else the send completion routine has already picked up this IRP. @@ -399,7 +399,7 @@ Return Value: CurrNetBufferList = NextNetBufferList) { NextNetBufferList = NET_BUFFER_LIST_NEXT_NBL(CurrNetBufferList); - + pIrp = NPROT_IRP_FROM_SEND_NBL(CurrNetBufferList); IoAcquireCancelSpinLock(&pIrp->CancelIrql); @@ -413,10 +413,10 @@ Return Value: NPROT_REMOVE_ENTRY_LIST(&pIrp->Tail.Overlay.ListEntry); NPROT_RELEASE_LOCK(&pOpenContext->Lock, DispatchLevel); - + CompletionStatus = NET_BUFFER_LIST_STATUS(CurrNetBufferList); - - + + // // We are done with the NDIS_PACKET: // @@ -457,7 +457,7 @@ Return Value: NPROT_DEREF_OPEN(pOpenContext); // send complete - dequeued send IRP } - + } diff --git a/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp b/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp index 2452d95c4..a0cd915bd 100644 --- a/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp +++ b/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp @@ -12,10 +12,10 @@ Module Name: notify object dll and the Wdf Coinstaller library. --*/ - + #include "Common.hpp" #include -_Analysis_mode_(_Analysis_code_type_user_code_) +_Analysis_mode_(_Analysis_code_type_user_code_) #include #include "ProtNotify_i.c" @@ -61,7 +61,7 @@ DllMain( if (Reason == DLL_PROCESS_ATTACH) { // // Initialize the COM Server module with the object map. - // Do this prior to loading the coinstaller as the detach + // Do this prior to loading the coinstaller as the detach // assumes the Module is initialized. // _Module.Init(ObjectMap, Instance); @@ -159,8 +159,8 @@ HMODULE LoadWdfCoInstaller( ) { - - #pragma prefast(suppress:6262, "Supprress overflow warnings") + + #pragma prefast(suppress:6262, "Supprress overflow warnings") HRESULT hr = S_OK; HMODULE library = NULL; WCHAR coinstaller[MAX_PATH] = {0}; @@ -190,7 +190,7 @@ LoadWdfCoInstaller( // // Load the Wdf Coinstaller library. // -#pragma prefast(suppress:28160, "Suppressing false positive from PFD") +#pragma prefast(suppress:28160, "Suppressing false positive from PFD") library = LoadLibrary(coinstaller); if (library == NULL) { hr = GetLastError(); diff --git a/network/ndis/netvmini/6x/ctrlpath.c b/network/ndis/netvmini/6x/ctrlpath.c index 6a745a360..4e7c1a3df 100644 --- a/network/ndis/netvmini/6x/ctrlpath.c +++ b/network/ndis/netvmini/6x/ctrlpath.c @@ -223,7 +223,7 @@ MPSynchronousOidRequest( Routine Description: - Entry point called by NDIS to get or set the value of a specified + Entry point called by NDIS to get or set the value of a specified synchronous OID. Arguments: @@ -516,7 +516,7 @@ Return Value: #if (NDIS_SUPPORT_NDIS61 && !NDIS_SUPPORT_NDIS620) case OID_PNP_CAPABILITIES: // - // This OID is obsolete for NDIS 6.20 drivers + // This OID is obsolete for NDIS 6.20 drivers // // Return the wake-up capabilities of its NIC. If you return // NDIS_STATUS_NOT_SUPPORTED, NDIS considers the miniport driver @@ -773,7 +773,7 @@ Return Value: case OID_GEN_INTERRUPT_MODERATION: { PNDIS_INTERRUPT_MODERATION_PARAMETERS Moderation = (PNDIS_INTERRUPT_MODERATION_PARAMETERS)Query->InformationBuffer; - Moderation->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; + Moderation->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; Moderation->Header.Revision = NDIS_INTERRUPT_MODERATION_PARAMETERS_REVISION_1; Moderation->Header.Size = NDIS_SIZEOF_INTERRUPT_MODERATION_PARAMETERS_REVISION_1; Moderation->Flags = 0; @@ -906,10 +906,10 @@ Return Value: case OID_RECEIVE_FILTER_FREE_QUEUE: // - // Free the requested receive queue. + // Free the requested receive queue. // Status = NICFreeRxQueue( - Adapter, + Adapter, NdisSetRequest); break; @@ -928,17 +928,17 @@ Return Value: // Status = NICUpdateRxQueue( Adapter, - NdisSetRequest); + NdisSetRequest); break; #endif case OID_PNP_SET_POWER: // - // Update power state + // Update power state // Status = MPSetPower( Adapter, - NdisSetRequest); + NdisSetRequest); break; #if (NDIS_SUPPORT_NDIS680) @@ -962,7 +962,7 @@ Return Value: case OID_PNP_REMOVE_WAKE_UP_PATTERN: case OID_PNP_ENABLE_WAKE_UP: #endif - ASSERT(!"NIC does not support wake on LAN OIDs"); + ASSERT(!"NIC does not support wake on LAN OIDs"); default: Status = NDIS_STATUS_NOT_SUPPORTED; break; @@ -1015,24 +1015,24 @@ Return Value: switch (Oid) { - + #if (NDIS_SUPPORT_NDIS620) case OID_RECEIVE_FILTER_ALLOCATE_QUEUE: // // Allocate the requested receive queue. // Status = NICAllocateRxQueue( - Adapter, + Adapter, NdisRequest); break; case OID_RECEIVE_FILTER_QUEUE_ALLOCATION_COMPLETE: // - // Complete any remaining allocation for receive queues. + // Complete any remaining allocation for receive queues. // Status = NICCompleteAllocationRxQueue( - Adapter, + Adapter, NdisRequest); break; @@ -1305,7 +1305,7 @@ NICAllocateRxQueue( Routine Description: This routine will allocate a receive queue according to the passed in allocation request. It verifies that the request - is well formed, then passes the request to underlying queue management code. + is well formed, then passes the request to underlying queue management code. Arguments: @@ -1321,22 +1321,22 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; struct _METHOD *Method = &NdisMethodRequest->DATA.METHOD_INFORMATION; PNDIS_RECEIVE_QUEUE_PARAMETERS QueueParams = (PNDIS_RECEIVE_QUEUE_PARAMETERS)Method->InformationBuffer; - + PAGED_CODE(); DEBUGP(MP_TRACE, "[%p] ---> NICAllocateRxQueue\n", Adapter); - + do { // // Verify that the request matches our requirements // - VERIFY_OID_METHOD(NdisMethodRequest, - NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, + VERIFY_OID_METHOD(NdisMethodRequest, + NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Method->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1; @@ -1373,7 +1373,7 @@ NICCompleteAllocationRxQueue( Routine Description: This routine will complete any remaining queue allocation, including shared memory. It verifies that the request - is well formed, then passes the request to underlying queue management code. + is well formed, then passes the request to underlying queue management code. Arguments: @@ -1384,7 +1384,7 @@ Return Value: NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1394,21 +1394,21 @@ Return Value: PAGED_CODE(); DEBUGP(MP_TRACE, "[%p] ---> NICCompleteAllocationRxQueue\n", Adapter); - + do { // // Verify that the request matches our requirements // - VERIFY_OID_METHOD(NdisMethodRequest, - NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1, + VERIFY_OID_METHOD(NdisMethodRequest, + NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // - Method->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1+ + Method->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1+ (CompleteArray->NumElements * CompleteArray->ElementSize); // @@ -1417,9 +1417,9 @@ Return Value: Status = CompleteAllocationRxQueue(Adapter, CompleteArray); }while(FALSE); - + DEBUGP(MP_TRACE, "[%p] <--- NICCompleteAllocationRxQueue Status 0x%08x\n", Adapter, Status); - + return Status; } @@ -1432,7 +1432,7 @@ NICFreeRxQueue( Routine Description: This routine will handle the passed in queue free request. It verifies that the request - is well formed, then passes the request to underlying queue management code. + is well formed, then passes the request to underlying queue management code. Arguments: @@ -1452,21 +1452,21 @@ Return Value: PAGED_CODE(); DEBUGP(MP_TRACE, "[%p] ---> NICFreeRxQueue\n", Adapter); - + do { // // Verify that the request matches our requirements // - VERIFY_OID_SET(NdisSetRequest, - NDIS_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1, + VERIFY_OID_SET(NdisSetRequest, + NDIS_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Set->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1; - + // // Default queue cannot be freed // @@ -1478,14 +1478,14 @@ Return Value: } // - // Ready to attempt a free. + // Ready to attempt a free. // Status = FreeRxQueue(Adapter, QueueFreeParams, NdisSetRequest); }while(FALSE); - + DEBUGP(MP_TRACE, "[%p] <--- NICFreeRxQueuee Status 0x%08x\n", Adapter, Status); - + return Status; } @@ -1498,7 +1498,7 @@ NICSetRxFilter( Routine Description: This routine will handle the passed filter set request. It verifies that the request - is well formed, then passes the request to underlying filter management code. + is well formed, then passes the request to underlying filter management code. Arguments: @@ -1509,7 +1509,7 @@ Return Value: NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1523,12 +1523,12 @@ Return Value: // // Verify that the request matches our requirements // - VERIFY_OID_METHOD(NdisMethodRequest, - NDIS_RECEIVE_FILTER_PARAMETERS_REVISION_1, + VERIFY_OID_METHOD(NdisMethodRequest, + NDIS_RECEIVE_FILTER_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_FILTER_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Method->BytesRead = NDIS_SIZEOF_RECEIVE_FILTER_PARAMETERS_REVISION_1; @@ -1536,7 +1536,7 @@ Return Value: // Ready to set Filter // Status = SetRxFilter(Adapter, FilterParams); - + }while(FALSE); return Status; @@ -1551,7 +1551,7 @@ NICClearRxFilter( Routine Description: This routine will handle the passed filter clear request. It verifies that the request - is well formed, then passes the request to underlying filter management code. + is well formed, then passes the request to underlying filter management code. Arguments: @@ -1562,7 +1562,7 @@ Return Value: NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; struct _SET *Set = &NdisSetRequest->DATA.SET_INFORMATION; @@ -1576,15 +1576,15 @@ Return Value: // // Verify that the request matches our requirements // - VERIFY_OID_SET(NdisSetRequest, - NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1, + VERIFY_OID_SET(NdisSetRequest, + NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Set->BytesRead = NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1; - + // // Ready to clear the filter // @@ -1613,15 +1613,15 @@ NICUpdateRxQueue( // // Verify that the request matches our requirements // - VERIFY_OID_SET(NdisSetRequest, - NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, + VERIFY_OID_SET(NdisSetRequest, + NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Set->BytesRead = NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1; - + // // Ready to clear the filter // @@ -1711,7 +1711,7 @@ MPSetPower( /*++ Routine Description: - This routine handles OID_PNP_SET_POWER request. + This routine handles OID_PNP_SET_POWER request. Arguments: @@ -1720,9 +1720,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; struct _SET *Set = &NdisSetRequest->DATA.SET_INFORMATION; @@ -1775,9 +1775,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1799,19 +1799,19 @@ MPSetPowerLow( /*++ Routine Description: - The NIC is about to be transitioned to a low power state. + The NIC is about to be transitioned to a low power state. Prepare the NIC for the sleeping state: - - Disable interrupts and the NIC's DMA engine, cancel timers. - - Save any hardware context that the NIC cannot preserve in - a sleeping state (packet filters, multicast addresses, + - Disable interrupts and the NIC's DMA engine, cancel timers. + - Save any hardware context that the NIC cannot preserve in + a sleeping state (packet filters, multicast addresses, the current MAC address, etc.) - A miniport driver cannot access the NIC hardware after + A miniport driver cannot access the NIC hardware after the NIC has been set to the D3 state by the bus driver. - Miniport drivers NDIS v6.30 and above - Do NOT wait for NDIS to return the ownership of all + Miniport drivers NDIS v6.30 and above + Do NOT wait for NDIS to return the ownership of all NBLs from outstanding receive indications - Retain ownership of all the receive descriptors and + Retain ownership of all the receive descriptors and packet buffers previously owned by the hardware. Arguments: @@ -1821,9 +1821,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; LONG nSendWaitCount = 0; @@ -1837,8 +1837,8 @@ Return Value: #if (NDIS_SUPPORT_NDIS630) // - // Miniport drivers NDIS v6.30 and above are not - // necessarily paused prior the low power transition + // Miniport drivers NDIS v6.30 and above are not + // necessarily paused prior the low power transition // // @@ -1848,7 +1848,7 @@ Return Value: // // Wait for outstanding sends - // Do NOT wait for outstanding receives + // Do NOT wait for outstanding receives // while(Adapter->nBusySend) { @@ -1867,8 +1867,8 @@ Return Value: UNREFERENCED_PARAMETER(nSendWaitCount); // - // Miniport drivers NDIS v6.20 and below are - // paused prior the low power transition + // Miniport drivers NDIS v6.20 and below are + // paused prior the low power transition // ASSERT(MP_TEST_FLAG(Adapter, fMP_ADAPTER_PAUSED)); ASSERT(!NICIsBusy(Adapter)); @@ -1888,7 +1888,7 @@ MPSetRSSv2Parameters( /*++ Routine Description: - This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. + This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. Arguments: @@ -1897,9 +1897,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { struct _SET *Set; @@ -1908,7 +1908,7 @@ Return Value: // // Validate the request // - if (Set->InformationBufferLength < + if (Set->InformationBufferLength < NDIS_SIZEOF_RECEIVE_SCALE_PARAMETERS_V2_REVISION_1) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid InformationBufferLength\n"); @@ -1928,7 +1928,7 @@ MPSetRSSv2IndirectionTableEntries( /*++ Routine Description: - This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. + This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. Arguments: @@ -1937,9 +1937,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { struct _METHOD *Method; @@ -1950,7 +1950,7 @@ Return Value: // // Validate the request // - if (Method->InputBufferLength < + if (Method->InputBufferLength < NDIS_SIZEOF_RSS_SET_INDIRECTION_ENTRIES_REVISION_1) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid InformationBufferLength\n"); diff --git a/network/ndis/netvmini/6x/hardware.h b/network/ndis/netvmini/6x/hardware.h index ddc4c4a32..3b0731b01 100644 --- a/network/ndis/netvmini/6x/hardware.h +++ b/network/ndis/netvmini/6x/hardware.h @@ -130,7 +130,7 @@ C_ASSERT(sizeof(NIC_FRAME_HEADER) == HW_FRAME_HEADER_SIZE); // // Maximum number of receives that will be processed per DPC. -// This constraints the amount of time spent for a single receive DPC. +// This constraints the amount of time spent for a single receive DPC. // #define NIC_MAX_RECVS_PER_DPC 64 @@ -179,9 +179,9 @@ C_ASSERT(sizeof(NIC_FRAME_HEADER) == HW_FRAME_HEADER_SIZE); // and suspend. Ensure the correct flags are set for your hardware. // // If your hardware supports busmaster DMA, you must specify -// NDIS_MINIPORT_ATTRIBUTES_BUS_MASTER. Our virtual miniport will -// not be allocating hardware resources such as interrupts, so we set the -// WDM attribute. +// NDIS_MINIPORT_ATTRIBUTES_BUS_MASTER. Our virtual miniport will +// not be allocating hardware resources such as interrupts, so we set the +// WDM attribute. // #define NIC_ADAPTER_ATTRIBUTES_FLAGS (\ NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM) @@ -239,21 +239,21 @@ C_ASSERT(sizeof(NIC_FRAME_HEADER) == HW_FRAME_HEADER_SIZE); // // The NIC must reserve at least one filter available HW queue. More filters allows // the VMQ queues to be assigned asymmetrically. For this sample we chose to allow -// twice as many filters as queues. +// twice as many filters as queues. // #define NIC_SUPPORTED_NUM_QUEUES 8 #define NIC_MAX_HEADER_FILTERS (NIC_SUPPORTED_NUM_QUEUES*2) // // Determines the minimum and maximum amount of lookahead split that we can do. Real hardware -// might have tighter constraints on the range depending on the HW design. +// might have tighter constraints on the range depending on the HW design. // #define NIC_MIN_LOOKAHEAD_SPLIT 64 #define NIC_MAX_LOOKAHEAD_SPLIT 128 // // Determines the minimum amount of receive blocks we will attempt to allocate if the full allocations fail and -// we retry with a reduced count. If we fail with this amount we fail the allocation. +// we retry with a reduced count. If we fail with this amount we fail the allocation. // #define NIC_MIN_BUSY_RECVS 64 diff --git a/network/ndis/netvmini/6x/miniport.c b/network/ndis/netvmini/6x/miniport.c index 9ec793af1..5526789f2 100644 --- a/network/ndis/netvmini/6x/miniport.c +++ b/network/ndis/netvmini/6x/miniport.c @@ -344,7 +344,7 @@ VOID MPAttachAdapter( _In_ PMP_ADAPTER Adapter) { - MP_LOCK_STATE LockState; + MP_LOCK_STATE LockState; DEBUGP(MP_TRACE, "[%p] ---> MPAttachAdapter\n", Adapter); diff --git a/network/ndis/netvmini/6x/mphal.c b/network/ndis/netvmini/6x/mphal.c index e363f613f..63aff8341 100644 --- a/network/ndis/netvmini/6x/mphal.c +++ b/network/ndis/netvmini/6x/mphal.c @@ -90,7 +90,7 @@ Return Value: case CmResourceTypePort: DEBUGP(MP_INFO, "[%p] IoBaseAddress = 0x%x\n", Adapter, NdisGetPhysicalAddressLow(pResDesc->u.Port.Start)); - DEBUGP(MP_INFO, "[%p] IoRange = x%x\n", Adapter, + DEBUGP(MP_INFO, "[%p] IoRange = x%x\n", Adapter, pResDesc->u.Port.Length); break; @@ -173,7 +173,7 @@ Return Value: NDIS_STATUS Status; PNDIS_CONFIGURATION_PARAMETER Parameter = NULL; NDIS_STRING PermanentAddressKey = RTL_CONSTANT_STRING(NETVMINI_MAC_ADDRESS_KEY); - + UNREFERENCED_PARAMETER(Adapter); PAGED_CODE(); @@ -234,7 +234,7 @@ Return Value: PermanentMacAddress[2] = 0xF2; // - // Generated value based on the current tick count value. + // Generated value based on the current tick count value. // KeQueryTickCount(&TickCountValue); do @@ -455,9 +455,9 @@ HWCopyBytesFromNetBuffer( Routine Description: - Copies the first cbDest bytes from a NET_BUFFER. In order to show how the various data structures fit together, this + Copies the first cbDest bytes from a NET_BUFFER. In order to show how the various data structures fit together, this implementation copies the data by iterating through the MDLs for the NET_BUFFER. The NdisGetDataBuffer API also allows you - to copy a contiguous block of data from a NET_BUFFER. + to copy a contiguous block of data from a NET_BUFFER. Runs at IRQL <= DISPATCH_LEVEL. @@ -496,8 +496,8 @@ Return Value: while (DestOffset < *cbDest && CurrentMdl) { // - // Map MDL memory to System Address Space. LowPagePriority means mapping may fail if - // system is low on memory resources. + // Map MDL memory to System Address Space. LowPagePriority means mapping may fail if + // system is low on memory resources. // PUCHAR SrcMemory = MmGetSystemAddressForMdlSafe(CurrentMdl, LowPagePriority | MdlMappingNoExecute); ULONG Length = MmGetMdlByteCount(CurrentMdl); @@ -526,7 +526,7 @@ Return Value: DestOffset += Length; // - // Get next MDL (if any available) + // Get next MDL (if any available) // CurrentMdl = NDIS_MDL_LINKAGE(CurrentMdl); } @@ -837,12 +837,12 @@ Return Value: // - // For simplicity in the sample in order to support VLAN we extract the information from the NBL or frame and pass the + // For simplicity in the sample in order to support VLAN we extract the information from the NBL or frame and pass the // NDIS_NET_BUFFER_LIST_8021Q_INFO structure to the code that simulates the send/receive. The code does nothing to convert - // modify the frame format. + // modify the frame format. // In real HW, on send the code should extract the information from the NBL and covert it to 802.1Q format for transmission, and // on receive the adapter should detect if the packet is in 802.1Q format and if so convert it back to 802.3 before indicating it up to NDIS - // (populating the 8021Q info in the NBL being indicated). + // (populating the 8021Q info in the NBL being indicated). // Nbl = NBL_FROM_SEND_NB(NetBuffer); Nbl1QInfo.Value = NET_BUFFER_LIST_INFO(Nbl, Ieee8021QNetBufferListInfo); @@ -854,7 +854,7 @@ Return Value: else { DEBUGP(MP_TRACE, "[%p] Send NBL (%p) has no OOB VLAN tag, checking frame header.\n", Adapter, Nbl); - if(IS_FRAME_8021Q(Frame)) + if(IS_FRAME_8021Q(Frame)) { // // The frame has type of 802.1Q. Retrieve the VLAN information @@ -864,9 +864,9 @@ Return Value: } else { - DEBUGP(MP_TRACE, "[%p] Send NBL (%p) has no VLAN information in its frame header.\n", Adapter, Nbl); + DEBUGP(MP_TRACE, "[%p] Send NBL (%p) has no VLAN information in its frame header.\n", Adapter, Nbl); } - } + } RXDeliverFrameToEveryAdapter(Adapter, &Nbl1QInfo, Frame, fAtDispatch); @@ -923,8 +923,8 @@ HWBeginReceiveDma( Routine Description: - Simulate the hardware deciding to receive a FRAME into one of its RCBs. In VMQ enabled scenarios, it will - find the matching queue and if matched retrieve the shared memory for the queue for the NBL. Otherwise, it + Simulate the hardware deciding to receive a FRAME into one of its RCBs. In VMQ enabled scenarios, it will + find the matching queue and if matched retrieve the shared memory for the queue for the NBL. Otherwise, it uses the existing Frame for the NBL. Arguments: @@ -949,7 +949,7 @@ Return Value: DEBUGP(MP_TRACE, "[%p] ---> HWBeginReceiveDma. Frame: 0x%p\n", Adapter, Frame); // - // Preserve 802.1Q information, if specified. + // Preserve 802.1Q information, if specified. // if(Nbl1QInfo->Value) { @@ -963,7 +963,7 @@ Return Value: } // - // If VMQ is enabled, and we're not using the default queue, + // If VMQ is enabled, and we're not using the default queue, // we need to copy the FRAME to the NBL's shared memory area // if(VMQ_ENABLED(Adapter)) @@ -991,12 +991,12 @@ Return Value: NET_BUFFER_DATA_OFFSET(NetBuffer) = 0; NET_BUFFER_CURRENT_MDL(NetBuffer) = NET_BUFFER_FIRST_MDL(NetBuffer); NET_BUFFER_CURRENT_MDL_OFFSET(NetBuffer) = 0; - + } while(FALSE); - + DEBUGP(MP_TRACE, "[%p] <--- HWBeginReceiveDma Status 0x%08x\n", Adapter, Status); return Status; } - + diff --git a/network/ndis/netvmini/6x/mphal.h b/network/ndis/netvmini/6x/mphal.h index 5348545b0..0bcd11e6c 100644 --- a/network/ndis/netvmini/6x/mphal.h +++ b/network/ndis/netvmini/6x/mphal.h @@ -51,7 +51,7 @@ struct _RCB; typedef struct _VLAN_TAG_HEADER { - UCHAR TagInfo[2]; + UCHAR TagInfo[2]; } VLAN_TAG_HEADER, *PVLAN_TAG_HEADER; #define GET_FRAME_VLAN_TAG_HEADER(_Frame)\ diff --git a/network/ndis/netvmini/6x/qos.c b/network/ndis/netvmini/6x/qos.c index a7b2e530b..fe455b1b8 100644 --- a/network/ndis/netvmini/6x/qos.c +++ b/network/ndis/netvmini/6x/qos.c @@ -637,7 +637,7 @@ Return Value: IndicateParameters(Adapter, NDIS_STATUS_QOS_OPERATIONAL_PARAMETERS_CHANGE, OperationalParams); - + NdisFreeMemoryWithTagPriority(NdisDriverHandle, OperationalParams, NIC_TAG_QOS_PARAMS); } else diff --git a/network/ndis/netvmini/6x/rssv2.c b/network/ndis/netvmini/6x/rssv2.c index 1f8efb0e9..f8b3d03b1 100644 --- a/network/ndis/netvmini/6x/rssv2.c +++ b/network/ndis/netvmini/6x/rssv2.c @@ -51,10 +51,10 @@ Routine Description: Vport - Pointer to the VPort - Command - Move command which identifies the steering + Command - Move command which identifies the steering parameter and the target processor. - NewLocalCpuIndex - Local index of the target processor the steering + NewLocalCpuIndex - Local index of the target processor the steering parameter is being pointed to. Return Value: @@ -74,13 +74,13 @@ MiniportApplyConfigurationToHW( _Inout_ PMP_ADAPTER Adapter, _Inout_ PMP_ADAPTER_VPORT VPort, _In_ BOOLEAN IsRssEnabled, - _In_ USHORT NewITCount, + _In_ USHORT NewITCount, _In_ ULONG NewNumberOfQueues ) /*++ Routine Description: - This routine propagates changes as specified by the configuration OID to + This routine propagates changes as specified by the configuration OID to the HW. All failures cases are already handled and before calling this function. @@ -109,7 +109,7 @@ Return Value: UNREFERENCED_PARAMETER(NewITCount); UNREFERENCED_PARAMETER(NewNumberOfQueues); } - + _IRQL_requires_(PASSIVE_LEVEL) NDIS_STATUS @@ -152,8 +152,8 @@ Return Value: // // Allocate the neccessary memory for reading the available processors // - Adapter->RSSData.RssProcessorInfo = - (PNDIS_RSS_PROCESSOR_INFO)ExAllocatePool2(POOL_FLAG_NON_PAGED, + Adapter->RSSData.RssProcessorInfo = + (PNDIS_RSS_PROCESSOR_INFO)ExAllocatePool2(POOL_FLAG_NON_PAGED, RssInfoSize, 'IRMT'); if (Adapter->RSSData.RssProcessorInfo == NULL) @@ -166,7 +166,7 @@ Return Value: Status = NdisGetRssProcessorInformation(Adapter->AdapterHandle, Adapter->RSSData.RssProcessorInfo, &RssInfoSize); - + if (Status != NDIS_STATUS_SUCCESS) { DEBUGP(MP_ERROR, "%s: Unabled to get rss information\n", __FUNCTION__); @@ -174,7 +174,7 @@ Return Value: } Adapter->RSSData.RssProcessorArray = (PNDIS_RSS_PROCESSOR) - ((PUCHAR)Adapter->RSSData.RssProcessorInfo + + ((PUCHAR)Adapter->RSSData.RssProcessorInfo + Adapter->RSSData.RssProcessorInfo->RssProcessorArrayOffset); Status = NDIS_STATUS_SUCCESS; @@ -213,13 +213,13 @@ Return Value: UINT8 index; PNDIS_RSS_PROCESSOR processor; - for (index = 0; - index < Adapter->RSSData.RssProcessorInfo->RssProcessorCount; + for (index = 0; + index < Adapter->RSSData.RssProcessorInfo->RssProcessorCount; index++) { processor = &Adapter->RSSData.RssProcessorArray[index]; - if ((processor->ProcNum.Group == ProcessorNumber.Group) && + if ((processor->ProcNum.Group == ProcessorNumber.Group) && (processor->ProcNum.Number == ProcessorNumber.Number)) { return index; @@ -274,7 +274,7 @@ NICSetRSSv2ValidateRssProcessor( /*++ Routine Description: - This routine validates processor against minport's RSS settings, and if it + This routine validates processor against minport's RSS settings, and if it is valid, returns local index. Arguments: @@ -322,7 +322,7 @@ Return Value: if ((ProcessorNumber.Group == (USHORT)RssProcessorInfo->RssMaxProcessor.Group) && (ProcessorNumber.Number > (UCHAR)RssProcessorInfo->RssMaxProcessor.Number)) { - DEBUGP(MP_ERROR, "RssValidateProcessor: Invalid Proc Number %d:%d, above RssMaxProcNumber\n", + DEBUGP(MP_ERROR, "RssValidateProcessor: Invalid Proc Number %d:%d, above RssMaxProcNumber\n", ProcessorNumber.Group, ProcessorNumber.Number); return FALSE; } @@ -373,7 +373,7 @@ Return Value: VPort->RssEnabled = FALSE; if (!NICSetRSSv2ValidateRssProcessor(Adapter, - PrimaryProcessor, + PrimaryProcessor, &PrimaryProcessorIndex)) { DEBUGP(MP_TRACE, "Primary is not a valid RSS processor.\n"); @@ -393,7 +393,7 @@ Return Value: goto Cleanup; } - RssV2NQEnforcerInitialize(VPort->QueueMap, + RssV2NQEnforcerInitialize(VPort->QueueMap, RSSV2_MAX_NUMBER_OF_PROCESSORS_IN_RSS_TABLE); RtlFillMemory(&VPort->RssV2IndexTable, sizeof(VPort->RssV2IndexTable), 0xFF); @@ -430,7 +430,7 @@ NICSetRSSv2SetCurrentProcessor( /*++ Routine Description: - This routine updates tracking information for the steering parameter + This routine updates tracking information for the steering parameter (Primary, Default or ITE[n]), as selected by the Command. Routine is called after the "move command" has fully succeeded. @@ -474,10 +474,10 @@ Return Value: VPort->RssV2Table[Command->IndirectionTableIndex] = NewProcessor; DEBUGP(MP_TRACE, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: OK: ITE[%d] VPortId %d, RssEnabled %d, TargetProc %d:%d\n", - Command->IndirectionTableIndex, - Command->VPortId, - VPort->RssEnabled, - NewProcessor.Group, + Command->IndirectionTableIndex, + Command->VPortId, + VPort->RssEnabled, + NewProcessor.Group, NewProcessor.Number); } } @@ -495,7 +495,7 @@ NICSetRSSv2ValidateCommandAndGetProcessor ( /*++ Routine Description: - This routine validates the move command, and returns information about + This routine validates the move command, and returns information about specified steering parameter (Primary, Default or ITE[n] if command is valid. Arguments: @@ -504,7 +504,7 @@ Routine Description: Command - Move command used to update steering parameter - CurrentProcessor - Pointer which receives processor where steering + CurrentProcessor - Pointer which receives processor where steering parameter currenty points to. CurrentCpuIndex - Corresponding local index @@ -550,8 +550,8 @@ Return Value: } else { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid IndirectionTableIndex(%d) >= %d\n", - Command->IndirectionTableIndex, + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid IndirectionTableIndex(%d) >= %d\n", + Command->IndirectionTableIndex, VPort->RssV2Params.NumberOfIndirectionTableEntries); } } @@ -572,7 +572,7 @@ NICSetRSSv2Parameters( /*++ Routine Description: - This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. + This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. Arguments: @@ -581,9 +581,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { USHORT EntryIndex; BOOLEAN IsHashInfoChanged; @@ -614,14 +614,14 @@ Return Value: // // Validate the request // - if (RssParams->HashSecretKeySize != + if (RssParams->HashSecretKeySize != NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid HashSecretKeySize\n"); return NDIS_STATUS_INVALID_LENGTH; } - if ((Set->InformationBufferLength < + if ((Set->InformationBufferLength < (RssParams->HashSecretKeyOffset + RssParams->HashSecretKeySize)) || (RssParams->HashSecretKeyOffset < @@ -633,7 +633,7 @@ Return Value: if ((NdisRequest->Flags & NDIS_OID_REQUEST_FLAGS_VPORT_ID_VALID) != 0) { - DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Issued for VPortId=%d, Flags=0x%x \n", + DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Issued for VPortId=%d, Flags=0x%x \n", NdisRequest->VPortId, RssParams->Flags); VPortId = NdisRequest->VPortId; } @@ -643,7 +643,7 @@ Return Value: VPortId = NDIS_INVALID_VPORT_ID; } - if ((VPortId != NDIS_INVALID_VPORT_ID) && + if ((VPortId != NDIS_INVALID_VPORT_ID) && (VPortId >= MAX_NIC_SWITCH_VPORTS)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid VPortId\n"); @@ -659,23 +659,23 @@ Return Value: VPort = &Adapter->RSSData.NativeVPort; } - IsNumQueuesChanged = + IsNumQueuesChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_NUMBER_OF_QUEUES_CHANGED) != 0) && (RssParams->NumberOfQueues != VPort->RssV2Params.NumberOfQueues); - IsRssEnabled = + IsRssEnabled = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_ENABLE_RSS) != 0); - IsNumITEsChanged = + IsNumITEsChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_NUMBER_OF_ENTRIES_CHANGED) != 0) && - (RssParams->NumberOfIndirectionTableEntries != + (RssParams->NumberOfIndirectionTableEntries != VPort->RssV2Params.NumberOfIndirectionTableEntries); - IsHashInfoChanged = + IsHashInfoChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_HASH_INFO_CHANGED) != 0) && (VPort->RssV2Params.HashInformation != RssParams->HashInformation); - IsHashKeyChanged = + IsHashKeyChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_HASH_KEY_CHANGED) != 0) && !RtlEqualMemory(&VPort->RssV2Key, (PUCHAR)RssParams + RssParams->HashSecretKeyOffset, @@ -700,7 +700,7 @@ Return Value: { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId=%d, NQ-Violation (queue change): NQueues=%d < NProcs=%d\n", NdisRequest->VPortId, - NewNumberOfQueues, + NewNumberOfQueues, NumProcs); Status = NDIS_STATUS_NO_QUEUES; goto Cleanup; @@ -730,9 +730,9 @@ Return Value: if ((ProcessorNumber.Group != VPort->RssV2Table[EntryIndex].Group) || (ProcessorNumber.Number != VPort->RssV2Table[EntryIndex].Number)) { - DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Cannot shrink IT size from %d to %d, mismatch at ITE[%d]\n", - NdisRequest->VPortId, - OldITCount, + DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Cannot shrink IT size from %d to %d, mismatch at ITE[%d]\n", + NdisRequest->VPortId, + OldITCount, NewITCount, EntryIndex); Status = NDIS_STATUS_INVALID_DATA; @@ -755,7 +755,7 @@ Return Value: &LocalCpuIndex)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid DedfaultProcessorNumebr: %d:%d \n", - VPort->DefaultProcessorNumber.Group, + VPort->DefaultProcessorNumber.Group, VPort->DefaultProcessorNumber.Number); Status = NDIS_STATUS_INVALID_DATA; @@ -772,12 +772,12 @@ Return Value: ProcessorNumber = VPort->RssV2Table[EntryIndex]; if (!NICSetRSSv2ValidateRssProcessor(Adapter, - ProcessorNumber, + ProcessorNumber, &LocalCpuIndex)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid ITE[%d]: %d:%d \n", EntryIndex, - ProcessorNumber.Group, + ProcessorNumber.Group, ProcessorNumber.Number); Status = NDIS_STATUS_INVALID_DATA; @@ -789,7 +789,7 @@ Return Value: } // - // After VPort->QueueMap is built, check for NQ-violation during + // After VPort->QueueMap is built, check for NQ-violation during // RSS enablement. // // Get number of queues after RSS enablement. @@ -798,7 +798,7 @@ Return Value: if (NumProcs > NewNumberOfQueues) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: NQ-Violation: NQueues=%d < NProcs=%d\n", - NewNumberOfQueues, + NewNumberOfQueues, NumProcs); Status = NDIS_STATUS_NO_QUEUES; goto Cleanup; @@ -813,11 +813,11 @@ Return Value: PrimaryProcessorNumber = VPort->PrimaryProcessorNumber; if (!NICSetRSSv2ValidateRssProcessor(Adapter, - PrimaryProcessorNumber, + PrimaryProcessorNumber, &LocalCpuIndex)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid PrimaryProcessorNumebr: %d:%d \n", - PrimaryProcessorNumber.Group, + PrimaryProcessorNumber.Group, PrimaryProcessorNumber.Number); Status = NDIS_STATUS_INVALID_DATA; @@ -834,7 +834,7 @@ Return Value: // if (IsHashKeyChanged) { - VPort->RssV2Params.HashSecretKeySize = + VPort->RssV2Params.HashSecretKeySize = RssParams->HashSecretKeySize; NdisMoveMemory(&VPort->RssV2Key, @@ -857,7 +857,7 @@ Return Value: // // IT expansion // - DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Expand IT size from %d to %d\n", + DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Expand IT size from %d to %d\n", NdisRequest->VPortId, OldITCount, NewITCount); ASSERT((NewITCount % OldITCount) == 0); @@ -876,7 +876,7 @@ Return Value: // // IT contraction // - DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Shrink IT size from %d to %d\n", + DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Shrink IT size from %d to %d\n", NdisRequest->VPortId, OldITCount, NewITCount); ASSERT((OldITCount % NewITCount) == 0); @@ -893,20 +893,20 @@ Return Value: } // - // Apply new configuration to HW (hash key and information is already in + // Apply new configuration to HW (hash key and information is already in // the VPort object). // - MiniportApplyConfigurationToHW(Adapter, - VPort, + MiniportApplyConfigurationToHW(Adapter, + VPort, IsRssEnabled, - NewITCount, + NewITCount, NewNumberOfQueues); VPort->RssV2Params.NumberOfIndirectionTableEntries = NewITCount; VPort->RssV2Params.NumberOfQueues = NewNumberOfQueues; VPort->RssEnabled = IsRssEnabled; - DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId=%d, RssEnabled=%d, IT.size=%d\n", + DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId=%d, RssEnabled=%d, IT.size=%d\n", NdisRequest->VPortId, IsRssEnabled, VPort->RssV2Params.NumberOfIndirectionTableEntries); Set->BytesNeeded = Set->InformationBufferLength; @@ -928,7 +928,7 @@ NICSetRSSv2IndirectionTableEntries( /*++ Routine Description: - This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. + This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. Arguments: @@ -937,9 +937,9 @@ Routine Description: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { PROCESSOR_NUMBER ActorProcessorNumber; PNDIS_RSS_SET_INDIRECTION_ENTRY Command; @@ -962,10 +962,10 @@ Return Value: PMP_ADAPTER_VPORT VPort; // - // Allocate a local queue map on stack, to hold temporary results during + // Allocate a local queue map on stack, to hold temporary results during // handling of each "move all" group. // - DECLARE_RSSV2_QUEUE_MAP_ON_STACK(LocalQueueMap, + DECLARE_RSSV2_QUEUE_MAP_ON_STACK(LocalQueueMap, RSSV2_MAX_NUMBER_OF_PROCESSORS_IN_RSS_TABLE); DEBUGP(MP_TRACE, "[%p] ---> NICSetRSSv2IndirectionTableEntries\n", Adapter); @@ -976,12 +976,12 @@ Return Value: Method->BytesRead = 0; Method->BytesNeeded = 0; - Method->BytesWritten = 0; + Method->BytesWritten = 0; // // Validate the request // - if (InputBufferLength < + if (InputBufferLength < (NDIS_SIZEOF_RSS_SET_INDIRECTION_ENTRIES_REVISION_1 + RssEntries->NumberOfRssEntries * RssEntries->RssEntrySize)) { @@ -993,7 +993,7 @@ Return Value: // // RSSv2 spec requires up to 130 entries to be handled in a single batch. // - if (RssEntries->NumberOfRssEntries > + if (RssEntries->NumberOfRssEntries > (2 + MAX_NUMBER_OF_INDIRECTION_TABLE_ENTRIES)) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid NumberOfRssEntries \n"); @@ -1011,8 +1011,8 @@ Return Value: ((PUCHAR)RssEntries + RssEntries->RssEntryTableOffset); DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Actor %d:%d, NumberOfRssEntries %d \n", - ActorProcessorNumber.Group, - ActorProcessorNumber.Number, + ActorProcessorNumber.Group, + ActorProcessorNumber.Number, RssEntries->NumberOfRssEntries); NumCommandsToExecute = 0; @@ -1034,18 +1034,18 @@ Return Value: { if (SwitchId != NDIS_DEFAULT_SWITCH_ID) { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid SwitchId (%d)\n", + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid SwitchId (%d)\n", SwitchId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PARAMETER); continue; // while (RssV2FindNextCommandRange()) } if (VPortId > MAX_NIC_SWITCH_VPORTS) { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid VPortId (%d)\n", + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid VPortId (%d)\n", VPortId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PARAMETER); continue; // while (RssV2FindNextCommandRange()) } @@ -1053,19 +1053,19 @@ Return Value: VPort = &Adapter->RSSData.VPort[VPortId]; if (VPort->Created == FALSE) - { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not created\n", + { + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not created\n", VPortId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PARAMETER); continue; // while (RssV2FindNextCommandRange()) } if (VPort->Active == FALSE) - { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not active\n", + { + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not active\n", VPortId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PORT_STATE); continue; // while (RssV2FindNextCommandRange()) } @@ -1080,7 +1080,7 @@ Return Value: while ((Command = RssV2GetNextCommand(&Context, FALSE)) != NULL) { if (!NICSetRSSv2ValidateCommandAndGetProcessor( - VPort, + VPort, Command, &CurrentProcessorNumber, &OldCpuIndex, @@ -1094,12 +1094,12 @@ Return Value: (ActorProcessorNumber.Number != CurrentProcessorNumber.Number)) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPortId=%d, Flags=0x%x, EntryIndex=%d: Invalid Actor %d:%d, expected %d:%d\n", - Command->VPortId, + Command->VPortId, Command->Flags, - Command->IndirectionTableIndex, + Command->IndirectionTableIndex, ActorProcessorNumber.Group, ActorProcessorNumber.Number, - CurrentProcessorNumber.Group, + CurrentProcessorNumber.Group, CurrentProcessorNumber.Number); Command->EntryStatus = NDIS_STATUS_NOT_ACCEPTED; @@ -1116,9 +1116,9 @@ Return Value: (TargetProcessorNumber.Number == CurrentProcessorNumber.Number)) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: OK1: VPortId=%d, Flags=0x%x, EntryIndex=%d: TargetProc=%d:%d\n", - Command->VPortId, + Command->VPortId, Command->Flags, - Command->IndirectionTableIndex, + Command->IndirectionTableIndex, TargetProcessorNumber.Group, TargetProcessorNumber.Number); @@ -1132,16 +1132,16 @@ Return Value: // INACTIVE steering entities are only tracked and will be // enforced during RSS transition to ON/OFF. // - NICSetRSSv2SetCurrentProcessor(VPort, - Command, - TargetProcessorNumber, + NICSetRSSv2SetCurrentProcessor(VPort, + Command, + TargetProcessorNumber, 0xFF); DEBUGP(MP_ERROR, "NDIS_SET_INDIRECTION_TABLE_ENTRY: OK2: VPortId=%d, Flags=0x%x, EntryIndex=%d, TargetProc=%d:%d\n", - Command->VPortId, - Command->Flags, - Command->IndirectionTableIndex, - TargetProcessorNumber.Group, + Command->VPortId, + Command->Flags, + Command->IndirectionTableIndex, + TargetProcessorNumber.Group, TargetProcessorNumber.Number); Command->EntryStatus = NDIS_STATUS_SUCCESS; @@ -1149,7 +1149,7 @@ Return Value: } if (!NICSetRSSv2ValidateRssProcessor(Adapter, - TargetProcessorNumber, + TargetProcessorNumber, &NewCpuIndex)) { Command->EntryStatus = NDIS_STATUS_INVALID_DATA; @@ -1189,7 +1189,7 @@ Return Value: // // VPorts are already validated // - VPort = IsNativeRss ? &Adapter->RSSData.NativeVPort : + VPort = IsNativeRss ? &Adapter->RSSData.NativeVPort : &Adapter->RSSData.VPort[VPortId]; RssV2NQEnforcerEnter(VPort->QueueMap, LocalQueueMap); @@ -1201,7 +1201,7 @@ Return Value: { TargetProcessorNumber = Command->TargetProcessorNumber; IsValid = NICSetRSSv2ValidateRssProcessor(Adapter, - TargetProcessorNumber, + TargetProcessorNumber, &NewCpuIndex); ASSERT(IsValid); @@ -1216,12 +1216,12 @@ Return Value: } Status = RssV2NQEnforcerLeave(VPort->QueueMap, - LocalQueueMap, + LocalQueueMap, VPort->RssV2Params.NumberOfQueues); if (Status != NDIS_STATUS_SUCCESS) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPortId=%d: NQ-violation: NQueues=%d < NProcs=%d\n", - VPortId, + VPortId, VPort->RssV2Params.NumberOfQueues, RssV2NQEnforcerGetNumberOfProcs(LocalQueueMap)); RssV2SetCommandRangeStatus(&Context, Status); @@ -1233,7 +1233,7 @@ Return Value: // // - // Iterate over the same Command range to actually update the + // Iterate over the same Command range to actually update the // processor numbers/indices. // RssV2RestartCommandIterator(&Context); @@ -1242,7 +1242,7 @@ Return Value: { TargetProcessorNumber = Command->TargetProcessorNumber; IsValid = NICSetRSSv2ValidateRssProcessor(Adapter, - TargetProcessorNumber, + TargetProcessorNumber, &NewCpuIndex); ASSERT(IsValid); @@ -1254,16 +1254,16 @@ Return Value: // // Reflect the change in software structure. // - NICSetRSSv2SetCurrentProcessor(VPort, - Command, - TargetProcessorNumber, + NICSetRSSv2SetCurrentProcessor(VPort, + Command, + TargetProcessorNumber, NewCpuIndex); DEBUGP(MP_ERROR, "NDIS_SET_INDIRECTION_TABLE_ENTRY: OK3: VPortId=%d, Flags=0x%x, EntryIndex=%d, TargetProc=%d:%d\n", - Command->VPortId, - Command->Flags, - Command->IndirectionTableIndex, - TargetProcessorNumber.Group, + Command->VPortId, + Command->Flags, + Command->IndirectionTableIndex, + TargetProcessorNumber.Group, TargetProcessorNumber.Number); Command->EntryStatus = NDIS_STATUS_SUCCESS; diff --git a/network/ndis/netvmini/6x/rssv2lib.c b/network/ndis/netvmini/6x/rssv2lib.c index a2bc55507..9bee95834 100644 --- a/network/ndis/netvmini/6x/rssv2lib.c +++ b/network/ndis/netvmini/6x/rssv2lib.c @@ -23,7 +23,7 @@ Module Name: #define PRAGMA_STRUCTURE_PADDED 4324 #define PRAGMA_NO_RETTYPE_FOR_FUNC 4508 #pragma warning(disable: PRAGMA_NO_RETTYPE_FOR_FUNC) -#pragma warning(disable: PRAGMA_ZERO_SIZED_ARRAY) +#pragma warning(disable: PRAGMA_ZERO_SIZED_ARRAY) #pragma warning(disable: PRAGMA_NAMELESS_STRUCT_UNION) #pragma warning(disable: PRAGMA_STRUCTURE_PADDED) #include @@ -63,7 +63,7 @@ Return Value: Context->IsNativeRss = IsNativeRss; Context->RssV2Oid = RssV2Oid; Context->MaxIndex = RssV2Oid->NumberOfRssEntries; - Context->LimitIndex = 0; + Context->LimitIndex = 0; Context->StartIndex = 0; Context->LastStartIndex = 0; } @@ -182,14 +182,14 @@ RssV2GetNextCommand ( /*++ Routine Description: - This routine returns next command from the current command group (which - target the same SwitchId & VPortId). + This routine returns next command from the current command group (which + target the same SwitchId & VPortId). Arguments: Context - parsing context - SkipProcessedCommands - TRUE, if user wants to commands which already + SkipProcessedCommands - TRUE, if user wants to commands which already have EntryStatus changed from NDIS_STATUS_PENDING. FALSE, if user wants to iterate over all commands. @@ -205,14 +205,14 @@ Return Value: { if (Context->StartIndex < Context->LimitIndex) { - command = RSSV2_GET_COMMAND(Context->RssV2Oid, + command = RSSV2_GET_COMMAND(Context->RssV2Oid, Context->StartIndex++); } else { command = NULL; } - } while (SkipProcessedCommands && + } while (SkipProcessedCommands && (command != NULL) && (command->EntryStatus != NDIS_STATUS_PENDING)); @@ -289,7 +289,7 @@ RssV2NQEnforcerGetBitfield ( /*++ Routine Description: - Routine finds a pointer to the bitfield for specified + Routine finds a pointer to the bitfield for specified (RSS-)local processor index. Arguments: @@ -306,8 +306,8 @@ Return Value: { ASSERT(LocalCpuIndex < QueueMap->MaxProcessors); - return (PULONG_PTR)((PUINT8)QueueMap + - sizeof(RSSV2_QUEUE_MAP) + + return (PULONG_PTR)((PUINT8)QueueMap + + sizeof(RSSV2_QUEUE_MAP) + RSSV2_BITFIELD_OFFSET(LocalCpuIndex)); } @@ -320,7 +320,7 @@ RssV2NQEnforceGetReference ( /*++ Routine Description: - Routine finds a pointer to the reference counter for the specified + Routine finds a pointer to the reference counter for the specified (RSS-)local processor index. Arguments: @@ -337,8 +337,8 @@ Return Value: { ASSERT(LocalCpuIndex < QueueMap->MaxProcessors); - return (PUINT8)((PUINT8)QueueMap + - sizeof(RSSV2_QUEUE_MAP) + + return (PUINT8)((PUINT8)QueueMap + + sizeof(RSSV2_QUEUE_MAP) + RSSV2_BITFIELD_SIZE(QueueMap->MaxProcessors) + RSSV2_REFERENCE_OFFSET(LocalCpuIndex)); } @@ -387,7 +387,7 @@ Routine Description: QueueMap - Pointer to the queue map - MaxNumberOfProcessorsInRssTable - Maximum number of processors which + MaxNumberOfProcessorsInRssTable - Maximum number of processors which RSS table can ever contain. Return Value: @@ -410,7 +410,7 @@ RssV2NQEnforcerReference ( /*++ Routine Description: - Routine marks processor as holding a reference. Corresponding bit in + Routine marks processor as holding a reference. Corresponding bit in the bitfiled is set to 1, and reference count is incremented. Arguments: @@ -448,7 +448,7 @@ RssV2NQEnforcerDereference ( Routine Description: Routine removes one reference cause by the processor. Reference count - is decremented, and if it becomes zero, a corresponding bit in + is decremented, and if it becomes zero, a corresponding bit in the bitfiled is cleared to 0. Arguments: @@ -482,7 +482,7 @@ Return Value: VOID RssV2NQEnforcerUpdate ( _Inout_ PRSSV2_QUEUE_MAP QueueMap, - _In_ UINT8 OldCpuIndex, + _In_ UINT8 OldCpuIndex, _In_ UINT8 NewCpuIndex ) /*++ @@ -540,8 +540,8 @@ Return Value: numberOfProcessors = 0; - for (localCpuIndex = 0; - localCpuIndex < QueueMap->MaxProcessors; + for (localCpuIndex = 0; + localCpuIndex < QueueMap->MaxProcessors; localCpuIndex += BITS_PER_WORD) { bitfield = RssV2NQEnforcerGetBitfield(QueueMap, localCpuIndex); @@ -576,9 +576,9 @@ Return Value: --*/ { KeAcquireSpinLockAtDpcLevel(&GlobalQueueMap->SpinLock); - - RtlMoveMemory(LocalQueueMap, - GlobalQueueMap, + + RtlMoveMemory(LocalQueueMap, + GlobalQueueMap, RssV2NQEnforcerGetQueueMapSize(GlobalQueueMap->MaxProcessors)); } @@ -616,9 +616,9 @@ Routine Description: Arguments: GlobalQueueMap - Pointer to the global queue map (e.g. VPort's) visible by - many processors. + many processors. - LocalQueueMap - Pointer to the queue map on stack. If NQ-check succeeds, + LocalQueueMap - Pointer to the queue map on stack. If NQ-check succeeds, the global queue map will be updated from the local copy. If NQ-check fails, local copy will be discarded and global copy is unchanged. @@ -627,10 +627,10 @@ Routine Description: Return Value: - NDIS_STATUS_SUCCESS - if the accumulated local changes lead to valid + NDIS_STATUS_SUCCESS - if the accumulated local changes lead to valid configuration. - - NDIS_STATUS_NO_QUEUES - if the accumulated local configuration exceeds + + NDIS_STATUS_NO_QUEUES - if the accumulated local configuration exceeds QueueLimit. --*/ @@ -639,8 +639,8 @@ Return Value: if (RssV2NQEnforcerGetNumberOfProcs(LocalQueueMap) <= QueueLimit) { - RtlMoveMemory(GlobalQueueMap, - LocalQueueMap, + RtlMoveMemory(GlobalQueueMap, + LocalQueueMap, RssV2NQEnforcerGetQueueMapSize(GlobalQueueMap->MaxProcessors)); status = NDIS_STATUS_SUCCESS; diff --git a/network/ndis/netvmini/6x/rssv2lib.h b/network/ndis/netvmini/6x/rssv2lib.h index 619624ecd..9a867a57f 100644 --- a/network/ndis/netvmini/6x/rssv2lib.h +++ b/network/ndis/netvmini/6x/rssv2lib.h @@ -26,7 +26,7 @@ Revision History: // #if !defined(NDIS_STATUS_NO_QUEUES) #define NDIS_STATUS_NO_QUEUES 0xC0230031L -#endif +#endif #ifdef __cplusplus extern "C" @@ -98,7 +98,7 @@ RssV2SetCommandRangeStatus ( // // Queue map for VPort (or for adapter's in NativeRSS mode) -// +// #define BITS_PER_WORD (sizeof(ULONG_PTR) * 8) #define RSSV2_BITFIELD_OFFSET(_PROC_INDEX_) ((_PROC_INDEX_) / BITS_PER_WORD) #define RSSV2_BITFIELD_SIZE(_MAX_PROC_) \ @@ -112,7 +112,7 @@ typedef struct _RSSV2_QUEUE_MAP // // Members to help enforce "NQ-violation" (per-VPort limit on number of queues) // - KSPIN_LOCK SpinLock; + KSPIN_LOCK SpinLock; // // Maximum number of processors in adapter's RSS table. @@ -124,7 +124,7 @@ typedef struct _RSSV2_QUEUE_MAP // Two variable-size fields follow this structure: // // - Bitmask of referenced processors - // - Array with reference counts for each RSS processor + // - Array with reference counts for each RSS processor // (indexed by a local CPU index, which is relative to RSS table). // // @@ -140,12 +140,12 @@ typedef struct _RSSV2_QUEUE_MAP (PRSSV2_QUEUE_MAP)_alloca(RssV2NQEnforcerGetQueueMapSize(_MAX_PROCS_)) FORCEINLINE -ULONG +ULONG RssV2NQEnforcerGetQueueMapSize ( _In_ ULONG MaxNumberOfProcessorsInRssTable ) { - return sizeof(RSSV2_QUEUE_MAP) + + return sizeof(RSSV2_QUEUE_MAP) + RSSV2_BITFIELD_SIZE(MaxNumberOfProcessorsInRssTable) + RSSV2_REFERENCE_SIZE(MaxNumberOfProcessorsInRssTable); } @@ -176,7 +176,7 @@ RssV2NQEnforcerDereference ( VOID RssV2NQEnforcerUpdate ( _Inout_ PRSSV2_QUEUE_MAP QueueMap, - _In_ UINT8 OldCpuIndex, + _In_ UINT8 OldCpuIndex, _In_ UINT8 NewCpuIndex ); diff --git a/network/ndis/netvmini/6x/tcbrcb.c b/network/ndis/netvmini/6x/tcbrcb.c index 1d2faf50b..1cbeb673b 100644 --- a/network/ndis/netvmini/6x/tcbrcb.c +++ b/network/ndis/netvmini/6x/tcbrcb.c @@ -111,7 +111,7 @@ Return Value: { // // The adapter is no longer in a ready state, so we were not able to take a reference on the - // receive block. Add the RCB back to the free list and fail this receive. + // receive block. Add the RCB back to the free list and fail this receive. // NdisInterlockedInsertTailList( &Adapter->FreeRcbList, @@ -136,14 +136,14 @@ Return Value: // if(Status == NDIS_STATUS_RESOURCES) { - ++Adapter->RxResourceErrors; + ++Adapter->RxResourceErrors; } else if(Status != NDIS_STATUS_INVALID_ADDRESS) { ++Adapter->RxRuntErrors; } // - // Recover RCB + // Recover RCB // ReturnRCB(Adapter, Rcb); Rcb = NULL; @@ -186,7 +186,7 @@ Return Value: --*/ { PUCHAR Data = Rcb->Data; - ASSERT(Data); + ASSERT(Data); DEBUGP(MP_TRACE, "[%p] ---> ReturnRCB. RCB: %p\n", Adapter, Rcb); diff --git a/network/ndis/netvmini/6x/tcbrcb.h b/network/ndis/netvmini/6x/tcbrcb.h index fca8f123c..78f8b5ca9 100644 --- a/network/ndis/netvmini/6x/tcbrcb.h +++ b/network/ndis/netvmini/6x/tcbrcb.h @@ -57,7 +57,7 @@ typedef struct _RCB LIST_ENTRY RcbLink; PNET_BUFFER_LIST Nbl; PVOID Data; -#if (NDIS_SUPPORT_NDIS620) +#if (NDIS_SUPPORT_NDIS620) PVOID LookaheadData; #endif } RCB, *PRCB; diff --git a/network/ndis/netvmini/6x/vmq.c b/network/ndis/netvmini/6x/vmq.c index d4e8fa7c6..942ee009a 100644 --- a/network/ndis/netvmini/6x/vmq.c +++ b/network/ndis/netvmini/6x/vmq.c @@ -325,7 +325,7 @@ Return Value: #if (NDIS_SUPPORT_NDIS630) HwCapabilities.SupportedQueueProperties |= NDIS_RECEIVE_FILTER_DYNAMIC_PROCESSOR_AFFINITY_CHANGE_SUPPORTED; #endif - + HwCapabilities.SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED; HwCapabilities.SupportedHeaders = NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED; HwCapabilities.SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED | NDIS_RECEIVE_FILTER_MAC_HEADER_VLAN_ID_SUPPORTED; diff --git a/network/ndis/netvmini/6x/vmq.h b/network/ndis/netvmini/6x/vmq.h index 5b949e2aa..98224c027 100644 --- a/network/ndis/netvmini/6x/vmq.h +++ b/network/ndis/netvmini/6x/vmq.h @@ -13,7 +13,7 @@ Module Name: Abstract: - This module declares the VMQ related data types, flags, macros, and functions. + This module declares the VMQ related data types, flags, macros, and functions. Revision History: @@ -24,7 +24,7 @@ Revision History: struct _FRAME; struct _RCB; - + #if (NDIS_SUPPORT_NDIS620) @@ -65,8 +65,8 @@ typedef struct _MP_ADAPTER_SHARED_MEMORY } MP_ADAPTER_SHARED_MEMORY, *PMP_ADAPTER_SHARED_MEMORY; // -// The minimum number of shared memory blocks we require. Used when recovering from -// shared memory allocation failures. +// The minimum number of shared memory blocks we require. Used when recovering from +// shared memory allocation failures. // #define NIC_MIN_RECV_ENTRY_ALLOCATION_COUNT 32 @@ -75,20 +75,20 @@ typedef struct _MP_ADAPTER_SHARED_MEMORY // lock. // // -// The queue is initialized, but not yet completed. Receives disabled. +// The queue is initialized, but not yet completed. Receives disabled. // #define fMPAQI_INITIALIZED 0x1 // -// Completion of the queue has started. Receives disabled. +// Completion of the queue has started. Receives disabled. // #define fMPAQI_COMPLETION_STARTED 0x2 // -// Queue completed. Receives enabled. +// Queue completed. Receives enabled. // #define fMPAQI_COMPLETION_FINISHED 0x4 // -// Queue is being freed (pending RefCount). Receives disabled. -// +// Queue is being freed (pending RefCount). Receives disabled. +// #define fMPAQI_FREEING 0x8 // // DMA is being performed for queue @@ -153,7 +153,7 @@ typedef struct DECLSPEC_CACHEALIGN _MP_ADAPTER_QUEUE // PUCHAR RcbMemoryBlock; NDIS_HANDLE RecvNblPoolHandle; - + // // Shared memory information (MP_ADAPTER_SHARED_MEMORY) // @@ -164,12 +164,12 @@ typedef struct DECLSPEC_CACHEALIGN _MP_ADAPTER_QUEUE LIST_ENTRY LookaheadSharedMemoryList; LIST_ENTRY PostLookaheadSharedMemoryList; // - // MP_ADAPTER_SHARED_MEMORY_BLOCK buffers to hold book-keeping info on subdivided shared memory buffers + // MP_ADAPTER_SHARED_MEMORY_BLOCK buffers to hold book-keeping info on subdivided shared memory buffers // PUCHAR LookaheadBlocks; ULONG NumLookaheadBlocks; - PUCHAR PostLookaheadBlocks; - ULONG NumPostLookaheadBlocks; + PUCHAR PostLookaheadBlocks; + ULONG NumPostLookaheadBlocks; // // Data passed in through the VMQ Queue configuration related OIDs @@ -187,7 +187,7 @@ typedef struct DECLSPEC_CACHEALIGN _MP_ADAPTER_QUEUE typedef struct _MP_ADAPTER_FILTER { // - // Whether the receive filter should be used + // Whether the receive filter should be used // BOOLEAN Valid; // @@ -214,11 +214,11 @@ typedef struct _MP_ADAPTER_FILTER // #define fMPVMQD_FILTERING_ENABLED 0x0001 // -// Lookahead split in VMQ indication is enabled on the adapter. +// Lookahead split in VMQ indication is enabled on the adapter. // #define fMPVMQD_LOOKAHEAD_ENABLED 0x0002 // -// VLAN filtering in VMQ is enabled on the adapter. +// VLAN filtering in VMQ is enabled on the adapter. // #define fMPVMQD_VLANFILTER_ENABLED 0x0004 @@ -237,7 +237,7 @@ typedef struct _MP_ADAPTER_FILTER // // The MP_ADAPTER_VMQ_DATA structure is used to track the global VMQ configuration for an adapter -// +// typedef struct _MP_ADAPTER_VMQ_DATA { // @@ -246,7 +246,7 @@ typedef struct _MP_ADAPTER_VMQ_DATA ULONG Flags; // // Individual Queues. The MP_ADAPTER_QUEUE array is not dynamically allocated to reduce - // pointer dereferencing during receives, which can affect performance. + // pointer dereferencing during receives, which can affect performance. // MP_ADAPTER_QUEUE RxQueues[NIC_SUPPORTED_NUM_QUEUES]; // @@ -263,7 +263,7 @@ VOID FreeVMQData( _Inout_ struct _MP_ADAPTER *Adapter); -NDIS_STATUS +NDIS_STATUS ReadRxQueueConfig( _In_ NDIS_HANDLE ConfigurationHandle, _Inout_ struct _MP_ADAPTER *Adapter); @@ -315,7 +315,7 @@ SetRxFilter( ); NDIS_STATUS -ClearRxFilter( +ClearRxFilter( _Inout_ struct _MP_ADAPTER *Adapter, _In_ PNDIS_RECEIVE_FILTER_CLEAR_PARAMETERS FilterParams ); @@ -346,16 +346,16 @@ GetRcbForRxQueue( _In_ PNDIS_NET_BUFFER_LIST_8021Q_INFO Nbl1QInfo, _Outptr_result_maybenull_ struct _RCB **Rcb); -NDIS_STATUS +NDIS_STATUS CopyFrameToRxQueueRcb( _In_ struct _MP_ADAPTER *Adapter, _In_ struct _FRAME *Frame, _In_ PNDIS_NET_BUFFER_LIST_8021Q_INFO Nbl1QInfo, _Inout_ struct _RCB *Rcb, _Out_ BOOLEAN *Copied); - + VOID -RecoverRxQueueRcb( +RecoverRxQueueRcb( _In_ struct _MP_ADAPTER *Adapter, _In_ struct _RCB *Rcb); @@ -369,10 +369,10 @@ AddPendingRcbToRxQueue( #else // -// In order to avoid excessible "#if defined(NDIS620_MINIPORT)" statements scattered -// through the miniport implementation, NDIS60 miniports define -// placeholder macros for the VMQ functions which cause the code to always proceed -// as if VMQ were disabled on the adapter. +// In order to avoid excessible "#if defined(NDIS620_MINIPORT)" statements scattered +// through the miniport implementation, NDIS60 miniports define +// placeholder macros for the VMQ functions which cause the code to always proceed +// as if VMQ were disabled on the adapter. // #define VMQ_ENABLED(_Adapter) FALSE @@ -380,7 +380,7 @@ AddPendingRcbToRxQueue( #define VLAN_FILTER_ENABLED(_Adapter) FALSE #define LOOKAHEAD_SPLIT_REQUIRED(_QueueInfo) FALSE #define AllocateDefaultRxQueue(Adapter) NDIS_STATUS_NOT_SUPPORTED -#define AddPendingRcbToRxQueue(Adapter, Rcb) +#define AddPendingRcbToRxQueue(Adapter, Rcb) #define GetRxQueueDpc(Adapter, QueueId) NULL #define AllocateVMQData(Adapter) NDIS_STATUS_SUCCESS #define FreeVMQData(Adapter) @@ -388,6 +388,6 @@ AddPendingRcbToRxQueue( #define InitializeRxQueueMPConfig(Adapter) NDIS_STATUS_SUCCESS #define CopyFrameToRxQueueRcb(Adapter, Frame, Nbl1QInfo, Rcb, Copied) FALSE #define GetRcbForRxQueue(Adapter, Frame, Nbl1QInfo, Rcb) NDIS_STATUS_NOT_SUPPORTED -#define RecoverRxQueueRcb(Adapter, Rcb) +#define RecoverRxQueueRcb(Adapter, Rcb) #endif diff --git a/network/radio/RadioManagerSample/cpp/SampleRadioInstance.cpp b/network/radio/RadioManagerSample/cpp/SampleRadioInstance.cpp index 08f7e2857..7581f6e82 100644 --- a/network/radio/RadioManagerSample/cpp/SampleRadioInstance.cpp +++ b/network/radio/RadioManagerSample/cpp/SampleRadioInstance.cpp @@ -73,7 +73,7 @@ HRESULT CSampleRadioInstance::_Init(_In_ PCWSTR pszKeyName, _In_ ISampleRadioMan DWORD dwError; WCHAR szInstanceName[128] = {}; DWORD cchInstanceName = ARRAYSIZE(szInstanceName); - + _ATLTRY { _strInstanceId = pszKeyName; @@ -116,9 +116,9 @@ HRESULT CSampleRadioInstance::_Init(_In_ PCWSTR pszKeyName, _In_ ISampleRadioMan // ignore the case when there is no IsMultiComm value in the registry, set ERROR_SUCCESS to continue with _Init dwError = ERROR_SUCCESS; - } + } } - } + } // register the regkey value change event if (ERROR_SUCCESS == dwError) @@ -247,7 +247,7 @@ IFACEMETHODIMP CSampleRadioInstance::GetRadioState(_Out_ DEVICE_RADIO_STATE *pRa } *pRadioState = radioState; - } + } return HRESULT_FROM_WIN32(dwError); } diff --git a/network/radio/RadioManagerSample/cpp/SampleRadioManager.cpp b/network/radio/RadioManagerSample/cpp/SampleRadioManager.cpp index 53bc47571..b0ea213b2 100644 --- a/network/radio/RadioManagerSample/cpp/SampleRadioManager.cpp +++ b/network/radio/RadioManagerSample/cpp/SampleRadioManager.cpp @@ -43,7 +43,7 @@ HRESULT CSampleRadioManager::FinalConstruct() { hr = _AddInstance(strSubKeyName, nullptr); } - + dwCount++; } else @@ -54,7 +54,7 @@ HRESULT CSampleRadioManager::FinalConstruct() } } - + // register the regkey subkey add/remove event if (ERROR_SUCCESS == dwError) { @@ -99,7 +99,7 @@ HRESULT CSampleRadioManager::FinalConstruct() } void CSampleRadioManager::FinalRelease() -{ +{ if ((nullptr != _hRegChangeEvent) && (nullptr != _hEventThread)) { { @@ -135,7 +135,7 @@ IFACEMETHODIMP CSampleRadioManager::GetRadioInstances(_Out_ IRadioInstanceCollec CAutoVectorPtr rgpIRadioInstance; HRESULT hr = S_OK; DWORD cInstance; - + if (nullptr == ppCollection) { return E_INVALIDARG; @@ -194,7 +194,7 @@ IFACEMETHODIMP CSampleRadioManager::OnSystemRadioStateChange( HRESULT hr = S_OK; CAutoPtr spSetSysRadioJob; bool fRefAdded = false; - + spSetSysRadioJob.Attach(new SET_SYS_RADIO_JOB); if (nullptr == spSetSysRadioJob) { @@ -353,7 +353,7 @@ HRESULT CSampleRadioManager::_AddInstance(_In_ PCWSTR pszKeyName, _Out_opt_ IRad if (SUCCEEDED(hr)) { CComPtr spRMInternal = this; - hr = CSampleRadioInstance_CreateInstance(pszKeyName, spRMInternal, &spRadioInstance); + hr = CSampleRadioInstance_CreateInstance(pszKeyName, spRMInternal, &spRadioInstance); } if (SUCCEEDED(hr)) @@ -391,7 +391,7 @@ void CSampleRadioManager::_OnInstanceAddRemove() WCHAR szSubKeyName[128]; DWORD cchSubKeyName; POSITION p; - + // Set all instances as invalid for (p = _listRadioInstances.GetHeadPosition(); p != nullptr; _listRadioInstances.GetNext(p)) { @@ -436,7 +436,7 @@ void CSampleRadioManager::_OnInstanceAddRemove() if(SUCCEEDED(hr)) { _FireEventOnInstanceAdd(spRadioInstance); - } + } } else { diff --git a/network/radio/RadioManagerSample/cpp/dllmain.cpp b/network/radio/RadioManagerSample/cpp/dllmain.cpp index 61d6898bf..1f9ccc0ba 100644 --- a/network/radio/RadioManagerSample/cpp/dllmain.cpp +++ b/network/radio/RadioManagerSample/cpp/dllmain.cpp @@ -21,7 +21,7 @@ EXTERN_C BOOL WINAPI DllMain LPVOID pvReserved ) { - return s_AtlModule.DllMain(dwReason, pvReserved); + return s_AtlModule.DllMain(dwReason, pvReserved); } STDAPI DllCanUnloadNow(void) @@ -30,8 +30,8 @@ STDAPI DllCanUnloadNow(void) } STDAPI DllGetClassObject( - _In_ REFCLSID rclsid, - _In_ REFIID riid, + _In_ REFCLSID rclsid, + _In_ REFIID riid, _Outptr_ LPVOID* ppv ) { diff --git a/network/trans/WFPSampler/exe/Framework_RPCClientInterface.cpp b/network/trans/WFPSampler/exe/Framework_RPCClientInterface.cpp index 41e949ce0..84219df59 100644 --- a/network/trans/WFPSampler/exe/Framework_RPCClientInterface.cpp +++ b/network/trans/WFPSampler/exe/Framework_RPCClientInterface.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -28,7 +28,7 @@ // { // Initialize - Function prepares environment for use. // Terminate - Function cleans up the environment. -// Troubleshoot - Function attempts to provide extra information to diagnose cause +// Troubleshoot - Function attempts to provide extra information to diagnose cause // of failure. // } // @@ -78,7 +78,7 @@ extern "C" { /** @framework_function="MIDL_user_free" - + Purpose: RPC stub routine to allocate memory.

Notes:
@@ -104,7 +104,7 @@ extern "C" /** @framework_function="MIDL_user_free" - + Purpose: RPC stub routine to free allocated memory.

Notes:
@@ -122,7 +122,7 @@ extern "C" /** @private_function="PrvRPCTroubleshootError" - + Purpose: Function to retrieve extended error information about RPC's inner workings.

Notes:
@@ -210,7 +210,7 @@ VOID PrvRPCTroubleshootError() HlprLogInfo(L" [Flags: %#x]", errorInfo.Flags); - HlprLogInfo(L" [NumberOfParameters: %d]", + HlprLogInfo(L" [NumberOfParameters: %d]", errorInfo.NumberOfParameters); for(UINT32 i = 0; @@ -231,7 +231,7 @@ VOID PrvRPCTroubleshootError() pNewLine); HeapFree(GetProcessHeap(), - 0, + 0, errorInfo.Parameters[i].u.AnsiString); break; @@ -243,7 +243,7 @@ VOID PrvRPCTroubleshootError() pNewLine); HeapFree(GetProcessHeap(), - 0, + 0, errorInfo.Parameters[i].u.UnicodeString); break; @@ -280,7 +280,7 @@ VOID PrvRPCTroubleshootError() break; } default: - HlprLogInfo(L" [ParameterType Invalid: %d]%s", + HlprLogInfo(L" [ParameterType Invalid: %d]%s", errorInfo.Parameters[i].ParameterType, pNewLine); } @@ -297,7 +297,7 @@ VOID PrvRPCTroubleshootError() /** @framework_function="RPCClientInterfaceTerminate" - + Purpose: Teardown the RPC client interface by unbinding and freeing the handles.

Notes:
@@ -336,7 +336,7 @@ UINT32 RPCClientInterfaceTerminate() /** @framework_function="RPCClientInterfaceInitialize" - + Purpose: Initialize the RPC client interface by creating a fast binding handle.

Notes:
diff --git a/network/trans/WFPSampler/exe/Framework_WFPSampler.cpp b/network/trans/WFPSampler/exe/Framework_WFPSampler.cpp index 9a0771f5a..d6f7ec87d 100644 --- a/network/trans/WFPSampler/exe/Framework_WFPSampler.cpp +++ b/network/trans/WFPSampler/exe/Framework_WFPSampler.cpp @@ -6,13 +6,13 @@ // Framework_WFPSampler.cpp // // Abstract: -// This module contains functions which form the entry point to our client program +// This module contains functions which form the entry point to our client program // WFPSampler.Exe. // // Naming Convention: // // -// +// // i.e. // // @@ -72,7 +72,7 @@ typedef enum WFPSAMPLER_FLOW_CONTROL_ /** @private_function="PrvFlowControlGet" - + Purpose: Parse the command line parameters for any flow control commands such as:
help (-?) (?) (-help)

@@ -107,7 +107,7 @@ WFPSAMPLER_FLOW_CONTROL PrvFlowControlGet(_In_reads_(stringCount) PCWSTR* ppCLPS break; } - /// This is used for testing purposes only. Generally we should not be touching any other + /// This is used for testing purposes only. Generally we should not be touching any other /// provider's WFP objects, and is grounds for failure in the Hardware Certification Kit. else if(HlprStringsAreEqual(ppCLPStrings[stringIndex], L"-clean") || @@ -125,7 +125,7 @@ WFPSAMPLER_FLOW_CONTROL PrvFlowControlGet(_In_reads_(stringCount) PCWSTR* ppCLPS /** @private_function="PrvScenarioDispatcher" - + Purpose: Route the provider scenario to the appropriate Scenario implementation.

Notes:
@@ -282,7 +282,7 @@ UINT32 PrvScenarioDispatcher(_In_ WFPSAMPLER_SCENARIO scenario, /** @private_function="PrvScenarioGet" - + Purpose: Parse the command line parameters for the scenario (-s ).

Notes:
@@ -375,17 +375,17 @@ WFPSAMPLER_SCENARIO PrvScenarioGet(_In_reads_(stringCount) PCWSTR* ppCLPStrings, /** @private_function="PrvCleanPolicy" - + Purpose: Remove all WFP objects based on the passed in scope.
- default - cleanup all WFPSampler objects except WFPSAMPLER_SUBLAYER and + default - cleanup all WFPSampler objects except WFPSAMPLER_SUBLAYER and WFPSAMPLER_PROVIDER.
- firewall - cleanup all WFP objects from the non-usermode layers except those - that are built-in, the WFPSAMPLER_SUBLAYER, and the + firewall - cleanup all WFP objects from the non-usermode layers except those + that are built-in, the WFPSAMPLER_SUBLAYER, and the WFPSAMPLER_PROVIDER.
- all - cleanup all WFP objects except those that are built-in, the + all - cleanup all WFP objects except those that are built-in, the WFPSAMPLER_SUBLAYER, and the WFPSAMPLER_PROVIDER.

- Notes: All and firewall are meant for testing purposes only. Doing this in a commercial + Notes: All and firewall are meant for testing purposes only. Doing this in a commercial product is grounds for failure in the Microsoft Hardware Certification Kit.

MSDN_Ref:
@@ -693,7 +693,7 @@ UINT32 PrvCleanPolicy(_In_reads_(stringCount) PCWSTR* ppCLPStrings, /** @private_function="PrvLogUsage" - + Purpose: Log usage information to the console.

Notes:
@@ -792,11 +792,11 @@ VOID PrvLogUsage(_In_ UINT32 scenario) { #if(NTDDI_VERSION >= NTDDI_WIN7) - + PendEndpointClosureScenarioLogHelp(); - + #else - + wprintf(L"\n\t\t\t PEND_ENDPOINT_CLOSURE scenario is not supported on this version of Windows \n"); #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -855,7 +855,7 @@ VOID PrvLogUsage(_In_ UINT32 scenario) /** @framework_function="wmain" - Purpose: Entry point for WFPSampler.Exe. Accepts multiple parameters which are parsed and + Purpose: Entry point for WFPSampler.Exe. Accepts multiple parameters which are parsed and dispatched to the rest of the program.

Notes:
diff --git a/network/trans/WFPSampler/exe/HelperFunctions_CommandLine.cpp b/network/trans/WFPSampler/exe/HelperFunctions_CommandLine.cpp index 0223cc85f..076670341 100644 --- a/network/trans/WFPSampler/exe/HelperFunctions_CommandLine.cpp +++ b/network/trans/WFPSampler/exe/HelperFunctions_CommandLine.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -25,7 +25,7 @@ // } // // { -// CommandLine - Function acts on the arguments passed to the command +// CommandLine - Function acts on the arguments passed to the command // line. // DataLinkAddressType - Function pertains to DL_ADDRESS_TYPE values. // EtherType - Function pertains to the Ethernet types. @@ -45,7 +45,7 @@ // } // // { -// Parse - Function pulls data into the required format from the provided +// Parse - Function pulls data into the required format from the provided // data. // } // @@ -99,7 +99,7 @@ /** @private_function="PrvHlprCreateAppContainerSecurityDescriptor" - + Purpose: Create a SECURITY_DESCRIPTOR for use with AppContainer filtering.

Notes:
@@ -263,7 +263,7 @@ PSECURITY_DESCRIPTOR PrvHlprCreateAppContainerSecurityDescriptor() /** @private_function="AppliesToAppContainers" - + Purpose: Determine if the codition should apply to app containers.

Notes: Applies additional logic to:
@@ -296,7 +296,7 @@ BOOLEAN AppliesToAppContainers(_In_reads_(stringCount) PCWSTR* ppCLPStrings, /** @private_function="PrvHlprSIDGet" - + Purpose: Lookup the SID for the provided user.

Notes: The caller is responsible for freeing any allocated memory using HLPR_DELETE_ARRAY.
@@ -370,7 +370,7 @@ UINT32 PrvHlprSIDGet(_In_ PCWSTR pName, if(!IsValidSid(pSID)) { status = ERROR_INVALID_SID; - + HlprLogError(L"PrvHlprSIDGet: IsValidSid() [status: %#x]", status); @@ -378,7 +378,7 @@ UINT32 PrvHlprSIDGet(_In_ PCWSTR pName, } *ppSID = pSID; - + status = NO_ERROR; HLPR_BAIL_LABEL: @@ -395,7 +395,7 @@ UINT32 PrvHlprSIDGet(_In_ PCWSTR pName, /** @private_function="PrvHlprCommandLineStringToFwpMatchType" - + Purpose: Parse a string for a FWP_MATCH_TYPE value.

Notes:
@@ -434,7 +434,7 @@ FWP_MATCH_TYPE PrvHlprCommandLineStringToFwpMatchType(_In_ PCWSTR pMatchType) /** @private_function="PrvHlprEtherTypeParse" - + Purpose: Parse a string for a well known frame type value.

Notes:
@@ -477,7 +477,7 @@ UINT32 PrvHlprEtherTypeParse(_In_ PCWSTR pEtherType) /** @private_function="PrvHlprNDISMediumTypeParse" - + Purpose: Parse a string for a NDIS_MEDIUM value.

Notes:
@@ -595,7 +595,7 @@ UINT32 PrvHlprNDISMediumTypeParse(_In_ PCWSTR pMediumType) /** @private_function="PrvHlprNDISMediumTypeParse" - + Purpose: Parse a string for a NDIS_PHYSICAL_MEDIUM value.

Notes:
@@ -712,7 +712,7 @@ UINT32 PrvHlprNDISPhysicalMediumTypeParse(_In_ PCWSTR pPhysicalMediumType) /** @private_function="PrvHlprDataLinkAddressTypeParse" - + Purpose: Parse a string for an DL_ADDRESS_TYPE value.

Notes:
@@ -746,7 +746,7 @@ UINT8 PrvHlprDataLinkAddressTypeParse(_In_ PCWSTR pDLAddressType) /** @private_function="PrvHlprIPAddressTypeParse" - + Purpose: Parse a string for an NL_ADDRESS_TYPE value.

Notes:
@@ -785,7 +785,7 @@ UINT8 PrvHlprIPAddressTypeParse(_In_ PCWSTR pNLAddressType) /** @private_function="PrvHlprProtocolParse" - + Purpose: Parse a string for a well known protocol value.

Notes:
@@ -816,7 +816,7 @@ UINT32 PrvHlprProtocolParse(_In_ PCWSTR pProtocol) /** @private_function="PrvHlprFwpDirectionParse" - + Purpose: Parse a string for a FWP_DIRECTION value.

Notes:
@@ -845,7 +845,7 @@ UINT32 PrvHlprFwpDirectionParse(_In_ PCWSTR pDirection) /** @helper_function="PrvHlprFwpConditionFlagParse" - + Purpose: Parse a string for a FWP_CONDITION_FLAGS value.

Notes:
@@ -940,7 +940,7 @@ UINT32 PrvHlprFwpConditionFlagParse(_In_ PCWSTR pFlag) /** @private_function="PrvHlprInterfaceTypeParse" - + Purpose: Parse a string for an interface type value.

Notes:
@@ -994,7 +994,7 @@ UINT32 PrvHlprInterfaceTypeParse(_In_ PCWSTR pInterfaceType) /** @private_function="PrvHlprTunnelTypeParse" - + Purpose: Parse a string for a TUNNEL_TYPE value.

Notes:
@@ -1038,7 +1038,7 @@ UINT32 PrvHlprTunnelTypeParse(_In_ PCWSTR pTunnelType) /** @private_function="PrvHlprProfileIDParse" - + Purpose: Parse a string for a NLM_NETWORK_CATEGORY value.

Notes: Function converts from NLM_NETWORK_CATEGORY to NL_INTERFACE_NETWORK_CATEGORY_STATE.
@@ -1083,7 +1083,7 @@ UINT32 PrvHlprProfileIDParse(_In_ PCWSTR pProfileID) /** @private_function="PrvHlprRPCIFFlagParse" - + Purpose: Parse a string for a RPC_FW_IF_FLAG value.

Notes:
@@ -1105,7 +1105,7 @@ UINT32 PrvHlprRPCIFFlagParse(_In_ PCWSTR pFlag) /** @private_function="PrvHlprRPCProtocolParse" - + Purpose: Parse a string for a RPC protocol value.

Notes:
@@ -1139,7 +1139,7 @@ UINT8 PrvHlprRPCProtocolParse(_In_ PCWSTR pProtocol) /** @private_function="PrvHlprRPCAuthTypeParse" - + Purpose: Parse a string for a RPC Auth Type value.

Notes:
@@ -1173,7 +1173,7 @@ UINT32 PrvHlprRPCAuthTypeParse(_In_ PCWSTR pType) /** @private_function="PrvHlprRPCAuthLevelParse" - + Purpose: Parse a string for a RPC Auth Level value.

Notes:
@@ -1227,8 +1227,8 @@ UINT8 PrvHlprRPCAuthLevelParse(_In_ PCWSTR pLevel) /** @private_function="PrvHlprFwpmFilterConditionsSort" - - Purpose: Pare down the filterConditions to only those applicable to the intended layer, and + + Purpose: Pare down the filterConditions to only those applicable to the intended layer, and sort them so identical condition fields are contiguous.

Notes:
@@ -1299,7 +1299,7 @@ UINT32 PrvHlprFwpmFilterConditionsSort(_In_reads_(numFilterConditions) FWPM_FILT /** @private_function="PrvHlprFwpConditionReauthorizeReasonParse" - + Purpose: Parse a string for a FWP_CONDITION_REAUTHORIZE_REASON value.

Notes:
@@ -1365,7 +1365,7 @@ UINT32 PrvHlprFwpConditionReauthorizeReasonParse(_In_ PCWSTR pFlag) /** @private_function="PrvHlprFwpConditionL2FlagParse" - + Purpose: Parse a string for a FWP_CONDITION_L2_FLAGS value.

Notes:
@@ -1396,7 +1396,7 @@ UINT32 PrvHlprFwpConditionL2FlagParse(_In_ PCWSTR pL2Flag) /** @private_function="PrvHlprVSwitchNetworkTypeParse" - + Purpose: Parse a string for an FWP_VSWITCH_NETWORK_TYPE value.

Notes:
@@ -1435,7 +1435,7 @@ UINT8 PrvHlprVSwitchNetworkTypeParse(_In_ PCWSTR pVSwitchNetworkType) /** @private_function="PrvHlprVSwitchNICTypeParse" - + Purpose: Parse a string for an NDIS_SWITCH_NIC_TYPE value.

Notes:
@@ -1477,7 +1477,7 @@ UINT32 PrvHlprVSwitchNICTypeParse(_In_ PCWSTR pNICType) /** @helper_function="HlprCommandLineParseForScenarioRemoval" - + Purpose: Parse the command line parameters for strings which detail:
-r - remove the objects associated with this scenario.
Notes:
@@ -1512,9 +1512,9 @@ VOID HlprCommandLineParseForScenarioRemoval(_In_reads_(stringCount) PCWSTR* ppCL /** @helper_function="HlprCommandLineParseForScenarioRemoval" - + Purpose: Parse the command line parameters for strings which detail:
- -b - mark the filter for boottime use and make the associated objects + -b - mark the filter for boottime use and make the associated objects persistent.
Notes:

@@ -1549,7 +1549,7 @@ VOID HlprCommandLineParseForBootTime(_In_reads_(stringCount) PCWSTR* ppCLPString /** @helper_function="HlprCommandLineParseForCalloutUse" - + Purpose: Parse the command line parameters for strings which detail:
-c - mark the callout to use the appropriate callout.

@@ -1586,7 +1586,7 @@ VOID HlprCommandLineParseForCalloutUse(_In_reads_(stringCount) PCWSTR* ppCLPStri /** @helper_function="HlprCommandLineParseForVolatility" - + Purpose: Parse the command line parameters for strings which detail:
-v - unmark the filter and associated objects as persistent.

@@ -1621,7 +1621,7 @@ VOID HlprCommandLineParseForVolatility(_In_reads_(stringCount) PCWSTR* ppCLPStri /** @helper_function="HlprCommandLineParseForLayerKey" - + Purpose: Parse the command line parameters for strings which detail:
-l - specify at which layer the filter should be added.
Notes:
@@ -1685,7 +1685,7 @@ UINT32 HlprCommandLineParseForLayerKey(_In_reads_(stringCount) PCWSTR* ppCLPStri /** @helper_function="HlprCommandLineParseForSubLayerKey" - + Purpose: Parse the command line parameters for strings which detail:
-s - specify at which sublayer the filter should be added.
Notes:
@@ -1733,8 +1733,8 @@ UINT32 HlprCommandLineParseForSubLayerKey(_In_reads_(stringCount) PCWSTR* ppCLPS /** @helper_function="HlprCommandLineParseForFilterConditions" - - Purpose: Parse the command line parameters for strings which the conditions, match type, and + + Purpose: Parse the command line parameters for strings which the conditions, match type, and value to use.

Notes: If no match type is specified, then MATCH_TYPE_EQUAL is used.
@@ -2349,7 +2349,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p if(pData == 0) { LocalFree(pSID); - + status = (UINT32)STATUS_NO_MEMORY; HLPR_BAIL; @@ -3055,7 +3055,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -3100,7 +3100,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -3222,11 +3222,11 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } - + /// FWPM_CONDITION_NEXTHOP_SUB_INTERFACE_INDEX /// -nhsii /// -nhsii == 0 @@ -3273,7 +3273,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /// FWPM_CONDITION_IP_NEXTHOP_INTERFACE /// -ipnhi - /// -ipnhi == + /// -ipnhi == if(HlprStringsAreEqual(L"-ipnhi", ppCLPStrings[stringIndex])) { @@ -3348,7 +3348,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -3761,7 +3761,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /// FWPM_CONDITION_IP_PHYSICAL_ARRIVAL_INTERFACE /// -ippai - /// -ippai == + /// -ippai == if(HlprStringsAreEqual(L"-ippai", ppCLPStrings[stringIndex])) { @@ -3802,7 +3802,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /// FWPM_CONDITION_IP_PHYSICAL_NEXTHOP_INTERFACE /// -ippnhi - /// -ippnhi == + /// -ippnhi == if(HlprStringsAreEqual(L"-ippnhi", ppCLPStrings[stringIndex])) { @@ -3930,7 +3930,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -3979,7 +3979,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -4028,7 +4028,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -4077,7 +4077,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -4117,7 +4117,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -4162,7 +4162,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -4173,7 +4173,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /// FWPM_CONDITION_IP_LOCAL_INTERFACE \ FWPM_CONDITION_INTERFACE /// -ipli \ -ipi - /// -ipli == + /// -ipli == if(HlprStringsAreEqual(L"-ipli", ppCLPStrings[stringIndex]) || HlprStringsAreEqual(L"-ipi", @@ -4216,7 +4216,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /// FWPM_CONDITION_IP_ARRIVAL_INTERFACE /// -ipai - /// -ipai == + /// -ipai == if(HlprStringsAreEqual(L"-ipai", ppCLPStrings[stringIndex])) { @@ -4291,7 +4291,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -4389,7 +4389,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p continue; } - + /// FWPM_CONDITION_INTERFACE_TYPE \ FWPM_CONDITION_LOCAL_INTERFACE_TYPE /// -it \ -lit /// -it == 0 \ -lit == 0 @@ -4428,7 +4428,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else { status = ERROR_INVALID_PARAMETER; - + HLPR_BAIL; } @@ -4486,7 +4486,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /// FWPM_CONDITION_IP_FORWARD_INTERFACE /// -ipfi - /// -ipfi == + /// -ipfi == if(HlprStringsAreEqual(L"-ipfi", ppCLPStrings[stringIndex])) { @@ -4737,7 +4737,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -6089,7 +6089,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -6130,7 +6130,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -6168,7 +6168,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -6209,7 +6209,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p } tempConditionIndex++; - + continue; } @@ -6224,9 +6224,9 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p { PCWSTR pString = ppCLPStrings[++stringIndex]; UINT32 flag = 0; - + pTempFilterConditions[tempConditionIndex].matchType = PrvHlprCommandLineStringToFwpMatchType(pString); - + if(pTempFilterConditions[tempConditionIndex].matchType == FWP_MATCH_TYPE_MAX) pTempFilterConditions[tempConditionIndex].matchType = FWP_MATCH_EQUAL; else @@ -6236,21 +6236,21 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p else HLPR_BAIL; } - + pTempFilterConditions[tempConditionIndex].fieldKey = FWPM_CONDITION_RPC_EP_FLAGS; pTempFilterConditions[tempConditionIndex].conditionValue.type = FWP_UINT32; - + if(iswdigit((wint_t)pString[0])) flag = wcstol(pString, 0, 0); else flag = PrvHlprRPCIFFlagParse(pString); - + pTempFilterConditions[tempConditionIndex].conditionValue.uint32 = flag; - + tempConditionIndex++; - + continue; } @@ -6620,14 +6620,15 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p BYTE, stringSize); HLPR_BAIL_ON_ALLOC_FAILURE(pByteBlob->data, - status); + + status); RtlCopyMemory(pByteBlob->data, pString, stringSize); - + pByteBlob->size = (UINT32)stringSize; - + pTempFilterConditions[tempConditionIndex].conditionValue.type = FWP_BYTE_BLOB_TYPE; pTempFilterConditions[tempConditionIndex].conditionValue.byteBlob = pByteBlob; } @@ -6682,9 +6683,9 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p RtlCopyMemory(pByteBlob->data, pString, stringSize); - + pByteBlob->size = (UINT32)stringSize; - + pTempFilterConditions[tempConditionIndex].conditionValue.type = FWP_BYTE_BLOB_TYPE; pTempFilterConditions[tempConditionIndex].conditionValue.byteBlob = pByteBlob; } @@ -6721,7 +6722,7 @@ UINT32 HlprCommandLineParseForFilterConditions(_In_reads_(stringCount) PCWSTR* p /** @helper_function="HlprCommandLineParseForFilterInfo" - + Purpose: Parse the command line parameters for strings which detail:
-l - which layer to have the filter reside.
-b - mark the filter and corresponding objects for boot time.
diff --git a/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.cpp b/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.cpp index 5867cd352..b78ff281e 100644 --- a/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.cpp @@ -6,13 +6,13 @@ // Scenarios_AdvancedPacketInjection.cpp // // Abstract: -// This module contains functions which prepares and sends data for the +// This module contains functions which prepares and sends data for the // ADVANCED_PACKET_INJECTION scenario implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -22,20 +22,20 @@ // } // // { -// AdvancedPacketInjectionScenario - Function pertains to Advanced Packet Injection +// AdvancedPacketInjectionScenario - Function pertains to Advanced Packet Injection // Scenario. // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service // Log - Function writes to the console. -// Parse - Function pulls data into the required format from +// Parse - Function pulls data into the required format from // the provided data. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // InjectionData - Function acts on the // PC_ADVANCED_PACKET_INJECTION_DATA. @@ -62,7 +62,7 @@ /** @private_function="PrvAdvancedPacketInjectionScenarioParseInjectionData" - + Purpose: Parse the command line parameters for implementing packet injection such as:
Perform the injection inline (from within the classify) (-in)
Use threaded DPCs for out of band (asynchronous) (-tdpc)
@@ -107,9 +107,9 @@ UINT32 PrvAdvancedPacketInjectionScenarioParseInjectionData(_In_reads_(stringCou ppCLPStrings[stringIndex])) { pPCAdvancedPacketInjectionData->useThreadedDPC = TRUE; - + found++; - + continue; } @@ -150,7 +150,7 @@ UINT32 PrvAdvancedPacketInjectionScenarioParseInjectionData(_In_reads_(stringCou /** @scenario_function="AdvancedPacketInjectionScenarioExecute" - Purpose: Gather and package data neccessary to setup the ADVANCED_PACKET_INJECTION scenario, + Purpose: Gather and package data neccessary to setup the ADVANCED_PACKET_INJECTION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -190,7 +190,7 @@ UINT32 AdvancedPacketInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* pp PC_ADVANCED_PACKET_INJECTION_DATA); HLPR_BAIL_ON_ALLOC_FAILURE(pPCAdvancedPacketInjectionData, status); - + status = PrvAdvancedPacketInjectionScenarioParseInjectionData(ppCLPStrings, stringCount, pPCAdvancedPacketInjectionData); @@ -221,7 +221,7 @@ UINT32 AdvancedPacketInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* pp /** @public_function="AdvancedPacketInjectionScenarioLogHelp" - + Purpose: Log usage information for the ADVANCED_PACKET_INJECTION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.h b/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.h index 809a9de70..3ffde6581 100644 --- a/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.h +++ b/network/trans/WFPSampler/exe/Scenarios_AdvancedPacketInjection.h @@ -6,7 +6,7 @@ // Scenarios_AdvancedPacketInjection.h // // Abstract: -// This module contains prototypes for functions which run the specified +// This module contains prototypes for functions which run the specified // ADVANCED_PACKET_INJECTION scenario. // // Author: diff --git a/network/trans/WFPSampler/exe/Scenarios_AppContainers.cpp b/network/trans/WFPSampler/exe/Scenarios_AppContainers.cpp index 7022a87a7..d76c0edfc 100644 --- a/network/trans/WFPSampler/exe/Scenarios_AppContainers.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_AppContainers.cpp @@ -6,13 +6,13 @@ // Scenarios_AppContainers.cpp // // Abstract: -// This module contains functions which prepares and sends data for the APPLICATION_CONTAINER +// This module contains functions which prepares and sends data for the APPLICATION_CONTAINER // scenario implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -26,10 +26,10 @@ // } // // { -// Execute - Function packages data and invokes RPC to the WFPSampler +// Execute - Function packages data and invokes RPC to the WFPSampler // service. // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the provided +// Parse - Function pulls data into the required format from the provided // data. // } // @@ -59,7 +59,7 @@ /** @private_function="PrvAppContainerScenarioParseDataForModifiers" - + Purpose: Parse the command line parameters for any scenario modifiers such as:
trust Windows Service Hardening (-trustWSH)
add own filters for containers (-distrustWSH)
@@ -148,7 +148,7 @@ UINT32 PrvAppContainerScenarioParseDataForModifiers(_In_reads_(stringCount) PCWS /** @scenario_function="AppContainerScenarioExecute" - Purpose: Gather and package data neccessary to setup the APPLICATION_CONTAINER scenario, + Purpose: Gather and package data neccessary to setup the APPLICATION_CONTAINER scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -196,7 +196,7 @@ UINT32 AppContainerScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStrings, /** @public_function="AppContainerScenarioLogHelp" - + Purpose: Log usage information to the console for the APP_CONTAINER scenario.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_AppContainers.h b/network/trans/WFPSampler/exe/Scenarios_AppContainers.h index 8e14799e5..01ea870da 100644 --- a/network/trans/WFPSampler/exe/Scenarios_AppContainers.h +++ b/network/trans/WFPSampler/exe/Scenarios_AppContainers.h @@ -6,7 +6,7 @@ // Scenarios_AppContainers.h // // Abstract: -// This module contains prototypes for functions which prepares and sends data for the +// This module contains prototypes for functions which prepares and sends data for the // APPLICATION_CONTAINER scenario implementation. // // Author: diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicAction.cpp b/network/trans/WFPSampler/exe/Scenarios_BasicAction.cpp index 35a3aa6e6..f13d08db2 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicAction.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_BasicAction.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -38,7 +38,7 @@ // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // RandomizedData - Function acts on the PC_BASIC_ACTION_DATA. // } @@ -68,7 +68,7 @@ /** @private_function="PrvBasicActionScenarioParseRandomizedData" - + Purpose: Parse the command line parameters for implementing randomization such as:
Random chance of returning block (-rab PERCENTAGE)
Random chance of returning continue (-rac PERCENTAGE)
@@ -176,7 +176,7 @@ UINT32 PrvBasicActionScenarioParseRandomizedData(_In_reads_(stringCount) PCWSTR* pPCBasicActionData->percentPermit = 100 - (pPCBasicActionData->percentBlock + pPCBasicActionData->percentContinue); } - if((pPCBasicActionData->percentBlock + + if((pPCBasicActionData->percentBlock + pPCBasicActionData->percentContinue + pPCBasicActionData->percentPermit) > 100) { @@ -191,7 +191,7 @@ UINT32 PrvBasicActionScenarioParseRandomizedData(_In_reads_(stringCount) PCWSTR* /** @scenario_function="BasicActionBlockScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_ACTION_BLOCK scenario, then + Purpose: Gather and package data neccessary to setup the BASIC_ACTION_BLOCK scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -244,7 +244,7 @@ UINT32 BasicActionBlockScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStri /** @scenario_function="BasicActionContinueScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_ACTION_CONTINUE scenario, + Purpose: Gather and package data neccessary to setup the BASIC_ACTION_CONTINUE scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -300,7 +300,7 @@ UINT32 BasicActionContinueScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPS /** @scenario_function="BasicActionPermitScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_ACTION_PERMIT scenario, then + Purpose: Gather and package data neccessary to setup the BASIC_ACTION_PERMIT scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -356,7 +356,7 @@ UINT32 BasicActionPermitScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStr /** @scenario_function="BasicActionRandomScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_ACTION_RANDOM scenario, then + Purpose: Gather and package data neccessary to setup the BASIC_ACTION_RANDOM scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -426,7 +426,7 @@ UINT32 BasicActionRandomScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStr /** @public_function="BasicActionScenarioLogHelp" - + Purpose: Log usage information for the BASIC_ACTION* scenarios to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.cpp b/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.cpp index f97ab002a..2566eb82d 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.cpp @@ -6,13 +6,13 @@ // Scenarios_BasicPacketExamination.cpp // // Abstract: -// This module contains functions which prepares and sends data for the +// This module contains functions which prepares and sends data for the // BASIC_PACKET_EXAMINATION scenario implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -26,13 +26,13 @@ // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service. // Log - Function writes to the console. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // ExaminationFlags - Function acts on the . // } @@ -61,7 +61,7 @@ /** @private_function="PrvScenarioBasicPacketExaminationParseExaminationFlags" - + Purpose: Parse the command line parameters for implementing packet examination such as:
Log while under lock (-lul)
Log the FWPS_INCOMING_VALUES (-liv)
@@ -192,7 +192,7 @@ UINT32 PrvScenarioBasicPacketExaminationParseExaminationFlags(_In_reads_(stringC /** @scenario_function="BasicPacketExaminationScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_PACKET_EXAMINATION scenario, + Purpose: Gather and package data neccessary to setup the BASIC_PACKET_EXAMINATION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -250,7 +250,7 @@ UINT32 BasicPacketExaminationScenarioExecute(_In_reads_(stringCount) PCWSTR* ppC /** @public_function="BasicPacketExaminationScenarioLogHelp" - + Purpose: Log usage information for the BASIC_PACKET_EXAMINATION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.h b/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.h index 22f21a02c..15865b523 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.h +++ b/network/trans/WFPSampler/exe/Scenarios_BasicPacketExamination.h @@ -6,7 +6,7 @@ // Scenarios_BasicPacketExamination.h // // Abstract: -// This module contains prototypes for functions which run the specified +// This module contains prototypes for functions which run the specified // BASIC_PACKET_EXAMINATION scenario. // // Author: diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicPacketInjection.cpp b/network/trans/WFPSampler/exe/Scenarios_BasicPacketInjection.cpp index f6046a832..7365e292b 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicPacketInjection.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_BasicPacketInjection.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -26,15 +26,15 @@ // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // InjectionData - Function acts on the PC_BASIC_PACKET_INJECTION_DATA. // } @@ -61,7 +61,7 @@ /** @private_function="PrvBasicPacketInjectionScenarioParseInjectionData" - + Purpose: Parse the command line parameters for implementing packet injection such as:
Perform the injection inline (from within the classify) (-in)
Use threaded DPCs for out of band (asynchronous) (-tdpc)
@@ -105,9 +105,9 @@ UINT32 PrvBasicPacketInjectionScenarioParseInjectionData(_In_reads_(stringCount) ppCLPStrings[stringIndex])) { pPCBasicPacketInjectionData->useThreadedDPC = TRUE; - + found++; - + continue; } @@ -129,7 +129,7 @@ UINT32 PrvBasicPacketInjectionScenarioParseInjectionData(_In_reads_(stringCount) /** @scenario_function="BasicPacketInjectionScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_PACKET_INJECTION scenario, + Purpose: Gather and package data neccessary to setup the BASIC_PACKET_INJECTION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -169,7 +169,7 @@ UINT32 BasicPacketInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLP PC_BASIC_PACKET_INJECTION_DATA); HLPR_BAIL_ON_ALLOC_FAILURE(pPCBasicPacketInjectionData, status); - + status = PrvBasicPacketInjectionScenarioParseInjectionData(ppCLPStrings, stringCount, pPCBasicPacketInjectionData); @@ -200,7 +200,7 @@ UINT32 BasicPacketInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLP /** @public_function="BasicPacketInjectionScenarioLogHelp" - + Purpose: Log usage information for the BASIC_PACKET_INJECTION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.cpp b/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.cpp index ccc36ca24..d21f371f7 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.cpp @@ -6,13 +6,13 @@ // Scenarios_BasicPacketModification.cpp // // Abstract: -// This module contains functions which prepares and sends data for the +// This module contains functions which prepares and sends data for the // BASIC_PACKET_MODIFICATION scenario implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -22,21 +22,21 @@ // } // // { -// BasicPacketModificationScenario - Function pertains to Basic Packet Modification +// BasicPacketModificationScenario - Function pertains to Basic Packet Modification // Scenario. // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service. // Log - Function writes to the console. -// Parse - Function pulls data into the required format from +// Parse - Function pulls data into the required format from // the provided data. // } // // { // ModificationData - Function acts on modification data. -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // } // @@ -55,7 +55,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for specifying a different sublayer, +// December 13, 2013 - 1.1 - Add support for specifying a different sublayer, // modifying the interfaceIndex, and set the original // traffic data in the providerContext. // @@ -65,7 +65,7 @@ /** @private_function="PrvBasicPacketModificationScenarioParseModificationData" - + Purpose: Parse the command line parameters for modifying packets such as:
Perform the injection inline (from within the classify) (-in)
Use threaded DPCs for out of band (asynchronous) (-tdpc)
@@ -126,8 +126,8 @@ UINT32 PrvBasicPacketModificationScenarioParseModificationData(_In_reads_(string ppCLPStrings[stringIndex])) { pPCBasicPacketModificationData->useThreadedDPC = TRUE; - - + + continue; } @@ -464,7 +464,7 @@ UINT32 PrvBasicPacketModificationScenarioParseModificationData(_In_reads_(string /** @scenario_function="BasicPacketModificationScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_PACKET_MODIFICATION scenario, + Purpose: Gather and package data neccessary to setup the BASIC_PACKET_MODIFICATION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -536,7 +536,7 @@ UINT32 BasicPacketModificationScenarioExecute(_In_reads_(stringCount) PCWSTR* pp /** @public_function="BasicPacketModificationScenarioLogHelp" - + Purpose: Log usage information for the BASIC_PACKET_MODIFICATION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.h b/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.h index c9472be22..b6cdc050c 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.h +++ b/network/trans/WFPSampler/exe/Scenarios_BasicPacketModification.h @@ -6,7 +6,7 @@ // Scenarios_BasicPacketModification.h // // Abstract: -// This module contains prototypes for functions which run the specified +// This module contains prototypes for functions which run the specified // BASIC_PACKET_MODIFICATION scenario. // // Author: diff --git a/network/trans/WFPSampler/exe/Scenarios_BasicStreamInjection.cpp b/network/trans/WFPSampler/exe/Scenarios_BasicStreamInjection.cpp index c92c87d71..ca6f2fbea 100644 --- a/network/trans/WFPSampler/exe/Scenarios_BasicStreamInjection.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_BasicStreamInjection.cpp @@ -6,13 +6,13 @@ // Scenarios_BasicStreamInjection.cpp // // Abstract: -// This module contains functions which prepares and sends data for the BASIC_STREAM_INJECTION +// This module contains functions which prepares and sends data for the BASIC_STREAM_INJECTION // scenario implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -22,20 +22,20 @@ // } // // { -// BasicStreamInjectionScenario - Function pertains to the Basic Stream Injection +// BasicStreamInjectionScenario - Function pertains to the Basic Stream Injection // Scenario. // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service. // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // InjectionData - Function acts on the PC_BASIC_STREAM_INJECTION_DATA. // } @@ -62,7 +62,7 @@ /** @private_function="PrvBasicStreamInjectionScenarioParseInjectionData" - + Purpose: Parse the command line parameters for implementing stream injection such as:
Perform the injection inline (from within the classify) (-in)
Use threaded DPCs for out of band (asynchronous) (-tdpc)
@@ -106,20 +106,20 @@ UINT32 PrvBasicStreamInjectionScenarioParseInjectionData(_In_reads_(stringCount) ppCLPStrings[stringIndex])) { pPCBasicStreamInjectionData->useThreadedDPC = TRUE; - + found++; - + continue; } - + /// Work Items if(HlprStringsAreEqual(L"-wi", ppCLPStrings[stringIndex])) { pPCBasicStreamInjectionData->useWorkItems = TRUE; - + found++; - + continue; } } @@ -130,7 +130,7 @@ UINT32 PrvBasicStreamInjectionScenarioParseInjectionData(_In_reads_(stringCount) /** @scenario_function="BasicStreamInjectionScenarioExecute" - Purpose: Gather and package data neccessary to setup the BASIC_STREAM_INJECTION scenario, + Purpose: Gather and package data neccessary to setup the BASIC_STREAM_INJECTION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -201,7 +201,7 @@ UINT32 BasicStreamInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLP /** @public_function="BasicStreamInjectionScenarioLogHelp" - + Purpose: Log usage information for the BASIC_STREAM_INJECTION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_FastPacketInjection.cpp b/network/trans/WFPSampler/exe/Scenarios_FastPacketInjection.cpp index b506bbb90..a617a831e 100644 --- a/network/trans/WFPSampler/exe/Scenarios_FastPacketInjection.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_FastPacketInjection.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -26,15 +26,15 @@ // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // } // @@ -60,7 +60,7 @@ /** @scenario_function="FastPacketInjectionScenarioExecute" - Purpose: Gather and package data neccessary to setup the FAST_PACKET_INJECTION scenario, + Purpose: Gather and package data neccessary to setup the FAST_PACKET_INJECTION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -114,7 +114,7 @@ UINT32 FastPacketInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPS /** @public_function="FastPacketInjectionScenarioLogHelp" - + Purpose: Log usage information for the FAST_PACKET_INJECTION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_FastStreamInjection.cpp b/network/trans/WFPSampler/exe/Scenarios_FastStreamInjection.cpp index 9ddd883c3..84b771e1f 100644 --- a/network/trans/WFPSampler/exe/Scenarios_FastStreamInjection.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_FastStreamInjection.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -26,15 +26,15 @@ // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // } // @@ -60,7 +60,7 @@ /** @scenario_function="FastStreamInjectionScenarioExecute" - Purpose: Gather and package data neccessary to setup the FAST_STREAM_INJECTION scenario, + Purpose: Gather and package data neccessary to setup the FAST_STREAM_INJECTION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -125,7 +125,7 @@ UINT32 FastStreamInjectionScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPS /** @public_function="FastStreamInjectionScenarioLogHelp" - + Purpose: Log usage information for the FAST_STREAM_INJECTION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_FlowAssociation.cpp b/network/trans/WFPSampler/exe/Scenarios_FlowAssociation.cpp index 341f071b2..1959b0fb8 100644 --- a/network/trans/WFPSampler/exe/Scenarios_FlowAssociation.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_FlowAssociation.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -26,15 +26,15 @@ // } // // { -// Execute - Function packages data and invokes RPC to the +// Execute - Function packages data and invokes RPC to the // WFPSampler service // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // // { -// Help - Function provides context sensitive help for the +// Help - Function provides context sensitive help for the // scenario. // } // @@ -58,7 +58,7 @@ /** @private_function="PrvFlowAssociationScenarioParseFlowAsociationData" - + Purpose: Parse the command line parameters for implementing flow association such as:
Associate context with the scenario callout for the layer (-aws)

@@ -144,7 +144,7 @@ UINT32 PrvFlowAssociationScenarioParseFlowAsociationData(_In_reads_(stringCount) index++) { stringIndex++; - + if(stringIndex < stringCount) { PCWSTR pString = ppCLPStrings[stringIndex]; @@ -214,7 +214,7 @@ UINT32 PrvFlowAssociationScenarioParseFlowAsociationData(_In_reads_(stringCount) /** @scenario_function="FlowAssociationScenarioExecute" - Purpose: Gather and package data neccessary to setup the FLOW_ASSOCIATION scenario, + Purpose: Gather and package data neccessary to setup the FLOW_ASSOCIATION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -285,7 +285,7 @@ UINT32 FlowAssociationScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStrin /** @public_function="FlowAssociationScenarioLogHelp" - + Purpose: Log usage information for the FLOW_ASSOCIATION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.cpp b/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.cpp index 055c6acb7..7edcd4210 100644 --- a/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.cpp @@ -6,13 +6,13 @@ // Scenarios_PendAuthorization.cpp // // Abstract: -// This module contains functions which prepares and sends data for the PEND_AUTHORIZATION +// This module contains functions which prepares and sends data for the PEND_AUTHORIZATION // scenario implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -27,10 +27,10 @@ // } // // { -// Execute - Function packages data and invokes RPC to the WFPSampler +// Execute - Function packages data and invokes RPC to the WFPSampler // service. // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // @@ -53,8 +53,8 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for specifying a different sublayer, change -// parameter, and limit scenario to only supported +// December 13, 2013 - 1.1 - Add support for specifying a different sublayer, change +// parameter, and limit scenario to only supported // layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -63,7 +63,7 @@ /** @private_function="PrvPendAuthorizationScenarioParseAuthorizationData" - + Purpose: Parse the command line parameters for pending authorization data such as:
delay before callout returns (-d DELAY_IN_MS)
final action - BLOCK (-fab)
@@ -141,9 +141,9 @@ UINT32 PrvPendAuthorizationScenarioParseAuthorizationData(_In_reads_(stringCount ppCLPStrings[stringIndex])) { pPCPendAuthorizationData->useThreadedDPC = TRUE; - + found++; - + continue; } @@ -169,7 +169,7 @@ UINT32 PrvPendAuthorizationScenarioParseAuthorizationData(_In_reads_(stringCount /** @scenario_function="PendAuthorizationScenarioExecute" - Purpose: Gather and package data neccessary to setup the PEND_AUTHORIZATION scenario, then + Purpose: Gather and package data neccessary to setup the PEND_AUTHORIZATION scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -240,7 +240,7 @@ UINT32 PendAuthorizationScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStr /** @public_function="PendAuthorizationScenarioLogHelp" - + Purpose: Log usage information for the PEND_AUTHORIZATION scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.h b/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.h index 67b10f887..e5627b792 100644 --- a/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.h +++ b/network/trans/WFPSampler/exe/Scenarios_PendAuthorization.h @@ -6,7 +6,7 @@ // Scenarios_PendAuthorization.h // // Abstract: -// This module contains prototypes for functions which run the specified PEND_AUTHORIZATION +// This module contains prototypes for functions which run the specified PEND_AUTHORIZATION // scenario. // // Author: diff --git a/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.cpp b/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.cpp index 98a1375c3..5cf1fb793 100644 --- a/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -27,10 +27,10 @@ // } // // { -// Execute - Function packages data and invokes RPC to the WFPSampler +// Execute - Function packages data and invokes RPC to the WFPSampler // service. // Log - Function writes to the console. -// Parse - Function pulls data into the required format from the +// Parse - Function pulls data into the required format from the // provided data. // } // @@ -62,7 +62,7 @@ /** @private_function="PrvPendEndpointClosureScenarioParseClosureData" - + Purpose: Parse the command line parameters for closure data such as:
delay before callout returns (-p DELAY_IN_MS)

@@ -116,9 +116,9 @@ UINT32 PrvPendEndpointClosureScenarioParseClosureData(_In_reads_(stringCount) PC ppCLPStrings[stringIndex])) { pPCPendEndpointClosureData->useThreadedDPC = TRUE; - + found++; - + continue; } @@ -140,7 +140,7 @@ UINT32 PrvPendEndpointClosureScenarioParseClosureData(_In_reads_(stringCount) PC /** @scenario_function="PendEndpointClosureScenarioExecute" - Purpose: Gather and package data neccessary to setup the PEND_ENDPOINT_CLOSURE scenario, + Purpose: Gather and package data neccessary to setup the PEND_ENDPOINT_CLOSURE scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes: This scenario is only supported on Win7+.
@@ -225,7 +225,7 @@ UINT32 PendEndpointClosureScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPS /** @public_function="PendEndpointClosureScenarioLogHelp" - + Purpose: Log usage information for the PEND_ENDPOINT_CLOSURE scenario to the console.

Notes:
diff --git a/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.h b/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.h index 5fd330959..1ac6c4f4d 100644 --- a/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.h +++ b/network/trans/WFPSampler/exe/Scenarios_PendEndpointClosure.h @@ -6,7 +6,7 @@ // Scenarios_PendEndpointClosure.h // // Abstract: -// This module contains prototypes for functions which run the specified PEND_ENDPOINT_CLOSURE +// This module contains prototypes for functions which run the specified PEND_ENDPOINT_CLOSURE // scenario. // // Author: diff --git a/network/trans/WFPSampler/exe/Scenarios_Proxy.cpp b/network/trans/WFPSampler/exe/Scenarios_Proxy.cpp index efd0ab8b3..a07213c1f 100644 --- a/network/trans/WFPSampler/exe/Scenarios_Proxy.cpp +++ b/network/trans/WFPSampler/exe/Scenarios_Proxy.cpp @@ -6,13 +6,13 @@ // Scenarios_Proxy.cpp // // Abstract: -// This module contains functions which prepares and sends data for the PROXY scenario +// This module contains functions which prepares and sends data for the PROXY scenario // implementation. // // Naming Convention: // // -// +// // i.e. // // @@ -63,7 +63,7 @@ /** @private_function="PrvProxyScenarioParseProxyData" - + Purpose: Parse the command line parameters for proxying data such as:
Proxy to local address (-pla IP_ADDRESS)
Proxy to local port (-plp PORT)
@@ -431,20 +431,20 @@ UINT32 PrvProxyScenarioParseProxyData(_In_reads_(stringCount) PCWSTR* ppCLPStrin ppCLPStrings[stringIndex])) { pPCProxyData->useThreadedDPC = TRUE; - + found++; - + continue; } - + /// Work Items if(HlprStringsAreEqual(L"-wi", ppCLPStrings[stringIndex])) { pPCProxyData->useWorkItems = TRUE; - + found++; - + continue; } } @@ -478,7 +478,7 @@ UINT32 PrvProxyScenarioParseProxyData(_In_reads_(stringCount) PCWSTR* ppCLPStrin /** @scenario_function="ProxyScenarioExecute" - Purpose: Gather and package data neccessary to setup the PROXY scenario, then invoke RPC to + Purpose: Gather and package data neccessary to setup the PROXY scenario, then invoke RPC to implement the scenario in the WFPSampler service.

Notes:
@@ -603,7 +603,7 @@ UINT32 ProxyScenarioExecute(_In_reads_(stringCount) PCWSTR* ppCLPStrings, /** @public_function="ProxyScenarioLogHelp" - + Purpose: Log usage information for the PROXY scenario to the console.

Notes:
@@ -657,7 +657,7 @@ VOID ProxyScenarioLogHelp() wprintf(L"\n\t\t Note: if the layer specified is FWPM_LAYER_OUTBOUND_TRANSPORT_V{4/6}:"); wprintf(L"\n\t\t\tIf proxying the ports, then you must specify the protocol (-ipp) and the original port being modified (-iprp and / or -iplp)"); wprintf(L"\n\t\t\tIf proxying the addresses, then you must specify the the original address (-ipra and / or -ipla)"); - wprintf(L"\n"); + wprintf(L"\n"); return; } diff --git a/network/trans/WFPSampler/idl/WFPSamplerRPC.IDL b/network/trans/WFPSampler/idl/WFPSamplerRPC.IDL index 10d0a3fa1..daacf880c 100644 --- a/network/trans/WFPSampler/idl/WFPSamplerRPC.IDL +++ b/network/trans/WFPSampler/idl/WFPSamplerRPC.IDL @@ -45,7 +45,7 @@ interface IWFPSampler typedef enum { - IPPROTO_HOPOPTS = 0, + IPPROTO_HOPOPTS = 0, IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, IPPROTO_GGP = 3, @@ -111,7 +111,7 @@ interface IWFPSampler BYTE pDestinationMACAddress[8]; }MAC_DATA; - + typedef struct IP_DATA_ { UINT32 flags; diff --git a/network/trans/WFPSampler/inc/Identifiers.h b/network/trans/WFPSampler/inc/Identifiers.h index 161c19a0a..bb956da8a 100644 --- a/network/trans/WFPSampler/inc/Identifiers.h +++ b/network/trans/WFPSampler/inc/Identifiers.h @@ -80,7 +80,7 @@ static const GUID WFPSAMPLER_WPP_TRACE = FWPM_SESSION Keys **/ -static const GUID WFPSAMPLER_SESSION_KM = +static const GUID WFPSAMPLER_SESSION_KM = { /* 53504657-6D61-5F70-5365-7373696F6E4B */ 0x53504657, @@ -89,7 +89,7 @@ static const GUID WFPSAMPLER_SESSION_KM = {0x53, 0x65, 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x4B} }; -static const GUID WFPSAMPLER_SESSION_UM = +static const GUID WFPSAMPLER_SESSION_UM = { /* 53504657-6D61-5F70-5365-7373696F6E55 */ 0x53504657, @@ -103,7 +103,7 @@ static const GUID WFPSAMPLER_SESSION_UM = FWPM_PROVIDER Key **/ -static const GUID WFPSAMPLER_PROVIDER = +static const GUID WFPSAMPLER_PROVIDER = { /* 53504657-6D61-5F70-5072-6F7669646572 */ 0x53504657, @@ -112,7 +112,7 @@ static const GUID WFPSAMPLER_PROVIDER = {0x50, 0x72, 0x6F, 0x76, 0x69, 0x64, 0x65, 0x72} }; -static const GUID WFPSAMPLERPROXYSERVICE_PROVIDER = +static const GUID WFPSAMPLERPROXYSERVICE_PROVIDER = { /* 50504657-7653-6370-5072-6F7669646572 */ 0x50504657, @@ -125,7 +125,7 @@ static const GUID WFPSAMPLERPROXYSERVICE_PROVIDER = FWPM_SUBLAYER Key **/ -static const GUID WFPSAMPLER_SUBLAYER = +static const GUID WFPSAMPLER_SUBLAYER = { /* 53504657-6D61-5F70-5375-624C61796572 */ 0x53504657, @@ -134,7 +134,7 @@ static const GUID WFPSAMPLER_SUBLAYER = {0x53, 0x75, 0x62, 0x4C, 0x61, 0x79, 0x65, 0x72} }; -static const GUID WFPSAMPLERPROXYSERVICE_SUBLAYER = +static const GUID WFPSAMPLERPROXYSERVICE_SUBLAYER = { /* 50504657-7653-6370-5375-624C61796572 */ 0x50504657, @@ -150,7 +150,7 @@ static const GUID WFPSAMPLERPROXYSERVICE_SUBLAYER = #ifndef ADVANCED_PACKET_INJECTION #define ADVANCED_PACKET_INJECTION -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION = { /* 53504657-6D61-5F70-4361-6C6C415049FF */ 0x53504657, @@ -159,7 +159,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION = {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504900 */ 0x53504657, @@ -168,7 +168,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504902 */ 0x53504657, @@ -177,7 +177,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504904 */ 0x53504657, @@ -186,7 +186,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_IPPAC {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504906 */ 0x53504657, @@ -195,7 +195,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_IPPAC {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504908 */ 0x53504657, @@ -204,7 +204,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4150490A */ 0x53504657, @@ -213,7 +213,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4150490C */ 0x53504657, @@ -222,7 +222,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4150490E */ 0x53504657, @@ -231,7 +231,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504910 */ 0x53504657, @@ -240,7 +240,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504912 */ 0x53504657, @@ -249,7 +249,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504918 */ 0x53504657, @@ -258,7 +258,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_DATAGRAM_DATA_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4150491A */ 0x53504657, @@ -267,7 +267,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_DATAGRAM_DATA_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4150491C */ 0x53504657, @@ -276,7 +276,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4150491E */ 0x53504657, @@ -285,7 +285,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504920 */ 0x53504657, @@ -294,7 +294,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_ICMP_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504922 */ 0x53504657, @@ -303,7 +303,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_ICMP_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4150492C */ 0x53504657, @@ -312,7 +312,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_RECV_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4150492E */ 0x53504657, @@ -321,7 +321,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_RECV_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504930 */ 0x53504657, @@ -330,7 +330,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_CONNE {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504932 */ 0x53504657, @@ -339,7 +339,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_AUTH_CONNE {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504934 */ 0x53504657, @@ -348,7 +348,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_FLOW_ESTAB {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504936 */ 0x53504657, @@ -357,7 +357,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_ALE_FLOW_ESTAB {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C41504938 */ 0x53504657, @@ -366,7 +366,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_MAC_FR {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C41504939 */ 0x53504657, @@ -375,7 +375,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_MAC_F {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4150493A */ 0x53504657, @@ -384,7 +384,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INBOUND_MAC_FR {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4150493B */ 0x53504657, @@ -393,7 +393,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_OUTBOUND_MAC_F {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C41504946 */ 0x53504657, @@ -402,7 +402,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_STREAM_PACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C41504947 */ 0x53504657, @@ -411,7 +411,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_STREAM_PACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C41504948 */ 0x53504657, @@ -420,7 +420,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_INGRESS_VSWITC {0x43, 0x61, 0x6C, 0x6C, 0x41, 0x50, 0x49, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C41504949 */ 0x53504657, @@ -434,7 +434,7 @@ static const GUID WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION_AT_EGRESS_VSWITCH #ifndef BASIC_ACTION_BLOCK #define BASIC_ACTION_BLOCK -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK = { /* 53504657-6D61-5F70-4361-6C6C424142FF */ 0x53504657, @@ -443,7 +443,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414200 */ 0x53504657, @@ -452,7 +452,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_IPPACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414202 */ 0x53504657, @@ -461,7 +461,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_IPPACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414204 */ 0x53504657, @@ -470,7 +470,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_IPPACKET_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414206 */ 0x53504657, @@ -479,7 +479,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_IPPACKET_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414208 */ 0x53504657, @@ -488,7 +488,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241420A */ 0x53504657, @@ -497,7 +497,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241420C */ 0x53504657, @@ -506,7 +506,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_TRANSPORT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241420E */ 0x53504657, @@ -515,7 +515,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_TRANSPORT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414210 */ 0x53504657, @@ -524,7 +524,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_TRANSPORT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414212 */ 0x53504657, @@ -533,7 +533,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_TRANSPORT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414214 */ 0x53504657, @@ -542,7 +542,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414216 */ 0x53504657, @@ -551,7 +551,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x16} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414218 */ 0x53504657, @@ -560,7 +560,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_DATAGRAM_DATA_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241421A */ 0x53504657, @@ -569,7 +569,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_DATAGRAM_DATA_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241421C */ 0x53504657, @@ -578,7 +578,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_ICMP_ERROR_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241421E */ 0x53504657, @@ -587,7 +587,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_ICMP_ERROR_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414220 */ 0x53504657, @@ -596,7 +596,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_ICMP_ERROR_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414222 */ 0x53504657, @@ -605,7 +605,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_ICMP_ERROR_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_ASSIGNMENT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_ASSIGNMENT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414224 */ 0x53504657, @@ -614,7 +614,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_ASSIGNME {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x24} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_ASSIGNMENT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_ASSIGNMENT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414226 */ 0x53504657, @@ -623,7 +623,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_ASSIGNME {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x26} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_LISTEN_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_LISTEN_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414228 */ 0x53504657, @@ -632,7 +632,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_LISTEN_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x28} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_LISTEN_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_LISTEN_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241422A */ 0x53504657, @@ -641,7 +641,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_LISTEN_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x2A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241422C */ 0x53504657, @@ -650,7 +650,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_RECV_ACCEPT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241422E */ 0x53504657, @@ -659,7 +659,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_RECV_ACCEPT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414230 */ 0x53504657, @@ -668,7 +668,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_CONNECT_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414232 */ 0x53504657, @@ -677,7 +677,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_AUTH_CONNECT_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414234 */ 0x53504657, @@ -686,7 +686,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_FLOW_ESTABLISHED_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414236 */ 0x53504657, @@ -695,7 +695,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_FLOW_ESTABLISHED_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414238 */ 0x53504657, @@ -704,7 +704,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_MAC_FRAME_ETH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414239 */ 0x53504657, @@ -713,7 +713,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_MAC_FRAME_ET {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241423A */ 0x53504657, @@ -722,7 +722,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INBOUND_MAC_FRAME_NAT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241423B */ 0x53504657, @@ -731,7 +731,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_OUTBOUND_MAC_FRAME_NA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_RELEASE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_RELEASE_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241423E */ 0x53504657, @@ -740,7 +740,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_RELEASE_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x3E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_RELEASE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_RELEASE_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241423F */ 0x53504657, @@ -749,7 +749,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_RESOURCE_RELEASE_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x3F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_ENDPOINT_CLOSURE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_ENDPOINT_CLOSURE_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414240 */ 0x53504657, @@ -758,7 +758,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_ENDPOINT_CLOSURE_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x40} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_ENDPOINT_CLOSURE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_ENDPOINT_CLOSURE_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414241 */ 0x53504657, @@ -767,7 +767,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_ENDPOINT_CLOSURE_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x41} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_CONNECT_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_CONNECT_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414242 */ 0x53504657, @@ -776,7 +776,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_CONNECT_REDIRECT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x42} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_CONNECT_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_CONNECT_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414243 */ 0x53504657, @@ -785,7 +785,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_CONNECT_REDIRECT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x43} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_BIND_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_BIND_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414244 */ 0x53504657, @@ -794,7 +794,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_BIND_REDIRECT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x44} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_BIND_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_BIND_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414245 */ 0x53504657, @@ -803,7 +803,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_ALE_BIND_REDIRECT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x45} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414246 */ 0x53504657, @@ -812,7 +812,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_PACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414247 */ 0x53504657, @@ -821,7 +821,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_STREAM_PACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414248 */ 0x53504657, @@ -830,7 +830,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_ETHER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414249 */ 0x53504657, @@ -839,7 +839,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_ETHERN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x49} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241424A */ 0x53504657, @@ -848,7 +848,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x4A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241424B */ 0x53504657, @@ -857,7 +857,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_INGRESS_VSWITCH_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x4B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241424C */ 0x53504657, @@ -866,7 +866,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x42, 0x4C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241424D */ 0x53504657, @@ -880,7 +880,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK_AT_EGRESS_VSWITCH_TRANSP #ifndef BASIC_ACTION_CONTINUE #define BASIC_ACTION_CONTINUE -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE = { /* 53504657-6D61-5F70-4361-6C6C424143FF */ 0x53504657, @@ -889,7 +889,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414300 */ 0x53504657, @@ -898,7 +898,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_IPPACKET_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414302 */ 0x53504657, @@ -907,7 +907,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_IPPACKET_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414304 */ 0x53504657, @@ -916,7 +916,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_IPPACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414306 */ 0x53504657, @@ -925,7 +925,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_IPPACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414308 */ 0x53504657, @@ -934,7 +934,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241430A */ 0x53504657, @@ -943,7 +943,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241430C */ 0x53504657, @@ -952,7 +952,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_TRANSPORT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241430E */ 0x53504657, @@ -961,7 +961,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_TRANSPORT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414310 */ 0x53504657, @@ -970,7 +970,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_TRANSPORT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414312 */ 0x53504657, @@ -979,7 +979,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_TRANSPORT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414314 */ 0x53504657, @@ -988,7 +988,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414316 */ 0x53504657, @@ -997,7 +997,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x16} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414318 */ 0x53504657, @@ -1006,7 +1006,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_DATAGRAM_DATA_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241431A */ 0x53504657, @@ -1015,7 +1015,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_DATAGRAM_DATA_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241431C */ 0x53504657, @@ -1024,7 +1024,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_ICMP_ERROR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241431E */ 0x53504657, @@ -1033,7 +1033,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_ICMP_ERROR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414320 */ 0x53504657, @@ -1042,7 +1042,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_ICMP_ERRO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414322 */ 0x53504657, @@ -1051,7 +1051,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_ICMP_ERRO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_ASSIGNMENT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_ASSIGNMENT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414324 */ 0x53504657, @@ -1060,7 +1060,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_ASSIG {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x24} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_ASSIGNMENT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_ASSIGNMENT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414326 */ 0x53504657, @@ -1069,7 +1069,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_ASSIG {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x26} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_LISTEN_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_LISTEN_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414328 */ 0x53504657, @@ -1078,7 +1078,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_LISTEN_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x28} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_LISTEN_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_LISTEN_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241432A */ 0x53504657, @@ -1087,7 +1087,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_LISTEN_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x2A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241432C */ 0x53504657, @@ -1096,7 +1096,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_RECV_ACCE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241432E */ 0x53504657, @@ -1105,7 +1105,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_RECV_ACCE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414330 */ 0x53504657, @@ -1114,7 +1114,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_CONNECT_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414332 */ 0x53504657, @@ -1123,7 +1123,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_AUTH_CONNECT_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414334 */ 0x53504657, @@ -1132,7 +1132,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_FLOW_ESTABLISH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414336 */ 0x53504657, @@ -1141,7 +1141,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_FLOW_ESTABLISH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414338 */ 0x53504657, @@ -1150,7 +1150,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_MAC_FRAME_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414339 */ 0x53504657, @@ -1159,7 +1159,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_MAC_FRAME {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241433A */ 0x53504657, @@ -1168,7 +1168,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INBOUND_MAC_FRAME_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241433B */ 0x53504657, @@ -1177,7 +1177,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_OUTBOUND_MAC_FRAME {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_RELEASE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_RELEASE_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241433E */ 0x53504657, @@ -1186,7 +1186,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_RELEA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x3E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_RELEASE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_RELEASE_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241433F */ 0x53504657, @@ -1195,7 +1195,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_RESOURCE_RELEA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x3F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_ENDPOINT_CLOSURE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_ENDPOINT_CLOSURE_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414340 */ 0x53504657, @@ -1204,7 +1204,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_ENDPOINT_CLOSU {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x40} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_ENDPOINT_CLOSURE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_ENDPOINT_CLOSURE_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414341 */ 0x53504657, @@ -1213,7 +1213,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_ENDPOINT_CLOSU {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x41} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_CONNECT_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_CONNECT_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414342 */ 0x53504657, @@ -1222,7 +1222,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_CONNECT_REDIRE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x42} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_CONNECT_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_CONNECT_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414343 */ 0x53504657, @@ -1231,7 +1231,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_CONNECT_REDIRE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x43} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_BIND_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_BIND_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414344 */ 0x53504657, @@ -1240,7 +1240,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_BIND_REDIRECT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x44} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_BIND_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_BIND_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414345 */ 0x53504657, @@ -1249,7 +1249,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_ALE_BIND_REDIRECT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x45} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42414346 */ 0x53504657, @@ -1258,7 +1258,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_PACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42414347 */ 0x53504657, @@ -1267,7 +1267,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_STREAM_PACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414348 */ 0x53504657, @@ -1276,7 +1276,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_ET {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42414349 */ 0x53504657, @@ -1285,7 +1285,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_ETH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x49} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241434A */ 0x53504657, @@ -1294,7 +1294,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x4A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241434B */ 0x53504657, @@ -1303,7 +1303,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x4B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241434C */ 0x53504657, @@ -1312,7 +1312,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x43, 0x4C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241434D */ 0x53504657, @@ -1326,7 +1326,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRA #ifndef BASIC_ACTION_PERMIT #define BASIC_ACTION_PERMIT -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT = { /* 53504657-6D61-5F70-4361-6C6C424150FF */ 0x53504657, @@ -1335,7 +1335,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415000 */ 0x53504657, @@ -1344,7 +1344,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415002 */ 0x53504657, @@ -1353,7 +1353,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415004 */ 0x53504657, @@ -1362,7 +1362,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_IPPACKET_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415006 */ 0x53504657, @@ -1371,7 +1371,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_IPPACKET_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415008 */ 0x53504657, @@ -1380,7 +1380,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241500A */ 0x53504657, @@ -1389,7 +1389,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241500C */ 0x53504657, @@ -1398,7 +1398,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_TRANSPORT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241500E */ 0x53504657, @@ -1407,7 +1407,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_TRANSPORT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415010 */ 0x53504657, @@ -1416,7 +1416,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_TRANSPORT_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415012 */ 0x53504657, @@ -1425,7 +1425,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_TRANSPORT_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415014 */ 0x53504657, @@ -1434,7 +1434,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415016 */ 0x53504657, @@ -1443,7 +1443,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x16} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415018 */ 0x53504657, @@ -1452,7 +1452,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_DATAGRAM_DATA_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241501A */ 0x53504657, @@ -1461,7 +1461,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_DATAGRAM_DATA_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241501C */ 0x53504657, @@ -1470,7 +1470,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_ICMP_ERROR_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241501E */ 0x53504657, @@ -1479,7 +1479,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_ICMP_ERROR_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415020 */ 0x53504657, @@ -1488,7 +1488,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_ICMP_ERROR_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415022 */ 0x53504657, @@ -1497,7 +1497,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_ICMP_ERROR_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_ASSIGNMENT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_ASSIGNMENT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415024 */ 0x53504657, @@ -1506,7 +1506,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_ASSIGNM {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x24} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_ASSIGNMENT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_ASSIGNMENT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415026 */ 0x53504657, @@ -1515,7 +1515,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_ASSIGNM {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x26} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_LISTEN_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_LISTEN_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415028 */ 0x53504657, @@ -1524,7 +1524,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_LISTEN_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x28} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_LISTEN_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_LISTEN_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241502A */ 0x53504657, @@ -1533,7 +1533,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_LISTEN_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x2A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241502C */ 0x53504657, @@ -1542,7 +1542,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_RECV_ACCEPT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241502E */ 0x53504657, @@ -1551,7 +1551,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_RECV_ACCEPT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415030 */ 0x53504657, @@ -1560,7 +1560,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_CONNECT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415032 */ 0x53504657, @@ -1569,7 +1569,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_AUTH_CONNECT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415034 */ 0x53504657, @@ -1578,7 +1578,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_FLOW_ESTABLISHED {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415036 */ 0x53504657, @@ -1587,7 +1587,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_FLOW_ESTABLISHED {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415038 */ 0x53504657, @@ -1596,7 +1596,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_MAC_FRAME_ET {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415039 */ 0x53504657, @@ -1605,7 +1605,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_MAC_FRAME_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241503A */ 0x53504657, @@ -1614,7 +1614,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_MAC_FRAME_NA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241503B */ 0x53504657, @@ -1623,7 +1623,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_OUTBOUND_MAC_FRAME_N {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_RELEASE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_RELEASE_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241503E */ 0x53504657, @@ -1632,7 +1632,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_RELEASE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x3E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_RELEASE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_RELEASE_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241503F */ 0x53504657, @@ -1641,7 +1641,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_RESOURCE_RELEASE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x3F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_ENDPOINT_CLOSURE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_ENDPOINT_CLOSURE_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415040 */ 0x53504657, @@ -1650,7 +1650,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_ENDPOINT_CLOSURE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x40} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_ENDPOINT_CLOSURE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_ENDPOINT_CLOSURE_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415041 */ 0x53504657, @@ -1659,7 +1659,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_ENDPOINT_CLOSURE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x41} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_CONNECT_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_CONNECT_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415042 */ 0x53504657, @@ -1668,7 +1668,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_CONNECT_REDIRECT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x42} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_CONNECT_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_CONNECT_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415043 */ 0x53504657, @@ -1677,7 +1677,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_CONNECT_REDIRECT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x43} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_BIND_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_BIND_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415044 */ 0x53504657, @@ -1686,7 +1686,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_BIND_REDIRECT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x44} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_BIND_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_BIND_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415045 */ 0x53504657, @@ -1695,7 +1695,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_ALE_BIND_REDIRECT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x45} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415046 */ 0x53504657, @@ -1704,7 +1704,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_PACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415047 */ 0x53504657, @@ -1713,7 +1713,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_STREAM_PACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415048 */ 0x53504657, @@ -1722,7 +1722,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_ETHE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415049 */ 0x53504657, @@ -1731,7 +1731,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_ETHER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x49} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241504A */ 0x53504657, @@ -1740,7 +1740,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_TRAN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x4A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241504B */ 0x53504657, @@ -1749,7 +1749,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INGRESS_VSWITCH_TRAN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x4B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241504C */ 0x53504657, @@ -1758,7 +1758,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x50, 0x4C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241504D */ 0x53504657, @@ -1772,7 +1772,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_EGRESS_VSWITCH_TRANS #ifndef BASIC_ACTION_RANDOM #define BASIC_ACTION_RANDOM -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM = { /* 53504657-6D61-5F70-4361-6C6C424152FF */ 0x53504657, @@ -1781,7 +1781,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415200 */ 0x53504657, @@ -1790,7 +1790,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_IPPACKET_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415202 */ 0x53504657, @@ -1799,7 +1799,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_IPPACKET_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415204 */ 0x53504657, @@ -1808,7 +1808,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_IPPACKET_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415206 */ 0x53504657, @@ -1817,7 +1817,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_IPPACKET_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415208 */ 0x53504657, @@ -1826,7 +1826,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241520A */ 0x53504657, @@ -1835,7 +1835,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241520C */ 0x53504657, @@ -1844,7 +1844,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_TRANSPORT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241520E */ 0x53504657, @@ -1853,7 +1853,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_TRANSPORT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415210 */ 0x53504657, @@ -1862,7 +1862,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_TRANSPORT_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415212 */ 0x53504657, @@ -1871,7 +1871,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_TRANSPORT_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415214 */ 0x53504657, @@ -1880,7 +1880,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415216 */ 0x53504657, @@ -1889,7 +1889,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x16} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415218 */ 0x53504657, @@ -1898,7 +1898,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_DATAGRAM_DATA_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241521A */ 0x53504657, @@ -1907,7 +1907,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_DATAGRAM_DATA_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241521C */ 0x53504657, @@ -1916,7 +1916,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_ICMP_ERROR_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241521E */ 0x53504657, @@ -1925,7 +1925,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_ICMP_ERROR_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415220 */ 0x53504657, @@ -1934,7 +1934,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_ICMP_ERROR_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415222 */ 0x53504657, @@ -1943,7 +1943,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_ICMP_ERROR_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_ASSIGNMENT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_ASSIGNMENT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415224 */ 0x53504657, @@ -1952,7 +1952,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_ASSIGNM {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x24} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_ASSIGNMENT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_ASSIGNMENT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415226 */ 0x53504657, @@ -1961,7 +1961,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_ASSIGNM {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x26} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_LISTEN_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_LISTEN_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415228 */ 0x53504657, @@ -1970,7 +1970,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_LISTEN_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x28} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_LISTEN_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_LISTEN_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241522A */ 0x53504657, @@ -1979,7 +1979,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_LISTEN_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x2A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241522C */ 0x53504657, @@ -1988,7 +1988,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_RECV_ACCEPT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241522E */ 0x53504657, @@ -1997,7 +1997,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_RECV_ACCEPT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415230 */ 0x53504657, @@ -2006,7 +2006,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_CONNECT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415232 */ 0x53504657, @@ -2015,7 +2015,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_AUTH_CONNECT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415234 */ 0x53504657, @@ -2024,7 +2024,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_FLOW_ESTABLISHED {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415236 */ 0x53504657, @@ -2033,7 +2033,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_FLOW_ESTABLISHED {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415238 */ 0x53504657, @@ -2042,7 +2042,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_MAC_FRAME_ET {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415239 */ 0x53504657, @@ -2051,7 +2051,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_MAC_FRAME_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241523A */ 0x53504657, @@ -2060,7 +2060,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INBOUND_MAC_FRAME_NA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4241523B */ 0x53504657, @@ -2069,7 +2069,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_OUTBOUND_MAC_FRAME_N {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_RELEASE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_RELEASE_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241523E */ 0x53504657, @@ -2078,7 +2078,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_RELEASE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x3E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_RELEASE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_RELEASE_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241523F */ 0x53504657, @@ -2087,7 +2087,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_RESOURCE_RELEASE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x3F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_ENDPOINT_CLOSURE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_ENDPOINT_CLOSURE_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415240 */ 0x53504657, @@ -2096,7 +2096,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_ENDPOINT_CLOSURE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x40} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_ENDPOINT_CLOSURE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_ENDPOINT_CLOSURE_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415241 */ 0x53504657, @@ -2105,7 +2105,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_ENDPOINT_CLOSURE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x41} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_CONNECT_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_CONNECT_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415242 */ 0x53504657, @@ -2114,7 +2114,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_CONNECT_REDIRECT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x42} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_CONNECT_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_CONNECT_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415243 */ 0x53504657, @@ -2123,7 +2123,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_CONNECT_REDIRECT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x43} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_BIND_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_BIND_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415244 */ 0x53504657, @@ -2132,7 +2132,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_BIND_REDIRECT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x44} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_BIND_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_BIND_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415245 */ 0x53504657, @@ -2141,7 +2141,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_ALE_BIND_REDIRECT_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x45} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42415246 */ 0x53504657, @@ -2150,7 +2150,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_PACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42415247 */ 0x53504657, @@ -2159,7 +2159,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_STREAM_PACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415248 */ 0x53504657, @@ -2168,7 +2168,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_ETHE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42415249 */ 0x53504657, @@ -2177,7 +2177,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_ETHER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x49} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241524A */ 0x53504657, @@ -2186,7 +2186,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_TRAN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x4A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241524B */ 0x53504657, @@ -2195,7 +2195,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_INGRESS_VSWITCH_TRAN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x4B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4241524C */ 0x53504657, @@ -2204,7 +2204,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x41, 0x52, 0x4C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4241524D */ 0x53504657, @@ -2218,7 +2218,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM_AT_EGRESS_VSWITCH_TRANS #ifndef BASIC_PACKET_EXAMINATION #define BASIC_PACKET_EXAMINATION -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION = { /* 53504657-6D61-5F70-4361-6C6C425045FF */ 0x53504657, @@ -2227,7 +2227,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504500 */ 0x53504657, @@ -2236,7 +2236,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504501 */ 0x53504657, @@ -2245,7 +2245,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x01} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504502 */ 0x53504657, @@ -2254,7 +2254,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKET_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504503 */ 0x53504657, @@ -2263,7 +2263,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_IPPACKE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x03} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504504 */ 0x53504657, @@ -2272,7 +2272,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504505 */ 0x53504657, @@ -2281,7 +2281,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x05} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504506 */ 0x53504657, @@ -2290,7 +2290,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACKET_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504507 */ 0x53504657, @@ -2299,7 +2299,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x07} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504508 */ 0x53504657, @@ -2308,7 +2308,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504509 */ 0x53504657, @@ -2317,7 +2317,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V4_DI {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x09} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250450A */ 0x53504657, @@ -2326,7 +2326,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250450B */ 0x53504657, @@ -2335,7 +2335,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_IPFORWARD_V6_DI {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x0B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250450C */ 0x53504657, @@ -2344,7 +2344,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250450D */ 0x53504657, @@ -2353,7 +2353,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x0D} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250450E */ 0x53504657, @@ -2362,7 +2362,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPORT_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250450F */ 0x53504657, @@ -2371,7 +2371,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_TRANSPO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x0F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504510 */ 0x53504657, @@ -2380,7 +2380,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504511 */ 0x53504657, @@ -2389,7 +2389,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x11} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504512 */ 0x53504657, @@ -2398,7 +2398,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSPORT_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504513 */ 0x53504657, @@ -2407,7 +2407,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x13} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504514 */ 0x53504657, @@ -2416,7 +2416,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504515 */ 0x53504657, @@ -2425,7 +2425,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V4_DISCA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x15} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504516 */ 0x53504657, @@ -2434,7 +2434,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x16} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504517 */ 0x53504657, @@ -2443,7 +2443,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_V6_DISCA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x17} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504518 */ 0x53504657, @@ -2452,7 +2452,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504519 */ 0x53504657, @@ -2461,7 +2461,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x19} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250451A */ 0x53504657, @@ -2470,7 +2470,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250451B */ 0x53504657, @@ -2479,7 +2479,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_DATAGRAM_DATA_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x1B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250451C */ 0x53504657, @@ -2488,7 +2488,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250451D */ 0x53504657, @@ -2497,7 +2497,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x1D} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250451E */ 0x53504657, @@ -2506,7 +2506,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ERROR_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250451F */ 0x53504657, @@ -2515,7 +2515,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_ICMP_ER {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x1F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504520 */ 0x53504657, @@ -2524,7 +2524,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504521 */ 0x53504657, @@ -2533,7 +2533,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x21} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504522 */ 0x53504657, @@ -2542,7 +2542,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_ERROR_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504523 */ 0x53504657, @@ -2551,7 +2551,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x23} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504524 */ 0x53504657, @@ -2560,7 +2560,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_AS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x24} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504525 */ 0x53504657, @@ -2569,7 +2569,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_AS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x25} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504526 */ 0x53504657, @@ -2578,7 +2578,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_AS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x26} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_ASSIGNMENT_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504527 */ 0x53504657, @@ -2587,7 +2587,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_AS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x27} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504528 */ 0x53504657, @@ -2596,7 +2596,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x28} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504529 */ 0x53504657, @@ -2605,7 +2605,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x29} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250452A */ 0x53504657, @@ -2614,7 +2614,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x2A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250452B */ 0x53504657, @@ -2623,7 +2623,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_LISTEN {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x2B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250452C */ 0x53504657, @@ -2632,7 +2632,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_A {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250452D */ 0x53504657, @@ -2641,7 +2641,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_A {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x2D} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250452E */ 0x53504657, @@ -2650,7 +2650,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_A {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_ACCEPT_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C4250452F */ 0x53504657, @@ -2659,7 +2659,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_RECV_A {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x2F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504530 */ 0x53504657, @@ -2668,7 +2668,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNEC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504531 */ 0x53504657, @@ -2677,7 +2677,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNEC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x31} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504532 */ 0x53504657, @@ -2686,7 +2686,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNEC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNECT_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504533 */ 0x53504657, @@ -2695,7 +2695,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_AUTH_CONNEC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x33} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504534 */ 0x53504657, @@ -2704,7 +2704,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABL {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V4_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V4_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504535 */ 0x53504657, @@ -2713,7 +2713,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABL {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x35} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504536 */ 0x53504657, @@ -2722,7 +2722,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABL {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V6_DISCARD = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABLISHED_V6_DISCARD = { /* 53504657-6D61-5F70-4361-6C6C42504537 */ 0x53504657, @@ -2731,7 +2731,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_FLOW_ESTABL {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x37} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504538 */ 0x53504657, @@ -2740,7 +2740,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_MAC_FRA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504539 */ 0x53504657, @@ -2749,7 +2749,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_MAC_FR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4250453A */ 0x53504657, @@ -2758,7 +2758,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INBOUND_MAC_FRA {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4250453B */ 0x53504657, @@ -2767,7 +2767,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_OUTBOUND_MAC_FR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_RELEASE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_RELEASE_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250453E */ 0x53504657, @@ -2776,7 +2776,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_RE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x3E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_RELEASE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_RELEASE_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250453F */ 0x53504657, @@ -2785,7 +2785,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_RESOURCE_RE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x3F} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_ENDPOINT_CLOSURE_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_ENDPOINT_CLOSURE_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504540 */ 0x53504657, @@ -2794,7 +2794,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_ENDPOINT_CL {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x40} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_ENDPOINT_CLOSURE_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_ENDPOINT_CLOSURE_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504541 */ 0x53504657, @@ -2803,7 +2803,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_ENDPOINT_CL {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x41} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_CONNECT_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_CONNECT_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504542 */ 0x53504657, @@ -2812,7 +2812,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_CONNECT_RED {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x42} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_CONNECT_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_CONNECT_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504543 */ 0x53504657, @@ -2821,7 +2821,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_CONNECT_RED {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x43} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_BIND_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_BIND_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504544 */ 0x53504657, @@ -2830,7 +2830,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_BIND_REDIRE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x44} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_BIND_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_BIND_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504545 */ 0x53504657, @@ -2839,7 +2839,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_ALE_BIND_REDIRE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x45} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504546 */ 0x53504657, @@ -2848,7 +2848,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_PACKET_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504547 */ 0x53504657, @@ -2857,7 +2857,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_STREAM_PACKET_V {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504548 */ 0x53504657, @@ -2866,7 +2866,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504549 */ 0x53504657, @@ -2875,7 +2875,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x49} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250454A */ 0x53504657, @@ -2884,7 +2884,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x4A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250454B */ 0x53504657, @@ -2893,7 +2893,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_INGRESS_VSWITCH {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x4B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250454C */ 0x53504657, @@ -2902,7 +2902,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x45, 0x4C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250454D */ 0x53504657, @@ -2916,7 +2916,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION_AT_EGRESS_VSWITCH_ #ifndef BASIC_PACKET_INJECTION #define BASIC_PACKET_INJECTION -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION = { /* 53504657-6D61-5F70-4361-6C6C425049FF */ 0x53504657, @@ -2925,7 +2925,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504900 */ 0x53504657, @@ -2934,7 +2934,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_IPPACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504902 */ 0x53504657, @@ -2943,7 +2943,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_IPPACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504904 */ 0x53504657, @@ -2952,7 +2952,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_IPPACKET {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504906 */ 0x53504657, @@ -2961,7 +2961,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_IPPACKET {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504908 */ 0x53504657, @@ -2970,7 +2970,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250490A */ 0x53504657, @@ -2979,7 +2979,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250490C */ 0x53504657, @@ -2988,7 +2988,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_TRANSPORT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250490E */ 0x53504657, @@ -2997,7 +2997,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_TRANSPORT {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504910 */ 0x53504657, @@ -3006,7 +3006,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_TRANSPOR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504912 */ 0x53504657, @@ -3015,7 +3015,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_TRANSPOR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504918 */ 0x53504657, @@ -3024,7 +3024,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250491A */ 0x53504657, @@ -3033,7 +3033,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250491C */ 0x53504657, @@ -3042,7 +3042,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_ICMP_ERRO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250491E */ 0x53504657, @@ -3051,7 +3051,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_ICMP_ERRO {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504920 */ 0x53504657, @@ -3060,7 +3060,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504922 */ 0x53504657, @@ -3069,7 +3069,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4250492C */ 0x53504657, @@ -3078,7 +3078,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4250492E */ 0x53504657, @@ -3087,7 +3087,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504930 */ 0x53504657, @@ -3096,7 +3096,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504932 */ 0x53504657, @@ -3105,7 +3105,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504934 */ 0x53504657, @@ -3114,7 +3114,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_FLOW_ESTABLIS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504936 */ 0x53504657, @@ -3123,7 +3123,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_ALE_FLOW_ESTABLIS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504938 */ 0x53504657, @@ -3132,7 +3132,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_MAC_FRAME {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504939 */ 0x53504657, @@ -3141,7 +3141,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAM {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4250493A */ 0x53504657, @@ -3150,7 +3150,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INBOUND_MAC_FRAME {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4250493B */ 0x53504657, @@ -3159,7 +3159,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAM {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504946 */ 0x53504657, @@ -3168,7 +3168,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_STREAM_PACKET_V4 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504947 */ 0x53504657, @@ -3177,7 +3177,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_STREAM_PACKET_V6 {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504948 */ 0x53504657, @@ -3186,7 +3186,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_INGRESS_VSWITCH_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x49, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504949 */ 0x53504657, @@ -3200,7 +3200,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION_AT_EGRESS_VSWITCH_ET #ifndef BASIC_PACKET_MODIFICATION #define BASIC_PACKET_MODIFICATION -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION = { /* 53504657-6D61-5F70-4361-6C6C42504DFF */ 0x53504657, @@ -3209,7 +3209,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D00 */ 0x53504657, @@ -3218,7 +3218,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D02 */ 0x53504657, @@ -3227,7 +3227,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_IPPACK {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D04 */ 0x53504657, @@ -3236,7 +3236,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_IPPAC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D06 */ 0x53504657, @@ -3245,7 +3245,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_IPPAC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D08 */ 0x53504657, @@ -3254,7 +3254,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D0A */ 0x53504657, @@ -3263,7 +3263,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D0C */ 0x53504657, @@ -3272,7 +3272,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D0E */ 0x53504657, @@ -3281,7 +3281,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_TRANSP {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D10 */ 0x53504657, @@ -3290,7 +3290,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D12 */ 0x53504657, @@ -3299,7 +3299,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_TRANS {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D18 */ 0x53504657, @@ -3308,7 +3308,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_DATAGRAM_DATA_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D1A */ 0x53504657, @@ -3317,7 +3317,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_DATAGRAM_DATA_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D1C */ 0x53504657, @@ -3326,7 +3326,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D1E */ 0x53504657, @@ -3335,7 +3335,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_ICMP_E {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D20 */ 0x53504657, @@ -3344,7 +3344,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_ICMP_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D22 */ 0x53504657, @@ -3353,7 +3353,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_ICMP_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D2C */ 0x53504657, @@ -3362,7 +3362,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_RECV_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D2E */ 0x53504657, @@ -3371,7 +3371,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_RECV_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D30 */ 0x53504657, @@ -3380,7 +3380,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_CONNE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D32 */ 0x53504657, @@ -3389,7 +3389,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_AUTH_CONNE {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D34 */ 0x53504657, @@ -3398,7 +3398,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_FLOW_ESTAB {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D36 */ 0x53504657, @@ -3407,7 +3407,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_ALE_FLOW_ESTAB {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504D38 */ 0x53504657, @@ -3416,7 +3416,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_MAC_FR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504D39 */ 0x53504657, @@ -3425,7 +3425,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_MAC_F {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C42504D3A */ 0x53504657, @@ -3434,7 +3434,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INBOUND_MAC_FR {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C42504D3B */ 0x53504657, @@ -3443,7 +3443,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_OUTBOUND_MAC_F {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C42504D46 */ 0x53504657, @@ -3452,7 +3452,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_STREAM_PACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C42504D47 */ 0x53504657, @@ -3461,7 +3461,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_STREAM_PACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504D48 */ 0x53504657, @@ -3470,7 +3470,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_INGRESS_VSWITC {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x50, 0x4D, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C42504D49 */ 0x53504657, @@ -3484,7 +3484,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION_AT_EGRESS_VSWITCH #ifndef BASIC_STREAM_INJECTION #define BASIC_STREAM_INJECTION -static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION = +static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION = { /* 53504657-6D61-5F70-4361-6C6C425349FF */ 0x53504657, @@ -3493,7 +3493,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x53, 0x49, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C42534914 */ 0x53504657, @@ -3502,7 +3502,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x42, 0x53, 0x49, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C42534916 */ 0x53504657, @@ -3516,7 +3516,7 @@ static const GUID WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION_AT_STREAM_V6 = #ifndef FAST_PACKET_INJECTION #define FAST_PACKET_INJECTION -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION = { /* 53504657-6D61-5F70-4361-6C6C465049FF */ 0x53504657, @@ -3525,7 +3525,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504900 */ 0x53504657, @@ -3534,7 +3534,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_IPPACKET_V {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504902 */ 0x53504657, @@ -3543,7 +3543,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_IPPACKET_V {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504904 */ 0x53504657, @@ -3552,7 +3552,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x04} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504906 */ 0x53504657, @@ -3561,7 +3561,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_IPPACKET_ {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x06} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_IPFORWARD_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_IPFORWARD_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504908 */ 0x53504657, @@ -3570,7 +3570,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_IPFORWARD_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x08} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_IPFORWARD_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_IPFORWARD_V6 = { /* 53504657-6D61-5F70-4361-6C6C4650490A */ 0x53504657, @@ -3579,7 +3579,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_IPFORWARD_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x0A} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4650490C */ 0x53504657, @@ -3588,7 +3588,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_TRANSPORT_ {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x0C} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4650490E */ 0x53504657, @@ -3597,7 +3597,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_TRANSPORT_ {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x0E} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504910 */ 0x53504657, @@ -3606,7 +3606,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504912 */ 0x53504657, @@ -3615,7 +3615,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_TRANSPORT {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x12} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504918 */ 0x53504657, @@ -3624,7 +3624,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_DATAGRAM_DATA_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x18} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = { /* 53504657-6D61-5F70-4361-6C6C4650491A */ 0x53504657, @@ -3633,7 +3633,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_DATAGRAM_DATA_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x1A} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C4650491C */ 0x53504657, @@ -3642,7 +3642,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x1C} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C4650491E */ 0x53504657, @@ -3651,7 +3651,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_ICMP_ERROR {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x1E} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504920 */ 0x53504657, @@ -3660,7 +3660,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERRO {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x20} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERROR_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504922 */ 0x53504657, @@ -3669,7 +3669,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_ICMP_ERRO {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x22} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C4650492C */ 0x53504657, @@ -3678,7 +3678,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCE {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C4650492E */ 0x53504657, @@ -3687,7 +3687,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_RECV_ACCE {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504930 */ 0x53504657, @@ -3696,7 +3696,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504932 */ 0x53504657, @@ -3705,7 +3705,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_AUTH_CONNECT_V {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x32} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504934 */ 0x53504657, @@ -3714,7 +3714,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISH {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504936 */ 0x53504657, @@ -3723,7 +3723,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_ALE_FLOW_ESTABLISH {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x36} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C46504938 */ 0x53504657, @@ -3732,7 +3732,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x38} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C46504939 */ 0x53504657, @@ -3741,7 +3741,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x39} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4650493A */ 0x53504657, @@ -3750,7 +3750,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INBOUND_MAC_FRAME_ {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x3A} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_NATIVE = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME_NATIVE = { /* 53504657-6D61-5F70-4361-6C6C4650493B */ 0x53504657, @@ -3759,7 +3759,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_OUTBOUND_MAC_FRAME {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x3B} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_STREAM_PACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_STREAM_PACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C46504946 */ 0x53504657, @@ -3768,7 +3768,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_STREAM_PACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x46} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_STREAM_PACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_STREAM_PACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C46504947 */ 0x53504657, @@ -3777,7 +3777,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_STREAM_PACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x47} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C46504948 */ 0x53504657, @@ -3786,7 +3786,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_INGRESS_VSWITCH_ET {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x50, 0x49, 0x48} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETHERNET = +static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETHERNET = { /* 53504657-6D61-5F70-4361-6C6C46504949 */ 0x53504657, @@ -3800,7 +3800,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION_AT_EGRESS_VSWITCH_ETH #ifndef FAST_STREAM_INJECTION #define FAST_STREAM_INJECTION -static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION = +static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION = { /* 53504657-6D61-5F70-4361-6C6C465349FF */ 0x53504657, @@ -3809,7 +3809,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x53, 0x49, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION_AT_STREAM_V4 = +static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION_AT_STREAM_V4 = { /* 53504657-6D61-5F70-4361-6C6C46534914 */ 0x53504657, @@ -3818,7 +3818,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION_AT_STREAM_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x53, 0x49, 0x14} }; -static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION_AT_STREAM_V6 = +static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION_AT_STREAM_V6 = { /* 53504657-6D61-5F70-4361-6C6C46534916 */ 0x53504657, @@ -3832,7 +3832,7 @@ static const GUID WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION_AT_STREAM_V6 = #ifndef FLOW_ASSOCIATION #define FLOW_ASSOCIATION -static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION = +static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION = { /* 53504657-6D61-5F70-4361-6C6C464100FF */ 0x53504657, @@ -3841,7 +3841,7 @@ static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION = {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x41, 0x00, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION_AT_ALE_FLOW_ESTABLISHED_V4 = +static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION_AT_ALE_FLOW_ESTABLISHED_V4 = { /* 53504657-6D61-5F70-4361-6C6C46410034 */ 0x53504657, @@ -3850,7 +3850,7 @@ static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION_AT_ALE_FLOW_ESTABLISHED_V4 {0x43, 0x61, 0x6C, 0x6C, 0x46, 0x41, 0x00, 0x34} }; -static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION_AT_ALE_FLOW_ESTABLISHED_V6 = +static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION_AT_ALE_FLOW_ESTABLISHED_V6 = { /* 53504657-6D61-5F70-4361-6C6C46410036 */ 0x53504657, @@ -3864,7 +3864,7 @@ static const GUID WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION_AT_ALE_FLOW_ESTABLISHED_V6 #ifndef PEND_AUTHORIZATION #define PEND_AUTHORIZATION -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION = { /* 53504657-6D61-5F70-4361-6C6C504100FF */ 0x53504657, @@ -3873,7 +3873,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_RESOURCE_ASSIGNMENT_V4 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_RESOURCE_ASSIGNMENT_V4 = { /* 53504657-6D61-5F70-4361-6C6C50410024 */ 0x53504657, @@ -3882,7 +3882,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_RESOURCE_ASSIGNME {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x24} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_RESOURCE_ASSIGNMENT_V6 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_RESOURCE_ASSIGNMENT_V6 = { /* 53504657-6D61-5F70-4361-6C6C50410026 */ 0x53504657, @@ -3891,7 +3891,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_RESOURCE_ASSIGNME {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x26} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_LISTEN_V4 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_LISTEN_V4 = { /* 53504657-6D61-5F70-4361-6C6C50410028 */ 0x53504657, @@ -3900,7 +3900,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_LISTEN_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x28} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_LISTEN_V6 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_LISTEN_V6 = { /* 53504657-6D61-5F70-4361-6C6C5041002A */ 0x53504657, @@ -3909,7 +3909,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_LISTEN_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x2A} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_RECV_ACCEPT_V4 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_RECV_ACCEPT_V4 = { /* 53504657-6D61-5F70-4361-6C6C5041002C */ 0x53504657, @@ -3918,7 +3918,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_RECV_ACCEPT_ {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x2C} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_RECV_ACCEPT_V6 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_RECV_ACCEPT_V6 = { /* 53504657-6D61-5F70-4361-6C6C5041002E */ 0x53504657, @@ -3927,7 +3927,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_RECV_ACCEPT_ {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x2E} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_CONNECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_CONNECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C50410030 */ 0x53504657, @@ -3936,7 +3936,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_CONNECT_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x41, 0x00, 0x30} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_CONNECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_CONNECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C50410032 */ 0x53504657, @@ -3950,7 +3950,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION_AT_ALE_AUTH_CONNECT_V6 = #ifndef PEND_ENDPOINT_CLOSURE #define PEND_ENDPOINT_CLOSURE -static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE = +static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE = { /* 53504657-6D61-5F70-4361-6C6C504543FF */ 0x53504657, @@ -3959,7 +3959,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x45, 0x43, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE_AT_ALE_ENDPOINT_CLOSURE_V4 = +static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE_AT_ALE_ENDPOINT_CLOSURE_V4 = { /* 53504657-6D61-5F70-4361-6C6C50454340 */ 0x53504657, @@ -3968,7 +3968,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE_AT_ALE_ENDPOINT_CLOSU {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x45, 0x43, 0x40} }; -static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE_AT_ALE_ENDPOINT_CLOSURE_V6 = +static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE_AT_ALE_ENDPOINT_CLOSURE_V6 = { /* 53504657-6D61-5F70-4361-6C6C50454341 */ 0x53504657, @@ -3982,7 +3982,7 @@ static const GUID WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE_AT_ALE_ENDPOINT_CLOSU #ifndef PROXY_BY_INJECTION #define PROXY_BY_INJECTION -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION = { /* 53504657-6D61-5F70-4361-6C6C504249FF */ 0x53504657, @@ -3991,7 +3991,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x49, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_INBOUND_IPPACKET_V4 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_INBOUND_IPPACKET_V4 = { /* 53504657-6D61-5F70-4361-6C6C50424900 */ 0x53504657, @@ -4000,7 +4000,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_INBOUND_IPPACKET_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x49, 0x00} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_INBOUND_IPPACKET_V6 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_INBOUND_IPPACKET_V6 = { /* 53504657-6D61-5F70-4361-6C6C50424902 */ 0x53504657, @@ -4009,7 +4009,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_INBOUND_IPPACKET_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x49, 0x02} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_OUTBOUND_TRANSPORT_V4 = { /* 53504657-6D61-5F70-4361-6C6C50424910 */ 0x53504657, @@ -4018,7 +4018,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_OUTBOUND_TRANSPORT_V4 {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x49, 0x10} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_OUTBOUND_TRANSPORT_V6 = { /* 53504657-6D61-5F70-4361-6C6C50424912 */ 0x53504657, @@ -4032,7 +4032,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_INJECTION_AT_OUTBOUND_TRANSPORT_V6 #ifndef PROXY_BY_ALE_REDIRECT #define PROXY_BY_ALE_REDIRECT -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_REDIRECT = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_REDIRECT = { /* 53504657-6D61-5F70-4361-6C6C504241FF */ 0x53504657, @@ -4041,7 +4041,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_REDIRECT = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x41, 0xFF} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_CONNECT_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_CONNECT_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C50424142 */ 0x53504657, @@ -4050,7 +4050,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_CONNECT_REDIRECT_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x41, 0x42} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_CONNECT_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_CONNECT_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C50424143 */ 0x53504657, @@ -4059,7 +4059,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_CONNECT_REDIRECT_V6 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x41, 0x43} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_BIND_REDIRECT_V4 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_BIND_REDIRECT_V4 = { /* 53504657-6D61-5F70-4361-6C6C50424144 */ 0x53504657, @@ -4068,7 +4068,7 @@ static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_BIND_REDIRECT_V4 = {0x43, 0x61, 0x6C, 0x6C, 0x50, 0x42, 0x41, 0x44} }; -static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_BIND_REDIRECT_V6 = +static const GUID WFPSAMPLER_CALLOUT_PROXY_BY_ALE_AT_BIND_REDIRECT_V6 = { /* 53504657-6D61-5F70-4361-6C6C50424145 */ 0x53504657, diff --git a/network/trans/WFPSampler/inc/ProviderContexts.h b/network/trans/WFPSampler/inc/ProviderContexts.h index 88b56eb1b..6abc2d705 100644 --- a/network/trans/WFPSampler/inc/ProviderContexts.h +++ b/network/trans/WFPSampler/inc/ProviderContexts.h @@ -6,7 +6,7 @@ // ProviderContexts.h // // Abstract: -// This module contains global definitions of FWPM_PROVIDER_CONTEXT Data for the WFPSampler +// This module contains global definitions of FWPM_PROVIDER_CONTEXT Data for the WFPSampler // project // // Author: diff --git a/network/trans/WFPSampler/inc/WFPArrays.h b/network/trans/WFPSampler/inc/WFPArrays.h index f4f8deb2a..39ed4c3f2 100644 --- a/network/trans/WFPSampler/inc/WFPArrays.h +++ b/network/trans/WFPSampler/inc/WFPArrays.h @@ -6,7 +6,7 @@ // WFPArrays.h // // Abstract: -// This module contains global variables and definitions of WFP specific data for the +// This module contains global variables and definitions of WFP specific data for the // WFPSampler project // // Author: @@ -166,17 +166,17 @@ const GUID* const ppConditionInboundIPPacket[] = {&FWPM_CONDITION_IP_ &FWPM_CONDITION_IP_REMOTE_ADDRESS, &FWPM_CONDITION_IP_LOCAL_ADDRESS_TYPE, &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX - &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_FLAGS, &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE - &FWPM_CONDITION_TUNNEL_TYPE, /// &FWPM_CONDITION_LOCAL_TUNNEL_TYPE + &FWPM_CONDITION_TUNNEL_TYPE, /// &FWPM_CONDITION_LOCAL_TUNNEL_TYPE }; const GUID* const ppConditionOutboundIPPacket[] = {&FWPM_CONDITION_IP_LOCAL_ADDRESS, &FWPM_CONDITION_IP_LOCAL_ADDRESS_TYPE, &FWPM_CONDITION_IP_REMOTE_ADDRESS, &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_FLAGS, &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE @@ -210,7 +210,7 @@ const GUID* const ppConditionInboundTransport[] = {&FWPM_CONDITION_IP_ &FWPM_CONDITION_IP_LOCAL_PORT, /// &FWPM_CONDITION_ICMP_TYPE &FWPM_CONDITION_IP_REMOTE_PORT, /// &FWPM_CONDITION_ICMP_CODE &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_FLAGS, &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE @@ -235,7 +235,7 @@ const GUID* const ppConditionOutboundTransport[] = {&FWPM_CONDITION_IP_ &FWPM_CONDITION_IP_LOCAL_PORT, /// &FWPM_CONDITION_ICMP_TYPE &FWPM_CONDITION_IP_REMOTE_PORT, /// &FWPM_CONDITION_ICMP_CODE &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_IP_DESTINATION_ADDRESS_TYPE, &FWPM_CONDITION_FLAGS, @@ -275,7 +275,7 @@ const GUID* const ppConditionDatagramData[] = {&FWPM_CONDITION_IP_ &FWPM_CONDITION_IP_LOCAL_PORT, /// &FWPM_CONDITION_ICMP_TYPE &FWPM_CONDITION_IP_REMOTE_PORT, /// &FWPM_CONDITION_ICMP_CODE &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_DIRECTION, &FWPM_CONDITION_FLAGS, @@ -292,7 +292,7 @@ const GUID* const ppConditionInboundICMPError[] = {&FWPM_CONDITION_EMB &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE &FWPM_CONDITION_ICMP_TYPE, &FWPM_CONDITION_ICMP_CODE, - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE &FWPM_CONDITION_TUNNEL_TYPE, /// &FWPM_CONDITION_LOCAL_TUNNEL_TYPE @@ -320,7 +320,7 @@ const GUID* const ppConditionOutboundICMPError[] = {&FWPM_CONDITION_IP_ &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE &FWPM_CONDITION_ICMP_TYPE, &FWPM_CONDITION_ICMP_CODE, - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE &FWPM_CONDITION_TUNNEL_TYPE, /// &FWPM_CONDITION_LOCAL_TUNNEL_TYPE @@ -360,7 +360,7 @@ const GUID* const ppConditionALEResourceAssignment[] = {&FWPM_CONDITION_ALE &FWPM_CONDITION_ALE_PACKAGE_ID, #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE, #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) @@ -412,7 +412,7 @@ const GUID* const ppConditionALEAuthRecvAccept[] = {&FWPM_CONDITION_ALE &FWPM_CONDITION_ALE_NAP_CONTEXT, &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE &FWPM_CONDITION_TUNNEL_TYPE, /// &FWPM_CONDITION_LOCAL_TUNNEL_TYPE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX #if(NTDDI_VERSION >= NTDDI_VISTASP1) @@ -467,7 +467,7 @@ const GUID* const ppConditionALEAuthConnect[] = {&FWPM_CONDITION_ALE #if(NTDDI_VERSION >= NTDDI_VISTASP1) - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX #if(NTDDI_VERSION >= NTDDI_WIN7) @@ -739,7 +739,7 @@ const GUID* const ppConditionStreamPacket[] = {&FWPM_CONDITION_IP_ &FWPM_CONDITION_IP_LOCAL_PORT, &FWPM_CONDITION_IP_REMOTE_PORT, /// &FWPM_CONDITION_ICMP_CODE &FWPM_CONDITION_IP_LOCAL_INTERFACE, /// &FWPM_CONDITION_INTERFACE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_SUB_INTERFACE_INDEX, /// &FWPM_CONDITION_ARRIVAL_SUB_INTERFACE_INDEX &FWPM_CONDITION_DIRECTION, &FWPM_CONDITION_FLAGS, @@ -765,7 +765,7 @@ const GUID* const ppConditionInboundMACFrameEthernet[] = {&FWPM_CONDITION_INT &FWPM_CONDITION_ETHER_TYPE, &FWPM_CONDITION_VLAN_ID, &FWPM_CONDITION_INTERFACE, - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_NDIS_PORT, &FWPM_CONDITION_L2_FLAGS, }; @@ -777,7 +777,7 @@ const GUID* const ppConditionOutboundMACFrameEthernet[] = {&FWPM_CONDITION_INT &FWPM_CONDITION_ETHER_TYPE, &FWPM_CONDITION_VLAN_ID, &FWPM_CONDITION_INTERFACE, - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_NDIS_PORT, &FWPM_CONDITION_L2_FLAGS, }; @@ -785,7 +785,7 @@ const GUID* const ppConditionInboundMACFrameNative[] = {&FWPM_CONDITION_NDI &FWPM_CONDITION_NDIS_PHYSICAL_MEDIA_TYPE, &FWPM_CONDITION_INTERFACE, &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_NDIS_PORT, &FWPM_CONDITION_L2_FLAGS, }; @@ -793,7 +793,7 @@ const GUID* const ppConditionOutboundMACFrameNative[] = {&FWPM_CONDITION_NDI &FWPM_CONDITION_NDIS_PHYSICAL_MEDIA_TYPE, &FWPM_CONDITION_INTERFACE, &FWPM_CONDITION_INTERFACE_TYPE, /// &FWPM_CONDITION_LOCAL_INTERFACE_TYPE - &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX + &FWPM_CONDITION_INTERFACE_INDEX, /// &FWPM_CONDITION_LOCAL_INTERFACE_INDEX &FWPM_CONDITION_NDIS_PORT, &FWPM_CONDITION_L2_FLAGS, }; diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.cpp index 826e69e36..642147389 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -66,7 +66,7 @@ /** @helper_function="HlprFwpmCalloutDeleteByKey" - + Purpose: Wrapper for the FwpmCalloutDeleteByKey API

Notes:
@@ -115,7 +115,7 @@ UINT32 HlprFwpmCalloutDeleteByKey(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmCalloutAdd" - + Purpose: Wrapper for the FwpmCalloutAdd API

Notes: Callout ID is written to pCallout->calloutId.
@@ -163,7 +163,7 @@ UINT32 HlprFwpmCalloutAdd(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmCalloutRemoveAll" - + Purpose: Remove all callouts associated with the specified provider.

Notes:
@@ -234,7 +234,7 @@ UINT32 HlprFwpmCalloutRemoveAll(_In_opt_ HANDLE* pEngineHandle, /** @helper_function="HlprFwpmCalloutEnum" - + Purpose: Wrapper for the FwpmCalloutEnum API

Notes:
@@ -293,7 +293,7 @@ UINT32 HlprFwpmCalloutEnum(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmCalloutDestroyEnumHandle" - + Purpose: Wrapper for the FwpmCalloutDestroyEnumHandle API

Notes:
@@ -343,7 +343,7 @@ UINT32 HlprFwpmCalloutDestroyEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmCalloutCreateEnumHandle" - + Purpose: Wrapper for the FwpmCalloutCreateEnumHandle API

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.h index c250a0629..0d415f87a 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmCallout.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmCallout.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // FWPM_CALLOUT objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.cpp index 4ea15a8a8..a9731d7e2 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -55,7 +55,7 @@ /** @helper_function="HlprFwpmEngineOpen" - + Purpose: Wrapper for the FwpmEngineClose API.

Notes:
@@ -91,7 +91,7 @@ UINT32 HlprFwpmEngineClose(_Inout_ HANDLE* pEngineHandle) /** @helper_function="HlprFwpmEngineOpen" - + Purpose: Wrapper for the FwpmEngineOpen API.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.h index d51dea4a5..a3c4de84d 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmEngine.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmEngine.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to BFE +// This module contains prototypes for functions which assist in actions pertaining to BFE // engine objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.cpp index 16d14fe56..207a23559 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -95,7 +95,7 @@ /** @private_function="PrvFwpByteBlobPurge" - + Purpose: Cleanup an FWP_BYTE_BLOB.

Notes:
@@ -113,7 +113,7 @@ inline VOID PrvFwpByteBlobPurge(_Inout_ FWP_BYTE_BLOB* pBlob) /** @private_function="PrvFwpByteBlobDestroy" - + Purpose: Cleanup and free an FWP_BYTE_BLOB.

Notes:
@@ -135,7 +135,7 @@ VOID PrvFwpByteBlobDestroy(_Inout_ FWP_BYTE_BLOB** ppBlob) /** @private_function="PrvFwpTokenInformationPurge" - + Purpose: Cleanup an FWP_TOKEN_INFORMATION.

Notes:
@@ -152,16 +152,16 @@ inline VOID PrvFwpTokenInformationPurge(_Inout_ FWP_TOKEN_INFORMATION* pTokenInf { HLPR_DELETE_ARRAY(pTokenInfo->sids[i].Sid); } - + HLPR_DELETE_ARRAY(pTokenInfo->sids); - + for(UINT32 i = 0; i < pTokenInfo->restrictedSidCount; i++) { HLPR_DELETE_ARRAY(pTokenInfo->restrictedSids[i].Sid); } - + HLPR_DELETE_ARRAY(pTokenInfo->restrictedSids); return; @@ -169,7 +169,7 @@ inline VOID PrvFwpTokenInformationPurge(_Inout_ FWP_TOKEN_INFORMATION* pTokenInf /** @private_function="PrvFwpTokenInformationDestroy" - + Purpose: Cleanup and free an FWP_TOKEN_INFORMATION.

Notes:
@@ -229,7 +229,7 @@ VOID PrvFwpV6AddrAndMaskDestroy(_Inout_ FWP_V6_ADDR_AND_MASK** ppAddrMask) /** @private_function="PrvFwpValuePurge" - + Purpose: Cleanup an FWP_VALUE.

Notes:
@@ -329,7 +329,7 @@ VOID PrvFwpValuePurge(_Inout_ FWP_VALUE* pValue) /** @private_function="PrvFwpRangeDestroy" - + Purpose: Cleanup and free an FWP_RANGE.

Notes:
@@ -355,10 +355,10 @@ VOID PrvFwpRangeDestroy(_Inout_ FWP_RANGE** ppRange) } /** @helper_function="HlprFwpmFilterConditionPrune" - + Purpose: Remove duplicate conditions from the supplied filterCondition array.

- Notes: Due to a bug in WFP, filter enumeration cannot handle multiple consecutive + Notes: Due to a bug in WFP, filter enumeration cannot handle multiple consecutive conditions.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Desktop/AA364268.aspx
@@ -408,7 +408,7 @@ VOID HlprFwpmFilterConditionPrune(_In_reads_(numFilterConditions) const FWPM_FIL } else { - /// ... then copy only if the current condition is not the same as the previous + /// ... then copy only if the current condition is not the same as the previous /// condition. if(pFilterConditions[index].fieldKey != pFilterConditions[index - 1].fieldKey) { @@ -434,7 +434,7 @@ VOID HlprFwpmFilterConditionPrune(_In_reads_(numFilterConditions) const FWPM_FIL /** @helper_function="HlprFwpmFilterConditionPurge" - + Purpose: Cleanup an FWPM_FILTER_CONDITION.

Notes:
@@ -564,7 +564,7 @@ VOID HlprFwpmFilterConditionPurge(_Inout_ FWPM_FILTER_CONDITION* pFilterConditio /** @helper_function="HlprFwpmFilterConditionDestroy" - + Purpose: Cleanup and free an (array of) FWPM_FILTER_CONDITION.

Notes:
@@ -600,7 +600,7 @@ VOID HlprFwpmFilterConditionDestroy(_Inout_updates_all_(numFilterConditions) FWP /** @helper_function="HlprFwpmFilterConditionCreate" - + Purpose: Allocate an (array of) FWPM_FILTER_CONDITION.

Notes:
@@ -643,7 +643,7 @@ UINT32 HlprFwpmFilterConditionCreate(_Inout_updates_all_(numFilterConditions) FW /** @helper_function="HlprFwpmFilterConditionIsValidForLayer" - + Purpose: Determine if the provided filtering condition is available at the provided layer.

Notes:
@@ -1289,7 +1289,7 @@ BOOLEAN HlprFwpmFilterConditionIsValidForLayer(_In_ const GUID* pLayerKey, /** @helper_function="HlprFwpmFilterEnum" - + Purpose: Wrapper for the FwpmFilterEnum API.

Notes:
@@ -1336,7 +1336,7 @@ UINT32 HlprFwpmFilterEnum(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmFilterDestroyEnumHandle" - + Purpose: Wrapper for the FwpmFilterDestroyEnumHandle API.

Notes:
@@ -1376,7 +1376,7 @@ UINT32 HlprFwpmFilterDestroyEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmFilterCreateEnumHandle" - + Purpose: Wrapper for the FwpmFilterCreateEnumHandle API.

Notes:
@@ -1411,7 +1411,7 @@ UINT32 HlprFwpmFilterCreateEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmFilterDeleteByKey" - + Purpose: Wrapper for the FwpmFilterDeleteByKey API.

Notes:
@@ -1450,7 +1450,7 @@ UINT32 HlprFwpmFilterDeleteByKey(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmFilterAdd" - + Purpose: Wrapper for the FwpmFilterAdd API.

Notes: Filter ID is written to pFilter->filterId.
@@ -1479,7 +1479,7 @@ UINT32 HlprFwpmFilterAdd(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmFilterRemoveAll" - + Purpose: Remove all filters associated with the specified provider.

Notes:
@@ -1560,7 +1560,7 @@ UINT32 HlprFwpmFilterRemoveAll(_In_opt_ HANDLE* pEngineHandle, /** @helper_function="HlprFwpmFilterPurge" - + Purpose: Cleanup an FWPM_FILTER.

Notes:
@@ -1583,7 +1583,7 @@ VOID HlprFwpmFilterPurge(_Inout_ FWPM_FILTER* pFilter) /** @helper_function="HlprFwpmFilterDestroy" - + Purpose: Cleanup and free an (array of) FWPM_FILTER.

Notes:
@@ -1619,7 +1619,7 @@ VOID HlprFwpmFilterDestroy(_Inout_updates_all_(numFilters) FWPM_FILTER** ppFilte /** @helper_function="HlprFwpmFilterCreate" - + Purpose: Allocate an (array of) FWPM_FILTER.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.h index ea3b234db..f632b01bd 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmFilter.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmFilter.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // FWPM_FILTER objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.cpp index c67de75bb..ee2acade3 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -35,7 +35,7 @@ // { // ByID - Function takes a runtime ID. // ByKey - Function takes a GUID. -// ByString - Function takes a null terminated wide character string and returns the +// ByString - Function takes a null terminated wide character string and returns the // LayerKey. // ID - Function acts on the objects ID. // IPv4 - Function acts on IP version 4 objects. @@ -503,7 +503,7 @@ UINT32 HlprFwpmLayerGetFilterConditionArrayByKey(_In_ const GUID* pLayerKey, /** @helper_function="HlprFwpmLayerGetIDByKey" - + Purpose: Return the runtime ID of the layer provided the layer's key.

Notes:
@@ -783,8 +783,8 @@ UINT8 HlprFwpmLayerGetIDByKey(_In_ const GUID* pLayerKey) /** @helper_function="HlprFwpmLayerGetID" - - Purpose: Return the runtime ID of the layer provided a string representation of the layer's + + Purpose: Return the runtime ID of the layer provided a string representation of the layer's name.

Notes:
@@ -1064,8 +1064,8 @@ UINT8 HlprFwpmLayerGetIDByString(_In_ PCWSTR pLayerString) /** @helper_function="HlprFwpmLayerGetByID" - - Purpose: Return a pointer to the GUID of the layer represented by the provider layer's + + Purpose: Return a pointer to the GUID of the layer represented by the provider layer's runtime ID.

Notes: Calling function must check for NULL pointer.
@@ -1261,7 +1261,7 @@ const GUID* HlprFwpmLayerGetByID(_In_ const UINT32 layerID) /** @helper_function="HlprFwpmLayerGetByString" - + Purpose: Return a pointer to the GUID of the layer represented by the provided string.

Notes: Calling function must check for NULL pointer.
@@ -1540,7 +1540,7 @@ const GUID* HlprFwpmLayerGetByString(_In_ PCWSTR pLayerString) /** @helper function="HlprFwpmLayerIsUserMode" - + Purpose: Determine if the layer is a user-mode layer.

Notes:
@@ -1552,7 +1552,7 @@ BOOLEAN HlprFwpmLayerIsUserMode(_In_ const GUID* pLayerKey) ASSERT(pLayerKey); BOOLEAN isUserMode = FALSE; - + for(UINT32 layerIndex = 0; layerIndex < TOTAL_USER_MODE_LAYER_COUNT && isUserMode == FALSE; @@ -1567,7 +1567,7 @@ BOOLEAN HlprFwpmLayerIsUserMode(_In_ const GUID* pLayerKey) /** @helper function="HlprFwpmLayerIsKernelMode" - + Purpose: Determine if the layer is a kernel-mode layer.

Notes:
@@ -1583,7 +1583,7 @@ BOOLEAN HlprFwpmLayerIsKernelMode(_In_ const GUID* pLayerKey) /** @helper function="HlprFwpmLayerIsIPv4" - + Purpose: Determine if the layer is an IPv4 layer.

Notes:
@@ -1652,7 +1652,7 @@ BOOLEAN HlprFwpmLayerIsIPv4(_In_ const GUID* pLayerKey) /** @helper function="HlprFwpmLayerIsIPv6" - + Purpose: Determine if the layer is an IPv6 layer.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.h index 61b64ccee..93da00ed2 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmLayer.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmLayer.cpp // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // FWPM_LAYER objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.cpp index 3e7f07572..98af87c1e 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -55,7 +55,7 @@ /** @helper_function="HlprFwpmProviderEnum" - + Purpose: Wrapper for the FwpmProviderEnum API.

Notes:
@@ -114,7 +114,7 @@ UINT32 HlprFwpmProviderEnum(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderDestroyEnumHandle" - + Purpose: Wrapper for the FwpmProviderDestroyEnumHandle API.

Notes:
@@ -164,7 +164,7 @@ UINT32 HlprFwpmProviderDestroyEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderCreateEnumHandle" - + Purpose: Wrapper for the FwpmProviderCreateEnumHandle API.

Notes:
@@ -205,7 +205,7 @@ UINT32 HlprFwpmProviderCreateEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderDeleteByKey" - + Purpose: Wrapper for the FwpmProviderDeleteByKey API.

Notes:
@@ -255,10 +255,10 @@ UINT32 HlprFwpmProviderDeleteByKey(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderDelete" - + Purpose: Remove the provider that was associated with all of this program's WFP objects.

- Notes: Function will fail if any of this program's WFP objects are still present and + Notes: Function will fail if any of this program's WFP objects are still present and associated with this provider.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Desktop/AA364195.aspx
@@ -310,7 +310,7 @@ UINT32 HlprFwpmProviderDelete(_In_opt_ HANDLE* pEngineHandle, /** @helper_function="HlprFwpmProviderAdd" - + Purpose: Add a default provider to associate with all of this program's WFP objects.

Notes:
@@ -329,7 +329,7 @@ UINT32 HlprFwpmProviderAdd(_In_ HANDLE engineHandle, if(engineHandle) { - FWPM_PROVIDER provider = {0}; + FWPM_PROVIDER provider = {0}; provider.providerKey = *pProviderKey; provider.displayData.name = (PWSTR)pCompanyName; diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.h index f83173dbc..36af41de3 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProvider.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmProvider.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // FWPM_PROVIDER objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.cpp index 74dcd5462..12744ce2e 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -67,7 +67,7 @@ /** @helper_function="HlprFwpmProviderContextDeleteByKey" - + Purpose: Wrapper for the FwpmProviderContextDeleteByKey API.

Notes:
@@ -106,7 +106,7 @@ UINT32 HlprFwpmProviderContextDeleteByKey(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderContextAdd" - + Purpose: Wrapper for the FwpmProviderContextAdd API.

Notes: ProviderContext ID is written to pProviderContext->providerContextId.
@@ -144,7 +144,7 @@ UINT32 HlprFwpmProviderContextAdd(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderContextEnum" - + Purpose: Wrapper for the FwpmProviderContextEnum API.

Notes:
@@ -190,7 +190,7 @@ UINT32 HlprFwpmProviderContextEnum(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderContextDestroyEnumHandle" - + Purpose: Wrapper for the FwpmProviderContextDestroyEnumHandle API.

Notes:
@@ -240,7 +240,7 @@ UINT32 HlprFwpmProviderContextDestroyEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderContextCreateEnumHandle" - + Purpose: Wrapper for the FwpmProviderContextCreateEnumHandle API.

Notes:
@@ -271,7 +271,7 @@ UINT32 HlprFwpmProviderContextCreateEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmProviderContextRemoveAll" - + Purpose: Remove all providerContexts associated with the specified provider.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.h index ef3bc3165..7e7e7608a 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmProviderContext.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmProviderContext.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // FWPM_PROVIDER_CONTEXT objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.cpp index bbedd10f5..f020c9eef 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -55,7 +55,7 @@ /** @helper_function="HlprFwpmSubLayerEnum" - + Purpose: Wrapper for the FwpmSubLayerEnum API.

Notes:
@@ -114,7 +114,7 @@ UINT32 HlprFwpmSubLayerEnum(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmSubLayerDestroyEnumHandle" - + Purpose: Wrapper for the FwpmSubLayerDestroyEnumHandle API.

Notes:
@@ -164,7 +164,7 @@ UINT32 HlprFwpmSubLayerDestroyEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmSubLayerCreateEnumHandle" - + Purpose: Wrapper for the FwpmSubLayerCreateEnumHandle API.

Notes:
@@ -205,7 +205,7 @@ UINT32 HlprFwpmSubLayerCreateEnumHandle(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmSubLayerDeleteByKey" - + Purpose: Wrapper for the FwpmSubLayerDeleteByKey API.

Notes:
@@ -255,11 +255,11 @@ UINT32 HlprFwpmSubLayerDeleteByKey(_In_ const HANDLE engineHandle, /** @helper_function="HlprFwpmSubLayerAdd" - + Purpose: Add a sublayer to associate with all of this program's filters.

- Notes: By default sublayer is weighted just below the weight of FWPM_SUBLAYER_UNIVERSAL - so IPsec decryption will occur prior to invocation of any of WFPSampler's callout + Notes: By default sublayer is weighted just below the weight of FWPM_SUBLAYER_UNIVERSAL + so IPsec decryption will occur prior to invocation of any of WFPSampler's callout routines.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA364207.aspx
@@ -313,10 +313,10 @@ UINT32 HlprFwpmSubLayerAdd(_In_ HANDLE engineHandle, /** @helper_function="HlprFwpmSubLayerDelete" - + Purpose: Remove the sublayer that was associated with all of WFPSampler's filters.

- Notes: Function will fail if any of WFPSampler's filters are still present and associated + Notes: Function will fail if any of WFPSampler's filters are still present and associated with this sublayer.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA364209.aspx
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.h index bba25d683..2dbaab794 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmSubLayer.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmSubLayer.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // FWPM_SUBLAYER objects. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.cpp b/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.cpp index 5225e9fcb..96b38a7fe 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -58,7 +58,7 @@ /** @helper_function="HlprFwpmTransactionAbort" - + Purpose: Wrapper for the FwpmTransactionAbort API.

Notes:
@@ -91,7 +91,7 @@ UINT32 HlprFwpmTransactionAbort(_In_ HANDLE engineHandle) /** @helper_function="HlprFwpmTransactionBegin" - + Purpose: Wrapper for the FwpmTransactionBegin API.

Notes: Only need to use if making multiple BFE calls.
@@ -126,7 +126,7 @@ UINT32 HlprFwpmTransactionBegin(_In_ HANDLE engineHandle, /** @helper_function="HlprFwpmTransactionCommit" - + Purpose: Wrapper for the FwpmTransactionCommit API.

Notes: On failure, transaction gets aborted.
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.h b/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.h index 3789cd383..9b4403dbc 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_FwpmTransaction.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpmTransaction.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to BFE +// This module contains prototypes for functions which assist in actions pertaining to BFE // transactions. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_GUID.cpp b/network/trans/WFPSampler/lib/HelperFunctions_GUID.cpp index eda8106ea..5cce9cfdb 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_GUID.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_GUID.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -70,7 +70,7 @@ static const GUID NULL_GUID = {0}; /** @helper_function="HlprGUIDPurge" - + Purpose: Cleanup a GUID.

Notes:
@@ -88,7 +88,7 @@ VOID HlprGUIDPurge(_Inout_ GUID* pGUID) /** @helper_function="HlprGUIDDestroy" - + Purpose: Cleanup and free a GUID.

Notes:
@@ -111,7 +111,7 @@ VOID HlprGUIDDestroy(_Inout_ GUID** ppGUID) /** @helper_function="HlprGUIDPopulate" - + Purpose: Populate a GUID with a random value.

Notes:
@@ -151,7 +151,7 @@ UINT32 HlprGUIDPopulate(_Inout_ GUID* pGUID) /** @helper_function="HlprGUIDCreate" - + Purpose: Allocate and populate a GUID with a random value.

Notes: The caller is responsible for freeing the allocated memory using @@ -197,7 +197,7 @@ UINT32 HlprGUIDCreate(_Outptr_ GUID** ppGUID) /** @helper_function="HlprGUIDDestroyString" - + Purpose: Cleanup and free a string representing a GUID.

Notes: Use if string was allocated by HlprGUIDCreateString().
@@ -227,10 +227,10 @@ UINT32 HlprGUIDDestroyString(_Inout_ PWSTR* ppGUIDString) /** @helper_function="HlprGUIDCreateString" - + Purpose: Allocate and populate a string representing the provided GUID.

- Notes: The caller is responsible for freeing the allocated memory using + Notes: The caller is responsible for freeing the allocated memory using HlprGUIDDestroyString().

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA379352.aspx
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.cpp b/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.cpp index 456b244f3..86eedf504 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -24,9 +24,9 @@ // } // // { -// IPAddressV4String - Function pertains to null terminated wide character string +// IPAddressV4String - Function pertains to null terminated wide character string // representaions of IPv4 Addresses -// IPAddressV6String - Function pertains to null terminated wide character string +// IPAddressV6String - Function pertains to null terminated wide character string // representaions of IPv6 Addresses // } // @@ -62,7 +62,7 @@ /** @helper_function="HlprIPAddressV4StringIsValidFormat" - + Purpose: Determine if a string may be an IPv4 address by verifying the string:
is at least 7 characters
has at least 3 decimals('.')
@@ -115,7 +115,7 @@ BOOLEAN HlprIPAddressV4StringIsValidFormat(_In_ PCWSTR pIPAddress) /** @helper_function="HlprIPAddressV4StringToValue" - + Purpose: Convert a string representing an IPv4 Address to it's 4 BYTE value.

Notes:
@@ -177,7 +177,7 @@ UINT32 HlprIPAddressV4StringToValue(_In_ PCWSTR pIPv4AddressString, /** @helper_function="HlprIPAddressV6StringIsValidFormat" - + Purpose: Determine if a string may be an IPv6 address by verifying the string:
is at least 3 characters
has at least 2 colons (':')
@@ -231,7 +231,7 @@ BOOLEAN HlprIPAddressV6StringIsValidFormat(_In_ PCWSTR pIPAddress) /** @helper_function="HlprIPAddressV4StringToValue" - + Purpose: Convert a string representing an IPv6 Address to it's 16 BYTE value.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.h b/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.h index 9a20636f4..19ff74f42 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_IPAddress.h @@ -6,7 +6,7 @@ // HelperFunctions_IPAddress.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to IP +// This module contains prototypes for functions which assist in actions pertaining to IP // Addresses. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp b/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp index a0670d606..83449fe2d 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -54,7 +54,7 @@ /** @helper_function="HlprLogError" - + Purpose: Log an error message to the console.

Notes:
@@ -123,7 +123,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @helper_function="HlprLogInfo" - + Purpose: Log an information message to the console.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_MACAddress.cpp b/network/trans/WFPSampler/lib/HelperFunctions_MACAddress.cpp index d500b08e0..503e3c22b 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_MACAddress.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_MACAddress.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -51,7 +51,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add offset to check in +// December 13, 2013 - 1.1 - Add offset to check in // HlprEthernetMACAddressStringToValue // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ /** @helper_function="HlprEthernetMACAddressStringIsValidFormat" - + Purpose: Determine if a string may be an Ethernet MAC address by verifying the string:
is at least 17 characters
has at least 5 colons(':') or hyphens('-')
@@ -140,7 +140,7 @@ BOOLEAN HlprEthernetMACAddressStringIsValidFormat(_In_ PCWSTR pEthernetMACAddres /** @helper_function="HlprEthernetMACAddressStringToValue" - + Purpose: Convert a string representing an Ethernet MAC Address to it's 6 BYTE value.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Macros.h b/network/trans/WFPSampler/lib/HelperFunctions_Macros.h index 8b0ae8c4a..0fc6ee5ac 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Macros.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_Macros.h @@ -50,7 +50,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_CLOSE_HANDLE" - + Purpose: Close a standard handle and set to 0.

Notes:
@@ -66,7 +66,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_CLOSE_SERVICE_HANDLE" - + Purpose: Close a service handle and set to 0.

Notes:
@@ -82,7 +82,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_DELETE" - + Purpose: Free memory allocated with new and set the pointer to 0.

Notes:
@@ -98,7 +98,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_DELETE_ARRAY" - + Purpose: Free memory allocated with new[] and set the pointer to 0.

Notes:
@@ -114,7 +114,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_NEW" - + Purpose: Allocate memory with new and zero out its contents.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE.
@@ -133,7 +133,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_NEW_ARRAY" - + Purpose: Allocate memory with new[] and zero out its contents.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE_ARRAY.
@@ -168,7 +168,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_NEW_CASTED_ARRAY" - + Purpose: Allocate memory with new[] while casting the pointer, and zero out its contents.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE_ARRAY.
@@ -203,7 +203,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_LABEL" - + Purpose: Tag for the cleanup and exit portion of the function.

Notes:
@@ -215,7 +215,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /* @macro="HLPR_BAIL_LABEL_2" - + Purpose: Tag for the cleanup and exit portion of the function.

Notes:
@@ -227,7 +227,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_FAILURE_WITH_LABEL" - + Purpose: Jump in the code's execution to the provided tag if an error occurs.

Notes:
@@ -240,7 +240,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_FAILURE" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if an error occurs.

Notes:
@@ -253,7 +253,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_FAILURE_2" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if an error occurs.

Notes:
@@ -266,7 +266,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_ALLOC_FAILURE_WITH_LABEL" - + Purpose: Jump in the code's execution path to the provided tag if memory allocation fails.

Notes:
@@ -283,8 +283,8 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_ALLOC_FAILURE" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if memory allocation + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if memory allocation fails.

Notes:
@@ -298,8 +298,8 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_ALLOC_FAILURE_2" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if memory allocation + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if memory allocation fails.

Notes:
@@ -313,8 +313,8 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_NULL_POINTER" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if the pointer is + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if the pointer is NULL.

Notes:
@@ -327,8 +327,8 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_NULL_POINTER_2" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if the pointer is + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if the pointer is NULL.

Notes:
@@ -341,8 +341,8 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_NULL_POINTER_WITH_STATUS" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if the pointer is + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag if the pointer is NULL.

Notes: Status is set to ERROR_OUTOFMEMORY.
@@ -358,8 +358,8 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_ON_NULL_POINTER_WITH_STATUS_2" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if the pointer is + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag if the pointer is NULL.

Notes: Status is set to ERROR_OUTOFMEMORY.
@@ -375,7 +375,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_WITH_LABEL" - + Purpose: Jump in the code's execution path to the provided tag.

Notes:
@@ -387,7 +387,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL tag.

Notes:
@@ -399,7 +399,7 @@ VOID HlprLogError(_In_ PCWSTR pMessage, /** @macro="HLPR_BAIL_2" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 tag.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Process.cpp b/network/trans/WFPSampler/lib/HelperFunctions_Process.cpp index 6124ab407..e42230301 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Process.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_Process.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -56,7 +56,7 @@ /** @helper_function="PrvHlprServiceQueryState" - + Purpose: Return the state of the service.

Notes:
@@ -66,7 +66,7 @@ /** @helper_function="HlprServiceStop" - + Purpose: Issue a stop control to the specified service.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Process.h b/network/trans/WFPSampler/lib/HelperFunctions_Process.h index 64bfb94e3..21247b8f7 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Process.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_Process.h @@ -6,7 +6,7 @@ // HelperFunctions_Process.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // processes. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Registry.cpp b/network/trans/WFPSampler/lib/HelperFunctions_Registry.cpp index c933587cb..5d275ec9e 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Registry.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_Registry.cpp @@ -30,7 +30,7 @@ /** @helper_function="HlprRegistryDeleteValue" - + Purpose: Delete the Value from the specified Registry key.

Notes:
@@ -96,7 +96,7 @@ UINT32 HlprRegistryDeleteValue(_In_ HKEY hKey, /** @helper_function="HlprRegistrySetValue" - + Purpose: Opens a handle to the key, creates the appropriate value, and closes the key.

Notes:
@@ -158,7 +158,7 @@ UINT32 HlprRegistrySetValue(_In_ HKEY hKey, /** @helper_function="HlprRegistryGetValue" - + Purpose: Retrieves a value from the registry.

Notes:
@@ -193,11 +193,11 @@ UINT32 HlprRegistryGetValue(_In_ HKEY hKey, HLPR_BAIL_LABEL: return status; -} +} /** @helper_function="HlprRegistryDeleteKey" - + Purpose: Delete the SubKey from the Registry.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_SID.cpp b/network/trans/WFPSampler/lib/HelperFunctions_SID.cpp index 2a35da83e..f41a65b9e 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_SID.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_SID.cpp @@ -12,7 +12,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -64,10 +64,10 @@ /** @private_function="PrvHlprUserNameGetCurrent" - + Purpose: Allocate memory and return a string representation of the current user name.

- Notes: The caller is responsible for freeing any allocated memory using + Notes: The caller is responsible for freeing any allocated memory using HLPR_DELETE_ARRAY()

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Desktop/MS724432.aspx
@@ -131,7 +131,7 @@ PWSTR PrvHlprUserNameGetCurrent() /** @helper_function="HlprSIDDestroy" - + Purpose: Free an allocated SID.

Notes:
@@ -154,12 +154,12 @@ VOID HlprSIDDestroy(_Inout_ SID** ppSID) /** @helper_function="HlprSIDCreate" - Purpose: Allocate memory and populate with a SID for either the specified account name and + Purpose: Allocate memory and populate with a SID for either the specified account name and type (SID_NAME_USE), or a well-known SID based on the type (WELL_KNOWN_SID_TYPE).

Notes: The caller is responsible for freeing any allocated memory using HlprSIDDestroy().

- MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA379594.aspx
+ MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA379594.aspx
*/ _At_(*ppSID, _Pre_ _Null_) _When_(return != NO_ERROR, _At_(*ppSID, _Post_ _Null_)) @@ -269,7 +269,7 @@ UINT32 HlprSIDCreate(_Outptr_result_bytebuffer_(*pSIDSize) SID** ppSID, !IsValidSid(*ppSID)) { status = ERROR_INVALID_SID; - + HlprLogError(L"HlprSIDCreate : IsValidSid() [status: %#x]", status); @@ -312,7 +312,7 @@ UINT32 HlprSIDCreate(_Outptr_result_bytebuffer_(*pSIDSize) SID** ppSID,
Notes: The caller is responsible for freeing any allocated memory using HlprSIDDestroy().

- MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA379594.aspx
+ MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA379594.aspx
*/ _At_(*ppSID, _Pre_ _Null_) _When_(return != NO_ERROR, _At_(*ppSID, _Post_ _Null_)) @@ -369,8 +369,8 @@ UINT32 HlprSIDGetForCurrentUser(_Outptr_result_bytebuffer_(*pSIDSize) SID** ppSI
Notes: The caller is responsible for freeing any allocated memory using HlprSIDDestroy().

- MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA446585.aspx
- HTTP://MSDN.Microsoft.com/En-US/Library/AA379151.aspx
+ MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/AA446585.aspx
+ HTTP://MSDN.Microsoft.com/En-US/Library/AA379151.aspx
*/ _At_(*ppSID, _Pre_ _Null_) _When_(return != NO_ERROR, _At_(*ppSID, _Post_ _Null_)) diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Service.cpp b/network/trans/WFPSampler/lib/HelperFunctions_Service.cpp index b04a5a590..be444ffb1 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Service.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_Service.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -65,7 +65,7 @@ /** @helper_function="PrvHlprServiceQueryState" - + Purpose: Return the state of the service.

Notes:
@@ -154,7 +154,7 @@ UINT32 PrvHlprServiceQueryState(_In_ PCWSTR pServiceName, /** @helper_function="PrvHlprServiceStateToString" - + Purpose: Return a string representation of the service state.

Notes:
@@ -187,7 +187,7 @@ PCWSTR PrvHlprServiceStateToString(_In_ const UINT32 state) /** @helper_function="PrvHlprServiceControl" - + Purpose: Issue a control to the specified service.

Notes:
@@ -302,11 +302,11 @@ UINT32 PrvHlprServiceControl(_In_ PCWSTR pServiceName, /** @helper_function="HlprServiceNotificationRegister" - - Purpose: Register a notification function which is triggered by the service's transition in + + Purpose: Register a notification function which is triggered by the service's transition in state.

- Notes: The caller is responsible for closing the service handle using + Notes: The caller is responsible for closing the service handle using HLPR_CLOSE_SERVICE_HANDLE.


@@ -381,7 +381,7 @@ UINT32 HlprServiceNotificationStateChangeRegister(_In_ PCWSTR pServiceName, /** @helper_function="HlprServiceQueryState" - + Purpose: Return the state of the service.

Notes:
@@ -405,7 +405,7 @@ UINT32 HlprServiceQueryState(_In_ PCWSTR pServiceName) /** @helper_function="HlprServiceStart" - + Purpose: Issue a start control to the specified service.

Notes:
@@ -457,7 +457,7 @@ UINT32 HlprServiceStart(_In_ PCWSTR pServiceName) /** @helper_function="HlprServiceStop" - + Purpose: Issue a stop control to the specified service.

Notes:
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Service.h b/network/trans/WFPSampler/lib/HelperFunctions_Service.h index e6668ece9..c1f4c4676 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Service.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_Service.h @@ -6,7 +6,7 @@ // HelperFunctions_Service.h // // Abstract: -// This module contains prototypes for functions which assist in actions pertaining to +// This module contains prototypes for functions which assist in actions pertaining to // services. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Strings.cpp b/network/trans/WFPSampler/lib/HelperFunctions_Strings.cpp index 1d473c7d1..f3b77c227 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Strings.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_Strings.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -54,7 +54,7 @@ /** @helper_function="HlprStringsAreEqual" - + Purpose: Determine if two strings are identical.

Notes: Function is overloaded.
@@ -108,7 +108,7 @@ BOOLEAN HlprStringsAreEqual(_In_reads_(stringSizeAlpha) PCWSTR pStringAlpha, /** @helper_function="HlprStringsAreEqual" - + Purpose: Determine if two strings are identical.

Notes: Function is overloaded.
@@ -138,7 +138,7 @@ BOOLEAN HlprStringsAreEqual(_In_opt_ PCWSTR pStringAlpha, HLPR_BAIL; } - + status = StringCchLength(pStringOmega, STRSAFE_MAX_CCH, &omegaSize); @@ -164,7 +164,7 @@ BOOLEAN HlprStringsAreEqual(_In_opt_ PCWSTR pStringAlpha, /** @helper_function="HlprStringsAreEqual" - + Purpose: Determine if two strings are identical.

Notes: Function is overloaded.
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.cpp b/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.cpp index eb2e35a07..51439f6d8 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.cpp @@ -22,7 +22,7 @@ /** @helper_function="HlprThreadPoolDataPurge" - + Purpose: Cleanup a THREADPOOL_DATA object.

Notes:
@@ -58,7 +58,7 @@ inline VOID HlprThreadPoolDataPurge(_Inout_ THREADPOOL_DATA* pThreadPoolData) /** @helper_function="HlprThreadPoolDataDestroy" - + Purpose: Cleanup and free a THREADPOOL_DATA object.

Notes:
@@ -80,7 +80,7 @@ inline VOID HlprThreadPoolDataDestroy(_Inout_ THREADPOOL_DATA** ppThreadPoolData /** @helper_function="HlprThreadPoolDataPurge" - + Purpose: Cleanup a THREADPOOL_DATA object.

Notes: The caller is responsible for freeing any allocated memory using @@ -123,7 +123,7 @@ UINT32 HlprThreadPoolDataPopulate(_Inout_ THREADPOOL_DATA* pThreadPoolData, status); HLPR_BAIL; - } + } SetThreadpoolCallbackPool(&(pThreadPoolData->callbackEnvironment), pThreadPoolData->pThreadPool); @@ -142,7 +142,7 @@ UINT32 HlprThreadPoolDataPopulate(_Inout_ THREADPOOL_DATA* pThreadPoolData, /** @helper_function="HlprThreadPoolDataDestroy" - + Purpose: Allocate and populate a THREADPOOL_DATA object.

Notes: The caller is responsible for freeing any allocated memory using diff --git a/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.h b/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.h index 1f1a6ad2d..24aa53d0c 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_ThreadPools.h @@ -6,7 +6,7 @@ // HelperFunctions_ThreadPools.h // // Abstract: -// This module contains prototypes of functions which assist in operations pertaining to +// This module contains prototypes of functions which assist in operations pertaining to // Thread Pools. // // Author: diff --git a/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.cpp b/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.cpp index 50b93eeaf..77c7725b2 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_ThreadsAndEvents.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -31,7 +31,7 @@ // { // Cleanup - // Set - -// Start - +// Start - // Stop - // Wait - // } @@ -59,7 +59,7 @@ /** @helper_function="HlprEventReset" - + Purpose: Sets the event to nonsignaled.

Notes:
@@ -77,7 +77,7 @@ VOID HlprEventReset(_In_opt_ HANDLE event) /** @helper_function="HlprEventSet" - + Purpose: Signals an event.

Notes:
@@ -94,7 +94,7 @@ VOID HlprEventSet(_In_opt_ HANDLE event) /** @helper_function="HlprThreadStart" - + Purpose: Generates a new thread.

Notes:
@@ -175,7 +175,7 @@ UINT32 HlprThreadStart(_Inout_ THREAD_DATA* pThreadData, /** @helper_function="HlprThreadStop" - + Purpose: Signals a thread to stop and cleans it up.

Notes:
@@ -208,7 +208,7 @@ UINT32 HlprThreadStop(_Inout_ THREAD_DATA* pThreadData) /** @helper_function="HlprThreadStop" - + Purpose: Signals a thread to stop and cleans it up, and frees any allocated memory.

Notes:
@@ -237,7 +237,7 @@ UINT32 HlprThreadStop(_Inout_ THREAD_DATA** ppThreadData) /** @helper_function="HlprThreadCleanup" - + Purpose: Cleans up a previously allocated thread.

Notes:
@@ -313,7 +313,7 @@ VOID HlprThreadCleanup(_Inout_opt_ THREAD_DATA* pThreadData) /** @helper_function="HlprThreadWaitForCompletion" - + Purpose: Waits for a thread to complete.

Notes:
@@ -338,7 +338,7 @@ UINT32 HlprThreadWaitForCompletion(_Inout_opt_ THREAD_DATA* pThreadData) /** @helper_function="HlprThreadWaitForEvent" - + Purpose: Waits for a particular event to be set within the thread.

Notes:
@@ -378,7 +378,7 @@ UINT32 HlprThreadWaitForEvent(_In_ HANDLE eventHandle, { status = WAIT_TIMEOUT; - HlprLogInfo(L"HlprThreadWaitForEvent() [status: %#x]", + HlprLogInfo(L"HlprThreadWaitForEvent() [status: %#x]", status); break; diff --git a/network/trans/WFPSampler/lib/HelperFunctions_WinSock.cpp b/network/trans/WFPSampler/lib/HelperFunctions_WinSock.cpp index 2ff097377..8e83476a0 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_WinSock.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_WinSock.cpp @@ -22,7 +22,7 @@ /** @helper_function="HlprWinSockCleanup" - + Purpose: Terminates use of the Winsock DLL for the process's use.

Notes:
@@ -48,7 +48,7 @@ UINT32 HlprWinSockCleanup() /** @helper_function="HlprWinSockInitialize" - + Purpose: Initializes use of the Winsock DLL for the process's use.

Notes:
@@ -74,7 +74,7 @@ UINT32 HlprWinSockInitialize() /** @helper_function="HlprWinSockDestroyWSAEvent" - + Purpose: Free a WSAEvent.

Notes:
@@ -103,7 +103,7 @@ UINT32 HlprWinSockDestroyWSAEvent(_Inout_ WSAEVENT* pWSAEvent) /** @helper_function="HlprWinSockSetWSAEvent" - + Purpose: Set a WSAEvent to signaled.

Notes:
@@ -128,7 +128,7 @@ UINT32 HlprWinSockSetWSAEvent(_In_ WSAEVENT wsaEvent) /** @helper_function="HlprWinSockCreateWSAEvent" - + Purpose: Create a WSAEvent.

Notes:
@@ -156,7 +156,7 @@ UINT32 HlprWinSockCreateWSAEvent(_Inout_ WSAEVENT* pWSAEvent) /** @helper_function="HlprWinSockDestroySocket" - + Purpose: Destroy a socket gracefully.

Notes:
@@ -206,7 +206,7 @@ UINT32 HlprWinSockDestroySocket(_Inout_ SOCKET* pSocket) /** @helper_function="HlprWinSockCreateSocket" - + Purpose: Create a new socket.

Notes:
@@ -248,10 +248,10 @@ UINT32 HlprWinSockCreateSocket(_In_ SOCKADDR_STORAGE* pSockAddrStorage, /** @helper_function="HlprWinSockSetAbortiveDisconnect" - + Purpose: Set the linger socket option to FALSE.

- Notes: This function needs to be called prior to HlprWinSockDestroySocket for stream + Notes: This function needs to be called prior to HlprWinSockDestroySocket for stream sockets that get a WSAECONNRESET.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Desktop/MS740476.aspx
@@ -285,7 +285,7 @@ UINT32 HlprWinSockSetAbortiveDisconnect(_In_ SOCKET abortedSocket) /** @helper_function="HlprWinSockSetSocketReceiveTimeout" - + Purpose: Specify a timeout for blocking receive calls.

Notes: This function needs to be called prior to binding the socket.
@@ -318,7 +318,7 @@ UINT32 HlprWinSockSetSocketReceiveTimeout(_In_ SOCKET receivingSocket, /** @helper_function="HlprWinSockSetSocketSendTimeout" - + Purpose: Specify a timeout for blocking send calls.

Notes: This function needs to be called prior to binding the socket.
@@ -352,7 +352,7 @@ UINT32 HlprWinSockSetSocketSendTimeout(_In_ SOCKET sendingSocket, /** @helper_function="HlprWinSockSetSocketNonBlocking" - + Purpose: Enable non-blocking mode on the socket.

Notes: This function needs to be called prior to binding the socket.
@@ -390,7 +390,7 @@ UINT32 HlprWinSockSetSocketNonBlocking(_In_ SOCKET unboundSocket) /** @helper_function="HlprWinSockAcquirePortReservationForSocket" - + Purpose: Request a runtime reservation for the provided ports.

Notes:
@@ -435,7 +435,7 @@ UINT32 HlprWinSockAcquirePortReservationForSocket(_In_ SOCKET unboundSocket, /** @helper_function="HlprWinSockAssociatePortReservationWithSocket" - + Purpose: Associate the socket with the persistent port(s) that were reserved previously.

Notes:
@@ -474,7 +474,7 @@ UINT32 HlprWinSockAssociatePortReservationWithSocket(_In_ SOCKET unboundSocket, /** @private_function="HlprWinSockQueryPortReservation" - + Purpose: Find the token for the previously created port reservations.

Notes:
@@ -522,7 +522,7 @@ UINT32 HlprWinSockQueryPortReservation(_In_ UINT8 ipProtocol, /** @private_function="HlprWinSockDestroyPortReservation" - + Purpose: Removes the reservation of specific ports for the Proxy service's use.

Notes:
@@ -570,7 +570,7 @@ UINT32 HlprWinSockDestroyPortReservation(_In_ UINT8 ipProtocol, /** @private_function="HlprWinSockCreatePortReservation" - + Purpose: Reserves specific ports for the Proxy service's use.

Notes:
@@ -615,8 +615,8 @@ UINT32 HlprWinSockCreatePortReservation(_In_ UINT8 ipProtocol, /** @helper_function="HlprWinSockAssociateConnectionRedirectRecordsAndContextWithProxySocket" - - Purpose: Retrieve the original REDIRECT_RECORDS from the original socket and associate them + + Purpose: Retrieve the original REDIRECT_RECORDS from the original socket and associate them with the new (proxy) socket.

Notes: This function needs to be called prior to binding the proxied socket.
@@ -704,7 +704,7 @@ UINT32 HlprWinSockAssociateConnectionRedirectRecordsAndContextWithProxySocket(_I { ASSERT(redirectContextSize == REDIRECT_CONTEXT_SIZE); - /// The context passed in WFPSamplerCalloutDriver.sys is the SOCKADDR_STORAGE info of the + /// The context passed in WFPSamplerCalloutDriver.sys is the SOCKADDR_STORAGE info of the /// classified peer endpoint ... RtlCopyMemory(pProxyPeerSockAddrStorage, pRedirectContext, @@ -754,7 +754,7 @@ UINT32 HlprWinSockAssociateConnectionRedirectRecordsAndContextWithProxySocket(_I /** @helper_function="HlprWinSockBindToSocket" - + Purpose: Bind a socket to a protocol, port, and network address.

Notes:
@@ -786,7 +786,7 @@ UINT32 HlprWinSockBindToSocket(_In_ SOCKET unboundSocket, /** @helper_function="HlprWinSockListenOnSocket" - + Purpose: Place the socket in a state in which it listens for incoming connections.

Notes:
@@ -815,7 +815,7 @@ UINT32 HlprWinSockListenOnSocket(_In_ SOCKET boundSocket) /** @helper_function="HlprWinSockAcceptConnection" - + Purpose: Place the socket in a state in which it listens for incoming connections.

Notes:
@@ -852,7 +852,7 @@ UINT32 HlprWinSockAcceptConnection(_In_ SOCKET listeningSocket, /** @helper_function="HlprWinSockConnectSocket" - + Purpose: Establish the TCP handshake with the remote peer.

Notes:
@@ -888,7 +888,7 @@ UINT32 HlprWinSockConnectSocket(_In_ SOCKET unconnectedSocket, /** @helper_function="HlprWinSockReceiveTCPData" - + Purpose: Receive TCP data from the peer.

Notes: For use with TCP only.
@@ -946,7 +946,7 @@ UINT32 HlprWinSockReceiveTCPData(_In_ SOCKET receivingSocket, /** @helper_function="HlprWinSockSendTCPData" - + Purpose: Transmit TCP data to the peer.

Notes: For use with TCP only.
diff --git a/network/trans/WFPSampler/lib/HelperFunctions_WinSock.h b/network/trans/WFPSampler/lib/HelperFunctions_WinSock.h index 36ccc78af..411ccc082 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_WinSock.h +++ b/network/trans/WFPSampler/lib/HelperFunctions_WinSock.h @@ -6,7 +6,7 @@ // HelperFunctions_WinSock.h // // Abstract: -// This module contains prototypes of functions which assist in operations pertaining to +// This module contains prototypes of functions which assist in operations pertaining to // Windows Sockets. // // Author: diff --git a/network/trans/WFPSampler/svc/Framework_RPCServerInterface.cpp b/network/trans/WFPSampler/svc/Framework_RPCServerInterface.cpp index b1cce97e3..7b6989bd7 100644 --- a/network/trans/WFPSampler/svc/Framework_RPCServerInterface.cpp +++ b/network/trans/WFPSampler/svc/Framework_RPCServerInterface.cpp @@ -14,7 +14,7 @@ // Naming Convention: // // -// +// // i.e. // // @@ -112,7 +112,7 @@ extern "C" { /** @framework_function="MIDL_user_free" - + Purpose: RPC stub routine to allocate memory.

Notes:
@@ -138,7 +138,7 @@ extern "C" /** @framework_function="MIDL_user_free" - + Purpose: RPC stub routine to free allocated memory.

Notes:
@@ -156,7 +156,7 @@ extern "C" /** @framework_function="RPCInterfaceSecurityCallback" - + Purpose: Callback routine to enforce security measures.

Notes:
@@ -211,8 +211,8 @@ RPC_STATUS CALLBACK RPCServerInterfaceSecurityCallback(_In_ RPC_IF_HANDLE interf /** @framework_function="RPCServerInterfaceTerminate" - - Purpose: Remove the RPC server interface by unregistering the endpoint and interface and + + Purpose: Remove the RPC server interface by unregistering the endpoint and interface and freeing the bindings.

Notes:
@@ -294,8 +294,8 @@ RPC_STATUS RPCServerInterfaceTerminate() /** @framework_function="RPCServerInterfaceInitialize" - - Purpose: Initialize the RPC server interface by creating the RPC bindings and registering + + Purpose: Initialize the RPC server interface by creating the RPC bindings and registering the interface and endpoint.

Notes:
diff --git a/network/trans/WFPSampler/svc/Framework_WFPSamplerService.cpp b/network/trans/WFPSampler/svc/Framework_WFPSamplerService.cpp index df1bb66e7..03784ec2b 100644 --- a/network/trans/WFPSampler/svc/Framework_WFPSamplerService.cpp +++ b/network/trans/WFPSampler/svc/Framework_WFPSamplerService.cpp @@ -6,13 +6,13 @@ // Framework_WFPSamplerService.cpp // // Abstract: -// This module contains functions which form the entry point to the WFPSampler service +// This module contains functions which form the entry point to the WFPSampler service // (WFPSamplerService.exe). // // Naming Convention: // // -// +// // i.e. // // @@ -86,7 +86,7 @@ SERVICE_DATA* pServiceData = 0; /** @private_function="PrvRegistryCreateEntries" - + Purpose: Adds registry keys that allow operation during Safe-Mode with Networking.

Notes:
@@ -123,7 +123,7 @@ UINT32 PrvRegistryCreateEntries() /** @private_function="PrvRegistryDestroyEntries" - + Purpose: Removes the registry keys that allow operation during Safe-Mode.

Notes:
@@ -149,7 +149,7 @@ UINT32 PrvRegistryDestroyEntries() /** @framework_function="ServiceEventLogError" - + Purpose: Log errors in the eventlog.

Notes:
@@ -219,7 +219,7 @@ VOID ServiceEventLogError(_In_ PCWSTR pFunctionName, /** @framework_function="ServiceStatusReportToSCM" - + Purpose: Inform the Service Control Manager of the WFPSampler service's current state.

Notes:
@@ -290,7 +290,7 @@ UINT32 ServiceStatusReportToSCM(_In_ UINT32 currentState, /** @framework_function="ServiceControlHandler" - + Purpose: Take action on the indicated service control.

Notes:
@@ -337,10 +337,10 @@ VOID ServiceControlHandler(_In_ UINT32 serviceControl) /** @framework_function="ServiceTerminate" - + Purpose: Cleanup and stop the WFPSampler service.

- Notes: Cleanup entails relinquishing Windows Firewall categories, tearing down the RPC + Notes: Cleanup entails relinquishing Windows Firewall categories, tearing down the RPC server interface and stopping the service.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Desktop/MS688715.aspx
@@ -378,10 +378,10 @@ UINT32 ServiceTerminate() /** @framework_function="ServiceInitialize" - + Purpose: Create environment to successfully run and start the WFPSampler service.

- Notes: Creation entails taking the firewall category from Windows Firewall, building the + Notes: Creation entails taking the firewall category from Windows Firewall, building the RPC server interface, and starting the WFPSampler service.

MSDN_Ref:
@@ -491,7 +491,7 @@ UINT32 ServiceInitialize() /** @framework_function="ServiceUninstall" - + Purpose: Remove the WFPSampler service from the Service Control Manager.

Notes: Uninstalling will remove all WFP objects associated to the WFPSampler service.
@@ -581,7 +581,7 @@ VOID ServiceUninstall() HlprLogInfo(L"ServiceUninstall() [status: %#x]", status); - + HLPR_BAIL_LABEL: if(engineHandle) @@ -596,7 +596,7 @@ VOID ServiceUninstall() /** @framework_function="ServiceInstall" - + Purpose: Add the WFPSampler service to the Service Control Manager and start it.

Notes:
@@ -725,7 +725,7 @@ UINT32 ServiceInstall() /** @framework_function="ServiceMain" - + Purpose: Entry point for the Service Control Manager to hook into the WFPSampler service.

Notes:
@@ -784,7 +784,7 @@ VOID ServiceMain(_In_ const UINT32 argumentCount, /** @framework_function="wmain" - Purpose: Entry point for WFPSamplerService.Exe. Accepts several parameters which are + Purpose: Entry point for WFPSamplerService.Exe. Accepts several parameters which are parsed and dealt with accordingly.
-i - installs the WFPSampler service.
-u - uninstalls the WFPSampler service and its associated objects.
diff --git a/network/trans/WFPSampler/svc/Framework_WindowsFirewall.cpp b/network/trans/WFPSampler/svc/Framework_WindowsFirewall.cpp index cade7d774..ce6470c1a 100644 --- a/network/trans/WFPSampler/svc/Framework_WindowsFirewall.cpp +++ b/network/trans/WFPSampler/svc/Framework_WindowsFirewall.cpp @@ -52,8 +52,8 @@ UINT32 WindowsFirewallAcquireFirewallCategory(); /** @framework_function="WindowsFirewallNotification" - - Purpose: Notification used to take firewall categories from Windows Firewall when MPSSvc + + Purpose: Notification used to take firewall categories from Windows Firewall when MPSSvc transitions to a running

Notes:
@@ -136,8 +136,8 @@ DWORD WindowsFirewallNotifyThreadStartRoutine(_In_ LPVOID lpThreadParameter) /** @framework_function="WindowsFirewallReleaseFirewallCategory" - - Purpose: Relinquish ownership of the Firewall Category back to Windows Firewall and + + Purpose: Relinquish ownership of the Firewall Category back to Windows Firewall and unregister as a Firewall product.

Notes:
@@ -166,8 +166,8 @@ VOID WindowsFirewallReleaseFirewallCategory() /** @framework_function="WindowsFirewallAcquireFirewallCategory" - - Purpose: Take ownership from Windows Firewall of the Firewall Category and register as a + + Purpose: Take ownership from Windows Firewall of the Firewall Category and register as a Firewall product so as to be displayed in the Windows Firewall User Interface.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_AdvancedPacketInjection.cpp b/network/trans/WFPSampler/svc/Scenarios_AdvancedPacketInjection.cpp index 9cd69d1c3..75d7e8ce9 100644 --- a/network/trans/WFPSampler/svc/Scenarios_AdvancedPacketInjection.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_AdvancedPacketInjection.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioAdvancedPacketInjection - Function pertains to all of the Advanced Packet +// ScenarioAdvancedPacketInjection - Function pertains to all of the Advanced Packet // Injection Scenarios // RPC - Function is and RPC entry point. // } @@ -30,8 +30,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -64,10 +64,10 @@ /** @private_function="PrvScenarioAdvancedPacketInjectionDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_ADVANCED_PACKET_INJECTION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts are removed as well.

MSDN_Ref:
@@ -162,11 +162,11 @@ UINT32 PrvScenarioAdvancedPacketInjectionDeleteFwpmObjects(_In_ const FWPM_FILTE /** @private_function="PrvScenarioAdvancedPacketInjectionAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_ADVANCED_PACKET_INJECTION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout is then added and associated with the filter.

MSDN_Ref:
@@ -208,9 +208,9 @@ UINT32 PrvScenarioAdvancedPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V4 || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V6 - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + || pFilter->layerKey == FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET || pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET || @@ -218,7 +218,7 @@ UINT32 PrvScenarioAdvancedPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_NATIVE || pFilter->layerKey == FWPM_LAYER_INGRESS_VSWITCH_ETHERNET || pFilter->layerKey == FWPM_LAYER_EGRESS_VSWITCH_ETHERNET - + #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -310,8 +310,8 @@ UINT32 PrvScenarioAdvancedPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* /** @scenario_function="ScenarioAdvancedPacketInjectionRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_ADVANCED_PACKET_INJECTION.

Notes:
@@ -331,13 +331,13 @@ UINT32 ScenarioAdvancedPacketInjectionRemove(_In_ const FWPM_FILTER* pFilter) Purpose: Scenario which will blindly reinject the classified traffic.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_ADVANCED_PACKET_INJECTION callouts for the provided layer.

- No data modification is made to the traffic, and checks are in place to prevent + No data modification is made to the traffic, and checks are in place to prevent infinite reinjection of the traffic.

- Ideal usage is to implement in the presence of a 3rd party firewall to see how they + Ideal usage is to implement in the presence of a 3rd party firewall to see how they coexist with another provider performing injection.

MSDN_Ref:
@@ -356,8 +356,8 @@ UINT32 ScenarioAdvancedPacketInjectionAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioAdvancedPacketInjection" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_ADVANCED_PACKET_INJECTION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp b/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp index 3a698bc0b..9773b60f2 100644 --- a/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioAppContainer - Function pertains to all of the Application Container +// ScenarioAppContainer - Function pertains to all of the Application Container // Scenarios // RPC - Function is and RPC entry point. // } @@ -30,13 +30,13 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters +// Invoke - Function implements the scenario based on parameters // passed from the commandline interface (WFPSampler.exe). // } // // { // FwpmObjects - Function acts on WFP objects. -// ScenarioAppContainer - Function pertains to all of the Application Container +// ScenarioAppContainer - Function pertains to all of the Application Container // Scenarios // } // @@ -65,7 +65,7 @@ static HANDLE registrationHandle = 0; /** @private_function="PrvScenarioAppContainerDeleteFwpmObjects" - + Purpose:

Notes: Function is overloaded.
@@ -166,7 +166,7 @@ UINT32 PrvScenarioAppContainerDeleteFwpmObjects(_In_ const SID* pPackageID, /** @private_function="PrvScenarioAppContainerDeleteFwpmObjects" - + Purpose:

Notes: Function is overloaded.
@@ -267,7 +267,7 @@ UINT32 PrvScenarioAppContainerDeleteFwpmObjects() /** @private_function="PrvScenarioAppContainerAddFwpmObjects" - + Purpose: Add filters for specific containers.

Notes: Function is overloaded.
@@ -374,7 +374,7 @@ UINT32 PrvScenarioAppContainerAddFwpmObjects(_In_ const SID* pPackageID, /** @private_function="PrvScenarioAppContainerAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_APP_CONTAINER scenarios.

Notes: Function is overloaded.
@@ -477,8 +477,8 @@ UINT32 PrvScenarioAppContainerAddFwpmObjects(_In_ BOOLEAN persistent = TRUE, /** @callback_function="PrvScenarioAppContainerActOnChange" - - Purpose: Callback function which is invoked when an application adds or removes it's + + Purpose: Callback function which is invoked when an application adds or removes it's appContainer capabilities.

Notes:
@@ -509,7 +509,7 @@ VOID CALLBACK PrvScenarioAppContainerActOnChange(_In_opt_ VOID* pContext, /** @private_function="PrvScenarioAppContainerEnumExisting" - + Purpose:

Notes:
@@ -546,7 +546,7 @@ UINT32 PrvScenarioAppContainerEnumExisting() /** @private_function="PrvScenarioAppContainerUnregister" - + Purpose:

Notes:
@@ -573,7 +573,7 @@ UINT32 PrvScenarioAppContainerUnregister() /** @private_function="PrvScenarioAppContainerRegister" - + Purpose:

Notes:
@@ -598,8 +598,8 @@ UINT32 PrvScenarioAppContainerRegister() /** @scenario_function="ScenarioAppContainerRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_APP_CONTAINER.

Notes:
@@ -622,7 +622,7 @@ UINT32 ScenarioAppContainerRemove(_In_ BOOLEAN trustWSH) /** @scenario_function="ScenarioAppContainerAdd" - + Purpose:

Notes:
@@ -658,8 +658,8 @@ UINT32 ScenarioAppContainerAdd(_In_ BOOLEAN trustWSH, /** @rpc_function="RPCInvokeScenarioBasicAction" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_APP_CONTAINER.

Notes:
@@ -734,11 +734,11 @@ error_status_t RPCInvokeScenarioAppContainer(/* [in] */ handle_t rpcBindingHandl /** @rpc_function="RPCInvokeScenarioBasicAction" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_APP_CONTAINER.

- Notes: This particular function is only a stub for RPC on downlevel SKUs (Windows 7 and + Notes: This particular function is only a stub for RPC on downlevel SKUs (Windows 7 and below).

MSDN_Ref:
diff --git a/network/trans/WFPSampler/svc/Scenarios_BasicAction.cpp b/network/trans/WFPSampler/svc/Scenarios_BasicAction.cpp index 2e8c4f95a..dd7fc2492 100644 --- a/network/trans/WFPSampler/svc/Scenarios_BasicAction.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_BasicAction.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -32,8 +32,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -64,7 +64,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Prune filters for enumeration and handle WinBlue Fast +// December 13, 2013 - 1.1 - Prune filters for enumeration and handle WinBlue Fast // layers. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -73,11 +73,11 @@ /** @private_function="PrvScenarioBasicActionDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_BASIC_ACTION_* scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified - layer. If no layer is provided, then a default layer is used. If associated, the + Notes: Scenario removes the filters using specified filtering conditions at the specified + layer. If no layer is provided, then a default layer is used. If associated, the callout and provider contexts are removed as well.

MSDN_Ref:
@@ -169,12 +169,12 @@ UINT32 PrvScenarioBasicActionDeleteFwpmObjects(_In_ const FWPM_FILTER* pFilter, /** @private_function="PrvScenarioBasicActionAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_BASIC_ACTION_* scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - If no layer is provided, then a default layer is used. This filter is associated - with WFPSampler's default sublayer and provider. If required, the appropriate + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + If no layer is provided, then a default layer is used. This filter is associated + with WFPSampler's default sublayer and provider. If required, the appropriate callout and provider context is added and associated with the filter.

MSDN_Ref:
@@ -229,7 +229,7 @@ UINT32 PrvScenarioBasicActionAddFwpmObjects(_In_ const FWPM_FILTER* pFilter, if(filter.action.type & FWP_ACTION_FLAG_CALLOUT) { - FWP_ACTION_TYPE newActionType = FWP_ACTION_CALLOUT_TERMINATING; + FWP_ACTION_TYPE newActionType = FWP_ACTION_CALLOUT_TERMINATING; HLPR_NEW(pCallout, FWPM_CALLOUT); @@ -362,8 +362,8 @@ UINT32 PrvScenarioBasicActionAddFwpmObjects(_In_ const FWPM_FILTER* pFilter, /** @scenario_function="ScenarioBasicActionBlockRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_ACTION_BLOCK.

Notes:
@@ -381,11 +381,11 @@ UINT32 ScenarioBasicActionBlockRemove(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicActionBlockAdd" - + Purpose: Scenario which will return FWP_ACTION_BLOCK.

- Notes: Adds a filter. By default this will be a static terminating filter. If specified, - this filter can be made to reference one of the + Notes: Adds a filter. By default this will be a static terminating filter. If specified, + this filter can be made to reference one of the WFPSAMPLER_CALLOUT_BASIC_ACTION_BLOCK callouts.

MSDN_Ref:
@@ -402,8 +402,8 @@ UINT32 ScenarioBasicActionBlockAdd(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicActionContinueRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_ACTION_CONTINUE.

Notes:
@@ -421,11 +421,11 @@ UINT32 ScenarioBasicActionContinueRemove(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicActionContinueAdd" - + Purpose: Scenario which will return FWP_ACTION_CONTINUE.

- Notes: Adds a filter. By default this will be a static terminating filter. If specified, - this filter can be made to reference one of the + Notes: Adds a filter. By default this will be a static terminating filter. If specified, + this filter can be made to reference one of the WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE callouts.

MSDN_Ref:
@@ -442,8 +442,8 @@ UINT32 ScenarioBasicActionContinueAdd(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicActionPermitRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_ACTION_PERMIT.

Notes:
@@ -454,18 +454,18 @@ _Success_(return == NO_ERROR) UINT32 ScenarioBasicActionPermitRemove(_In_ const FWPM_FILTER* pFilter) { ASSERT(pFilter); - + return PrvScenarioBasicActionDeleteFwpmObjects(pFilter, FWP_ACTION_PERMIT); } /** @scenario_function="ScenarioBasicActionPermitAdd" - + Purpose: Scenario which will return FWP_ACTION_PERMIT.

- Notes: Adds a filter. By default this will be a static terminating filter. If specified, - this filter can be made to reference one of the + Notes: Adds a filter. By default this will be a static terminating filter. If specified, + this filter can be made to reference one of the WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT callouts.

MSDN_Ref:
@@ -482,8 +482,8 @@ UINT32 ScenarioBasicActionPermitAdd(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicActionRandomRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_ACTION_RANDOM.

Notes:
@@ -494,21 +494,21 @@ _Success_(return == NO_ERROR) UINT32 ScenarioBasicActionRandomRemove(_In_ const FWPM_FILTER* pFilter) { ASSERT(pFilter); - + return PrvScenarioBasicActionDeleteFwpmObjects(pFilter, FWP_ACTION_CALLOUT_UNKNOWN); } /** @scenario_function="ScenarioBasicActionRandomAdd" - - Purpose: Scenario which will randomly return FWP_ACTION_BLOCK, FWP_ACTION_CONTINUE, or + + Purpose: Scenario which will randomly return FWP_ACTION_BLOCK, FWP_ACTION_CONTINUE, or FWP_ACTION_PERMIT.

- Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_BASIC_ACTION_RANDOM callouts for the provided layer.

- The randomness of the action is configurable via the percentage values for this + The randomness of the action is configurable via the percentage values for this scenario.

MSDN_Ref:
@@ -527,8 +527,8 @@ UINT32 ScenarioBasicActionRandomAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioBasicAction" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_BASIC_ACTION_*.

Notes:
@@ -600,7 +600,7 @@ error_status_t RPCInvokeScenarioBasicAction(/* [in] */ handle_t rpcBindingHandle } else status = ScenarioBasicActionRandomRemove(pFilter); - + break; } } diff --git a/network/trans/WFPSampler/svc/Scenarios_BasicPacketExamination.cpp b/network/trans/WFPSampler/svc/Scenarios_BasicPacketExamination.cpp index a0d88dd26..7ff968028 100644 --- a/network/trans/WFPSampler/svc/Scenarios_BasicPacketExamination.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_BasicPacketExamination.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioBasicPacketExamination - Function pertains to all of the Basic Packet +// ScenarioBasicPacketExamination - Function pertains to all of the Basic Packet // Examination Scenarios // RPC - Function is and RPC entry point. // } @@ -57,7 +57,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -65,10 +65,10 @@ /** @private_function="PrvScenarioBasicPacketExaminationDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_BASIC_PACKET_EXAMINATION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts are removed as well.

MSDN_Ref:
@@ -159,12 +159,12 @@ UINT32 PrvScenarioBasicPacketExaminationDeleteFwpmObjects(_In_ const FWPM_FILTER /** @private_function="PrvScenarioBasicPacketExaminationAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_BASIC_PACKET_EXAMINATION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified - layer. This filter is associated with WFPSampler's default provider and the - built-in inspection sublayer. The appropriate callout is then added and + Notes: Scenario adds a filter using specified filtering conditions to the specified + layer. This filter is associated with WFPSampler's default provider and the + built-in inspection sublayer. The appropriate callout is then added and associated with the filter.

MSDN_Ref:
@@ -246,9 +246,9 @@ UINT32 PrvScenarioBasicPacketExaminationAddFwpmObjects(_In_ const FWPM_FILTER* p pFilter->layerKey == FWPM_LAYER_ALE_BIND_REDIRECT_V6 || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V4 || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V6 - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + || pFilter->layerKey == FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET || pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET || @@ -275,7 +275,7 @@ UINT32 PrvScenarioBasicPacketExaminationAddFwpmObjects(_In_ const FWPM_FILTER* p sizeof(FWPM_FILTER)); callout.calloutKey = WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION; - callout.calloutKey.Data4[7] = HlprFwpmLayerGetIDByKey(&(filter.layerKey)); /// Uniquely identifies the layer the callout will use + callout.calloutKey.Data4[7] = HlprFwpmLayerGetIDByKey(&(filter.layerKey)); /// Uniquely identifies the layer the callout will use callout.displayData.name = L"WFPSampler's Basic Packet Examination Callout"; callout.displayData.description = L"Causes callout invocation which examines traffic"; callout.providerKey = (GUID*)&WFPSAMPLER_PROVIDER; @@ -330,8 +330,8 @@ UINT32 PrvScenarioBasicPacketExaminationAddFwpmObjects(_In_ const FWPM_FILTER* p /** @scenario_function="ScenarioBasicPacketExaminationRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_PACKET_EXAMINATION.

Notes:
@@ -347,10 +347,10 @@ UINT32 ScenarioBasicPacketExaminationRemove(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicPacketExaminationAdd" - + Purpose: Scenario which will blindly reinject the classified traffic.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_BASIC_PACKET_EXAMINATION callouts for the provided layer.

No data modification is made to the traffic. No injection occurs.
@@ -366,8 +366,8 @@ UINT32 ScenarioBasicPacketExaminationAdd(_In_ const FWPM_FILTER* pFilter) /** @rpc_function="RPCInvokeScenarioBasicPacketExamination" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_BASIC_PACKET_EXAMINATION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_BasicPacketInjection.cpp b/network/trans/WFPSampler/svc/Scenarios_BasicPacketInjection.cpp index 7a33beed7..04450cb00 100644 --- a/network/trans/WFPSampler/svc/Scenarios_BasicPacketInjection.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_BasicPacketInjection.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioBasicPacketInjection - Function pertains to all of the Basic Packet Injection +// ScenarioBasicPacketInjection - Function pertains to all of the Basic Packet Injection // Scenarios // RPC - Function is and RPC entry point. // } @@ -30,8 +30,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -58,7 +58,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -66,10 +66,10 @@ /** @private_function="PrvScenarioBasicPacketInjectionDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_BASIC_PACKET_INJECTION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts are removed as well.

MSDN_Ref:
@@ -164,11 +164,11 @@ UINT32 PrvScenarioBasicPacketInjectionDeleteFwpmObjects(_In_ const FWPM_FILTER* /** @private_function="PrvScenarioBasicPacketInjectionAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_BASIC_PACKET_INJECTION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout is then added and associated with the filter.

MSDN_Ref:
@@ -210,9 +210,9 @@ UINT32 PrvScenarioBasicPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFi || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V4 || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V6 - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + || pFilter->layerKey == FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET || pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET || @@ -220,7 +220,7 @@ UINT32 PrvScenarioBasicPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFi pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_NATIVE || pFilter->layerKey == FWPM_LAYER_INGRESS_VSWITCH_ETHERNET || pFilter->layerKey == FWPM_LAYER_EGRESS_VSWITCH_ETHERNET - + #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -312,8 +312,8 @@ UINT32 PrvScenarioBasicPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFi /** @scenario_function="ScenarioBasicPacketInjectionRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_PACKET_INJECTION.

Notes:
@@ -333,13 +333,13 @@ UINT32 ScenarioBasicPacketInjectionRemove(_In_ const FWPM_FILTER* pFilter) Purpose: Scenario which will blindly reinject the classified traffic.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_BASIC_PACKET_INJECTION callouts for the provided layer.

- No data modification is made to the traffic, and checks are in place to prevent + No data modification is made to the traffic, and checks are in place to prevent infinite reinjection of the traffic.

- Ideal usage is to implement in the presence of a 3rd party firewall to see how they + Ideal usage is to implement in the presence of a 3rd party firewall to see how they coexist with another provider performing injection.

MSDN_Ref:
@@ -358,8 +358,8 @@ UINT32 ScenarioBasicPacketInjectionAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioBasicPacketInjection" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_BASIC_PACKET_INJECTION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_BasicPacketModification.cpp b/network/trans/WFPSampler/svc/Scenarios_BasicPacketModification.cpp index a031eb7d4..45daf4562 100644 --- a/network/trans/WFPSampler/svc/Scenarios_BasicPacketModification.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_BasicPacketModification.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioBasicPacketModification - Function pertains to all of the Basic Packet +// ScenarioBasicPacketModification - Function pertains to all of the Basic Packet // Modification Scenarios. // RPC - Function is and RPC entry point. // } @@ -31,13 +31,13 @@ // Add - Function adds objects. // Remove - Function removes objects. // Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// passed from the commandline interface // (WFPSampler.exe). // } // // { // FwpmObjects - Function acts on WFP objects. -// ScenarioBasicPacketModification - Function pertains to all of the Basic Packet +// ScenarioBasicPacketModification - Function pertains to all of the Basic Packet // Modification Scenarios. // } // @@ -58,7 +58,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -66,10 +66,10 @@ /** @private_function="PrvBasicPacketModificationScenarioDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_BASIC_PACKET_MODIFICATION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts and provider contexts are removed as well.

MSDN_Ref:
@@ -164,12 +164,12 @@ UINT32 PrvBasicPacketModificationScenarioDeleteFwpmObjects(_In_ const FWPM_FILTE /** @private_function="PrvBasicPacketModificationScenarioAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_BASIC_PACKET_INJECTION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the - specified layer. This filter is associated with WFPSampler's default sublayer and - provider. The appropriate callout and provider contest is then added and + Notes: Scenario adds a filter using specified filtering conditions to the + specified layer. This filter is associated with WFPSampler's default sublayer and + provider. The appropriate callout and provider contest is then added and associated with the filter.

MSDN_Ref:
@@ -211,9 +211,9 @@ UINT32 PrvBasicPacketModificationScenarioAddFwpmObjects(_In_ const FWPM_FILTER* || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V4 || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V6 - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + || pFilter->layerKey == FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET || pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET || @@ -221,7 +221,7 @@ UINT32 PrvBasicPacketModificationScenarioAddFwpmObjects(_In_ const FWPM_FILTER* pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_NATIVE || pFilter->layerKey == FWPM_LAYER_INGRESS_VSWITCH_ETHERNET || pFilter->layerKey == FWPM_LAYER_EGRESS_VSWITCH_ETHERNET - + #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -313,8 +313,8 @@ UINT32 PrvBasicPacketModificationScenarioAddFwpmObjects(_In_ const FWPM_FILTER* /** @private_function="PrvBasicPacketModificationScenarioRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_PACKET_MODIFICATION.

Notes:
@@ -331,13 +331,13 @@ UINT32 PrvBasicPacketModificationScenarioRemove(_In_ const FWPM_FILTER* pFilter) /** @private_function="PrvBasicPacketModificationScenarioAdd" - + Purpose: Scenario which will inject modified traffic back into the stack.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_BASIC_PACKET_MODIFICATION callouts for the provided layer.

- Ideal usage is to implement in the presence of a 3rd party firewall to see how + Ideal usage is to implement in the presence of a 3rd party firewall to see how they coexist with another provider performing modified packet injection.

MSDN_Ref:
@@ -355,8 +355,8 @@ UINT32 PrvBasicPacketModificationScenarioAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioBasicPacketModification" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_BASIC_PACKET_MODIFICATION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_BasicStreamInjection.cpp b/network/trans/WFPSampler/svc/Scenarios_BasicStreamInjection.cpp index e302e06af..208153c9d 100644 --- a/network/trans/WFPSampler/svc/Scenarios_BasicStreamInjection.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_BasicStreamInjection.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioBasicStreamInjection - Function pertains to all of the Basic Stream Injection +// ScenarioBasicStreamInjection - Function pertains to all of the Basic Stream Injection // Scenarios // RPC - Function is and RPC entry point. // } @@ -30,8 +30,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -58,7 +58,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -66,10 +66,10 @@ /** @private_function="PrvScenarioBasicStreamInjectionDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_BASIC_STREAM_INJECTION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts and provider contexts are removed as well.

MSDN_Ref:
@@ -164,12 +164,12 @@ UINT32 PrvScenarioBasicStreamInjectionDeleteFwpmObjects(_In_ const FWPM_FILTER* /** @private_function="PrvScenarioBasicPacketInjectionAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_BASIC_STREAM_INJECTION scenarios.

Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The - appropriate callout and provider context is then added and associated with the + This filter is associated with WFPSampler's default sublayer and provider. The + appropriate callout and provider context is then added and associated with the filter.

MSDN_Ref:
@@ -272,8 +272,8 @@ UINT32 PrvScenarioBasicStreamInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFi /** @scenario_function="ScenarioBasicStreamInjectionRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_BASIC_STREAM_INJECTION.

Notes:
@@ -290,15 +290,15 @@ UINT32 ScenarioBasicStreamInjectionRemove(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioBasicStreamInjectionAdd" - + Purpose: Scenario which will blindly reinject the classified stream data.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_BASIC_STREAM_INJECTION callouts for the provided layer.

No data modification is made to the data

- Ideal usage is to implement in the presence of a 3rd party firewall to see how they + Ideal usage is to implement in the presence of a 3rd party firewall to see how they coexist with another provider performing stream injection.

MSDN_Ref:
@@ -316,8 +316,8 @@ UINT32 ScenarioBasicStreamInjectionAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioBasicStreamInjection" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_BASIC_STREAM_INJECTION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_FastPacketInjection.cpp b/network/trans/WFPSampler/svc/Scenarios_FastPacketInjection.cpp index cd2e18b7f..c5d71dbd8 100644 --- a/network/trans/WFPSampler/svc/Scenarios_FastPacketInjection.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_FastPacketInjection.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioFastPacketInjection - Function pertains to all of the Fast Packet Injection +// ScenarioFastPacketInjection - Function pertains to all of the Fast Packet Injection // Scenarios // RPC - Function is and RPC entry point. // } @@ -30,8 +30,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -58,7 +58,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -66,10 +66,10 @@ /** @private_function="PrvScenarioFastPacketInjectionDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_FAST_PACKET_INJECTION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts are removed as well.

MSDN_Ref:
@@ -156,11 +156,11 @@ UINT32 PrvScenarioFastPacketInjectionDeleteFwpmObjects(_In_ const FWPM_FILTER* p /** @private_function="PrvScenarioFastPacketInjectionAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_FAST_PACKET_INJECTION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout is then added and associated with the filter.

MSDN_Ref:
@@ -200,9 +200,9 @@ UINT32 PrvScenarioFastPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFil || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V4 || pFilter->layerKey == FWPM_LAYER_STREAM_PACKET_V6 - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + || pFilter->layerKey == FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET || pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET || @@ -210,7 +210,7 @@ UINT32 PrvScenarioFastPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFil pFilter->layerKey == FWPM_LAYER_OUTBOUND_MAC_FRAME_NATIVE || pFilter->layerKey == FWPM_LAYER_INGRESS_VSWITCH_ETHERNET || pFilter->layerKey == FWPM_LAYER_EGRESS_VSWITCH_ETHERNET - + #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -243,7 +243,7 @@ UINT32 PrvScenarioFastPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFil if(filter.flags & FWPM_FILTER_FLAG_BOOTTIME || filter.flags & FWPM_FILTER_FLAG_PERSISTENT) callout.flags = FWPM_CALLOUT_FLAG_PERSISTENT; - + status = HlprFwpmEngineOpen(&engineHandle); HLPR_BAIL_ON_FAILURE(status); @@ -279,8 +279,8 @@ UINT32 PrvScenarioFastPacketInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFil /** @scenario_function="ScenarioFastPacketInjectionRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_FAST_PACKET_INJECTION.

Notes:
@@ -300,13 +300,13 @@ UINT32 ScenarioFastPacketInjectionRemove(_In_ const FWPM_FILTER* pFilter) Purpose: Scenario which will blindly reinject the classified traffic.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_FAST_PACKET_INJECTION callouts for the provided layer.

- No data modification is made to the traffic, and checks are in place to prevent + No data modification is made to the traffic, and checks are in place to prevent infinite reinjection of the traffic.

- Ideal usage is to implement in the presence of a 3rd party firewall to see how they + Ideal usage is to implement in the presence of a 3rd party firewall to see how they coexist with another provider performing injection.

MSDN_Ref:
@@ -322,8 +322,8 @@ UINT32 ScenarioFastPacketInjectionAdd(_In_ const FWPM_FILTER* pFilter) /** @rpc_function="RPCInvokeScenarioFastPacketInjection" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_FAST_PACKET_INJECTION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_FastStreamInjection.cpp b/network/trans/WFPSampler/svc/Scenarios_FastStreamInjection.cpp index 8013377b2..b121d4546 100644 --- a/network/trans/WFPSampler/svc/Scenarios_FastStreamInjection.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_FastStreamInjection.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioFastStreamInjection - Function pertains to all of the Fast Stream Injection +// ScenarioFastStreamInjection - Function pertains to all of the Fast Stream Injection // Scenarios // RPC - Function is and RPC entry point. // } @@ -30,8 +30,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -58,7 +58,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -66,10 +66,10 @@ /** @private_function="PrvScenarioFastStreamInjectionDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_FAST_STREAM_INJECTION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts are removed as well.

MSDN_Ref:
@@ -156,11 +156,11 @@ UINT32 PrvScenarioFastStreamInjectionDeleteFwpmObjects(_In_ const FWPM_FILTER* p /** @private_function="PrvScenarioFastStreamInjectionAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_FAST_STREAM_INJECTION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout is then added and associated with the filter.

MSDN_Ref:
@@ -202,7 +202,7 @@ UINT32 PrvScenarioFastStreamInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFil if(filter.flags & FWPM_FILTER_FLAG_BOOTTIME || filter.flags & FWPM_FILTER_FLAG_PERSISTENT) callout.flags = FWPM_CALLOUT_FLAG_PERSISTENT; - + status = HlprFwpmEngineOpen(&engineHandle); HLPR_BAIL_ON_FAILURE(status); @@ -238,8 +238,8 @@ UINT32 PrvScenarioFastStreamInjectionAddFwpmObjects(_In_ const FWPM_FILTER* pFil /** @scenario_function="ScenarioFastStreamInjectionRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_FAST_STREAM_INJECTION.

Notes:
@@ -259,13 +259,13 @@ UINT32 ScenarioFastStreamInjectionRemove(_In_ const FWPM_FILTER* pFilter) Purpose: Scenario which will blindly reinject the classified traffic.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_FAST_STREAM_INJECTION callouts for the provided layer.

- No data modification is made to the traffic, and checks are in place to prevent + No data modification is made to the traffic, and checks are in place to prevent infinite reinjection of the traffic.

- Ideal usage is to implement in the presence of a 3rd party firewall to see how they + Ideal usage is to implement in the presence of a 3rd party firewall to see how they coexist with another provider performing injection.

MSDN_Ref:
@@ -281,8 +281,8 @@ UINT32 ScenarioFastStreamInjectionAdd(_In_ const FWPM_FILTER* pFilter) /** @rpc_function="RPCInvokeScenarioFastStreamInjection" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_FAST_STREAM_INJECTION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_FlowAssociation.cpp b/network/trans/WFPSampler/svc/Scenarios_FlowAssociation.cpp index b767c2284..c6ec55ee7 100644 --- a/network/trans/WFPSampler/svc/Scenarios_FlowAssociation.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_FlowAssociation.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioFlowAssociation - Function pertains to all of the Flow Association +// ScenarioFlowAssociation - Function pertains to all of the Flow Association // Scenarios // RPC - Function is and RPC entry point. // } @@ -30,8 +30,8 @@ // { // Add - Function adds objects // Remove - Function removes objects -// Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// Invoke - Function implements the scenario based on parameters +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -62,10 +62,10 @@ /** @private_function="PrvScenarioFlowAssociationDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_FLOW_ASSOCIATION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. Associated callouts and provider contexts are removed as well.

MSDN_Ref:
@@ -160,12 +160,12 @@ UINT32 PrvScenarioFlowAssociationDeleteFwpmObjects(_In_ const FWPM_FILTER* pFilt /** @private_function="PrvScenarioFlowAssociationAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_FLOW_ASSOCIATION scenarios.

Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The - appropriate callout and provider context is then added and associated with the + This filter is associated with WFPSampler's default sublayer and provider. The + appropriate callout and provider context is then added and associated with the filter.

MSDN_Ref:
@@ -268,8 +268,8 @@ UINT32 PrvScenarioFlowAssociationAddFwpmObjects(_In_ const FWPM_FILTER* pFilter, /** @scenario_function="ScenarioFlowAssociationRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_FLOW_ASSOCIATION.

Notes:
@@ -289,7 +289,7 @@ UINT32 ScenarioFlowAssociationRemove(_In_ const FWPM_FILTER* pFilter) Purpose: Scenario which will associate context with the layers and callouts provided.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_FLOW_ASSOCIATION callouts for the provided layer.


@@ -309,8 +309,8 @@ UINT32 ScenarioFlowAssociationAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioFlowAssociation" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_FLOW_ASSOCIATION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_PendAuthorization.cpp b/network/trans/WFPSampler/svc/Scenarios_PendAuthorization.cpp index 663039595..92f2b0669 100644 --- a/network/trans/WFPSampler/svc/Scenarios_PendAuthorization.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_PendAuthorization.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioPendAuthorization - Function pertains to all of the Pend Authorization +// ScenarioPendAuthorization - Function pertains to all of the Pend Authorization // Scenarios. // RPC - Function is and RPC entry point. // } @@ -31,7 +31,7 @@ // Add - Function adds objects. // Remove - Function removes objects. // Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// passed from the commandline interface // (WFPSampler.exe). // } // @@ -58,7 +58,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Prune filters for enumeration and limit scenario to -// only the supported layers +// only the supported layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -66,10 +66,10 @@ /** @private_function="PrvScenarioPendAuthorizationDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_PEND_AUTHORIZATION scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. The associated callout and provider contexts are removed as well.

MSDN_Ref:
@@ -164,11 +164,11 @@ UINT32 PrvScenarioPendAuthorizationDeleteFwpmObjects(_In_ const FWPM_FILTER* pFi /** @private_function="PrvScenarioPendAuthorizationAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_PEND_AUTHORIZATION scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout and provider context is added and associated with the filter.

MSDN_Ref:
@@ -205,7 +205,7 @@ UINT32 PrvScenarioPendAuthorizationAddFwpmObjects(_In_ const FWPM_FILTER* pFilte HLPR_BAIL_ON_FAILURE(status); providerContext.displayData.name = L"WFPSampler's Pend Authorization ProviderContext"; - providerContext.displayData.description = L"Instructs the driver what final action to take on the pended authorization"; + providerContext.displayData.description = L"Instructs the driver what final action to take on the pended authorization"; providerContext.providerKey = (GUID*)&WFPSAMPLER_PROVIDER; providerContext.type = FWPM_GENERAL_CONTEXT; providerContext.dataBuffer = &byteBlob; @@ -278,8 +278,8 @@ UINT32 PrvScenarioPendAuthorizationAddFwpmObjects(_In_ const FWPM_FILTER* pFilte /** @scenario_function="ScenarioPendAuthorizationRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_PEND_AUTHORIZATION.

Notes:
@@ -296,10 +296,10 @@ UINT32 ScenarioPendAuthorizationRemove(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioPendAuthorizationAdd" - + Purpose: Scenario which will delay and either block or permit an authorization attempt.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_PEND_AUTHORIZATION callouts for the provided layer.

MSDN_Ref:
@@ -317,8 +317,8 @@ UINT32 ScenarioPendAuthorizationAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioPendAuthorization" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_PEND_AUTHORIZATION.

Notes:
diff --git a/network/trans/WFPSampler/svc/Scenarios_PendEndpointClosure.cpp b/network/trans/WFPSampler/svc/Scenarios_PendEndpointClosure.cpp index f7a1b9cb9..4e16a7864 100644 --- a/network/trans/WFPSampler/svc/Scenarios_PendEndpointClosure.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_PendEndpointClosure.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -22,7 +22,7 @@ // } // // { -// ScenarioPendEndpointClosure - Function pertains to all of the Pend Endpoint Closure +// ScenarioPendEndpointClosure - Function pertains to all of the Pend Endpoint Closure // Scenarios. // RPC - Function is and RPC entry point. // } @@ -31,13 +31,13 @@ // Add - Function adds objects. // Remove - Function removes objects. // Invoke - Function implements the scenario based on parameters -// passed from the commandline interface +// passed from the commandline interface // (WFPSampler.exe). // } // // { // FwpmObjects - Function acts on WFP objects. -// ScenarioPendEndpointClosure - Function pertains to all of the Pend Endpoint Closure +// ScenarioPendEndpointClosure - Function pertains to all of the Pend Endpoint Closure // Scenarios. // } // @@ -66,10 +66,10 @@ /** @private_function="PrvScenarioPendEndpointClosureDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_PEND_ENDPOINT_CLOSURE scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. The associated callout and provider contexts are removed as well.

MSDN_Ref:
@@ -164,11 +164,11 @@ UINT32 PrvScenarioPendEndpointClosureDeleteFwpmObjects(_In_ const FWPM_FILTER* p /** @private_function="PrvScenarioPendEndpointClosureAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_PEND_ENDPOINT_CLOSURE scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout and provider context is added and associated with the filter.

MSDN_Ref:
@@ -264,8 +264,8 @@ UINT32 PrvScenarioPendEndpointClosureAddFwpmObjects(_In_ const FWPM_FILTER* pFil /** @scenario_function="ScenarioPendEndpointClosureRemove" - - Purpose: Function that removes corresponding objects for a previously added + + Purpose: Function that removes corresponding objects for a previously added SCENARIO_PEND_ENDPOINT_CLOSURE.

Notes:
@@ -282,10 +282,10 @@ UINT32 ScenarioPendEndpointClosureRemove(_In_ const FWPM_FILTER* pFilter) /** @scenario_function="ScenarioPendEndpointClosureAdd" - + Purpose: Scenario which will delay the endpoint from from closing.

- Notes: Adds a filter which references one of the + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_PEND_ENDPOINT_CLOSURE callouts for the provided layer.

MSDN_Ref:
@@ -303,8 +303,8 @@ UINT32 ScenarioPendEndpointClosureAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioPendEndpointClosure" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_PEND_ENDPOINT_CLOSURE.

Notes:
@@ -351,11 +351,11 @@ error_status_t RPCInvokeScenarioPendEndpointClosure(/* [in] */ handle_t rpcBindi /** @rpc_function="RPCInvokeScenarioBasicAction" - - Purpose: RPC exposed function used to dipatch the scenario routines for + + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_APP_CONTAINER.

- Notes: This particular function is only a stub for RPC on downlevel SKUs (Windows 7 and + Notes: This particular function is only a stub for RPC on downlevel SKUs (Windows 7 and below).

MSDN_Ref:
diff --git a/network/trans/WFPSampler/svc/Scenarios_Proxy.cpp b/network/trans/WFPSampler/svc/Scenarios_Proxy.cpp index d9be73235..7241a5ae5 100644 --- a/network/trans/WFPSampler/svc/Scenarios_Proxy.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_Proxy.cpp @@ -12,7 +12,7 @@ // // // -// +// // i.e. // // @@ -29,7 +29,7 @@ // { // Add - Function adds objects. // Remove - Function removes objects. -// Invoke - Function implements the scenario based on parameters passed from the +// Invoke - Function implements the scenario based on parameters passed from the // commandline interface (WFPSampler.exe). // } // @@ -54,9 +54,9 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Prune filters for enumeration, fix legacy proxying by -// injection, and limit scenario to only the supported -// layers +// December 13, 2013 - 1.1 - Prune filters for enumeration, fix legacy proxying by +// injection, and limit scenario to only the supported +// layers // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -64,10 +64,10 @@ /** @private_function="PrvScenarioProxyDeleteFwpmObjects" - + Purpose: Function that disables the SCENARIO_PROXY scenarios.

- Notes: Scenario removes the filters using specified filtering conditions at the specified + Notes: Scenario removes the filters using specified filtering conditions at the specified layer. The associated callout and provider contexts are removed as well.

MSDN_Ref:
@@ -340,16 +340,16 @@ UINT32 PrvScenarioProxyDeleteFwpmObjects(_In_ const FWPM_FILTER* pFilter, /** @private_function="PrvScenarioProxyAddFwpmObjects" - + Purpose: Function that enables the SCENARIO_PROXY scenarios.

- Notes: Scenario adds a filter using specified filtering conditions to the specified layer. - This filter is associated with WFPSampler's default sublayer and provider. The + Notes: Scenario adds a filter using specified filtering conditions to the specified layer. + This filter is associated with WFPSampler's default sublayer and provider. The appropriate callout and provider context are added and associated with the filter.

- If proxying by injection, then both the OUTBOUND_TRANSPORT and INBOUND_IPPACKET - objects are added. This has the limitation of not working with IPsec, however - proxing using INBOUND_TRANSPORT has the limitation of not working with TCP and + If proxying by injection, then both the OUTBOUND_TRANSPORT and INBOUND_IPPACKET + objects are added. This has the limitation of not working with IPsec, however + proxing using INBOUND_TRANSPORT has the limitation of not working with TCP and connected UDP.

MSDN_Ref:
@@ -395,7 +395,7 @@ UINT32 PrvScenarioProxyAddFwpmObjects(_In_ const FWPM_FILTER* pFilter, HLPR_BAIL_ON_FAILURE(status); providerContext.displayData.name = L"WFPSampler's Proxy ProviderContext"; - providerContext.displayData.description = L"Instructs the driver where to proxy the socket or connection"; + providerContext.displayData.description = L"Instructs the driver where to proxy the socket or connection"; providerContext.providerKey = (GUID*)&WFPSAMPLER_PROVIDER; providerContext.type = FWPM_GENERAL_CONTEXT; providerContext.dataBuffer = &byteBlob; @@ -611,7 +611,7 @@ UINT32 PrvScenarioProxyAddFwpmObjects(_In_ const FWPM_FILTER* pFilter, /** @scenario_function="ScenarioProxyRemove" - + Purpose: Function that removes corresponding objects for a previously added SCENARIO_PROXY.

Notes:
@@ -631,10 +631,10 @@ UINT32 ScenarioProxyRemove(_In_ const FWPM_FILTER* pFilter, /** @scenario_function="ScenarioProxyAdd" - + Purpose: Scenario which will proxy either a connection or a socket to a new endpoint.

- Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_PROXY callouts for + Notes: Adds a filter which references one of the WFPSAMPLER_CALLOUT_PROXY callouts for the provided layer.

MSDN_Ref:
@@ -652,7 +652,7 @@ UINT32 ScenarioProxyAdd(_In_ const FWPM_FILTER* pFilter, /** @rpc_function="RPCInvokeScenarioProxy" - + Purpose: RPC exposed function used to dipatch the scenario routines for SCENARIO_PROXY.

Notes:
diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp index b71c77e08..8feb6c8c5 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp @@ -6,13 +6,13 @@ // ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Classify functions for injecting packets back into the data path +// This module contains WFP Classify functions for injecting packets back into the data path // using the allocate / block / inject method. // // Naming Convention: // // -// +// // i.e. // ClassifyAdvancedPacketInjection // @@ -35,15 +35,15 @@ // // AdvancedPacketInjection - Function demonstrates the allocate / block / inject model. // -// DeferredProcedureCall - DPC routine for Out of Band injection which dispatches the +// DeferredProcedureCall - DPC routine for Out of Band injection which dispatches the // proper Perform Function. // WorkItemRoutine - WorkItem Routine for Out of Band Injection which dispatches // the proper Perform Function. // AtInboundMACFrame - Function operates on: -// FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET, and +// FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET, and // FWPM_LAYER_INBOUND_MAC_NATIVE. // AtOutboundMACFrame - Function operates on: -// FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET, and +// FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET, and // FWPM_LAYER_OUTBOUND_MAC_NATIVE. // AtEgressVSwitchEthernet - Function operates on: // FWPM_LAYER_EGRESS_VSWITCH_ETHERNET. @@ -55,18 +55,18 @@ // FWPM_LAYER_OUTBOUND_IPPACKET_V{4/6} // AtForward - Function operates on: // FWPM_LAYER_IPFORWARD_V{4/6} -// AtInboundTransport - Function operates on: +// AtInboundTransport - Function operates on: // FWPM_LAYER_INBOUND_TRANSPORT_V{4/6}, // FWPM_LAYER_INBOUND_ICMP_ERROR_V{4/6}, // FWPM_LAYER_DATAGRAM_DATA_V{4/6}, -// FWPM_LAYER_STREAM_PACKET_V{4/6}, and +// FWPM_LAYER_STREAM_PACKET_V{4/6}, and // FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V{4/6} // FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4/6} // AtOutboundTransport - Function operates on: // FWPM_LAYER_OUTBOUND_TRANSPORT_V{4/6}, // FWPM_LAYER_OUTBOUND_ICMP_ERROR_V{4/6}, // FWPM_LAYER_DATAGRAM_DATA_V{4/6}, -// FWPM_LAYER_STREAM_PACKET_V{4/6}, and +// FWPM_LAYER_STREAM_PACKET_V{4/6}, and // FWPM_LAYER_ALE_AUTH_CONNECT_V{4/6} // FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4/6} // @@ -112,7 +112,7 @@ INJECTION_COUNTERS g_apiOutstandingNewNBLs = {0}; /** @function="PrvAdvancedPacketInjectionCountersIncrement" - + Purpose: Increment the appropriate counters based on the layerId and direction.

Notes:
@@ -394,7 +394,7 @@ VOID PrvAdvancedPacketInjectionCountersIncrement(_In_ const FWPS_INCOMING_VALUES /** @private_function="PrvAdvancedPacketInjectionCountersIncrementTotalActionResults" - + Purpose: Increment the appropriate counters based on the layerId, direction, and action.

Notes:
@@ -425,7 +425,7 @@ VOID PrvAdvancedPacketInjectionCountersIncrementTotalActionResults(_In_ const FW /** @function="AdvancedPacketInjectionCountersIncrement" - + Purpose: Increment the appropriate counters based on the injection handle.

Notes:
@@ -522,8 +522,8 @@ VOID AdvancedPacketInjectionCountersIncrement(_In_ HANDLE injectionHandle, /** @private_function="PerformAdvancedPacketInjectionAtInboundMACFrame" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack from the incoming MAC + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack from the incoming MAC Layers using FwpsInjectMacReceiveAsync().

Notes: Applies to the following inbound layers:
@@ -746,8 +746,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundMACFrame(_In_ CLASSIFY_DATA** pp /** @private_function="PerformAdvancedPacketInjectionAtOutboundMACFrame" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack from the outgoing MAC + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack from the outgoing MAC Layers using FwpsInjectMacSendAsync().

Notes: Applies to the following outbound layers:
@@ -830,7 +830,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundMACFrame(_In_ CLASSIFY_DATA** p pNDISPort->type == FWP_UINT32) ndisPort = (NDIS_PORT_NUMBER)pNDISPort->uint32; - /// Initial offset is at the MAC Header, so just create a new NET_BUFFER_LIST based on the + /// Initial offset is at the MAC Header, so just create a new NET_BUFFER_LIST based on the /// original NET_BUFFER_LIST ... pNetBufferList = KrnlHlprNBLCreateNew(g_pNDISPoolData->nblPoolHandle, (NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -851,10 +851,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundMACFrame(_In_ CLASSIFY_DATA** p } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList, @@ -937,9 +937,9 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundMACFrame(_In_ CLASSIFY_DATA** p /** @private_function="PerformAdvancedPacketInjectionAtIngressVSwitchEthernet" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the virtual switch's ingress - path from the ingress VSwitch Layers using + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the virtual switch's ingress + path from the ingress VSwitch Layers using FwpsInjectvSwitchEthernetIngressAsync0().

Notes: Applies to the following ingress layers:
@@ -1036,7 +1036,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtIngressVSwitchEthernet(_In_ CLASSIFY_DA HLPR_BAIL; } - /// Initial offset is at the MAC Header, so just create a new NET_BUFFER_LIST based on the + /// Initial offset is at the MAC Header, so just create a new NET_BUFFER_LIST based on the /// original NET_BUFFER_LIST ... pNetBufferList = KrnlHlprNBLCreateNew(g_pNDISPoolData->nblPoolHandle, (NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -1057,10 +1057,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtIngressVSwitchEthernet(_In_ CLASSIFY_DA } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList, @@ -1143,9 +1143,9 @@ NTSTATUS PerformAdvancedPacketInjectionAtIngressVSwitchEthernet(_In_ CLASSIFY_DA /** @private_function="PerformAdvancedPacketInjectionAtEgressVSwitchEthernet" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the virtual switch's ingress - path from the egress VSwitch Layers using + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the virtual switch's ingress + path from the egress VSwitch Layers using FwpsInjectvSwitchEthernetIngressAsync0().

Notes: Applies to the following egress layers:
@@ -1242,7 +1242,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT HLPR_BAIL; } - /// Initial offset is at the MAC Header, so just create a new NET_BUFFER_LIST based on the + /// Initial offset is at the MAC Header, so just create a new NET_BUFFER_LIST based on the /// original NET_BUFFER_LIST ... pNetBufferList = KrnlHlprNBLCreateNew(g_pNDISPoolData->nblPoolHandle, (NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -1263,10 +1263,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList, @@ -1351,8 +1351,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT /** @private_function="PerformAdvancedPacketInjectionAtInboundNetwork" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's inbound path from + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's inbound path from the incoming Network Layers using FwpsInjectNetworkReceiveAsync().

Notes: Applies to the following inbound layers:
@@ -1567,10 +1567,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundNetwork(_In_ CLASSIFY_DATA** ppC } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); @@ -1707,8 +1707,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundNetwork(_In_ CLASSIFY_DATA** ppC /** @private_function="PerformAdvancedPacketInjectionAtOutboundNetwork" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's outbound path + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's outbound path from the outgoing Network Layers using FwpsInjectNetworkSendAsync().

Notes: Applies to the following outbound layers:
@@ -1779,7 +1779,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundNetwork(_In_ CLASSIFY_DATA** pp FWPS_METADATA_FIELD_COMPARTMENT_ID)) compartmentID = (COMPARTMENT_ID)pMetadata->compartmentId; - /// Initial offset is at the IP Header, so just create a new NET_BUFFER_LIST based on the + /// Initial offset is at the IP Header, so just create a new NET_BUFFER_LIST based on the /// original NET_BUFFER_LIST ... pNetBufferList = KrnlHlprNBLCreateNew(g_pNDISPoolData->nblPoolHandle, (NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -1800,10 +1800,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundNetwork(_In_ CLASSIFY_DATA** pp } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); @@ -1882,8 +1882,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundNetwork(_In_ CLASSIFY_DATA** pp /** @private_function="PerformAdvancedPacketInjectionAtForward" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's forward path using + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's forward path using FwpsInjectForwardAsync().

Notes: Applies to the following forwarding layers:
@@ -1991,7 +1991,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassify #endif /// (NTDDI_VERSION >= NTDDI_WIN7) - /// Initial offset is at the IP Header, so just create a new NET_BUFFER_LIST based on the + /// Initial offset is at the IP Header, so just create a new NET_BUFFER_LIST based on the /// original NET_BUFFER_LIST ... pNetBufferList = KrnlHlprNBLCreateNew(g_pNDISPoolData->nblPoolHandle, (NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -2011,10 +2011,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassify HLPR_BAIL; } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG checksumInfo.Value = (ULONG)(ULONG_PTR)NET_BUFFER_LIST_INFO((NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -2090,8 +2090,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassify pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); - /// If the Forwarded NBL is destined locally, inject using FwpsInjectNetworkReceiveAsync rather - /// than the traditional FwpsInjectForwardAsync otherwise STATUS_INVALID_PARAMETER will be + /// If the Forwarded NBL is destined locally, inject using FwpsInjectNetworkReceiveAsync rather + /// than the traditional FwpsInjectForwardAsync otherwise STATUS_INVALID_PARAMETER will be /// returned in the NBL.status and the injection fails. if(isWeakHostReceive) { @@ -2141,8 +2141,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassify CompleteAdvancedPacketInjection, pCompletionData); } - /// If the Forwarded NBL is sourced locally, but another interface, inject using - /// FwpsInjectNetworkSendAsync rather than the traditional FwpsInjectForwardAsync otherwise + /// If the Forwarded NBL is sourced locally, but another interface, inject using + /// FwpsInjectNetworkSendAsync rather than the traditional FwpsInjectForwardAsync otherwise /// STATUS_INVALID_PARAMETER will be returned in the NBL.status and the injection fails else if(isWeakHostSend) { @@ -2260,8 +2260,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassify /** @private_function="PerformAdvancedPacketInjectionAtInboundTransport" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's inbound path from + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's inbound path from the incoming Transport Layers using FwpsInjectTransportRecveiveAsync().

Notes: Applies to the following inbound layers:
@@ -2402,7 +2402,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** p if(pClassifyValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4) { ipHeaderSize = IPV4_HEADER_MIN_SIZE; - + if(protocol == IPPROTO_ICMP) transportHeaderSize = ICMP_HEADER_MIN_SIZE; else if(protocol == IPPROTO_TCP) @@ -2448,7 +2448,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** p (pClassifyValues->layerId == FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V4 || pClassifyValues->layerId == FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V6)) { - /// For asynchronous execution, the drop will cause the stack to continue processing on the + /// For asynchronous execution, the drop will cause the stack to continue processing on the /// NBL for auditing purposes. This processing retreats the NBL Offset to the Transport header. /// We need to take this into account because we only took a reference on the NBL. } @@ -2534,10 +2534,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** p } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG checksumInfo.Value = (ULONG)(ULONG_PTR)NET_BUFFER_LIST_INFO((NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -2562,7 +2562,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** p if(pRemoteAddressValue->type == FWP_BYTE_ARRAY16_TYPE) addressSize = IPV6_ADDRESS_SIZE; else - addressSize = IPV4_ADDRESS_SIZE; + addressSize = IPV4_ADDRESS_SIZE; HLPR_NEW_ARRAY(pSourceAddress, BYTE, @@ -2612,7 +2612,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** p RtlCopyMemory(pDestinationAddress, &ipv4Address, addressSize); - } + } } pProtocolValue = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, @@ -2836,8 +2836,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** p /** @private_function="PerformAdvancedPacketInjectionAtOutboundTransport" - - Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's outbound path from + + Purpose: Creates a new NET_BUFFER_LIST and injects it in to the stack's outbound path from the outgoing Transport Layers using FwpsInjectTransportSendAsync().

Notes: Applies to the following outbound layers:
@@ -2981,7 +2981,7 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** pCompletionData->pSendParams->controlData = (WSACMSGHDR*)pCompletionData->pInjectionData->pControlData; pCompletionData->pSendParams->controlDataLength = pCompletionData->pInjectionData->controlDataLength; - /// Initial offset is at Transport Header, so just create a new NET_BUFFER_LIST based on the + /// Initial offset is at Transport Header, so just create a new NET_BUFFER_LIST based on the /// original NET_BUFFER_LIST ... pNetBufferList = KrnlHlprNBLCreateNew(g_pNDISPoolData->nblPoolHandle, (NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -3002,10 +3002,10 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** } #if DBG - + AdvancedPacketInjectionCountersIncrement(injectionHandle, &g_apiOutstandingNewNBLs); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); @@ -3087,8 +3087,8 @@ NTSTATUS PerformAdvancedPacketInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** /** @private_function="AdvancedPacketInjectionDeferredProcedureCall" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at DISPATCH_LEVEL.

Notes:
@@ -3250,8 +3250,8 @@ VOID AdvancedPacketInjectionDeferredProcedureCall(_In_ KDPC* pDPC, /** @private_function="AdvancedPacketInjectionWorkItemRoutine" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at PASSIVE_LEVEL.

Notes:
@@ -3408,8 +3408,8 @@ VOID AdvancedPacketInjectionWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, /** @private_function="TriggerAdvancedPacketInjectionInline" - - Purpose: Makes a reference to all the classification data structures and invokes the + + Purpose: Makes a reference to all the classification data structures and invokes the appropriate private injection routine to perform the injection.

Notes:
@@ -3583,8 +3583,8 @@ NTSTATUS TriggerAdvancedPacketInjectionInline(_In_ const FWPS_INCOMING_VALUES* p /** @private_function="TriggerAdvancedPacketInjectionOutOfBand" - - Purpose: Creates a local copy of the classification data structures and queues a WorkItem + + Purpose: Creates a local copy of the classification data structures and queues a WorkItem to perform the injection at PASSIVE_LEVEL.

Notes:
@@ -3652,7 +3652,7 @@ NTSTATUS TriggerAdvancedPacketInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES status = KrnlHlprThreadedDPCQueue(AdvancedPacketInjectionDeferredProcedureCall, pClassifyData, pInjectionData, - 0); + 0); else status = KrnlHlprDPCQueue(AdvancedPacketInjectionDeferredProcedureCall, pClassifyData, @@ -3685,7 +3685,7 @@ NTSTATUS TriggerAdvancedPacketInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES /** @classify_function="ClassifyAdvancedPacketInjection" - + Purpose: Blocks the current NET_BUFFER_LIST and injects a new NBL back to the stack.

Notes: Applies to the following layers:
@@ -3896,7 +3896,7 @@ VOID NTAPI ClassifyAdvancedPacketInjection(_In_ const FWPS_INCOMING_VALUES* pCla &FWPM_CONDITION_IP_LOCAL_ADDRESS); FWP_VALUE* pRemoteAddress = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, &FWPM_CONDITION_IP_REMOTE_ADDRESS); - + if((pLocalAddress && ((pLocalAddress->type == FWP_UINT32 && RtlCompareMemory(&(pLocalAddress->uint32), @@ -3993,7 +3993,7 @@ VOID NTAPI ClassifyAdvancedPacketInjection(_In_ const FWPS_INCOMING_VALUES* pCla /** @classify_function="ClassifyAdvancedPacketInjection" - + Purpose: Blocks the current NET_BUFFER_LIST and injects a new NBL back to the stack.

Notes: Applies to the following layers:
@@ -4156,7 +4156,7 @@ VOID NTAPI ClassifyAdvancedPacketInjection(_In_ const FWPS_INCOMING_VALUES* pCla &FWPM_CONDITION_IP_LOCAL_ADDRESS); FWP_VALUE* pRemoteAddress = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, &FWPM_CONDITION_IP_REMOTE_ADDRESS); - + if((pLocalAddress && (pLocalAddress->type == FWP_UINT32 && RtlCompareMemory(&(pLocalAddress->uint32), diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp index 69773e8a7..e879ea2b1 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp @@ -6,13 +6,13 @@ // ClassifyFunctions_BasicActionCallouts.cpp // // Abstract: -// This module contains WFP Classify functions for returning the simple actions +// This module contains WFP Classify functions for returning the simple actions // FWP_ACTION_BLOCK and FWP_ACTION_PERMIT. // // Naming Convention: // // -// +// // i.e. // // ClassifyBasicActionBlock @@ -24,7 +24,7 @@ // // { // Block - Function returns FWP_ACTION_BLOCK, thus blocking the traffic. -// Continue - Function returns FWP_ACTION_CONTINUE thus allowing the traffic for another +// Continue - Function returns FWP_ACTION_CONTINUE thus allowing the traffic for another // filter (if any) to make a final decision. // Permit - Function returns FWP_ACTION_PERMIT, thus allowing the traffic. // Random - Function randomly returns either FWP_ACTION_BLOCK or FWP_ACTION_PERMIT. @@ -56,7 +56,7 @@ /** @private_function="PerformBasicAction" - + Purpose: Sets the pClassifyOut->actionType to the basic action specified.

Notes:
@@ -131,7 +131,7 @@ VOID PerformBasicAction(_In_ const FWPS_INCOMING_VALUES* pClassifyValues, /** @classify_function="ClassifyBasicActionBlock" - + Purpose: Sets the pClassifyOut->actionType to FWP_ACTION_BLOCK.

Notes:
@@ -188,7 +188,7 @@ VOID NTAPI ClassifyBasicActionBlock(_In_ const FWPS_INCOMING_VALUES* pClassifyVa /** @classify_function="ClassifyBasicActionContinue" - + Purpose: Sets the pClassifyOut->actionType to FWP_ACTION_CONTINUE.

Notes:
@@ -245,7 +245,7 @@ VOID NTAPI ClassifyBasicActionContinue(_In_ const FWPS_INCOMING_VALUES* pClassif /** @classify_function="ClassifyBasicActionPermit" - + Purpose: Sets the pClassifyOut->actionType to FWP_ACTION_PERMIT.

Notes:
@@ -302,14 +302,14 @@ VOID NTAPI ClassifyBasicActionPermit(_In_ const FWPS_INCOMING_VALUES* pClassifyV /** @classify_function="ClassifyBasicActionRandom" - + Purpose: Sets the pClassifyOut->actionType to either FWP_ACTION_BLOCK or FWP_ACTION_PERMIT.

- Notes: Specifying -rab at the command line will allow one to determine how randomly + Notes: Specifying -rab at the command line will allow one to determine how randomly FWP_ACTION_BLOCK is returned.
- Specifying -rac at the command line will allow one to determine how randomly + Specifying -rac at the command line will allow one to determine how randomly FWP_ACTION_CONTINUE is returned.
- Specifying -rap at the command line will allow one to determine how randomly + Specifying -rap at the command line will allow one to determine how randomly FWP_ACTION_PERMIT is returned.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Hardware/FF551229.aspx
@@ -396,7 +396,7 @@ VOID NTAPI ClassifyBasicActionRandom(_In_ const FWPS_INCOMING_VALUES* pClassifyV /** @classify_function="ClassifyBasicActionBlock" - + Purpose: Sets the pClassifyOut->actionType to FWP_ACTION_BLOCK.

Notes:
@@ -452,7 +452,7 @@ VOID NTAPI ClassifyBasicActionBlock(_In_ const FWPS_INCOMING_VALUES* pClassifyVa /** @classify_function="ClassifyBasicActionContinue" - + Purpose: Sets the pClassifyOut->actionType to FWP_ACTION_CONTINUE.

Notes:
@@ -508,7 +508,7 @@ VOID NTAPI ClassifyBasicActionContinue(_In_ const FWPS_INCOMING_VALUES* pClassif /** @classify_function="ClassifyBasicActionPermit" - + Purpose: Sets the pClassifyOut->actionType to FWP_ACTION_PERMIT.

Notes:
@@ -568,14 +568,14 @@ VOID NTAPI ClassifyBasicActionPermit(_In_ const FWPS_INCOMING_VALUES* pClassifyV /** @classify_function="ClassifyBasicActionRandom" - + Purpose: Sets the pClassifyOut->actionType to either FWP_ACTION_BLOCK or FWP_ACTION_PERMIT.

- Notes: Specifying -rab at the command line will allow one to determine how randomly + Notes: Specifying -rab at the command line will allow one to determine how randomly FWP_ACTION_BLOCK is returned.
- Specifying -rac at the command line will allow one to determine how randomly + Specifying -rac at the command line will allow one to determine how randomly FWP_ACTION_CONTINUE is returned.
- Specifying -rap at the command line will allow one to determine how randomly + Specifying -rap at the command line will allow one to determine how randomly FWP_ACTION_PERMIT is returned.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Hardware/FF551229.aspx
diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.h index 19bf60779..c639758d9 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.h @@ -6,7 +6,7 @@ // ClassifyFunctions_BasicActionCallouts.h // // Abstract: -// This module contains prototypes of WFP Classify functions for returning the simple actions +// This module contains prototypes of WFP Classify functions for returning the simple actions // FWP_ACTION_BLOCK, FWP_ACTION_CONTINUE, and FWP_ACTION_PERMIT. // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp index cef0b6df5..2235bfca5 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // ClassifyBasicPacketExamination @@ -33,8 +33,8 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance -// traces, add support for discard layers, and support +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// traces, add support for discard layers, and support // tracing all of the classifyFn parameters. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -46,7 +46,7 @@ /** @private_function="LogFlags" - + Purpose: Logs each of the flags from the FWPM_CONDITION_FLAGS value.

Notes: Uses ETW Tracing for the logging.
@@ -190,7 +190,7 @@ VOID LogFlags(_In_ UINT32 flags) /** @private_function="LogL2Flags" - + Purpose: Logs each of the flags from the FWPM_CONDITION_FLAGS value.

Notes: Uses ETW Tracing for the logging.
@@ -246,7 +246,7 @@ VOID LogL2Flags(_In_ UINT32 flags) /** @private_function="LogValue" - + Purpose: Logs each of the FWPS_INCOMING_VALUE from the FWPS_INCOMING_VALUES in classifyFn.

Notes: Uses ETW Tracing for the logging.
@@ -574,7 +574,7 @@ VOID LogValue(_In_ const FWP_VALUE* pValue, /** @private_function="LogValues" - + Purpose: Logs each of the FWPS_INCOMING_VALUE from the FWPS_INCOMING_VALUES in classifyFn.

Notes: Uses ETW Tracing for the logging.
@@ -615,7 +615,7 @@ VOID LogValues(_In_reads_(numValues) const FWPS_INCOMING_VALUE* pValues, /** @private_function="LogClassifyValues" - + Purpose: Logs the FWPS_INCOMING_VALUES from the classifyFn.

Notes: Uses ETW Tracing for the logging.
@@ -665,7 +665,7 @@ VOID LogClassifyValues(_In_ const FWPS_INCOMING_VALUES* pClassifyValues) /** @private_function="LogMetadata" - + Purpose: Logs the FWPS_INCOMING_METADATA_VALUES from the classifyFn.

Notes: Uses ETW Tracing for the logging.
@@ -1125,7 +1125,7 @@ VOID LogMetadata(_In_ const FWPS_INCOMING_METADATA_VALUES* pMetadata) /** @private_function="LogFilter" - + Purpose: Logs the FWPS_FILTER from the classifyFn.

Notes: Uses ETW Tracing for the logging.
@@ -1208,7 +1208,7 @@ VOID LogFilter(_In_ const FWPS_FILTER* pFilter) /** @private_function="LogClassifyOut" - + Purpose: Logs the FWPS_CLASSIFY_OUT from the classifyFn.

Notes: Uses ETW Tracing for the logging.
@@ -1299,7 +1299,7 @@ VOID LogClassifyOut(_In_ const FWPS_CLASSIFY_OUT* pClassifyOut) /** @private_function="LogEthernetIIHeader" - + Purpose: Logs the Ethernet II Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -1307,7 +1307,7 @@ VOID LogClassifyOut(_In_ const FWPS_CLASSIFY_OUT* pClassifyOut) MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/FF562859.aspx
*/ VOID LogEthernetIIHeader(_In_ ETHERNET_II_HEADER* pEthernetIIHeader, - _In_ UINT32 vlanID = 0) + _In_ UINT32 vlanID = 0) { #if DBG @@ -1428,7 +1428,7 @@ VOID LogEthernetIIHeader(_In_ ETHERNET_II_HEADER* pEthernetIIHeader, /** @private_function="LogEthernetSNAPHeader" - + Purpose: Logs the MAC Ethernet SNAP Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -1535,7 +1535,7 @@ VOID LogEthernetSNAPHeader(_In_ ETHERNET_SNAP_HEADER* pEthernetSNAPHeader) /** @private_function="LogIPv4Header" - + Purpose: Logs the IPv4 Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -1629,7 +1629,7 @@ VOID LogIPv4Header(_In_ IP_HEADER_V4* pIPv4Header) /** @private_function="LogIPv6Header" - + Purpose: Logs the IPv6 Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -1758,7 +1758,7 @@ VOID LogIPv6Header(_In_ IP_HEADER_V6* pIPv6Header) /** @private_function="LogIPHeader" - + Purpose: Proxy IP Header logging to appropriate logging function base on IP version.

Notes:
@@ -1780,7 +1780,7 @@ VOID LogIPHeader(_In_ VOID* pIPHeader, /** @private_function="LogICMPv4Header" - + Purpose: Logs the ICMPv4 Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -1853,7 +1853,7 @@ VOID LogICMPv4Header(_In_ ICMP_HEADER_V4* pICMPv4Header) /** @private_function="LogICMPv6Header" - + Purpose: Logs the ICMPv6 Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -1926,7 +1926,7 @@ VOID LogICMPv6Header(_In_ ICMP_HEADER_V6* pICMPv6Header) /** @private_function="LogTCPHeader" - + Purpose: Logs the TCP Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -2026,7 +2026,7 @@ VOID LogTCPHeader(_In_ TCP_HEADER* pTCPHeader) /** @private_function="LogUDPHeader" - + Purpose: Logs the UDP Header into a more easily readable format.

Notes: Uses ETW Tracing for the logging, which is not ideal in a real world scenario.
@@ -2101,7 +2101,7 @@ VOID LogUDPHeader(_In_ UDP_HEADER* pUDPHeader) /** @private_function="LogTransportHeader" - + Purpose: Proxy Transport Header logging to appropriate logging function base on IP protocol.

Notes:
@@ -2148,8 +2148,8 @@ VOID LogTransportHeader(_In_ VOID* pTransportHeader, /** @private_function="PerformBasicPacketExaminationAtInboundMACFrame" - - Purpose: Examines and logs the contents of the MAC Header and Ip and Transport Headers if + + Purpose: Examines and logs the contents of the MAC Header and Ip and Transport Headers if available.

Notes: Applies to the following framing layers:
@@ -2314,7 +2314,7 @@ VOID PerformBasicPacketExaminationAtInboundMACFrame(_In_ CLASSIFY_DATA* pClassif { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2371,7 +2371,7 @@ VOID PerformBasicPacketExaminationAtInboundMACFrame(_In_ CLASSIFY_DATA* pClassif { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2401,7 +2401,7 @@ VOID PerformBasicPacketExaminationAtInboundMACFrame(_In_ CLASSIFY_DATA* pClassif { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2441,8 +2441,8 @@ VOID PerformBasicPacketExaminationAtInboundMACFrame(_In_ CLASSIFY_DATA* pClassif /** @private_function="PerformBasicPacketExaminationAtOutboundMACFrame" - - Purpose: Examines and logs the contents of the MAC Header and Ip and Transport Headers if + + Purpose: Examines and logs the contents of the MAC Header and Ip and Transport Headers if available.

Notes: Applies to the following framing layers:
@@ -2584,7 +2584,7 @@ VOID PerformBasicPacketExaminationAtOutboundMACFrame(_In_ CLASSIFY_DATA* pClassi { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2628,7 +2628,7 @@ VOID PerformBasicPacketExaminationAtOutboundMACFrame(_In_ CLASSIFY_DATA* pClassi { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2658,7 +2658,7 @@ VOID PerformBasicPacketExaminationAtOutboundMACFrame(_In_ CLASSIFY_DATA* pClassi { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2689,7 +2689,7 @@ VOID PerformBasicPacketExaminationAtOutboundMACFrame(_In_ CLASSIFY_DATA* pClassi /** @private_function="PerformBasicPacketExaminationAtVSwitchTransport" - + Purpose: Examines and logs the contents of the IP Header and Transport Headers if available.

Notes: Applies to the following vSwitch layers:
@@ -2784,7 +2784,7 @@ VOID PerformBasicPacketExaminationAtVSwitchEthernet(_In_ CLASSIFY_DATA* pClassif { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2828,7 +2828,7 @@ VOID PerformBasicPacketExaminationAtVSwitchEthernet(_In_ CLASSIFY_DATA* pClassif { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2857,7 +2857,7 @@ VOID PerformBasicPacketExaminationAtVSwitchEthernet(_In_ CLASSIFY_DATA* pClassif { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -2888,7 +2888,7 @@ VOID PerformBasicPacketExaminationAtVSwitchEthernet(_In_ CLASSIFY_DATA* pClassif /** @private_function="PerformBasicPacketExaminationAtVSwitchTransport" - + Purpose: Examines and logs the contents of the IP Header and Transport Headers if available.

Notes: Applies to the following vSwitch layers:
@@ -2997,7 +2997,7 @@ VOID PerformBasicPacketExaminationAtVSwitchTransport(_In_ CLASSIFY_DATA* pClassi { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -3068,7 +3068,7 @@ VOID PerformBasicPacketExaminationAtVSwitchTransport(_In_ CLASSIFY_DATA* pClassi { HLPR_DELETE_ARRAY(pHeader, WFPSAMPLER_SYSLIB_TAG); - + needToFreeMemory = FALSE; } @@ -3101,7 +3101,7 @@ VOID PerformBasicPacketExaminationAtVSwitchTransport(_In_ CLASSIFY_DATA* pClassi /** @private_function="PerformBasicPacketExaminationAtInboundNetwork" - + Purpose: Examines and logs the contents of the IP Header and Transport Header if available.

Notes: Applies to the following network layers:
@@ -3262,7 +3262,7 @@ VOID PerformBasicPacketExaminationAtInboundNetwork(_In_ CLASSIFY_DATA* pClassify /** @private_function="PerformBasicPacketExaminationAtOutboundNetwork" - + Purpose: Examines and logs the contents of the IP Header and Transport Header if available.

Notes: Applies to the following network layers:
@@ -3407,7 +3407,7 @@ VOID PerformBasicPacketExaminationAtOutboundNetwork(_In_ CLASSIFY_DATA* pClassif /** @private_function="PerformBasicPacketExaminationAtForward" - + Purpose: Examines and logs the contents of the IP Header and Transport Header if available.

Notes: Applies to the following forwarding layers:
@@ -3550,7 +3550,7 @@ VOID PerformBasicPacketExaminationAtForward(_In_ CLASSIFY_DATA* pClassifyData) /** @private_function="PerformBasicPacketExaminationAtInboundTransport" - + Purpose: Examines and logs the contents of the IP Header and Transport Header if available.

Notes: Applies to the following transport layers:
@@ -3636,7 +3636,7 @@ VOID PerformBasicPacketExaminationAtInboundTransport(_In_ CLASSIFY_DATA* pClassi if(pClassifyValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4) { ipHeaderSize = IPV4_HEADER_MIN_SIZE; - + if(protocol == ICMPV4) transportHeaderSize = ICMP_HEADER_MIN_SIZE; else if(protocol == TCP) @@ -3859,7 +3859,7 @@ VOID PerformBasicPacketExaminationAtInboundTransport(_In_ CLASSIFY_DATA* pClassi /** @private_function="PerformBasicPacketExaminationAtOutboundTransport" - + Purpose: Examines and logs the contents of the IP Header and Transport Header if available.

Notes: Applies to the following transport layers:
@@ -4005,7 +4005,7 @@ VOID PerformBasicPacketExaminationAtOutboundTransport(_In_ CLASSIFY_DATA* pClass /** @private_function="PerformBasicPacketExaminationAtOutboundTransport" - + Purpose: Logs the Discard reason.

Notes: Applies to the following discard layers:
@@ -4070,139 +4070,139 @@ VOID PerformBasicPacketExaminationAtDiscard(_In_ CLASSIFY_DATA* pClassifyData) case IpDiscardBadSourceAddress: { pDiscardReason = "Bad Source Address"; - + break; } case IpDiscardNotLocallyDestined: { pDiscardReason = "Not Locally Destined"; - + break; } case IpDiscardProtocolUnreachable: { pDiscardReason = "Unreachable Protocol"; - + break; } case IpDiscardPortUnreachable: { pDiscardReason = "UnreachablePort"; - + break; } case IpDiscardBadLength: { pDiscardReason = "Bad Length"; - + break; } case IpDiscardMalformedHeader: { pDiscardReason = "Malformed Header"; - + break; } case IpDiscardNoRoute: { pDiscardReason = "No Route"; - + break; } case IpDiscardBeyondScope: { pDiscardReason = "Beyond Scope"; - + break; } case IpDiscardInspectionDrop: { pDiscardReason = "Inspection Drop"; - + break; } case IpDiscardTooManyDecapsulations: { pDiscardReason = "Too Many Decapsulations"; - + break; } case IpDiscardAdministrativelyProhibited: { pDiscardReason = "Administratively Prohibited"; - + break; } case IpDiscardHopLimitExceeded: { pDiscardReason = "Hop Limit Exceeded"; - + break; } case IpDiscardAddressUnreachable: { pDiscardReason = "Unreachable Address"; - + break; } case IpDiscardRscPacket: { pDiscardReason = "RSC Packet"; - + break; } case IpDiscardArbitrationUnhandled: { pDiscardReason = "Unhandled Arbitration"; - + break; } case IpDiscardInspectionAbsorb: { pDiscardReason = "Inspection Absorb"; - + break; } case IpDiscardDontFragmentMtuExceeded: { pDiscardReason = "Don't Fragment / MTU Exceeded"; - + break; } case IpDiscardBufferLengthExceeded: { pDiscardReason = "Buffer Length Exceeded"; - + break; } case IpDiscardAddressResolutionTimeout: { pDiscardReason = "Address Resolution Timeout"; - + break; } case IpDiscardAddressResolutionFailure: { pDiscardReason = "Address Resolution Failure"; - + break; } case IpDiscardIpsecFailure: { pDiscardReason = "IPsec Failure"; - + break; } case IpDiscardExtensionHeadersFailure: { pDiscardReason = "Extension Headers Failure"; - + break; } case IpDiscardIpsnpiClientDrop: { pDiscardReason = "IPSNPI Drop"; - + break; } } @@ -4218,49 +4218,49 @@ VOID PerformBasicPacketExaminationAtDiscard(_In_ CLASSIFY_DATA* pClassifyData) case InetDiscardSourceUnspecified: { pDiscardReason = "Unspecified Source"; - + break; } case InetDiscardDestinationMulticast: { pDiscardReason = "Multicast Destination"; - + break; } case InetDiscardHeaderInvalid: { pDiscardReason = "Invalid Header"; - + break; } case InetDiscardChecksumInvalid: { pDiscardReason = "Invalid Checksum"; - + break; } case InetDiscardEndpointNotFound: { pDiscardReason = "Endpoint Not Found"; - + break; } case InetDiscardConnectedPath: { pDiscardReason = "Connected Path"; - + break; } case InetDiscardSessionState: { pDiscardReason = "Session State"; - + break; } case InetDiscardReceiveInspection: { pDiscardReason = "Receive Inspection"; - + break; } } @@ -4276,13 +4276,13 @@ VOID PerformBasicPacketExaminationAtDiscard(_In_ CLASSIFY_DATA* pClassifyData) case FWPS_DISCARD_FIREWALL_POLICY: { pDiscardReason = "Firewall Policy"; - + break; } case FWPS_DISCARD_IPSEC: { pDiscardReason = "IPsec Policy"; - + break; } } @@ -4333,7 +4333,7 @@ VOID PerformBasicPacketExaminationAtDiscard(_In_ CLASSIFY_DATA* pClassifyData) /** @private_function="PerformBasicPacketExaminationAtOther" - + Purpose: Logs the classify.

Notes: Applies to the following discard layers:
@@ -4974,7 +4974,7 @@ VOID PerformBasicPacketExaminationAtOther(_In_ CLASSIFY_DATA* pClassifyData) /** @classify_function="ClassifyBasicPacketExamination" - + Purpose: Examines the packet and returns FWP_ACTION_CONTINUE.

Notes: Applies to the following layers:
@@ -5377,7 +5377,7 @@ VOID NTAPI ClassifyBasicPacketExamination(_In_ const FWPS_INCOMING_VALUES0* pCla /** @classify_function="ClassifyBasicPacketExamination" - + Purpose: Examines the packet and returns FWP_ACTION_CONTINUE.

Notes: Applies to the following layers:
@@ -5610,7 +5610,7 @@ VOID NTAPI ClassifyBasicPacketExamination(_In_ const FWPS_INCOMING_VALUES* pClas if(pFilter->context & PCPEF_EXAMINE_UNDER_LOCK) KeReleaseSpinLock(&g_bpeSpinLock, originalIRQL); - + HLPR_BAIL_LABEL: if(status != STATUS_SUCCESS) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.h index 32ce00cfe..34e5b9fa1 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.h @@ -6,7 +6,7 @@ // ClassifyFunctions_BasicPacketExaminationCallouts.h // // Abstract: -// This module contains prototypes of WFP Classify functions for examining indicated +// This module contains prototypes of WFP Classify functions for examining indicated // NET_BUFFER_LISTS. // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp index 641cb8beb..4b46afc60 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp @@ -6,13 +6,13 @@ // ClassifyFunctions_BasicPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Classify functions for injecting packets back into the data path +// This module contains WFP Classify functions for injecting packets back into the data path // using the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // ClassifyBasicPacketInjection // @@ -35,15 +35,15 @@ // // BasicPacketInjection - Function demonstrates the clone / block / inject model. // -// DeferredProcedureCall - DPC routine for Out of Band injection which dispatches the +// DeferredProcedureCall - DPC routine for Out of Band injection which dispatches the // proper Perform Function. // WorkItemRoutine - WorkItem Routine for Out of Band Injection which dispatches // the proper Perform Function. // AtInboundMACFrame - Function operates on: -// FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET, and +// FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET, and // FWPM_LAYER_INBOUND_MAC_NATIVE. // AtOutboundMACFrame - Function operates on: -// FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET, and +// FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET, and // FWPM_LAYER_OUTBOUND_MAC_NATIVE. // AtEgressVSwitchEthernet - Function operates on: // FWPM_LAYER_EGRESS_VSWITCH_ETHERNET. @@ -55,18 +55,18 @@ // FWPM_LAYER_OUTBOUND_IPPACKET_V{4/6} // AtForward - Function operates on: // FWPM_LAYER_IPFORWARD_V{4/6} -// AtInboundTransport - Function operates on: +// AtInboundTransport - Function operates on: // FWPM_LAYER_INBOUND_TRANSPORT_V{4/6}, // FWPM_LAYER_INBOUND_ICMP_ERROR_V{4/6}, // FWPM_LAYER_DATAGRAM_DATA_V{4/6}, -// FWPM_LAYER_STREAM_PACKET_V{4/6}, and +// FWPM_LAYER_STREAM_PACKET_V{4/6}, and // FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V{4/6} // FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4/6} // AtOutboundTransport - Function operates on: // FWPM_LAYER_OUTBOUND_TRANSPORT_V{4/6}, // FWPM_LAYER_OUTBOUND_ICMP_ERROR_V{4/6}, // FWPM_LAYER_DATAGRAM_DATA_V{4/6}, -// FWPM_LAYER_STREAM_PACKET_V{4/6}, and +// FWPM_LAYER_STREAM_PACKET_V{4/6}, and // FWPM_LAYER_ALE_AUTH_CONNECT_V{4/6} // FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4/6} // @@ -95,9 +95,9 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance -// traces, fix weakhost injection, fix expected -// offsets, and add support for multiple injectors and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// traces, fix weakhost injection, fix expected +// offsets, and add support for multiple injectors and // controlData. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -116,7 +116,7 @@ INJECTION_COUNTERS g_bpiOutstandingNBLClones = {0}; /** @function="PrvBasicPacketInjectionCountersIncrement" - + Purpose: Increment the appropriate counters based on the layerId and direction.

Notes:
@@ -398,7 +398,7 @@ VOID PrvBasicPacketInjectionCountersIncrement(_In_ const FWPS_INCOMING_VALUES* p /** @private_function="PrvBasicPacketInjectionCountersIncrementTotalActionResults" - + Purpose: Increment the appropriate counters based on the layerId, direction, and action.

Notes:
@@ -429,7 +429,7 @@ VOID PrvBasicPacketInjectionCountersIncrementTotalActionResults(_In_ const FWPS_ /** @function="BasicPacketInjectionCountersIncrement" - + Purpose: Increment the appropriate counters based on the injection handle.

Notes:
@@ -526,8 +526,8 @@ VOID BasicPacketInjectionCountersIncrement(_In_ HANDLE injectionHandle, /** @private_function="PerformBasicPacketInjectionAtInboundMACFrame" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the incoming MAC Layers using FwpsInjectMacReceiveAsync().

Notes: Applies to the following inbound layers:
@@ -747,8 +747,8 @@ NTSTATUS PerformBasicPacketInjectionAtInboundMACFrame(_In_ CLASSIFY_DATA** ppCla /** @private_function="PerformBasicPacketInjectionAtOutboundMACFrame" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the outgoing MAC Layers using FwpsInjectMacSendAsync().

Notes: Applies to the following outbound layers:
@@ -846,10 +846,10 @@ NTSTATUS PerformBasicPacketInjectionAtOutboundMACFrame(_In_ CLASSIFY_DATA** ppCl } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList, @@ -933,9 +933,9 @@ NTSTATUS PerformBasicPacketInjectionAtOutboundMACFrame(_In_ CLASSIFY_DATA** ppCl /** @private_function="PerformBasicPacketInjectionAtIngressVSwitchEthernet" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's - ingress path from the ingress VSwitch Layers using + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's + ingress path from the ingress VSwitch Layers using FwpsInjectvSwitchEthernetIngressAsync0().

Notes: Applies to the following ingress layers:
@@ -1047,10 +1047,10 @@ NTSTATUS PerformBasicPacketInjectionAtIngressVSwitchEthernet(_In_ CLASSIFY_DATA* } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList, @@ -1134,9 +1134,9 @@ NTSTATUS PerformBasicPacketInjectionAtIngressVSwitchEthernet(_In_ CLASSIFY_DATA* /** @private_function="PerformBasicPacketInjectionAtEgressVSwitchEthernet" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's - ingress path from the egress VSwitch Layers using + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's + ingress path from the egress VSwitch Layers using FwpsInjectvSwitchEthernetIngressAsync0().

Notes: Applies to the following egress layers:
@@ -1248,10 +1248,10 @@ NTSTATUS PerformBasicPacketInjectionAtEgressVSwitchEthernet(_In_ CLASSIFY_DATA** } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList, @@ -1337,8 +1337,8 @@ NTSTATUS PerformBasicPacketInjectionAtEgressVSwitchEthernet(_In_ CLASSIFY_DATA** /** @private_function="PerformBasicPacketInjectionAtInboundNetwork" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's inbound path + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's inbound path from the incoming Network Layers using FwpsInjectNetworkReceiveAsync().

Notes: Applies to the following inbound layers:
@@ -1550,10 +1550,10 @@ NTSTATUS PerformBasicPacketInjectionAtInboundNetwork(_In_ CLASSIFY_DATA** ppClas } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); @@ -1691,8 +1691,8 @@ NTSTATUS PerformBasicPacketInjectionAtInboundNetwork(_In_ CLASSIFY_DATA** ppClas /** @private_function="PerformBasicPacketInjectionAtOutboundNetwork" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's outbound path + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's outbound path from the outgoing Network Layers using FwpsInjectNetworkSendAsync().

Notes: Applies to the following outbound layers:
@@ -1778,10 +1778,10 @@ NTSTATUS PerformBasicPacketInjectionAtOutboundNetwork(_In_ CLASSIFY_DATA** ppCla } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); @@ -1861,8 +1861,8 @@ NTSTATUS PerformBasicPacketInjectionAtOutboundNetwork(_In_ CLASSIFY_DATA** ppCla /** @private_function="PerformBasicPacketInjectionAtForward" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's forward path + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's forward path using FwpsInjectForwardAsync().

Notes: Applies to the following forwarding layers:
@@ -1986,10 +1986,10 @@ NTSTATUS PerformBasicPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassifyDat } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG checksumInfo.Value = (ULONG)(ULONG_PTR)NET_BUFFER_LIST_INFO((NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -2065,8 +2065,8 @@ NTSTATUS PerformBasicPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassifyDat pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); - /// If the Forwarded NBL is destined locally, inject using FwpsInjectNetworkReceiveAsync rather - /// than the traditional FwpsInjectForwardAsync otherwise STATUS_INVALID_PARAMETER will be + /// If the Forwarded NBL is destined locally, inject using FwpsInjectNetworkReceiveAsync rather + /// than the traditional FwpsInjectForwardAsync otherwise STATUS_INVALID_PARAMETER will be /// returned in the NBL.status and the injection fails. if(isWeakHostReceive) { @@ -2116,8 +2116,8 @@ NTSTATUS PerformBasicPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassifyDat CompleteBasicPacketInjection, pCompletionData); } - /// If the Forwarded NBL is sourced locally, but another interface, inject using - /// FwpsInjectNetworkSendAsync rather than the traditional FwpsInjectForwardAsync otherwise + /// If the Forwarded NBL is sourced locally, but another interface, inject using + /// FwpsInjectNetworkSendAsync rather than the traditional FwpsInjectForwardAsync otherwise /// STATUS_INVALID_PARAMETER will be returned in the NBL.status and the injection fails else if(isWeakHostSend) { @@ -2236,8 +2236,8 @@ NTSTATUS PerformBasicPacketInjectionAtForward(_In_ CLASSIFY_DATA** ppClassifyDat /** @private_function="PerformBasicPacketInjectionAtInboundTransport" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's inbound path + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's inbound path from the incoming Transport Layers using FwpsInjectTransportRecveiveAsync().

Notes: Applies to the following inbound layers:
@@ -2376,7 +2376,7 @@ NTSTATUS PerformBasicPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** ppCl if(pClassifyValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4) { ipHeaderSize = IPV4_HEADER_MIN_SIZE; - + if(protocol == IPPROTO_ICMP) transportHeaderSize = ICMP_HEADER_MIN_SIZE; else if(protocol == IPPROTO_TCP) @@ -2422,7 +2422,7 @@ NTSTATUS PerformBasicPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** ppCl (pClassifyValues->layerId == FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V4 || pClassifyValues->layerId == FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V6)) { - /// For asynchronous execution, the drop will cause the stack to continue processing on the + /// For asynchronous execution, the drop will cause the stack to continue processing on the /// NBL for auditing purposes. This processing retreats the NBL Offset to the Transport header. /// We need to take this into account because we only took a reference on the NBL. } @@ -2506,10 +2506,10 @@ NTSTATUS PerformBasicPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** ppCl } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG checksumInfo.Value = (ULONG)(ULONG_PTR)NET_BUFFER_LIST_INFO((NET_BUFFER_LIST*)pCompletionData->pClassifyData->pPacket, @@ -2534,7 +2534,7 @@ NTSTATUS PerformBasicPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** ppCl if(pRemoteAddressValue->type == FWP_BYTE_ARRAY16_TYPE) addressSize = IPV6_ADDRESS_SIZE; else - addressSize = IPV4_ADDRESS_SIZE; + addressSize = IPV4_ADDRESS_SIZE; HLPR_NEW_ARRAY(pSourceAddress, BYTE, @@ -2584,7 +2584,7 @@ NTSTATUS PerformBasicPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** ppCl RtlCopyMemory(pDestinationAddress, &ipv4Address, addressSize); - } + } } pProtocolValue = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, @@ -2809,8 +2809,8 @@ NTSTATUS PerformBasicPacketInjectionAtInboundTransport(_In_ CLASSIFY_DATA** ppCl /** @private_function="PerformBasicPacketInjectionAtOutboundTransport" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's outbound path + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack's outbound path from the outgoing Transport Layers using FwpsInjectTransportSendAsync().

Notes: Applies to the following outbound layers:
@@ -2969,10 +2969,10 @@ NTSTATUS PerformBasicPacketInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppC } #if DBG - + BasicPacketInjectionCountersIncrement(injectionHandle, &g_bpiOutstandingNBLClones); - + #endif /// DBG pCompletionData->refCount = KrnlHlprNBLGetRequiredRefCount(pNetBufferList); @@ -3055,8 +3055,8 @@ NTSTATUS PerformBasicPacketInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppC /** @private_function="BasicPacketInjectionDeferredProcedureCall" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at DISPATCH_LEVEL.

Notes:
@@ -3218,8 +3218,8 @@ VOID BasicPacketInjectionDeferredProcedureCall(_In_ KDPC* pDPC, /** @private_function="BasicPacketInjectionWorkItemRoutine" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at PASSIVE_LEVEL.

Notes:
@@ -3376,8 +3376,8 @@ VOID BasicPacketInjectionWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, /** @private_function="TriggerBasicPacketInjectionInline" - - Purpose: Makes a reference to all the classification data structures and invokes the + + Purpose: Makes a reference to all the classification data structures and invokes the appropriate private injection routine to perform the injection.

Notes:
@@ -3551,8 +3551,8 @@ NTSTATUS TriggerBasicPacketInjectionInline(_In_ const FWPS_INCOMING_VALUES* pCla /** @private_function="TriggerBasicPacketInjectionOutOfBand" - - Purpose: Creates a local copy of the classification data structures and queues a WorkItem + + Purpose: Creates a local copy of the classification data structures and queues a WorkItem to perform the injection at PASSIVE_LEVEL.

Notes:
@@ -3620,7 +3620,7 @@ NTSTATUS TriggerBasicPacketInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES* p status = KrnlHlprThreadedDPCQueue(BasicPacketInjectionDeferredProcedureCall, pClassifyData, pInjectionData, - 0); + 0); else status = KrnlHlprDPCQueue(BasicPacketInjectionDeferredProcedureCall, pClassifyData, @@ -3653,8 +3653,8 @@ NTSTATUS TriggerBasicPacketInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES* p /** @classify_function="ClassifyBasicPacketInjection" - - Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without + + Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without modification.

Notes: Applies to the following layers:
@@ -3868,7 +3868,7 @@ VOID NTAPI ClassifyBasicPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassi &FWPM_CONDITION_IP_LOCAL_ADDRESS); FWP_VALUE* pRemoteAddress = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, &FWPM_CONDITION_IP_REMOTE_ADDRESS); - + if((pLocalAddress && ((pLocalAddress->type == FWP_UINT32 && RtlCompareMemory(&(pLocalAddress->uint32), @@ -3973,8 +3973,8 @@ VOID NTAPI ClassifyBasicPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassi /** @classify_function="ClassifyBasicPacketInjection" - - Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without + + Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without modification.

Notes: Applies to the following layers:
@@ -4137,7 +4137,7 @@ VOID NTAPI ClassifyBasicPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassi &FWPM_CONDITION_IP_LOCAL_ADDRESS); FWP_VALUE* pRemoteAddress = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, &FWPM_CONDITION_IP_REMOTE_ADDRESS); - + if((pLocalAddress && (pLocalAddress->type == FWP_UINT32 && RtlCompareMemory(&(pLocalAddress->uint32), diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp index 1a31999f2..1c7750573 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp @@ -6,20 +6,20 @@ // ClassifyFunctions_BasicPacketModificationCallouts.cpp // // Abstract: -// This module contains WFP Classify functions for modifying and injecting packets back into +// This module contains WFP Classify functions for modifying and injecting packets back into // the data path using the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // ClassifyBasicPacketModification // // // Classify - Function is an FWPS_CALLOUT_CLASSIFY_FN // -// BasicPacketModification - Function demonstrates the clone / block / modify / inject +// BasicPacketModification - Function demonstrates the clone / block / modify / inject // model. // // @@ -34,18 +34,18 @@ // Perform - Executes the desired scenario. // } // -// BasicPacketModification - Function demonstrates the clone / block / modify / inject +// BasicPacketModification - Function demonstrates the clone / block / modify / inject // model. // -// DeferredProcedureCall - DPC routine for Out of Band injection which dispatches the +// DeferredProcedureCall - DPC routine for Out of Band injection which dispatches the // proper Perform Function. // WorkItemRoutine - WorkItem Routine for Out of Band Injection which dispatches // the proper Perform Function. // AtInboundMACFrame - Function operates on: -// FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET, and +// FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET, and // FWPM_LAYER_INBOUND_MAC_NATIVE. // AtOutboundMACFrame - Function operates on: -// FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET, and +// FWPM_LAYER_OUTBOUND_MAC_FRAME_ETHERNET, and // FWPM_LAYER_OUTBOUND_MAC_NATIVE. // AtEgressVSwitchEthernet - Function operates on: // FWPM_LAYER_EGRESS_VSWITCH_ETHERNET. @@ -57,18 +57,18 @@ // FWPM_LAYER_OUTBOUND_IPPACKET_V{4/6} // AtForward - Function operates on: // FWPM_LAYER_IPFORWARD_V{4/6} -// AtInboundTransport - Function operates on: +// AtInboundTransport - Function operates on: // FWPM_LAYER_INBOUND_TRANSPORT_V{4/6}, // FWPM_LAYER_INBOUND_ICMP_ERROR_V{4/6}, // FWPM_LAYER_DATAGRAM_DATA_V{4/6}, -// FWPM_LAYER_STREAM_PACKET_V{4/6}, and +// FWPM_LAYER_STREAM_PACKET_V{4/6}, and // FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V{4/6} // FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4/6} // AtOutboundTransport - Function operates on: // FWPM_LAYER_OUTBOUND_TRANSPORT_V{4/6}, // FWPM_LAYER_OUTBOUND_ICMP_ERROR_V{4/6}, // FWPM_LAYER_DATAGRAM_DATA_V{4/6}, -// FWPM_LAYER_STREAM_PACKET_V{4/6}, and +// FWPM_LAYER_STREAM_PACKET_V{4/6}, and // FWPM_LAYER_ALE_AUTH_CONNECT_V{4/6} // FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4/6} // @@ -97,10 +97,10 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance -// traces, fix weakhost injection, fix expected -// offsets,fix copy / paste issues with modifying dst -// port, and add support for multiple injectors and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// traces, fix weakhost injection, fix expected +// offsets,fix copy / paste issues with modifying dst +// port, and add support for multiple injectors and // controlData. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -112,9 +112,9 @@ /** @private_function="PerformBasicPacketModificationAtInboundMACFrame" - - Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context and - injects the clone back to the stack's inbound path from the incoming MAC Layers + + Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context and + injects the clone back to the stack's inbound path from the incoming MAC Layers using FwpsInjectMacReceiveAsync().

Notes: Applies to the following inbound layers:
@@ -285,145 +285,145 @@ NTSTATUS PerformBasicPacketModificationAtInboundMACFrame(_In_ CLASSIFY_DATA** pp case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -443,7 +443,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundMACFrame(_In_ CLASSIFY_DATA** pp DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtInboundMACFrame: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -569,7 +569,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundMACFrame(_In_ CLASSIFY_DATA** pp DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtInboundMACFrame: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -588,9 +588,9 @@ NTSTATUS PerformBasicPacketModificationAtInboundMACFrame(_In_ CLASSIFY_DATA** pp WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(value.byteArray6, status); - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pSourceMACAddress, ETHERNET_ADDRESS_SIZE); @@ -620,9 +620,9 @@ NTSTATUS PerformBasicPacketModificationAtInboundMACFrame(_In_ CLASSIFY_DATA** pp status); #pragma warning(pop) - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pDestinationMACAddress, ETHERNET_ADDRESS_SIZE); @@ -691,8 +691,8 @@ NTSTATUS PerformBasicPacketModificationAtInboundMACFrame(_In_ CLASSIFY_DATA** pp /** @private_function="PerformBasicPacketInjectionAtOutboundMACFrame" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the outgoing MAC Layers using FwpsInjectMacSendAsync().

Notes: Applies to the following inbound layers:
@@ -830,145 +830,145 @@ NTSTATUS PerformBasicPacketModificationAtOutboundMACFrame(_In_ CLASSIFY_DATA** p case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -988,7 +988,7 @@ NTSTATUS PerformBasicPacketModificationAtOutboundMACFrame(_In_ CLASSIFY_DATA** p DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtOutboundMacFrame: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -1114,7 +1114,7 @@ NTSTATUS PerformBasicPacketModificationAtOutboundMACFrame(_In_ CLASSIFY_DATA** p DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtOutboundMACFrame: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -1124,37 +1124,37 @@ NTSTATUS PerformBasicPacketModificationAtOutboundMACFrame(_In_ CLASSIFY_DATA** p if(pModificationData->macData.flags & PCPMDF_MODIFY_MAC_HEADER_SOURCE_ADDRESS) { FWP_VALUE value; - + RtlZeroMemory(&value, sizeof(FWP_VALUE)); - + HLPR_NEW(value.byteArray6, FWP_BYTE_ARRAY6, WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(value.byteArray6, status); - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pSourceMACAddress, ETHERNET_ADDRESS_SIZE); - + status = KrnlHlprMACHeaderModifySourceAddress(&value, pNetBufferList); - + KrnlHlprFwpValuePurgeLocalCopy(&value); - + HLPR_BAIL_ON_FAILURE(status); } - + if(pModificationData->macData.flags & PCPMDF_MODIFY_MAC_HEADER_DESTINATION_ADDRESS) { FWP_VALUE value; - + RtlZeroMemory(&value, sizeof(FWP_VALUE)); - + #pragma warning(push) #pragma warning(disable: 6014) /// value.byteArray6 will be freed in with call to KrnlHlprFwpValuePurgeLocalCopy @@ -1165,18 +1165,18 @@ NTSTATUS PerformBasicPacketModificationAtOutboundMACFrame(_In_ CLASSIFY_DATA** p status); #pragma warning(pop) - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pDestinationMACAddress, ETHERNET_ADDRESS_SIZE); - + status = KrnlHlprMACHeaderModifyDestinationAddress(&value, pNetBufferList); - + KrnlHlprFwpValuePurgeLocalCopy(&value); - + HLPR_BAIL_ON_FAILURE(status); } } @@ -1233,9 +1233,9 @@ NTSTATUS PerformBasicPacketModificationAtOutboundMACFrame(_In_ CLASSIFY_DATA** p /** @private_function="PerformBasicPacketModificationAtIngressVSwitchEthernet" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's - ingress path from the ingress VSwitch Layers using + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's + ingress path from the ingress VSwitch Layers using FwpsInjectvSwitchEthernetIngressAsync0().

Notes: Applies to the following ingress layers:
@@ -1387,145 +1387,145 @@ NTSTATUS PerformBasicPacketModificationAtIngressVSwitchEthernet(_In_ CLASSIFY_DA case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -1545,7 +1545,7 @@ NTSTATUS PerformBasicPacketModificationAtIngressVSwitchEthernet(_In_ CLASSIFY_DA DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtIngressVSwitchEthernet: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -1671,7 +1671,7 @@ NTSTATUS PerformBasicPacketModificationAtIngressVSwitchEthernet(_In_ CLASSIFY_DA DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtIngressVSwitchEthernet: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -1681,37 +1681,37 @@ NTSTATUS PerformBasicPacketModificationAtIngressVSwitchEthernet(_In_ CLASSIFY_DA if(pModificationData->macData.flags & PCPMDF_MODIFY_MAC_HEADER_SOURCE_ADDRESS) { FWP_VALUE value; - + RtlZeroMemory(&value, sizeof(FWP_VALUE)); - + HLPR_NEW(value.byteArray6, FWP_BYTE_ARRAY6, WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(value.byteArray6, status); - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pSourceMACAddress, ETHERNET_ADDRESS_SIZE); - + status = KrnlHlprMACHeaderModifySourceAddress(&value, pNetBufferList); - + KrnlHlprFwpValuePurgeLocalCopy(&value); - + HLPR_BAIL_ON_FAILURE(status); } - + if(pModificationData->macData.flags & PCPMDF_MODIFY_MAC_HEADER_DESTINATION_ADDRESS) { FWP_VALUE value; - + RtlZeroMemory(&value, sizeof(FWP_VALUE)); - + #pragma warning(push) #pragma warning(disable: 6014) /// value.byteArray6 will be freed in with call to KrnlHlprFwpValuePurgeLocalCopy @@ -1724,16 +1724,16 @@ NTSTATUS PerformBasicPacketModificationAtIngressVSwitchEthernet(_In_ CLASSIFY_DA #pragma warning(pop) value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pDestinationMACAddress, ETHERNET_ADDRESS_SIZE); - + status = KrnlHlprMACHeaderModifyDestinationAddress(&value, pNetBufferList); - + KrnlHlprFwpValuePurgeLocalCopy(&value); - + HLPR_BAIL_ON_FAILURE(status); } } @@ -1792,9 +1792,9 @@ NTSTATUS PerformBasicPacketModificationAtIngressVSwitchEthernet(_In_ CLASSIFY_DA /** @private_function="PerformBasicPacketModificationAtEgressVSwitchEthernet" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's - ingress path from the egress VSwitch Layers using + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the virtual switch's + ingress path from the egress VSwitch Layers using FwpsInjectvSwitchEthernetIngressAsync0().

Notes: Applies to the following egress layers:
@@ -1946,145 +1946,145 @@ NTSTATUS PerformBasicPacketModificationAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -2104,7 +2104,7 @@ NTSTATUS PerformBasicPacketModificationAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtEgressVSwitchEthernet: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -2230,7 +2230,7 @@ NTSTATUS PerformBasicPacketModificationAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtEgressVSwitchEthernet: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -2249,9 +2249,9 @@ NTSTATUS PerformBasicPacketModificationAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(value.byteArray6, status); - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pSourceMACAddress, ETHERNET_ADDRESS_SIZE); @@ -2281,9 +2281,9 @@ NTSTATUS PerformBasicPacketModificationAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT status); #pragma warning(pop) - + value.type = FWP_BYTE_ARRAY6_TYPE; - + RtlCopyMemory(value.byteArray6->byteArray6, pModificationData->macData.pDestinationMACAddress, ETHERNET_ADDRESS_SIZE); @@ -2353,8 +2353,8 @@ NTSTATUS PerformBasicPacketModificationAtEgressVSwitchEthernet(_In_ CLASSIFY_DAT /** @private_function="PerformBasicPacketModificationAtInboundNetwork" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the incoming Network Layers using FwpsInjectNetworkReceiveAsync().

Notes: Applies to the following inbound layers:
@@ -2596,145 +2596,145 @@ NTSTATUS PerformBasicPacketModificationAtInboundNetwork(_In_ CLASSIFY_DATA** ppC case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -2752,7 +2752,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundNetwork(_In_ CLASSIFY_DATA** ppC DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtInboundNetwork: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -2930,7 +2930,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundNetwork(_In_ CLASSIFY_DATA** ppC DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtInboundNetwork: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -2985,8 +2985,8 @@ NTSTATUS PerformBasicPacketModificationAtInboundNetwork(_In_ CLASSIFY_DATA** ppC /** @private_function="PerformBasicPacketModificationAtOutboundNetwork" - - Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the + + Purpose: Clones the NET_BUFFER_LIST and injects the clone back to the stack from the outgoing Network Layers using FwpsInjectNetworkSendAsync().

Notes: Applies to the following inbound layers:
@@ -3101,145 +3101,145 @@ NTSTATUS PerformBasicPacketModificationAtOutboundNetwork(_In_ CLASSIFY_DATA** pp case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -3259,7 +3259,7 @@ NTSTATUS PerformBasicPacketModificationAtOutboundNetwork(_In_ CLASSIFY_DATA** pp DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtOutboundNetwork: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -3402,8 +3402,8 @@ NTSTATUS PerformBasicPacketModificationAtOutboundNetwork(_In_ CLASSIFY_DATA** pp /** @private_function="PerformBasicPacketModificationAtForward" - - Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context and + + Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context and injects the clone back to the stack's forward path using FwpsInjectForwardAsync().

Notes: Applies to the following forwarding layers:
@@ -3500,14 +3500,14 @@ NTSTATUS PerformBasicPacketModificationAtForward(_In_ CLASSIFY_DATA** ppClassify flags = pFlags->uint32; #if(NTDDI_VERSION >= NTDDI_WIN7) - + /// Determine if this is a weakhost forward if(flags & FWP_CONDITION_FLAG_IS_INBOUND_PASS_THRU) isWeakHostReceive = TRUE; - + if(flags & FWP_CONDITION_FLAG_IS_OUTBOUND_PASS_THRU) isWeakHostSend = TRUE; - + #endif /// (NTDDI_VERSION >= NTDDI_WIN7) /// Initial offset is at the IP Header, so just clone the entire NET_BUFFER_LIST. @@ -3627,145 +3627,145 @@ NTSTATUS PerformBasicPacketModificationAtForward(_In_ CLASSIFY_DATA** ppClassify case IPPROTO_ICMP: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = TCP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) tcpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = UDP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) udpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = ICMP_HEADER_MIN_SIZE; - + if(FWPS_IS_METADATA_FIELD_PRESENT(pMetadata, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)) icmpHeaderSize = pMetadata->transportHeaderSize; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -3785,7 +3785,7 @@ NTSTATUS PerformBasicPacketModificationAtForward(_In_ CLASSIFY_DATA** ppClassify DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtForward: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -3882,8 +3882,8 @@ NTSTATUS PerformBasicPacketModificationAtForward(_In_ CLASSIFY_DATA** ppClassify } } - /// If the Forwarded NBL is destined locally, inject using FwpsInjectNetworkReceiveAsync rather - /// than the traditional FwpsInjectForwardAsync otherwise STATUS_INVALID_PARAMETER will be + /// If the Forwarded NBL is destined locally, inject using FwpsInjectNetworkReceiveAsync rather + /// than the traditional FwpsInjectForwardAsync otherwise STATUS_INVALID_PARAMETER will be /// returned in the NBL.status and the injection fails. if(isWeakHostReceive) { @@ -3915,8 +3915,8 @@ NTSTATUS PerformBasicPacketModificationAtForward(_In_ CLASSIFY_DATA** ppClassify CompleteBasicPacketInjection, pCompletionData); } - /// If the Forwarded NBL is sourced locally, but another interface, inject using - /// FwpsInjectNetworkSendAsync rather than the traditional FwpsInjectForwardAsync otherwise + /// If the Forwarded NBL is sourced locally, but another interface, inject using + /// FwpsInjectNetworkSendAsync rather than the traditional FwpsInjectForwardAsync otherwise /// STATUS_INVALID_PARAMETER will be returned in the NBL.status and the injection fails else if(isWeakHostSend) { @@ -3991,9 +3991,9 @@ NTSTATUS PerformBasicPacketModificationAtForward(_In_ CLASSIFY_DATA** ppClassify /** @private_function="PerformBasicPacketModificationAtInboundTransport" - - Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context, and - injects the clone back to the stack's inbound path from the incoming Transport + + Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context, and + injects the clone back to the stack's inbound path from the incoming Transport Layers using FwpsInjectTransportRecveiveAsync().

Notes: Applies to the following inbound layers:
@@ -4134,7 +4134,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p if(pClassifyValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4) { ipHeaderSize = IPV4_HEADER_MIN_SIZE; - + if(protocol == IPPROTO_ICMP) transportHeaderSize = ICMP_HEADER_MIN_SIZE; else if(protocol == IPPROTO_TCP) @@ -4180,7 +4180,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p (pClassifyValues->layerId == FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V4 || pClassifyValues->layerId == FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V6)) { - /// For asynchronous execution, the drop will cause the stack to continue processing on the + /// For asynchronous execution, the drop will cause the stack to continue processing on the /// NBL for auditing purposes. This processing retreats the NBL Offset to the Transport header. /// We need to take this into account because we only took a reference on the NBL. } @@ -4292,7 +4292,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p if(pRemoteAddressValue->type == FWP_BYTE_ARRAY16_TYPE) addressSize = IPV6_ADDRESS_SIZE; else - addressSize = IPV4_ADDRESS_SIZE; + addressSize = IPV4_ADDRESS_SIZE; HLPR_NEW_ARRAY(pSourceAddress, BYTE, @@ -4342,7 +4342,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p RtlCopyMemory(pDestinationAddress, &ipv4Address, addressSize); - } + } } pProtocolValue = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, @@ -4506,11 +4506,11 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p { UINT32 sourceAddress = htonl(pRemoteAddressValue->uint32); UINT32 destinationAddress = htonl(pLocalAddressValue->uint32); - + RtlCopyMemory(pIPSourceAddress, &sourceAddress, IPV4_ADDRESS_SIZE); - + RtlCopyMemory(pIPDestinationAddress, &destinationAddress, IPV4_ADDRESS_SIZE); @@ -4536,12 +4536,12 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p protocol = IPPROTO_MAX; NT_ASSERT(protocol != IPPROTO_MAX); - + if(pClassifyValues->layerId == FWPS_LAYER_INBOUND_ICMP_ERROR_V4) protocol = IPPROTO_ICMP; else if(pClassifyValues->layerId == FWPS_LAYER_INBOUND_ICMP_ERROR_V6) protocol = IPPROTO_ICMPV6; - + switch(protocol) { case IPPROTO_ICMP: @@ -4551,125 +4551,125 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv4HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv4HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_TCP: { UINT32 tcpHeaderSize = transportHeaderSize ? transportHeaderSize : TCP_HEADER_MIN_SIZE; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprTCPHeaderModifySourcePort(&srcPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprTCPHeaderModifyDestinationPort(&dstPort, pNetBufferList, tcpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_UDP: { UINT32 udpHeaderSize = transportHeaderSize ? transportHeaderSize : UDP_HEADER_MIN_SIZE; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_SOURCE_PORT) { FWP_VALUE0 srcPort; - + srcPort.type = FWP_UINT16; srcPort.uint16 = pModificationData->transportData.sourcePort; - + status = KrnlHlprUDPHeaderModifySourcePort(&srcPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_DESTINATION_PORT) { FWP_VALUE0 dstPort; - + dstPort.type = FWP_UINT16; dstPort.uint16 = pModificationData->transportData.destinationPort; - + status = KrnlHlprUDPHeaderModifyDestinationPort(&dstPort, pNetBufferList, udpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } case IPPROTO_ICMPV6: { UINT32 icmpHeaderSize = transportHeaderSize ? transportHeaderSize : ICMP_HEADER_MIN_SIZE; - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_TYPE) { FWP_VALUE0 icmpType; - + icmpType.type = FWP_UINT8; icmpType.uint8 = (UINT8)ntohs(pModificationData->transportData.sourcePort); - + status = KrnlHlprICMPv6HeaderModifyType(&icmpType, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); - + status = KrnlHlprICMPv6HeaderModifyCode(&icmpCode, pNetBufferList, icmpHeaderSize); HLPR_BAIL_ON_FAILURE_2(status); } - + break; } } @@ -4687,7 +4687,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p DPFLTR_ERROR_LEVEL, " !!!! PerformBasicPacketModificationAtInboundTransport: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -4716,7 +4716,7 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p RtlCopyMemory(pIPSourceAddress, pModificationData->ipData.sourceAddress.pIPv4, - IPV4_ADDRESS_SIZE); + IPV4_ADDRESS_SIZE); } else { @@ -4879,9 +4879,9 @@ NTSTATUS PerformBasicPacketModificationAtInboundTransport(_In_ CLASSIFY_DATA** p /** @private_function="PerformBasicPacketModificationAtOutboundTransport" - - Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context, and - injects the clone back to the stack's outbound path from the outgoing Transport + + Purpose: Clones the NET_BUFFER_LIST, modifies it with data from the associated context, and + injects the clone back to the stack's outbound path from the outgoing Transport Layers using FwpsInjectTransportSendAsync().

Notes: Applies to the following outbound layers:
@@ -5101,7 +5101,7 @@ NTSTATUS PerformBasicPacketModificationAtOutboundTransport(_In_ CLASSIFY_DATA** if(pModificationData->transportData.flags & PCPMDF_MODIFY_TRANSPORT_HEADER_ICMP_CODE) { FWP_VALUE0 icmpCode; - + icmpCode.type = FWP_UINT8; icmpCode.uint8 = (UINT8)ntohs(pModificationData->transportData.destinationPort); @@ -5293,8 +5293,8 @@ NTSTATUS PerformBasicPacketModificationAtOutboundTransport(_In_ CLASSIFY_DATA** /** @private_function="BasicPacketModificationDeferredProcedureCall" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at DISPATCH_LEVEL.

Notes:
@@ -5469,8 +5469,8 @@ VOID BasicPacketModificationDeferredProcedureCall(_In_ KDPC* pDPC, /** @private_function="BasicPacketModificationWorkItemRoutine" - - Purpose: Invokes the appropriate private routine to perform the modification and injection + + Purpose: Invokes the appropriate private routine to perform the modification and injection at PASSIVE_LEVEL.

Notes:
@@ -5640,8 +5640,8 @@ VOID BasicPacketModificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, /** @private_function="TriggerBasicPacketModificationInline" - - Purpose: Makes a reference to all the classification data structures and invokes the + + Purpose: Makes a reference to all the classification data structures and invokes the appropriate private routine to perform the modification and injection.

Notes:
@@ -5826,8 +5826,8 @@ NTSTATUS TriggerBasicPacketModificationInline(_In_ const FWPS_INCOMING_VALUES* p /** @private_function="TriggerBasicPacketModificationOutOfBand" - - Purpose: Creates a local copy of the classification data structures and queues a WorkItem + + Purpose: Creates a local copy of the classification data structures and queues a WorkItem to perform the modification and injection at PASSIVE_LEVEL.

Notes:
@@ -5926,8 +5926,8 @@ NTSTATUS TriggerBasicPacketModificationOutOfBand(_In_ const FWPS_INCOMING_VALUES /** @classify_function="ClassifyBasicPacketModification" - - Purpose: Blocks the current NET_BUFFER_LIST, modifies a clone of the NBL with the specified + + Purpose: Blocks the current NET_BUFFER_LIST, modifies a clone of the NBL with the specified data and injects the clone back to the stack's data path.

Notes: Applies to the following layers:
@@ -5972,9 +5972,9 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl NT_ASSERT(pFilter->providerContext->type == FWPM_GENERAL_CONTEXT); NT_ASSERT(pFilter->providerContext->dataBuffer); NT_ASSERT(pFilter->providerContext->dataBuffer->size == sizeof(PC_BASIC_PACKET_MODIFICATION_DATA)); - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + NT_ASSERT(pClassifyValues->layerId == FWPS_LAYER_INBOUND_IPPACKET_V4 || pClassifyValues->layerId == FWPS_LAYER_INBOUND_IPPACKET_V6 || pClassifyValues->layerId == FWPS_LAYER_OUTBOUND_IPPACKET_V4 || @@ -6005,9 +6005,9 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl pClassifyValues->layerId == FWPS_LAYER_OUTBOUND_MAC_FRAME_NATIVE || pClassifyValues->layerId == FWPS_LAYER_INGRESS_VSWITCH_ETHERNET || pClassifyValues->layerId == FWPS_LAYER_EGRESS_VSWITCH_ETHERNET); - + #else - + NT_ASSERT(pClassifyValues->layerId == FWPS_LAYER_INBOUND_IPPACKET_V4 || pClassifyValues->layerId == FWPS_LAYER_INBOUND_IPPACKET_V6 || pClassifyValues->layerId == FWPS_LAYER_OUTBOUND_IPPACKET_V4 || @@ -6032,9 +6032,9 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl pClassifyValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V6 || pClassifyValues->layerId == FWPS_LAYER_STREAM_PACKET_V4 || pClassifyValues->layerId == FWPS_LAYER_STREAM_PACKET_V6); - + #endif /// (NTDDI_VERSION >= NTDDI_WIN8) - + NT_ASSERT(pFilter->providerContext); NT_ASSERT(pFilter->providerContext->type == FWPM_GENERAL_CONTEXT); NT_ASSERT(pFilter->providerContext->dataBuffer); @@ -6111,7 +6111,7 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl DPFLTR_ERROR_LEVEL, " !!!! ClassifyBasicPacketModification: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -6151,7 +6151,7 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl if(bytesAdvanced) { - /// Initial offset is at the IP Header for OUTBOUND_IPPACKET and IPFORWARD, so + /// Initial offset is at the IP Header for OUTBOUND_IPPACKET and IPFORWARD, so /// advance the size of the IP Header ... NdisAdvanceNetBufferDataStart(NET_BUFFER_LIST_FIRST_NB((NET_BUFFER_LIST*)pNetBufferList), bytesAdvanced, @@ -6185,7 +6185,7 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl DPFLTR_ERROR_LEVEL, " !!!! ClassifyBasicPacketModification: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -6319,8 +6319,8 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES0* pCl /** @classify_function="ClassifyBasicPacketModification" - - Purpose: Blocks the current NET_BUFFER_LIST, modifies a clone of the NBL with the specified + + Purpose: Blocks the current NET_BUFFER_LIST, modifies a clone of the NBL with the specified data and injects the clone back to the stack's data path.

Notes: Applies to the following layers:
@@ -6463,7 +6463,7 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES* pCla DPFLTR_ERROR_LEVEL, " !!!! ClassifyBasicPacketModification: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } } @@ -6511,7 +6511,7 @@ VOID NTAPI ClassifyBasicPacketModification(_In_ const FWPS_INCOMING_VALUES* pCla HLPR_BAIL_ON_FAILURE(status); #pragma warning(pop) - + if(pInjectionData->injectionState != FWPS_PACKET_INJECTED_BY_SELF && pInjectionData->injectionState != FWPS_PACKET_PREVIOUSLY_INJECTED_BY_SELF) { diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.h index 9a0a6bc6e..3e79d7664 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.h @@ -6,7 +6,7 @@ // ClassifyFunctions_BasicPacketModificationCallouts.h // // Abstract: -// This module contains prototypes for WFP Classify functions for modifying and injecting +// This module contains prototypes for WFP Classify functions for modifying and injecting // packets back into the data path using the clone / block / inject method. // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp index 7624c0f65..9fb29de4b 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp @@ -6,13 +6,13 @@ // ClassifyFunctions_BasicStreamInjectionCallouts.cpp // // Abstract: -// This module contains WFP Classify functions for injecting data back into TCP's stream using +// This module contains WFP Classify functions for injecting data back into TCP's stream using // the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // // ClassifyBasicStreamInjection @@ -20,7 +20,7 @@ // // Classify - Function is an FWPS_CALLOUT_CLASSIFY_FN // -// BasicStreamInjection - Function demonstates use clone / block / inject model for +// BasicStreamInjection - Function demonstates use clone / block / inject model for // Stream // // @@ -47,8 +47,8 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance -// traces, fix serialization, and add support for +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// traces, fix serialization, and add support for // multiple injectors and flowContext // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -58,8 +58,8 @@ /** @private_function="PerformBasicPacketInjectionAtOutboundTransport" - - Purpose: Clones the stream data and injects the clone back to the stream using + + Purpose: Clones the stream data and injects the clone back to the stream using FwpsStreamInjectAsync().

Notes: Applies to the following layers:
@@ -109,13 +109,13 @@ NTSTATUS PerformBasicStreamInjection(_In_ CLASSIFY_DATA** ppClassifyData, #pragma warning(push) #pragma warning(disable: 6014) /// pCompletionData will be freed in completionFn using BasicStreamInjectionCompletionDataDestroy - + HLPR_NEW(pCompletionData, BASIC_STREAM_INJECTION_COMPLETION_DATA, WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(pCompletionData, status); - + #pragma warning(pop) KeInitializeSpinLock(&(pCompletionData->spinLock)); @@ -238,8 +238,8 @@ NTSTATUS PerformBasicStreamInjection(_In_ CLASSIFY_DATA** ppClassifyData, /** @private_function="BasicStreamInjectionDeferredProcedureCall" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at DISPATCH_LEVEL.

Notes:
@@ -284,7 +284,7 @@ VOID BasicStreamInjectionDeferredProcedureCall(_In_ KDPC* pDPC, { pListItem = ExInterlockedRemoveHeadList(pListHead, pSpinLock); - + InterlockedDecrement64(pNumEntries); } @@ -329,8 +329,8 @@ VOID BasicStreamInjectionDeferredProcedureCall(_In_ KDPC* pDPC, /** @private_function="BasicStreamInjectionWorkItemRoutine" - - Purpose: Invokes the private stream injection routine to perform the injection at + + Purpose: Invokes the private stream injection routine to perform the injection at PASSIVE_LEVEL.

Notes:
@@ -455,8 +455,8 @@ VOID BasicStreamInjectionWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, /** @private_function="TriggerBasicPacketInjectionInline" - - Purpose: Makes a reference to all the classification data structures and invokes the + + Purpose: Makes a reference to all the classification data structures and invokes the private stream injection routine to perform the injection.

Notes:
@@ -543,8 +543,8 @@ NTSTATUS TriggerBasicStreamInjectionInline(_In_ const FWPS_INCOMING_VALUES* pCla /** @private_function="TriggerBasicStreamInjectionOutOfBand" - - Purpose: Creates a local copy of the classification data structures and queues a WorkItem + + Purpose: Creates a local copy of the classification data structures and queues a WorkItem to perform the injection at PASSIVE_LEVEL.

Notes:
@@ -717,8 +717,8 @@ NTSTATUS TriggerBasicStreamInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES* p /** @classify_function="ClassifyBasicStreamInjection" - - Purpose: Blocks the current data and blindly injects a clone of the data back to the stream + + Purpose: Blocks the current data and blindly injects a clone of the data back to the stream without modification.

Notes:
@@ -757,8 +757,8 @@ VOID NTAPI ClassifyBasicStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassi pClassifyOut->rights, ((FWPS_STREAM_CALLOUT_IO_PACKET*)pStreamCalloutIOPacket)->streamData->dataLength); - /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will - /// remove the data and others will not be able to see it. + /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will + /// remove the data and others will not be able to see it. /// This means that if we got classified, regardless of the rights, we can do whatever we need to. NTSTATUS status = STATUS_SUCCESS; @@ -835,8 +835,8 @@ VOID NTAPI ClassifyBasicStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassi /** @classify_function="ClassifyBasicStreamInjection" - - Purpose: Blocks the current data and blindly injects a clone of the data back to the stream + + Purpose: Blocks the current data and blindly injects a clone of the data back to the stream without modification.

Notes:
@@ -874,8 +874,8 @@ VOID NTAPI ClassifyBasicStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassi pClassifyOut->rights, ((FWPS_STREAM_CALLOUT_IO_PACKET*)pStreamCalloutIOPacket)->streamData->dataLength); - /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will - /// remove the data and others will not be able to see it. + /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will + /// remove the data and others will not be able to see it. /// This means that if we got classified, regardless of the rights, we can do whatever we need to. NTSTATUS status = STATUS_SUCCESS; @@ -940,7 +940,7 @@ VOID NTAPI ClassifyBasicStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassi pClassifyOut->actionType, pClassifyOut->rights, (pClassifyOut->flags & FWPS_CLASSIFY_OUT_FLAG_ABSORB) ? "TRUE" : "FALSE"); - + return; } diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.h index 06e2f8633..dacde2a65 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.h @@ -6,13 +6,13 @@ // ClassifyFunctions_BasicStreamInjectionCallouts.cpp // // Abstract: -// This module contains prototypes for WFP Classify functions that inject data back into TCP's +// This module contains prototypes for WFP Classify functions that inject data back into TCP's // stream using the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // // ClassifyBasicStreamInjection diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp index 0e99b61e1..2f961e03a 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp @@ -6,23 +6,23 @@ // ClassifyFunctions_FastPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Classify functions that inject packets back into the data path +// This module contains WFP Classify functions that inject packets back into the data path // using the clone / block / inject method. This method is inline only, no modification, -// and uses as little validation and error checking as possible. Certain scenarios will -// definitely fail injection, such as injection to loopback, or IPsec encrypted packets. +// and uses as little validation and error checking as possible. Certain scenarios will +// definitely fail injection, such as injection to loopback, or IPsec encrypted packets. // These functions are meant for test performance purposes only. // // Naming Convention: // // -// +// // i.e. // ClassifyFastPacketInjection // // // Classify - Function is an FWPS_CALLOUT_CLASSIFY_FN // -// FastPacketInjection - Function demonstrates the clone / block / inject model in the +// FastPacketInjection - Function demonstrates the clone / block / inject model in the // fastest form available (inline, no validation, etc.). // // @@ -38,9 +38,9 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance -// traces, fix weakhost injection, fix expected -// offsets,and add support for multiple injectors and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// traces, fix weakhost injection, fix expected +// offsets,and add support for multiple injectors and // controlData. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -52,8 +52,8 @@ /** @classify_function="ClassifyFastPacketInjection" - - Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without + + Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without modification.

Notes: Applies to the following layers:
@@ -217,7 +217,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_IPPACKET_V4_FLAGS].value.uint32; injectionHandle = g_pIPv4OutboundNetworkInjectionHandles[index]; - + break; } case FWPS_LAYER_OUTBOUND_IPPACKET_V6: @@ -227,7 +227,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_IPPACKET_V6_FLAGS].value.uint32; injectionHandle = g_pIPv6OutboundNetworkInjectionHandles[index]; - + break; } case FWPS_LAYER_IPFORWARD_V4: @@ -247,7 +247,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif if(flags & FWP_CONDITION_FLAG_IS_INBOUND_PASS_THRU) injectionHandle = g_pIPv4InboundNetworkInjectionHandles[index]; else if(flags & FWP_CONDITION_FLAG_IS_OUTBOUND_PASS_THRU) - injectionHandle = g_pIPv4OutboundNetworkInjectionHandles[index]; + injectionHandle = g_pIPv4OutboundNetworkInjectionHandles[index]; break; } @@ -325,7 +325,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V4_FLAGS].value.uint32; injectionHandle = g_pIPv4OutboundTransportInjectionHandles[index]; - + break; } case FWPS_LAYER_OUTBOUND_TRANSPORT_V6: @@ -339,7 +339,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V6_FLAGS].value.uint32; injectionHandle = g_pIPv6OutboundTransportInjectionHandles[index]; - + break; } case FWPS_LAYER_DATAGRAM_DATA_V4: @@ -368,7 +368,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif injectionHandle = g_pIPv4OutboundTransportInjectionHandles[index]; } - + break; } case FWPS_LAYER_DATAGRAM_DATA_V6: @@ -485,7 +485,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else { interfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_INTERFACE_INDEX].value.uint32; - + subInterfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_SUB_INTERFACE_INDEX].value.uint32; injectionHandle = g_pIPv4InboundTransportInjectionHandles[index]; @@ -515,7 +515,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else { interfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V6_INTERFACE_INDEX].value.uint32; - + subInterfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V6_SUB_INTERFACE_INDEX].value.uint32; injectionHandle = g_pIPv6InboundTransportInjectionHandles[index]; @@ -525,7 +525,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else bytesRetreated = ipHeaderSize + transportHeaderSize; } - + break; } case FWPS_LAYER_ALE_AUTH_CONNECT_V4: @@ -622,7 +622,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif bytesRetreated = ipHeaderSize; } - + break; } case FWPS_LAYER_ALE_FLOW_ESTABLISHED_V6: @@ -677,7 +677,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif direction = (FWP_DIRECTION)pClassifyValues->incomingValue[FWPS_FIELD_STREAM_PACKET_V4_DIRECTION].value.uint8; flags = pClassifyValues->incomingValue[FWPS_FIELD_STREAM_PACKET_V4_FLAGS].value.uint32; - + if(direction == FWP_DIRECTION_INBOUND) { interfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_STREAM_PACKET_V4_INTERFACE_INDEX].value.uint32; @@ -691,7 +691,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else { pRemoteAddress = &(pClassifyValues->incomingValue[FWPS_FIELD_STREAM_PACKET_V4_IP_REMOTE_ADDRESS].value.uint32); - + injectionHandle = g_pIPv4OutboundTransportInjectionHandles[index]; bytesRetreated = ipHeaderSize; @@ -722,7 +722,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else { pRemoteAddress = pClassifyValues->incomingValue[FWPS_FIELD_STREAM_PACKET_V6_IP_REMOTE_ADDRESS].value.byteArray16->byteArray16; - + injectionHandle = g_pIPv6OutboundTransportInjectionHandles[index]; bytesRetreated = ipHeaderSize; @@ -730,9 +730,9 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif break; } - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + case FWPS_LAYER_INBOUND_MAC_FRAME_ETHERNET: { UINT16 etherType = pClassifyValues->incomingValue[FWPS_FIELD_INBOUND_MAC_FRAME_ETHERNET_ETHER_TYPE].value.uint16; @@ -755,7 +755,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif } else injectionHandle = g_pInboundMACInjectionHandles[index]; - + bytesRetreated = ethernetHeaderSize; break; @@ -802,7 +802,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif ndisPort = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_MAC_FRAME_NATIVE_NDIS_PORT].value.uint32; injectionHandle = g_pOutboundMACInjectionHandles[index]; - + break; } case FWPS_LAYER_INGRESS_VSWITCH_ETHERNET: @@ -825,7 +825,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif } else injectionHandle = g_pIngressVSwitchEthernetInjectionHandles[index]; - + break; } case FWPS_LAYER_EGRESS_VSWITCH_ETHERNET: @@ -848,10 +848,10 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif } else injectionHandle = g_pEgressVSwitchEthernetInjectionHandles[index]; - + break; } - + #endif // (NTDDI_VERSION >= NTDDI_WIN8) } @@ -869,7 +869,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif if(injectionState != FWPS_PACKET_INJECTED_BY_SELF && injectionState != FWPS_PACKET_PREVIOUSLY_INJECTED_BY_SELF) { - /// Due to TCP's locking semantics, TCP can only be injected Out of Band at any + /// Due to TCP's locking semantics, TCP can only be injected Out of Band at any /// transport layer or equivalent. if(protocol == TCP && (injectionHandle == g_pIPv4InboundTransportInjectionHandles[index] || @@ -1080,7 +1080,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif #endif ///(NTDDI_VERSION >= NTDDI_WIN8) HLPR_BAIL_LABEL: - + if(status != STATUS_SUCCESS) { if(pClonedNetBufferList) @@ -1103,8 +1103,8 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif /** @classify_function="ClassifyFastPacketInjection" - - Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without + + Purpose: Blocks the current NET_BUFFER_LIST and injects a clone back to the stack without modification.

Notes: Applies to the following layers:
@@ -1234,7 +1234,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_IPPACKET_V4_FLAGS].value.uint32; injectionHandle = g_pIPv4OutboundNetworkInjectionHandles[index]; - + break; } case FWPS_LAYER_OUTBOUND_IPPACKET_V6: @@ -1244,7 +1244,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_IPPACKET_V6_FLAGS].value.uint32; injectionHandle = g_pIPv6OutboundNetworkInjectionHandles[index]; - + break; } case FWPS_LAYER_IPFORWARD_V4: @@ -1330,7 +1330,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V4_FLAGS].value.uint32; injectionHandle = g_pIPv4OutboundTransportInjectionHandles[index]; - + break; } case FWPS_LAYER_OUTBOUND_TRANSPORT_V6: @@ -1344,7 +1344,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif flags = pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V6_FLAGS].value.uint32; injectionHandle = g_pIPv6OutboundTransportInjectionHandles[index]; - + break; } case FWPS_LAYER_DATAGRAM_DATA_V4: @@ -1373,7 +1373,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif injectionHandle = g_pIPv4OutboundTransportInjectionHandles[index]; } - + break; } case FWPS_LAYER_DATAGRAM_DATA_V6: @@ -1490,7 +1490,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else { interfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_INTERFACE_INDEX].value.uint32; - + subInterfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_SUB_INTERFACE_INDEX].value.uint32; injectionHandle = g_pIPv4InboundTransportInjectionHandles[index]; @@ -1520,7 +1520,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else { interfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V6_INTERFACE_INDEX].value.uint32; - + subInterfaceIndex = pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V6_SUB_INTERFACE_INDEX].value.uint32; injectionHandle = g_pIPv6InboundTransportInjectionHandles[index]; @@ -1530,7 +1530,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif else bytesRetreated = ipHeaderSize + transportHeaderSize; } - + break; } case FWPS_LAYER_ALE_AUTH_CONNECT_V4: @@ -1627,7 +1627,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif bytesRetreated = ipHeaderSize; } - + break; } case FWPS_LAYER_ALE_FLOW_ESTABLISHED_V6: @@ -1688,7 +1688,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif if(injectionState != FWPS_PACKET_INJECTED_BY_SELF && injectionState != FWPS_PACKET_PREVIOUSLY_INJECTED_BY_SELF) { - /// Due to TCP's locking semantics, TCP can only be injected Out of Band at any + /// Due to TCP's locking semantics, TCP can only be injected Out of Band at any /// transport layer or equivalent. if(protocol == TCP && (injectionHandle == g_pIPv4InboundTransportInjectionHandles[index] || @@ -1854,7 +1854,7 @@ VOID NTAPI ClassifyFastPacketInjection(_In_ const FWPS_INCOMING_VALUES* pClassif } HLPR_BAIL_LABEL: - + if(status != STATUS_SUCCESS) { if(pClonedNetBufferList) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.h index 5a7582119..de9218bd0 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.h @@ -7,9 +7,9 @@ // // Abstract: // This module contains prototypes for WFP Classify functions that inject packets back into the -// data path using the clone / block / inject method. This method is inline only, no -// modification, and uses as little validation and error checking as possible. Certain -// scenarios will definitely fail injection, such as injection to loopback, or IPsec +// data path using the clone / block / inject method. This method is inline only, no +// modification, and uses as little validation and error checking as possible. Certain +// scenarios will definitely fail injection, such as injection to loopback, or IPsec // encrypted packets. These functions are meant for test performance purposes only. // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp index a10b0d8a9..0e23d0744 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp @@ -14,14 +14,14 @@ // Naming Convention: // // -// +// // i.e. // ClassifyFastStreamInjection // // // Classify - Function is an FWPS_CALLOUT_CLASSIFY_FN // -// FastStreamInjection - Function demonstrates the clone / block / inject model in the +// FastStreamInjection - Function demonstrates the clone / block / inject model in the // fastest form available (inline, no validation, etc.). // // Private Functions: @@ -36,7 +36,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance // traces, and add support for multiple injectors. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -48,8 +48,8 @@ /** @classify_function="ClassifyFastStreamInjection" - - Purpose: Blocks the current stream data and injects a clone back to the stack without + + Purpose: Blocks the current stream data and injects a clone back to the stack without modification.

Notes: Applies to the following layers:
@@ -76,8 +76,8 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif UNREFERENCED_PARAMETER(pClassifyContext); UNREFERENCED_PARAMETER(flowContext); - /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will - /// remove the data and others will not be able to see it. + /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will + /// remove the data and others will not be able to see it. /// This means that if we got classified, regardless of the rights, we can do whatever we need to. if(pStreamCalloutIOPacket) @@ -140,7 +140,7 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif /// Do not touch the rights in case other callouts use them (which they shouldn't). pClassifyOut->actionType = FWP_ACTION_BLOCK; - + status = FwpsStreamInjectAsync(injectionHandle, 0, 0, @@ -173,8 +173,8 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif /** @classify_function="ClassifyFastStreamInjection" - - Purpose: Blocks the current stream data and injects a clone back to the stack without + + Purpose: Blocks the current stream data and injects a clone back to the stack without modification.

Notes: Applies to the following layers:
@@ -199,10 +199,10 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif { UNREFERENCED_PARAMETER(flowContext); - /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will - /// remove the data and others will not be able to see it. + /// Stream has no concept of Veto. Due to its "waterfall" nature where a block will + /// remove the data and others will not be able to see it. /// This means that if we got classified, regardless of the rights, we can do whatever we need to. - + if(pStreamCalloutIOPacket) { NTSTATUS status = STATUS_SUCCESS; @@ -237,15 +237,15 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif } else HLPR_BAIL; - + if(!(streamFlags & FWPS_STREAM_FLAG_RECEIVE) && !(streamFlags & FWPS_STREAM_FLAG_SEND)) streamFlags |= direction ? FWPS_STREAM_FLAG_RECEIVE : FWPS_STREAM_FLAG_SEND; - + pStreamPacket->countBytesRequired = 0; pStreamPacket->countBytesEnforced = pStreamPacket->streamData->dataLength; pStreamPacket->streamAction = FWPS_STREAM_ACTION_NONE; - + status = FwpsCloneStreamData(pStreamPacket->streamData, g_pNDISPoolData->nblPoolHandle, g_pNDISPoolData->nbPoolHandle, @@ -257,7 +257,7 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif DPFLTR_ERROR_LEVEL, " !!!! PerformBasicStreamInjection : FwpsCloneStreamData() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -275,20 +275,20 @@ VOID NTAPI ClassifyFastStreamInjection(_In_ const FWPS_INCOMING_VALUES* pClassif pStreamPacket->streamData->dataLength, CompleteFastStreamInjection, 0); - + HLPR_BAIL_LABEL: - + if(status != STATUS_SUCCESS && pNetBufferListChain) { KIRQL irql = KeGetCurrentIrql(); - + FwpsDiscardClonedStreamData(pNetBufferListChain, 0, irql == DISPATCH_LEVEL ? TRUE : FALSE); } } - + return; } diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.h index 9db087dfb..d340fbbe1 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.h @@ -7,8 +7,8 @@ // // Abstract: // This module contains prototypes for WFP Classify functions that inject data back into the -// stream using the clone / block / inject method. This method is inline only, no -// modification, and uses as little validation and error checking as possible. These +// stream using the clone / block / inject method. This method is inline only, no +// modification, and uses as little validation and error checking as possible. These // functions are meant for test performance purposes only. // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp index f1c7f905e..97de51ecb 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // ClassifyFlowAssociation @@ -86,7 +86,7 @@ NTSTATUS PerformFlowAssociation(_In_ const FWPS_INCOMING_METADATA_VALUES* pMetad HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PerformFlowAssociation() [status: %#x]\n", @@ -101,8 +101,8 @@ NTSTATUS PerformFlowAssociation(_In_ const FWPS_INCOMING_METADATA_VALUES* pMetad /** @classify_function="ClassifyFlowAssociation" - - Purpose: Associates a context with a flow which is available for each of the layers + + Purpose: Associates a context with a flow which is available for each of the layers specified in the provider context

Notes: Applies to the following layers:
@@ -171,8 +171,8 @@ VOID NTAPI ClassifyFlowAssociation(_In_ const FWPS_INCOMING_VALUES0* pClassifyVa /** @classify_function="ClassifyFlowAssociation" - - Purpose: Associates a context with a flow which is available for each of the layers + + Purpose: Associates a context with a flow which is available for each of the layers specified in the provider context

Notes: Applies to the following layers:
diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp index b3f3ba156..005721df1 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // ClassifyPendAuthorization @@ -41,7 +41,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, enhance // traces, and add support for controlData. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -51,7 +51,7 @@ /** @private_function="PrvCloneAuthorizedNBLAndInject" - + Purpose:

Notes:
@@ -67,13 +67,13 @@ NTSTATUS PrvCloneAuthorizedNBLAndInject(_Inout_ CLASSIFY_DATA** ppClassifyData, _Inout_ INJECTION_DATA** ppInjectionData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvCloneAuthorizedNBLAndInject()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); NT_ASSERT(ppInjectionData); NT_ASSERT(*ppClassifyData); @@ -324,14 +324,14 @@ NTSTATUS PrvCloneAuthorizedNBLAndInject(_Inout_ CLASSIFY_DATA** ppClassifyData, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvCloneAuthorizedNBLAndInject() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -340,7 +340,7 @@ NTSTATUS PrvCloneAuthorizedNBLAndInject(_Inout_ CLASSIFY_DATA** ppClassifyData, /** @private_function="PerformPendAuthorization" - + Purpose:

Notes:
@@ -356,13 +356,13 @@ NTSTATUS PerformPendAuthorization(_Inout_ CLASSIFY_DATA** ppClassifyData, _Inout_ INJECTION_DATA** ppInjectionData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PerformPendAuthorization()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); NT_ASSERT(ppPendData); NT_ASSERT(ppInjectionData); @@ -421,14 +421,14 @@ NTSTATUS PerformPendAuthorization(_Inout_ CLASSIFY_DATA** ppClassifyData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PerformPendAuthorization() [status: %#x]\n", status); #endif /// DBG - + return status; }; @@ -436,8 +436,8 @@ NTSTATUS PerformPendAuthorization(_Inout_ CLASSIFY_DATA** ppClassifyData, /** @private_function="PendAuthorizationDeferredProcedureCall" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at DISPATCH_LEVEL.

Notes:
@@ -453,13 +453,13 @@ VOID PendAuthorizationDeferredProcedureCall(_In_ KDPC* pDPC, _In_opt_ PVOID pArg2) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PendAuthorizationDeferredProcedureCall()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDPC); UNREFERENCED_PARAMETER(pContext); UNREFERENCED_PARAMETER(pArg2); @@ -496,19 +496,19 @@ VOID PendAuthorizationDeferredProcedureCall(_In_ KDPC* pDPC, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PendAuthorizationDeferredProcedureCall()\n"); #endif /// DBG - + return; } /** @private_function="PendAuthorizationWorkItemRoutine" - + Purpose:

Notes:
@@ -522,13 +522,13 @@ VOID PendAuthorizationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _In_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PendAuthorizationWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -562,19 +562,19 @@ VOID PendAuthorizationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PendAuthorizationWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @private_function="TriggerPendAuthorizationOutOfBand" - + Purpose:

Notes:
@@ -597,20 +597,20 @@ NTSTATUS TriggerPendAuthorizationOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCla _In_ PC_PEND_AUTHORIZATION_DATA* pPCData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> TriggerPendAuthorizationOutOfBand()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); NT_ASSERT(pFilter); NT_ASSERT(pClassifyOut); NT_ASSERT(pPendData); NT_ASSERT(pPCData); - + NTSTATUS status = STATUS_SUCCESS; CLASSIFY_DATA* pClassifyData = 0; @@ -666,14 +666,14 @@ NTSTATUS TriggerPendAuthorizationOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCla } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- TriggerPendAuthorizationOutOfBand() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -681,9 +681,9 @@ NTSTATUS TriggerPendAuthorizationOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCla /** @classify_function="ClassifyPendAuthorization" - - Purpose: Classify Function which will pend an authorization request, and send the request - for further processing to a worker thread. On a reauthorization the final decided + + Purpose: Classify Function which will pend an authorization request, and send the request + for further processing to a worker thread. On a reauthorization the final decided action is returned as the actionType.

Notes: Applies to the following layers:
@@ -849,9 +849,9 @@ VOID NTAPI ClassifyPendAuthorization(_In_ const FWPS_INCOMING_VALUES* pClassifyV /** @classify_function="ClassifyPendAuthorization" - - Purpose: Classify Function which will pend an authorization request, and send the request - for further processing to a worker thread. On a reauthorization the final decided + + Purpose: Classify Function which will pend an authorization request, and send the request + for further processing to a worker thread. On a reauthorization the final decided action is returned as the actionType.

Notes: Applies to the following layers:
diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.h index 05f0f2c3c..89b269b7e 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.h @@ -6,7 +6,7 @@ // ClassifyFunctions_PendAuthorizationCallouts.h // // Abstract: -// This module contains prototypes of WFP Classify functions for pending and completing +// This module contains prototypes of WFP Classify functions for pending and completing // authorizations // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp index d8d88721a..08adefac0 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // ClassifyPendEndpointClosure @@ -19,7 +19,7 @@ // // Classify - Function is an FWPS_CALLOUT_CLASSIFY_FN. // Perform - Function executes the desired scenario. -// Trigger - Function queues a worker thread for later execution of +// Trigger - Function queues a worker thread for later execution of // the the scenario. // // PendEndpointClosure - Function demonstates pending endpoint closure requests. @@ -53,8 +53,8 @@ /** @private_function="PerformPendEndpointClosure" - - Purpose: Waits for the specified delay, then completes the pended classify, and frees the + + Purpose: Waits for the specified delay, then completes the pended classify, and frees the memory.

Notes:
@@ -68,13 +68,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS PerformPendEndpointClosure(_Inout_ PEND_DATA** ppPendData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PerformPendEndpointClosure()\n"); #endif /// DBG - + NT_ASSERT(*ppPendData); NT_ASSERT((*ppPendData)->pPendEndpointClosureData); @@ -118,7 +118,7 @@ NTSTATUS PerformPendEndpointClosure(_Inout_ PEND_DATA** ppPendData) /** @private_function="PendEndpointClosureDeferredProcedureCall" - + Purpose: Invokes the appropriate private routine to complete the pended classify.

Notes:
@@ -134,13 +134,13 @@ VOID PendEndpointClosureDeferredProcedureCall(_In_ KDPC* pDPC, _In_opt_ PVOID pArg2) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PendEndpointClosureDeferredProcedureCall()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDPC); UNREFERENCED_PARAMETER(pContext); UNREFERENCED_PARAMETER(pArg2); @@ -172,14 +172,14 @@ VOID PendEndpointClosureDeferredProcedureCall(_In_ KDPC* pDPC, " <--- PendEndpointClosureDeferredProcedureCall()\n"); #endif /// DBG - + return; } /** @private_function="PendEndpointClosureWorkItemRoutine" - - Purpose: Invokes the appropriate private routine to complete the pended classify at + + Purpose: Invokes the appropriate private routine to complete the pended classify at PASSIVE_LEVEL.

Notes:
@@ -193,13 +193,13 @@ VOID PendEndpointClosureWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _In_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PendEndpointClosureWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -222,19 +222,19 @@ VOID PendEndpointClosureWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PendEndpointClosureWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @private_function="TriggerPendEndpointClosure" - + Purpose:

Notes:
@@ -249,16 +249,16 @@ NTSTATUS TriggerPendEndpointClosure(_Inout_ PEND_DATA* pPendData, _In_ PC_PEND_ENDPOINT_CLOSURE_DATA* pPCData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> TriggerPendEndpointClosure()\n"); #endif /// DBG - + NT_ASSERT(pPendData); NT_ASSERT(pPCData); - + NTSTATUS status = STATUS_SUCCESS; if(pPCData->useWorkItems || @@ -293,11 +293,11 @@ NTSTATUS TriggerPendEndpointClosure(_Inout_ PEND_DATA* pPendData, /** @classify_function="ClassifyPendEndpointClosure" - - Purpose: Classify Function which will pend an endpoint closure request. If there is + + Purpose: Classify Function which will pend an endpoint closure request. If there is appropriate flowContext, te request will be pended, and then exit, requiring a call - to the FlowDeleteFn to perform the pend completion. Otherwise a worker thread is - queued, and a will wait for the specified milliseconds before the pend is + to the FlowDeleteFn to perform the pend completion. Otherwise a worker thread is + queued, and a will wait for the specified milliseconds before the pend is completed.

Notes: Applies to the following layers:
diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.h index 931b3e65a..e5970dea2 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.h @@ -6,7 +6,7 @@ // ClassifyFunctions_PendEndpointClosureCallouts.h // // Abstract: -// This module contains prototypes of WFP Classify functions for pending and completing +// This module contains prototypes of WFP Classify functions for pending and completing // endpoint closures // // Author: diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp index f0cc853cd..704079370 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // ClassifyProxyByALERedirect @@ -22,7 +22,7 @@ // Prv - Function is a private helper to this module. // Trigger - // -// ProxyByALERedirect - Function demonstates use of +// ProxyByALERedirect - Function demonstates use of // FWPM_LAYER_ALE_CONNECT_REDIRECT_V{4/6} and // FWPM_LAYER_ALE_BIND_REDIRECT_V{4/6} for proxying. // (For use in Win7+) @@ -50,9 +50,9 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, fix -// proxying by injection to use INBOUND_IPPACKET, fix -// proxying by ALE to a local service, and add support +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, fix +// proxying by injection to use INBOUND_IPPACKET, fix +// proxying by ALE to a local service, and add support // for multiple redirectors. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -62,7 +62,7 @@ /** @private_function="PerformProxyInjectionAtInboundNetwork" - + Purpose:

Notes:
@@ -549,7 +549,7 @@ NTSTATUS PerformProxyInjectionAtInboundNetwork(_In_ CLASSIFY_DATA** ppClassifyDa } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PerformProxyInjectionAtInboundNetwork() [status: %#x]\n", @@ -562,7 +562,7 @@ NTSTATUS PerformProxyInjectionAtInboundNetwork(_In_ CLASSIFY_DATA** ppClassifyDa /** @private_function="PerformProxyInjectionAtOutboundTransport" - + Purpose:

Notes:
@@ -580,13 +580,13 @@ NTSTATUS PerformProxyInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppClassif _In_ BOOLEAN isInline = FALSE) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PerformProxyInjectionAtOutboundTransport()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); NT_ASSERT(ppInjectionData); NT_ASSERT(pProxyData); @@ -762,13 +762,13 @@ NTSTATUS PerformProxyInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppClassif if(pProxyData->flags & PCPDF_PROXY_REMOTE_PORT) { FWP_VALUE remotePort; - + RtlZeroMemory(&remotePort, sizeof(FWP_VALUE)); - + remotePort.type = FWP_UINT16; remotePort.uint16 = pProxyData->proxyRemotePort; - + switch(protocol) { case IPPROTO_TCP: @@ -782,7 +782,7 @@ NTSTATUS PerformProxyInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppClassif status = KrnlHlprTCPHeaderModifyDestinationPort(&remotePort, pNetBufferList, tcpHeaderSize); - + break; } case IPPROTO_UDP: @@ -796,7 +796,7 @@ NTSTATUS PerformProxyInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppClassif status = KrnlHlprUDPHeaderModifyDestinationPort(&remotePort, pNetBufferList, udpHeaderSize); - + break; } } @@ -858,21 +858,21 @@ NTSTATUS PerformProxyInjectionAtOutboundTransport(_In_ CLASSIFY_DATA** ppClassif } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PerformProxyInjectionAtOutboundTransport() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @private_function="ProxyUsingInjectionMethodDeferredProcedureCall" - - Purpose: Invokes the appropriate private injection routine to perform the injection at + + Purpose: Invokes the appropriate private injection routine to perform the injection at DISPATCH_LEVEL.

Notes:
@@ -888,13 +888,13 @@ VOID ProxyUsingInjectionMethodDeferredProcedureCall(_In_ KDPC* pDPC, _In_opt_ PVOID pArg2) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> BasicPacketInjectionDeferredProcedureCall()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDPC); UNREFERENCED_PARAMETER(pContext); UNREFERENCED_PARAMETER(pArg2); @@ -937,19 +937,19 @@ VOID ProxyUsingInjectionMethodDeferredProcedureCall(_In_ KDPC* pDPC, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- ProxyUsingInjectionMethodDeferredProcedureCall()\n"); #endif /// DBG - + return; } /** @private_function="ProxyUsingInjectionMethodWorkItemRoutine" - + Purpose:

Notes:
@@ -963,13 +963,13 @@ VOID ProxyUsingInjectionMethodWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _In_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> ProxyUsingInjectionMethodWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -1009,19 +1009,19 @@ VOID ProxyUsingInjectionMethodWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- ProxyUsingInjectionMethodWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @private_function="TriggerProxyInjectionInline" - + Purpose:

Notes:
@@ -1043,13 +1043,13 @@ NTSTATUS TriggerProxyInjectionInline(_In_ const FWPS_INCOMING_VALUES* pClassifyV _In_ PC_PROXY_DATA* pProxyData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> TriggerProxyInjectionInline()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); NT_ASSERT(pNetBufferList); @@ -1103,20 +1103,20 @@ NTSTATUS TriggerProxyInjectionInline(_In_ const FWPS_INCOMING_VALUES* pClassifyV HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- TriggerProxyInjectionInline() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @private_function="TriggerProxyInjectionOutOfBand" - + Purpose:

Notes:
@@ -1138,13 +1138,13 @@ NTSTATUS TriggerProxyInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES* pClassi _In_ PC_PROXY_DATA* pPCData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> TriggerProxyInjectionOutOfBand()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); NT_ASSERT(pNetBufferList); @@ -1201,14 +1201,14 @@ NTSTATUS TriggerProxyInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES* pClassi } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- TriggerProxyInjectionOutOfBand() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -1219,7 +1219,7 @@ NTSTATUS TriggerProxyInjectionOutOfBand(_In_ const FWPS_INCOMING_VALUES* pClassi /** @private_function="PerformProxySocketRedirection" - + Purpose:

Notes:
@@ -1237,13 +1237,13 @@ NTSTATUS PerformProxySocketRedirection(_In_ CLASSIFY_DATA** ppClassifyData, _Inout_ REDIRECT_DATA** ppRedirectData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PerformProxySocketRedirection()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); NT_ASSERT(ppRedirectData); NT_ASSERT((*ppRedirectData)->pWritableLayerData); @@ -1254,7 +1254,7 @@ NTSTATUS PerformProxySocketRedirection(_In_ CLASSIFY_DATA** ppClassifyData, FWPS_INCOMING_VALUES* pClassifyValues = (FWPS_INCOMING_VALUES*)(*ppClassifyData)->pClassifyValues; FWP_VALUE* pProtocolValue = 0; UINT8 ipProtocol = 0; - + pProtocolValue = KrnlHlprFwpValueGetFromFwpsIncomingValues(pClassifyValues, &FWPM_CONDITION_IP_PROTOCOL); if(pProtocolValue) @@ -1285,20 +1285,20 @@ NTSTATUS PerformProxySocketRedirection(_In_ CLASSIFY_DATA** ppClassifyData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PerformProxySocketRedirection() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @private_function="PerformProxyConnectRedirection" - + Purpose:

Notes:
@@ -1316,13 +1316,13 @@ NTSTATUS PerformProxyConnectRedirection(_In_ CLASSIFY_DATA** ppClassifyData, _Inout_ REDIRECT_DATA** ppRedirectData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PerformProxyConnectRedirection()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); NT_ASSERT(ppRedirectData); NT_ASSERT(*ppClassifyData); @@ -1371,13 +1371,13 @@ NTSTATUS PerformProxyConnectRedirection(_In_ CLASSIFY_DATA** ppClassifyData, if(pProtocolValue) ipProtocol = pProtocolValue->uint8; - /// For non-TCP, this setting will not be enforced being that local redirection of this tuple is only + /// For non-TCP, this setting will not be enforced being that local redirection of this tuple is only /// available during bind time. and ideally redirection should be performed using ALE_BIND_REDIRECT instead. if((*ppRedirectData)->pProxyData->flags & PCPDF_PROXY_LOCAL_ADDRESS) INETADDR_SET_ADDRESS((PSOCKADDR)&(pConnectRequest->localAddressAndPort), (*ppRedirectData)->pProxyData->proxyLocalAddress.pBytes); - /// For non-TCP, this setting will not be enforced being that local redirection of this tuple is only + /// For non-TCP, this setting will not be enforced being that local redirection of this tuple is only /// available during bind time. and ideally redirection should be performed using ALE_BIND_REDIRECT instead. if((*ppRedirectData)->pProxyData->flags & PCPDF_PROXY_LOCAL_PORT) INETADDR_SET_PORT((PSOCKADDR)&(pConnectRequest->localAddressAndPort), @@ -1438,14 +1438,14 @@ NTSTATUS PerformProxyConnectRedirection(_In_ CLASSIFY_DATA** ppClassifyData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PerformProxyConnectRedirection() [status:%#x]\n", status); #endif /// DBG - + return status; } @@ -1453,7 +1453,7 @@ NTSTATUS PerformProxyConnectRedirection(_In_ CLASSIFY_DATA** ppClassifyData, /** @private_function="ProxyByALERedirectDeferredProcedureCall" - + Purpose: Invokes the appropriate private redirection routine to at DISPATCH_LEVEL.

Notes:
@@ -1491,7 +1491,7 @@ VOID ProxyByALERedirectDeferredProcedureCall(_In_ KDPC* pDPC, { NTSTATUS status = STATUS_SUCCESS; FWPS_INCOMING_VALUES* pClassifyValues = (FWPS_INCOMING_VALUES*)pDPCData->pClassifyData->pClassifyValues; - + if(pClassifyValues->layerId == FWPS_LAYER_ALE_CONNECT_REDIRECT_V4 || pClassifyValues->layerId == FWPS_LAYER_ALE_CONNECT_REDIRECT_V6) status = PerformProxyConnectRedirection(&(pDPCData->pClassifyData), @@ -1500,7 +1500,7 @@ VOID ProxyByALERedirectDeferredProcedureCall(_In_ KDPC* pDPC, pClassifyValues->layerId == FWPS_LAYER_ALE_BIND_REDIRECT_V6) status = PerformProxySocketRedirection(&(pDPCData->pClassifyData), &(pDPCData->pRedirectData)); - + if(status != STATUS_SUCCESS) DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, @@ -1523,7 +1523,7 @@ VOID ProxyByALERedirectDeferredProcedureCall(_In_ KDPC* pDPC, /** @private_function="ProxyByALERedirectWorkItemRoutine" - + Purpose:

Notes:
@@ -1537,13 +1537,13 @@ VOID ProxyByALERedirectWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _In_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> ProxyByALERedirectWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -1577,19 +1577,19 @@ VOID ProxyByALERedirectWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- ProxyUsingInjectionMethodWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @private_function="TriggerProxyByALERedirectInline" - + Purpose:

Notes:
@@ -1610,13 +1610,13 @@ NTSTATUS TriggerProxyByALERedirectInline(_In_ const FWPS_INCOMING_VALUES* pClass _Inout_ REDIRECT_DATA** ppRedirectData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> TriggerProxyByALERedirectInline()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); NT_ASSERT(pLayerData); @@ -1659,20 +1659,20 @@ NTSTATUS TriggerProxyByALERedirectInline(_In_ const FWPS_INCOMING_VALUES* pClass WFPSAMPLER_CALLOUT_DRIVER_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- TriggerProxyByALERedirectInline() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @private_function="TriggerProxyByALERedirectOutOfBand" - + Purpose:

Notes:
@@ -1694,13 +1694,13 @@ NTSTATUS TriggerProxyByALERedirectOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCl _Inout_ REDIRECT_DATA* pRedirectData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> TriggerProxyByALERedirectOutOfBand()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); NT_ASSERT(pLayerData); @@ -1756,7 +1756,7 @@ NTSTATUS TriggerProxyByALERedirectOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCl status = KrnlHlprThreadedDPCQueue(ProxyByALERedirectDeferredProcedureCall, pClassifyData, pRedirectData, - 0); + 0); else status = KrnlHlprDPCQueue(ProxyByALERedirectDeferredProcedureCall, pClassifyData, @@ -1772,20 +1772,20 @@ NTSTATUS TriggerProxyByALERedirectOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCl } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- TriggerProxyByALERedirectOutOfBand() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @classify_function="ClassifyProxyByALERedirect" - + Purpose:

Notes: Applies to the following layers:
@@ -1794,11 +1794,11 @@ NTSTATUS TriggerProxyByALERedirectOutOfBand(_In_ const FWPS_INCOMING_VALUES* pCl FWPM_LAYER_ALE_REDIRECT_CONNECT_V4
FWPM_LAYER_ALE_REDIRECT_CONNECT_V6

- Microsoft recommends using FWPM_LAYER_STREAM_V{4/6} rather than proxying network - data to a local service. Doing so will make for a better ecosystem, however if you - feel you must proxy, then it is advised to use - FWPM_LAYER_ALE_REDIRECT_CONNECT_V{4/6}, and have the proxy service call the - REDIRECT_RECORD IOCTLs so multiple proxies can coexst without losing data on the + Microsoft recommends using FWPM_LAYER_STREAM_V{4/6} rather than proxying network + data to a local service. Doing so will make for a better ecosystem, however if you + feel you must proxy, then it is advised to use + FWPM_LAYER_ALE_REDIRECT_CONNECT_V{4/6}, and have the proxy service call the + REDIRECT_RECORD IOCTLs so multiple proxies can coexst without losing data on the origin of the data.

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Hardware/FF551229.aspx
@@ -1904,18 +1904,18 @@ VOID NTAPI ClassifyProxyByALERedirect(_In_ const FWPS_INCOMING_VALUES* pClassify #pragma warning(push) #pragma warning(disable: 6014) /// pRedirectData will be freed in completionFn using ProxyInjectionCompletionDataDestroy - + status = KrnlHlprRedirectDataCreate(&pRedirectData, pClassifyContext, pFilter, pClassifyOut, *(g_WFPSamplerDeviceData.ppRedirectionHandles[index])); HLPR_BAIL_ON_FAILURE(status); - + #pragma warning(pop) /// FWP_CONDITION_FLAG_IS_REAUTHORIZE will be set if: - /// 1) a callout with a higher priority completed its pended classification and the current + /// 1) a callout with a higher priority completed its pended classification and the current /// callout is seeing the connection for the first time /// 2) FWPS_CLASSIFY_FLAG_REAUTHORIZE_IF_MODIFIED_BY_OTHERS was set when calling FwpsApplyModifiedLayerData /// and another callout has further redirected the initial connection. @@ -1957,7 +1957,7 @@ VOID NTAPI ClassifyProxyByALERedirect(_In_ const FWPS_INCOMING_VALUES* pClassify else { - /// No more redirection if someone else has done it locally. We could catch the new + /// No more redirection if someone else has done it locally. We could catch the new /// connection from their proxy if we really must act on it. /// Set the rights to write back as it was removed when acquiring the layer data if(pConnectRequest->localRedirectHandle) @@ -1972,7 +1972,7 @@ VOID NTAPI ClassifyProxyByALERedirect(_In_ const FWPS_INCOMING_VALUES* pClassify } #endif /// (NTDDI_VERSION >= NTDDI_WIN8) - + } } @@ -2067,7 +2067,7 @@ VOID NTAPI ClassifyProxyByALERedirect(_In_ const FWPS_INCOMING_VALUES* pClassify /** @classify_function="ClassifyProxyByInjection" - + Purpose:

Notes:
@@ -2138,12 +2138,12 @@ VOID NTAPI ClassifyProxyByInjection(_In_ const FWPS_INCOMING_VALUES* pClassifyVa DPFLTR_ERROR_LEVEL, " !!!! ClassifyProxyByInjection: NdisRetreatNetBufferDataStart() [status: %#x]\n", status); - + HLPR_BAIL; } version = KrnlHlprIPHeaderGetVersionField((NET_BUFFER_LIST*)pNetBufferList); - + protocol = KrnlHlprIPHeaderGetProtocolField((NET_BUFFER_LIST*)pNetBufferList, version == IPV4 ? AF_INET : AF_INET6); @@ -2248,7 +2248,7 @@ VOID NTAPI ClassifyProxyByInjection(_In_ const FWPS_INCOMING_VALUES* pClassifyVa /** @classify_function="ClassifyProxyByALE" - + Purpose: Stub function for downlevel OS's trying to use uplevel functionality.

Notes:
@@ -2303,7 +2303,7 @@ VOID NTAPI ClassifyProxyByALERedirect(_In_ const FWPS_INCOMING_VALUES* pClassify /** @classify_function="ClassifyProxyByInjection" - + Purpose:

Notes:
@@ -2334,7 +2334,7 @@ VOID NTAPI ClassifyProxyByInjection(_In_ const FWPS_INCOMING_VALUES* pClassifyVa NT_ASSERT(pFilter->providerContext->dataBuffer); NT_ASSERT(pFilter->providerContext->dataBuffer->data); NT_ASSERT(pFilter->providerContext->dataBuffer->size == sizeof(PC_PROXY_DATA)); - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> ClassifyProxyByInjection() [Layer: %s][FilterID: %#I64x][Rights: %#x]", diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.h b/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.h index 378b7eb48..c6fee0005 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.h +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.h @@ -6,7 +6,7 @@ // ClassifyFunctions_ProxyCallouts.cpp // // Abstract: -// This module contains prototypes for WFP Classify functions for proxying connections and +// This module contains prototypes for WFP Classify functions for proxying connections and // sockets. // // Author: diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp index cccaf200a..fb144a508 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_AdvancedPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for injecting packets back into the data path +// This module contains WFP Completion functions for injecting packets back into the data path // using the allocate / block / inject method. // // Naming Convention: // // -// +// // i.e. // CompleteAdvancedPacketInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// AdvancedPacketInjection - Function demonstrates the allocate / block / +// AdvancedPacketInjection - Function demonstrates the allocate / block / // inject model. // // @@ -51,7 +51,7 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "CompletionFunctions_AdvancedPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if DBG @@ -60,7 +60,7 @@ INJECTION_COUNTERS g_apiTotalCompletions = {0}; /** @function="AdvancedPacketInjectionCountersDecrement" - + Purpose: Decrement the appropriate counters based on the injection handle.

Notes:
@@ -155,7 +155,7 @@ VOID AdvancedPacketInjectionCountersDecrement(_In_ HANDLE injectionHandle, /** @private_function="AdvancedPacketInjectionCompletionDataDestroy" - + Purpose:

Notes:
@@ -172,13 +172,13 @@ VOID AdvancedPacketInjectionCompletionDataDestroy(_Inout_ ADVANCED_PACKET_INJECT _In_ BOOLEAN override) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> AdvancedPacketInjectionCompletionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppCompletionData); NT_ASSERT(*ppCompletionData); @@ -242,7 +242,7 @@ VOID AdvancedPacketInjectionCompletionDataDestroy(_Inout_ ADVANCED_PACKET_INJECT /** @completion_function="CompleteAdvancedPacketInjection" - + Purpose: Cleanup injection objects and memory.

Notes:
diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketInjectionCallouts.cpp index 3b8032fab..79aef3c47 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketInjectionCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_BasicPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for injecting packets back into the data path +// This module contains WFP Completion functions for injecting packets back into the data path // using the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // CompleteBasicPacketInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// BasicPacketInjection - Function demonstrates the clone / block / inject +// BasicPacketInjection - Function demonstrates the clone / block / inject // model. // // @@ -47,7 +47,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, add +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense, add // support for multiple injectors, and enhance traces. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -61,7 +61,7 @@ INJECTION_COUNTERS g_bpiTotalCompletions = {0}; /** @function="BasicPacketInjectionCountersDecrement" - + Purpose: Deccrement the appropriate counters based on the injection handle.

Notes:
@@ -156,7 +156,7 @@ VOID BasicPacketInjectionCountersDecrement(_In_ HANDLE injectionHandle, /** @private_function="BasicPacketInjectionCompletionDataDestroy" - + Purpose:

Notes:
@@ -173,13 +173,13 @@ VOID BasicPacketInjectionCompletionDataDestroy(_Inout_ BASIC_PACKET_INJECTION_CO _In_ BOOLEAN override) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> BasicPacketInjectionCompletionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppCompletionData); NT_ASSERT(*ppCompletionData); @@ -239,7 +239,7 @@ VOID BasicPacketInjectionCompletionDataDestroy(_Inout_ BASIC_PACKET_INJECTION_CO /** @completion_function="CompleteBasicPacketInjection" - + Purpose: Cleanup injection objects and memory.

Notes:
diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp index cd240d4ec..a406abc8d 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_BasicPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for injecting packets back into the data path +// This module contains WFP Completion functions for injecting packets back into the data path // using the clone / block / inject method for modified NBLs. // // Naming Convention: // // -// +// // i.e. // CompleteBasicPacketModification // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// BasicPacketModification - Function demonstrates the clone / block / inject +// BasicPacketModification - Function demonstrates the clone / block / inject // model for modified NBLs. // // @@ -29,7 +29,7 @@ // // // { -// BasicPacketModificationCompletionData - pertains to +// BasicPacketModificationCompletionData - pertains to // BASIC_PACKET_MODIFICATION_COMPLETION_DATA. // } // @@ -48,17 +48,17 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and // enhance traces. // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "CompletionFunctions_BasicPacketModificationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="BasicPacketModificationCompletionDataDestroy" - + Purpose:

Notes:
@@ -75,13 +75,13 @@ VOID BasicPacketModificationCompletionDataDestroy(_Inout_ BASIC_PACKET_MODIFICAT _In_ BOOLEAN override) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> BasicPacketModificationCompletionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppCompletionData); NT_ASSERT(*ppCompletionData); @@ -129,19 +129,19 @@ VOID BasicPacketModificationCompletionDataDestroy(_Inout_ BASIC_PACKET_MODIFICAT } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- BasicPacketModificationCompletionDataDestroy()\n"); #endif /// DBG - + return; } /** @completion_function="CompleteBasicPacketModification" - + Purpose:

Notes:
diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.h b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.h index 4d497a168..9d988718e 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.h +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.h @@ -6,7 +6,7 @@ // CompletionFunctions_BasicPacketModificationCallouts.cpp // // Abstract: -// This module contains prototypes for WFP Completion functions for injecting modified packets +// This module contains prototypes for WFP Completion functions for injecting modified packets // back into the data path using the clone / block / inject method. // // Author: diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp index 7b074c5c0..cfe7251f2 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_BasicStreamInjectionCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for injecting packets back into the stream +// This module contains WFP Completion functions for injecting packets back into the stream // using the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // CompleteBasicStreamInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// BasicStreamInjection - Function demonstrates the clone / block / inject +// BasicStreamInjection - Function demonstrates the clone / block / inject // model. // // @@ -47,7 +47,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -64,13 +64,13 @@ VOID BasicStreamInjectionCompletionDataDestroy(_Inout_ BASIC_STREAM_INJECTION_CO _In_ BOOLEAN override) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> BasicStreamInjectionCompletionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppCompletionData); NT_ASSERT(*ppCompletionData); @@ -99,7 +99,7 @@ VOID BasicStreamInjectionCompletionDataDestroy(_Inout_ BASIC_STREAM_INJECTION_CO KeReleaseSpinLock(&(pCompletionData->spinLock), originalIRQL); - /// Stream indicated each individual NBL from a chain, so wait until the last NBL is indicated + /// Stream indicated each individual NBL from a chain, so wait until the last NBL is indicated /// before removing the completionData. if(pCompletionData->refCount == 0 || override) @@ -109,13 +109,13 @@ VOID BasicStreamInjectionCompletionDataDestroy(_Inout_ BASIC_STREAM_INJECTION_CO } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- BasicStreamInjectionCompletionDataDestroy()\n"); #endif /// DBG - + return; } @@ -127,13 +127,13 @@ VOID NTAPI CompleteBasicStreamInjection(_In_ VOID* pContext, _In_ BOOLEAN dispatchLevel) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> CompleteBasicStreamInjection()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(dispatchLevel); NT_ASSERT(pContext); @@ -151,12 +151,12 @@ VOID NTAPI CompleteBasicStreamInjection(_In_ VOID* pContext, BasicStreamInjectionCompletionDataDestroy((BASIC_STREAM_INJECTION_COMPLETION_DATA**)&pContext); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- CompleteBasicStreamInjection()\n"); #endif /// DBG - + return; } diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.h b/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.h index bcc9432ec..39df87fba 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.h +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.h @@ -6,7 +6,7 @@ // CompletionFunctions_BasicStreamInjectionCallouts.h // // Abstract: -// This module contains WFP Completion functions for injecting packets back into the stream +// This module contains WFP Completion functions for injecting packets back into the stream // using the clone / block / inject method. // // Author: diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_FastPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_FastPacketInjectionCallouts.cpp index 0a2dd0876..de2c7f587 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_FastPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_FastPacketInjectionCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_FastPacketInjectionCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for packets injected back into the data path +// This module contains WFP Completion functions for packets injected back into the data path // using the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // CompleteFastPacketInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// FastPacketInjection - Function demonstrates the clone / block / inject model in the +// FastPacketInjection - Function demonstrates the clone / block / inject model in the // fastest form available (inline, no validation, etc.). // // Private Functions: @@ -42,7 +42,7 @@ /** @completion_function="CompleteFastPacketInjection" - + Purpose:

Notes:
@@ -70,7 +70,7 @@ VOID NTAPI CompleteFastPacketInjection(_In_ VOID* pContext, HLPR_DELETE_ARRAY(pSendParams->remoteAddress, WFPSAMPLER_CALLOUT_DRIVER_TAG); - + HLPR_DELETE(pSendParams, WFPSAMPLER_CALLOUT_DRIVER_TAG); } diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp index 9437f5868..f6a77aa0a 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_FastStreamInjectionCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for data injected back into the stream using +// This module contains WFP Completion functions for data injected back into the stream using // the clone / block / inject method. // // Naming Convention: // // -// +// // i.e. // CompleteFastStreamInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// FastStreamInjection - Function demonstrates the clone / block / inject model in the +// FastStreamInjection - Function demonstrates the clone / block / inject model in the // fastest form available (inline, no validation, etc.). // // Private Functions: @@ -42,7 +42,7 @@ /** @completion_function="CompleteFastStreamInjection" - + Purpose:

Notes:
diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp index 7dd07b783..89350de71 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_PendAuthorizationCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for pended authorizations that inject data +// This module contains WFP Completion functions for pended authorizations that inject data // back into the data path. // // Naming Convention: // // -// +// // i.e. // CompleteBasicPacketInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// PendAuthorization - Function demonstrates the clone / block / inject +// PendAuthorization - Function demonstrates the clone / block / inject // model for pended items. // // @@ -47,17 +47,17 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and // enhance traces. // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "CompletionFunctions_PendAuthorizationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PendAuthorizationCompletionDataDestroy" - + Purpose:

Notes:
@@ -74,13 +74,13 @@ VOID PendAuthorizationCompletionDataDestroy(_Inout_ PEND_AUTHORIZATION_COMPLETIO _In_ BOOLEAN override) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PendAuthorizationCompletionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppCompletionData); NT_ASSERT(*ppCompletionData); @@ -126,19 +126,19 @@ VOID PendAuthorizationCompletionDataDestroy(_Inout_ PEND_AUTHORIZATION_COMPLETIO } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PendAuthorizationCompletionDataDestroy()\n"); #endif /// DBG - + return; } /** @completion_function="CompletePendAuthorization" - + Purpose:

Notes:
diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp index d75279018..6b36d24c2 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp @@ -6,20 +6,20 @@ // CompletionFunctions_ProxyCallouts.cpp // // Abstract: -// This module contains WFP Completion functions for proxied connections using the injection +// This module contains WFP Completion functions for proxied connections using the injection // clone / drop / modify /inject model. // // Naming Convention: // // -// +// // i.e. // CompleteProxyInjection // // // Complete - Function is an FWPS_INJECT_COMPLETE function. // -// ProxyInjection - Function demonstrates the clone / block / modify / inject +// ProxyInjection - Function demonstrates the clone / block / modify / inject // model for proxying. // // @@ -47,17 +47,17 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and // enhance traces. // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "CompletionFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="ProxyCompletionDataDestroy" - + Purpose:

Notes:
@@ -73,13 +73,13 @@ _Success_(*ppCompletionData == 0) VOID ProxyCompletionDataDestroy(_Inout_ PROXY_COMPLETION_DATA** ppCompletionData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> ProxyCompletionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppCompletionData); NT_ASSERT(*ppCompletionData); @@ -113,19 +113,19 @@ VOID ProxyCompletionDataDestroy(_Inout_ PROXY_COMPLETION_DATA** ppCompletionData WFPSAMPLER_CALLOUT_DRIVER_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- ProxyCompletionDataDestroy()\n"); #endif /// DBG - + return; } /** @completion_function="CompleteProxyInjection" - + Purpose:

Notes:
diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.h b/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.h index a3d158cb2..48ee219b0 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.h +++ b/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.h @@ -6,7 +6,7 @@ // CompletionFunctions_ProxyCallouts.cpp // // Abstract: -// This module contains prototypes of WFP Completion functions for proxied connections using +// This module contains prototypes of WFP Completion functions for proxied connections using // the injection clone / drop / modify /inject model. // // Author: diff --git a/network/trans/WFPSampler/sys/Framework_Events.cpp b/network/trans/WFPSampler/sys/Framework_Events.cpp index 8f8001cc6..54722e13c 100644 --- a/network/trans/WFPSampler/sys/Framework_Events.cpp +++ b/network/trans/WFPSampler/sys/Framework_Events.cpp @@ -24,7 +24,7 @@ /** @framework_function="EventDriverUnload" - + Purpose: Callback function responding to Driver Unload Events.

Notes:
@@ -37,23 +37,23 @@ _Function_class_(EVT_WDF_DRIVER_UNLOAD) VOID EventDriverUnload(_In_ WDFDRIVER wdfDriver) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> EventDriverUnload()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(wdfDriver); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- EventDriverUnload()\n"); #endif /// DBG - + WPP_CLEANUP(wdfDriver); return; @@ -61,7 +61,7 @@ VOID EventDriverUnload(_In_ WDFDRIVER wdfDriver) /** @framework_function="EventCleanupDriverObject" - + Purpose: Callback function responding to Driver Cleanup Events.

Notes:
@@ -75,30 +75,30 @@ _Function_class_(EVT_WDF_OBJECT_CONTEXT_CLEANUP) VOID EventCleanupDriverObject(_In_ WDFOBJECT driverObject) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> EventCleanupDriverObject()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(driverObject); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- EventCleanupDriverObject()\n"); #endif /// DBG - + return; } /** @framework_function="EventCleanupDeviceObject" - + Purpose: Callback function responding to Object Cleanup Events.

Notes:
@@ -113,13 +113,13 @@ _Function_class_(EVT_WDF_OBJECT_CONTEXT_CLEANUP) VOID EventCleanupDeviceObject(_In_ WDFOBJECT deviceObject) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> EventCleanupDeviceObject()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(deviceObject); KrnlHlprExposedCalloutsUnregister(); @@ -180,19 +180,19 @@ VOID EventCleanupDeviceObject(_In_ WDFOBJECT deviceObject) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- EventCleanupDeviceObject()\n"); #endif /// DBG - + return; } /** @framework_function="EventIODeviceControl" - + Purpose: Callback function responding to IO Control Events.

Notes:
@@ -210,13 +210,13 @@ VOID EventIODeviceControl(_In_ WDFQUEUE wdfQueue, _In_ ULONG ioControlCode) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> EventIODeviceControl()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(wdfQueue); UNREFERENCED_PARAMETER(wdfRequest); UNREFERENCED_PARAMETER(outputBufferLength); @@ -224,19 +224,19 @@ VOID EventIODeviceControl(_In_ WDFQUEUE wdfQueue, UNREFERENCED_PARAMETER(ioControlCode); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- EventIODeviceControl()\n"); #endif /// DBG - + return; } /** @framework_function="EventIORead" - + Purpose: Callback function responding to IO Read Events.

Notes:
@@ -252,31 +252,31 @@ VOID EventIORead(_In_ WDFQUEUE wdfQueue, _In_ size_t length) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> EventIORead()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(wdfQueue); UNREFERENCED_PARAMETER(wdfRequest); UNREFERENCED_PARAMETER(length); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- EventIORead()\n"); #endif /// DBG - + return; } /** @framework_function="EventIOWrite" - + Purpose: Callback function responding to IO Write Events.

Notes:
@@ -292,24 +292,24 @@ VOID EventIOWrite(_In_ WDFQUEUE wdfQueue, _In_ size_t length) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> EventIOWrite()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(wdfQueue); UNREFERENCED_PARAMETER(wdfRequest); UNREFERENCED_PARAMETER(length); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- EventIOWrite()\n"); #endif /// DBG - + return; } diff --git a/network/trans/WFPSampler/sys/Framework_PowerStates.cpp b/network/trans/WFPSampler/sys/Framework_PowerStates.cpp index c615f8a10..e527e6446 100644 --- a/network/trans/WFPSampler/sys/Framework_PowerStates.cpp +++ b/network/trans/WFPSampler/sys/Framework_PowerStates.cpp @@ -30,7 +30,7 @@ KGUARDED_MUTEX guardedMutex = {0}; references on NBLs, and instead causes the filters to return BLOCK. This should also allow adequate
time to drain currently queued NBLs.

- Notes:
+ Notes:

MSDN_Ref: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nc-wdm-io_workitem_routine
*/ @@ -84,7 +84,7 @@ VOID ActOnPowerStateEnter(_In_ PDEVICE_OBJECT pDeviceObject, Purpose: Passive function to handle exiting a power managed state. When coming out of a power managed state,
register the callouts so normal processing of NBLs will commence.

- Notes:
+ Notes:

MSDN_Ref: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nc-wdm-io_workitem_routine
*/ @@ -134,7 +134,7 @@ VOID ActOnPowerStateExit(_In_ PDEVICE_OBJECT pDeviceObject, /** @framework_function="PowerStateCallback" - + Purpose: Callback which handles various power state transitions for the callout driver.

Notes:
@@ -148,13 +148,13 @@ VOID PowerStateCallback(_In_ VOID* pCallbackContext, _In_ VOID* pEventSpecifics) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PowerStateCallback()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pCallbackContext); if(pPowerStateEvent == (VOID*)PO_CB_SYSTEM_STATE_LOCK) @@ -177,19 +177,19 @@ VOID PowerStateCallback(_In_ VOID* pCallbackContext, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PowerStateCallback()\n"); #endif /// DBG - + return; } /** @framework_function="UnregisterPowerStateChangeCallback" - + Purpose: Unregister a callback that handled notifications of power state changes.

Notes:
@@ -203,13 +203,13 @@ _IRQL_requires_same_ VOID UnregisterPowerStateChangeCallback(_Inout_ DEVICE_EXTENSION* pDeviceExtension) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> UnregisterPowerStateChangeCallback()\n"); #endif /// DBG - + NT_ASSERT(pDeviceExtension); if(pDeviceExtension->pRegistration) @@ -227,19 +227,19 @@ VOID UnregisterPowerStateChangeCallback(_Inout_ DEVICE_EXTENSION* pDeviceExtensi } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- UnregisterPowerStateChangeCallback()\n"); #endif /// DBG - + return; } /** @framework_function="RegisterPowerStateChangeCallback" - + Purpose: Create and register a callback to handle notifications of power state changes.

Notes:
@@ -254,13 +254,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS RegisterPowerStateChangeCallback(_Inout_ DEVICE_EXTENSION* pDeviceExtension) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> RegisterPowerStateChangeCallback()\n"); #endif /// DBG - + NT_ASSERT(pDeviceExtension); NTSTATUS status = STATUS_SUCCESS; @@ -299,13 +299,13 @@ NTSTATUS RegisterPowerStateChangeCallback(_Inout_ DEVICE_EXTENSION* pDeviceExten HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- RegisterPowerStateChangeCallback() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.cpp b/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.cpp index 88369c815..7bc1e022c 100644 --- a/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.cpp +++ b/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.cpp @@ -14,8 +14,8 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for multiple injectors and redirectors, and -// add support for serializing asynchronous +// December 13, 2013 - 1.1 - Add support for multiple injectors and redirectors, and +// add support for serializing asynchronous // FWPM_LAYER_STREAM injections // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -126,7 +126,7 @@ NTSTATUS PrvFwpmBfeStateSubscribeChanges() status); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvFwpmBfeStateSubscribeChanges() [status: %#x]\n", @@ -139,7 +139,7 @@ NTSTATUS PrvFwpmBfeStateSubscribeChanges() /** @private_function="PrvWFPSamplerDeviceDataPopulate" - + Purpose: Register the global WFP objects such as:
Callouts

@@ -154,13 +154,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS PrvWFPSamplerFwpObjectsAddGlobal(_In_ WFPSAMPLER_DEVICE_DATA* pDeviceData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvWFPSamplerFwpObjectsAddGlobal()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceData); NT_ASSERT(pDeviceData); @@ -178,20 +178,20 @@ NTSTATUS PrvWFPSamplerFwpObjectsAddGlobal(_In_ WFPSAMPLER_DEVICE_DATA* pDeviceDa HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvWFPSamplerFwpObjectsAddGlobal() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @private_function="PrvWFPSamplerDeviceDataPopulate" - + Purpose: Populate the deviceData with the BFE engineHandle and various injection handles.

Notes:
@@ -205,13 +205,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS PrvWFPSamplerDeviceDataPopulate(_Inout_ WFPSAMPLER_DEVICE_DATA* pDeviceData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvWFPSamplerDeviceDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pDeviceData); NTSTATUS status = STATUS_SUCCESS; @@ -222,7 +222,7 @@ NTSTATUS PrvWFPSamplerDeviceDataPopulate(_Inout_ WFPSAMPLER_DEVICE_DATA* pDevice HLPR_BAIL_ON_FAILURE(status); } - /// There are injection handles for each of the supported sublayers that allow injection. This + /// There are injection handles for each of the supported sublayers that allow injection. This /// allows us to do multiple injectors in the layer provided that the callouts are in different /// sublayers. for(UINT32 index = 0; @@ -329,7 +329,7 @@ NTSTATUS PrvWFPSamplerDeviceDataPopulate(_Inout_ WFPSAMPLER_DEVICE_DATA* pDevice DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvWFPSamplerDeviceDataPopulate()\n"); - + #endif /// DBG return status; @@ -337,7 +337,7 @@ NTSTATUS PrvWFPSamplerDeviceDataPopulate(_Inout_ WFPSAMPLER_DEVICE_DATA* pDevice /** @private_function="PrvDriverDeviceAdd" - + Purpose: Add the device and configure initial WFP callout driver settings.

Notes:
@@ -356,13 +356,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS PrvDriverDeviceAdd(_In_ WDFDRIVER* pWDFDriver) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvDriverDeviceAdd()\n"); #endif /// DBG - + NT_ASSERT(pWDFDriver); NTSTATUS status = STATUS_SUCCESS; @@ -384,7 +384,7 @@ NTSTATUS PrvDriverDeviceAdd(_In_ WDFDRIVER* pWDFDriver) " !!!! PrvDriverDeviceAdd : WdfControlDeviceInitAllocate() [status: %#x]\n", status); - HLPR_BAIL; + HLPR_BAIL; } WdfDeviceInitSetDeviceType(pWDFDeviceInit, @@ -451,20 +451,20 @@ NTSTATUS PrvDriverDeviceAdd(_In_ WDFDRIVER* pWDFDriver) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvDriverDeviceAdd() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @framework_function="DriverEntry" - + Purpose: Entry point for the driver.

Notes:
@@ -481,13 +481,13 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT pDriverObject, pRegistryPath); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> DriverEntry()\n"); #endif /// DBG - + NT_ASSERT(pDriverObject); NT_ASSERT(pRegistryPath); @@ -533,7 +533,7 @@ NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT pDriverObject, DPFLTR_INFO_LEVEL, " <--- DriverEntry() [status: %#x]\n", status); - + #endif /// DBG if(status != STATUS_SUCCESS) diff --git a/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.h b/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.h index b89023835..034bb8fe0 100644 --- a/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.h +++ b/network/trans/WFPSampler/sys/Framework_WFPSamplerCalloutDriver.h @@ -14,8 +14,8 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for multiple injectors and redirectors, and -// add structure for serializing asynchronous +// December 13, 2013 - 1.1 - Add support for multiple injectors and redirectors, and +// add structure for serializing asynchronous // FWPM_LAYER_STREAM injections // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.cpp b/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.cpp index 4567b5bd6..f19ba949a 100644 --- a/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.cpp +++ b/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.cpp @@ -14,7 +14,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for ADVANCED_PACKET_INJECTION, +// December 13, 2013 - 1.1 - Add support for ADVANCED_PACKET_INJECTION, // FLOW_ASSOCIATION, and PEND_ENDPOINT_CLOSURE callouts // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -30,13 +30,13 @@ _IRQL_requires_same_ VOID PrvExposedCalloutsUndefine() { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvExposedCalloutsUndefine()\n"); #endif /// DBG - + for(UINT32 calloutIndex = 0; calloutIndex < EXPOSED_CALLOUT_COUNT; calloutIndex++) @@ -46,13 +46,13 @@ VOID PrvExposedCalloutsUndefine() } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvExposedCalloutsUndefine()\n"); #endif /// DBG - + return; } @@ -63,13 +63,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS PrvExposedCalloutsDefine() { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvExposedCalloutsDefine()\n"); #endif /// DBG - + NTSTATUS status = 0; UINT32 flags = 0; @@ -281,9 +281,9 @@ NTSTATUS PrvExposedCalloutsDefine() status); #if(NTDDI_VERSION >= NTDDI_WIN7) - + calloutFlags |= FWP_CALLOUT_FLAG_ALLOW_MID_STREAM_INSPECTION; - + #endif /// (NTDDI_VERSION >= NTDDI_WIN7) ppRegisteredCallouts[BASE_INDEX_FSI + fsiIndex]->calloutKey = *(ppFastStreamInjection[fsiIndex]); @@ -382,14 +382,14 @@ NTSTATUS PrvExposedCalloutsDefine() WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(ppRegisteredCallouts[BASE_INDEX_PBA + pbaIndex], status); - + ppRegisteredCallouts[BASE_INDEX_PBA + pbaIndex]->calloutKey = *(ppProxyByALERedirect[pbaIndex]); ppRegisteredCallouts[BASE_INDEX_PBA + pbaIndex]->flags = flags; ppRegisteredCallouts[BASE_INDEX_PBA + pbaIndex]->classifyFn = ClassifyProxyByALERedirect; ppRegisteredCallouts[BASE_INDEX_PBA + pbaIndex]->notifyFn = NotifyProxyByALERedirectNotification; ppRegisteredCallouts[BASE_INDEX_PBA + pbaIndex]->flowDeleteFn = 0; } - + #endif /// (NTDDI_VERSION >= NTDDI_WIN7) HLPR_BAIL_LABEL: @@ -398,14 +398,14 @@ NTSTATUS PrvExposedCalloutsDefine() PrvExposedCalloutsUndefine(); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvExposedCalloutsDefine() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -415,13 +415,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprExposedCalloutsUnregister() { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprExposedCalloutsUnregister()\n"); #endif /// DBG - + NTSTATUS status = STATUS_SUCCESS; for(UINT32 calloutIndex = 0; @@ -450,14 +450,14 @@ NTSTATUS KrnlHlprExposedCalloutsUnregister() PrvExposedCalloutsUndefine(); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprExposedCalloutsUnregister() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -467,13 +467,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprExposedCalloutsRegister() { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprExposedCalloutsRegister()\n"); #endif /// DBG - + NTSTATUS status = STATUS_SUCCESS; status = PrvExposedCalloutsDefine(); @@ -508,14 +508,14 @@ NTSTATUS KrnlHlprExposedCalloutsRegister() KrnlHlprExposedCalloutsUnregister(); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprExposedCalloutsRegister() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -526,13 +526,13 @@ _Success_(return != 0) PSTR KrnlHlprExposedCalloutToString(_In_ const GUID* pCalloutKey) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprExposedCalloutToString()\n"); #endif /// DBG - + NT_ASSERT(pCalloutKey); PSTR pCalloutString = 0; @@ -1254,12 +1254,12 @@ PSTR KrnlHlprExposedCalloutToString(_In_ const GUID* pCalloutKey) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprExposedCalloutToString()\n"); #endif /// DBG - + return pCalloutString; } diff --git a/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.h b/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.h index eb2e4f03e..5296f9580 100644 --- a/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.h +++ b/network/trans/WFPSampler/sys/HelperFunctions_ExposedCallouts.h @@ -14,7 +14,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for ADVANCED_PACKET_INJECTION, +// December 13, 2013 - 1.1 - Add support for ADVANCED_PACKET_INJECTION, // FLOW_ASSOCIATION, and PEND_ENDPOINT_CLOSURE callouts // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -215,10 +215,10 @@ static const GUID* const ppBasicActionContinue[] = {&WFPSAMPLER_CALLOUT_BA &WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_INGRESS_VSWITCH_TRANSPORT_V6, &WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRANSPORT_V4, &WFPSAMPLER_CALLOUT_BASIC_ACTION_CONTINUE_AT_EGRESS_VSWITCH_TRANSPORT_V6, - + #endif // (NTDDI_VERSION >= NTDDI_WIN8) #endif // (NTDDI_VERSION >= NTDDI_WIN7) - + }; static const GUID* const ppBasicActionPermit[] = {&WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V4, &WFPSAMPLER_CALLOUT_BASIC_ACTION_PERMIT_AT_INBOUND_IPPACKET_V6, diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp index badbe8065..8ff7d2413 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyAdvancedNotification @@ -31,12 +31,12 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "NotifyFunctions_AdvancedCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvAdvancedNotificationWorkItemRoutine" - + Purpose: Traces the appropriate notification event.

Notes:
@@ -50,13 +50,13 @@ VOID PrvAdvancedNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _Inout_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvAdvancedNotificationWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -141,19 +141,19 @@ VOID PrvAdvancedNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvAdvancedNotificationWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @notify_function="NotifyAdvancedNotification" - + Purpose: Traces the notification event.

Notes:
diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.h b/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.h index ae26242ab..76ea0b372 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.h @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyAdvancedNotification diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp index 3893d7d11..7deed3a42 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyBasicNotification @@ -28,17 +28,17 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and // improve traces // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "NotifyFunctions_BasicCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvBasicNotificationWorkItemRoutine" - + Purpose: Traces the appropriate notification event.

Notes:
@@ -52,13 +52,13 @@ VOID PrvBasicNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _Inout_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvBasicNotificationWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -143,19 +143,19 @@ VOID PrvBasicNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvBasicNotificationWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @notify_function="NotifyBasicNotification" - + Purpose: Traces the notification event.

Notes:
diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.h b/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.h index 58b11fa2d..b733be5d9 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.h @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyBasicNotification diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp index e7addba74..93edb3297 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyBasicNotification @@ -28,17 +28,17 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and // improve traces // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "NotifyFunctions_FastCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvFastNotificationWorkItemRoutine" - + Purpose: Traces the appropriate notification event.

Notes:
@@ -144,7 +144,7 @@ VOID PrvFastNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvFastNotificationWorkItemRoutine()\n"); @@ -156,7 +156,7 @@ VOID PrvFastNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, /** @notify_function="NotifyFastNotification" - + Purpose: Traces the notification event.

Notes:
diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.h b/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.h index 96c816b43..dad5fafb7 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.h @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyFastNotification diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp index ab320f622..02e7ef607 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // FlowDeleteNotification @@ -72,7 +72,7 @@ VOID NTAPI NotifyFlowDeleteNotification(_In_ UINT16 layerID, KeAcquireSpinLock(&(pFlowContext->pALEEndpointClosureContext->spinLock), &irql); - + KrnlHlprPendDataDestroy(&pPendData); KeReleaseSpinLock(&(pFlowContext->pALEEndpointClosureContext->spinLock), diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.h b/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.h index faba5b104..bebaf23c7 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.h @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyFlowDeleteNotification diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_Include.h b/network/trans/WFPSampler/sys/NotifyFunctions_Include.h index 48c17b343..c5ce6749f 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_Include.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_Include.h @@ -20,7 +20,7 @@ // NotifyFunctions_FlowDelete.h, and replace // NotifyFunctions_PendAuthorizationCallouts.h, with // NotifyFunctions_PendCallouts.h -// +// //////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef NOTIFY_INCLUDE_H diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp index 1cc2913fb..3d9d3822d 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyPendNotification @@ -19,7 +19,7 @@ // // Notify - Function is an FWPS_CALLOUT_NOTIFY_FN // -// PendNotification - Function demonstates use of notifications for callouts +// PendNotification - Function demonstates use of notifications for callouts // pending authorization or endpoint closure requests. // // Author: @@ -28,7 +28,7 @@ // Revision History: // // [ Month ][Day] [Year] - [Revision]-[ Comments ] -// December 13, 2013 - 1.1 - Creation +// December 13, 2013 - 1.1 - Creation // (replaces NotifyFuncitons_PendAuthorizationCallouts.cpp) // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -38,7 +38,7 @@ /** @private_function="PrvPendNotificationWorkItemRoutine" - + Purpose: Traces the appropriate notification event.

Notes:
@@ -52,13 +52,13 @@ VOID PrvPendNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, _Inout_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvPendNotificationWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -96,7 +96,7 @@ VOID PrvPendNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, pCallout->applicableLayer != FWPM_LAYER_ALE_AUTH_CONNECT_V4 && pCallout->applicableLayer != FWPM_LAYER_ALE_AUTH_CONNECT_V6 && pCallout->applicableLayer != FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4 && - pCallout->applicableLayer != FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V6 + pCallout->applicableLayer != FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V6 #if(NTDDI_VERSION >= NTDDI_WIN7) @@ -175,19 +175,19 @@ VOID PrvPendNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDeviceObject, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvPendNotificationWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @notify_function="NotifyPendNotification" - + Purpose: Traces the notification event.

Notes:
diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.h b/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.h index 6b2554caa..e01dbf6fd 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.h @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyPendNotification @@ -19,7 +19,7 @@ // // Notify - Function is located in sys\NotifyFunctions\ // -// PendNotification - Function demonstates use of notifications for callouts +// PendNotification - Function demonstates use of notifications for callouts // pending authorization or endpoint closure requests. // // Author: @@ -28,7 +28,7 @@ // Revision History: // // [ Month ][Day] [Year] - [Revision]-[ Comments ] -// December 13, 2013 - 1.1 - Creation +// December 13, 2013 - 1.1 - Creation // (replaces NotifyFuncitons_PendAuthorizationCallouts.h) // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp index b11d8569f..1eb4e14ea 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // NotifyProxyByALERedirectNotification @@ -19,7 +19,7 @@ // // Notify - Function is an FWPS_CALLOUT_NOTIFY_FN // -// ProxyByALERedirectNotification - Function demonstates use of notifications for +// ProxyByALERedirectNotification - Function demonstates use of notifications for // callouts using WFP's REDIRECT layers // // Author: @@ -29,19 +29,19 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and +// December 13, 2013 - 1.1 - Enhance function declaration for IntelliSense and // improve traces // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "Framework_WFPSamplerCalloutDriver.h" /// . +#include "Framework_WFPSamplerCalloutDriver.h" /// . #include "NotifyFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN7) /** @private_function="PrvProxyByALERedirectNotificationWorkItemRoutine" - + Purpose: Traces the appropriate notification event.

Notes:
@@ -55,13 +55,13 @@ VOID PrvProxyByALERedirectNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDevic _Inout_opt_ PVOID pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvProxyByALERedirectNotificationWorkItemRoutine()\n"); #endif /// DBG - + UNREFERENCED_PARAMETER(pDeviceObject); NT_ASSERT(pContext); @@ -164,19 +164,19 @@ VOID PrvProxyByALERedirectNotificationWorkItemRoutine(_In_ PDEVICE_OBJECT pDevic } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvProxyByALERedirectNotificationWorkItemRoutine()\n"); #endif /// DBG - + return; } /** @notify_function="NotifyProxyByALERedirectNotification" - + Purpose: Traces the notification event.

Notes:
diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.h b/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.h index b410eacc3..4b94ff174 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.h +++ b/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.h @@ -6,13 +6,13 @@ // NotifyFunctions_ProxyCallouts.h // // Abstract: -// This module contains prototypes of WFP Notify functions for the proxy callouts using WFP's +// This module contains prototypes of WFP Notify functions for the proxy callouts using WFP's // REDIRECT layers. // // Naming Convention: // // -// +// // i.e. // // NotifyProxyByALERedirectNotification @@ -20,7 +20,7 @@ // // Notify - Function is an FWPS_CALLOUT_NOTIFY_FN // -// ProxyByALERedirectNotification - Function demonstates use of notifications for +// ProxyByALERedirectNotification - Function demonstates use of notifications for // callouts using WFP's REDIRECT layers // // Author: diff --git a/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp b/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp index 52e0b36bc..6783afc1c 100644 --- a/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp +++ b/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // SubscriptionBFEStateChangeCallback @@ -19,7 +19,7 @@ // // Subscription - Function pertains to a subscription. // -// BFEStateChangeCallback - Function demonstates use of the BFE service state change +// BFEStateChangeCallback - Function demonstates use of the BFE service state change // callback. // // Author: @@ -38,8 +38,8 @@ /** @notify_function="SubscriptionBFEStateChangeCallback" - - Purpose: Callback, invoked on BFE service state change, which will get or release a handle + + Purpose: Callback, invoked on BFE service state change, which will get or release a handle to the engine.

Notes:
@@ -58,7 +58,7 @@ VOID CALLBACK SubscriptionBFEStateChangeCallback(_Inout_ VOID* pContext, " ---> SubscriptionBFEStateChangeCallback()\n"); #endif /// DBG - + NT_ASSERT(pContext); NTSTATUS status = STATUS_SUCCESS; diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp index 8ee9072c7..af4b9d376 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprClassifyDataCreateLocalCopy @@ -56,7 +56,7 @@ INT64 g_OutstandingNBLReferences = 0; /** @kernel_helper_function="KrnlHlprClassifyDataReleaseLocalCopy" - + Purpose: Release reference on NBLs and cleanup a local copy of a CLASSIFY_DATA.

Notes:
@@ -76,7 +76,7 @@ VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData) " ---> KrnlHlprClassifyDataReleaseLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pClassifyData); KrnlHlprFwpsClassifyOutDestroyLocalCopy((FWPS_CLASSIFY_OUT**)&(pClassifyData->pClassifyOut)); @@ -86,10 +86,10 @@ VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData) KrnlHlprFwpsFilterDestroyLocalCopy((FWPS_FILTER**)&(pClassifyData->pFilter)); #if(NTDDI_VERSION >= NTDDI_WIN7) - + if(pClassifyData->classifyContextHandle) FwpsReleaseClassifyHandle(pClassifyData->classifyContextHandle); - + #endif /// (NTDDI_VERSION >= NTDDI_WIN7) if(pClassifyData->pPacket) @@ -154,19 +154,19 @@ VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData) sizeof(CLASSIFY_DATA)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprClassifyDataReleaseLocalCopy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprClassifyDataDestroyLocalCopy" - + Purpose: Release reference on packet and cleanup and free a local copy of CLASSIFY_DATA.

Notes:
@@ -182,13 +182,13 @@ _Success_(*ppClassifyData == 0) VOID KrnlHlprClassifyDataDestroyLocalCopy(_Inout_ CLASSIFY_DATA** ppClassifyData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprClassifyDataDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); if(*ppClassifyData) @@ -200,21 +200,21 @@ VOID KrnlHlprClassifyDataDestroyLocalCopy(_Inout_ CLASSIFY_DATA** ppClassifyData } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprClassifyDataDestroyLocalCopy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprClassifyDataAcquireLocalCopy" - - Purpose: Ppopulate a CLASSIFY_DATA with a local copy of data obtained from a - callout's classification. This local copy requiires taking a reference + + Purpose: Ppopulate a CLASSIFY_DATA with a local copy of data obtained from a + callout's classification. This local copy requiires taking a reference on pPacket.

Notes:
@@ -236,13 +236,13 @@ NTSTATUS KrnlHlprClassifyDataAcquireLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyDa _In_ FWPS_CLASSIFY_OUT* pClassifyOut) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprClassifyDataAcquireLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pClassifyData); NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); @@ -347,9 +347,9 @@ NTSTATUS KrnlHlprClassifyDataAcquireLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyDa pClassifyData->pPacket = pPacket; #if DBG - + InterlockedIncrement64((LONG64*)&(g_OutstandingNBLReferences)); - + #endif /// DBG } @@ -357,7 +357,7 @@ NTSTATUS KrnlHlprClassifyDataAcquireLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyDa } #if(NTDDI_VERSION >= NTDDI_WIN7) - + if(pClassifyContext) { /// ClassifyHandle for these layers is obtained in REDIRECT_DATA @@ -373,9 +373,9 @@ NTSTATUS KrnlHlprClassifyDataAcquireLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyDa } } #else - + UNREFERENCED_PARAMETER(pClassifyContext); - + #endif /// (NTDDI_VERSION >= NTDDI_WIN7) if(pFilter) @@ -400,21 +400,21 @@ NTSTATUS KrnlHlprClassifyDataAcquireLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyDa KrnlHlprClassifyDataReleaseLocalCopy(pClassifyData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprClassifyDataAcquireLocalCopy() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprClassifyDataCreateLocalCopy" - - Purpose: Allocate and populate a CLASSIFY_DATA with a local copy of data obtained from a + + Purpose: Allocate and populate a CLASSIFY_DATA with a local copy of data obtained from a callout's classifyFn. This local copy requiires taking a reference on pPacket.

Notes:
@@ -439,13 +439,13 @@ NTSTATUS KrnlHlprClassifyDataCreateLocalCopy(_Outptr_ CLASSIFY_DATA** ppClassify _In_ FWPS_CLASSIFY_OUT* pClassifyOut) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprClassifyDataCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyData); NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); @@ -472,7 +472,7 @@ NTSTATUS KrnlHlprClassifyDataCreateLocalCopy(_Outptr_ CLASSIFY_DATA** ppClassify HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// *ppClassifyData initialized with call to HLPR_NEW & KrnlHlprClassifyDataAcquireLocalCopy +#pragma warning(disable: 6001) /// *ppClassifyData initialized with call to HLPR_NEW & KrnlHlprClassifyDataAcquireLocalCopy if(status != STATUS_SUCCESS && *ppClassifyData) @@ -481,7 +481,7 @@ NTSTATUS KrnlHlprClassifyDataCreateLocalCopy(_Outptr_ CLASSIFY_DATA** ppClassify #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprClassifyDataCreateLocalCopy() [status: %#x]\n", diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp index ad486000a..870106f6a 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprDPCQueue @@ -47,7 +47,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for serializing asynchronous +// December 13, 2013 - 1.1 - Add support for serializing asynchronous // FWPM_LAYER_STREAM injections // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ /** @kernel_helper_function="KrnlHlprDPCDataPurge" - + Purpose: Cleanup a DPC_DATA object.

Notes:
@@ -98,7 +98,7 @@ VOID KrnlHlprDPCDataPurge(_Inout_ DPC_DATA* pDPCData) /** @kernel_helper_function="KrnlHlprDPCDataDestroy" - + Purpose: Cleanup and free a DPC_DATA object.

Notes:
@@ -144,8 +144,8 @@ VOID KrnlHlprDPCDataDestroy(_Inout_ DPC_DATA** ppDPCData) /** @kernel_helper_function="KrnlHlprDPCDataPopulate" - - Purpose: Populates a DPC_DATA object with the classifyData, injectionData, and context + + Purpose: Populates a DPC_DATA object with the classifyData, injectionData, and context supplied.

Notes:
@@ -161,13 +161,13 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pDPCData); NT_ASSERT(pClassifyData); @@ -176,19 +176,19 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, pDPCData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprDPCDataPopulate" - + Purpose: Populates a DPC_DATA object with the classifyData, pendData, and context supplied.

Notes:
@@ -204,13 +204,13 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pDPCData); NT_ASSERT(pClassifyData); NT_ASSERT(pPendData); @@ -220,20 +220,20 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, pDPCData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprDPCDataPopulate" - - Purpose: Populates a DPC_DATA object with the classifyData, redirectData, and context + + Purpose: Populates a DPC_DATA object with the classifyData, redirectData, and context supplied.

Notes:
@@ -249,13 +249,13 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pDPCData); NT_ASSERT(pClassifyData); NT_ASSERT(pRedirectData); @@ -265,19 +265,19 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, pDPCData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprDPCDataPopulate" - + Purpose: Populates a DPC_DATA object with the notifyData and context supplied.

Notes:
@@ -292,13 +292,13 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pDPCData); NT_ASSERT(pNotifyData); @@ -306,19 +306,19 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, pDPCData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprDPCDataPopulate" - + Purpose: Populates a DPC_DATA object with the pendData, and context supplied.

Notes:
@@ -359,8 +359,8 @@ VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, /** @kernel_helper_function="KrnlHlprDPCDataCreate" - - Purpose: Allocates and populates a DPC_DATA object with the KDPC, classifyData, + + Purpose: Allocates and populates a DPC_DATA object with the KDPC, classifyData, injectionData, and context supplied.

Notes:
@@ -381,13 +381,13 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppDPCData); NT_ASSERT(pClassifyData); NT_ASSERT(pInjectionData); @@ -411,21 +411,21 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, KrnlHlprDPCDataDestroy(ppDPCData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprDPCDataCreate" - - Purpose: Allocates and populates a DPC_DATA object with the KDPC, classifyData, pendData, + + Purpose: Allocates and populates a DPC_DATA object with the KDPC, classifyData, pendData, and context supplied.

Notes:
@@ -446,13 +446,13 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppDPCData); NT_ASSERT(pClassifyData); NT_ASSERT(pPendData); @@ -476,21 +476,21 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, KrnlHlprDPCDataDestroy(ppDPCData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprDPCDataCreate" - - Purpose: Allocates and populates a DPC_DATA object with the KDPC, classifyData, + + Purpose: Allocates and populates a DPC_DATA object with the KDPC, classifyData, redirectData, and context supplied.

Notes:
@@ -511,13 +511,13 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppDPCData); NT_ASSERT(pClassifyData); NT_ASSERT(pRedirectData); @@ -541,21 +541,21 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, KrnlHlprDPCDataDestroy(ppDPCData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprDPCDataCreate" - - Purpose: Allocates and populates a DPC_DATA object with the notifyData, KDPC, and context + + Purpose: Allocates and populates a DPC_DATA object with the notifyData, KDPC, and context supplied.

Notes:
@@ -575,13 +575,13 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppDPCData); NT_ASSERT(pNotifyData); @@ -603,21 +603,21 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, KrnlHlprDPCDataDestroy(ppDPCData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprDPCDataCreate" - - Purpose: Allocates and populates a DPC_DATA object with the KDPC, pendData, and context + + Purpose: Allocates and populates a DPC_DATA object with the KDPC, pendData, and context supplied.

Notes:
@@ -678,7 +678,7 @@ NTSTATUS KrnlHlprDPCDataCreate(_Outptr_ DPC_DATA** ppDPCData, /** @kernel_helper_function="KrnlHlprDPCQueue" - + Purpose: Queue a DPC for later execution at DISPATCH_LEVEL.

Notes: Data is expected to be obtained by other means (i.e. LIST_ENTRY)
@@ -696,13 +696,13 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, _In_ BOOLEAN forceProcessor) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprDPCQueue()\n"); #endif /// DBG - + NT_ASSERT(pDPCFn); NTSTATUS status = STATUS_SUCCESS; @@ -729,7 +729,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to HLPR_NEW +#pragma warning(disable: 6001) /// pDPCData initialized with call to HLPR_NEW if(status != STATUS_SUCCESS && pDPCData) @@ -738,21 +738,21 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprDPCQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprDPCQueue" - + Purpose: Queue a DPC for later execution at DISPATCH_LEVEL.

Notes: INJECTION_DATA specific.
@@ -807,7 +807,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate if(status != STATUS_SUCCESS && pDPCData) @@ -829,7 +829,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprDPCQueue" - + Purpose: Queue a DPC for later execution at DISPATCH_LEVEL.

Notes: PEND_DATA specific.
@@ -885,7 +885,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate if(status != STATUS_SUCCESS && pDPCData) @@ -907,7 +907,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprDPCQueue" - + Purpose: Queue a DPC for later execution at DISPATCH_LEVEL.

Notes: REDIRECT_DATA specific.
@@ -934,7 +934,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, " ---> KrnlHlprDPCQueue()\n"); #endif /// DBG - + NT_ASSERT(pDPCFn); NT_ASSERT(pClassifyData); NT_ASSERT(pRedirectData); @@ -963,8 +963,8 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate - +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate + if(status != STATUS_SUCCESS && pDPCData) KrnlHlprDPCDataDestroy(&pDPCData); @@ -985,7 +985,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprDPCQueue" - + Purpose: Queue a DPC for later execution at DISPATCH_LEVEL.

Notes: NOTIFY_DATA specific.
@@ -1060,7 +1060,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprDPCQueue" - + Purpose: Queue a DPC for later execution at DISPATCH_LEVEL.

Notes: PEND_DATA specific.
@@ -1113,7 +1113,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate if(status != STATUS_SUCCESS && pDPCData) @@ -1140,7 +1140,7 @@ NTSTATUS KrnlHlprDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprThreadedDPCQueue" - + Purpose: Queue a threaded DPC for later execution at either PASSIVE_LEVEL or DISPATCH_LEVEL.

Notes: Data is expected to be obtained by other means (i.e. LIST_ENTRY)
@@ -1196,7 +1196,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to HLPR_NEW +#pragma warning(disable: 6001) /// pDPCData initialized with call to HLPR_NEW if(status != STATUS_SUCCESS && pDPCData) @@ -1219,7 +1219,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprThreadedDPCQueue" - + Purpose: Queue a threaded DPC for later execution at either PASSIVE_LEVEL or DISPATCH_LEVEL.

Notes: INJECTION_DATA specific.
@@ -1279,7 +1279,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate if(status != STATUS_SUCCESS && pDPCData) @@ -1301,7 +1301,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprThreadedDPCQueue" - + Purpose: Queue a threaded DPC for later execution at either PASSIVE_LEVEL or DISPATCH_LEVEL.

Notes: PEND_DATA specific.
@@ -1362,7 +1362,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate if(status != STATUS_SUCCESS && pDPCData) @@ -1384,7 +1384,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprThreadedDPCQueue" - + Purpose: Queue a threaded DPC for later execution at either PASSIVE_LEVEL or DISPATCH_LEVEL.

Notes: REDIRECT_DATA specific.
@@ -1468,7 +1468,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprThreadedDPCQueue" - + Purpose: Queue a threaded DPC for later execution at either PASSIVE_LEVEL or DISPATCH_LEVEL.

Notes: NOTIFY_DATA specific.
@@ -1549,7 +1549,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, /** @kernel_helper_function="KrnlHlprThreadedDPCQueue" - + Purpose: Queue a threaded DPC for later execution at either PASSIVE_LEVEL or DISPATCH_LEVEL.

Notes: PEND_DATA specific.
@@ -1607,7 +1607,7 @@ NTSTATUS KrnlHlprThreadedDPCQueue(_In_ KDEFERRED_ROUTINE* pDPCFn, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate +#pragma warning(disable: 6001) /// pDPCData initialized with call to KrnlHlprDPCDataCreate if(status != STATUS_SUCCESS && pDPCData) diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h index 0d334e09f..54a7c6dd8 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h @@ -6,7 +6,7 @@ // HelperFunctions_DeferredProcedureCalls.h // // Abstract: -// This module contains prototypes for kernel helper functions that assist with DPC and +// This module contains prototypes for kernel helper functions that assist with DPC and // threaded DPC routines. // // Author: @@ -16,7 +16,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for serializing asynchronous +// December 13, 2013 - 1.1 - Add support for serializing asynchronous // FWPM_LAYER_STREAM injections // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp index e53a5e333..1c4cd71c9 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprFlowContextCreate @@ -57,10 +57,10 @@ inline NTSTATUS KrnlHlprFlowContextPurge(_Inout_ FLOW_CONTEXT* pFlowContext) " ---> KrnlHlprFlowContextPurge()\n"); #endif /// DBG - + NT_ASSERT(pFlowContext); - NTSTATUS status = STATUS_SUCCESS; + NTSTATUS status = STATUS_SUCCESS; status = FwpsFlowRemoveContext(pFlowContext->flowID, pFlowContext->layerID, @@ -108,13 +108,13 @@ _Success_(return == STATUS_SUCCESS && *ppFlowContext == 0) NTSTATUS KrnlHlprFlowContextDestroy(_Inout_ FLOW_CONTEXT** ppFlowContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFlowContextDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppFlowContext); NTSTATUS status = STATUS_SUCCESS; @@ -161,7 +161,7 @@ NTSTATUS KrnlHlprFlowContextPopulate(_Inout_ FLOW_CONTEXT* pFlowContext, " ---> KrnlHlprFlowContextPopulate()\n"); #endif /// DBG - + NT_ASSERT(pFlowContext); NTSTATUS status = STATUS_SUCCESS; @@ -203,7 +203,7 @@ NTSTATUS KrnlHlprFlowContextPopulate(_Inout_ FLOW_CONTEXT* pFlowContext, WFPSAMPLER_SYSLIB_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(pFlowContext->pStreamContext, status); - + KeInitializeSpinLock(&(pFlowContext->pStreamContext->serializationList.spinLock)); status = WdfWaitLockCreate(WDF_NO_OBJECT_ATTRIBUTES, @@ -214,7 +214,7 @@ NTSTATUS KrnlHlprFlowContextPopulate(_Inout_ FLOW_CONTEXT* pFlowContext, DPFLTR_ERROR_LEVEL, " !!!! KrnlHlprFlowContextCreate : WdfWaitLockCreate() [status: %#x]\n", status); - + HLPR_BAIL; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp index 0b753a574..7befeaa9f 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp @@ -6,13 +6,13 @@ // HelperFunctions\FwpObjects.c // // Abstract: -// This module contains kernel helper functions that allocate, populate, purge, and free WFP +// This module contains kernel helper functions that allocate, populate, purge, and free WFP // structures in memory. // // Naming Convention: // // -// +// // i.e. // // KrnlHlprFwpValueCreateLocalCopy @@ -32,7 +32,7 @@ // FwpsClassifyOut - Function pertains to FWPS_CLASSIFY_OUT objects. // FwpsFilter - Function pertains to FWPS_FILTER objects. // FwpsFilterCondition - Function pertains to FWPS_FILTER_CONDITION objects. -// FwpsIncomingMetadataValues - Function pertains to FWPS_INCOMING_METADATA +// FwpsIncomingMetadataValues - Function pertains to FWPS_INCOMING_METADATA // objects. // FwpsIncomingValues - Function pertains to FWPS_INCOMING_VALUES objects. // FwpsStreamCalloutIOPacket - Function pertains to FWPS_STREAM_DATA objects. @@ -63,12 +63,12 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for multiple injectors, add -// KrnlHlprFwpValueGetStringForFwpsIncomingValue, +// December 13, 2013 - 1.1 - Add support for multiple injectors, add +// KrnlHlprFwpValueGetStringForFwpsIncomingValue, // KrnlHlprFwpsRedirectHandleCreate, // KrnlHlprFwpsRedirecthandleDestroy, -// KrnlHlprFwpsLayerIsDiscard, -// KrnlHlprFwpsLayerIDToString functions, add missing +// KrnlHlprFwpsLayerIsDiscard, +// KrnlHlprFwpsLayerIDToString functions, add missing // conditions, and fix invalid conditions. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -122,7 +122,7 @@ HANDLE g_pRedirectionHandles[2] = {0}; /** @kernel_helper_function="KrnlHlprFwpByteBlobPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_BYTE_BLOB.

Notes:
@@ -135,20 +135,20 @@ _IRQL_requires_same_ VOID KrnlHlprFwpByteBlobPurgeLocalCopy(_Inout_ FWP_BYTE_BLOB* pBlob) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpByteBlobPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pBlob); HLPR_DELETE_ARRAY(pBlob->data, WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpByteBlobPurgeLocalCopy()\n"); @@ -160,7 +160,7 @@ VOID KrnlHlprFwpByteBlobPurgeLocalCopy(_Inout_ FWP_BYTE_BLOB* pBlob) /** @kernel_helper_function="KrnlHlprFwpByteBlobDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_BYTE_BLOB.

Notes:
@@ -176,13 +176,13 @@ _Success_(*ppBlob == 0) VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpByteBlobDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppBlob); if(*ppBlob) @@ -192,7 +192,7 @@ VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob) WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpByteBlobDestroyLocalCopy()\n"); @@ -204,7 +204,7 @@ VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob) /** @kernel_helper_function="KrnlHlprFwpByteBlobPopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_BYTE_BLOB.

Notes: The caller is responsible for freeing any allocated memory using @@ -221,13 +221,13 @@ NTSTATUS KrnlHlprFwpByteBlobPopulateLocalCopy(_In_ const FWP_BYTE_BLOB* pOrigina _Inout_ FWP_BYTE_BLOB* pBlob) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpByteBlobPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalBlob); NT_ASSERT(pBlob); @@ -255,7 +255,7 @@ NTSTATUS KrnlHlprFwpByteBlobPopulateLocalCopy(_In_ const FWP_BYTE_BLOB* pOrigina KrnlHlprFwpByteBlobPurgeLocalCopy(pBlob); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpByteBlobPopulateLocalCopy() [status: %#x]\n", @@ -268,7 +268,7 @@ NTSTATUS KrnlHlprFwpByteBlobPopulateLocalCopy(_In_ const FWP_BYTE_BLOB* pOrigina /** @kernel_helper_function="KrnlHlprFwpByteBlobCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWP_BYTE_BLOB.

Notes: The caller is responsible for freeing the allocated memory using @@ -285,13 +285,13 @@ _Success_(return != 0) FWP_BYTE_BLOB* KrnlHlprFwpByteBlobCreateLocalCopy(_In_ const FWP_BYTE_BLOB* pOriginalBlob) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpByteBlobCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalBlob); NTSTATUS status = STATUS_SUCCESS; @@ -315,14 +315,14 @@ FWP_BYTE_BLOB* KrnlHlprFwpByteBlobCreateLocalCopy(_In_ const FWP_BYTE_BLOB* pOri HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pByteBlob initialized with call to HLPR_NEW & KrnlHlprFwpByteBlobPopulateLocalCopy +#pragma warning(disable: 6001) /// pByteBlob initialized with call to HLPR_NEW & KrnlHlprFwpByteBlobPopulateLocalCopy if(status != STATUS_SUCCESS && pByteBlob) KrnlHlprFwpByteBlobDestroyLocalCopy(&pByteBlob); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpByteBlobCreateLocalCopy() [pByteBlob: %#p]\n", @@ -342,7 +342,7 @@ FWP_BYTE_BLOB* KrnlHlprFwpByteBlobCreateLocalCopy(_In_ const FWP_BYTE_BLOB* pOri /** @kernel_helper_function="KrnlHlprFwpmDisplayDataPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPM_DISPLAY_DATA.

Notes:
@@ -355,13 +355,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmDisplayDataPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pData); HLPR_DELETE_ARRAY(pData->name, @@ -371,7 +371,7 @@ VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData) WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmDisplayDataPurgeLocalCopy()\n"); @@ -383,7 +383,7 @@ VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData) /** @kernel_helper_function="KrnlHlprFwpmDisplayDataDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPM_DISPLAY_DATA.

Notes:
@@ -399,13 +399,13 @@ _Success_(*ppDisplayData == 0) VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDisplayData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmDisplayDataDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppDisplayData); if(*ppDisplayData) @@ -415,7 +415,7 @@ VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDispl WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmDisplayDataDestroyLocalCopy()\n"); @@ -427,7 +427,7 @@ VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDispl /** @kernel_helper_function="KrnlHlprFwpmDisplayDataPopulateLocalCopy" - + Purpose: Populate a local copy of an FWPM_DISPLAY_DATA.

Notes: The caller is responsible for freeing any allocated memory using @@ -444,20 +444,20 @@ NTSTATUS KrnlHlprFwpmDisplayDataPopulateLocalCopy(_In_ const FWPM_DISPLAY_DATA* _Inout_ FWPM_DISPLAY_DATA* pData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmDisplayDataPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalData); NT_ASSERT(pData); NTSTATUS status = STATUS_SUCCESS; KIRQL irql = KeGetCurrentIrql(); size_t nameSize = 0; - size_t descriptionSize = 0; + size_t descriptionSize = 0; if(irql == PASSIVE_LEVEL) { @@ -534,7 +534,7 @@ NTSTATUS KrnlHlprFwpmDisplayDataPopulateLocalCopy(_In_ const FWPM_DISPLAY_DATA* } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmDisplayDataPopulateLocalCopy() [status: %#x]\n", @@ -547,7 +547,7 @@ NTSTATUS KrnlHlprFwpmDisplayDataPopulateLocalCopy(_In_ const FWPM_DISPLAY_DATA* /** @kernel_helper_function="KrnlHlprFwpmDisplayDataCreateLocalCopy" - + Purpose: ALlocate and populate a local copy of an FWPM_DISPLAY_DATA.

Notes: The caller is responsible for freeing any allocated memory using @@ -564,13 +564,13 @@ _Success_(return != 0) FWPM_DISPLAY_DATA* KrnlHlprFwpmDisplayDataCreateLocalCopy(_In_ const FWPM_DISPLAY_DATA* pOriginalDisplayData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmDisplayDataCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalDisplayData); NTSTATUS status = STATUS_SUCCESS; @@ -593,14 +593,14 @@ FWPM_DISPLAY_DATA* KrnlHlprFwpmDisplayDataCreateLocalCopy(_In_ const FWPM_DISPLA HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pDisplayData initialized with call to HLPR_NEW & KrnlHlprFwpmDisplayDataPopulateLocalCopy +#pragma warning(disable: 6001) /// pDisplayData initialized with call to HLPR_NEW & KrnlHlprFwpmDisplayDataPopulateLocalCopy if(status != STATUS_SUCCESS && pDisplayData) KrnlHlprFwpmDisplayDataDestroyLocalCopy(&pDisplayData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmDisplayDataCreateLocalCopy() [pDisplayData: %#p]\n", @@ -620,7 +620,7 @@ FWPM_DISPLAY_DATA* KrnlHlprFwpmDisplayDataCreateLocalCopy(_In_ const FWPM_DISPLA /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPM_CLASSIFY_OPTION.

Notes:
@@ -633,13 +633,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOption) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOption); KrnlHlprFwpValuePurgeLocalCopy(&(pOption->value)); @@ -647,7 +647,7 @@ VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOpt pOption->type = FWP_CLASSIFY_OPTION_MAX; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionPurgeLocalCopy()\n"); @@ -659,7 +659,7 @@ VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOpt /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPM_CLASSIFY_OPTION.

Notes:
@@ -675,13 +675,13 @@ _Success_(*ppOption == 0) VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** ppOption) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppOption); if(*ppOption) @@ -691,7 +691,7 @@ VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** p WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionDestroyLocalCopy()\n"); @@ -703,7 +703,7 @@ VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** p /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionPopulateLocalCopy" - + Purpose: Populate a local copy of an FWPM_CLASSIFY_OPTION.

Notes: The caller is responsible for freeing any allocated memory using @@ -720,13 +720,13 @@ NTSTATUS KrnlHlprFwpmClassifyOptionPopulateLocalCopy(_In_ const FWPM_CLASSIFY_OP _Inout_ FWPM_CLASSIFY_OPTION* pOption) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalOption); NT_ASSERT(pOption); @@ -748,7 +748,7 @@ NTSTATUS KrnlHlprFwpmClassifyOptionPopulateLocalCopy(_In_ const FWPM_CLASSIFY_OP } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionPopulateLocalCopy() [status: %#x]\n", @@ -761,7 +761,7 @@ NTSTATUS KrnlHlprFwpmClassifyOptionPopulateLocalCopy(_In_ const FWPM_CLASSIFY_OP /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWPM_CLASSIFY_OPTION.

Notes: The caller is responsible for freeing any allocated memory using @@ -778,13 +778,13 @@ _Success_(return != 0) FWPM_CLASSIFY_OPTION* KrnlHlprFwpmClassifyOptionCreateLocalCopy(_In_ const FWPM_CLASSIFY_OPTION* pOriginalOption) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionCreateLocalCopy()\n"); #endif /// DBG - + FWPM_CLASSIFY_OPTION* pOption = 0; if(pOriginalOption) @@ -808,14 +808,14 @@ FWPM_CLASSIFY_OPTION* KrnlHlprFwpmClassifyOptionCreateLocalCopy(_In_ const FWPM_ HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pOption initialized with call to HLPR_NEW & KrnlHlprFwpmClassifyOptionPopulateLocalCopy +#pragma warning(disable: 6001) /// pOption initialized with call to HLPR_NEW & KrnlHlprFwpmClassifyOptionPopulateLocalCopy if(status != STATUS_SUCCESS) KrnlHlprFwpmClassifyOptionDestroyLocalCopy(&pOption); } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionCreateLocalCopy() [pOption: %#p]\n", @@ -835,7 +835,7 @@ FWPM_CLASSIFY_OPTION* KrnlHlprFwpmClassifyOptionCreateLocalCopy(_In_ const FWPM_ /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionsPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPM_CLASSIFY_OPTIONS.

Notes:
@@ -848,13 +848,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionsPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOptions); for(UINT32 optionIndex = 0; @@ -865,7 +865,7 @@ VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pO } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionsPurgeLocalCopy()\n"); @@ -877,7 +877,7 @@ VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pO /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionsDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPM_CLASSIFY_OPTIONS.

Notes:
@@ -893,13 +893,13 @@ _Success_(*ppOptions == 0) VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** ppOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionsDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppOptions); if(*ppOptions) @@ -909,7 +909,7 @@ VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionsDestroyLocalCopy()\n"); @@ -921,7 +921,7 @@ VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionsPopulateLocalCopy" - + Purpose: Populate a local copy of an FWPM_CLASSIFY_OPTIONS.

Notes: The caller is responsible for freeing the allocated memory using @@ -938,13 +938,13 @@ NTSTATUS KrnlHlprFwpmClassifyOptionsPopulateLocalCopy(_In_ const FWPM_CLASSIFY_O _Inout_ FWPM_CLASSIFY_OPTIONS* pOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionsPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalOptions); NT_ASSERT(pOptions); @@ -977,7 +977,7 @@ NTSTATUS KrnlHlprFwpmClassifyOptionsPopulateLocalCopy(_In_ const FWPM_CLASSIFY_O KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(pOptions); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionsPopulateLocalCopy() [status: %#x]\n", @@ -990,7 +990,7 @@ NTSTATUS KrnlHlprFwpmClassifyOptionsPopulateLocalCopy(_In_ const FWPM_CLASSIFY_O /** @kernel_helper_function="KrnlHlprFwpmClassifyOptionsCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWPM_CLASSIFY_OPTIONS.

Notes: The caller is responsible for freeing the allocated memory using @@ -1007,13 +1007,13 @@ _Success_(return != 0) FWPM_CLASSIFY_OPTIONS* KrnlHlprFwpmClassifyOptionsCreateLocalCopy(_In_ const FWPM_CLASSIFY_OPTIONS* pOriginalOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmClassifyOptionsCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalOptions); NTSTATUS status = STATUS_SUCCESS; @@ -1036,14 +1036,14 @@ FWPM_CLASSIFY_OPTIONS* KrnlHlprFwpmClassifyOptionsCreateLocalCopy(_In_ const FWP HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pOptions initialized with call to HLPR_NEW & KrnlHlprFwpmClassifyOptionsPopulateLocalCopy +#pragma warning(disable: 6001) /// pOptions initialized with call to HLPR_NEW & KrnlHlprFwpmClassifyOptionsPopulateLocalCopy if(status != STATUS_SUCCESS && pOptions) KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(&pOptions); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmClassifyOptionsCreateLocalCopy() [pOptions: %#p]\n", @@ -1065,7 +1065,7 @@ FWPM_CLASSIFY_OPTIONS* KrnlHlprFwpmClassifyOptionsCreateLocalCopy(_In_ const FWP /** @kernel_helper_function="KrnlHlprIPsecDoSPOptionsPurgeLocalCopy" - + Purpose: Cleanup a local copy of an IPSEC_DOSP_OPTIONS.

Notes:
@@ -1078,13 +1078,13 @@ _IRQL_requires_same_ VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPsecDoSPOptionsPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOptions); HLPR_DELETE_ARRAY(pOptions->publicIFLuids, @@ -1094,7 +1094,7 @@ VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPsecDoSPOptionsPurgeLocalCopy()\n"); @@ -1106,7 +1106,7 @@ VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions /** @kernel_helper_function="KrnlHlprIPsecDoSPOptionsDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an IPSEC_DOSP_OPTIONS.

Notes:
@@ -1122,13 +1122,13 @@ _Success_(*ppOptions == 0) VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPsecDoSPOptionsDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppOptions); if(*ppOptions) @@ -1138,7 +1138,7 @@ VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOpt WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPsecDoSPOptionsDestroyLocalCopy()\n"); @@ -1150,7 +1150,7 @@ VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOpt /** @kernel_helper_function="KrnlHlprIPsecDoSPOptionsPopulateLocalCopy" - + Purpose: Allocate and populate a local copy of an IPSEC_DOSP_OPTIONS.

Notes: The caller is responsible for freeing any allocated memory using @@ -1167,13 +1167,13 @@ NTSTATUS KrnlHlprIPsecDoSPOptionsPopulateLocalCopy(_In_ const IPSEC_DOSP_OPTIONS _Inout_ IPSEC_DOSP_OPTIONS* pOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPsecDoSPOptionsPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalOptions); NT_ASSERT(pOptions); @@ -1212,7 +1212,7 @@ NTSTATUS KrnlHlprIPsecDoSPOptionsPopulateLocalCopy(_In_ const IPSEC_DOSP_OPTIONS KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(pOptions); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPsecDoSPOptionsPopulateLocalCopy() [status: %#x]\n", @@ -1226,7 +1226,7 @@ NTSTATUS KrnlHlprIPsecDoSPOptionsPopulateLocalCopy(_In_ const IPSEC_DOSP_OPTIONS /** @kernel_helper_function="KrnlHlprIPsecDoSPOptionsCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an IPSEC_DOSP_OPTIONS.

Notes: The caller is responsible for freeing any allocated memory using @@ -1243,13 +1243,13 @@ _Success_(return != 0) IPSEC_DOSP_OPTIONS* KrnlHlprIPsecDoSPOptionsCreateLocalCopy(_In_ const IPSEC_DOSP_OPTIONS* pOriginalOptions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPsecDoSPOptionsCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalOptions); NTSTATUS status = STATUS_SUCCESS; @@ -1272,14 +1272,14 @@ IPSEC_DOSP_OPTIONS* KrnlHlprIPsecDoSPOptionsCreateLocalCopy(_In_ const IPSEC_DOS HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pOptions initialized with call to HLPR_NEW & KrnlHlprIPsecDoSPOptionsPopulateLocalCopy +#pragma warning(disable: 6001) /// pOptions initialized with call to HLPR_NEW & KrnlHlprIPsecDoSPOptionsPopulateLocalCopy if(status != STATUS_SUCCESS && pOptions) KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(&pOptions); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPsecDoSPOptionsCreateLocalCopy() [pOptions: %#p]\n", @@ -1301,7 +1301,7 @@ IPSEC_DOSP_OPTIONS* KrnlHlprIPsecDoSPOptionsCreateLocalCopy(_In_ const IPSEC_DOS /** @kernel_helper_function="KrnlHlprFwpTokenInformationPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_TOKEN_INFORMATION.

Notes:
@@ -1314,13 +1314,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pTokenInfo) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpTokenInformationPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pTokenInfo); for(UINT32 i = 0; @@ -1346,7 +1346,7 @@ VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pT WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpTokenInformationPurgeLocalCopy()\n"); @@ -1358,7 +1358,7 @@ VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pT /** @kernel_helper_function="KrnlHlprFwpTokenInformationDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_TOKEN_INFORMATION.

Notes:
@@ -1374,13 +1374,13 @@ _Success_(*ppTokenInfo == 0) VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** ppTokenInfo) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpTokenInformationDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppTokenInfo); if(*ppTokenInfo) @@ -1390,7 +1390,7 @@ VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpTokenInformationDestroyLocalCopy()\n"); @@ -1402,7 +1402,7 @@ VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** /** @kernel_helper_function="KrnlHlprFwpTokenInformationPopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_TOKEN_INFORMATION.

Notes: The caller is responsible for freeing the allocated memory using @@ -1419,13 +1419,13 @@ NTSTATUS KrnlHlprFwpTokenInformationPopulateLocalCopy(_In_ const FWP_TOKEN_INFOR _Inout_ FWP_TOKEN_INFORMATION* pTokenInfo) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpTokenInformationPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalTokenInfo); NT_ASSERT(pTokenInfo); @@ -1594,7 +1594,7 @@ NTSTATUS KrnlHlprFwpTokenInformationPopulateLocalCopy(_In_ const FWP_TOKEN_INFOR KrnlHlprFwpTokenInformationDestroyLocalCopy(&pTokenInfo); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpTokenInformationPopulateLocalCopy() [status: %#x]\n", @@ -1607,7 +1607,7 @@ NTSTATUS KrnlHlprFwpTokenInformationPopulateLocalCopy(_In_ const FWP_TOKEN_INFOR /** @kernel_helper_function="KrnlHlprFwpTokenInformationCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWP_TOKEN_INFORMATION.

Notes: The caller is responsible for freeing the allocated memory using @@ -1624,13 +1624,13 @@ _Success_(return != 0) FWP_TOKEN_INFORMATION* KrnlHlprFwpTokenInformationCreateLocalCopy(_In_ const FWP_TOKEN_INFORMATION* pOriginalTokenInfo) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpTokenInformationCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalTokenInfo); NTSTATUS status = STATUS_SUCCESS; @@ -1653,14 +1653,14 @@ FWP_TOKEN_INFORMATION* KrnlHlprFwpTokenInformationCreateLocalCopy(_In_ const FWP HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pTokenInfo initialized with call to HLPR_NEW & KrnlHlprFwpTokenInformationPopulateLocalCopy +#pragma warning(disable: 6001) /// pTokenInfo initialized with call to HLPR_NEW & KrnlHlprFwpTokenInformationPopulateLocalCopy if(status != STATUS_SUCCESS && pTokenInfo) KrnlHlprFwpTokenInformationDestroyLocalCopy(&pTokenInfo); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpTokenInformationCreateLocalCopy() [pTokenInfo: %#p]\n", @@ -1680,8 +1680,8 @@ FWP_TOKEN_INFORMATION* KrnlHlprFwpTokenInformationCreateLocalCopy(_In_ const FWP /** @kernel_helper_function="KrnlHlprFwpValueGetStringForFwpsIncomingValue" - - Purpose: Return a string representing the condition field of the FWPS_INCOMING_VALUE.
+ + Purpose: Return a string representing the condition field of the FWPS_INCOMING_VALUE.

Notes:

@@ -1892,10 +1892,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_PROFILE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_INBOUND_TRANSPORT_V4_IPSEC_SECURITY_REALM_ID) pString = "FWPM_CONDITION_IPSEC_SECURITY_REALM_ID"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -2243,10 +2243,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -2305,10 +2305,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_AUTH_LISTEN_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -2417,10 +2417,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -2537,10 +2537,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_AUTH_CONNECT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -2622,10 +2622,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_FLOW_ESTABLISHED_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_VISTASP1) @@ -2753,10 +2753,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_ENDPOINT_CLOSURE_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) @@ -2819,10 +2819,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_CONNECT_REDIRECT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) @@ -2867,10 +2867,10 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, pString = "FWPM_CONDITION_ALE_PACKAGE_ID"; #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(fieldID == FWPS_FIELD_ALE_BIND_REDIRECT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pString = "FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE"; - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) @@ -3214,8 +3214,8 @@ PSTR KrnlHlprFwpValueGetStringForFwpsIncomingValue(_In_ UINT32 layerID, /** @kernel_helper_function="KrnlHlprFwpValueGetFromFwpsIncomingValues" - - Purpose: Retrieve a pointer to the FWP_VALUE for a given condition in the + + Purpose: Retrieve a pointer to the FWP_VALUE for a given condition in the FWPS_INCOMING_VALUES.

Notes:
@@ -3232,13 +3232,13 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA _In_ const GUID* pConditionKey) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpValueGetFromFwpsIncomingValues()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); NT_ASSERT(pConditionKey); @@ -3416,10 +3416,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V4_PROFILE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_IPSEC_SECURITY_REALM_ID) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V4_IPSEC_SECURITY_REALM_ID].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -3629,10 +3629,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_ALE_PACKAGE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -3676,10 +3676,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_LISTEN_V4_ALE_PACKAGE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_LISTEN_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -3768,10 +3768,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_ALE_PACKAGE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -3863,10 +3863,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_CONNECT_V4_ALE_PACKAGE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_AUTH_CONNECT_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_WIN7) @@ -3923,10 +3923,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_FLOW_ESTABLISHED_V4_ALE_PACKAGE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_FLOW_ESTABLISHED_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) #endif /// (NTDDI_VERSION >= NTDDI_VISTASP1) @@ -3976,10 +3976,10 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_ALE_PACKAGE_ID].value); #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - + else if(pConditionKey == &FWPM_CONDITION_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE) pValue = &(pClassifyValues->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_ALE_SECURITY_ATTRIBUTE_FQBN_VALUE].value); - + #endif /// (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) #endif /// (NTDDI_VERSION >= NTDDI_WIN8) @@ -4366,7 +4366,7 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpValueGetFromFwpsIncomingValues() [pValue: %#p]\n", @@ -4379,7 +4379,7 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA /** @kernel_helper_function="KrnlHlprFwpValuePurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_VALUE.

Notes:
@@ -4392,13 +4392,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpValuePurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pValue); switch(pValue->type) @@ -4491,7 +4491,7 @@ VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpValuePurgeLocalCopy()\n"); @@ -4503,7 +4503,7 @@ VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue) /** @kernel_helper_function="KrnlHlprFwpValueDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_VALUE.

Notes:
@@ -4519,13 +4519,13 @@ _Success_(*ppValue == 0) VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpValueDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppValue); if(*ppValue) @@ -4535,7 +4535,7 @@ VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue) WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpValueDestroyLocalCopy()\n"); @@ -4547,7 +4547,7 @@ VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue) /** @kernel_helper_function="KrnlHlprFwpValuePopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_VALUE.

Notes: The caller is responsible for freeing any allocated memory using @@ -4564,13 +4564,13 @@ NTSTATUS KrnlHlprFwpValuePopulateLocalCopy(_In_ const FWP_VALUE* pOriginalValue, _Inout_ FWP_VALUE* pValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpValuePopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalValue); NT_ASSERT(pValue); @@ -4753,7 +4753,7 @@ NTSTATUS KrnlHlprFwpValuePopulateLocalCopy(_In_ const FWP_VALUE* pOriginalValue, KrnlHlprFwpValuePurgeLocalCopy(pValue); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpValuePopulateLocalCopy() [status: %#x]\n", @@ -4766,7 +4766,7 @@ NTSTATUS KrnlHlprFwpValuePopulateLocalCopy(_In_ const FWP_VALUE* pOriginalValue, /** @kernel_helper_function="KrnlHlprFwpValueCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWP_VALUE.

Notes: The caller is responsible for freeing the allocated memory using @@ -4783,13 +4783,13 @@ _Success_(return != 0) FWP_VALUE* KrnlHlprFwpValueCreateLocalCopy(_In_ const FWP_VALUE* pOriginalValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpValueCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalValue); NTSTATUS status = STATUS_SUCCESS; @@ -4812,14 +4812,14 @@ FWP_VALUE* KrnlHlprFwpValueCreateLocalCopy(_In_ const FWP_VALUE* pOriginalValue) HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pValue initialized with call to HLPR_NEW & KrnlHlprFwpValuePopulateLocalCopy +#pragma warning(disable: 6001) /// pValue initialized with call to HLPR_NEW & KrnlHlprFwpValuePopulateLocalCopy if(status != STATUS_SUCCESS && pValue) KrnlHlprFwpValueDestroyLocalCopy(&pValue); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpValueCreateLocalCopy() [pValue: %#p]\n", @@ -4839,7 +4839,7 @@ FWP_VALUE* KrnlHlprFwpValueCreateLocalCopy(_In_ const FWP_VALUE* pOriginalValue) /** @kernel_helper_function="KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_V4_ADDR_AND_MASK.

Notes:
@@ -4852,20 +4852,20 @@ _IRQL_requires_same_ VOID KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK* pAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pAddrMask); RtlZeroMemory(pAddrMask, sizeof(FWP_V4_ADDR_AND_MASK)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy()\n"); @@ -4877,7 +4877,7 @@ VOID KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK* pAddrM /** @kernel_helper_function="KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_V4_ADDR_AND_MASK.

Notes:
@@ -4893,13 +4893,13 @@ _Success_(*ppAddrMask == 0) VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppAddrMask); if(*ppAddrMask) @@ -4909,7 +4909,7 @@ VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppA WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy()\n"); @@ -4921,7 +4921,7 @@ VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppA /** @kernel_helper_function="KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_V4_ADDR_AND_MASK.

Notes: The caller is responsible for freeing the allocated memory using @@ -4938,13 +4938,13 @@ NTSTATUS KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy(_In_ const FWP_V4_ADDR_AND_MA _Inout_ FWP_V4_ADDR_AND_MASK* pAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalAddrMask); NT_ASSERT(pAddrMask); @@ -4954,7 +4954,7 @@ NTSTATUS KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy(_In_ const FWP_V4_ADDR_AND_MA pAddrMask->mask = pOriginalAddrMask->mask; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy() [status: %#x]\n", @@ -4967,7 +4967,7 @@ NTSTATUS KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy(_In_ const FWP_V4_ADDR_AND_MA /** @kernel_helper_function="KrnlHlprFwpV4AddrAndMaskCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWP_V4_ADDR_AND_MASK.

Notes: The caller is responsible for freeing the allocated memory using @@ -4984,13 +4984,13 @@ _Success_(return != 0) FWP_V4_ADDR_AND_MASK* KrnlHlprFwpV4AddrAndMaskCreateLocalCopy(_In_ const FWP_V4_ADDR_AND_MASK* pOriginalAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV4AddrAndMaskCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalAddrMask); NTSTATUS status = STATUS_SUCCESS; @@ -5013,14 +5013,14 @@ FWP_V4_ADDR_AND_MASK* KrnlHlprFwpV4AddrAndMaskCreateLocalCopy(_In_ const FWP_V4_ HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pAddrMask initialized with call to HLPR_NEW & KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy +#pragma warning(disable: 6001) /// pAddrMask initialized with call to HLPR_NEW & KrnlHlprFwpV4AddrAndMaskPopulateLocalCopy if(status != STATUS_SUCCESS && pAddrMask) KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(&pAddrMask); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV4AddrAndMaskCreateLocalCopy() [pAddrMask: %#p]\n", @@ -5040,7 +5040,7 @@ FWP_V4_ADDR_AND_MASK* KrnlHlprFwpV4AddrAndMaskCreateLocalCopy(_In_ const FWP_V4_ /** @kernel_helper_function="KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_V6_ADDR_AND_MASK.

Notes:
@@ -5053,20 +5053,20 @@ _IRQL_requires_same_ VOID KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK* pAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pAddrMask); RtlZeroMemory(pAddrMask, sizeof(FWP_V6_ADDR_AND_MASK)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy()\n"); @@ -5078,7 +5078,7 @@ VOID KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK* pAddrM /** @kernel_helper_function="KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_V6_ADDR_AND_MASK.

Notes:
@@ -5094,13 +5094,13 @@ _Success_(*ppAddrMask == 0) VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppAddrMask); if(*ppAddrMask) @@ -5110,7 +5110,7 @@ VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppA WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy()\n"); @@ -5122,7 +5122,7 @@ VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppA /** @kernel_helper_function="KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_V6_ADDR_AND_MASK.

Notes: The caller is responsible for freeing the allocated memory using @@ -5139,13 +5139,13 @@ NTSTATUS KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy(_In_ const FWP_V6_ADDR_AND_MA _Inout_ FWP_V6_ADDR_AND_MASK* pAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalAddrMask); NT_ASSERT(pAddrMask); @@ -5158,7 +5158,7 @@ NTSTATUS KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy(_In_ const FWP_V6_ADDR_AND_MA pAddrMask->prefixLength = pOriginalAddrMask->prefixLength; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy() [status: %#x]\n", @@ -5171,7 +5171,7 @@ NTSTATUS KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy(_In_ const FWP_V6_ADDR_AND_MA /** @kernel_helper_function="KrnlHlprFwpV6AddrAndMaskCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWP_V6_ADDR_AND_MASK.

Notes: The caller is responsible for freeing the allocated memory using @@ -5188,13 +5188,13 @@ _Success_(return != 0) FWP_V6_ADDR_AND_MASK* KrnlHlprFwpV6AddrAndMaskCreateLocalCopy(_In_ const FWP_V6_ADDR_AND_MASK* pOriginalAddrMask) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpV6AddrAndMaskCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalAddrMask); NTSTATUS status = STATUS_SUCCESS; @@ -5217,14 +5217,14 @@ FWP_V6_ADDR_AND_MASK* KrnlHlprFwpV6AddrAndMaskCreateLocalCopy(_In_ const FWP_V6_ HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pAddrMask initialized with call to HLPR_NEW & KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy +#pragma warning(disable: 6001) /// pAddrMask initialized with call to HLPR_NEW & KrnlHlprFwpV6AddrAndMaskPopulateLocalCopy if(status != STATUS_SUCCESS && pAddrMask) KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(&pAddrMask); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpV6AddrAndMaskCreateLocalCopy() [pAddrMask: %#p]\n", @@ -5244,7 +5244,7 @@ FWP_V6_ADDR_AND_MASK* KrnlHlprFwpV6AddrAndMaskCreateLocalCopy(_In_ const FWP_V6_ /** @kernel_helper_function="KrnlHlprFwpRangePurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_RANGE.

Notes:
@@ -5257,13 +5257,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpRangePurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pRange); KrnlHlprFwpValuePurgeLocalCopy(&(pRange->valueLow)); @@ -5271,7 +5271,7 @@ VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange) KrnlHlprFwpValuePurgeLocalCopy(&(pRange->valueHigh)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpRangePurgeLocalCopy()\n"); @@ -5283,7 +5283,7 @@ VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange) /** @kernel_helper_function="KrnlHlprFwpRangeDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_RANGE.

Notes:
@@ -5299,13 +5299,13 @@ _Success_(*ppRange == 0) VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpRangeDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppRange); if(*ppRange) @@ -5315,7 +5315,7 @@ VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange) WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpRangeDestroyLocalCopy()\n"); @@ -5327,7 +5327,7 @@ VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange) /** @kernel_helper_function="KrnlHlprFwpRangePopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_RANGE.

Notes: The caller is responsible for freeing the allocated memory using @@ -5344,13 +5344,13 @@ NTSTATUS KrnlHlprFwpRangePopulateLocalCopy(_In_ const FWP_RANGE* pOriginalRange, _Inout_ FWP_RANGE* pRange) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpRangePopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalRange); NT_ASSERT(pRange); @@ -5370,7 +5370,7 @@ NTSTATUS KrnlHlprFwpRangePopulateLocalCopy(_In_ const FWP_RANGE* pOriginalRange, KrnlHlprFwpRangePurgeLocalCopy(pRange); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpRangePopulateLocalCopy() [status: %#x]\n", @@ -5383,7 +5383,7 @@ NTSTATUS KrnlHlprFwpRangePopulateLocalCopy(_In_ const FWP_RANGE* pOriginalRange, /** @kernel_helper_function="KrnlHlprFwpRangeCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWP_RANGE.

Notes: The caller is responsible for freeing the allocated memory using @@ -5400,13 +5400,13 @@ _Success_(return != 0) FWP_RANGE* KrnlHlprFwpRangeCreateLocalCopy(_In_ const FWP_RANGE* pOriginalRange) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpRangeCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalRange); NTSTATUS status = STATUS_SUCCESS; @@ -5434,14 +5434,14 @@ FWP_RANGE* KrnlHlprFwpRangeCreateLocalCopy(_In_ const FWP_RANGE* pOriginalRange) HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pRange initialized with call to HLPR_NEW & KrnlHlprFwpValuePopulateLocalCopy +#pragma warning(disable: 6001) /// pRange initialized with call to HLPR_NEW & KrnlHlprFwpValuePopulateLocalCopy if(status != STATUS_SUCCESS && pRange) KrnlHlprFwpRangeDestroyLocalCopy(&pRange); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpRangeCreateLocalCopy() [pRange: %#p]\n", @@ -5461,7 +5461,7 @@ FWP_RANGE* KrnlHlprFwpRangeCreateLocalCopy(_In_ const FWP_RANGE* pOriginalRange) /** @kernel_helper_function="KrnlHlprFwpConditionValuePurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWP_CONDITION_VALUE.

Notes:
@@ -5474,13 +5474,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpConditionValuePurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pValue); switch(pValue->type) @@ -5599,7 +5599,7 @@ VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpConditionValuePurgeLocalCopy()\n"); @@ -5611,7 +5611,7 @@ VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue /** @kernel_helper_function="KrnlHlprFwpConditionValueDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWP_CONDITION_VALUE.

Notes:
@@ -5627,13 +5627,13 @@ _Success_(*ppValue == 0) VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpConditionValueDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppValue); if(*ppValue) @@ -5643,7 +5643,7 @@ VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppV WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpConditionValueDestroyLocalCopy()\n"); @@ -5655,7 +5655,7 @@ VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppV /** @kernel_helper_function="KrnlHlprFwpConditionValuePopulateLocalCopy" - + Purpose: Populate a local copy of an FWP_CONDITION_VALUE.

Notes: The caller is responsible for freeing any allocated memory using @@ -5672,13 +5672,13 @@ NTSTATUS KrnlHlprFwpConditionValuePopulateLocalCopy(_In_ const FWP_CONDITION_VAL _Inout_ FWP_CONDITION_VALUE* pValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpConditionValuePopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalValue); NT_ASSERT(pValue); @@ -5898,7 +5898,7 @@ NTSTATUS KrnlHlprFwpConditionValuePopulateLocalCopy(_In_ const FWP_CONDITION_VAL KrnlHlprFwpConditionValuePurgeLocalCopy(pValue); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpConditionValuePopulateLocalCopy() [status: %#x]\n", @@ -5911,7 +5911,7 @@ NTSTATUS KrnlHlprFwpConditionValuePopulateLocalCopy(_In_ const FWP_CONDITION_VAL /** @kernel_helper_function="KrnlHlprFwpConditionValueCreateLocalCopy" - + Purpose: Allocate ans populate a local copy of an FWP_CONDITION_VALUE.

Notes: The caller is responsible for freeing any allocated memory using @@ -5928,13 +5928,13 @@ _Success_(return != 0) FWP_CONDITION_VALUE* KrnlHlprFwpConditionValueCreateLocalCopy(_In_ const FWP_CONDITION_VALUE* pOriginalValue) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpConditionValueCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalValue); NTSTATUS status = STATUS_SUCCESS; @@ -5957,14 +5957,14 @@ FWP_CONDITION_VALUE* KrnlHlprFwpConditionValueCreateLocalCopy(_In_ const FWP_CON HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pConditionValue initialized with call to HLPR_NEW & KrnlHlprFwpConditionValuePopulateLocalCopy +#pragma warning(disable: 6001) /// pConditionValue initialized with call to HLPR_NEW & KrnlHlprFwpConditionValuePopulateLocalCopy if(status != STATUS_SUCCESS && pConditionValue) KrnlHlprFwpConditionValueDestroyLocalCopy(&pConditionValue); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpConditionValueCreateLocalCopy() [pConditionValue: %#p]\n", @@ -5984,8 +5984,8 @@ FWP_CONDITION_VALUE* KrnlHlprFwpConditionValueCreateLocalCopy(_In_ const FWP_CON /** @kernel_helper_function="KrnlHlprFwpsIncomingValueConditionFlagsAreSet" - - Purpose: Determine if the FWPS_INCOMING_VALUES has the FLAGS condition set with the given + + Purpose: Determine if the FWPS_INCOMING_VALUES has the FLAGS condition set with the given flags.

Notes:
@@ -6000,13 +6000,13 @@ BOOLEAN KrnlHlprFwpsIncomingValueConditionFlagsAreSet(_In_ const FWPS_INCOMING_V _In_ UINT32 flags) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingValueConditionFlagsAreSet()\n"); #endif /// DBG - + NT_ASSERT(pClassifyValues); BOOLEAN flagsAreSet = FALSE; @@ -6018,7 +6018,7 @@ BOOLEAN KrnlHlprFwpsIncomingValueConditionFlagsAreSet(_In_ const FWPS_INCOMING_V flagsAreSet = TRUE; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingValueConditionFlagsAreSet()\n"); @@ -6030,7 +6030,7 @@ BOOLEAN KrnlHlprFwpsIncomingValueConditionFlagsAreSet(_In_ const FWPS_INCOMING_V /** @kernel_helper_function="KrnlHlprFwpsIncomingValuesPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPS_INCOMING_VALUES.

Notes:
@@ -6043,13 +6043,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pValues) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingValuesPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pValues); for(UINT32 valueIndex = 0; @@ -6063,7 +6063,7 @@ VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pVal WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingValuesPurgeLocalCopy()\n"); @@ -6075,7 +6075,7 @@ VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pVal /** @kernel_helper_function="KrnlHlprFwpsIncomingValuesDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPS_INCOMING_VALUES.

Notes:
@@ -6091,23 +6091,23 @@ _Success_(*ppValues == 0) VOID KrnlHlprFwpsIncomingValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_VALUES** ppValues) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingValuesDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppValues); if(*ppValues) KrnlHlprFwpsIncomingValuesPurgeLocalCopy(*ppValues); - + HLPR_DELETE(*ppValues, WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingValuesDestroyLocalCopy()\n"); @@ -6119,7 +6119,7 @@ VOID KrnlHlprFwpsIncomingValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_VALUES** p /** @kernel_helper_function="KrnlHlprFwpsIncomingValuesPopulateLocalCopy" - + Purpose: Populate a local copy of an FWPS_INCOMING_VALUES.

Notes: The caller is responsible for freeing the allocated memory using @@ -6136,13 +6136,13 @@ NTSTATUS KrnlHlprFwpsIncomingValuesPopulateLocalCopy(_In_ const FWPS_INCOMING_VA _Inout_ FWPS_INCOMING_VALUES* pValues) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingValuesPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalValues); NT_ASSERT(pValues); @@ -6173,7 +6173,7 @@ NTSTATUS KrnlHlprFwpsIncomingValuesPopulateLocalCopy(_In_ const FWPS_INCOMING_VA KrnlHlprFwpsIncomingValuesPurgeLocalCopy(pValues); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingValuesPopulateLocalCopy() [status: %#x]\n", @@ -6186,7 +6186,7 @@ NTSTATUS KrnlHlprFwpsIncomingValuesPopulateLocalCopy(_In_ const FWPS_INCOMING_VA /** @kernel_helper_function="KrnlHlprFwpsIncomingValuesCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWPS_INCOMING_VALUES.

Notes: The caller is responsible for freeing the allocated memory using @@ -6203,13 +6203,13 @@ _Success_(return != 0) FWPS_INCOMING_VALUES* KrnlHlprFwpsIncomingValuesCreateLocalCopy(_In_ const FWPS_INCOMING_VALUES* pOriginalValues) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingValuesCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalValues); NTSTATUS status = STATUS_SUCCESS; @@ -6232,14 +6232,14 @@ FWPS_INCOMING_VALUES* KrnlHlprFwpsIncomingValuesCreateLocalCopy(_In_ const FWPS_ HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pIncomingValues initialized with call to HLPR_NEW & KrnlHlprFwpsIncomingValuesPopulateLocalCopy +#pragma warning(disable: 6001) /// pIncomingValues initialized with call to HLPR_NEW & KrnlHlprFwpsIncomingValuesPopulateLocalCopy if(status != STATUS_SUCCESS && pIncomingValues) KrnlHlprFwpsIncomingValuesDestroyLocalCopy(&pIncomingValues); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingValuesCreateLocalCopy() [pIncomingValues: %#p]\n", @@ -6259,7 +6259,7 @@ FWPS_INCOMING_VALUES* KrnlHlprFwpsIncomingValuesCreateLocalCopy(_In_ const FWPS_ /** @kernel_helper_function="KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy - + Purpose: Cleanup a local copy of an FWPS_INCOMING_METADATA_VALUES.

Notes:
@@ -6272,13 +6272,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES* pMetadata) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pMetadata); KrnlHlprFwpByteBlobDestroyLocalCopy(&(pMetadata->processPath)); @@ -6306,7 +6306,7 @@ VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_META #endif /// (NTDDI_VERSION >= NTDDI_WIN6SP1) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy()\n"); @@ -6318,7 +6318,7 @@ VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_META /** @kernel_helper_function="KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy - + Purpose: Cleanup and free a local copy of an FWPS_INCOMING_METADATA_VALUES.

Notes:
@@ -6334,13 +6334,13 @@ _Success_(*ppMetadata == 0) VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES** ppMetadata) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppMetadata); if(*ppMetadata) @@ -6350,7 +6350,7 @@ VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_ME WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy()\n"); @@ -6362,10 +6362,10 @@ VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_ME /** @kernel_helper_function="KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy - + Purpose: Populate a local copy of the FWPS_INCOMING_METADATA_VALUES.

- Notes: The caller is responsible for freeing any allocated memory using + Notes: The caller is responsible for freeing any allocated memory using KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy().

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Hardware/FF552397.aspx
@@ -6379,13 +6379,13 @@ NTSTATUS KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy(_In_ const FWPS_INC _Inout_ FWPS_INCOMING_METADATA_VALUES* pMetadata) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalMetadata); NTSTATUS status = STATUS_SUCCESS; @@ -6543,7 +6543,7 @@ NTSTATUS KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy(_In_ const FWPS_INC FWPS_METADATA_FIELD_ORIGINAL_DESTINATION)) { BYTE* pDestination = 0; - SIZE_T sockAddrSize = (pOriginalMetadata->originalDestination->sa_family == AF_INET) ? + SIZE_T sockAddrSize = (pOriginalMetadata->originalDestination->sa_family == AF_INET) ? sizeof(SOCKADDR_IN) : sizeof(SOCKADDR_IN6); @@ -6617,7 +6617,7 @@ NTSTATUS KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy(_In_ const FWPS_INC KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(pMetadata); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy() [status: %#x]\n", @@ -6630,7 +6630,7 @@ NTSTATUS KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy(_In_ const FWPS_INC /** @kernel_helper_function="KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy - + Purpose: Allocate and populate a local copy of the FWPS_INCOMING_METADATA_VALUES.

Notes: The caller is responsible for freeing the allocated memory using @@ -6647,13 +6647,13 @@ _Success_(return != 0) FWPS_INCOMING_METADATA_VALUES* KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy(_In_ const FWPS_INCOMING_METADATA_VALUES* pOriginalMetadata) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalMetadata); NTSTATUS status = STATUS_SUCCESS; @@ -6676,14 +6676,14 @@ FWPS_INCOMING_METADATA_VALUES* KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pMetadata initialized with call to HLPR_NEW & KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy +#pragma warning(disable: 6001) /// pMetadata initialized with call to HLPR_NEW & KrnlHlprFwpsIncomingMetadataValuesPopulateLocalCopy if(status != STATUS_SUCCESS && pMetadata) KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(&pMetadata); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy() [pMetadata: %#p]\n", @@ -6703,7 +6703,7 @@ FWPS_INCOMING_METADATA_VALUES* KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy /** @kernel_helper_function="KrnlHlprFwpsClassifyOutPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPS_CLASSIFY_OUT.

Notes:
@@ -6716,20 +6716,20 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsClassifyOutPurgeLocalCopy(_Inout_ FWPS_CLASSIFY_OUT* pOriginalClassifyOut) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsClassifyOutPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalClassifyOut); RtlZeroMemory(pOriginalClassifyOut, sizeof(FWPS_CLASSIFY_OUT)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsClassifyOutPurgeLocalCopy()\n"); @@ -6741,7 +6741,7 @@ VOID KrnlHlprFwpsClassifyOutPurgeLocalCopy(_Inout_ FWPS_CLASSIFY_OUT* pOriginalC /** @kernel_helper_function="KrnlHlprFwpsClassifyOutDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPS_CLASSIFY_OUT.

Notes:
@@ -6757,13 +6757,13 @@ _Success_(*ppClassifyOut == 0) VOID KrnlHlprFwpsClassifyOutDestroyLocalCopy(_Inout_ FWPS_CLASSIFY_OUT** ppClassifyOut) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsClassifyOutDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppClassifyOut); if(*ppClassifyOut) @@ -6773,7 +6773,7 @@ VOID KrnlHlprFwpsClassifyOutDestroyLocalCopy(_Inout_ FWPS_CLASSIFY_OUT** ppClass WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsClassifyOutDestroyLocalCopy()\n"); @@ -6785,7 +6785,7 @@ VOID KrnlHlprFwpsClassifyOutDestroyLocalCopy(_Inout_ FWPS_CLASSIFY_OUT** ppClass /** @kernel_helper_function="KrnlHlprFwpsClassifyOutPopulateLocalCopy" - + Purpose: Populate a local copy of the FWPS_CLASSIFY_OUT.

Notes: The caller is responsible for freeing the allocated memory using @@ -6800,13 +6800,13 @@ VOID KrnlHlprFwpsClassifyOutPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOri _Inout_ FWPS_CLASSIFY_OUT* pClassifyOut) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsClassifyOutPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalClassifyOut); NT_ASSERT(pClassifyOut); @@ -6815,7 +6815,7 @@ VOID KrnlHlprFwpsClassifyOutPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOri sizeof(FWPS_CLASSIFY_OUT)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsClassifyOutPopulateLocalCopy()\n"); @@ -6827,7 +6827,7 @@ VOID KrnlHlprFwpsClassifyOutPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOri /** @kernel_helper_function="KrnlHlprFwpsClassifyOutCreateLocalCopy" - + Purpose: Allocate and populate a local copy of the FWPS_CLASSIFY_OUT.

Notes: The caller is responsible for freeing the allocated memory using @@ -6844,13 +6844,13 @@ _Success_(return != 0) FWPS_CLASSIFY_OUT* KrnlHlprFwpsClassifyOutCreateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOriginalClassifyOut) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsClassifyOutCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalClassifyOut); NTSTATUS status = 0; @@ -6874,7 +6874,7 @@ FWPS_CLASSIFY_OUT* KrnlHlprFwpsClassifyOutCreateLocalCopy(_In_ const FWPS_CLASSI status); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsClassifyOutCreateLocalCopy() [pClassifyOut: %#p]\n", @@ -6892,7 +6892,7 @@ FWPS_CLASSIFY_OUT* KrnlHlprFwpsClassifyOutCreateLocalCopy(_In_ const FWPS_CLASSI /** @kernel_helper_function="KrnlHlprFwpsStreamDataPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPS_STREAM_DATA.

Notes:
@@ -6905,13 +6905,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamDataPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pStreamData); BOOLEAN isDispatch = (KeGetCurrentIrql() == DISPATCH_LEVEL) ? TRUE : FALSE; @@ -6931,7 +6931,7 @@ VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData) pStreamData->netBufferListChain = 0; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamDataPurgeLocalCopy()\n"); @@ -6943,7 +6943,7 @@ VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData) /** @kernel_helper_function="KrnlHlprFwpsStreamDataDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPS_STREAM_DATA.

Notes:
@@ -6959,13 +6959,13 @@ _Success_(*ppStreamData == 0) VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamDataDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppStreamData); if(*ppStreamData) @@ -6975,7 +6975,7 @@ VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamD WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamDataDestroyLocalCopy()\n"); @@ -6987,10 +6987,10 @@ VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamD /** @kernel_helper_function="KrnlHlprFwpsStreamDataPopulateLocalCopy - + Purpose: Populate a local copy of the FWPS_STREAM_DATA.

- Notes: The caller is responsible for freeing the allocated memory using + Notes: The caller is responsible for freeing the allocated memory using KrnlHlprFwpsStreamDataPurgeLocalCopy().

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Hardware/FF552419.aspx
@@ -7004,13 +7004,13 @@ NTSTATUS KrnlHlprFwpsStreamDataPopulateLocalCopy(_In_ const FWPS_STREAM_DATA* pO _Inout_ FWPS_STREAM_DATA* pStreamData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamDataPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalStreamData); NT_ASSERT(pStreamData); @@ -7030,7 +7030,7 @@ NTSTATUS KrnlHlprFwpsStreamDataPopulateLocalCopy(_In_ const FWPS_STREAM_DATA* pO pStreamData->netBufferListChain = pOriginalStreamData->netBufferListChain; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamDataPopulateLocalCopy() [status: %#x]\n", @@ -7043,10 +7043,10 @@ NTSTATUS KrnlHlprFwpsStreamDataPopulateLocalCopy(_In_ const FWPS_STREAM_DATA* pO /** @kernel_helper_function="KrnlHlprFwpsStreamDataCreateLocalCopy - + Purpose: Allocate and populate a local copy of the FWPS_STREAM_DATA.

- Notes: The caller is responsible for freeing the allocated memory using + Notes: The caller is responsible for freeing the allocated memory using KrnlHlprFwpsStreamDataDestroyLocalCopy().

MSDN_Ref: HTTP://MSDN.Microsoft.com/En-US/Library/Windows/Hardware/FF552419.aspx
@@ -7060,13 +7060,13 @@ _Success_(return != 0) FWPS_STREAM_DATA* KrnlHlprFwpsStreamDataCreateLocalCopy(_In_ const FWPS_STREAM_DATA* pOriginalStreamData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamDataCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalStreamData); NTSTATUS status = STATUS_SUCCESS; @@ -7089,14 +7089,14 @@ FWPS_STREAM_DATA* KrnlHlprFwpsStreamDataCreateLocalCopy(_In_ const FWPS_STREAM_D HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pStreamData initialized with call to HLPR_NEW & KrnlHlprFwpsStreamDataPopulateLocalCopy +#pragma warning(disable: 6001) /// pStreamData initialized with call to HLPR_NEW & KrnlHlprFwpsStreamDataPopulateLocalCopy if(status != STATUS_SUCCESS && pStreamData) KrnlHlprFwpsStreamDataDestroyLocalCopy(&pStreamData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamDataCreateLocalCopy() [pStreamData: %#p]\n", @@ -7116,7 +7116,7 @@ FWPS_STREAM_DATA* KrnlHlprFwpsStreamDataCreateLocalCopy(_In_ const FWPS_STREAM_D /** @kernel_helper_function="KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPS_STREAM_CALLOUT_IO_PACKET.

Notes:
@@ -7129,13 +7129,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET* pIOPacket) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pIOPacket); KrnlHlprFwpsStreamDataDestroyLocalCopy(&(pIOPacket->streamData)); @@ -7144,7 +7144,7 @@ VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT sizeof(FWPS_STREAM_CALLOUT_IO_PACKET)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy()\n"); @@ -7156,7 +7156,7 @@ VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT /** @kernel_helper_function="KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPS_STREAM_CALLOUT_IO_PACKET.

Notes:
@@ -7172,13 +7172,13 @@ _Success_(*ppIOPacket == 0) VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET** ppIOPacket) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppIOPacket); if(*ppIOPacket) @@ -7188,7 +7188,7 @@ VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLO WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy()\n"); @@ -7200,7 +7200,7 @@ VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLO /** @kernel_helper_function="KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy - + Purpose: Populate a local copy of the FWPS_STREAM_CALLOUT_IO_PACKET.

Notes: The caller is responsible for freeing the allocated memory using @@ -7217,13 +7217,13 @@ NTSTATUS KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy(_In_ const FWPS_STRE _Inout_ FWPS_STREAM_CALLOUT_IO_PACKET* pIOPacket) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalIOPacket); NT_ASSERT(pIOPacket); @@ -7244,7 +7244,7 @@ NTSTATUS KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy(_In_ const FWPS_STRE KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(pIOPacket); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy() [status: %#x]\n", @@ -7257,7 +7257,7 @@ NTSTATUS KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy(_In_ const FWPS_STRE /** @kernel_helper_function="KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy - + Purpose: Allocate and populate a local copy of the FWPS_STREAM_CALLOUT_IO_PACKET.

Notes: The caller is responsible for freeing the allocated memory using @@ -7274,13 +7274,13 @@ _Success_(return != 0) FWPS_STREAM_CALLOUT_IO_PACKET* KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy(_In_ const FWPS_STREAM_CALLOUT_IO_PACKET* pOriginalIOPacket) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalIOPacket); NTSTATUS status = STATUS_SUCCESS; @@ -7303,7 +7303,7 @@ FWPS_STREAM_CALLOUT_IO_PACKET* KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy( HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pIOPacket initialized with call to HLPR_NEW & KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy +#pragma warning(disable: 6001) /// pIOPacket initialized with call to HLPR_NEW & KrnlHlprFwpsStreamCalloutIOPacketPopulateLocalCopy if(status != STATUS_SUCCESS) KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(&pIOPacket); @@ -7311,7 +7311,7 @@ FWPS_STREAM_CALLOUT_IO_PACKET* KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy( #pragma warning(push) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy() [pIOPacket: %#p]\n", @@ -7329,7 +7329,7 @@ FWPS_STREAM_CALLOUT_IO_PACKET* KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy( /** @kernel_helper_function="KrnlHlprFwpmProviderContextPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPM_PROVIDER_CONTEXT.

Notes:
@@ -7344,13 +7344,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmProviderContextPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pContext); switch(pContext->type) @@ -7434,7 +7434,7 @@ VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pC KrnlHlprFwpmDisplayDataPurgeLocalCopy(&(pContext->displayData)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmProviderContextPurgeLocalCopy()\n"); @@ -7446,7 +7446,7 @@ VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pC /** @kernel_helper_function="KrnlHlprFwpmProviderContextDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPM_PROVIDER_CONTEXT.

Notes:
@@ -7464,13 +7464,13 @@ _Success_(*ppContext == 0) VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** ppContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmProviderContextDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppContext); if(*ppContext) @@ -7480,7 +7480,7 @@ VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmProviderContextDestroyLocalCopy()\n"); @@ -7492,7 +7492,7 @@ VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** /** @kernel_helper_function="KrnlHlprFwpmProviderContextPopulateLocalCopy - + Purpose: Populate a local copy of the FWPM_PROVIDER_CONTEXT.

Notes: The caller is responsible for freeing the allocated memory using @@ -7511,13 +7511,13 @@ NTSTATUS KrnlHlprFwpmProviderContextPopulateLocalCopy(_In_ const FWPM_PROVIDER_C _Inout_ FWPM_PROVIDER_CONTEXT* pProviderContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmProviderContextPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalContext); NT_ASSERT(pProviderContext); @@ -7624,7 +7624,7 @@ NTSTATUS KrnlHlprFwpmProviderContextPopulateLocalCopy(_In_ const FWPM_PROVIDER_C KrnlHlprFwpmProviderContextPurgeLocalCopy(pProviderContext); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmProviderContextPopulateLocalCopy() [status: %#x]\n", @@ -7637,7 +7637,7 @@ NTSTATUS KrnlHlprFwpmProviderContextPopulateLocalCopy(_In_ const FWPM_PROVIDER_C /** @kernel_helper_function="KrnlHlprFwpmProviderContextCreateLocalCopy - + Purpose: Allocate and populate a local copy of the FWPM_PROVIDER_CONTEXT.

Notes: The caller is responsible for freeing the allocated memory using @@ -7656,13 +7656,13 @@ _Success_(return != 0) FWPM_PROVIDER_CONTEXT* KrnlHlprFwpmProviderContextCreateLocalCopy(_In_ const FWPM_PROVIDER_CONTEXT* pOriginalContext) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmProviderContextCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalContext); NTSTATUS status = STATUS_SUCCESS; @@ -7685,7 +7685,7 @@ FWPM_PROVIDER_CONTEXT* KrnlHlprFwpmProviderContextCreateLocalCopy(_In_ const FWP HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pProviderContext initialized with call to HLPR_NEW & KrnlHlprFwpmProviderContextPopulateLocalCopy +#pragma warning(disable: 6001) /// pProviderContext initialized with call to HLPR_NEW & KrnlHlprFwpmProviderContextPopulateLocalCopy if(status != STATUS_SUCCESS) KrnlHlprFwpmProviderContextDestroyLocalCopy(&pProviderContext); @@ -7693,7 +7693,7 @@ FWPM_PROVIDER_CONTEXT* KrnlHlprFwpmProviderContextCreateLocalCopy(_In_ const FWP #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmProviderContextCreateLocalCopy() [pProviderContext: %#p]\n", @@ -7711,7 +7711,7 @@ FWPM_PROVIDER_CONTEXT* KrnlHlprFwpmProviderContextCreateLocalCopy(_In_ const FWP /** @kernel_helper_function="KrnlHlprFwpsFilterConditionPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPS_FILTER_CONDITION.

Notes:
@@ -7724,13 +7724,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pCondition) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterConditionPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pCondition); KrnlHlprFwpConditionValuePurgeLocalCopy(&(pCondition->conditionValue)); @@ -7741,7 +7741,7 @@ VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pC pCondition->matchType = FWP_MATCH_TYPE_MAX; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterConditionPurgeLocalCopy()\n"); @@ -7753,7 +7753,7 @@ VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pC /** @kernel_helper_function="KrnlHlprFwpsFilterConditionDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPS_FILTER_CONDITION.

Notes:
@@ -7770,13 +7770,13 @@ VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** _In_ UINT32 numConditions) /* 1 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterConditionDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppConditions); if(*ppConditions) @@ -7793,7 +7793,7 @@ VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterConditionDestroyLocalCopy()\n"); @@ -7805,7 +7805,7 @@ VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** /** @kernel_helper_function="KrnlHlprFwpsFilterConditionPopulateLocalCopy" - + Purpose: Populate a local copy of an FWPS_FILTER_CONDITION.

Notes: The caller is responsible for freeing any allocated memory using @@ -7822,13 +7822,13 @@ NTSTATUS KrnlHlprFwpsFilterConditionPopulateLocalCopy(_In_ const FWPS_FILTER_CON _Inout_ FWPS_FILTER_CONDITION* pCondition) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterConditionPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalCondition); NT_ASSERT(pCondition); @@ -7845,7 +7845,7 @@ NTSTATUS KrnlHlprFwpsFilterConditionPopulateLocalCopy(_In_ const FWPS_FILTER_CON KrnlHlprFwpsFilterConditionPurgeLocalCopy(pCondition); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterConditionPopulateLocalCopy() [status: %#x]\n", @@ -7858,7 +7858,7 @@ NTSTATUS KrnlHlprFwpsFilterConditionPopulateLocalCopy(_In_ const FWPS_FILTER_CON /** @kernel_helper_function="KrnlHlprFwpsFilterConditionCreateLocalCopy" - + Purpose: Allocate and populate a local copy of an FWPS_FILTER_CONDITION.

Notes: The caller is responsible for freeing any allocated memory using @@ -7876,13 +7876,13 @@ FWPS_FILTER_CONDITION* KrnlHlprFwpsFilterConditionCreateLocalCopy(_In_reads_(num _In_ UINT32 numConditions) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterConditionCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalConditions); NT_ASSERT(numConditions); @@ -7912,7 +7912,7 @@ FWPS_FILTER_CONDITION* KrnlHlprFwpsFilterConditionCreateLocalCopy(_In_reads_(num HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pConditions initialized with call to HLPR_NEW_ARRAY & KrnlHlprFwpsFilterConditionPopulateLocalCopy +#pragma warning(disable: 6001) /// pConditions initialized with call to HLPR_NEW_ARRAY & KrnlHlprFwpsFilterConditionPopulateLocalCopy if(status != STATUS_SUCCESS && pConditions) @@ -7921,7 +7921,7 @@ FWPS_FILTER_CONDITION* KrnlHlprFwpsFilterConditionCreateLocalCopy(_In_reads_(num #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterConditionCreateLocalCopy() [pConditions: %#p]\n", @@ -7939,7 +7939,7 @@ FWPS_FILTER_CONDITION* KrnlHlprFwpsFilterConditionCreateLocalCopy(_In_reads_(num /** @kernel_helper_function="KrnlHlprFwpsFilterPurgeLocalCopy" - + Purpose: Cleanup a local copy of an FWPS_FILTER.

Notes:
@@ -7952,13 +7952,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterPurgeLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pFilter); KrnlHlprFwpmProviderContextDestroyLocalCopy(&(pFilter->providerContext)); @@ -7969,7 +7969,7 @@ VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter) KrnlHlprFwpValuePurgeLocalCopy(&(pFilter->weight)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterPurgeLocalCopy()\n"); @@ -7981,7 +7981,7 @@ VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter) /** @kernel_helper_function="KrnlHlprFwpsFilterDestroyLocalCopy" - + Purpose: Cleanup and free a local copy of an FWPS_FILTER.

Notes:
@@ -7999,13 +7999,13 @@ _Success_(*ppFilter == 0) VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterDestroyLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(ppFilter); if(*ppFilter) @@ -8015,7 +8015,7 @@ VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter) WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterDestroyLocalCopy()\n"); @@ -8027,7 +8027,7 @@ VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter) /** @kernel_helper_function="KrnlHlprFwpsFilterPopulateLocalCopy - + Purpose: Populate a local copy of the FWPS_FILTER.

Notes: The caller is responsible for freeing the allocated memory using @@ -8047,13 +8047,13 @@ NTSTATUS KrnlHlprFwpsFilterPopulateLocalCopy(_In_ const FWPS_FILTER* pOriginalFi _Inout_ FWPS_FILTER* pFilter) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterPopulateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalFilter); NT_ASSERT(pFilter); @@ -8092,7 +8092,7 @@ NTSTATUS KrnlHlprFwpsFilterPopulateLocalCopy(_In_ const FWPS_FILTER* pOriginalFi KrnlHlprFwpsFilterPurgeLocalCopy(pFilter); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterPopulateLocalCopy() [status: %#x]\n", @@ -8105,7 +8105,7 @@ NTSTATUS KrnlHlprFwpsFilterPopulateLocalCopy(_In_ const FWPS_FILTER* pOriginalFi /** @kernel_helper_function="KrnlHlprFwpsFilterCreateLocalCopy - + Purpose: Allocate and populate a local copy of the FWPS_FILTER.

Notes: The caller is responsible for freeing the allocated memory using @@ -8124,13 +8124,13 @@ _Success_(return != 0) FWPS_FILTER* KrnlHlprFwpsFilterCreateLocalCopy(_In_ const FWPS_FILTER* pOriginalFilter) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsFilterCreateLocalCopy()\n"); #endif /// DBG - + NT_ASSERT(pOriginalFilter); NTSTATUS status = STATUS_SUCCESS; @@ -8153,7 +8153,7 @@ FWPS_FILTER* KrnlHlprFwpsFilterCreateLocalCopy(_In_ const FWPS_FILTER* pOriginal HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// pFilter initialized with call to HLPR_NEW & KrnlHlprFwpsFilterPopulateLocalCopy +#pragma warning(disable: 6001) /// pFilter initialized with call to HLPR_NEW & KrnlHlprFwpsFilterPopulateLocalCopy if(status != STATUS_SUCCESS) KrnlHlprFwpsFilterDestroyLocalCopy(&pFilter); @@ -8161,7 +8161,7 @@ FWPS_FILTER* KrnlHlprFwpsFilterCreateLocalCopy(_In_ const FWPS_FILTER* pOriginal #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsFilterCreateLocalCopy() [pFilter: %p]\n", @@ -8179,7 +8179,7 @@ FWPS_FILTER* KrnlHlprFwpsFilterCreateLocalCopy(_In_ const FWPS_FILTER* pOriginal /** @kernel_helper_function="KrnlHlprFwpmSessionReleaseHandle - + Purpose: Close an open handle to BFE.

Notes:
@@ -8192,13 +8192,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprFwpmSessionReleaseHandle(_Inout_ HANDLE* pEngineHandle) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmSessionReleaseHandle()\n"); #endif /// DBG - + NT_ASSERT(pEngineHandle); NTSTATUS status = STATUS_SUCCESS; @@ -8222,7 +8222,7 @@ NTSTATUS KrnlHlprFwpmSessionReleaseHandle(_Inout_ HANDLE* pEngineHandle) HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmSessionReleaseHandle() [status: %#x]\n", @@ -8235,7 +8235,7 @@ NTSTATUS KrnlHlprFwpmSessionReleaseHandle(_Inout_ HANDLE* pEngineHandle) /** @kernel_helper_function="KrnlHlprFwpmSessionDestroyEngineHandle - + Purpose: Close an open handle to BFE and set the handle to 0.

Notes:
@@ -8250,13 +8250,13 @@ _Success_(*ppEngineHandle == 0) VOID KrnlHlprFwpmSessionDestroyEngineHandle(_Inout_ HANDLE** ppEngineHandle) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmSessionDestroyEngineHandle()\n"); #endif /// DBG - + NT_ASSERT(ppEngineHandle); if(*ppEngineHandle) @@ -8265,7 +8265,7 @@ VOID KrnlHlprFwpmSessionDestroyEngineHandle(_Inout_ HANDLE** ppEngineHandle) *ppEngineHandle = 0; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmSessionDestroyEngineHandle()\n"); @@ -8277,7 +8277,7 @@ VOID KrnlHlprFwpmSessionDestroyEngineHandle(_Inout_ HANDLE** ppEngineHandle) /** @kernel_helper_function="KrnlHlprFwpmSessionAcquireHandle - + Purpose: Open a handle to BFE.

Notes:
@@ -8293,13 +8293,13 @@ NTSTATUS KrnlHlprFwpmSessionAcquireHandle(_Inout_ HANDLE* pEngineHandle, _In_ const GUID* pSessionKey) /* WFPSAMPLER_SESSION_KM */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmSessionAcquireHandle()\n"); #endif /// DBG - + NT_ASSERT(pEngineHandle); NT_ASSERT(pSessionKey); @@ -8328,7 +8328,7 @@ NTSTATUS KrnlHlprFwpmSessionAcquireHandle(_Inout_ HANDLE* pEngineHandle, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmSessionAcquireHandle() [status: %#x]\n", @@ -8341,7 +8341,7 @@ NTSTATUS KrnlHlprFwpmSessionAcquireHandle(_Inout_ HANDLE* pEngineHandle, /** @kernel_helper_function="KrnlHlprFwpmSessionCreateEngineHandle - + Purpose: Open a handle to BFE.

Notes:
@@ -8358,13 +8358,13 @@ NTSTATUS KrnlHlprFwpmSessionCreateEngineHandle(_Outptr_ HANDLE** ppEngineHandle, _In_ const GUID* pSessionKey) /* WFPSAMPLER_SESSION_KM */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpmSessionCreateEngineHandle()\n"); #endif /// DBG - + NT_ASSERT(ppEngineHandle); NT_ASSERT(pSessionKey); @@ -8384,7 +8384,7 @@ NTSTATUS KrnlHlprFwpmSessionCreateEngineHandle(_Outptr_ HANDLE** ppEngineHandle, KrnlHlprFwpmSessionReleaseHandle(&g_EngineHandle); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpmSessionCreateEngineHandle() [status: %#x]\n", @@ -8402,7 +8402,7 @@ NTSTATUS KrnlHlprFwpmSessionCreateEngineHandle(_Outptr_ HANDLE** ppEngineHandle, /** @kernel_helper_function="KrnlHlprFwpsInjectionReleaseHandle - + Purpose: Destroy an opened injection handle and set it to 0.

Notes:
@@ -8416,13 +8416,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprFwpsInjectionReleaseHandle(_In_ HANDLE* pInjectionHandle) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsInjectionReleaseHandle()\n"); #endif /// DBG - + NT_ASSERT(pInjectionHandle); NTSTATUS status = STATUS_SUCCESS; @@ -8443,7 +8443,7 @@ NTSTATUS KrnlHlprFwpsInjectionReleaseHandle(_In_ HANDLE* pInjectionHandle) HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsInjectionReleaseHandle() {status: %#x]\n", @@ -8456,7 +8456,7 @@ NTSTATUS KrnlHlprFwpsInjectionReleaseHandle(_In_ HANDLE* pInjectionHandle) /** @kernel_helper_function="KrnlHlprFwpsInjectionAcquireHandle - + Purpose: Open injection handle for use with the various injection APIs.

Notes:
@@ -8472,13 +8472,13 @@ NTSTATUS KrnlHlprFwpsInjectionAcquireHandle(_Inout_ HANDLE* pInjectionHandle, _In_ UINT32 injectionType) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsInjectionAcquireHandle()\n"); #endif /// DBG - + NT_ASSERT(pInjectionHandle); NTSTATUS status = STATUS_SUCCESS; @@ -8493,7 +8493,7 @@ NTSTATUS KrnlHlprFwpsInjectionAcquireHandle(_Inout_ HANDLE* pInjectionHandle, status); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsInjectionAcquireHandle() [status: %#x]\n", @@ -8513,7 +8513,7 @@ NTSTATUS KrnlHlprFwpsInjectionAcquireHandle(_Inout_ HANDLE* pInjectionHandle, /** @kernel_helper_function="KrnlHlprFwpsRedirectHandleDestroy - + Purpose: Destroy an opened redirection handle and set it to 0.

Notes:
@@ -8525,13 +8525,13 @@ _IRQL_requires_same_ VOID KrnlHlprFwpsRedirectHandleDestroy(_In_ HANDLE* pRedirectionHandle) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsRedirectHandleDestroy()\n"); #endif /// DBG - + NT_ASSERT(pRedirectionHandle); FwpsRedirectHandleDestroy(*pRedirectionHandle); @@ -8551,7 +8551,7 @@ VOID KrnlHlprFwpsRedirectHandleDestroy(_In_ HANDLE* pRedirectionHandle) /** @kernel_helper_function="KrnlHlprFwpsRedirectHandleCreate - + Purpose: Open redirection handle for use with the various redirection APIs.

Notes:
@@ -8565,13 +8565,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprFwpsRedirectHandleCreate(_Inout_ HANDLE* pRedirectionHandle) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprFwpsRedirectHandleCreate()\n"); #endif /// DBG - + NT_ASSERT(pRedirectionHandle); NTSTATUS status = STATUS_SUCCESS; @@ -8586,7 +8586,7 @@ NTSTATUS KrnlHlprFwpsRedirectHandleCreate(_Inout_ HANDLE* pRedirectionHandle) /* status); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprFwpsRedirectHandleCreate() [status: %#x]\n", @@ -8606,7 +8606,7 @@ NTSTATUS KrnlHlprFwpsRedirectHandleCreate(_Inout_ HANDLE* pRedirectionHandle) /* /** @helper function="KrnlHlprFwpsLayerGetDirection" - + Purpose: Determine the direction of the NBL based on the layer.

Notes:
@@ -8680,7 +8680,7 @@ FWP_DIRECTION KrnlHlprFwpsLayerGetDirection(_In_ UINT32 layerID) /** @helper function="KrnlHlprFwpsLayerIsIPv4" - + Purpose: Determine if the layer is an IPv4 layer.

Notes:
@@ -8750,7 +8750,7 @@ BOOLEAN KrnlHlprFwpsLayerIsIPv4(_In_ UINT32 layerID) /** @helper function="KrnlHlprFwpsLayerIsIPv6" - + Purpose: Determine if the layer is an IPv6 layer.

Notes:
@@ -8820,7 +8820,7 @@ BOOLEAN KrnlHlprFwpsLayerIsIPv6(_In_ UINT32 layerID) /** @helper function="KrnlHlprFwpsLayerIsDiscard" - + Purpose: Determine if the layer is a discard layer.

Notes:
@@ -8869,7 +8869,7 @@ BOOLEAN KrnlHlprFwpsLayerIsDiscard(_In_ UINT32 layerID) /** @helper function="KrnlHlprFwpsLayerIDToString" - + Purpose: Return a string representation of the supplied layer.

Notes:
diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h index 0e6f0eb8d..c88b9df2f 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h @@ -6,7 +6,7 @@ // HelperFunctions_FwpObjects.h // // Abstract: -// This module contains prototypes for kernel helper functions that allocate, populate, purge, +// This module contains prototypes for kernel helper functions that allocate, populate, purge, // and free structures in memory. // // Author: @@ -16,11 +16,11 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // March 11, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for multiple injectors and add -// KrnlHlprFwpValueGetStringForFwpsIncomingValue, +// December 13, 2013 - 1.1 - Add support for multiple injectors and add +// KrnlHlprFwpValueGetStringForFwpsIncomingValue, // KrnlHlprFwpsRedirectHandleCreate, // KrnlHlprFwpsRedirecthandleDestroy, -// KrnlHlprFwpsLayerIsDiscard, +// KrnlHlprFwpsLayerIsDiscard, // KrnlHlprFwpsLayerIDToString functions. // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp index f5bb66e36..9d4494b5d 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp @@ -6,13 +6,13 @@ // HelperFunctions_Headers.cpp // // Abstract: -// This module contains kernel helper functions that assist with IP and Transport header +// This module contains kernel helper functions that assist with IP and Transport header // operations. // // Naming Convention: // // -// +// // i.e. // // KrnlHlprIPHeaderCalculateV4Checksum @@ -74,11 +74,11 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Enhance annotations, add -// KrnlHlprIPHeaderGetDestinationAddressField, +// KrnlHlprIPHeaderGetDestinationAddressField, // KrnlHlprIPHeaderGetSourceAddressField, // KrnlHlprIPHeaderGetVersionField, // KrnlHlprTransportHeaderGetSourcePortField, -// KrnlHlprTransportHeaderGetDestinationPortField, add +// KrnlHlprTransportHeaderGetDestinationPortField, add // support for controlData, and fix various bugs. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -88,7 +88,7 @@ /** @private_kernel_helper_function="PrvKrnlHlprCopyBufferToMDL" - + Purpose: Copy a flat buffer into an MDL chain.

Notes:
@@ -102,7 +102,7 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer, _Out_ SIZE_T* pBytesCopied) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> PrvKrnlHlprCopyBufferToMDL()\n"); @@ -159,7 +159,7 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer, pMDL = pMDL->Next) { BYTE* pSystemAddress = 0; - + mdlByteCount = MmGetMdlByteCount(pMDL); if(mdlByteCount) { @@ -168,7 +168,7 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer, mdlByteCount -= mdlOffset; copySize = min(remainingBytesToCopy, - mdlByteCount); + mdlByteCount); pSystemAddress = (BYTE*)MmGetSystemAddressForMdlSafe(pMDL, LowPagePriority | noExecute); @@ -185,22 +185,22 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer, mdlOffset = 0; } else - { + { status = STATUS_INSUFFICIENT_RESOURCES; HLPR_BAIL; } } - } + } HLPR_BAIL_LABEL: - + *pBytesCopied = bytesToCopy - remainingBytesToCopy; ASSERT(*pBytesCopied <= bytesToCopy); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- PrvKrnlHlprCopyBufferToMDL() [status: %#x]\n", @@ -216,7 +216,7 @@ NTSTATUS PrvKrnlHlprCopyBufferToMDL(_In_reads_(bytesToCopy) const BYTE* pBuffer, /** @kernel_helper_function="KrnlHlprMACHeaderDestroy" - + Purpose: Frees the allocated memory indicated in KrnlMACHeaderGet().

Notes:
@@ -229,20 +229,20 @@ _Success_(*ppMACHeader == 0) inline VOID KrnlHlprMACHeaderDestroy(_Inout_ VOID** ppMACHeader) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprMACHeaderDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppMACHeader); HLPR_DELETE_ARRAY(*ppMACHeader, WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprMACHeaderDestroy()\n"); @@ -254,14 +254,14 @@ inline VOID KrnlHlprMACHeaderDestroy(_Inout_ VOID** ppMACHeader) /** @kernel_helper_function="KrnlHlprMACHeaderGet" - + Purpose: Retrieve a pointer to the MAC Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the MAC Header.

Function is overloaded.

- If needToFreeMemory is TRUE, caller should call KrnlHlprMACHeaderDestroy() when + If needToFreeMemory is TRUE, caller should call KrnlHlprMACHeaderDestroy() when finished with the header.

MSDN_Ref:
@@ -278,13 +278,13 @@ NTSTATUS KrnlHlprMACHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, _In_ UINT32 macHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprMACHeaderGet()\n"); #endif /// DBG - + NT_ASSERT(pNetBufferList); NT_ASSERT(ppMACHeader); NT_ASSERT(pNeedToFreeMemory); @@ -348,7 +348,7 @@ NTSTATUS KrnlHlprMACHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprMACHeaderGet() [status: %#x]\n", @@ -361,10 +361,10 @@ NTSTATUS KrnlHlprMACHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprMACHeaderModifySourceAddress" - + Purpose: Set the Source Address field in the MAC Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the MAC + Notes: The NetBufferList parameter is expected to be offset to the start of the MAC Header.

Assumes the Header is and Ethernet Header.
@@ -380,7 +380,7 @@ NTSTATUS KrnlHlprMACHeaderModifySourceAddress(_In_ const FWP_VALUE* pValue, _Inout_ NET_BUFFER_LIST* pNetBufferList) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprMACHeaderModifySourceAddress()\n"); @@ -433,7 +433,7 @@ NTSTATUS KrnlHlprMACHeaderModifySourceAddress(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprMACHeaderModifySourceAddress() [status: %#x]\n", @@ -446,10 +446,10 @@ NTSTATUS KrnlHlprMACHeaderModifySourceAddress(_In_ const FWP_VALUE* pValue, /** @kernel_helper_function="KrnlHlprMACHeaderModifyDestinationAddress" - + Purpose: Set the Destination Address field in the MAC Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the MAC + Notes: The NetBufferList parameter is expected to be offset to the start of the MAC Header.

Assumes the Header is and Ethernet Header.
@@ -465,7 +465,7 @@ NTSTATUS KrnlHlprMACHeaderModifyDestinationAddress(_In_ const FWP_VALUE* pValue, _Inout_ NET_BUFFER_LIST* pNetBufferList) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprMACHeaderModifyDestinationAddress()\n"); @@ -518,7 +518,7 @@ NTSTATUS KrnlHlprMACHeaderModifyDestinationAddress(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprMACHeaderModifyDestinationAddress() [status: %#x]\n", @@ -536,7 +536,7 @@ NTSTATUS KrnlHlprMACHeaderModifyDestinationAddress(_In_ const FWP_VALUE* pValue, /** @kernel_helper_function="KrnlHlprIPHeaderDestroy" - + Purpose: Frees the allocated memory indicated in KrnlIPHeaderGet().

Notes:
@@ -549,37 +549,37 @@ _Success_(*ppIPHeader == 0) inline VOID KrnlHlprIPHeaderDestroy(_Inout_ VOID** ppIPHeader) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppIPHeader); HLPR_DELETE_ARRAY(*ppIPHeader, WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPHeaderDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprIPHeaderGet" - + Purpose: Retrieve a pointer to the IP Header from the NET_BUFFER_LIST.

Notes: Function is overloaded .

- If needToFreeMemory is TRUE, caller should call KrnlHlprIPHeaderDestroy() when + If needToFreeMemory is TRUE, caller should call KrnlHlprIPHeaderDestroy() when finished with the header.

MSDN_Ref:
@@ -668,7 +668,7 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, direction = FWP_DIRECTION_OUTBOUND; /// At the IP Header - + break; } case FWPS_LAYER_IPFORWARD_V4: @@ -677,7 +677,7 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, case FWPS_LAYER_IPFORWARD_V6_DISCARD: { /// At the IP Header - + break; } case FWPS_LAYER_INBOUND_TRANSPORT_V4: @@ -703,7 +703,7 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, direction = FWP_DIRECTION_OUTBOUND; ipHeaderAvailable = FALSE; - + break; } case FWPS_LAYER_STREAM_V4: @@ -732,7 +732,7 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, else bytesRetreated = ipHeaderSize + transportHeaderSize; } - + break; } case FWPS_LAYER_INBOUND_ICMP_ERROR_V4: @@ -826,7 +826,7 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, else bytesRetreated = ipHeaderSize + transportHeaderSize; } - + break; } @@ -879,9 +879,9 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, break; } - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + case FWPS_LAYER_INBOUND_MAC_FRAME_ETHERNET: { UINT16 etherType = pClassifyValues->incomingValue[FWPS_FIELD_INBOUND_MAC_FRAME_ETHERNET_ETHER_TYPE].value.uint16; @@ -1031,12 +1031,12 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, if(!pContiguousData) { status = STATUS_UNSUCCESSFUL; - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, " !!!! KrnlHlprIPHeaderGet : NdisGetDataBuffer() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -1076,14 +1076,14 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprIPHeaderGet" - + Purpose: Retrieve a pointer to the IP Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the IP Header.

Function is overloaded.

- If needToFreeMemory is TRUE, caller should call KrnlHlprIPHeaderDestroy() when + If needToFreeMemory is TRUE, caller should call KrnlHlprIPHeaderDestroy() when finished with the header.

MSDN_Ref:
@@ -1100,13 +1100,13 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, _In_ UINT32 ipHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderGet()\n"); #endif /// DBG - + NT_ASSERT(pNetBufferList); NT_ASSERT(ppIPHeader); NT_ASSERT(pNeedToFreeMemory); @@ -1170,20 +1170,20 @@ NTSTATUS KrnlHlprIPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPHeaderGet() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprIPHeaderGetDestinationAddressField" - + Purpose: Retrieve the source address from the IP header.

Notes: Assumes the NBL is at the start of the IP Header.
@@ -1226,7 +1226,7 @@ BYTE* KrnlHlprIPHeaderGetDestinationAddressField(_In_ NET_BUFFER_LIST* pNetBuffe else { IP_HEADER_V4* pIPv4Header = (IP_HEADER_V4*)pIPHeader; - + pDestinationAddress = pIPv4Header->pDestinationAddress; } @@ -1270,7 +1270,7 @@ BYTE* KrnlHlprIPHeaderGetDestinationAddressField(_In_ NET_BUFFER_LIST* pNetBuffe /** @kernel_helper_function="KrnlHlprIPHeaderGetSourceAddressField" - + Purpose: Retrieve the source address from the IP header.

Notes: Assumes the NBL is at the start of the IP Header.
@@ -1285,7 +1285,7 @@ BYTE* KrnlHlprIPHeaderGetSourceAddressField(_In_ NET_BUFFER_LIST* pNetBufferList _In_ ADDRESS_FAMILY addressFamily) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderGetSourceAddressField()\n"); @@ -1313,7 +1313,7 @@ BYTE* KrnlHlprIPHeaderGetSourceAddressField(_In_ NET_BUFFER_LIST* pNetBufferList else { IP_HEADER_V4* pIPv4Header = (IP_HEADER_V4*)pIPHeader; - + pSourceAddress = pIPv4Header->pSourceAddress; } @@ -1357,7 +1357,7 @@ BYTE* KrnlHlprIPHeaderGetSourceAddressField(_In_ NET_BUFFER_LIST* pNetBufferList /** @kernel_helper_function="KrnlHlprIPHeaderGetProtocolField" - + Purpose: Retrieve the protocol from the IP header.

Notes: Assumes the NBL is at the start of the IP Header.
@@ -1399,7 +1399,7 @@ IPPROTO KrnlHlprIPHeaderGetProtocolField(_In_ NET_BUFFER_LIST* pNetBufferList, else { IP_HEADER_V4* pIPv4Header = (IP_HEADER_V4*)pIPHeader; - + protocol = (IPPROTO)pIPv4Header->protocol; } @@ -1442,7 +1442,7 @@ IPPROTO KrnlHlprIPHeaderGetProtocolField(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprIPHeaderGetVersionField" - + Purpose: Retrieve the version from the IP header.

Notes: Assumes the NBL is at the start of the IP Header.
@@ -1515,7 +1515,7 @@ UINT8 KrnlHlprIPHeaderGetVersionField(_In_ NET_BUFFER_LIST* pNetBufferList) /** @kernel_helper_function="KrnlHlprIPHeaderCalculateV4Checksum" - + Purpose: Calculate the Checksum for the IPv4 Header.

Notes: Assumes the NBL is at the start of the IPv4 Header.
@@ -1529,13 +1529,13 @@ VOID KrnlHlprIPHeaderCalculateV4Checksum(_Inout_ NET_BUFFER_LIST* pNetBufferList _In_ UINT32 ipHeaderSize) /* IPV4_HEADER_MIN_SIZE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderCalculateV4Checksum()\n"); #endif /// DBG - + NT_ASSERT(pNetBufferList); NTSTATUS status = STATUS_SUCCESS; @@ -1593,19 +1593,19 @@ VOID KrnlHlprIPHeaderCalculateV4Checksum(_Inout_ NET_BUFFER_LIST* pNetBufferList } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPHeaderCalculateV4Checksum()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprIPHeaderModifySourceAddress" - + Purpose: Set the Source Address field in the IP Header to the provided value.

Notes: The NetBufferList parameter is expected to be offset to the start of the IP Header.
@@ -1627,13 +1627,13 @@ NTSTATUS KrnlHlprIPHeaderModifySourceAddress(_In_ const FWP_VALUE* pValue, _In_ BOOLEAN convertByteOrder) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderModifySourceAddress()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -1702,20 +1702,20 @@ NTSTATUS KrnlHlprIPHeaderModifySourceAddress(_In_ const FWP_VALUE* pValue, KrnlHlprIPHeaderCalculateV4Checksum(pNetBufferList); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPHeaderModifySourceAddress() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprIPHeaderModifyDestinationAddress" - + Purpose: Set the Destination Address field in the IP Header to the provided value.

Notes: The NetBufferList parameter is expected to be offset to the start of the IP Header.
@@ -1737,13 +1737,13 @@ NTSTATUS KrnlHlprIPHeaderModifyDestinationAddress(_In_ const FWP_VALUE* pValue, _In_ BOOLEAN convertByteOrder) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderModifyDestinationAddress()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -1812,29 +1812,29 @@ NTSTATUS KrnlHlprIPHeaderModifyDestinationAddress(_In_ const FWP_VALUE* pValue, KrnlHlprIPHeaderCalculateV4Checksum(pNetBufferList); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPHeaderModifyDestinationAddress() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprIPHeaderModifyLoopbackToLocal" - - Purpose: Modifies the source address and destination address from software loopback to an + + Purpose: Modifies the source address and destination address from software loopback to an actual local IP address (i.e. 127.0.0.1 to 157.59.10.233).

Notes: The NetBufferList parameter is expected to be offset to the start of the IP Header.

- The source address is modified to pass TCP/IP's source IP address validation, and + The source address is modified to pass TCP/IP's source IP address validation, and the destination address is modified to pass TCP/IP's zone crossing restrictions.

- For some protocols, the need to capture and modify a response packet's addresses + For some protocols, the need to capture and modify a response packet's addresses back to the loopback addresses will exist (i.e. ICMP Echo Requests)

MSDN_Ref:
@@ -1852,13 +1852,13 @@ NTSTATUS KrnlHlprIPHeaderModifyLoopbackToLocal(_In_ const FWPS_INCOMING_METADATA _In_ UINT32 controlDataSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprIPHeaderModifyLoopbackToLocal()\n"); #endif /// DBG - + NT_ASSERT(pMetadata); NT_ASSERT(pLoopbackAddress); NT_ASSERT(pNetBufferList); @@ -1975,14 +1975,14 @@ NTSTATUS KrnlHlprIPHeaderModifyLoopbackToLocal(_In_ const FWPS_INCOMING_METADATA KrnlHlprIPHeaderDestroy(&pIPHeader); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprIPHeaderModifyLoopbackToLocal() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -1993,7 +1993,7 @@ NTSTATUS KrnlHlprIPHeaderModifyLoopbackToLocal(_In_ const FWPS_INCOMING_METADATA /** @kernel_helper_function="KrnlHlprTransportHeaderDestroy" - + Purpose: Frees the allocated memory indicated in KrnlTransportHeaderGet().

Notes: For use with generic and specific transport header functions.
@@ -2006,37 +2006,37 @@ _Success_(*ppTransportHeader == 0) inline VOID KrnlHlprTransportHeaderDestroy(_Inout_ VOID** ppTransportHeader) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprTransportHeaderDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppTransportHeader); HLPR_DELETE_ARRAY(*ppTransportHeader, WFPSAMPLER_SYSLIB_TAG); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprTransportHeaderDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprTransportHeaderGet" - + Purpose: Retrieve a pointer to the Transport Header from the NET_BUFFER_LIST.

Notes: Function is overloaded. .

- If needToFreeMemory is TRUE, caller should call KrnlHlprTransportHeaderDestroy() + If needToFreeMemory is TRUE, caller should call KrnlHlprTransportHeaderDestroy() when finished with the header.

MSDN_Ref:
@@ -2113,7 +2113,7 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, case FWPS_LAYER_OUTBOUND_IPPACKET_V6_DISCARD: { bytesAdvanced = ipHeaderSize; - + break; } case FWPS_LAYER_IPFORWARD_V4: @@ -2122,7 +2122,7 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, case FWPS_LAYER_IPFORWARD_V6_DISCARD: { bytesAdvanced = ipHeaderSize; - + break; } case FWPS_LAYER_INBOUND_TRANSPORT_V4: @@ -2150,7 +2150,7 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, protocol = (IPPROTO)(pClassifyValues->incomingValue[FWPS_FIELD_OUTBOUND_TRANSPORT_V4_IP_PROTOCOL].value.uint8); /// At the Transport Header - + break; } case FWPS_LAYER_STREAM_V4: @@ -2185,7 +2185,7 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, else bytesRetreated = transportHeaderSize; } - + break; } case FWPS_LAYER_INBOUND_ICMP_ERROR_V4: @@ -2269,7 +2269,7 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, { /// At the Transport Header } - + break; } case FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4: @@ -2295,7 +2295,7 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, else bytesRetreated = transportHeaderSize; } - + break; } @@ -2352,9 +2352,9 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, break; } - + #if(NTDDI_VERSION >= NTDDI_WIN8) - + case FWPS_LAYER_INBOUND_MAC_FRAME_ETHERNET: case FWPS_LAYER_OUTBOUND_MAC_FRAME_ETHERNET: case FWPS_LAYER_INBOUND_MAC_FRAME_NATIVE: @@ -2461,12 +2461,12 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, if(!pContiguousData) { status = STATUS_UNSUCCESSFUL; - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, " !!!! KrnlHlprTransportHeaderGet : NdisGetDataBuffer() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -2509,14 +2509,14 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprTransportHeaderGet" - + Purpose: Retrieve a pointer to the Transport Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the Transport Header.

Function is overloaded.

- If needToFreeMemory is TRUE, caller should call KrnlHlprTransportHeaderDestroy() + If needToFreeMemory is TRUE, caller should call KrnlHlprTransportHeaderDestroy() when finished with the header.

MSDN_Ref:
@@ -2533,13 +2533,13 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, _In_ UINT32 transportHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprTransportHeaderGet()\n"); #endif /// DBG - + NT_ASSERT(pNetBufferList); NT_ASSERT(ppTransportHeader); NT_ASSERT(pNeedToFreeMemory); @@ -2604,20 +2604,20 @@ NTSTATUS KrnlHlprTransportHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprTransportHeaderGet() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprTransportHeaderGetSourcePortField" - + Purpose: Retrieve the source port from the Transport header.

Notes: Assumes the NBL is at the start of the Transport Header.
@@ -2725,7 +2725,7 @@ UINT16 KrnlHlprTransportHeaderGetSourcePortField(_In_ NET_BUFFER_LIST* pNetBuffe /** @kernel_helper_function="KrnlHlprTransportHeaderGetDestinationPortField" - + Purpose: Retrieve the destination port from the Transport header.

Notes: Assumes the NBL is at the start of the Transport Header.
@@ -2838,7 +2838,7 @@ UINT16 KrnlHlprTransportHeaderGetDestinationPortField(_In_ NET_BUFFER_LIST* pNet /** @kernel_helper_function="KrnlHlprICMPv4HeaderGet" - + Purpose: Retrieve a pointer to the ICMPv4 Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the ICMPv4 Header.
@@ -2857,7 +2857,7 @@ NTSTATUS KrnlHlprICMPv4HeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, _In_ UINT32 icmpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv4HeaderGet()\n"); @@ -2929,7 +2929,7 @@ NTSTATUS KrnlHlprICMPv4HeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv4HeaderGet() [status: %#x]\n", status); - + #endif /// DBG return status; @@ -2937,10 +2937,10 @@ NTSTATUS KrnlHlprICMPv4HeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprICMPv4HeaderModifyType" - + Purpose: Set the ICMP Type field in the ICMPv4 Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv4 + Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv4 Header.

MSDN_Ref:
@@ -2955,13 +2955,13 @@ NTSTATUS KrnlHlprICMPv4HeaderModifyType(_In_ const FWP_VALUE* pValue, _In_ UINT32 icmpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv4HeaderModifyType()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3004,23 +3004,23 @@ NTSTATUS KrnlHlprICMPv4HeaderModifyType(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprICMPv4HeaderModifyType() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprICMPv4HeaderModifyCode" - + Purpose: Set the ICMP Code field in the ICMPv4 Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv4 + Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv4 Header.

MSDN_Ref:
@@ -3035,13 +3035,13 @@ NTSTATUS KrnlHlprICMPv4HeaderModifyCode(_In_ const FWP_VALUE* pValue, _In_ UINT32 icmpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv4HeaderModifyCode()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3091,7 +3091,7 @@ NTSTATUS KrnlHlprICMPv4HeaderModifyCode(_In_ const FWP_VALUE* pValue, status); #endif /// DBG - + return status; } @@ -3102,7 +3102,7 @@ NTSTATUS KrnlHlprICMPv4HeaderModifyCode(_In_ const FWP_VALUE* pValue, /** @kernel_helper_function="KrnlHlprICMPv6HeaderGet" - + Purpose: Retrieve a pointer to the ICMPv6 Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the ICMPv6 Header.
@@ -3121,11 +3121,11 @@ NTSTATUS KrnlHlprICMPv6HeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, _In_ UINT32 icmpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv6HeaderGet()\n"); - + #endif /// DBG NTSTATUS status = STATUS_SUCCESS; @@ -3193,7 +3193,7 @@ NTSTATUS KrnlHlprICMPv6HeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv4HeaderGet() [status: %#x]\n", status); - + #endif /// DBG return status; @@ -3201,10 +3201,10 @@ NTSTATUS KrnlHlprICMPv6HeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprICMPv6HeaderModifyType" - + Purpose: Set the ICMP Type field in the ICMPv6 Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv6 + Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv6 Header.

MSDN_Ref:
@@ -3219,13 +3219,13 @@ NTSTATUS KrnlHlprICMPv6HeaderModifyType(_In_ const FWP_VALUE* pValue, _In_ UINT32 icmpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv6HeaderModifyType()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3268,23 +3268,23 @@ NTSTATUS KrnlHlprICMPv6HeaderModifyType(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprICMPv6HeaderModifyType() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprICMPv6HeaderModifyCode" - + Purpose: Set the ICMP Code field in the ICMPv6 Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv6 + Notes: The NetBufferList parameter is expected to be offset to the start of the ICMPv6 Header.

MSDN_Ref:
@@ -3299,13 +3299,13 @@ NTSTATUS KrnlHlprICMPv6HeaderModifyCode(_In_ const FWP_VALUE* pValue, _In_ UINT32 icmpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprICMPv6HeaderModifyCode()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3348,14 +3348,14 @@ NTSTATUS KrnlHlprICMPv6HeaderModifyCode(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprICMPv6HeaderModifyCode() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -3366,7 +3366,7 @@ NTSTATUS KrnlHlprICMPv6HeaderModifyCode(_In_ const FWP_VALUE* pValue, /** @kernel_helper_function="KrnlHlprTCPHeaderGet" - + Purpose: Retrieve a pointer to the TCP Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the TCP Header.
@@ -3389,7 +3389,7 @@ NTSTATUS KrnlHlprTCPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprTCPHeaderGet()\n"); - + #endif /// DBG NTSTATUS status = STATUS_SUCCESS; @@ -3452,12 +3452,12 @@ NTSTATUS KrnlHlprTCPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprTCPHeaderGet() [status: %#x]\n", status); - + #endif /// DBG return status; @@ -3465,10 +3465,10 @@ NTSTATUS KrnlHlprTCPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprTCPHeaderModifySourcePort" - + Purpose: Set the Source Address field in the TCP Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the TCP + Notes: The NetBufferList parameter is expected to be offset to the start of the TCP Header.

Values should be in Network Byte Order.
@@ -3492,7 +3492,7 @@ NTSTATUS KrnlHlprTCPHeaderModifySourcePort(_In_ const FWP_VALUE* pValue, " ---> KrnlHlprTCPHeaderModifySourcePort()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3536,23 +3536,23 @@ NTSTATUS KrnlHlprTCPHeaderModifySourcePort(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprTCPHeaderModifySourcePort() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprTCPHeaderModifyDestinationPort" - + Purpose: Set the Destination Address field in the TCP Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the TCP + Notes: The NetBufferList parameter is expected to be offset to the start of the TCP Header.

Values should be in Network Byte Order.
@@ -3570,13 +3570,13 @@ NTSTATUS KrnlHlprTCPHeaderModifyDestinationPort(_In_ const FWP_VALUE* pValue, _In_ BOOLEAN convertByteOrder) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprTCPHeaderModifyDestinationPort()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3620,14 +3620,14 @@ NTSTATUS KrnlHlprTCPHeaderModifyDestinationPort(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprTCPHeaderModifyDestinationPort() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -3638,7 +3638,7 @@ NTSTATUS KrnlHlprTCPHeaderModifyDestinationPort(_In_ const FWP_VALUE* pValue, /** @kernel_helper_function="KrnlHlprUDPHeaderGet" - + Purpose: Retrieve a pointer to the UDP Header from the NET_BUFFER_LIST.

Notes: Assumes the NBL is at the start of the UDP Header.
@@ -3657,11 +3657,11 @@ NTSTATUS KrnlHlprUDPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, _In_ UINT32 udpHeaderSize) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprUDPHeaderGet()\n"); - + #endif /// DBG NTSTATUS status = STATUS_SUCCESS; @@ -3737,10 +3737,10 @@ NTSTATUS KrnlHlprUDPHeaderGet(_In_ NET_BUFFER_LIST* pNetBufferList, /** @kernel_helper_function="KrnlHlprUDPHeaderModifySourcePort" - + Purpose: Set the Source Address field in the UDP Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the UDP + Notes: The NetBufferList parameter is expected to be offset to the start of the UDP Header.

Values should be in Network Byte Order.
@@ -3758,13 +3758,13 @@ NTSTATUS KrnlHlprUDPHeaderModifySourcePort(_In_ const FWP_VALUE* pValue, _In_ BOOLEAN convertByteOrder) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprUDPHeaderModifySourcePort()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3808,23 +3808,23 @@ NTSTATUS KrnlHlprUDPHeaderModifySourcePort(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprUDPHeaderModifySourcePort() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprUDPHeaderModifyDestinationPort" - + Purpose: Set the Destination Address field in the UDP Header to the provided value.

- Notes: The NetBufferList parameter is expected to be offset to the start of the UDP + Notes: The NetBufferList parameter is expected to be offset to the start of the UDP Header.

Values should be in Network Byte Order.
@@ -3842,13 +3842,13 @@ NTSTATUS KrnlHlprUDPHeaderModifyDestinationPort(_In_ const FWP_VALUE* pValue, _In_ BOOLEAN convertByteOrder) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprUDPHeaderModifyDestinationPort()\n"); #endif /// DBG - + NT_ASSERT(pValue); NT_ASSERT(pNetBufferList); @@ -3892,14 +3892,14 @@ NTSTATUS KrnlHlprUDPHeaderModifyDestinationPort(_In_ const FWP_VALUE* pValue, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprUDPHeaderModifyDestinationPort() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.h b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.h index 04ecf96c2..452c29e9b 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.h @@ -6,7 +6,7 @@ // HelperFunctions_Headers.h // // Abstract: -// This module contains definitions and prototypes of kernel helper functions that assist with +// This module contains definitions and prototypes of kernel helper functions that assist with // MAC, IP, and Transport header operations. // // Author: @@ -17,7 +17,7 @@ // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation // December 13, 2013 - 1.1 - Enhance annotations and add -// KrnlHlprIPHeaderGetDestinationAddressField, +// KrnlHlprIPHeaderGetDestinationAddressField, // KrnlHlprIPHeaderGetSourceAddressField, // KrnlHlprIPHeaderGetVersionField, // KrnlHlprTransportHeaderGetSourcePortField, diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_ICMPMessages.h b/network/trans/WFPSampler/syslib/HelperFunctions_ICMPMessages.h index d8a5437b5..325d79efa 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_ICMPMessages.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_ICMPMessages.h @@ -6,7 +6,7 @@ // HelperFunctions_ICMPMessages.h // // Abstract: -// This module contains prototypes for kernel helper functions that assist with ICMP Message +// This module contains prototypes for kernel helper functions that assist with ICMP Message // packets. // // Author: diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp index 64de129de..a8258c522 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp @@ -6,13 +6,13 @@ // HelperFunctions_InjectionData.cpp // // Abstract: -// This module contains kernel helper functions that assist with INJECTION_DATA and +// This module contains kernel helper functions that assist with INJECTION_DATA and // INJECTION_HANDLE_DATA. // // Naming Convention: // // -// +// // i.e. // // KrnlHlprInjectionDataCreate @@ -47,8 +47,8 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance annotations, add multiple injector support, add -// missing layers for injection handles, and add +// December 13, 2013 - 1.1 - Enhance annotations, add multiple injector support, add +// missing layers for injection handles, and add // support for controlData. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -61,7 +61,7 @@ /** @kernel_helper_function="KrnlHlprInjectionDataPurge" - + Purpose: Cleanup a INJECTION_DATA object.

Notes:
@@ -74,13 +74,13 @@ _IRQL_requires_same_ VOID KrnlHlprInjectionDataPurge(_Inout_ INJECTION_DATA* pInjectionData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprInjectionDataPurge()\n"); #endif /// DBG - + NT_ASSERT(pInjectionData); if(pInjectionData->pControlData) @@ -99,13 +99,13 @@ VOID KrnlHlprInjectionDataPurge(_Inout_ INJECTION_DATA* pInjectionData) " <--- KrnlHlprInjectionDataPurge()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprInjectionDataDestroy" - + Purpose: Cleanup and free a INJECTION_DATA object.

Notes:
@@ -121,13 +121,13 @@ _Success_(*ppInjectionData == 0) VOID KrnlHlprInjectionDataDestroy(_Inout_ INJECTION_DATA** ppInjectionData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprInjectionDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppInjectionData); if(*ppInjectionData) @@ -139,20 +139,20 @@ VOID KrnlHlprInjectionDataDestroy(_Inout_ INJECTION_DATA** ppInjectionData) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprInjectionDataDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprInjectionDataPopulate" - - Purpose: Populates a INJECTION_DATA object with the data based off values obtained in the + + Purpose: Populates a INJECTION_DATA object with the data based off values obtained in the classifyFn.

Notes:
@@ -171,13 +171,13 @@ NTSTATUS KrnlHlprInjectionDataPopulate(_Inout_ INJECTION_DATA* pInjectionData, _In_ const FWPS_FILTER* pFilter) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprInjectionDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pInjectionData); NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadataValues); @@ -230,7 +230,7 @@ NTSTATUS KrnlHlprInjectionDataPopulate(_Inout_ INJECTION_DATA* pInjectionData, WFPSAMPLER_CALLOUT_DRIVER_TAG); HLPR_BAIL_ON_ALLOC_FAILURE(pInjectionData->pControlData, status); - + RtlCopyMemory(pInjectionData->pControlData, pMetadataValues->controlData, pMetadataValues->controlDataLength); @@ -606,21 +606,21 @@ NTSTATUS KrnlHlprInjectionDataPopulate(_Inout_ INJECTION_DATA* pInjectionData, HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprInjectionDataPopulate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprInjectionDataCreate" - - Purpose: Allocates and populates a INJECTION_DATA object with data based on values obtained + + Purpose: Allocates and populates a INJECTION_DATA object with data based on values obtained in the classifyFn.

Notes:
@@ -642,13 +642,13 @@ NTSTATUS KrnlHlprInjectionDataCreate(_Outptr_ INJECTION_DATA** ppInjectionData, _In_ const FWPS_FILTER* pFilter) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprInjectionDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppInjectionData); NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadataValues); @@ -671,7 +671,7 @@ NTSTATUS KrnlHlprInjectionDataCreate(_Outptr_ INJECTION_DATA** ppInjectionData, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// *ppInjectionData initialized with call to HLPR_NEW & KrnlHlprInjectionDataPopulate +#pragma warning(disable: 6001) /// *ppInjectionData initialized with call to HLPR_NEW & KrnlHlprInjectionDataPopulate if(status != STATUS_SUCCESS && *ppInjectionData) @@ -680,14 +680,14 @@ NTSTATUS KrnlHlprInjectionDataCreate(_Outptr_ INJECTION_DATA** ppInjectionData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprInjectionDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } @@ -698,7 +698,7 @@ NTSTATUS KrnlHlprInjectionDataCreate(_Outptr_ INJECTION_DATA** ppInjectionData, /** @kernel_helper_function="KrnlHlprInjectionHandleDataDestroy" - + Purpose: Cleanup and free a INJECTION_HANDLE_DATA object.

Notes:
@@ -713,13 +713,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprInjectionHandleDataDestroy(_Inout_ INJECTION_HANDLE_DATA** ppInjectionHandleData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprInjectionHandleDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppInjectionHandleData); NTSTATUS status = STATUS_SUCCESS; @@ -769,24 +769,24 @@ NTSTATUS KrnlHlprInjectionHandleDataDestroy(_Inout_ INJECTION_HANDLE_DATA** ppIn HLPR_BAIL_LABEL: #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprInjectionHandleDataDestroy() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprInjectionHandleDataCreate" - - Purpose: Allocates and populates a INJECTION_HANDLE_DATA object with the various injection + + Purpose: Allocates and populates a INJECTION_HANDLE_DATA object with the various injection handles created when the driver loads.

- Notes: The index is related to which sublayer the handle operates on. For + Notes: The index is related to which sublayer the handle operates on. For FWPM_SUBLAYER_UNIVERSAL, the index is 1, otherwise it's 0.

MSDN_Ref:
@@ -804,13 +804,13 @@ NTSTATUS KrnlHlprInjectionHandleDataCreate(_Outptr_ INJECTION_HANDLE_DATA** ppIn _In_ UINT32 index) /* WFPSAMPLER_INDEX */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprInjectionHandleDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppInjectionHandleData); NTSTATUS status = STATUS_SUCCESS; @@ -974,14 +974,14 @@ NTSTATUS KrnlHlprInjectionHandleDataCreate(_Outptr_ INJECTION_HANDLE_DATA** ppIn KrnlHlprInjectionHandleDataDestroy(ppInjectionHandleData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprInjectionHandleDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h index 9967c1e74..d22e0c85c 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h @@ -15,7 +15,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Enhance annotations, add multiple injector support, and +// December 13, 2013 - 1.1 - Enhance annotations, add multiple injector support, and // add support for controlData. // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_Macros.h b/network/trans/WFPSampler/syslib/HelperFunctions_Macros.h index 8af997bba..db67351b5 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_Macros.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_Macros.h @@ -65,7 +65,7 @@ extern "C" /** @macro="htonl" - + Purpose: Convert ULONG in Host Byte Order to Network Byte Order.

Notes:
@@ -80,7 +80,7 @@ extern "C" /** @macro="htons" - + Purpose: Convert USHORT in Host Byte Order to Network Byte Order.

Notes:
@@ -93,7 +93,7 @@ extern "C" /** @macro="ntohl" - + Purpose: Convert ULONG in Network Byte Order to Host Byte Order.

Notes:
@@ -108,7 +108,7 @@ extern "C" /** @macro="ntohs" - + Purpose: Convert USHORT in Network Byte Order to Host Byte Order.

Notes:
@@ -122,7 +122,7 @@ extern "C" /** @macro="HLPR_CLOSE_HANDLE" - + Purpose: Close a standard handle and set to 0.

Notes:
@@ -138,7 +138,7 @@ extern "C" /** @macro="HLPR_REG_CLOSE_KEY" - + Purpose: Close a registry handle and set to 0.

Notes:
@@ -154,7 +154,7 @@ extern "C" /** @macro="HLPR_DELETE" - + Purpose: Free memory allocated with ExAllocatePoolZero and set the pointer to 0.

Notes:
@@ -171,7 +171,7 @@ extern "C" /** @macro="HLPR_DELETE_ARRAY" - + Purpose: Free memory allocated with ExAllocatePoolZero and set the pointer to 0.

Notes:
@@ -183,8 +183,8 @@ extern "C" /** @macro="HLPR_NEW" - - Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and initialize it's + + Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and initialize it's contents with 0's.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE.
@@ -206,8 +206,8 @@ extern "C" /** @macro="HLPR_NEW_ARRAY" - - Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and initialize it's + + Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and initialize it's contents with 0's.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE_ARRAY.
@@ -242,8 +242,8 @@ extern "C" /** @macro="HLPR_NEW_CASTED_ARRAY" - - Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and initialize it's + + Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and initialize it's contents with 0's.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE_ARRAY.
@@ -278,8 +278,8 @@ extern "C" /** @macro="HLPR_NEW" - - Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and leave it's + + Purpose: Allocate memory from NonPaged Pool with ExAllocatePoolZero and leave it's contents as is.

Notes: Caller responsible for freeing allocated memory using macro HLPR_DELETE.
@@ -298,7 +298,7 @@ extern "C" /** @macro="HLPR_BAIL_LABEL" - + Purpose: Tag for the cleanup and exit portion of the function.

Notes:
@@ -310,7 +310,7 @@ extern "C" /** @macro="HLPR_BAIL_LABEL" - + Purpose: Tag for the cleanup and exit portion of the function.

Notes: Used when there can be more than 1 jump in code.
@@ -322,7 +322,7 @@ extern "C" /** @macro="HLPR_BAIL_ON_FAILURE_WITH_LABEL" - + Purpose: Jump in the code's execution to the provided label if an error occurs.

Notes:
@@ -343,7 +343,7 @@ extern "C" /** @macro="HLPR_BAIL_ON_FAILURE" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if an error occurs.

Notes:
@@ -355,8 +355,8 @@ extern "C" /** @macro="HLPR_BAIL_ON_FAILURE_2" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 label if an error + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 label if an error occurs.

Notes:
@@ -368,8 +368,8 @@ extern "C" /** @macro="HLPR_BAIL_ON_ALLOC_FAILURE" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if memory allocation + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if memory allocation fails.

Notes:
@@ -381,8 +381,8 @@ extern "C" /** @macro="HLPR_BAIL_ON_ALLOC_FAILURE_2" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 label if memory + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 label if memory allocation fails.

Notes:
@@ -394,7 +394,7 @@ extern "C" /** @macro="HLPR_BAIL_WITH_LABEL" - + Purpose: Jump in the code's execution path to the provided label.

Notes:
@@ -406,7 +406,7 @@ extern "C" /** @macro="HLPR_BAIL" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label.

Notes:
@@ -418,7 +418,7 @@ extern "C" /** @macro="HLPR_BAIL_2" - + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL_2 label.

Notes:
@@ -430,8 +430,8 @@ extern "C" /** @macro="HLPR_BAIL_ON_NULL_POINTER" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if the pointer is + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if the pointer is NULL.

Notes:
@@ -444,8 +444,8 @@ extern "C" /** @macro="HLPR_BAIL_ON_NULL_POINTER_WITH_STATUS" - - Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if the pointer is + + Purpose: Jump in the code's execution path to the HLPR_BAIL_LABEL label if the pointer is NULL.

Notes: Status is set to STATUS_INVALID_ADDRESS.
diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_NDIS.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_NDIS.cpp index b56c63c60..ba7022c85 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_NDIS.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_NDIS.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprNDISPoolDataDestroy @@ -51,7 +51,7 @@ /** @kernel_helper_function="KrnlHlprNDISPoolDataDestroy" - + Purpose: Cleanup a NDIS_POOL_DATA object.

Notes:
@@ -66,13 +66,13 @@ _IRQL_requires_same_ inline VOID KrnlHlprNDISPoolDataPurge(_Inout_ NDIS_POOL_DATA* pNDISPoolData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprNDISPoolDataPurge()\n"); #endif /// DBG - + NT_ASSERT(pNDISPoolData); if(pNDISPoolData->ndisHandle) @@ -100,19 +100,19 @@ inline VOID KrnlHlprNDISPoolDataPurge(_Inout_ NDIS_POOL_DATA* pNDISPoolData) sizeof(NDIS_POOL_DATA)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprNDISPoolDataPurge()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprNDISPoolDataDestroy" - + Purpose: Cleanup a NDIS_POOL_DATA object.

Notes:
@@ -128,13 +128,13 @@ _Success_(*ppNDISPoolData == 0) inline VOID KrnlHlprNDISPoolDataDestroy(_Inout_ NDIS_POOL_DATA** ppNDISPoolData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprNDISPoolDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppNDISPoolData); if(*ppNDISPoolData) @@ -146,19 +146,19 @@ inline VOID KrnlHlprNDISPoolDataDestroy(_Inout_ NDIS_POOL_DATA** ppNDISPoolData) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprNDISPoolDataDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprPendDataCreate" - + Purpose: Populates a NDIS_POOL_DATA object with the various NDIS Pools.

Notes:
@@ -176,13 +176,13 @@ NTSTATUS KrnlHlprNDISPoolDataPopulate(_Inout_ NDIS_POOL_DATA* pNDISPoolData, _In_opt_ UINT32 memoryTag) /* WFPSAMPLER_NDIS_POOL_TAG */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprNDISPoolDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pNDISPoolData); NTSTATUS status = STATUS_SUCCESS; @@ -251,19 +251,19 @@ NTSTATUS KrnlHlprNDISPoolDataPopulate(_Inout_ NDIS_POOL_DATA* pNDISPoolData, KrnlHlprNDISPoolDataPurge(pNDISPoolData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprNDISPoolDataPopulate()\n"); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprPendDataCreate" - + Purpose: Allocates and populates a NDIS_POOL_DATA object with the various NDIS Pools.

Notes:
@@ -282,13 +282,13 @@ NTSTATUS KrnlHlprNDISPoolDataCreate(_Outptr_ NDIS_POOL_DATA** ppNDISPoolData, _In_opt_ UINT32 memoryTag) /* WFPSAMPLER_NDIS_POOL_TAG */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprNDISPoolDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppNDISPoolData); NTSTATUS status = STATUS_SUCCESS; @@ -314,13 +314,13 @@ NTSTATUS KrnlHlprNDISPoolDataCreate(_Outptr_ NDIS_POOL_DATA** ppNDISPoolData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprNDISPoolDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp index 4338d787a..bebc7d580 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprNBLGetRequiredRefCount @@ -48,13 +48,13 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -#include "HelperFunctions_Include.h" /// . +#include "HelperFunctions_Include.h" /// . #include "HelperFunctions_NetBuffer.tmh" /// $(OBJ_PATH)\$(O)\ /** @kernel_helper_function="KrnlHlprNBLCreateFromBuffer" - + Purpose: Creates a new NBL from the data contained in the supplied buffer.

Notes:
@@ -142,7 +142,7 @@ NET_BUFFER_LIST* KrnlHlprNBLCreateFromBuffer(_In_ NDIS_HANDLE nblPoolHandle, /** @kernel_helper_function="KrnlHlprNBLCopyToBuffer" - + Purpose: Copies the NBL to a buffer.

Notes:
@@ -255,7 +255,7 @@ BYTE* KrnlHlprNBLCopyToBuffer(_In_opt_ NET_BUFFER_LIST* pTemplateNBL, /** @kernel_helper_function="KrnlHlprNBLDestroyNew" - + Purpose: Destroys a new NBL.

Notes:
@@ -308,7 +308,7 @@ VOID KrnlHlprNBLDestroyNew(_Inout_opt_ NET_BUFFER_LIST** ppNetBufferList, /** @kernel_helper_function="KrnlHlprNBLCreateNew" - + Purpose: Creates a new NBL.

Notes:
@@ -323,7 +323,7 @@ NET_BUFFER_LIST* KrnlHlprNBLCreateNew(_In_ NDIS_HANDLE nblPoolHandle, _In_opt_ NET_BUFFER_LIST* pTemplateNBL, _Outptr_opt_result_buffer_maybenull_(*pSize) BYTE** ppAllocatedBuffer, _Out_ UINT32* pSize, - _Outptr_opt_result_maybenull_ PMDL* ppMDL, + _Outptr_opt_result_maybenull_ PMDL* ppMDL, _In_ UINT32 additionalSpace, /* 0 */ _In_ BOOLEAN isOutbound) /* FALSE */ { @@ -387,7 +387,7 @@ NET_BUFFER_LIST* KrnlHlprNBLCreateNew(_In_ NDIS_HANDLE nblPoolHandle, /** @kernel_helper_function="KrnlHlprNBLGetRequiredRefCount" - + Purpose: Return a count of how many NBLs are within the NBL chain.

Notes:
@@ -401,7 +401,7 @@ UINT32 KrnlHlprNBLGetRequiredRefCount(_In_ const NET_BUFFER_LIST* pNBL, _In_ BOOLEAN isChained) /* FALSE */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprNBLGetRequiredRefCount()\n"); @@ -425,13 +425,13 @@ UINT32 KrnlHlprNBLGetRequiredRefCount(_In_ const NET_BUFFER_LIST* pNBL, requiredRefCount = 1; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprNBLGetRequiredRefCount() [refCount: %#d]\n", requiredRefCount); #endif /// DBG - + return requiredRefCount; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp index d8db09ee3..ac57aeaca 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprWorkItemQueue @@ -43,7 +43,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for pending at +// December 13, 2013 - 1.1 - Add support for pending at // FWPM_LAYER_ALE_ENDPOINT_CLOSURE // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -53,7 +53,7 @@ /** @kernel_helper_function="KrnlHlprPendDataPurge" - + Purpose: Cleanup a PEND_DATA object.

Notes:
@@ -66,13 +66,13 @@ _IRQL_requires_same_ inline VOID KrnlHlprPendDataPurge(_Inout_ PEND_DATA* pPendData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprPendDataPurge()\n"); #endif /// DBG - + NT_ASSERT(pPendData); #if(NTDDI_VERSION >= NTDDI_WIN7) @@ -117,19 +117,19 @@ inline VOID KrnlHlprPendDataPurge(_Inout_ PEND_DATA* pPendData) sizeof(PEND_DATA)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprPendDataPurge()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprPendDataDestroy" - + Purpose: Cleanup and free a PEND_DATA object.

Notes:
@@ -145,13 +145,13 @@ _Success_(*ppPendData == 0) VOID KrnlHlprPendDataDestroy(_Inout_ PEND_DATA** ppPendData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprPendDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppPendData); if(*ppPendData) @@ -163,19 +163,19 @@ VOID KrnlHlprPendDataDestroy(_Inout_ PEND_DATA** ppPendData) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprPendDataDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprPendDataPopulate" - + Purpose: Populates a PEND_DATA object with the completionContext.

Notes:
@@ -196,13 +196,13 @@ NTSTATUS KrnlHlprPendDataPopulate(_Inout_ PEND_DATA* pPendData, _In_opt_ FWPS_CLASSIFY_OUT* pClassifyOut) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprPendDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pPendData); NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); @@ -232,7 +232,7 @@ NTSTATUS KrnlHlprPendDataPopulate(_Inout_ PEND_DATA* pPendData, DPFLTR_ERROR_LEVEL, " !!!! KrnlHlprPendDataPopulate : FwpsAcquireClassifyHandle() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -246,7 +246,7 @@ NTSTATUS KrnlHlprPendDataPopulate(_Inout_ PEND_DATA* pPendData, DPFLTR_ERROR_LEVEL, " !!!! KrnlHlprPendDataPopulate : FwpsPendClassify() [status: %#x]\n", status); - + HLPR_BAIL; } @@ -320,20 +320,20 @@ NTSTATUS KrnlHlprPendDataPopulate(_Inout_ PEND_DATA* pPendData, #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprPendDataPopulate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprPendDataCreate" - + Purpose: Allocates and populates a PEND_DATA object with the completionContext.

Notes:
@@ -359,13 +359,13 @@ NTSTATUS KrnlHlprPendDataCreate(_Outptr_ PEND_DATA** ppPendData, { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprPendDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppPendData); NT_ASSERT(pClassifyValues); NT_ASSERT(pMetadata); @@ -390,7 +390,7 @@ NTSTATUS KrnlHlprPendDataCreate(_Outptr_ PEND_DATA** ppPendData, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// *ppPendData initialized with calls to HLPR_NEW & KrnlHlprPendDataPopulate +#pragma warning(disable: 6001) /// *ppPendData initialized with calls to HLPR_NEW & KrnlHlprPendDataPopulate if(status != STATUS_SUCCESS && *ppPendData) @@ -399,13 +399,13 @@ NTSTATUS KrnlHlprPendDataCreate(_Outptr_ PEND_DATA** ppPendData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprPendDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h index 12e06b419..940a6056c 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h @@ -15,7 +15,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for pending at +// December 13, 2013 - 1.1 - Add support for pending at // FWPM_LAYER_ALE_ENDPOINT_CLOSURE // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp index 92cca4ba1..6bf876c1c 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprWorkItemQueue @@ -54,7 +54,7 @@ /** @kernel_helper_function="KrnlHlprRedirectDataPurge" - + Purpose: Cleanup a REDIRECT_DATA object.

Notes:
@@ -69,13 +69,13 @@ _IRQL_requires_same_ inline VOID KrnlHlprRedirectDataPurge(_Inout_ REDIRECT_DATA* pRedirectData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprRedirectDataPurge()\n"); #endif /// DBG - + NT_ASSERT(pRedirectData); if(pRedirectData->pWritableLayerData) @@ -107,19 +107,19 @@ inline VOID KrnlHlprRedirectDataPurge(_Inout_ REDIRECT_DATA* pRedirectData) sizeof(REDIRECT_DATA)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprRedirectDataPurge()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprRedirectDataDestroy" - + Purpose: Cleanup and free a REDIRECT_DATA object.

Notes:
@@ -135,13 +135,13 @@ _Success_(*ppRedirectData == 0) VOID KrnlHlprRedirectDataDestroy(_Inout_ REDIRECT_DATA** ppRedirectData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprRedirectDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppRedirectData); if(*ppRedirectData) @@ -153,20 +153,20 @@ VOID KrnlHlprRedirectDataDestroy(_Inout_ REDIRECT_DATA** ppRedirectData) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprRedirectDataDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprRedirectDataPopulate" - - Purpose: Populates a REDIRECT_DATA object with the classifyHandle and the writable layer + + Purpose: Populates a REDIRECT_DATA object with the classifyHandle and the writable layer data pointer.

Notes:
@@ -186,13 +186,13 @@ NTSTATUS KrnlHlprRedirectDataPopulate(_Inout_ REDIRECT_DATA* pRedirectData, _In_opt_ HANDLE redirectHandle) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprRedirectDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pRedirectData); NT_ASSERT(pClassifyContext); NT_ASSERT(pFilter); @@ -252,21 +252,21 @@ NTSTATUS KrnlHlprRedirectDataPopulate(_Inout_ REDIRECT_DATA* pRedirectData, KrnlHlprRedirectDataPurge(pRedirectData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprRedirectDataPopulate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprRedirectDataCreate" - - Purpose: Allocates and populates a REDIRECT_DATA object with the classifyHandle and the + + Purpose: Allocates and populates a REDIRECT_DATA object with the classifyHandle and the writable layer data pointer.

Notes:
@@ -288,13 +288,13 @@ NTSTATUS KrnlHlprRedirectDataCreate(_Outptr_ REDIRECT_DATA** ppRedirectData, _In_opt_ HANDLE redirectHandle) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprRedirectDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppRedirectData); NT_ASSERT(pClassifyContext); NT_ASSERT(pFilter); @@ -317,7 +317,7 @@ NTSTATUS KrnlHlprRedirectDataCreate(_Outptr_ REDIRECT_DATA** ppRedirectData, HLPR_BAIL_LABEL: #pragma warning(push) -#pragma warning(disable: 6001) /// *ppRedirectData initialized with call to HLPR_NEW & KrnlHlprRedirectDataPopulate +#pragma warning(disable: 6001) /// *ppRedirectData initialized with call to HLPR_NEW & KrnlHlprRedirectDataPopulate if(status != STATUS_SUCCESS && *ppRedirectData) @@ -326,14 +326,14 @@ NTSTATUS KrnlHlprRedirectDataCreate(_Outptr_ REDIRECT_DATA** ppRedirectData, #pragma warning(pop) #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprRedirectDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp index 7e4f8c16d..f3f85cfed 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp @@ -11,7 +11,7 @@ // Naming Convention: // // -// +// // i.e. // // KrnlHlprWorkItemQueue @@ -48,7 +48,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for pending at +// December 13, 2013 - 1.1 - Add support for pending at // FWPM_LAYER_ALE_ENDPOINT_CLOSURE. // //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -58,7 +58,7 @@ /** @kernel_helper_function="KrnlHlprWorkItemDataPurge" - + Purpose: Cleanup a WORKITEM_DATA object.

Notes:
@@ -71,13 +71,13 @@ _IRQL_requires_same_ VOID KrnlHlprWorkItemDataPurge(_Inout_ WORKITEM_DATA* pWorkItemData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataPurge()\n"); #endif /// DBG - + NT_ASSERT(pWorkItemData); if(pWorkItemData->pIOWorkItem) @@ -87,19 +87,19 @@ VOID KrnlHlprWorkItemDataPurge(_Inout_ WORKITEM_DATA* pWorkItemData) sizeof(WORKITEM_DATA)); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataPurge()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataDestroy" - + Purpose: Cleanup and free a WORKITEM_DATA object.

Notes:
@@ -115,13 +115,13 @@ _Success_(*ppWorkItemData == 0) VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataDestroy()\n"); #endif /// DBG - + NT_ASSERT(ppWorkItemData); if(*ppWorkItemData) @@ -133,20 +133,20 @@ VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData) } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataDestroy()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataPopulate" - - Purpose: Populates a WORKITEM_DATA object with the classifyData, injectionData, + + Purpose: Populates a WORKITEM_DATA object with the classifyData, injectionData, PIOWorkItem, and context supplied.

Notes:
@@ -163,13 +163,13 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pWorkItemData); NT_ASSERT(pClassifyData); @@ -179,20 +179,20 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, pWorkItemData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataPopulate" - - Purpose: Populates a WORKITEM_DATA object with the classifyData, pendData, PIOWorkItem, and + + Purpose: Populates a WORKITEM_DATA object with the classifyData, pendData, PIOWorkItem, and context supplied.

Notes:
@@ -209,13 +209,13 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pWorkItemData); NT_ASSERT(pClassifyData); NT_ASSERT(pPendData); @@ -226,20 +226,20 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, pWorkItemData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataPopulate" - - Purpose: Populates a WORKITEM_DATA object with the classifyData, redirectData, PIOWorkItem, + + Purpose: Populates a WORKITEM_DATA object with the classifyData, redirectData, PIOWorkItem, and context supplied.

Notes:
@@ -256,13 +256,13 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pWorkItemData); NT_ASSERT(pClassifyData); NT_ASSERT(pRedirectData); @@ -273,20 +273,20 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, pWorkItemData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataPopulate" - - Purpose: Populates a WORKITEM_DATA object with the notifyData, PIOWorkItem, and context + + Purpose: Populates a WORKITEM_DATA object with the notifyData, PIOWorkItem, and context supplied.

Notes:
@@ -302,13 +302,13 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pWorkItemData); NT_ASSERT(pNotifyData); @@ -317,20 +317,20 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, pWorkItemData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataPopulate" - - Purpose: Populates a WORKITEM_DATA object with the pendData, PIOWorkItem, and context + + Purpose: Populates a WORKITEM_DATA object with the pendData, PIOWorkItem, and context supplied.

Notes:
@@ -346,13 +346,13 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + NT_ASSERT(pWorkItemData); NT_ASSERT(pPendData); @@ -361,20 +361,20 @@ VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, pWorkItemData->pContext = pContext; #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataPopulate()\n"); #endif /// DBG - + return; } /** @kernel_helper_function="KrnlHlprWorkItemDataCreate" - - Purpose: Allocates and populates a WORKITEM_DATA object with the classifyData, + + Purpose: Allocates and populates a WORKITEM_DATA object with the classifyData, injectionData, PIOWorkItem, and context supplied.

Notes:
@@ -396,13 +396,13 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppWorkItemData); NT_ASSERT(pClassifyData); NT_ASSERT(pInjectionData); @@ -427,21 +427,21 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, KrnlHlprWorkItemDataDestroy(ppWorkItemData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemDataCreate" - - Purpose: Allocates and populates a WORKITEM_DATA object with the classifyData, pendData, + + Purpose: Allocates and populates a WORKITEM_DATA object with the classifyData, pendData, PIOWorkItem, and context supplied.

Notes:
@@ -463,13 +463,13 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppWorkItemData); NT_ASSERT(pClassifyData); NT_ASSERT(pPendData); @@ -494,21 +494,21 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, KrnlHlprWorkItemDataDestroy(ppWorkItemData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemDataCreate" - - Purpose: Allocates and populates a WORKITEM_DATA object with the classifyData, redirectData, + + Purpose: Allocates and populates a WORKITEM_DATA object with the classifyData, redirectData, PIOWorkItem, and context supplied.

Notes:
@@ -530,13 +530,13 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppWorkItemData); NT_ASSERT(pClassifyData); NT_ASSERT(pRedirectData); @@ -561,21 +561,21 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, KrnlHlprWorkItemDataDestroy(ppWorkItemData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemDataCreate" - - Purpose: Allocates and populates a WORKITEM_DATA object with the notifyData, PIOWorkItem, + + Purpose: Allocates and populates a WORKITEM_DATA object with the notifyData, PIOWorkItem, and context supplied.

Notes:
@@ -596,13 +596,13 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemDataCreate()\n"); #endif /// DBG - + NT_ASSERT(ppWorkItemData); NT_ASSERT(pNotifyData); @@ -625,21 +625,21 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, KrnlHlprWorkItemDataDestroy(ppWorkItemData); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemDataCreate() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemDataCreate" - - Purpose: Allocates and populates a WORKITEM_DATA object with the pendData, PIOWorkItem, and + + Purpose: Allocates and populates a WORKITEM_DATA object with the pendData, PIOWorkItem, and context supplied.

Notes:
@@ -702,7 +702,7 @@ NTSTATUS KrnlHlprWorkItemDataCreate(_Outptr_ WORKITEM_DATA** ppWorkItemData, /** @kernel_helper_function="KrnlHlprWorkItemQueue" - + Purpose: Queue a workitem for later execution at PASSIVE_LEVEL.

Notes: Data is expected to be obtained by other means (i.e. LIST_ENTRY)
@@ -719,13 +719,13 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, _In_ IO_WORKITEM_ROUTINE* pWorkItemFn) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemQueue()\n"); #endif /// DBG - + NT_ASSERT(pWDMDevice); NT_ASSERT(pWorkItemFn); @@ -762,21 +762,21 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, IoFreeWorkItem(pIOWorkItem); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemQueue" - + Purpose: Queue a workitem for later execution at PASSIVE_LEVEL.

Notes: INJECTION_DATA specific.
@@ -796,13 +796,13 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemQueue()\n"); #endif /// DBG - + NT_ASSERT(pWDMDevice); NT_ASSERT(pWorkItemFn); NT_ASSERT(pClassifyData); @@ -855,20 +855,20 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemQueue" - + Purpose: Queue a workitem for later execution at PASSIVE_LEVEL.

Notes: PEND_DATA specific.
@@ -888,13 +888,13 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemQueue()\n"); #endif /// DBG - + NT_ASSERT(pWDMDevice); NT_ASSERT(pWorkItemFn); NT_ASSERT(pClassifyData); @@ -948,20 +948,20 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemQueue" - + Purpose: Queue a workitem for later execution at PASSIVE_LEVEL.

Notes: REDIRECT_DATA specific.
@@ -981,13 +981,13 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemQueue()\n"); #endif /// DBG - + NT_ASSERT(pWDMDevice); NT_ASSERT(pWorkItemFn); NT_ASSERT(pClassifyData); @@ -1041,20 +1041,20 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemQueue" - + Purpose: Queue a workitem for later execution at PASSIVE_LEVEL.

Notes: NOTIFY_DATA specific.
@@ -1073,13 +1073,13 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemQueue()\n"); #endif /// DBG - + NT_ASSERT(pWDMDevice); NT_ASSERT(pWorkItemFn); NT_ASSERT(pNotifyData); @@ -1131,20 +1131,20 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemQueue" - + Purpose: Queue a workitem for later execution at PASSIVE_LEVEL.

Notes: PEND_DATA specific.
@@ -1163,13 +1163,13 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, _In_opt_ VOID* pContext) /* 0 */ { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemQueue()\n"); #endif /// DBG - + NT_ASSERT(pWDMDevice); NT_ASSERT(pWorkItemFn); NT_ASSERT(pPendData); @@ -1221,20 +1221,20 @@ NTSTATUS KrnlHlprWorkItemQueue(_In_ PDEVICE_OBJECT pWDMDevice, } #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemQueue() [status: %#x]\n", status); #endif /// DBG - + return status; } /** @kernel_helper_function="KrnlHlprWorkItemSleep" - + Purpose: Delay the thread for the specified time.

Notes:
@@ -1248,13 +1248,13 @@ _Success_(return == STATUS_SUCCESS) NTSTATUS KrnlHlprWorkItemSleep(_In_ UINT32 numMS) { #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " ---> KrnlHlprWorkItemSleep()\n"); #endif /// DBG - + NT_ASSERT(numMS); NTSTATUS status = STATUS_SUCCESS; @@ -1265,13 +1265,13 @@ NTSTATUS KrnlHlprWorkItemSleep(_In_ UINT32 numMS) (PLARGE_INTEGER)&interval); #if DBG - + DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, " <--- KrnlHlprWorkItemSleep() [status: %#x]\n", status); #endif /// DBG - + return status; } diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h index 4d78844fb..7708a3f56 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h @@ -16,7 +16,7 @@ // // [ Month ][Day] [Year] - [Revision]-[ Comments ] // May 01, 2010 - 1.0 - Creation -// December 13, 2013 - 1.1 - Add support for pending at +// December 13, 2013 - 1.1 - Add support for pending at // FWPM_LAYER_ALE_ENDPOINT_CLOSURE. // //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/network/trans/ddproxy/sys/DD_drv.c b/network/trans/ddproxy/sys/DD_drv.c index b7aa5eb9c..4e9f6755a 100644 --- a/network/trans/ddproxy/sys/DD_drv.c +++ b/network/trans/ddproxy/sys/DD_drv.c @@ -6,24 +6,24 @@ Copyright (c) Microsoft Corporation. All rights reserved Datagram-Data Transparent Proxy Callout Driver Sample. - This sample callout driver intercepts UDP and non-error ICMP traffic - of interest and proxies them to a new destination address and/or port - (for UDP); response traffic will be proxied back to have the original - tuple values. The proxying is transparent to the application. + This sample callout driver intercepts UDP and non-error ICMP traffic + of interest and proxies them to a new destination address and/or port + (for UDP); response traffic will be proxied back to have the original + tuple values. The proxying is transparent to the application. - Inspection parameters and proxy settings are configurable via the + Inspection parameters and proxy settings are configurable via the following registry values -- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ddproxy\Parameters - + o InspectUdp (REG_DWORD) : 0 (ICMP); 1 (UDP, default) - o DestinationAddressToIntercept (REG_SZ) : literal IPv4/IPv6 string - (e.g. “10.0.0.1”) + o DestinationAddressToIntercept (REG_SZ) : literal IPv4/IPv6 string + (e.g. �10.0.0.1�) o DestinationPortToIntercept (REG_DWORD) : applicable if InspectUdp is 1 o NewDestinationAddress(REG_SZ) : literal IPv4/IPv6 string o NewDestinationPort(REG_DWORD) - The sample is IP version agnostic. It performs proxying for both IPv4 + The sample is IP version agnostic. It performs proxying for both IPv4 and IPv6 traffic. Environment: @@ -54,7 +54,7 @@ Copyright (c) Microsoft Corporation. All rights reserved #define INITGUID #include -// +// // Configurable parameters (addresses and ports are in host order) // @@ -70,7 +70,7 @@ UINT8* configNewDestAddrV6 = NULL; SOCKADDR_STORAGE destAddr, newDestAddr; -// +// // Callout and sublayer GUIDs // @@ -117,7 +117,7 @@ DEFINE_GUID( 0x94, 0xc9, 0xf0, 0xd5, 0x25, 0xbb, 0xc1, 0x69 ); -// +// // Callout driver global variables // @@ -142,7 +142,7 @@ void* gThreadObj; DRIVER_INITIALIZE DriverEntry; EVT_WDF_DRIVER_UNLOAD EvtDriverUnload; -// +// // Callout driver implementation // @@ -158,7 +158,7 @@ DDProxyLoadIPAddress( DECLARE_UNICODE_STRING_SIZE(value, INET6_ADDRSTRLEN); IN_ADDR *resultV4 = &((SOCKADDR_IN*)result)->sin_addr; IN6_ADDR *resultV6 = &((SOCKADDR_IN6*)result)->sin6_addr; - + status = WdfRegistryQueryUnicodeString(key, valueName, NULL, &value); result->ss_family = AF_UNSPEC; @@ -292,7 +292,7 @@ DDProxyAddFilter( NTSTATUS status = STATUS_SUCCESS; FWPM_FILTER filter = {0}; - FWPM_FILTER_CONDITION filterConditions[3] = {0}; + FWPM_FILTER_CONDITION filterConditions[3] = {0}; UINT conditionIndex; filter.layerKey = *layerKey; @@ -310,7 +310,7 @@ DDProxyAddFilter( if (remoteAddr != NULL) { - filterConditions[conditionIndex].fieldKey = + filterConditions[conditionIndex].fieldKey = FWPM_CONDITION_IP_REMOTE_ADDRESS; filterConditions[conditionIndex].matchType = FWP_MATCH_EQUAL; @@ -318,14 +318,14 @@ DDProxyAddFilter( IsEqualGUID(layerKey, &FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4)) { filterConditions[conditionIndex].conditionValue.type = FWP_UINT32; - filterConditions[conditionIndex].conditionValue.uint32 = + filterConditions[conditionIndex].conditionValue.uint32 = *(UINT32*)remoteAddr; } else { - filterConditions[conditionIndex].conditionValue.type = + filterConditions[conditionIndex].conditionValue.type = FWP_BYTE_ARRAY16_TYPE; - filterConditions[conditionIndex].conditionValue.byteArray16 = + filterConditions[conditionIndex].conditionValue.byteArray16 = (FWP_BYTE_ARRAY16*)remoteAddr; } @@ -345,7 +345,7 @@ DDProxyAddFilter( filterConditions[conditionIndex].matchType = FWP_MATCH_EQUAL; filterConditions[conditionIndex].conditionValue.type = FWP_UINT16; filterConditions[conditionIndex].conditionValue.uint16 = remotePort; - + conditionIndex++; } @@ -369,9 +369,9 @@ DDProxyRegisterFlowEstablishedCallouts( ) /* ++ - This function registers callouts and filters at the following layers + This function registers callouts and filters at the following layers to intercept flow creations for the original and the proxy flows. - + FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4 FWPM_LAYER_ALE_FLOW_ESTABLISHED_V6 @@ -402,7 +402,7 @@ DDProxyRegisterFlowEstablishedCallouts( calloutRegistered = TRUE; displayData.name = L"Datagram-Data Proxy Flow-Established Callout"; - displayData.description = + displayData.description = L"Intercepts flow creations for the original and the proxy flows"; mCallout.calloutKey = *calloutKey; @@ -424,7 +424,7 @@ DDProxyRegisterFlowEstablishedCallouts( status = DDProxyAddFilter( L"Datagram-Data Proxy Flow-Established Filter (Original Flow)", L"Intercepts flow creations for the original flow", - IsEqualGUID(layerKey, &FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4) ? + IsEqualGUID(layerKey, &FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4) ? configInspectDestAddrV4 : configInspectDestAddrV6, configInspectDestPort, FWP_DIRECTION_OUTBOUND, @@ -441,7 +441,7 @@ DDProxyRegisterFlowEstablishedCallouts( status = DDProxyAddFilter( L"Datagram-Data Proxy Flow-Established Filter (Proxy Flow)", L"Intercepts flow creations for the proxy flow", - IsEqualGUID(layerKey, &FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4) ? + IsEqualGUID(layerKey, &FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4) ? configNewDestAddrV4 : configNewDestAddrV6, configNewDestPort, FWP_DIRECTION_OUTBOUND, @@ -478,7 +478,7 @@ DDProxyRegisterDatagramDataCallouts( ) /* ++ - This function registers callouts and filters that intercept TCP traffic at + This function registers callouts and filters that intercept TCP traffic at WFP FWPM_LAYER_DATAGRAM_DATA_V4 or FWPM_LAYER_DATAGRAM_DATA_V6 layer. -- */ @@ -531,7 +531,7 @@ DDProxyRegisterDatagramDataCallouts( status = DDProxyAddFilter( L"Datagram-Data Proxy Filter (Outbound)", L"Proxies destination address/port for UDP/ICMP", - IsEqualGUID(layerKey, &FWPM_LAYER_DATAGRAM_DATA_V4) ? + IsEqualGUID(layerKey, &FWPM_LAYER_DATAGRAM_DATA_V4) ? configInspectDestAddrV4 : configInspectDestAddrV6, configInspectDestPort, FWP_DIRECTION_OUTBOUND, @@ -548,7 +548,7 @@ DDProxyRegisterDatagramDataCallouts( status = DDProxyAddFilter( L"Datagram-Data Proxy Filter (Inbound)", L"Proxies destination address/port for UDP/ICMP", - IsEqualGUID(layerKey, &FWPM_LAYER_DATAGRAM_DATA_V4) ? + IsEqualGUID(layerKey, &FWPM_LAYER_DATAGRAM_DATA_V4) ? configNewDestAddrV4 : configNewDestAddrV6, configNewDestPort, FWP_DIRECTION_INBOUND, @@ -583,7 +583,7 @@ DDProxyRegisterCallouts( /* ++ This function registers dynamic callouts and filters that intercept UDP or - non-error ICMP traffic at WFP FWPM_LAYER_DATAGRAM_DATA_V{4|6} and + non-error ICMP traffic at WFP FWPM_LAYER_DATAGRAM_DATA_V{4|6} and FWPM_LAYER_ALE_FLOW_ESTABLISHED_V{4|6} layers. Callouts and filters will be removed during DriverUnload. @@ -620,11 +620,11 @@ DDProxyRegisterCallouts( } inTransaction = TRUE; - RtlZeroMemory(&DDProxySubLayer, sizeof(FWPM_SUBLAYER)); + RtlZeroMemory(&DDProxySubLayer, sizeof(FWPM_SUBLAYER)); DDProxySubLayer.subLayerKey = DD_PROXY_SUBLAYER; DDProxySubLayer.displayData.name = L"Datagram-Data Proxy Sub-Layer"; - DDProxySubLayer.displayData.description = + DDProxySubLayer.displayData.description = L"Sub-Layer for use by Datagram-Data Proxy callouts"; DDProxySubLayer.flags = 0; DDProxySubLayer.weight = FWP_EMPTY; // auto-weight.; @@ -738,8 +738,8 @@ DDProxyRemoveFlows(void) } // - // Releasing the lock here since removing the flow context - // will invoke the callout's flowDeleteFn synchronously + // Releasing the lock here since removing the flow context + // will invoke the callout's flowDeleteFn synchronously // if there are no active classifications in progress. // KeReleaseInStackQueuedSpinLock(&flowListLockHandle); @@ -800,7 +800,7 @@ EvtDriverUnload( { KeSetEvent( &gPacketQueueEvent, - IO_NO_INCREMENT, + IO_NO_INCREMENT, FALSE ); } @@ -865,7 +865,7 @@ DDProxyInitDriverObjects( *pDriver, &SDDL_DEVOBJ_KERNEL_ONLY ); - + if (!pInit) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -963,9 +963,9 @@ DriverEntry( if (configInspectUdp) { if ((configInspectDestPort == configNewDestPort) && - (((configInspectDestAddrV4 == NULL) || - (configNewDestAddrV4 == NULL)) && - ((configInspectDestAddrV6 == NULL) || + (((configInspectDestAddrV4 == NULL) || + (configNewDestAddrV4 == NULL)) && + ((configInspectDestAddrV6 == NULL) || (configNewDestAddrV6 == NULL)))) { status = STATUS_DEVICE_CONFIGURATION_ERROR; @@ -974,9 +974,9 @@ DriverEntry( } else { - if (((configInspectDestAddrV4 == NULL) || - (configNewDestAddrV4 == NULL)) && - ((configInspectDestAddrV6 == NULL) || + if (((configInspectDestAddrV4 == NULL) || + (configNewDestAddrV4 == NULL)) && + ((configInspectDestAddrV6 == NULL) || (configNewDestAddrV6 == NULL))) { status = STATUS_DEVICE_CONFIGURATION_ERROR; @@ -996,10 +996,10 @@ DriverEntry( } InitializeListHead(&gFlowList); - KeInitializeSpinLock(&gFlowListLock); + KeInitializeSpinLock(&gFlowListLock); InitializeListHead(&gPacketQueue); - KeInitializeSpinLock(&gPacketQueueLock); + KeInitializeSpinLock(&gPacketQueueLock); KeInitializeEvent( &gPacketQueueEvent, NotificationEvent, @@ -1007,7 +1007,7 @@ DriverEntry( ); gWdmDevice = WdfDeviceWdmGetDeviceObject(device); - + status = DDProxyRegisterCallouts(gWdmDevice); if (!NT_SUCCESS(status)) @@ -1043,7 +1043,7 @@ DriverEntry( ZwClose(threadHandle); Exit: - + if (!NT_SUCCESS(status)) { if (gEngineHandle != NULL) diff --git a/network/trans/ddproxy/sys/DD_proxy.c b/network/trans/ddproxy/sys/DD_proxy.c index 089c273c6..ea48bfacc 100644 --- a/network/trans/ddproxy/sys/DD_proxy.c +++ b/network/trans/ddproxy/sys/DD_proxy.c @@ -10,10 +10,10 @@ Copyright (c) Microsoft Corporation. All rights reserved is also implemented here along with the eventing mechanisms shared between the classify function and the worker thread. - Packet modification is done out-of-band by a system worker thread using - the reference-drop-clone-modify-reinject mechanism. Therefore the sample - can serve as a base in scenarios where filtering/modification decision - cannot be made within the classifyFn() callout and instead must be made, + Packet modification is done out-of-band by a system worker thread using + the reference-drop-clone-modify-reinject mechanism. Therefore the sample + can serve as a base in scenarios where filtering/modification decision + cannot be made within the classifyFn() callout and instead must be made, for example, by an user-mode application. Environment: @@ -81,10 +81,10 @@ DDProxyFlowEstablishedClassify( /* ++ - This is the classifyFn function of the flow-established callout. It - allocates flow context for the original and the proxy flow and associates - them with the indicated flow-id. This function also stores information - common to both flows in the context. The flow context is inserted into the + This is the classifyFn function of the flow-established callout. It + allocates flow context for the original and the proxy flow and associates + them with the indicated flow-id. This function also stores information + common to both flows in the context. The flow context is inserted into the global flow list. -- */ @@ -117,10 +117,10 @@ DDProxyFlowEstablishedClassify( flowContextLocal->refCount = 1; flowContextLocal->flowType = (DD_PROXY_FLOW_TYPE)(filter->context); - flowContextLocal->addressFamily = - (inFixedValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4) ? + flowContextLocal->addressFamily = + (inFixedValues->layerId == FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4) ? AF_INET : AF_INET6; - NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, FWPS_METADATA_FIELD_FLOW_HANDLE)); flowContextLocal->flowId = inMetaValues->flowHandle; @@ -129,11 +129,11 @@ DDProxyFlowEstablishedClassify( // layer classifyFn, layerId and calloutId are set to those of DD and not // flow-established. // - flowContextLocal->layerId = - (flowContextLocal->addressFamily == AF_INET) ? + flowContextLocal->layerId = + (flowContextLocal->addressFamily == AF_INET) ? FWPS_LAYER_DATAGRAM_DATA_V4 : FWPS_LAYER_DATAGRAM_DATA_V6; - flowContextLocal->calloutId = - (flowContextLocal->addressFamily == AF_INET) ? + flowContextLocal->calloutId = + (flowContextLocal->addressFamily == AF_INET) ? gCalloutIdV4 : gCalloutIdV6; if (flowContextLocal->addressFamily == AF_INET) @@ -142,7 +142,7 @@ DDProxyFlowEstablishedClassify( // If driver is unloading, we give up and ignore it on purpose. // Otherwise, we put the pointer onto the list, but we make it opaque // by casting it as a UINT64, and this tricks Prefast. - flowContextLocal->ipv4LocalAddr = + flowContextLocal->ipv4LocalAddr = RtlUlongByteSwap( inFixedValues->incomingValue\ [FWPS_FIELD_ALE_FLOW_ESTABLISHED_V4_IP_LOCAL_ADDRESS].value.uint32 @@ -159,15 +159,15 @@ DDProxyFlowEstablishedClassify( [FWPS_FIELD_ALE_FLOW_ESTABLISHED_V6_IP_LOCAL_ADDRESS].value.byteArray16, sizeof(FWP_BYTE_ARRAY16) ); - flowContextLocal->protocol = + flowContextLocal->protocol = inFixedValues->incomingValue\ [FWPS_FIELD_ALE_FLOW_ESTABLISHED_V6_IP_PROTOCOL].value.uint8; } if (flowContextLocal->flowType == DD_PROXY_FLOW_ORIGINAL) { - flowContextLocal->toRemoteAddr = - (flowContextLocal->addressFamily == AF_INET) ? + flowContextLocal->toRemoteAddr = + (flowContextLocal->addressFamily == AF_INET) ? configNewDestAddrV4 : configNewDestAddrV6; // host-order -> network-order conversion for port. flowContextLocal->toRemotePort = RtlUshortByteSwap(configNewDestPort); @@ -175,8 +175,8 @@ DDProxyFlowEstablishedClassify( else { NT_ASSERT(flowContextLocal->flowType == DD_PROXY_FLOW_PROXY); - flowContextLocal->toRemoteAddr = - (flowContextLocal->addressFamily == AF_INET) ? + flowContextLocal->toRemoteAddr = + (flowContextLocal->addressFamily == AF_INET) ? configInspectDestAddrV4 : configInspectDestAddrV6; // host-order -> network-order conversion for port. // See PREfast comments above. Opaque pointer tricks PREfast. @@ -187,9 +187,9 @@ DDProxyFlowEstablishedClassify( { // host-order -> network-order conversion for Ipv4 address. // See PREfast comments above. Opaque pointer tricks PREfast. - flowContextLocal->ipv4NetworkOrderStorage = + flowContextLocal->ipv4NetworkOrderStorage = RtlUlongByteSwap(*(ULONG*)(flowContextLocal->toRemoteAddr)); - flowContextLocal->toRemoteAddr = + flowContextLocal->toRemoteAddr = (UINT8*)&flowContextLocal->ipv4NetworkOrderStorage; } @@ -203,8 +203,8 @@ DDProxyFlowEstablishedClassify( if (!gDriverUnloading) { // - // Associate DD_PROXY_FLOW_CONTEXT with the indicated flow-id to be - // accessible by the Datagram-Data classifyFn. (i.e. when a packet + // Associate DD_PROXY_FLOW_CONTEXT with the indicated flow-id to be + // accessible by the Datagram-Data classifyFn. (i.e. when a packet // belongs to the same flow being classified at Datagram-Data layer, // DD_PROXY_FLOW_CONTEXT will be passed onto the classifyFn as the // "flowContext" parameter. @@ -281,12 +281,12 @@ DDProxyClassify( #endif /// (NTDDI_VERSION >= NTDDI_WIN7) /* ++ - This is the classifyFn function of the datagram-data callout. It - allocates a packet structure to store the classify and meta data and - it references the net buffer list for out-of-band modification and - re-injection. The packet structure will be queued to the global packet - queue. The worker thread will then be signaled, if idle, to process - the queue. + This is the classifyFn function of the datagram-data callout. It + allocates a packet structure to store the classify and meta data and + it references the net buffer list for out-of-band modification and + re-injection. The packet structure will be queued to the global packet + queue. The worker thread will then be signaled, if idle, to process + the queue. -- */ { @@ -353,40 +353,40 @@ DDProxyClassify( if (flowContextLocal->addressFamily == AF_INET) { NT_ASSERT(inFixedValues->layerId == FWPS_LAYER_DATAGRAM_DATA_V4); - packet->direction = + packet->direction = inFixedValues->incomingValue[FWPS_FIELD_DATAGRAM_DATA_V4_DIRECTION].\ value.uint32; } else { NT_ASSERT(inFixedValues->layerId == FWPS_LAYER_DATAGRAM_DATA_V6); - packet->direction = + packet->direction = inFixedValues->incomingValue[FWPS_FIELD_DATAGRAM_DATA_V6_DIRECTION].\ value.uint32; } packet->netBufferList = layerData; // - // Reference the net buffer list to make it accessible outside of + // Reference the net buffer list to make it accessible outside of // classifyFn. // FwpsReferenceNetBufferList(packet->netBufferList, TRUE); - NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, FWPS_METADATA_FIELD_COMPARTMENT_ID)); packet->compartmentId = inMetaValues->compartmentId; if (packet->direction == FWP_DIRECTION_OUTBOUND) { NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT( - inMetaValues, + inMetaValues, FWPS_METADATA_FIELD_TRANSPORT_ENDPOINT_HANDLE)); packet->endpointHandle = inMetaValues->transportEndpointHandle; if (flowContextLocal->addressFamily == AF_INET) { // See PREfast comments above. Opaque pointer tricks PREfast. - packet->ipv4RemoteAddr = + packet->ipv4RemoteAddr = RtlUlongByteSwap( /* host-order -> network-order conversion */ inFixedValues->incomingValue\ [FWPS_FIELD_DATAGRAM_DATA_V4_IP_REMOTE_ADDRESS].value.uint32 @@ -405,7 +405,7 @@ DDProxyClassify( packet->remoteScopeId = inMetaValues->remoteScopeId; if (FWPS_IS_METADATA_FIELD_PRESENT( - inMetaValues, + inMetaValues, FWPS_METADATA_FIELD_TRANSPORT_CONTROL_DATA)) { NT_ASSERT(inMetaValues->controlDataLength > 0); @@ -438,34 +438,34 @@ DDProxyClassify( if (flowContextLocal->addressFamily == AF_INET) { NT_ASSERT(inFixedValues->layerId == FWPS_LAYER_DATAGRAM_DATA_V4); - packet->interfaceIndex = + packet->interfaceIndex = inFixedValues->incomingValue\ [FWPS_FIELD_DATAGRAM_DATA_V4_INTERFACE_INDEX].value.uint32; - packet->subInterfaceIndex = + packet->subInterfaceIndex = inFixedValues->incomingValue\ [FWPS_FIELD_DATAGRAM_DATA_V4_SUB_INTERFACE_INDEX].value.uint32; } else { NT_ASSERT(inFixedValues->layerId == FWPS_LAYER_DATAGRAM_DATA_V6); - packet->interfaceIndex = + packet->interfaceIndex = inFixedValues->incomingValue\ [FWPS_FIELD_DATAGRAM_DATA_V6_INTERFACE_INDEX].value.uint32; - packet->subInterfaceIndex = + packet->subInterfaceIndex = inFixedValues->incomingValue\ [FWPS_FIELD_DATAGRAM_DATA_V6_SUB_INTERFACE_INDEX].value.uint32; } - + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT( - inMetaValues, + inMetaValues, FWPS_METADATA_FIELD_IP_HEADER_SIZE)); NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT( - inMetaValues, + inMetaValues, FWPS_METADATA_FIELD_TRANSPORT_HEADER_SIZE)); packet->ipHeaderSize = inMetaValues->ipHeaderSize; packet->transportHeaderSize = inMetaValues->transportHeaderSize; - packet->nblOffset = + packet->nblOffset = NET_BUFFER_DATA_OFFSET(NET_BUFFER_LIST_FIRST_NB(packet->netBufferList)); } @@ -502,8 +502,8 @@ DDProxyClassify( if (signalWorkerThread) { KeSetEvent( - &gPacketQueueEvent, - 0, + &gPacketQueueEvent, + 0, FALSE ); } @@ -511,7 +511,7 @@ DDProxyClassify( KeReleaseInStackQueuedSpinLock(&packetQueueLockHandle); Exit: - + if (packet != NULL) { DDProxyFreePendedPacket(packet, packet->controlData); @@ -556,8 +556,8 @@ DDProxyFlowDelete( ) /* ++ - This is the flowDeleteFn function of the datagram-data callout. It - removes the flow context from the global flow list and dereference the + This is the flowDeleteFn function of the datagram-data callout. It + removes the flow context from the global flow list and dereference the context. -- */ @@ -611,8 +611,8 @@ DDProxyCloneModifyReinjectOutbound( ) /* ++ - This function clones the outbound net buffer list and, if needed, - modifies the destination port of all indicated packets (i.e. NET_BUFFER) + This function clones the outbound net buffer list and, if needed, + modifies the destination port of all indicated packets (i.e. NET_BUFFER) and/or send-injects the clone to a new destination address. -- */ @@ -638,13 +638,13 @@ DDProxyCloneModifyReinjectOutbound( // // Check to see if port modification is required. // - if ((packet->belongingFlow->protocol == IPPROTO_UDP) && + if ((packet->belongingFlow->protocol == IPPROTO_UDP) && (packet->belongingFlow->toRemotePort != 0)) { NET_BUFFER* netBuffer; // - // The data offset of outbound transport packets is the beginning of + // The data offset of outbound transport packets is the beginning of // transport header (e.g. UDP header). The IP header has not yet been // constructed at Datagram-Data (or outbound Transport) layer. // @@ -652,7 +652,7 @@ DDProxyCloneModifyReinjectOutbound( // // - // Outbound net buffer list can contain more than one net buffer (e.g. + // Outbound net buffer list can contain more than one net buffer (e.g. // one UDP packet). // @@ -670,18 +670,18 @@ DDProxyCloneModifyReinjectOutbound( NT_ASSERT(udpHeader != NULL); // We can assume UDP header in a net buffer // is contiguous and 2-byte aligned. _Analysis_assume_(udpHeader != NULL); - + udpHeader->destPort = packet->belongingFlow->toRemotePort; udpHeader->checksum = 0; } } // - // Determine whehter we need to proxy the destination address. If not, - // we set the remoteAddress to the same address that was initially + // Determine whehter we need to proxy the destination address. If not, + // we set the remoteAddress to the same address that was initially // classified. // - sendArgs.remoteAddress = + sendArgs.remoteAddress = (packet->belongingFlow->toRemoteAddr ? packet->belongingFlow->toRemoteAddr : (UINT8*)&packet->remoteAddr); sendArgs.remoteScopeId = packet->remoteScopeId; @@ -710,7 +710,7 @@ DDProxyCloneModifyReinjectOutbound( goto Exit; } - clonedNetBufferList = NULL; // ownership transferred to the + clonedNetBufferList = NULL; // ownership transferred to the // completion function. Exit: @@ -729,8 +729,8 @@ DDProxyCloneModifyReinjectInbound( ) /* ++ - This function clones the inbound net buffer list and, if needed, - modifies the source port and/or source address and receive-injects + This function clones the inbound net buffer list and, if needed, + modifies the source port and/or source address and receive-injects the clone back to the tcpip stack. -- */ @@ -744,15 +744,15 @@ DDProxyCloneModifyReinjectInbound( NDIS_STATUS ndisStatus; // - // For inbound net buffer list, we can assume it contains only one + // For inbound net buffer list, we can assume it contains only one // net buffer. // netBuffer = NET_BUFFER_LIST_FIRST_NB(packet->netBufferList); - + nblOffset = NET_BUFFER_DATA_OFFSET(netBuffer); // - // The TCP/IP stack could have retreated the net buffer list by the + // The TCP/IP stack could have retreated the net buffer list by the // transportHeaderSize amount; detect the condition here to avoid // retreating twice. // @@ -804,7 +804,7 @@ DDProxyCloneModifyReinjectInbound( // // Check to see if port modification is required. // - if ((packet->belongingFlow->protocol == IPPROTO_UDP) && + if ((packet->belongingFlow->protocol == IPPROTO_UDP) && (packet->belongingFlow->toRemotePort != 0)) { netBuffer = NET_BUFFER_LIST_FIRST_NB(clonedNetBufferList); @@ -829,16 +829,16 @@ DDProxyCloneModifyReinjectInbound( NT_ASSERT(udpHeader != NULL); // We can assume UDP header in a net buffer // is contiguous and 2-byte aligned. _Analysis_assume_(udpHeader != NULL); - - udpHeader->srcPort = - packet->belongingFlow->toRemotePort; + + udpHeader->srcPort = + packet->belongingFlow->toRemotePort; // This is our new source port -- or // the destination port of the original // outbound traffic. udpHeader->checksum = 0; // - // Undo the advance. Net buffer list needs to be positioned at the + // Undo the advance. Net buffer list needs to be positioned at the // beginning of IP header for address modification and/or receive- // injection. // @@ -858,11 +858,11 @@ DDProxyCloneModifyReinjectInbound( clonedNetBufferList, packet->ipHeaderSize, packet->belongingFlow->addressFamily, - packet->belongingFlow->toRemoteAddr, + packet->belongingFlow->toRemoteAddr, // This is our new source address -- // or the destination address of the // original outbound traffic. - (UINT8*)&packet->belongingFlow->localAddr, + (UINT8*)&packet->belongingFlow->localAddr, // This is the destination address of // the clone -- or the source of the // original outbound traffic. @@ -901,7 +901,7 @@ DDProxyCloneModifyReinjectInbound( goto Exit; } - clonedNetBufferList = NULL; // ownership transferred to the + clonedNetBufferList = NULL; // ownership transferred to the // completion function. Exit: @@ -921,9 +921,9 @@ DDProxyWorker( /* ++ This worker thread waits for the packet queue event when the queue is - empty; and it will be woken up when there are packets queued needing to - be proxied to or from the new destination address/port. Once awaking, - It will run in a loop to clone-modify-reinject packets until the packet + empty; and it will be woken up when there are packets queued needing to + be proxied to or from the new destination address/port. Once awaking, + It will run in a loop to clone-modify-reinject packets until the packet queue is exhausted (and it will go to sleep waiting for more work). The worker thread will end once it detected the driver is unloading. @@ -940,9 +940,9 @@ DDProxyWorker( { KeWaitForSingleObject( &gPacketQueueEvent, - Executive, - KernelMode, - FALSE, + Executive, + KernelMode, + FALSE, NULL ); diff --git a/network/trans/inspect/sys/TL_drv.c b/network/trans/inspect/sys/TL_drv.c index 32ee3321f..eb54ef297 100644 --- a/network/trans/inspect/sys/TL_drv.c +++ b/network/trans/inspect/sys/TL_drv.c @@ -6,23 +6,23 @@ Copyright (c) Microsoft Corporation. All rights reserved Transport Inspect Proxy Callout Driver Sample. - This sample callout driver intercepts all transport layer traffic (e.g. - TCP, UDP, and non-error ICMP) sent to or receive from a (configurable) - remote peer and queue them to a worker thread for out-of-band processing. - The sample performs inspection of inbound and outbound connections as - well as all packets belong to those connections. In addition the sample - demonstrates special considerations required to be compatible with Windows - Vista and Windows Server 2008’s IpSec implementation. - - Inspection parameters are configurable via the following registry + This sample callout driver intercepts all transport layer traffic (e.g. + TCP, UDP, and non-error ICMP) sent to or receive from a (configurable) + remote peer and queue them to a worker thread for out-of-band processing. + The sample performs inspection of inbound and outbound connections as + well as all packets belong to those connections. In addition the sample + demonstrates special considerations required to be compatible with Windows + Vista and Windows Server 2008�s IpSec implementation. + + Inspection parameters are configurable via the following registry values -- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Inspect\Parameters - + o BlockTraffic (REG_DWORD) : 0 (permit, default); 1 (block) - o RemoteAddressToInspect (REG_SZ) : literal IPv4/IPv6 string - (e.g. “10.0.0.1”) - The sample is IP version agnostic. It performs inspection for + o RemoteAddressToInspect (REG_SZ) : literal IPv4/IPv6 string + (e.g. �10.0.0.1�) + The sample is IP version agnostic. It performs inspection for both IPv4 and IPv6 traffic. Environment: @@ -54,7 +54,7 @@ Copyright (c) Microsoft Corporation. All rights reserved #include -// +// // Configurable parameters (addresses and ports are in host order) // @@ -66,7 +66,7 @@ UINT8* configInspectRemoteAddrV6 = NULL; IN_ADDR remoteAddrStorageV4; IN6_ADDR remoteAddrStorageV6; -// +// // Callout and sublayer GUIDs // @@ -147,7 +147,7 @@ DEFINE_GUID( 0xb9, 0x66, 0x96, 0x9f, 0x26, 0x58, 0x7f, 0x03 ); -// +// // Callout driver global variables // @@ -172,7 +172,7 @@ KEVENT gWorkerEvent; BOOLEAN gDriverUnloading = FALSE; void* gThreadObj; -// +// // Callout driver implementation // @@ -187,7 +187,7 @@ TLInspectLoadConfig( NTSTATUS status; DECLARE_CONST_UNICODE_STRING(valueName, L"RemoteAddressToInspect"); DECLARE_UNICODE_STRING_SIZE(value, INET6_ADDRSTRLEN); - + status = WdfRegistryQueryUnicodeString(key, &valueName, NULL, &value); if (NT_SUCCESS(status)) @@ -206,7 +206,7 @@ TLInspectLoadConfig( if (NT_SUCCESS(status)) { - remoteAddrStorageV4.S_un.S_addr = + remoteAddrStorageV4.S_un.S_addr = RtlUlongByteSwap(remoteAddrStorageV4.S_un.S_addr); configInspectRemoteAddrV4 = &remoteAddrStorageV4.S_un.S_un_b.s_b1; } @@ -241,7 +241,7 @@ TLInspectAddFilter( NTSTATUS status = STATUS_SUCCESS; FWPM_FILTER filter = {0}; - FWPM_FILTER_CONDITION filterConditions[3] = {0}; + FWPM_FILTER_CONDITION filterConditions[3] = {0}; UINT conditionIndex; filter.layerKey = *layerKey; @@ -259,7 +259,7 @@ TLInspectAddFilter( if (remoteAddr != NULL) { - filterConditions[conditionIndex].fieldKey = + filterConditions[conditionIndex].fieldKey = FWPM_CONDITION_IP_REMOTE_ADDRESS; filterConditions[conditionIndex].matchType = FWP_MATCH_EQUAL; @@ -269,14 +269,14 @@ TLInspectAddFilter( IsEqualGUID(layerKey, &FWPM_LAYER_OUTBOUND_TRANSPORT_V4)) { filterConditions[conditionIndex].conditionValue.type = FWP_UINT32; - filterConditions[conditionIndex].conditionValue.uint32 = + filterConditions[conditionIndex].conditionValue.uint32 = *(UINT32*)remoteAddr; } else { - filterConditions[conditionIndex].conditionValue.type = + filterConditions[conditionIndex].conditionValue.type = FWP_BYTE_ARRAY16_TYPE; - filterConditions[conditionIndex].conditionValue.byteArray16 = + filterConditions[conditionIndex].conditionValue.byteArray16 = (FWP_BYTE_ARRAY16*)remoteAddr; } @@ -303,9 +303,9 @@ TLInspectRegisterALEClassifyCallouts( ) /* ++ - This function registers callouts and filters at the following layers + This function registers callouts and filters at the following layers to intercept inbound or outbound connect attempts. - + FWPM_LAYER_ALE_AUTH_CONNECT_V4 FWPM_LAYER_ALE_AUTH_CONNECT_V6 FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4 @@ -348,7 +348,7 @@ TLInspectRegisterALEClassifyCallouts( calloutRegistered = TRUE; displayData.name = L"Transport Inspect ALE Classify Callout"; - displayData.description = + displayData.description = L"Intercepts inbound or outbound connect attempts"; mCallout.calloutKey = *calloutKey; @@ -371,7 +371,7 @@ TLInspectRegisterALEClassifyCallouts( L"Transport Inspect ALE Classify", L"Intercepts inbound or outbound connect attempts", (IsEqualGUID(layerKey, &FWPM_LAYER_ALE_AUTH_CONNECT_V4) || - IsEqualGUID(layerKey, &FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4)) ? + IsEqualGUID(layerKey, &FWPM_LAYER_ALE_AUTH_RECV_ACCEPT_V4)) ? configInspectRemoteAddrV4 : configInspectRemoteAddrV6, 0, layerKey, @@ -406,7 +406,7 @@ TLInspectRegisterTransportCallouts( ) /* ++ - This function registers callouts and filters that intercept transport + This function registers callouts and filters that intercept transport traffic at the following layers -- FWPM_LAYER_OUTBOUND_TRANSPORT_V4 @@ -463,7 +463,7 @@ TLInspectRegisterTransportCallouts( L"Transport Inspect Filter (Outbound)", L"Inspect inbound/outbound transport traffic", (IsEqualGUID(layerKey, &FWPM_LAYER_OUTBOUND_TRANSPORT_V4) || - IsEqualGUID(layerKey, &FWPM_LAYER_INBOUND_TRANSPORT_V4))? + IsEqualGUID(layerKey, &FWPM_LAYER_INBOUND_TRANSPORT_V4))? configInspectRemoteAddrV4 : configInspectRemoteAddrV6, 0, layerKey, @@ -495,8 +495,8 @@ TLInspectRegisterCallouts( ) /* ++ - This function registers dynamic callouts and filters that intercept - transport traffic at ALE AUTH_CONNECT/AUTH_RECV_ACCEPT and + This function registers dynamic callouts and filters that intercept + transport traffic at ALE AUTH_CONNECT/AUTH_RECV_ACCEPT and INBOUND/OUTBOUND transport layers. Callouts and filters will be removed during DriverUnload. @@ -533,14 +533,14 @@ TLInspectRegisterCallouts( } inTransaction = TRUE; - RtlZeroMemory(&TLInspectSubLayer, sizeof(FWPM_SUBLAYER)); + RtlZeroMemory(&TLInspectSubLayer, sizeof(FWPM_SUBLAYER)); TLInspectSubLayer.subLayerKey = TL_INSPECT_SUBLAYER; TLInspectSubLayer.displayData.name = L"Transport Inspect Sub-Layer"; - TLInspectSubLayer.displayData.description = + TLInspectSubLayer.displayData.description = L"Sub-Layer for use by Transport Inspect callouts"; TLInspectSubLayer.flags = 0; - TLInspectSubLayer.weight = 0; // must be less than the weight of + TLInspectSubLayer.weight = 0; // must be less than the weight of // FWPM_SUBLAYER_UNIVERSAL to be // compatible with Vista's IpSec // implementation. @@ -720,7 +720,7 @@ TLInspectEvtDriverUnload( { KeSetEvent( &gWorkerEvent, - IO_NO_INCREMENT, + IO_NO_INCREMENT, FALSE ); } @@ -843,7 +843,7 @@ DriverEntry( goto Exit; } - if ((configInspectRemoteAddrV4 == NULL) && + if ((configInspectRemoteAddrV4 == NULL) && (configInspectRemoteAddrV6 == NULL)) { status = STATUS_DEVICE_CONFIGURATION_ERROR; @@ -862,10 +862,10 @@ DriverEntry( } InitializeListHead(&gConnList); - KeInitializeSpinLock(&gConnListLock); + KeInitializeSpinLock(&gConnListLock); InitializeListHead(&gPacketQueue); - KeInitializeSpinLock(&gPacketQueueLock); + KeInitializeSpinLock(&gPacketQueueLock); KeInitializeEvent( &gWorkerEvent, @@ -910,7 +910,7 @@ DriverEntry( ZwClose(threadHandle); Exit: - + if (!NT_SUCCESS(status)) { if (gEngineHandle != NULL) diff --git a/network/trans/inspect/sys/inspect.c b/network/trans/inspect/sys/inspect.c index ea0d43713..b6a69a9fb 100644 --- a/network/trans/inspect/sys/inspect.c +++ b/network/trans/inspect/sys/inspect.c @@ -5,15 +5,15 @@ Copyright (c) Microsoft Corporation. All rights reserved Abstract: This file implements the classifyFn callout functions for the ALE connect, - recv-accept, and transport callouts. In addition the system worker thread - that performs the actual packet inspection is also implemented here along + recv-accept, and transport callouts. In addition the system worker thread + that performs the actual packet inspection is also implemented here along with the eventing mechanisms shared between the classify function and the worker thread. - connect/Packet inspection is done out-of-band by a system worker thread - using the reference-drop-clone-reinject as well as ALE pend/complete - mechanism. Therefore the sample can serve as a base in scenarios where - filtering decision cannot be made within the classifyFn() callout and + connect/Packet inspection is done out-of-band by a system worker thread + using the reference-drop-clone-reinject as well as ALE pend/complete + mechanism. Therefore the sample can serve as a base in scenarios where + filtering decision cannot be made within the classifyFn() callout and instead must be made, for example, by an user-mode application. Environment: @@ -71,9 +71,9 @@ TLInspectALEConnectClassify( is not set), it is queued to the connection list for inspection by the worker thread. For re-auth, we first check if it is triggered by an ealier FwpsCompleteOperation call by looking for an pended connect that has been - inspected. If found, we remove it from the connect list and return the - inspection result; otherwise we can conclude that the re-auth is triggered - by policy change so we queue it to the packet queue to be process by the + inspected. If found, we remove it from the connect list and return the + inspection result; otherwise we can conclude that the re-auth is triggered + by policy change so we queue it to the packet queue to be process by the worker thread like any other regular packets. -- */ @@ -134,7 +134,7 @@ TLInspectALEConnectClassify( if (!IsAleReauthorize(inFixedValues)) { // - // If the classify is the initial authorization for a connection, we + // If the classify is the initial authorization for a connection, we // queue it to the pended connection list and notify the worker thread // for out-of-band processing. // @@ -154,7 +154,7 @@ TLInspectALEConnectClassify( goto Exit; } - NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, FWPS_METADATA_FIELD_COMPLETION_HANDLE)); // @@ -181,7 +181,7 @@ TLInspectALEConnectClassify( &packetQueueLockHandle ); - signalWorkerThread = IsListEmpty(&gConnList) && + signalWorkerThread = IsListEmpty(&gConnList) && IsListEmpty(&gPacketQueue); InsertTailList(&gConnList, &pendedConnect->listEntry); @@ -197,8 +197,8 @@ TLInspectALEConnectClassify( if (signalWorkerThread) { KeSetEvent( - &gWorkerEvent, - 0, + &gWorkerEvent, + 0, FALSE ); } @@ -207,18 +207,18 @@ TLInspectALEConnectClassify( { FWP_DIRECTION packetDirection; // - // The classify is the re-authorization for an existing connection, it + // The classify is the re-authorization for an existing connection, it // could have been triggered for one of the three cases -- // // 1) The re-auth is triggered by a FwpsCompleteOperation call to - // complete a ALE_AUTH_CONNECT classify pended earlier. + // complete a ALE_AUTH_CONNECT classify pended earlier. // 2) The re-auth is triggered by an outbound packet sent immediately // after a policy change at ALE_AUTH_CONNECT layer. - // 3) The re-auth is triggered by an inbound packet received + // 3) The re-auth is triggered by an inbound packet received // immediately after a policy change at ALE_AUTH_CONNECT layer. // - NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, FWPS_METADATA_FIELD_PACKET_DIRECTION)); packetDirection = inMetaValues->packetDirection; @@ -261,16 +261,16 @@ TLInspectALEConnectClassify( NT_ASSERT((pendedConnect->authConnectDecision == FWP_ACTION_PERMIT) || (pendedConnect->authConnectDecision == FWP_ACTION_BLOCK)); - + classifyOut->actionType = pendedConnect->authConnectDecision; - if (classifyOut->actionType == FWP_ACTION_BLOCK || + if (classifyOut->actionType == FWP_ACTION_BLOCK || filter->flags & FWPS_FILTER_FLAG_CLEAR_ACTION_RIGHT) { classifyOut->rights &= ~FWPS_RIGHT_ACTION_WRITE; } RemoveEntryList(&pendedConnect->listEntry); - + if (!gDriverUnloading && (pendedConnect->netBufferList != NULL) && (pendedConnect->authConnectDecision == FWP_ACTION_PERMIT)) @@ -295,12 +295,12 @@ TLInspectALEConnectClassify( pendedConnect = NULL; // ownership transferred KeReleaseInStackQueuedSpinLock(&packetQueueLockHandle); - + if (signalWorkerThread) { KeSetEvent( - &gWorkerEvent, - 0, + &gWorkerEvent, + 0, FALSE ); } @@ -321,7 +321,7 @@ TLInspectALEConnectClassify( // // If we reach here it means this is a policy change triggered re-auth - // for an pre-existing connection. For such a packet (inbound or + // for an pre-existing connection. For such a packet (inbound or // outbound) we queue it to the packet queue and inspect it just like // other regular data packets from TRANSPORT layers. // @@ -390,8 +390,8 @@ TLInspectALEConnectClassify( if (signalWorkerThread) { KeSetEvent( - &gWorkerEvent, - 0, + &gWorkerEvent, + 0, FALSE ); } @@ -443,7 +443,7 @@ TLInspectALERecvAcceptClassify( This is the classifyFn function for the ALE Recv-Accept (v4 and v6) callout. For an initial classify (where the FWP_CONDITION_FLAG_IS_REAUTHORIZE flag is not set), it is queued to the connection list for inspection by the - worker thread. For re-auth, it is queued to the packet queue to be process + worker thread. For re-auth, it is queued to the packet queue to be process by the worker thread like any other regular packets. -- */ @@ -503,7 +503,7 @@ TLInspectALERecvAcceptClassify( if (!IsAleReauthorize(inFixedValues)) { // - // If the classify is the initial authorization for a connection, we + // If the classify is the initial authorization for a connection, we // queue it to the pended connection list and notify the worker thread // for out-of-band processing. // @@ -523,7 +523,7 @@ TLInspectALERecvAcceptClassify( goto Exit; } - NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, FWPS_METADATA_FIELD_COMPLETION_HANDLE)); // @@ -550,7 +550,7 @@ TLInspectALERecvAcceptClassify( &packetQueueLockHandle ); - signalWorkerThread = IsListEmpty(&gConnList) && + signalWorkerThread = IsListEmpty(&gConnList) && IsListEmpty(&gPacketQueue); InsertTailList(&gConnList, &pendedRecvAccept->listEntry); @@ -566,8 +566,8 @@ TLInspectALERecvAcceptClassify( if (signalWorkerThread) { KeSetEvent( - &gWorkerEvent, - 0, + &gWorkerEvent, + 0, FALSE ); } @@ -577,16 +577,16 @@ TLInspectALERecvAcceptClassify( { FWP_DIRECTION packetDirection; // - // The classify is the re-authorization for a existing connection, it + // The classify is the re-authorization for a existing connection, it // could have been triggered for one of the two cases -- // // 1) The re-auth is triggered by an outbound packet sent immediately // after a policy change at ALE_AUTH_RECV_ACCEPT layer. - // 2) The re-auth is triggered by an inbound packet received + // 2) The re-auth is triggered by an inbound packet received // immediately after a policy change at ALE_AUTH_RECV_ACCEPT layer. // - NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, + NT_ASSERT(FWPS_IS_METADATA_FIELD_PRESENT(inMetaValues, FWPS_METADATA_FIELD_PACKET_DIRECTION)); packetDirection = inMetaValues->packetDirection; @@ -652,8 +652,8 @@ TLInspectALERecvAcceptClassify( if (signalWorkerThread) { KeSetEvent( - &gWorkerEvent, - 0, + &gWorkerEvent, + 0, FALSE ); } @@ -702,7 +702,7 @@ TLInspectTransportClassify( /* ++ This is the classifyFn function for the Transport (v4 and v6) callout. - packets (inbound or outbound) are ueued to the packet queue to be processed + packets (inbound or outbound) are ueued to the packet queue to be processed by the worker thread. -- */ @@ -758,7 +758,7 @@ TLInspectTransportClassify( addressFamily = GetAddressFamilyForLayer(inFixedValues->layerId); - packetDirection = + packetDirection = GetPacketDirectionForLayer(inFixedValues->layerId); if (packetDirection == FWP_DIRECTION_INBOUND) @@ -766,8 +766,8 @@ TLInspectTransportClassify( if (IsAleClassifyRequired(inFixedValues, inMetaValues)) { // - // Inbound transport packets that are destined to ALE Recv-Accept - // layers, for initial authorization or reauth, should be inspected + // Inbound transport packets that are destined to ALE Recv-Accept + // layers, for initial authorization or reauth, should be inspected // at the ALE layer. We permit it from Tranport here. // classifyOut->actionType = FWP_ACTION_PERMIT; @@ -861,8 +861,8 @@ TLInspectTransportClassify( if (signalWorkerThread) { KeSetEvent( - &gWorkerEvent, - 0, + &gWorkerEvent, + 0, FALSE ); } @@ -927,7 +927,7 @@ void TLInspectInjectComplete( { TL_INSPECT_PENDED_PACKET* packet = context; - UNREFERENCED_PARAMETER(dispatchLevel); + UNREFERENCED_PARAMETER(dispatchLevel); FwpsFreeCloneNetBufferList(netBufferList, 0); @@ -988,7 +988,7 @@ TLInspectCloneReinjectOutbound( goto Exit; } - clonedNetBufferList = NULL; // ownership transferred to the + clonedNetBufferList = NULL; // ownership transferred to the // completion function. Exit: @@ -1007,8 +1007,8 @@ TLInspectCloneReinjectInbound( ) /* ++ - This function clones the inbound net buffer list and, if needed, - rebuild the IP header to remove the IpSec headers and receive-injects + This function clones the inbound net buffer list and, if needed, + rebuild the IP header to remove the IpSec headers and receive-injects the clone back to the tcpip stack. -- */ @@ -1021,15 +1021,15 @@ TLInspectCloneReinjectInbound( NDIS_STATUS ndisStatus; // - // For inbound net buffer list, we can assume it contains only one + // For inbound net buffer list, we can assume it contains only one // net buffer. // netBuffer = NET_BUFFER_LIST_FIRST_NB(packet->netBufferList); - + nblOffset = NET_BUFFER_DATA_OFFSET(netBuffer); // - // The TCP/IP stack could have retreated the net buffer list by the + // The TCP/IP stack could have retreated the net buffer list by the // transportHeaderSize amount; detect the condition here to avoid // retreating twice. // @@ -1081,19 +1081,19 @@ TLInspectCloneReinjectInbound( if (packet->ipSecProtected) { // - // When an IpSec protected packet is indicated to AUTH_RECV_ACCEPT or + // When an IpSec protected packet is indicated to AUTH_RECV_ACCEPT or // INBOUND_TRANSPORT layers, for performance reasons the tcpip stack - // does not remove the AH/ESP header from the packet. And such + // does not remove the AH/ESP header from the packet. And such // packets cannot be recv-injected back to the stack w/o removing the // AH/ESP header. Therefore before re-injection we need to "re-build" // the cloned packet. - // + // status = FwpsConstructIpHeaderForTransportPacket( clonedNetBufferList, packet->ipHeaderSize, packet->addressFamily, - (UINT8*)&packet->remoteAddr, - (UINT8*)&packet->localAddr, + (UINT8*)&packet->remoteAddr, + (UINT8*)&packet->localAddr, packet->protocol, 0, NULL, @@ -1141,7 +1141,7 @@ TLInspectCloneReinjectInbound( goto Exit; } - clonedNetBufferList = NULL; // ownership transferred to the + clonedNetBufferList = NULL; // ownership transferred to the // completion function. Exit: @@ -1173,7 +1173,7 @@ TlInspectCompletePendedConnection( { HANDLE completionContext = pendedConnectLocal->completionContext; - pendedConnectLocal->authConnectDecision = + pendedConnectLocal->authConnectDecision = permitTraffic ? FWP_ACTION_PERMIT : FWP_ACTION_BLOCK; // @@ -1214,11 +1214,11 @@ TLInspectWorker( ) /* ++ - This worker thread waits for the connect and packet queue event when the - queues are empty; and it will be woken up when there are connects/packets - queued needing to be inspected. Once awaking, It will run in a loop to - complete the pended ALE classifies and/or clone-reinject packets back - until both queues are exhausted (and it will go to sleep waiting for more + This worker thread waits for the connect and packet queue event when the + queues are empty; and it will be woken up when there are connects/packets + queued needing to be inspected. Once awaking, It will run in a loop to + complete the pended ALE classifies and/or clone-reinject packets back + until both queues are exhausted (and it will go to sleep waiting for more work). The worker thread will end once it detected the driver is unloading. @@ -1241,9 +1241,9 @@ TLInspectWorker( { KeWaitForSingleObject( &gWorkerEvent, - Executive, - KernelMode, - FALSE, + Executive, + KernelMode, + FALSE, NULL ); @@ -1267,7 +1267,7 @@ TLInspectWorker( // Skip pended connections in the list, for which the auth decision is already taken. // They should not be for inbound connections. // - _Analysis_assume_(gConnList.Flink != NULL); + _Analysis_assume_(gConnList.Flink != NULL); for (listEntry = gConnList.Flink; listEntry != &gConnList; listEntry = listEntry->Flink) @@ -1280,7 +1280,7 @@ TLInspectWorker( NT_ASSERT((packet->direction != FWP_DIRECTION_INBOUND) || (packet->authConnectDecision == 0)); - + if (packet->authConnectDecision == 0) { found = TRUE; @@ -1298,8 +1298,8 @@ TLInspectWorker( } // - // Completing a pended recv_accept auth does not trigger reauth. - // So the pended entries for AUTH_RECV_ACCEPT are removed here. + // Completing a pended recv_accept auth does not trigger reauth. + // So the pended entries for AUTH_RECV_ACCEPT are removed here. // if (packet != NULL && packet->direction == FWP_DIRECTION_INBOUND) { @@ -1438,7 +1438,7 @@ TLInspectWorker( } KeReleaseInStackQueuedSpinLock(&packetQueueLockHandle); - + if (packet != NULL) { FreePendedPacket(packet); diff --git a/network/trans/inspect/sys/inspect.h b/network/trans/inspect/sys/inspect.h index baff64858..38f5c4579 100644 --- a/network/trans/inspect/sys/inspect.h +++ b/network/trans/inspect/sys/inspect.h @@ -38,7 +38,7 @@ typedef struct TL_INSPECT_PENDED_PACKET_ ADDRESS_FAMILY addressFamily; TL_INSPECT_PACKET_TYPE type; FWP_DIRECTION direction; - + UINT32 authConnectDecision; HANDLE completionContext; diff --git a/network/trans/inspect/sys/utils.h b/network/trans/inspect/sys/utils.h index 3570cd8ae..30693ebc3 100644 --- a/network/trans/inspect/sys/utils.h +++ b/network/trans/inspect/sys/utils.h @@ -127,39 +127,39 @@ GetDeliveryInterfaceIndexesForLayer( switch (layerId) { case FWPS_LAYER_ALE_AUTH_CONNECT_V4: - *interfaceIndexIndex = + *interfaceIndexIndex = FWPS_FIELD_ALE_AUTH_CONNECT_V4_INTERFACE_INDEX; - *subInterfaceIndexIndex = + *subInterfaceIndexIndex = FWPS_FIELD_ALE_AUTH_CONNECT_V4_SUB_INTERFACE_INDEX; break; case FWPS_LAYER_ALE_AUTH_CONNECT_V6: - *interfaceIndexIndex = + *interfaceIndexIndex = FWPS_FIELD_ALE_AUTH_CONNECT_V6_INTERFACE_INDEX; - *subInterfaceIndexIndex = + *subInterfaceIndexIndex = FWPS_FIELD_ALE_AUTH_CONNECT_V6_SUB_INTERFACE_INDEX; break; case FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V4: - *interfaceIndexIndex = + *interfaceIndexIndex = FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_INTERFACE_INDEX; - *subInterfaceIndexIndex = + *subInterfaceIndexIndex = FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V4_SUB_INTERFACE_INDEX; break; case FWPS_LAYER_ALE_AUTH_RECV_ACCEPT_V6: - *interfaceIndexIndex = + *interfaceIndexIndex = FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V6_INTERFACE_INDEX; - *subInterfaceIndexIndex = + *subInterfaceIndexIndex = FWPS_FIELD_ALE_AUTH_RECV_ACCEPT_V6_SUB_INTERFACE_INDEX; break; case FWPS_LAYER_INBOUND_TRANSPORT_V4: - *interfaceIndexIndex = + *interfaceIndexIndex = FWPS_FIELD_INBOUND_TRANSPORT_V4_INTERFACE_INDEX; - *subInterfaceIndexIndex = + *subInterfaceIndexIndex = FWPS_FIELD_INBOUND_TRANSPORT_V4_SUB_INTERFACE_INDEX; break; case FWPS_LAYER_INBOUND_TRANSPORT_V6: - *interfaceIndexIndex = + *interfaceIndexIndex = FWPS_FIELD_INBOUND_TRANSPORT_V6_INTERFACE_INDEX; - *subInterfaceIndexIndex = + *subInterfaceIndexIndex = FWPS_FIELD_INBOUND_TRANSPORT_V6_SUB_INTERFACE_INDEX; break; default: @@ -242,7 +242,7 @@ GetNetwork5TupleIndexesForLayer( *remoteAddressIndex = UINT_MAX; *localPortIndex = UINT_MAX; *remotePortIndex = UINT_MAX; - *protocolIndex = UINT_MAX; + *protocolIndex = UINT_MAX; NT_ASSERT(0); } } diff --git a/network/trans/msnmntr/exe/monitor.cpp b/network/trans/msnmntr/exe/monitor.cpp index def6625c4..4c2ea1c27 100644 --- a/network/trans/msnmntr/exe/monitor.cpp +++ b/network/trans/msnmntr/exe/monitor.cpp @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved Environment: User mode - + --*/ #include "windows.h" @@ -66,12 +66,12 @@ Return Value: { return ERROR_INVALID_PARAMETER; } - *monitorDevice = CreateFileW(MONITOR_DOS_NAME, - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, + *monitorDevice = CreateFileW(MONITOR_DOS_NAME, + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, NULL); if (*monitorDevice == INVALID_HANDLE_VALUE) @@ -110,7 +110,7 @@ Routine Description: Adds the callouts during installation Arguments: - + [in] PCWSTR AppPath - The path to the application to monitor. Return Value: @@ -190,7 +190,7 @@ Return Value: } printf("Successfully Added Persistent Stream callout.\n"); - + printf("Committing Transaction\n"); result = FwpmTransactionCommit(engineHandle); if (NO_ERROR == result) @@ -225,7 +225,7 @@ Routine Description: Sets the kernel callout ID's through the Monitor Sample device Arguments: - + [in] HANDLE monitorDevice - Monitor Sample device [in] CALLOUTS* callouts - Callout structure with ID's set [in] DWORD size - Size of the callout structure. @@ -295,7 +295,7 @@ Return Value: printf("Successfully Committed Transaction.\n"); } goto cleanup; - + abort: printf("Aborting Transaction\n"); result = FwpmTransactionAbort(engineHandle); @@ -325,7 +325,7 @@ Routine Description: Enables monitoring on new connections. Arguments: - + [in] HANDLE monitorDevice - Monitor Sample device [in] MONITOR_SETTINGS* monitorSettings - Settings for the Monitor Sample driver. @@ -336,7 +336,7 @@ Return Value: --*/ { DWORD bytesReturned; - + if (!DeviceIoControl(monitorDevice, MONITOR_IOCTL_ENABLE_MONITOR, monitorSettings, @@ -365,7 +365,7 @@ Routine Description: Arguments: [in] HANDLE monitorDevice - Monitor Sample device handle. - + Return Value: NO_ERROR or DeviceIoControl specific code. @@ -373,7 +373,7 @@ Return Value: --*/ { DWORD bytesReturned; - + if (!DeviceIoControl(monitorDevice, MONITOR_IOCTL_DISABLE_MONITOR, NULL, @@ -401,10 +401,10 @@ Routine Description: Filtering Platform (WFP). Arguments: - + [in] HANDLE engineHandle - Handle to the base Filtering engine [in] FWP_BYTE_BLOB* applicationPath - full path to the application including - the NULL terminator and size also + the NULL terminator and size also including the NULL the terminator [in] CALLOUTS* callouts - The callouts that need to be added. @@ -419,7 +419,7 @@ Return Value: FWPM_FILTER filter; FWPM_FILTER_CONDITION filterConditions[2]; // We only need two for this call. - RtlZeroMemory(&monitorSubLayer, sizeof(FWPM_SUBLAYER)); + RtlZeroMemory(&monitorSubLayer, sizeof(FWPM_SUBLAYER)); monitorSubLayer.subLayerKey = MONITOR_SAMPLE_SUBLAYER; monitorSubLayer.displayData.name = L"Monitor Sample Sub layer"; @@ -427,7 +427,7 @@ Return Value: monitorSubLayer.flags = 0; // We don't really mind what the order of invocation is. monitorSubLayer.weight = 0; - + printf("Starting Transaction\n"); result = FwpmTransactionBegin(engineHandle, 0); @@ -444,9 +444,9 @@ Return Value: { goto abort; } - + printf("Sucessfully added Sublayer\n"); - + RtlZeroMemory(&filter, sizeof(FWPM_FILTER)); filter.layerKey = FWPM_LAYER_ALE_FLOW_ESTABLISHED_V4; @@ -457,7 +457,7 @@ Return Value: filter.filterCondition = filterConditions; filter.subLayerKey = monitorSubLayer.subLayerKey; filter.weight.type = FWP_EMPTY; // auto-weight. - + filter.numFilterConditions = 2; RtlZeroMemory(filterConditions, sizeof(filterConditions)); @@ -491,7 +491,7 @@ Return Value: } printf("Successfully added Flow Established filter\n"); - + RtlZeroMemory(&filter, sizeof(FWPM_FILTER)); filter.layerKey = FWPM_LAYER_STREAM_V4; @@ -499,13 +499,13 @@ Return Value: filter.action.calloutKey = MONITOR_SAMPLE_STREAM_CALLOUT_V4; filter.subLayerKey = monitorSubLayer.subLayerKey; filter.weight.type = FWP_EMPTY; // auto-weight. - + filter.numFilterConditions = 0; - + RtlZeroMemory(filterConditions, sizeof(filterConditions)); filter.filterCondition = filterConditions; - + filter.displayData.name = L"Stream Layer Filter"; filter.displayData.description = L"Monitors TCP traffic."; @@ -540,7 +540,7 @@ Return Value: } cleanup: - + return result; } @@ -550,7 +550,7 @@ MonitorAppIDFromPath( _Out_ FWP_BYTE_BLOB** appId) { DWORD result = NO_ERROR; - + result = FwpmGetAppIdFromFileName(fileName, appId); return result; @@ -613,7 +613,7 @@ MonitorAppDoMonitoring(PCWSTR AppPath) printf("Adding Filters through the Filtering Engine\n"); - result = MonitorAppAddFilters(engineHandle, + result = MonitorAppAddFilters(engineHandle, applicationId); if (NO_ERROR != result) @@ -626,7 +626,7 @@ MonitorAppDoMonitoring(PCWSTR AppPath) printf("Enabling monitoring through the Monitor Sample Device\n"); monitorSettings.monitorOperation = monitorTraffic; - + result = MonitorAppEnableMonitoring(monitorDevice, &monitorSettings); if (NO_ERROR != result) @@ -662,7 +662,7 @@ MonitorAppDoMonitoring(PCWSTR AppPath) { FwpmFreeMemory((void**)&applicationId); } - + if (engineHandle) { result = FwpmEngineClose(engineHandle); @@ -708,7 +708,7 @@ MonitorAppProcessArguments(_In_ int argc, _In_reads_(argc) PCWSTR argv[]) int __cdecl wmain(_In_ int argc, _In_reads_(argc) PCWSTR argv[]) { DWORD result; - + result = MonitorAppProcessArguments(argc, argv); return (int)result; diff --git a/network/trans/msnmntr/exe/mtrace.cmd b/network/trans/msnmntr/exe/mtrace.cmd index f7c6147f4..d56fb0495 100644 --- a/network/trans/msnmntr/exe/mtrace.cmd +++ b/network/trans/msnmntr/exe/mtrace.cmd @@ -59,8 +59,8 @@ if /i "%TR_MODULE%"=="MONITOR" ( echo. echo Error: Notify component does not support this trace detail. goto :show_usage_MsnMntrNotify - ) - + ) + ) else if /i "%TR_MODULE%"=="CONTROL" ( set TR_GUID={eab718af-52de-477c-874d-cb49746bb131} set TR_MODULE=MsnMntrCtl @@ -100,7 +100,7 @@ if /i "%TR_MODULE%"=="MONITOR" ( echo. echo Error: Init component does not support this trace detail. goto :show_usage_MsnMntrInit - ) + ) ) else ( echo. @@ -209,7 +209,7 @@ goto :eof echo 9 Display all trace events echo Select a component to see individual supported tracing levels. call :show_usage_footer - + goto :eof :show_usage_MsnMntrMonitor @@ -219,7 +219,7 @@ goto :eof echo 2 Layer notifications echo 9 Display all trace events call :show_usage_footer - + goto :eof :show_usage_MsnMntrNotify @@ -232,7 +232,7 @@ goto :eof call :show_usage_footer goto :eof - + :show_usage_MsnMntrCtl call :show_usage_header echo 0 Initialization @@ -242,7 +242,7 @@ goto :eof call :show_usage_footer goto :eof - + :show_usage_MsnMntrInit call :show_usage_header echo 0 Initialization @@ -251,12 +251,12 @@ goto :eof call :show_usage_footer goto :eof - + :show_usage_header echo. echo Usage: monitor_trace COMPONENT LEVEL VERB echo. - echo Components: + echo Components: echo MONITOR, NOTIFY, CONTROL and INIT echo. echo Trace detail: diff --git a/network/trans/msnmntr/inc/ioctl.h b/network/trans/msnmntr/inc/ioctl.h index ea08dc429..9e47e7d91 100644 --- a/network/trans/msnmntr/inc/ioctl.h +++ b/network/trans/msnmntr/inc/ioctl.h @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved Environment: Kernel mode - + --*/ #pragma once diff --git a/network/trans/msnmntr/inc/mntrguid.h b/network/trans/msnmntr/inc/mntrguid.h index 8b072853f..ef899afbc 100644 --- a/network/trans/msnmntr/inc/mntrguid.h +++ b/network/trans/msnmntr/inc/mntrguid.h @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved Environment: Kernel mode - + --*/ #pragma once diff --git a/network/trans/msnmntr/sys/ctl.c b/network/trans/msnmntr/sys/ctl.c index 09a418c30..96fee1bf9 100644 --- a/network/trans/msnmntr/sys/ctl.c +++ b/network/trans/msnmntr/sys/ctl.c @@ -33,7 +33,7 @@ Copyright (c) Microsoft Corporation. All rights reserved #include "notify.h" // -// Software Tracing Definitions +// Software Tracing Definitions // #define WPP_CONTROL_GUIDS \ WPP_DEFINE_CONTROL_GUID(MsnMntrCtl,(eab718af, 52de, 477c, 874d, cb49746bb131), \ @@ -53,11 +53,11 @@ MonitorCtlDriverInit( Routine Description: - Initializes the request queue for our driver. This is how + Initializes the request queue for our driver. This is how DeviceIoControl requests are sent to KMDF drivers. Arguments: - + [in] WDFDEVICE* pDevice - Our device. --*/ @@ -133,7 +133,7 @@ MonitorEvtDeviceControl ( case MONITOR_IOCTL_DISABLE_MONITOR: { status = STATUS_SUCCESS; - + MonitorCoDisableMonitoring(); break; diff --git a/network/trans/msnmntr/sys/init.c b/network/trans/msnmntr/sys/init.c index a85ff103b..585f7b262 100644 --- a/network/trans/msnmntr/sys/init.c +++ b/network/trans/msnmntr/sys/init.c @@ -33,7 +33,7 @@ Copyright (c) Microsoft Corporation. All rights reserved #include "notify.h" // -// Software Tracing Definitions +// Software Tracing Definitions // #define WPP_CONTROL_GUIDS \ WPP_DEFINE_CONTROL_GUID(MsnMntrInit,(e7db16bb, 41be, 4c05, b73e, 5feca06f8207), \ @@ -106,8 +106,8 @@ Return Value: // // This macro is required to initialize software tracing on XP and beyond // For XP and beyond use the DriverObject as the first argument. - // - + // + WPP_INIT_TRACING(driverObject,registryPath); DoTraceMessage(TRACE_INIT, "Initializing MonitorSample Driver"); @@ -136,7 +136,7 @@ Return Value: status = STATUS_INSUFFICIENT_RESOURCES; goto cleanup; } - + status = MonitorEvtDeviceAdd(pInit); cleanup: @@ -198,7 +198,7 @@ MonitorEvtDeviceAdd( { goto cleanup; } - + WdfControlFinishInitializing(device); cleanup: diff --git a/network/trans/msnmntr/sys/msnmntr.c b/network/trans/msnmntr/sys/msnmntr.c index 214b98be6..aa8635e4b 100644 --- a/network/trans/msnmntr/sys/msnmntr.c +++ b/network/trans/msnmntr/sys/msnmntr.c @@ -141,7 +141,7 @@ MonitorCoRegisterCallouts( NTSTATUS status; // - // We won't be called for flow deletion for the flow established layer + // We won't be called for flow deletion for the flow established layer // since we only establish a flow for the stream layer, so we don't // specify a flow deletion function. // @@ -280,9 +280,9 @@ MonitorCoAllocFlowContext( goto cleanup; } - + *flowContextOut = flowContext; - + cleanup: if (!NT_SUCCESS(status)) { @@ -350,7 +350,7 @@ Notes // Flow context is always created at the Flow established layer. - // flowContext gets deleted in MonitorCoCleanupFlowContext + // flowContext gets deleted in MonitorCoCleanupFlowContext flowContext->deleting = FALSE; flowContext->flowHandle = inMetaValues->flowHandle; @@ -372,7 +372,7 @@ Notes index = FWPS_FIELD_ALE_FLOW_ESTABLISHED_V4_IP_PROTOCOL; flowContext->ipProto = inFixedValues->incomingValue[index].value.uint16; - // flowContext->processPath gets deleted in MonitorCoCleanupFlowContext + // flowContext->processPath gets deleted in MonitorCoCleanupFlowContext memcpy(flowContext->processPath, processPath->data, processPath->size); status = MonitorCoInsertFlowContext(flowContext); @@ -816,21 +816,21 @@ void MonitorCoStreamFlowDeletion( result = ULongLongToULongPtr(flowContext, &flowPtr); ASSERT(result == S_OK); _Analysis_assume_(result == S_OK); - + flowData = ((FLOW_DATA*)flowPtr); // - // If we're already being deleted from the list then we mustn't try to + // If we're already being deleted from the list then we mustn't try to // remove ourselves here. // KeAcquireInStackQueuedSpinLock(&flowContextListLock, &lockHandle); - + if (!flowData->deleting) { RemoveEntryList(&flowData->listEntry); } - + KeReleaseInStackQueuedSpinLock(&lockHandle); MonitorCoCleanupFlowContext(flowData); diff --git a/network/trans/msnmntr/sys/msnmntr.h b/network/trans/msnmntr/sys/msnmntr.h index adb470c0f..d9e2770aa 100644 --- a/network/trans/msnmntr/sys/msnmntr.h +++ b/network/trans/msnmntr/sys/msnmntr.h @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved Environment: Kernel mode - + --*/ #pragma once @@ -35,21 +35,21 @@ MonitorCoInitialize(_Inout_ DEVICE_OBJECT* deviceObject); void MonitorCoUninitialize(void); -NTSTATUS +NTSTATUS MonitorCoRegisterCallouts(_Inout_ void* deviceObject); -NTSTATUS +NTSTATUS MonitorCoUnregisterCallouts(void); -NTSTATUS +NTSTATUS MonitorCoSetApplication( _In_reads_(size) wchar_t* fileName, _In_ ULONG size); -NTSTATUS +NTSTATUS MonitorCoEnableMonitoring( _In_ MONITOR_SETTINGS* monitorSettings); -void +void MonitorCoDisableMonitoring(void); diff --git a/network/trans/msnmntr/sys/notify.c b/network/trans/msnmntr/sys/notify.c index 935cd1612..d9c5664a4 100644 --- a/network/trans/msnmntr/sys/notify.c +++ b/network/trans/msnmntr/sys/notify.c @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved Environment: Kernel mode - + --*/ #include @@ -31,7 +31,7 @@ Copyright (c) Microsoft Corporation. All rights reserved #include "notify.h" // -// Software Tracing Definitions +// Software Tracing Definitions // #define WPP_CONTROL_GUIDS \ WPP_DEFINE_CONTROL_GUID(MsnMntrNotify,(aca2f74a, 7a0d, 4f47, be4b, 66900813b8e5), \ @@ -71,7 +71,7 @@ MonitorNfpFindCharacters( { size_t currentOffset = 0; void* subStreamPtr = NULL; - + *bytesLeft = streamLength; if (subStreamLength > streamLength) @@ -91,7 +91,7 @@ MonitorNfpFindCharacters( } currentOffset += subStreamLength; } - + return subStreamPtr; } @@ -122,9 +122,9 @@ MonitorNfParseMessageInboundHttpHeader( BYTE* msgStart = NULL; size_t bytesLeft; NTSTATUS status = STATUS_INVALID_PARAMETER; - + // Walk past the HTTP header. - msgStart = (BYTE*) MonitorNfpFindCharacters((char*)stream, + msgStart = (BYTE*) MonitorNfpFindCharacters((char*)stream, streamLength, "\r\n\r\n", (ULONG)strlen("\r\n\r\n"), @@ -136,7 +136,7 @@ MonitorNfParseMessageInboundHttpHeader( msgStart += 4; // step past \r\n\r\n. msgLength = streamLength - (ULONG)(ULONG_PTR)(msgStart - stream); - + // Do the final inbound message processing. status = MonitorNfParseMessageInbound(msgStart, msgLength, @@ -174,9 +174,9 @@ MonitorNfParseMessageOutboundHttpHeader( BYTE* msgStart = NULL; size_t bytesLeft; NTSTATUS status = STATUS_SUCCESS; - + // Walk past the HTTP header. - msgStart = (BYTE*) MonitorNfpFindCharacters((char*)stream, + msgStart = (BYTE*) MonitorNfpFindCharacters((char*)stream, streamLength, "\r\n\r\n", (ULONG)strlen("\r\n\r\n"), @@ -193,7 +193,7 @@ MonitorNfParseMessageOutboundHttpHeader( localPort, remotePort); } - + return status; } @@ -216,7 +216,7 @@ MonitorNfParseStreamAndTraceMessage( streamLength, localPort, remotePort)) != STATUS_SUCCESS) - return STATUS_INSUFFICIENT_RESOURCES; + return STATUS_INSUFFICIENT_RESOURCES; } else { diff --git a/network/trans/msnmntr/sys/notify.h b/network/trans/msnmntr/sys/notify.h index ba37fab24..6d87a2936 100644 --- a/network/trans/msnmntr/sys/notify.h +++ b/network/trans/msnmntr/sys/notify.h @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved Environment: Kernel mode - + --*/ #pragma once diff --git a/network/trans/stmedit/sys/InlineEdit.c b/network/trans/stmedit/sys/InlineEdit.c index 2586072e6..91a33e964 100644 --- a/network/trans/stmedit/sys/InlineEdit.c +++ b/network/trans/stmedit/sys/InlineEdit.c @@ -4,8 +4,8 @@ Copyright (c) Microsoft Corporation. All rights reserved Abstract: Stream Edit Callout Driver Sample. - - This sample demonstrates inline stream inspection/editing + + This sample demonstrates inline stream inspection/editing via the WFP stream API. Environment: @@ -134,12 +134,12 @@ InlineEditFlushData( ExFreePoolWithTag(Buffer, STMEDIT_TAG_MDL_DATA); } - if (mdl != NULL) + if (mdl != NULL) { IoFreeMdl(mdl); } - if (NetBufferList != NULL) + if (NetBufferList != NULL) { FwpsFreeNetBufferList(NetBufferList); } @@ -167,7 +167,7 @@ InlineInjectToken( { NTSTATUS Status; NET_BUFFER_LIST* NetBufferList; - + do { Status = FwpsAllocateNetBufferAndNetBufferList( @@ -215,22 +215,22 @@ InlineInjectToken( FlowContext->ScratchDataOffset += Globals.StringXLength; FlowContext->ScratchDataLength -= Globals.StringXLength; - if (FlowContext->ScratchDataLength > 0) + if (FlowContext->ScratchDataLength > 0) { FlowContext->InlineEditState = INLINE_EDIT_SCANNING; } - else + else { FlowContext->ScratchDataOffset = 0; FlowContext->InlineEditState = INLINE_EDIT_IDLE; } } while (FALSE); - + return Status; } -VOID +VOID NTAPI InlineEditClassify( _In_ const FWPS_INCOMING_VALUES* InFixedValues, @@ -335,7 +335,7 @@ InlineEditClassify( goto Exit; } - if (streamData->dataLength == 0) + if (streamData->dataLength == 0) { PermitBytes(0); @@ -365,7 +365,7 @@ InlineEditClassify( NT_ASSERT(FlowContext->ScratchDataOffset == 0); PartialLength = (ULONG)FlowContext->ScratchDataLength; - if (PartialLength) + if (PartialLength) { NT_ASSERT(FlowContext->PartialSFlags); DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "FlowCtx %p, Partial Data Found. Length %u", FlowContext, PartialLength); @@ -414,7 +414,7 @@ InlineEditClassify( if (i != 0) { // Flush any left over partial match data on the scratch buffer. - if (PartialLength) + if (PartialLength) { InlineEditFlushData(FlowContext, PartialLength, FlowContext->PartialSFlags); } @@ -462,7 +462,7 @@ InlineEditClassify( // Permit data before partial match. When we get more data, we'll look for a complete match. // - if (PartialLength) + if (PartialLength) { InlineEditFlushData(FlowContext, PartialLength, FlowContext->PartialSFlags); } @@ -492,7 +492,7 @@ InlineEditClassify( { FlowContext->InlineEditState = INLINE_EDIT_IDLE; - if (PartialLength) + if (PartialLength) { InlineEditFlushData(FlowContext, PartialLength, FlowContext->PartialSFlags ); } diff --git a/network/trans/stmedit/sys/LwQueue.c b/network/trans/stmedit/sys/LwQueue.c index 27154d70b..53387779a 100644 --- a/network/trans/stmedit/sys/LwQueue.c +++ b/network/trans/stmedit/sys/LwQueue.c @@ -40,7 +40,7 @@ LwInitializeQueue( ExAllocatePool2( POOL_FLAG_NON_PAGED, IoSizeofWorkItem(), STMEDIT_TAG_LQWI); - if (Queue->WorkItem == NULL) + if (Queue->WorkItem == NULL) { return STATUS_INSUFFICIENT_RESOURCES; } @@ -62,7 +62,7 @@ LwUninitializeQueue( { return; } - + Queue->Initialized = FALSE; IoUninitializeWorkItem(Queue->WorkItem); @@ -131,7 +131,7 @@ LwEnqueue( Queue->Tail->Next = Entry; Queue->Tail = Entry; - if (!Queue->WorkerScheduled) + if (!Queue->WorkerScheduled) { Queue->WorkerScheduled = TRUE; @@ -161,7 +161,7 @@ LwDequeueAll( Queue->Head->Next = NULL; Queue->Tail = Queue->Head; - if (Entry == NULL) + if (Entry == NULL) { Queue->WorkerScheduled = FALSE; } diff --git a/network/trans/stmedit/sys/LwQueue.h b/network/trans/stmedit/sys/LwQueue.h index b1546062d..68debc595 100644 --- a/network/trans/stmedit/sys/LwQueue.h +++ b/network/trans/stmedit/sys/LwQueue.h @@ -6,7 +6,7 @@ #define STMEDIT_TAG_LQWI 'wLeS' // Light Weight Queue Work Items. -typedef struct _LW_ENTRY +typedef struct _LW_ENTRY { struct _LW_ENTRY *Next; } LW_ENTRY, *PLW_ENTRY; diff --git a/network/trans/stmedit/sys/OobEdit.c b/network/trans/stmedit/sys/OobEdit.c index 285dff9f7..4b40a48c6 100644 --- a/network/trans/stmedit/sys/OobEdit.c +++ b/network/trans/stmedit/sys/OobEdit.c @@ -40,7 +40,7 @@ StreamEditInitializeWorkitemPool( NT_ASSERT(Globals.WdmDevice); Status = LwInitializeQueue(Globals.WdmDevice, &Globals.ProcessingQueues[nCount], StreamEditOobPoolWorker); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_ERROR, CO_GENERAL, "Worker Queue Initialization failed with %!STATUS!", Status); break; @@ -70,14 +70,14 @@ StreamOobInjectCompletionFn( DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_ENTER_EXIT, "-><- %!FUNC!: NBL %p, Status=%!STATUS!, MDL %p", NetBufferList, NetBufferList->Status, mdl); - + // Supress warning 28922: Redundant test against NULL. Pointer is already guaranteed to be non-NULL. - // Rationale : mdl is not guaranteed to be non-NULL here... - + // Rationale : mdl is not guaranteed to be non-NULL here... + #pragma prefast(push) #pragma prefast(disable:28922) - - if (mdl != NULL) + + if (mdl != NULL) { // // The MDL mapped over a pool alloc which we need to free here. @@ -225,7 +225,7 @@ StreamOobQueueUpOutgoingData( OutgoingData = (POUTGOING_STREAM_DATA)ExAllocateFromLookasideListEx(&Globals.LookasideList); - if (OutgoingData == NULL) + if (OutgoingData == NULL) { Status = STATUS_INSUFFICIENT_RESOURCES; return Status; @@ -266,7 +266,7 @@ StreamOobFlushOutgoingData( { KeAcquireInStackQueuedSpinLock(&FlowContext->OobInfo.EditLock, &LockHandle); - if (!IsListEmpty(&FlowContext->OobInfo.OutgoingDataQueue)) + if (!IsListEmpty(&FlowContext->OobInfo.OutgoingDataQueue)) { LIST_ENTRY* Entry = RemoveHeadList(&FlowContext->OobInfo.OutgoingDataQueue); OutgoingData = CONTAINING_RECORD(Entry, OUTGOING_STREAM_DATA, Link); @@ -301,7 +301,7 @@ StreamOobFlushOutgoingData( OutgoingData->Mdl ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_ERROR, CO_GENERAL, "OobFlushOutgoingData: FwpsStreamInjectAsync() failed with Status %!STATUS!", Status); @@ -316,7 +316,7 @@ StreamOobFlushOutgoingData( { while (OutgoingData != NULL) { - if (OutgoingData->isClone) + if (OutgoingData->isClone) { FwpsDiscardClonedStreamData(OutgoingData->NetBufferList, 0, FALSE); } @@ -333,7 +333,7 @@ StreamOobFlushOutgoingData( // KeAcquireInStackQueuedSpinLock(&FlowContext->OobInfo.EditLock, &LockHandle); - if (!IsListEmpty(&FlowContext->OobInfo.OutgoingDataQueue)) + if (!IsListEmpty(&FlowContext->OobInfo.OutgoingDataQueue)) { LIST_ENTRY* Entry = RemoveHeadList(&FlowContext->OobInfo.OutgoingDataQueue); OutgoingData = CONTAINING_RECORD(Entry, OUTGOING_STREAM_DATA, Link); @@ -419,7 +419,7 @@ StreamOobReinjectData( &NetBufferList ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_ERROR, CO_GENERAL, "AllocateNetBufferAndNetBufferList failed with %!STATUS!\n", Status); break; @@ -444,17 +444,17 @@ StreamOobReinjectData( if (!NT_SUCCESS(Status)) { - if (NetBufferList != NULL) + if (NetBufferList != NULL) { FwpsFreeNetBufferList(NetBufferList); } - if (mdl != NULL) + if (mdl != NULL) { IoFreeMdl(mdl); } - if (DataCopy != NULL) + if (DataCopy != NULL) { ExFreePoolWithTag(DataCopy, STMEDIT_TAG_MDL_DATA ); } @@ -512,7 +512,7 @@ StreamOobInjectReplacement( NULL ); - if (NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { NetBufferList = NULL; } @@ -557,7 +557,7 @@ StreamOobCopyDataToFlatBuffer( streamData.dataOffset.netBufferOffset = 0; streamData.dataOffset.streamDataOffset = 0; - if (!StreamEditCopyDataForInspection(TaskEntry->FlowCtx, &streamData, streamData.dataLength)) + if (!StreamEditCopyDataForInspection(TaskEntry->FlowCtx, &streamData, streamData.dataLength)) { Status = STATUS_INSUFFICIENT_RESOURCES; } @@ -614,7 +614,7 @@ _Inout_ PTASK_ENTRY TaskEntry TaskEntry->DataLength, TaskEntry->StreamFlags, FlowContext->OobInfo.PendedDataLength); - + StreamData.dataLength = TaskEntry->DataLength; StreamData.netBufferListChain = TheNbl = TaskEntry->NetBufferList; StreamData.flags = TaskEntry->StreamFlags; @@ -721,7 +721,7 @@ _Inout_ PTASK_ENTRY TaskEntry if (i != 0) { Status = StreamOobReinjectData(FlowContext, dataStart, i, TaskEntry->StreamFlags); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -740,7 +740,7 @@ _Inout_ PTASK_ENTRY TaskEntry Globals.StringXLength ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -752,7 +752,7 @@ _Inout_ PTASK_ENTRY TaskEntry // Still more data to be searched for the match // - if (FlowContext->ScratchDataLength > 0) + if (FlowContext->ScratchDataLength > 0) { dataStart = (BYTE*)FlowContext->ScratchBuffer + FlowContext->ScratchDataOffset; --i; @@ -770,7 +770,7 @@ _Inout_ PTASK_ENTRY TaskEntry // 1 == FlowContext->OobInfo.RefCount ==> This is the last // (data-processing) Task being processed for the flow // - if (bIsLastNbl && FlowContext->bNoMoreData && (0 == FlowContext->OobInfo.PendingTasks)) + if (bIsLastNbl && FlowContext->bNoMoreData && (0 == FlowContext->OobInfo.PendingTasks)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "FlowCtx %p -> giving up on partial match search - offset %lu, scratch length %Iu", @@ -793,7 +793,7 @@ _Inout_ PTASK_ENTRY TaskEntry "FlowCtx %p -> partial match @ offset %lu, match length %Iu", FlowContext, i, (FlowContext->ScratchDataLength - i)); - if (i != 0) + if (i != 0) { // Inject any data before partial match back into the stream // @@ -804,7 +804,7 @@ _Inout_ PTASK_ENTRY TaskEntry TaskEntry->StreamFlags ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -871,7 +871,7 @@ _Inout_ PTASK_ENTRY TaskEntry TaskEntry->StreamFlags ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -905,7 +905,7 @@ _Inout_ PTASK_ENTRY TaskEntry FlowContext->PartialSFlags ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -928,7 +928,7 @@ _Inout_ PTASK_ENTRY TaskEntry NULL ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -948,7 +948,7 @@ _Inout_ PTASK_ENTRY TaskEntry TaskEntry->StreamFlags ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -986,7 +986,7 @@ _Inout_ PTASK_ENTRY TaskEntry FlowContext->ScratchDataLength, FlowContext->PartialSFlags); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -1004,7 +1004,7 @@ _Inout_ PTASK_ENTRY TaskEntry // Status = StreamOobFlushOutgoingData(FlowContext); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { goto Exit; } @@ -1035,7 +1035,7 @@ _Inout_ PTASK_ENTRY TaskEntry NULL ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "FIN injection for FlowCtx %p failed with %!STATUS!", FlowContext, Status); goto Exit; @@ -1046,7 +1046,7 @@ _Inout_ PTASK_ENTRY TaskEntry Exit: - if (TaskEntry->NetBufferList != NULL) + if (TaskEntry->NetBufferList != NULL) { FwpsDiscardClonedStreamData(TaskEntry->NetBufferList, 0, FALSE); TaskEntry->NetBufferList = NULL; @@ -1086,7 +1086,7 @@ StreamEditOobProcessTask( Status = StreamOobEditData(TaskEntry); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { KeAcquireInStackQueuedSpinLock(&FlowCtx->OobInfo.EditLock, &LockHandle); FlowCtx->OobInfo.EditState = OOB_EDIT_ERROR; @@ -1152,7 +1152,7 @@ StreamEditOobProcessTask( (VOID)StreamOobFlushOutgoingData(FlowCtx); Status = FwpsFlowAbort(FlowCtx->FlowHandle); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { (VOID) FwpsFlowRemoveContext(FlowCtx->FlowHandle, FlowCtx->LayerId, FlowCtx->CalloutId); } @@ -1289,7 +1289,7 @@ OobEditClassify( return; } - if (FlowContext->bFlowTerminating) + if (FlowContext->bFlowTerminating) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "Received data classified after FIN for FlowCtx %p.", FlowContext); diff --git a/network/trans/stmedit/sys/StreamEdit.c b/network/trans/stmedit/sys/StreamEdit.c index e4f91c61f..133be3d9a 100644 --- a/network/trans/stmedit/sys/StreamEdit.c +++ b/network/trans/stmedit/sys/StreamEdit.c @@ -13,14 +13,14 @@ Copyright (c) Microsoft Corporation. All rights reserved o Inline Editing where all modification is carried out within the WFP ClassifyFn callout function. - o Out-of-band (OOB) Editing where all modification is done by a + o Out-of-band (OOB) Editing where all modification is done by a worker thread. (this is the default) The mode setting, along with other inspection parameters are configurable via the following registry values HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\StmEdit\Parameters - + o StringToFind (REG_SZ, default = "rainy") o StringX (REG_SZ, default = "cloudy") o StringToReplace (REG_SZ, default = "sunny") @@ -43,7 +43,7 @@ Copyright (c) Microsoft Corporation. All rights reserved on both IPv4 and IPv6 data streams Before experimenting with the sample, please be sure to add an exception for - the InspectionPort configured to the firewall. + the InspectionPort configured to the firewall. Environment: Kernel mode @@ -98,7 +98,7 @@ StmEditDeReferenceFlow( // KeAcquireInStackQueuedSpinLock(&Globals.FlowContextListLock, &LockHandle); - if (!FlowContext->bEntryRemoved) + if (!FlowContext->bEntryRemoved) { RemoveEntryList(&FlowContext->Link); FlowContext->bEntryRemoved = TRUE; @@ -114,12 +114,12 @@ StmEditDeReferenceFlow( } KeReleaseInStackQueuedSpinLock(&LockHandle); - if (!FlowContext->bEditInline) + if (!FlowContext->bEditInline) { NT_ASSERT(IsListEmpty(&FlowContext->OobInfo.OutgoingDataQueue)); } - if (FlowContext->ScratchBuffer) + if (FlowContext->ScratchBuffer) { ExFreePoolWithTag(FlowContext->ScratchBuffer, STMEDIT_TAG_FLAT_BUFFER); } @@ -178,8 +178,8 @@ StreamEditInjectCompletionFn( // Rationale : mdl is not guaranteed to be non-NULL here. #pragma prefast(push) #pragma prefast(disable:28922) - - if (mdl != NULL) + + if (mdl != NULL) { // // The MDL mapped over a pool alloc which we need to free here. @@ -204,7 +204,7 @@ StreamEditRemoveFlowCtx( This will cause flowDelete function to be invoked (either synchronously or asynchronously). Remarks @ http://msdn.microsoft.com/en-us/library/windows/hardware/ff551169.aspx - + If the FwpsFlowRemoveContext0 function returns STATUS_SUCCESS, FwpsFlowRemoveContext0 calls the flowDeleteFn callout function synchronously.If FwpsFlowRemoveContext0 returns STATUS_PENDING, FwpsFlowRemoveContext0 calls flowDeleteFn asynchronously because an @@ -221,7 +221,7 @@ StreamEditRemoveFlowCtx( NT_ASSERT(Context); - if (Context->bEditInline) + if (Context->bEditInline) { (VOID) InlineEditFlushData(Context, 0, Context->PartialSFlags); } @@ -229,7 +229,7 @@ StreamEditRemoveFlowCtx( (VOID) StreamOobFlushOutgoingData(Context); } - if (Context->bFlowActive) + if (Context->bFlowActive) { Status = FwpsFlowRemoveContext( @@ -339,7 +339,7 @@ StreamEditCommonStreamClassify( // StmEditReferenceFlow(FlowContext, _MODULE_ID, __LINE__); - if (FlowContext->bEditInline) + if (FlowContext->bEditInline) { InlineEditClassify( InFixedValues, @@ -365,14 +365,14 @@ StreamEditCommonStreamClassify( StmEditDeReferenceFlow(FlowContext, _MODULE_ID, __LINE__); } -VOID +VOID StreamEditFlowEstablishedClassify( _In_ const FWPS_INCOMING_VALUES* InFixedValues, _In_ const FWPS_INCOMING_METADATA_VALUES* InMetaValues, _In_ PVOID Packet, #if(NTDDI_VERSION >= NTDDI_WIN7) _In_ const void* ClassifyContext, -#endif +#endif _In_ const FWPS_FILTER* Filter, _In_ UINT64 InFlowContext, _Inout_ FWPS_CLASSIFY_OUT* ClassifyOut @@ -393,19 +393,19 @@ StreamEditFlowEstablishedClassify( #if(NTDDI_VERSION >= NTDDI_WIN7) UNREFERENCED_PARAMETER(ClassifyContext); -#endif +#endif UNREFERENCED_PARAMETER(InFlowContext); UNREFERENCED_PARAMETER(Packet); if ((Filter->action.calloutId == Globals.FlowEstablishedV4Callout1) || - (Filter->action.calloutId == Globals.FlowEstablishedV6Callout1)) + (Filter->action.calloutId == Globals.FlowEstablishedV6Callout1)) { CalloutSet = 1; } else if ((Filter->action.calloutId == Globals.FlowEstablishedV4Callout2) || - (Filter->action.calloutId == Globals.FlowEstablishedV6Callout2)) + (Filter->action.calloutId == Globals.FlowEstablishedV6Callout2)) { CalloutSet = 2; NT_ASSERT(TRUE == Globals.MultipleCallouts); @@ -422,7 +422,7 @@ StreamEditFlowEstablishedClassify( // Lets not entertain any new flows if the driver is unloading! // - if (Globals.DriverUnloading) + if (Globals.DriverUnloading) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_ENTER_EXIT,"<-- %!FUNC!: -- Driver unloading, flow not being associated with"); return; @@ -431,7 +431,7 @@ StreamEditFlowEstablishedClassify( // // Setup the flow context for IPV4 Flows // - if (FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4 == InFixedValues->layerId) + if (FWPS_LAYER_ALE_FLOW_ESTABLISHED_V4 == InFixedValues->layerId) { ipProtIndex = FWPS_FIELD_ALE_FLOW_ESTABLISHED_V4_IP_PROTOCOL; StreamLayerId = FWPS_LAYER_STREAM_V4; @@ -441,7 +441,7 @@ StreamEditFlowEstablishedClassify( // // Setup the flow context for IPV6 Flows // - else if (FWPS_LAYER_ALE_FLOW_ESTABLISHED_V6 == InFixedValues->layerId) + else if (FWPS_LAYER_ALE_FLOW_ESTABLISHED_V6 == InFixedValues->layerId) { ipProtIndex = FWPS_FIELD_ALE_FLOW_ESTABLISHED_V6_IP_PROTOCOL; StreamLayerId = FWPS_LAYER_STREAM_V6; @@ -466,7 +466,7 @@ StreamEditFlowEstablishedClassify( { StreamFlowContext = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(STREAM_FLOW_CONTEXT), STMEDIT_TAG_FLOWCTX); - if (StreamFlowContext == NULL) + if (StreamFlowContext == NULL) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "Unable to allocate flow context"); Status = STATUS_INSUFFICIENT_RESOURCES; @@ -491,7 +491,7 @@ StreamEditFlowEstablishedClassify( if (CalloutSet == 1) { // Initialize OOB editing specific flow context structure fields - // this includes, creating a worker thread to handle + // this includes, creating a worker thread to handle KeInitializeSpinLock(&StreamFlowContext->OobInfo.EditLock); InitializeListHead(&StreamFlowContext->OobInfo.OutgoingDataQueue); @@ -518,7 +518,7 @@ StreamEditFlowEstablishedClassify( DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "FlowCtx %p, ++ Link inserted into global list", StreamFlowContext); ++Globals.FlowContextCount; - if (Globals.FlowContextCount == 1) + if (Globals.FlowContextCount == 1) { // Reset the shut-down event in case it was set due to no active flows // @@ -538,21 +538,21 @@ StreamEditFlowEstablishedClassify( // // If not able to associate a flow context, free the memory and return. // - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { - DoTraceLevelMessage(TRACE_LEVEL_ERROR, CO_GENERAL, "FlowContext association to FlowId %I64u failed with %!STATUS!", + DoTraceLevelMessage(TRACE_LEVEL_ERROR, CO_GENERAL, "FlowContext association to FlowId %I64u failed with %!STATUS!", InMetaValues->flowHandle, Status); break; } } while (FALSE); - if (!NT_SUCCESS(Status) && StreamFlowContext) + if (!NT_SUCCESS(Status) && StreamFlowContext) { StmEditDeReferenceFlow(StreamFlowContext, _MODULE_ID, __LINE__); } - DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_ENTER_EXIT, "<-- %!FUNC!%d: FlowCtx %p, cOut->Action %#x, %!STATUS!", + DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_ENTER_EXIT, "<-- %!FUNC!%d: FlowCtx %p, cOut->Action %#x, %!STATUS!", CalloutSet, StreamFlowContext, ClassifyOut->actionType, Status); return; } @@ -632,7 +632,7 @@ StreamEditRegisterFlowEstablishedCallouts( // // For example, when a local application initiates the connection, an // inbound packet has FWPM_CONDITION_DIRECTION set to FWP_DIRECTION_OUTBOUND. - // + // if (Globals.InspectionDirection != FWP_DIRECTION_MAX) { @@ -677,7 +677,7 @@ StreamEditRegisterFlowEstablishedCallouts( if (!NT_SUCCESS(Status)) { - if (calloutRegistered) + if (calloutRegistered) { FwpsCalloutUnregisterById(*CalloutId); } @@ -712,7 +712,7 @@ StreamEditRegisterStreamLayerCallouts( sCallout.classifyFn = StreamEditCommonStreamClassify; sCallout.notifyFn = StreamEditNotifyFunction; sCallout.flowDeleteFn = StreamEditFlowDeleteFunction; - + // http://msdn.microsoft.com/en-us/library/windows/hardware/ff551224.aspx // // FWPS_CALLOUT0 structure @@ -773,9 +773,9 @@ StreamEditRegisterStreamLayerCallouts( } } - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { - if (calloutRegistered) + if (calloutRegistered) { FwpsCalloutUnregisterById(*CalloutId); } @@ -790,9 +790,9 @@ NTSTATUS StreamEditRegisterCallouts( _In_ PVOID DeviceObject ) -/* +/* This function registers dynamic callouts and filters that intercept - TCP traffic at WFP FWPM_LAYER_STREAM_V4 and FWPM_LAYER_STREAM_V6 + TCP traffic at WFP FWPM_LAYER_STREAM_V4 and FWPM_LAYER_STREAM_V6 layer. Callouts and filters will be removed during DriverUnload. @@ -889,11 +889,11 @@ _In_ PVOID DeviceObject &Globals.StreamLayerV6Callout1, 1); - if (!(NT_SUCCESS(Status) || NT_SUCCESS(StatusV6))) + if (!(NT_SUCCESS(Status) || NT_SUCCESS(StatusV6))) { NT_ASSERT(FALSE); } - } // RegisterStreamLayerCallouts + } // RegisterStreamLayerCallouts }//FwpmSubLayerAdd @@ -963,7 +963,7 @@ _In_ PVOID DeviceObject &Globals.StreamLayerV6Callout2, 2); - if (!(NT_SUCCESS(Status) || NT_SUCCESS(StatusV6))) + if (!(NT_SUCCESS(Status) || NT_SUCCESS(StatusV6))) { NT_ASSERT(FALSE); } @@ -973,7 +973,7 @@ _In_ PVOID DeviceObject Status = FwpmTransactionCommit(Globals.EngineHandle); - if (NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { InTransaction = FALSE; } @@ -982,14 +982,14 @@ _In_ PVOID DeviceObject if (!NT_SUCCESS(Status)) { - if (InTransaction) + if (InTransaction) { NTSTATUS AbortStatus; AbortStatus = FwpmTransactionAbort(Globals.EngineHandle); _Analysis_assume_(NT_SUCCESS(AbortStatus)); } - if (EngineOpened) + if (EngineOpened) { FwpmEngineClose(Globals.EngineHandle); Globals.EngineHandle = NULL; @@ -1156,7 +1156,7 @@ StreamEditInitConfig( // stringValue.Buffer = buffer; stringValue.Length = 0; - stringValue.MaximumLength = sizeof(buffer); + stringValue.MaximumLength = sizeof(buffer); Status = WdfRegistryQueryUnicodeString(hKey, &stringToFindKey, &requiredSize, &stringValue); if (NT_SUCCESS(Status)) @@ -1171,7 +1171,7 @@ StreamEditInitConfig( stringValue.Buffer, (ULONG)requiredSize); - if (NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { valueSize -= sizeof(char); Globals.StringToFindLength = valueSize; @@ -1181,7 +1181,7 @@ StreamEditInitConfig( stringValue.MaximumLength = sizeof(buffer); //Attempt to read StringX value from registry - // + // Status = WdfRegistryQueryUnicodeString(hKey, &stringInMiddleKey, &requiredSize, &stringValue); if (NT_SUCCESS(Status)) { @@ -1193,7 +1193,7 @@ StreamEditInitConfig( stringValue.Buffer, (ULONG)requiredSize); - if (NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { valueSize -= sizeof(char); // NULL terminator. Globals.StringXLength = valueSize; @@ -1215,7 +1215,7 @@ StreamEditInitConfig( stringValue.Buffer, (ULONG)requiredSize); - if (NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { valueSize -= sizeof(char); Globals.StringToReplaceLength = valueSize; @@ -1223,7 +1223,7 @@ StreamEditInitConfig( } } - if (NT_SUCCESS(WdfRegistryQueryULong(hKey, &thresholdKey, &ulongValue))) + if (NT_SUCCESS(WdfRegistryQueryULong(hKey, &thresholdKey, &ulongValue))) { Globals.BusyThreshold = (size_t)ulongValue << 10; NT_ASSERT(Globals.BusyThreshold != 0); @@ -1255,7 +1255,7 @@ StreamEditInitConfig( RtlStringCchCopyA(Globals.StringX, STR_MAX_SIZE, "cloudy"); Status = RtlStringCchLengthA(Globals.StringX, STR_MAX_SIZE, &Globals.StringXLength); - + //Handle Error. NT_ASSERT(NT_SUCCESS(Status)); } @@ -1277,7 +1277,7 @@ StreamEditInitConfig( // In this sample, we want to make sure that at least one port (either local or remote) is non-zero. // - if ((Globals.InspectionLocalPort == 0) && (Globals.InspectionRemotePort == 0)) + if ((Globals.InspectionLocalPort == 0) && (Globals.InspectionRemotePort == 0)) { Globals.InspectionLocalPort = CFG_LOCAL_PORT; } @@ -1333,7 +1333,7 @@ StreamEditInitDriverObjects( //WdfDeviceInitSetDeviceType(pInit, FILE_DEVICE_NETWORK); WdfDeviceInitSetDeviceClass(pInit, &WFP_DRIVER_CLASS_GUID); WdfDeviceInitSetCharacteristics(pInit, FILE_DEVICE_SECURE_OPEN, TRUE); - + Status = WdfDeviceCreate(&pInit, WDF_NO_OBJECT_ATTRIBUTES, pDevice); if (NT_SUCCESS(Status)) @@ -1392,7 +1392,7 @@ DriverEntry( &WdfDriver, &WdfDevice); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "StreamEditInitDriverObjects failed with 0x%X", Status); break; @@ -1410,8 +1410,8 @@ DriverEntry( FALSE, FALSE, NULL); - - if (Globals.StringToReplaceMdl == NULL) + + if (Globals.StringToReplaceMdl == NULL) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "Unable to allocate StringToReplace Mdl"); Status = STATUS_INSUFFICIENT_RESOURCES; @@ -1427,7 +1427,7 @@ DriverEntry( FALSE, NULL); - if (Globals.StringXMdl == NULL) + if (Globals.StringXMdl == NULL) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "Unable to allocate Mdl#2"); Status = STATUS_INSUFFICIENT_RESOURCES; @@ -1474,7 +1474,7 @@ DriverEntry( STMEDIT_TAG_TASK_ENTRY, 0); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "Task LookasideList Creation failed with %!STATUS!", Status); break; @@ -1484,7 +1484,7 @@ DriverEntry( Status = StreamEditInitializeWorkitemPool(); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "InitializeWorkerPool failed with %!STATUS!", Status); break; @@ -1493,7 +1493,7 @@ DriverEntry( // Create WFP Injection handle // Status = FwpsInjectionHandleCreate(AF_UNSPEC, FWPS_INJECTION_TYPE_STREAM, &Globals.InjectionHandle); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "FwpsInjectionHandleCreate failed with %!STATUS!", Status); break; @@ -1503,7 +1503,7 @@ DriverEntry( // Finally, register the sublayer(s) and callouts with WFP // Status = StreamEditRegisterCallouts(Globals.WdmDevice); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "StreamEditRegisterCallouts failed with %!STATUS!", Status); break; @@ -1513,7 +1513,7 @@ DriverEntry( DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_ENTER_EXIT, "<-- %!FUNC!, %!STATUS!", Status); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { StreamEditEvtDriverUnload(WdfDriver); } @@ -1571,12 +1571,12 @@ _In_ SIZE_T BytesToCopy NewBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, NewBufferSize, STMEDIT_TAG_FLAT_BUFFER); } - if (NewBuffer != NULL) + if (NewBuffer != NULL) { // Move the existing contents of scratch buffer over to newly allocated buffer // - if (ExistingDataLength > 0) + if (ExistingDataLength > 0) { NT_ASSERT(FlowContext->ScratchBuffer != NULL); @@ -1586,7 +1586,7 @@ _In_ SIZE_T BytesToCopy // Free the old scratch buffer... // - if (FlowContext->ScratchBuffer) + if (FlowContext->ScratchBuffer) { ExFreePoolWithTag(FlowContext->ScratchBuffer, STMEDIT_TAG_FLAT_BUFFER); @@ -1596,14 +1596,14 @@ _In_ SIZE_T BytesToCopy FlowContext->ScratchDataLength = 0; } - if (NewBuffer) + if (NewBuffer) { FlowContext->ScratchBuffer = NewBuffer; FlowContext->ScratchBufferSize = NewBufferSize; FlowContext->ScratchDataLength = ExistingDataLength; } - else + else { DoTraceLevelMessage(TRACE_LEVEL_ERROR, CO_ENTER_EXIT, diff --git a/network/trans/stmedit/sys/StreamEdit.h b/network/trans/stmedit/sys/StreamEdit.h index 13fc2f34a..7bbb054e2 100644 --- a/network/trans/stmedit/sys/StreamEdit.h +++ b/network/trans/stmedit/sys/StreamEdit.h @@ -86,7 +86,7 @@ typedef struct _OUTGOING_STREAM_DATA // If the NetBufferList is a clone or did we allocate it BOOLEAN isClone; - // Valid data length + // Valid data length size_t DataLength; // Stream Flags to be used when injecting this segment of data @@ -169,14 +169,14 @@ typedef struct _STREAM_FLOW_CONTEXT size_t ScratchDataOffset; size_t ScratchDataLength; - // + // // Flow information for data (re-)injection. // UINT64 FlowHandle; UINT16 LayerId; UINT32 CalloutId; - + volatile char bFlowActive; // If the Flow is still active. true @FlowEstablished, false @FlowDelete BOOLEAN bFlowTerminating : 1; // FIN/RST has been received. @@ -213,7 +213,7 @@ typedef struct _TASK_ENTRY } TASK_ENTRY, *PTASK_ENTRY; // -// Stream Editor Globals block +// Stream Editor Globals block // typedef struct _STMEDIT_GLOBALS { @@ -284,7 +284,7 @@ typedef struct _STMEDIT_GLOBALS DEVICE_OBJECT* WdmDevice; // Device object for StreamEdit - // + // // Configurable parameters block // @@ -346,7 +346,7 @@ WFP_CLASSIFY_FUNCTION( _In_ PVOID, #if(NTDDI_VERSION >= NTDDI_WIN7) _In_ const void*, -#endif +#endif _In_ const FWPS_FILTER*, _In_ UINT64, _Inout_ FWPS_CLASSIFY_OUT* @@ -466,7 +466,7 @@ ULONG NetBufferListLength(PNET_BUFFER_LIST Nbl) return Length; } -// +// // Callout driver keys // diff --git a/network/trans/stmedit/sys/Trace.h b/network/trans/stmedit/sys/Trace.h index b52033cd9..43c4e9290 100644 --- a/network/trans/stmedit/sys/Trace.h +++ b/network/trans/stmedit/sys/Trace.h @@ -2,7 +2,7 @@ #ifndef _STREAM_TRACE_H #define _STREAM_TRACE_H -// WPP Software Tracing Definitions +// WPP Software Tracing Definitions /* 524F4849-5420-5241-494E-41205A9EEF01 */ diff --git a/network/wlan/WDI/COMMON/1x_eapol.h b/network/wlan/WDI/COMMON/1x_eapol.h index 1135bd89f..13123767b 100644 --- a/network/wlan/WDI/COMMON/1x_eapol.h +++ b/network/wlan/WDI/COMMON/1x_eapol.h @@ -2,7 +2,7 @@ Module Name: 1x_eapol.h - + Abstract: Data structure and definition about EAPOL, EAP. See also 1x_kmsm_eapolkey.h for EAPOL-Key. @@ -22,7 +22,7 @@ Module Name: // File : 1x_eapol.h // Programmer : Arunesh Mishra // -// This contains the EAPOL packet routine +// This contains the EAPOL packet routine // declarations. // // diff --git a/network/wlan/WDI/COMMON/1x_kmsm_eapolkey.h b/network/wlan/WDI/COMMON/1x_kmsm_eapolkey.h index 82419b5ff..c4d3c14fe 100644 --- a/network/wlan/WDI/COMMON/1x_kmsm_eapolkey.h +++ b/network/wlan/WDI/COMMON/1x_kmsm_eapolkey.h @@ -2,10 +2,10 @@ Module Name: 1x_kmsm_eapolkey.h - + Abstract: - 1. EAPOL-Key related data structures and helper macros. - 2. Declare helper functinos defined in 1x_kmsm_perf.c, 1x_kmsm_hmac.c. + 1. EAPOL-Key related data structures and helper macros. + 2. Declare helper functinos defined in 1x_kmsm_perf.c, 1x_kmsm_hmac.c. --*/ @@ -40,13 +40,13 @@ typedef unsigned long u4Byte; //------------------------------------------------------------------------------ // From 1x_type.h, 2005.06.30, by rcnjko. //------------------------------------------------------------------------------ -typedef union _OCTET8_INTEGER { +typedef union _OCTET8_INTEGER { u8Byte QuadPart; - struct { - u4Byte LowPart; - u4Byte HighPart; - }; + struct { + u4Byte LowPart; + u4Byte HighPart; + }; } OCTET8_INTEGER, *POCTET8_INTEGER; @@ -80,10 +80,10 @@ typedef enum { type_Group = 0, type_Pairwise = 1 } KeyType; typedef enum { type_4way2nd = 0, type_4way4th = 1, type_2way2nd = 2, type_unknow=3 } MsgType; // Added by Annie, 2005-07-11. /*----------------------------------------------------------------------------- - Network and machine byte oder conversion + Network and machine byte oder conversion Macro definition --------------------------------------------------------------------------------*/ -// The translations below are not endian-free. +-------------------------------------------------------------------------------*/ +// The translations below are not endian-free. #define long2net(l,c) (*((c) )=(unsigned char)(((l)>>24)&0xff), \ *((c)+1)=(unsigned char)(((l)>>16)&0xff), \ *((c)+2)=(unsigned char)(((l)>> 8)&0xff), \ @@ -102,7 +102,7 @@ typedef enum { type_4way2nd = 0, type_4way4th = 1, type_2way2nd = 2, type_un #define lint2net(l,c) (long2net(l.HighPart, c) , long2net(l.LowPart, c+4)) #define net2lint(c,l) (net2long(c, l.HighPart) , net2long(c+4, l.LowPart)) - + /*----------------------------------------------------------------------------- LargeInteger Inline Function definition @@ -266,12 +266,12 @@ typedef struct _KDE_IE_STRUCT { u1Byte IEType; // ID = 0xDD u1Byte IELen; - u1Byte OUI[3]; // 0x00-0x0F-0xAC + u1Byte OUI[3]; // 0x00-0x0F-0xAC u1Byte Datatype; // 0x01 u1Byte KID; u1Byte Reserved; u1Byte GTK[1]; - + }KDE_STRUCT,*PKDE_STRUCT; #ifdef REMOVE_PACK @@ -410,7 +410,7 @@ __inline int Message_EqualReplayCounter(OCTET8_INTEGER li1, OCTET_STRING f) { OCTET8_INTEGER li2; Message_ReplayCounter_OC2LI(f, &li2); - if(li1.HighPart == li2.HighPart && li1.LowPart == + if(li1.HighPart == li2.HighPart && li1.LowPart == li2.LowPart) return 1; else @@ -421,7 +421,7 @@ li2.LowPart) f is the replay counter from EAPOL-KEY message ---------------------------------------------------------------------------------------------*/ static -__inline int Message_SmallerEqualReplayCounter(OCTET8_INTEGER li1, OCTET_STRING f) +__inline int Message_SmallerEqualReplayCounter(OCTET8_INTEGER li1, OCTET_STRING f) //f0. + * where L(0) = L and L(-1) = L/x and L(i) = x*L(i) for i>0. * Normally, one would select PRE_COMP_BLOCKS to be a small number * (like 0-6) and compute any larger L(i) values "on the fly", when they * are needed. This saves space in _keystruct and needn't adversely - * impact running time. But in this implementation, to keep things as + * impact running time. But in this implementation, to keep things as * simple as possible, we compute all the L(i)-values we might ever see. - */ + */ #define PRE_COMP_BLOCKS 31 /* Must be between 0 and 31 */ #define OCB_AES_ROUNDS (OCB_AES_KEY_BITLEN / 32 + 6) @@ -74,7 +74,7 @@ struct _keystruct { rblock L_inv; /* Precomputed L/x value */ }; -/* Opaque forward declaration of key structure */ +/* Opaque forward declaration of key structure */ typedef struct _keystruct keystruct; @@ -102,7 +102,7 @@ ocb_aes_init(void *enc_key, /* AES key */ /* "ocb_done deallocates a key structure and returns NULL */ keystruct * ocb_done(keystruct *key); - + /* * "ocb_aes_encrypt takes a key structure, four buffers and a length * parameter as input. "pt_len" bytes that are pointed to by "pt" are @@ -119,7 +119,7 @@ ocb_aes_encrypt(keystruct *key, /* Initialized key struct */ void *ct, /* Buffer for (outgoing) ciphertext */ void *tag); /* Buffer for generated tag */ - + /* * "ocb_aes_decrypt takes a key structure, four buffers and a length * parameter as input. "ct_len" bytes that are pointed to by "ct" are @@ -137,7 +137,7 @@ ocb_aes_decrypt(keystruct *key, /* Initialized key struct */ ULONG ct_len, /* Byte length of ct */ void *pt, /* Buffer for (outgoing) plaintext */ void *tag); /* Tag to be verified */ - + diff --git a/network/wlan/WDI/COMMON/AMSDU_Aggregation.h b/network/wlan/WDI/COMMON/AMSDU_Aggregation.h index 4d1c3d1f9..af8d6948d 100644 --- a/network/wlan/WDI/COMMON/AMSDU_Aggregation.h +++ b/network/wlan/WDI/COMMON/AMSDU_Aggregation.h @@ -42,13 +42,13 @@ AMSDU_QuerySizeAndNum( VOID AMSDU_UpdateRxAMSDUSizeHistogram( PADAPTER Adapter, - u2Byte PacketLength + u2Byte PacketLength ); VOID AMSDU_UpdateRxAMSDUNumHistogram( PADAPTER Adapter, - u2Byte totalSubframe + u2Byte totalSubframe ); VOID @@ -59,13 +59,13 @@ AMSDU_ClearTRxAMSDUHistogram( VOID AMSDU_UpdateTxAMSDUSizeHistogram( PADAPTER Adapter, - u2Byte PacketLength + u2Byte PacketLength ); VOID AMSDU_UpdateTxAMSDUNumHistogram( PADAPTER Adapter, - u1Byte totalSubframe + u1Byte totalSubframe ); diff --git a/network/wlan/WDI/COMMON/ActionTimer.h b/network/wlan/WDI/COMMON/ActionTimer.h index 4b575d9a6..1c3b68198 100644 --- a/network/wlan/WDI/COMMON/ActionTimer.h +++ b/network/wlan/WDI/COMMON/ActionTimer.h @@ -24,7 +24,7 @@ typedef enum _ACTION_TIMER_HW_TIMER HW_TIMER_NO_USE = 0, HW_TSF_CLOCK_PS_TIMER, HW_TIMER_MAX - + } ACTION_TIMER_HW_TIMER, *PACTION_TIMER_HW_TIMER; @@ -43,13 +43,13 @@ typedef struct _ACTION_TIMER_ITEM ACTION_TIMER_ITEM, *PACTION_TIMER_ITEM; typedef enum _ACTION_TYPE { - ACTION_TYPE_INVALID = 0, + ACTION_TYPE_INVALID = 0, ACTION_TYPE_MULTICHANNEL_SWITCH, ACTION_TYPE_CUSTOMIZED_SCAN, ACTION_TYPE_P2P_POWERSAVE, ACTION_TYPE_ALL, ACTION_TYPE_MAX - + } ACTION_TYPE, *PACTION_TYPE; @@ -71,14 +71,14 @@ typedef struct _ACTION_TIMER_ITEM PVOID pContext; // User-specified data context ACTION_TIMER_ITEM_CALLBACK CallbackFunc; // Timeout callback function // --------------------------------------------------------------------------------------------------- - + } ACTION_TIMER_ITEM, *PACTION_TIMER_ITEM; -typedef struct _ACTION_TIMER +typedef struct _ACTION_TIMER { RT_LIST_ENTRY List; - + ACTION_TIMER_HANDLE TimerHandle; ACTION_TIMER_REFERENCED_CLOCK ClockType; @@ -86,25 +86,25 @@ typedef struct _ACTION_TIMER // For Tsf Shared Hardware Timer ------------- ACTION_TIMER_HW_TIMER HwTimer; // --------------------------------------- - + // For SW_OS_SYSTEM_CLOCK --------------- RT_TIMER SoftTimer; // --------------------------------------- RT_LIST_ENTRY TimeOrderedActionItemQueue; // Protected by ACTION_TIMER_COMMON_CONTEXT.ActionTimerLock u4Byte uNumberOfActionItems; // Protected by ACTION_TIMER_COMMON_CONTEXT.ActionTimerLock - + } ACTION_TIMER, *PACTION_TIMER; typedef struct _ACTION_TIMER_COMMON_CONTEXT { - RT_SPIN_LOCK ActionTimerLock; + RT_SPIN_LOCK ActionTimerLock; // Preallocated Hw Action Timer (Indexed by ACTION_TIMER_HW_TIMER) ------------------------- ACTION_TIMER HwActionTimer[HW_TIMER_MAX]; // ------------------------------------------------------------------------------------ - + RT_LIST_ENTRY ActionTimerQueue; // Protected by ACTION_TIMER_COMMON_CONTEXT.ActionTimerLock u4Byte uNumberOfActionTimers; // Protected by ACTION_TIMER_COMMON_CONTEXT.ActionTimerLock u1Byte LastAssignedTimerHandle; // Protected by ACTION_TIMER_COMMON_CONTEXT.ActionTimerLock @@ -114,7 +114,7 @@ typedef struct _ACTION_TIMER_COMMON_CONTEXT { u4Byte uAllocatedMemory; u4Byte uReleasedMemory; // -------------------------------------------------- - + } ACTION_TIMER_COMMON_CONTEXT, *PACTION_TIMER_COMMON_CONTEXT; #define ACTION_TIMER_SIZE_OF_COMMON_CONTEXT sizeof(ACTION_TIMER_COMMON_CONTEXT) diff --git a/network/wlan/WDI/COMMON/ApEngine.c b/network/wlan/WDI/COMMON/ApEngine.c index b41514829..c3fe2108e 100644 --- a/network/wlan/WDI/COMMON/ApEngine.c +++ b/network/wlan/WDI/COMMON/ApEngine.c @@ -42,10 +42,10 @@ AsocEntry_GetEntry( { return NULL; } - + for(i = sum;i < ASSOCIATE_ENTRY_NUM; i++) { - if( pMgntInfo->AsocEntry[i].bUsed && + if( pMgntInfo->AsocEntry[i].bUsed && pMgntInfo->AsocEntry[i].Sum == sum && PlatformCompareMemory(MacAddr, pMgntInfo->AsocEntry[i].MacAddr, 6) == 0 ) { @@ -54,7 +54,7 @@ AsocEntry_GetEntry( } for(i = 0; i < sum; i++) { - if( pMgntInfo->AsocEntry[i].bUsed && + if( pMgntInfo->AsocEntry[i].bUsed && pMgntInfo->AsocEntry[i].Sum == sum && PlatformCompareMemory(MacAddr, pMgntInfo->AsocEntry[i].MacAddr, 6) == 0 ) { @@ -132,14 +132,14 @@ AsocEntry_AddStation( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_WLAN_STA pEntry; u1Byte StaHWLimit = 0; - + if(pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_NO_CIPHER) StaHWLimit = ASSOCIATE_ENTRY_NUM; else if(Adapter == GetDefaultAdapter (Adapter)) StaHWLimit = 32; else StaHWLimit = 15; - + if( (ASSOCIATE_ENTRY_NUM -pMgntInfo->AvailableAsocEntryNum) >= StaHWLimit) { RT_TRACE( COMP_AP, DBG_LOUD, ("AsocEntry_AddStation(): Fail %d\n", pMgntInfo->AvailableAsocEntryNum) ); @@ -152,9 +152,9 @@ AsocEntry_AddStation( if(pEntry != NULL) { RT_TRACE_F(COMP_AP, DBG_TRACE, ("AsocEntry_ResetEntry\n")); - + AsocEntry_ResetEntry(Adapter, pEntry); - + pEntry->bUsed = TRUE; pEntry->Sum = AsocEntry_ComputeSum(MacAddr); PlatformMoveMemory(pEntry->MacAddr, MacAddr, 6); @@ -165,7 +165,7 @@ AsocEntry_AddStation( RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "Entry Address", pEntry->MacAddr); //vivi mask this, use Adapter->DM_DigTable.CurMultiSTAConnectState = DIG_MultiSTA_CONNECT instead of it - //DM_MultiSTA_InitGainChangeNotify_CONNECT(Adapter); + //DM_MultiSTA_InitGainChangeNotify_CONNECT(Adapter); { // Temp fix need to fine tune later. HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); pHalData->DM_OutSrc.DM_DigTable.CurMultiSTAConnectState = DIG_MultiSTA_CONNECT; @@ -194,7 +194,7 @@ AsocEntry_ResetEntry( pEntry->DataRate = 0; pEntry->bUseShortGI = FALSE; - + pEntry->IOTAction = 0; pEntry->IOTPeer = HT_IOT_PEER_UNKNOWN; @@ -206,23 +206,23 @@ AsocEntry_ResetEntry( // HalMacId to this AID ------------------ pEntry->AssociatedMacId = 0; // ------------------------------------ - + // // QoS Capability // pEntry->QosMode = QOS_DISABLE; - + pEntry->PSIdleCunt = 0; - + // // HT Capability. // AP_HTResetSTAEntry(Adapter, pEntry); AP_VHTResetSTAEntry(Adapter, pEntry); - + // Added by Annie, 2005-07-01. - if( ACTING_AS_AP(Adapter) && + if( ACTING_AS_AP(Adapter) && (pSecInfo->AuthMode == RT_802_11AuthModeWPAPSK ||pSecInfo->SecLvl == RT_SEC_LVL_WPA2 ) ) { Authenticator_StateINITIALIZE(Adapter, pEntry); @@ -233,17 +233,17 @@ AsocEntry_ResetEntry( WFD_RemoveAssocClient(Adapter, pEntry->MacAddr); // - // 061221, rcnjko: - // 1. We must clear PTK for RSNA IBSS case if peer STA is gone, - // otherwise, when the STA join this IBSS again, we'll try send - // encrypted EAPOL-KEY to it, and therefore 4-way fails. + // 061221, rcnjko: + // 1. We must clear PTK for RSNA IBSS case if peer STA is gone, + // otherwise, when the STA join this IBSS again, we'll try send + // encrypted EAPOL-KEY to it, and therefore 4-way fails. // - // 2. As to our GTK of RSNA IBSS and WEP key, NDIS6 won't set it again - // even all peer STA leaved. So, keep default key. + // 2. As to our GTK of RSNA IBSS and WEP key, NDIS6 won't set it again + // even all peer STA leaved. So, keep default key. // if( pMgntInfo->OpMode == RT_OP_MODE_IBSS && pMgntInfo->bRSNAPSKMode ) { - + int index; PPER_STA_MPAKEY_ENTRY pMapKey; PPER_STA_DEFAULT_KEY_ENTRY pDefKey; @@ -257,19 +257,19 @@ AsocEntry_ResetEntry( if( pMapKey->Valid && eqMacAddr(pMapKey->MACAdrss, pEntry->MacAddr) ) { RT_PRINT_ADDR( COMP_SEC, DBG_LOUD, "RSNA IBSS: Clear PTK of ", pEntry->MacAddr); - PlatformZeroMemory( pMapKey, sizeof(PER_STA_MPAKEY_ENTRY) ); + PlatformZeroMemory( pMapKey, sizeof(PER_STA_MPAKEY_ENTRY) ); } pDefKey = &(pSecInfo->PerStaDefKeyTable[index]); if( pDefKey->Valid && eqMacAddr(pDefKey->MACAdrss, pEntry->MacAddr)) { RT_PRINT_ADDR( COMP_SEC, DBG_LOUD, "RSNA IBSS: Clear GTK of ", pEntry->MacAddr); - PlatformZeroMemory( pDefKey, sizeof(PER_STA_DEFAULT_KEY_ENTRY) ); + PlatformZeroMemory( pDefKey, sizeof(PER_STA_DEFAULT_KEY_ENTRY) ); } } - + //vivi added for new cam search flow, 20091028 - //also remove hw cam + //also remove hw cam SEC_AsocEntry_ResetEntry(Adapter, pEntry); } @@ -288,7 +288,7 @@ AsocEntry_ResetEntry( { PlatformFreeMemory(pEntry->AP_RecvAsocReq, 1024); pEntry->AP_RecvAsocReq = NULL; - } + } pEntry->AP_RecvAsocReqLength = 0; if(pEntry->AP_SendAsocResp != NULL) @@ -352,7 +352,7 @@ AsocEntry_RemoveStation( #endif RemovePeerTS(Adapter, MacAddr); - + if(GET_TDLS_ENABLED(pMgntInfo) && !ACTING_AS_AP(Adapter)) { TDLS_RemovePeer(Adapter, MacAddr); @@ -388,7 +388,7 @@ AsocEntry_RemoveStation( { if(pMgntInfo->AsocEntry[i].bUsed) continue; - + // Move first of the entry with hash value=i to this empty entry. for(j = 0; j < ASSOCIATE_ENTRY_NUM; j++) { @@ -408,7 +408,7 @@ AsocEntry_RemoveStation( } else { - + pMgntInfo->AsocEntry[i].PsQueue.Flink->Blink = &(pMgntInfo->AsocEntry[i].PsQueue); // 1st node. pMgntInfo->AsocEntry[i].PsQueue.Blink->Flink = &(pMgntInfo->AsocEntry[i].PsQueue); // last node. } @@ -439,7 +439,7 @@ AsocEntry_RemoveStation( RTInitializeListHead( &(pMgntInfo->AsocEntry[j].WmmPsQueue) ); PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); pMgntInfo->AsocEntry[j].perSTAKeyInfo.pWLanSTA = &(pMgntInfo->AsocEntry[j]); - + if(Adapter->TDLSSupport) { TDLS_UpdatePeer(Adapter, &(pMgntInfo->AsocEntry[i])); @@ -502,7 +502,7 @@ AsocEntry_IsStationAssociated( { return FALSE; } - + if(pEntry->bAssociated) { return TRUE; @@ -544,7 +544,7 @@ AsocEntry_AgeFunction( bFree = FALSE; if(AsocEntry[i].bAssociated) { - RT_TRACE(COMP_AP, DBG_TRACE, ("AsocEntry_AgeFunction() check, %02X-%02X-%02X-%02X-%02X-%02X MacId %d Entry index %d\n", AsocEntry[i].MacAddr[0], AsocEntry[i].MacAddr[1], AsocEntry[i].MacAddr[2], AsocEntry[i].MacAddr[3], AsocEntry[i].MacAddr[4], AsocEntry[i].MacAddr[5], AsocEntry[i].AssociatedMacId, i)); + RT_TRACE(COMP_AP, DBG_TRACE, ("AsocEntry_AgeFunction() check, %02X-%02X-%02X-%02X-%02X-%02X MacId %d Entry index %d\n", AsocEntry[i].MacAddr[0], AsocEntry[i].MacAddr[1], AsocEntry[i].MacAddr[2], AsocEntry[i].MacAddr[3], AsocEntry[i].MacAddr[4], AsocEntry[i].MacAddr[5], AsocEntry[i].AssociatedMacId, i)); // 10 minutes. //if(TimeDifference > 600000) // rewrited by Annie, 2006-02-16. if(TimeDifference > ((u8Byte)pMgntInfo->LiveTime)*1000) @@ -574,7 +574,7 @@ AsocEntry_AgeFunction( if(AsocEntry[i].WirelessMode < WIRELESS_MODE_N_24G) nLegacyStaCnt++; else if(!AsocEntry[i].BandWidth) - n20MHzStaCnt++; + n20MHzStaCnt++; // // If the power save queues are not empty, check if we should clear the queue. @@ -585,7 +585,7 @@ AsocEntry_AgeFunction( PRT_TCB pTcb; AsocEntry[i].PSIdleCunt = (AsocEntry[i].PSIdleCunt + 1 ) % ((pMgntInfo->bWiFiConfg ? AP_CLIENT_PS_QUEUE_TIMEOUT_LOGO_SEC : AP_CLIENT_PS_QUEUE_TIMEOUT_SEC) / RT_CHECK_FOR_HANG_PERIOD); - + if( AsocEntry[i].PSIdleCunt == 0 ) { PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); @@ -603,7 +603,7 @@ AsocEntry_AgeFunction( } // - // We leave power saving mode when idle condition for PSQ and WMMPSQ was met to prevent bug check code + // We leave power saving mode when idle condition for PSQ and WMMPSQ was met to prevent bug check code // DPC_WATCHDOG_VIOLATION (133), added by Roger, 2013.08.05. // AsocEntry[i].bPowerSave = FALSE; @@ -635,7 +635,7 @@ AsocEntry_AgeFunction( { pMgntInfo->pCurrentSta = &(AsocEntry[i]); DrvIFIndicateIncommingAssociationComplete(Adapter, unspec_reason); - } + } RT_TRACE_F(COMP_AP, DBG_TRACE, ("AsocEntry_RemoveStation\n")); AsocEntry_RemoveStation(Adapter, AsocEntry[i].MacAddr); } @@ -650,7 +650,7 @@ AsocEntry_AgeFunction( // Do not update bUseProtection bit when G mode STA add or leave. 2010.11.24. by tynli. BOOLEAN bUseProtection = (nBModeStaCnt == 0)? FALSE: TRUE; - + ActUpdate_ProtectionMode(Adapter, bUseProtection); if(nBModeStaCnt == 0) pMgntInfo->mCap |= cShortSlotTime; @@ -673,7 +673,7 @@ AsocEntry_AgeFunction( pMgntInfo->pHTInfo->CurrentOpMode = HT_OPMODE_40MHZ_PROTECT; else pMgntInfo->pHTInfo->CurrentOpMode = HT_OPMODE_NO_PROTECT; - + } } @@ -691,7 +691,7 @@ AsocEntry_AgeFunction( OCTET_STRING osRateSet; u1Byte RateSet[6] = { MGN_1M, MGN_2M, MGN_5_5M, MGN_11M,MGN_6M, MGN_9M }; - //[Win7 Two Port TP IOT BroadCom Issue] when G-STA link to our Vwifi, we use protection, + //[Win7 Two Port TP IOT BroadCom Issue] when G-STA link to our Vwifi, we use protection, // however, Default link to Broadcom can only accept OFDM ACK without CCK ones. 2009.07.30, by Bohn if(pMgntInfo->IOTPeer == HT_IOT_PEER_BROADCOM) { @@ -710,7 +710,7 @@ AsocEntry_AgeFunction( } } else - { + { // Periodically update RTS rate to prevent the RTS rate > init data rate. 2010.11.24. by tynli. Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_INIT_RTS_RATE, (pu1Byte)(&Adapter)); } @@ -740,7 +740,7 @@ AsocEntry_BecomeDisassoc( ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - + // Reset association state of the STA. pEntry->bAssociated = FALSE; @@ -756,7 +756,7 @@ AsocEntry_EnumStation( ULONG i, nFound = 0; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_WLAN_STA AsocEntry = pMgntInfo->AsocEntry; - + // for (i=0; iAsocEntry[i]); RT_TRACE_F(COMP_AP, DBG_TRACE, ("AsocEntry_ResetEntry\n")); - + AsocEntry_ResetEntry(Adapter, pEntry); // This will free packets queued for this station. pEntry->bUsed = FALSE; pMgntInfo->AvailableAsocEntryNum++; @@ -850,7 +850,7 @@ AsocEntry_UpdateAsocInfo( } //RT_TRACE_F(COMP_AP, DBG_LOUD, ("Action = %d CpntentLen = %d\n", Action, ContentLength)); //RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "AsocEntry_UpdateAsocInfo(): Addr = ", StaAddr); - + switch(Action) { case ALLOCATE_ASOC_REQ: @@ -858,8 +858,8 @@ AsocEntry_UpdateAsocInfo( if(pEntry->AP_RecvAsocReq == NULL) { PlatformAllocateMemory( - Adapter, - (PVOID *)&(pEntry->AP_RecvAsocReq), + Adapter, + (PVOID *)&(pEntry->AP_RecvAsocReq), 1024); } break; @@ -869,8 +869,8 @@ AsocEntry_UpdateAsocInfo( if(pEntry->AP_SendAsocResp == NULL) { PlatformAllocateMemory( - Adapter, - (PVOID *)&(pEntry->AP_SendAsocResp), + Adapter, + (PVOID *)&(pEntry->AP_SendAsocResp), 1024); } break; @@ -880,35 +880,35 @@ AsocEntry_UpdateAsocInfo( if(pEntry->AP_AsocRspIEFromOS == NULL) { PlatformAllocateMemory( - Adapter, - (PVOID *)&(pEntry->AP_AsocRspIEFromOS), + Adapter, + (PVOID *)&(pEntry->AP_AsocRspIEFromOS), 1024); } break; } case UPDATE_ASOC_REQ: { - //RT_ASSERT(ContentLength <= 1024, + //RT_ASSERT(ContentLength <= 1024, // ("AsocEntry_UpdateAsocInfo(): ContentLength greater than 1024.\n")); if(ContentLength > 1024) { pEntry->AP_RecvAsocReqLength = 0; break; } - + if(pEntry->AP_RecvAsocReq) { PlatformMoveMemory( pEntry->AP_RecvAsocReq, Content, ContentLength); - pEntry->AP_RecvAsocReqLength= ContentLength; + pEntry->AP_RecvAsocReqLength= ContentLength; } break; } case UPDATE_ASOC_RSP: - { - //RT_ASSERT(ContentLength <= 1024, + { + //RT_ASSERT(ContentLength <= 1024, // ("AsocEntry_UpdateAsocInfo(): ContentLength greater than 1024.\n")); //RT_TRACE_F(COMP_AP, DBG_LOUD, ("UPDATE_ASOC_RSP\n")); //RT_PRINT_DATA(COMP_AP, DBG_LOUD, "UPDATE_ASOC_RSP Content:\n", Content, ContentLength); @@ -917,34 +917,34 @@ AsocEntry_UpdateAsocInfo( pEntry->AP_SendAsocRespLength = 0; break; } - + if(pEntry->AP_SendAsocResp) { PlatformMoveMemory( pEntry->AP_SendAsocResp, Content, ContentLength); - pEntry->AP_SendAsocRespLength= ContentLength; + pEntry->AP_SendAsocRespLength= ContentLength; } break; } case UPDATE_ASOC_RSP_IE_FROM_OS: { - //RT_ASSERT(ContentLength <= 1024, + //RT_ASSERT(ContentLength <= 1024, // ("AsocEntry_UpdateAsocInfo(): ContentLength greater than 1024.\n")); if(ContentLength > 1024) { pEntry->AP_AsocRspIEFromOSLength= 0; break; } - + if(pEntry->AP_AsocRspIEFromOS) { PlatformMoveMemory( pEntry->AP_AsocRspIEFromOS, Content, ContentLength); - pEntry->AP_AsocRspIEFromOSLength = ContentLength; + pEntry->AP_AsocRspIEFromOSLength = ContentLength; } break; } @@ -957,7 +957,7 @@ AsocEntry_UpdateAsocInfo( } else RT_ASSERT(TRUE, ("AP_RecvAsocReq is NULL\n")); - + pEntry->AP_RecvAsocReqLength = 0; break; } @@ -970,7 +970,7 @@ AsocEntry_UpdateAsocInfo( } else RT_ASSERT(TRUE, ("AP_SendAsocResp is NULL\n")); - + pEntry->AP_SendAsocRespLength = 0; break; } @@ -990,7 +990,7 @@ AsocEntry_UpdateAsocInfo( default: break; } - + } @@ -1066,7 +1066,7 @@ AP_PS_ReturnAllQueuedPackets( pTcb = (PRT_TCB)RTRemoveHeadList(&(pMgntInfo->GroupPsQueue)); ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); } - + for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { pEntry = &(pMgntInfo->AsocEntry[i]); @@ -1095,7 +1095,7 @@ AP_PS_ReturnAllQueuedPackets( // -// Description: Update the power-save state of a STA and take proper response +// Description: Update the power-save state of a STA and take proper response // to the STA changing their power-save mode. // 2005.07.05, by rcnjko. // @@ -1109,7 +1109,7 @@ AP_PS_UpdateStationPSState( PRT_WLAN_STA pEntry; BOOLEAN bPowerSave = (Frame_PwrMgt((*posFrame))==1) ? TRUE : FALSE; RT_STATUS rtStatus; - + pEntry = AsocEntry_GetEntry(pMgntInfo, Frame_pTaddr((*posFrame))); if(pEntry == NULL) { @@ -1123,7 +1123,7 @@ AP_PS_UpdateStationPSState( if(bPowerSave) { // STA is power-save state. // Reset the PS idle count because the STA is still sending PS packets. - pEntry->PSIdleCunt = 0; + pEntry->PSIdleCunt = 0; if(!pEntry->bPowerSave) { // RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "AP_PS_UpdateStationPSState(): Client enter to ps for addr = ", pEntry->MacAddr); @@ -1183,7 +1183,7 @@ AP_PS_UpdateStationPSState( PRT_TCB pTcb; OCTET_STRING osMpdu; BOOLEAN bSupportTxFeedback = FALSE; - + // Acquire the Tx Spin Lock to protect the variables in pEntry, // because there are more than 1 functions reference these variables. PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); @@ -1214,14 +1214,14 @@ AP_PS_UpdateStationPSState( bSupportTxFeedback = TxFeedbackInstallTxFeedbackInfoForTcb(Adapter, pTcb); - + if(bSupportTxFeedback) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - (pEntry->WmmEosp == RT_STA_EOSP_STATE_OPENED) ? RT_TX_FEEDBACK_ID_AP_WMM_PS_PKT : RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, - Adapter, - Ap_PsTxFeedbackCallback, + pTcb, + (pEntry->WmmEosp == RT_STA_EOSP_STATE_OPENED) ? RT_TX_FEEDBACK_ID_AP_WMM_PS_PKT : RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, + Adapter, + Ap_PsTxFeedbackCallback, (PVOID)pEntry ); } @@ -1257,11 +1257,11 @@ AP_PS_UpdateStationPSState( PRT_TX_LOCAL_BUFFER pBuf; pEntry->WmmEosp = RT_STA_EOSP_STATE_ENDED; - + if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructNullFunctionData( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pEntry->MacAddr, @@ -1269,15 +1269,15 @@ AP_PS_UpdateStationPSState( GET_QOS_CTRL_WMM_UP(posFrame->Octet), TRUE, FALSE); - + if(TxFeedbackInstallTxFeedbackInfoForTcb(Adapter, pTcb)) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, - Adapter, - Ap_PsTxFeedbackCallback, + pTcb, + RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, + Adapter, + Ap_PsTxFeedbackCallback, (PVOID)pEntry ); @@ -1285,7 +1285,7 @@ AP_PS_UpdateStationPSState( } pTcb->bTxUseDriverAssingedRate = TRUE; - pTcb->priority = GET_QOS_CTRL_WMM_UP(posFrame->Octet); + pTcb->priority = GET_QOS_CTRL_WMM_UP(posFrame->Octet); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, Adapter->MgntInfo.LowestBasicRate); RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "AP_PS_UpdateStationPSState(): SendQosNull of EOSP for client = ", pEntry->MacAddr); @@ -1322,21 +1322,21 @@ AP_PS_UpdateStationPSState( if(Adapter == GetFirstGOPort(Adapter)) { MultiChannelDisableEnableExactHwQueue(Adapter, FALSE); - + if(GetFirstClientPort(Adapter) != NULL) { MultiChannelDisableEnableExactHwQueue(GetFirstClientPort(Adapter), FALSE); } - + MultiChannelDumpHwQueueStatus(Adapter); } // ------------------------------------------------------------------------------------- -#endif +#endif // Send out all packet queued for the STA. PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); // - // We remove all TCBs from the PsQueue and insert into the tmp list to prevent that the TCBs may be recurcively + // We remove all TCBs from the PsQueue and insert into the tmp list to prevent that the TCBs may be recurcively // inserted back into the PsQueue when the client enters and leaves PS mode frequently. // By Bruce, 2010-06-02. // @@ -1364,10 +1364,10 @@ AP_PS_UpdateStationPSState( while( !RTIsListEmpty(&tmpList)) { pTcb = (PRT_TCB)RTRemoveHeadList(&tmpList); - + if(pMgntInfo->bAPTimExtend) { - // + // // We set the TIM to force the client to wake up no matter if the queue has the packets for this client. // It's a workaround solution for the IPOD issue. // @@ -1379,10 +1379,10 @@ AP_PS_UpdateStationPSState( { RTInsertTailListWithCnt(Get_WAIT_QUEUE(Adapter, pTcb->SpecifiedQueueID), &pTcb->List,GET_WAIT_QUEUE_CNT(Adapter,pTcb->SpecifiedQueueID)); } - } + } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } - + return pEntry; } @@ -1407,7 +1407,7 @@ AP_PS_SendPacket( if( !MacAddr_isMulticast(pRaddr) ) { // Unicast. - PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); + PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); // Queue the unicast packet if dest STA is in power-save mode. if(pEntry != NULL && pEntry->bPowerSave) @@ -1463,7 +1463,7 @@ AP_PS_FillTim( u1Byte ByteOffset,BitOffset,BeginByte,EndByte; PlatformFillMemory(pMgntInfo->TimBuf, 254, 0); - + // Set Virtual Bit Map for AID>0 (unicast). for(i = 0;i < ASSOCIATE_ENTRY_NUM; i++) { @@ -1478,11 +1478,11 @@ AP_PS_FillTim( // The P2P test plan 6.1.12 is corrected so our AP can set pvb bit for the sta in WMM UAPSD. // Revised by Bruce, 2012-06-14. // By Bruce, 2010-12-31. - // + // // if(pEntry->bUsed && pEntry->bAssociated && pEntry->bPowerSave && (!RTIsListEmpty(&(pEntry->PsQueue)) || - (!RTIsListEmpty(&(pEntry->WmmPsQueue)) && ((pEntry->WmmStaQosInfo & 0xF) == 0xF)) || + (!RTIsListEmpty(&(pEntry->WmmPsQueue)) && ((pEntry->WmmStaQosInfo & 0xF) == 0xF)) || pEntry->FillTIMFlags)) { // RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "AP_PS_FillTim(): Fill Unicast TIM for addr = ", pEntry->MacAddr); @@ -1496,7 +1496,7 @@ AP_PS_FillTim( if(MinAID == -1 || pEntry->AID < MinAID) MinAID = pEntry->AID; - + if(pEntry->FillTIM) pEntry->FillTIM= FALSE; else @@ -1524,7 +1524,7 @@ AP_PS_FillTim( // DTIM Period. pMgntInfo->Tim.Octet[1] = (u1Byte)pMgntInfo->dot11DtimPeriod; // Bitmap Control. - pMgntInfo->Tim.Octet[2] = BeginByte | + pMgntInfo->Tim.Octet[2] = BeginByte | (RTIsListEmpty(&pMgntInfo->GroupPsQueue) ? 0 : 1); pMgntInfo->Tim.Length = 4 + (EndByte-BeginByte); @@ -1535,7 +1535,7 @@ AP_PS_FillTim( // Description: Handle power-save poll. // 2005.07.07, by rcnjko. // -VOID +VOID AP_PS_OnPSPoll( IN PADAPTER Adapter, IN OCTET_STRING osMpdu @@ -1545,11 +1545,11 @@ AP_PS_OnPSPoll( pu1Byte pSaddr = Frame_pSaddr(osMpdu); PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pSaddr); RT_STATUS rtStatus; - + if(pEntry == NULL) return; - // We don't handle ps-poll with PwrMgt==TRUE, because this case is handle in + // We don't handle ps-poll with PwrMgt==TRUE, because this case is handle in // AP_PS_UpdateStationPSState() before. 2005.07.07, by rcnjko. if(Frame_PwrMgt(osMpdu) == FALSE) return; @@ -1574,7 +1574,7 @@ AP_PS_OnPSPoll( } rtStatus = TransmitTCB(Adapter, pTcb); - + if(RT_STATUS_SUCCESS != rtStatus && RT_STATUS_PKT_DROP != rtStatus) { // Insert it to tail of wait queue. @@ -1584,9 +1584,9 @@ AP_PS_OnPSPoll( } else { - // + // // Too many packets will be sent in air, and no test plan check this. - // + // PRT_TCB pTcb; PRT_TX_LOCAL_BUFFER pBuf; // Send Null Function Data to the Client, because we have no data buffered. @@ -1596,7 +1596,7 @@ AP_PS_OnPSPoll( { //Add bQoS parameter for QoS Null by Isaiah 2006-07-31 ConstructNullFunctionData( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pSaddr, @@ -1613,7 +1613,7 @@ AP_PS_OnPSPoll( } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - } + } } // @@ -1641,7 +1641,7 @@ AP_ForwardPacketWithFromDS( // Note!, we should check buffer length before copy and forward it. if(mpdu.Length > maxMpduSizeToForward) { - // We cannot forward this packet because the mpdu recived is large than + // We cannot forward this packet because the mpdu recived is large than // our transmit buffer size. 2005.06.03, by rcnjko. return FALSE; } @@ -1661,7 +1661,7 @@ AP_ForwardPacketWithFromDS( pTcb->BufferList[0].PhysicalAddressHigh = pRfd->Buffer.PhysicalAddressHigh; pTcb->BufferList[0].PhysicalAddressLow = pRfd->Buffer.PhysicalAddressLow; - // Get shifted bytes of Starting address of 802.11 header. 2006.09.28, by Emily + // Get shifted bytes of Starting address of 802.11 header. 2006.09.28, by Emily pTcb->BufferList[0].PhysicalAddressLow +=Adapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd); pTcb->BufferList[0].Length = pRfd->PacketLength; pTcb->PacketLength = pRfd->PacketLength; @@ -1695,13 +1695,13 @@ AP_ForwardPacketWithFromDS( { // Copy the incoming frame to local buffer. if( IsQoSDataFrame(mpdu.Octet ) && MacAddr_isMulticast(Frame_pDaddr(mpdu))) - { // we need to remove Qos fild for muticast + { // we need to remove Qos fild for muticast pu1Byte pOrData = pBuf->Buffer.VirtualAddress; pu1Byte pDsData = mpdu.Octet; // Copy Head !! PlatformMoveMemory( pOrData , pDsData , sMacHdrLng ); - pOrData = pOrData + sMacHdrLng ; + pOrData = pOrData + sMacHdrLng ; pDsData = pDsData + sMacHdrLng + sQoSCtlLng ; // Copy payload !! @@ -1710,12 +1710,12 @@ AP_ForwardPacketWithFromDS( // Clear Qos bite !! SET_80211_HDR_QOS_EN( pBuf->Buffer.VirtualAddress , 0 ); - // Set Packet Length + // Set Packet Length Packetleng = pRfd->PacketLength - sQoSCtlLng; } else { - + PlatformMoveMemory(pBuf->Buffer.VirtualAddress, mpdu.Octet, mpdu.Length); Packetleng = pRfd->PacketLength; @@ -1737,7 +1737,7 @@ AP_ForwardPacketWithFromDS( pTcb->BufferType = RT_TCB_BUFFER_TYPE_LOCAL; pTcb->Reserved = pBuf; pTcb->bInsert8BytesForEarlyMode=FALSE; - + bResult = TRUE; } else @@ -1780,12 +1780,12 @@ AP_ForwardPacketWithFromDS( SET_80211_HDR_TO_DS(pHeader, 0); // Duration and Sequence control will be set up in TransmitTcb(). - SET_80211_HDR_DURATION(pHeader, 0); + SET_80211_HDR_DURATION(pHeader, 0); SET_80211_HDR_FRAGMENT_SEQUENCE(pHeader, 0); //RT_PRINT_DATA(COMP_INIT, DBG_LOUD, ("Header \n"), pHeader, 32); // Forward it. - // AP_PS_SendPacket() will queue the packet to send in proper queue + // AP_PS_SendPacket() will queue the packet to send in proper queue // if necessary, 2005.07.05, by rcnjko. pTcb->pAdapter = Adapter; NicIFSendPacket(Adapter, pTcb); @@ -1798,13 +1798,13 @@ AP_ForwardPacketWithFromDS( // -// Description: +// Description: // Translate and forward the packet received from WDS AP to STA associated. // 2006.06.11, by rcnjko. // BOOLEAN AP_FromWdsToBss( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_RFD pRfd, IN BOOLEAN bNeedCopy ) @@ -1824,7 +1824,7 @@ AP_FromWdsToBss( // Note!, we should check buffer length before copy and forward it. if(mpdu.Length > maxMpduSizeToForward) { - // We cannot forward this packet because the mpdu recived is larger than + // We cannot forward this packet because the mpdu recived is larger than // our transmit buffer size. return bResult; } @@ -1834,17 +1834,17 @@ AP_FromWdsToBss( // TODO: consider per-STA encryption algorithm and QoS. BssFrameHdrLng = sMacHdrLng + pMgntInfo->SecurityInfo.EncryptionHeadOverhead; - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(bNeedCopy == FALSE) - { // case 1: Reuse the buffer in RFD. + { // case 1: Reuse the buffer in RFD. // // Note that, in this case: - // pTcb->BufferList[0]: 802.11 Header without Addr4 (including QoS and Security), + // pTcb->BufferList[0]: 802.11 Header without Addr4 (including QoS and Security), // which references to pTcb->Header[0]. - // pTcb->BufferList[1]: 802.11 frame body (begine with LLC), - // which reuses pRfd->Buffer with proper offset. + // pTcb->BufferList[1]: 802.11 frame body (begine with LLC), + // which reuses pRfd->Buffer with proper offset. // 2006.06.11, by rcnjko. // @@ -1886,8 +1886,8 @@ AP_FromWdsToBss( { // Copy the incoming frame to local buffer with proper offset. PlatformMoveMemory( - pBuf->Buffer.VirtualAddress + BssFrameHdrLng, - mpdu.Octet + WdsFrameHdrLng, + pBuf->Buffer.VirtualAddress + BssFrameHdrLng, + mpdu.Octet + WdsFrameHdrLng, mpdu.Length - WdsFrameHdrLng); // Set up TCB. @@ -1918,13 +1918,13 @@ AP_FromWdsToBss( u1Byte SrcAddr[6]; u1Byte DstAddr[6]; pu1Byte pHeader = NULL; - + // Back up SA/DA addresses. PlatformMoveMemory(SrcAddr, Frame_pSaddr(mpdu), 6); PlatformMoveMemory(DstAddr, Frame_pDaddr(mpdu), 6); - + pHeader = pTcb->BufferList[0].VirtualAddress; - + // Clear Flag SET_80211_HDR_MORE_FRAG(pHeader, 0); SET_80211_HDR_RETRY(pHeader, 0); @@ -1932,7 +1932,7 @@ AP_FromWdsToBss( SET_80211_HDR_MORE_DATA(pHeader, 0); SET_80211_HDR_WEP(pHeader, 0); SET_80211_HDR_ORDER(pHeader, 0); - + // Frame Control field. SET_80211_HDR_FRAME_CONTROL(pHeader, 0); // clear all flags before set SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); @@ -1942,15 +1942,15 @@ AP_FromWdsToBss( SET_80211_HDR_ADDRESS1(pHeader, DstAddr); // DA SET_80211_HDR_ADDRESS2(pHeader, pMgntInfo->Bssid); // BSSID SET_80211_HDR_ADDRESS3(pHeader, SrcAddr); // SA - + // Duration and Sequence control will be set up in TransmitTcb(). SET_80211_HDR_DURATION(pHeader, 0); SET_80211_HDR_FRAGMENT_SEQUENCE(pHeader, 0); RT_PRINT_DATA(COMP_AP, DBG_TRACE, ("AP_FromWdsToBss(): "), pTcb->BufferList[0].VirtualAddress, pTcb->BufferList[0].Length); - + // Forward it. - // AP_PS_SendPacket() will queue the packet to send in proper queue + // AP_PS_SendPacket() will queue the packet to send in proper queue // if necessary, 2005.07.05, by rcnjko. pTcb->pAdapter = Adapter; NicIFSendPacket(Adapter, pTcb); @@ -1962,13 +1962,13 @@ AP_FromWdsToBss( } // -// Description: +// Description: // Translate and forward the packet received from STA associated to WDS AP. // 2006.06.11, by rcnjko. // BOOLEAN AP_FromBssToWds( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_RFD pRfd, IN BOOLEAN bNeedCopy ) @@ -1988,7 +1988,7 @@ AP_FromBssToWds( // Note!, we should check buffer length before copy and forward it. if(mpdu.Length > maxMpduSizeToForward) { - // We cannot forward this packet because the mpdu recived is larger than + // We cannot forward this packet because the mpdu recived is larger than // our transmit buffer size. return bResult; } @@ -1998,17 +1998,17 @@ AP_FromBssToWds( // TODO: consider per-STA encryption algorithm. BssFrameHdrLng = Frame_FrameHdrLng(mpdu) + pMgntInfo->SecurityInfo.EncryptionHeadOverhead; - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(bNeedCopy == FALSE) - { // case 1: Reuse the buffer in RFD. + { // case 1: Reuse the buffer in RFD. // // Note that, in this case: - // pTcb->BufferList[0]: 802.11 Header with Addr4 (including QoS and Security), + // pTcb->BufferList[0]: 802.11 Header with Addr4 (including QoS and Security), // which references to pTcb->Header[0]. - // pTcb->BufferList[1]: 802.11 frame body (begine with LLC), - // which reuses pRfd->Buffer with proper offset. + // pTcb->BufferList[1]: 802.11 frame body (begine with LLC), + // which reuses pRfd->Buffer with proper offset. // 2006.06.11, by rcnjko. // @@ -2050,8 +2050,8 @@ AP_FromBssToWds( { // Copy the incoming frame to local buffer with proper offset. PlatformMoveMemory( - pBuf->Buffer.VirtualAddress + WdsFrameHdrLng, - mpdu.Octet + BssFrameHdrLng, + pBuf->Buffer.VirtualAddress + WdsFrameHdrLng, + mpdu.Octet + BssFrameHdrLng, mpdu.Length - BssFrameHdrLng); // Set up TCB. @@ -2082,13 +2082,13 @@ AP_FromBssToWds( u1Byte SrcAddr[6]; u1Byte DstAddr[6]; pu1Byte pHeader; - + // Back up SA/DA addresses. PlatformMoveMemory(SrcAddr, Frame_pSaddr(mpdu), 6); PlatformMoveMemory(DstAddr, Frame_pDaddr(mpdu), 6); - + pHeader = pTcb->BufferList[0].VirtualAddress; - + // Frame Control field. // Clear Flag SET_80211_HDR_MORE_FRAG(pHeader, 0); @@ -2097,7 +2097,7 @@ AP_FromBssToWds( SET_80211_HDR_MORE_DATA(pHeader, 0); SET_80211_HDR_WEP(pHeader, 0); SET_80211_HDR_ORDER(pHeader, 0); - + SET_80211_HDR_FRAME_CONTROL(pHeader, 0); // clear all flags before set SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); SET_80211_HDR_FROM_DS(pHeader, 1); @@ -2108,15 +2108,15 @@ AP_FromBssToWds( SET_80211_HDR_ADDRESS2(pHeader, pMgntInfo->Bssid); // TA SET_80211_HDR_ADDRESS3(pHeader, DstAddr); // DA SET_80211_HDR_ADDRESS4(pHeader, SrcAddr); // SA - + // Duration and Sequence control will be set up in TransmitTcb(). SET_80211_HDR_DURATION(pHeader, 0); SET_80211_HDR_FRAGMENT_SEQUENCE(pHeader, 0); RT_PRINT_DATA(COMP_AP, DBG_TRACE, ("AP_FromBssToWds(): "), pTcb->BufferList[0].VirtualAddress, pTcb->BufferList[0].Length); - + // Forward it. - // AP_PS_SendPacket() will queue the packet to send in proper queue + // AP_PS_SendPacket() will queue the packet to send in proper queue // if necessary, 2005.07.05, by rcnjko. pTcb->pAdapter = Adapter; NicIFSendPacket(Adapter, pTcb); @@ -2132,19 +2132,19 @@ AP_FromBssToWds( // Translate header or send packet to to WDS. // // Assumption: -// 1. We are in AP mode and WDS is enabled. +// 1. We are in AP mode and WDS is enabled. // 2. pTcb contains 802.11 Data frame from us. // 3. TX spinlock is acquired. -// 4. Usage of pTcb->BufferList[]: +// 4. Usage of pTcb->BufferList[]: // pTcb->BufferList[0]: 802.11 header (including QoS and Security header). // pTcb->BufferList[1]: LLC. // pTcb->BufferList[2-n]: frame body (starting from TypeLength). // -// 2006.06.11, by rcnjko. +// 2006.06.11, by rcnjko. // VOID AP_LocalToWds( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_TCB pTcbSrc, IN BOOLEAN bCopyAndForward ) @@ -2161,9 +2161,9 @@ AP_LocalToWds( // Change 802.11 header length and related. // Consider WDS frame with Security/QoS case. - pTcbToWds->PacketLength -= pTcbToWds->BufferList[0].Length; + pTcbToWds->PacketLength -= pTcbToWds->BufferList[0].Length; pTcbToWds->BufferList[0].Length = 30; - pTcbToWds->PacketLength += pTcbToWds->BufferList[0].Length; + pTcbToWds->PacketLength += pTcbToWds->BufferList[0].Length; } else { // Copy frame to local buffer. @@ -2179,16 +2179,16 @@ AP_LocalToWds( for(idx = 1; idx < pTcbSrc->BufferCount; idx++) { PlatformMoveMemory( - pBuf->Buffer.VirtualAddress + BytesCopied, - pTcbSrc->BufferList[idx].VirtualAddress, + pBuf->Buffer.VirtualAddress + BytesCopied, + pTcbSrc->BufferList[idx].VirtualAddress, pTcbSrc->BufferList[idx].Length); BytesCopied += pTcbSrc->BufferList[idx].Length; } - + // Set up TCB. pTcbToWds->BufferList[0] = pBuf->Buffer; - pTcbToWds->BufferList[0].Length = BytesCopied; + pTcbToWds->BufferList[0].Length = BytesCopied; pTcbToWds->PacketLength = pTcbToWds->BufferList[0].Length; pTcbToWds->BufferCount = 1; @@ -2231,7 +2231,7 @@ AP_LocalToWds( SET_80211_HDR_FRAME_CONTROL(pHeader, 0);// clear all flags before set SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); SET_80211_HDR_FROM_DS(pHeader, 1); - SET_80211_HDR_TO_DS(pHeader, 1); + SET_80211_HDR_TO_DS(pHeader, 1); // Change addresses (RA/TA/DA/SA). SET_80211_HDR_ADDRESS1(pHeader, pMgntInfo->WdsApAddr); @@ -2251,7 +2251,7 @@ AP_LocalToWds( if(bCopyAndForward) { // Forward it. - // AP_PS_SendPacket() will queue the packet to send in proper queue + // AP_PS_SendPacket() will queue the packet to send in proper queue // if necessary, 2005.07.05, by rcnjko. pTcbToWds->pAdapter = Adapter; NicIFSendPacket(Adapter, pTcbToWds); @@ -2265,21 +2265,21 @@ AP_LocalToWds( // Dispatch the data frame to WDS if necessary. // // Assumption: -// 1. We are in AP mode and WDS is enabled. +// 1. We are in AP mode and WDS is enabled. // 2. pTcb contains 802.11 Data frame from us. // 3. TX spinlock is acquired. // -// 2006.06.11, by rcnjko. +// 2006.06.11, by rcnjko. // VOID AP_WdsTx( IN PADAPTER Adapter, IN PRT_TCB pTcb) { - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); if(MacAddr_isMulticast(pTcb->DestinationAddress)) - { // Mcst/Bcst destination => forward one copy to WDS AP. + { // Mcst/Bcst destination => forward one copy to WDS AP. AP_LocalToWds(Adapter, pTcb, TRUE); } else @@ -2295,7 +2295,7 @@ AP_WdsTx( // // Description: Handle incoming Authentication frames with odd arSeq. -// Output: Return TRUE if we will response the incoming auth frame, FALSE o.w.. +// Output: Return TRUE if we will response the incoming auth frame, FALSE o.w.. // // 2005.06.01, by rcnjko. // @@ -2359,7 +2359,7 @@ AP_OnAuthOdd( allowed = TRUE; } else - return FALSE; + return FALSE; } else if(pMgntInfo->LockType == MAC_FILTER_REJECT) { @@ -2408,35 +2408,35 @@ AP_OnAuthOdd( RT_TRACE( COMP_AP, DBG_LOUD, ("AP_OnAuthOdd(): unknow STA MAC address!\n") ); return FALSE; } - } + } } #if 1 //Added by Jay 0713 for processing integrity failure - + // Refuse all Authentication Requests within 60 sec after Integrity Failure event happened if(pMgntInfo->globalKeyInfo.TimeSlot_IntegrityFail2 != 0 && pMgntInfo->globalKeyInfo.CurrentTimeSlot < pMgntInfo->globalKeyInfo.TimeSlot_IntegrityFail2 + 60) { return FALSE; } -#endif +#endif // Initialize default value for Auth to resonse. AuthStatusCode = StatusCode_Unspecified_failure; FillOctetString(AuthChallengetext, NULL, 0); - + // Gather information from incoming Auth frame. - arSta = Frame_Addr2(authpdu); + arSta = Frame_Addr2(authpdu); arAlg = (AUTH_ALGORITHM)Frame_AuthAlgorithmNum(authpdu); arSeq = Frame_AuthTransactionSeqNum(authpdu); RT_TRACE(COMP_MLME, DBG_LOUD, ("AP_OnAuthOdd(): STA: %2.2x-%2.2x-%2.2x-%2.2x-%2.2x-%2.2x\n", arSta[0], arSta[1], arSta[2], arSta[3], arSta[4], arSta[5])); - - // Classify with arSeq. + + // Classify with arSeq. switch(arSeq) { case 1: - // Classify with arAlg. + // Classify with arAlg. switch(arAlg) { case OPEN_SYSTEM: @@ -2454,14 +2454,14 @@ AP_OnAuthOdd( // routine might cause bug check code DPC_WATCHDOG_VIOLATION (133). // 2013.06.26. // - AsocEntry_BecomeDisassoc(Adapter, pEntry); + AsocEntry_BecomeDisassoc(Adapter, pEntry); MacIdDeregisterSpecificMacId(Adapter, pEntry->AssociatedMacId); - + RT_TRACE( COMP_AP, DBG_LOUD, ("AP_OnAuthOdd(): pEntry->bAssociated\n") ); - if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED + if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) { - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, pEntry->MacAddr, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, pEntry->MacAddr, 6); DrvIFIndicateDisassociation(Adapter, unspec_reason, pEntry->MacAddr); } else if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP) @@ -2473,12 +2473,12 @@ AP_OnAuthOdd( } else if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP) { - bDuplicateAuth = TRUE; + bDuplicateAuth = TRUE; AuthStatusCode = StatusCode_success; pMgntInfo->pCurrentSta = pEntry; DrvIFIndicateIncommingAssociationComplete(Adapter, unspec_reason); } - + if(!bDuplicateAuth) { RT_TRACE( COMP_AP, DBG_LOUD, ("AP_OnAuthOdd(): AsocEntry_RemoveStation\n") ); @@ -2491,7 +2491,7 @@ AP_OnAuthOdd( if(!AsocEntry_AddStation(Adapter, arSta, arAlg)) { RT_TRACE( COMP_AP, DBG_LOUD, ("AP_OnAuthOdd(): StatusCode_assoc_deniedbyap\n") ); - AuthStatusCode = StatusCode_assoc_deniedbyap; + AuthStatusCode = StatusCode_assoc_deniedbyap; break; } } @@ -2503,7 +2503,7 @@ AP_OnAuthOdd( pEntry = AsocEntry_GetEntry(pMgntInfo, arSta); pEntry->AuthPassSeq = 2; - AuthStatusCode = StatusCode_success; + AuthStatusCode = StatusCode_success; } else { @@ -2522,7 +2522,7 @@ AP_OnAuthOdd( if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) { - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, pEntry->MacAddr, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, pEntry->MacAddr, 6); DrvIFIndicateDisassociation(Adapter, unspec_reason, pEntry->MacAddr); } else if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP) @@ -2537,7 +2537,7 @@ AP_OnAuthOdd( if(!AsocEntry_AddStation(Adapter, arSta, arAlg)) { - AuthStatusCode = StatusCode_assoc_deniedbyap; + AuthStatusCode = StatusCode_assoc_deniedbyap; break; } @@ -2545,7 +2545,7 @@ AP_OnAuthOdd( pMgntInfo->AuthReq_auAlg == SHARED_KEY) { pEntry = AsocEntry_GetEntry(pMgntInfo, arSta); - + pEntry->AuthPassSeq = 2; // We shall keep challenge text in each STA, and randomize them. @@ -2568,7 +2568,7 @@ AP_OnAuthOdd( case 3: { - if( arAlg == SHARED_KEY && + if( arAlg == SHARED_KEY && (pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeAutoSwitch || pMgntInfo->AuthReq_auAlg == SHARED_KEY) ) { @@ -2579,9 +2579,9 @@ AP_OnAuthOdd( if( pEntry->bAssociated == FALSE && pEntry->AuthAlg == SHARED_KEY && pEntry->AuthPassSeq == 2 ) { OCTET_STRING OurCText, PeerCText; - + FillOctetString(OurCText, pMgntInfo->arChalng, 128); - PeerCText = PacketGetElement(authpdu, EID_Ctext, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); + PeerCText = PacketGetElement(authpdu, EID_Ctext, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); // Compare the challenge text. if(EqualOS( OurCText, PeerCText)) @@ -2598,7 +2598,7 @@ AP_OnAuthOdd( } else { - // The authentication/association state of the STA is not as expected. + // The authentication/association state of the STA is not as expected. AuthStatusCode = StatusCode_Unspecified_failure; } } @@ -2622,16 +2622,16 @@ AP_OnAuthOdd( break; } - // Remove association entry of the STA if AuthStatusCode is not successful. + // Remove association entry of the STA if AuthStatusCode is not successful. if(AuthStatusCode != StatusCode_success) { RT_TRACE( COMP_AP, DBG_LOUD, ("AP_OnAuthOdd(): Remove association entry of the STA if AuthStatusCode is not successful. \n") ); AsocEntry_RemoveStation(Adapter, arSta); } - + // Send auth frame. - SendAuthenticatePacket( - Adapter, + SendAuthenticatePacket( + Adapter, arSta, // auStaAddr, arAlg, // AuthAlg, arSeq+1, // AuthSeq, @@ -2649,15 +2649,15 @@ AP_OnAuthOdd( // BOOLEAN AP_DisassociateStation( - IN PADAPTER Adapter, - IN PRT_WLAN_STA pSta, + IN PADAPTER Adapter, + IN PRT_WLAN_STA pSta, IN u1Byte asRsn ) { // Check input parameter. if(pSta == NULL) return FALSE; -// RT_ASSERT((pSta->bUsed && pSta->bAssociated), +// RT_ASSERT((pSta->bUsed && pSta->bAssociated), // ("AP_DisassociateStation(): bUsed: %x, bAssociated: %x !!!\n", pSta->bUsed, pSta->bAssociated)); RT_TRACE(COMP_AP, DBG_LOUD, ("AP_DisassociateStation() pSta->AssociatedMacId %d\n", pSta->AssociatedMacId)); @@ -2673,7 +2673,7 @@ AP_DisassociateStation( RemovePeerTS(Adapter, pSta->MacAddr); // Send disassoc frame to the STA. - SendDisassociation(Adapter, pSta->MacAddr, asRsn); + SendDisassociation(Adapter, pSta->MacAddr, asRsn); //Added to del cam entrys for this station //If pPeerMac is not NULL, then just del this cam entry,by wl,2009-09-27 @@ -2713,7 +2713,7 @@ AP_DisassociateAllStation( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); int i; - PRT_WLAN_STA pSta; + PRT_WLAN_STA pSta; for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { @@ -2747,12 +2747,12 @@ AP_ResetVariables( FunctionIn(COMP_AP); DefAdapter->MgntInfo.bSwitchingSTAStateInProgress = FALSE; - + // Added by Annie, 2006-01-26. MgntCancelAllTimer(Adapter); RemoveAllTS(Adapter); - // We shall randomize it? + // We shall randomize it? for(i = 0; i < 128; i++) { pMgntInfo->arChalng[i] = (u1Byte)i; @@ -2760,11 +2760,11 @@ AP_ResetVariables( // Reset Association Table. AsocEntry_ResetAll(Adapter); - + Authenticator_GlobalReset(Adapter); // added by Annie - + ActUpdate_ProtectionMode(Adapter, FALSE); // 2010.11.26. by tynli. - + if(ACTING_AS_AP(Adapter)) { // AP mode. @@ -2776,20 +2776,20 @@ AP_ResetVariables( MgntUpdateAsocInfo(Adapter, UpdateAsocBeacon, pMgntInfo->beaconframe.Octet, pMgntInfo->beaconframe.Length); // - // step 1. Indicate wildcard disassocation event to + // step 1. Indicate wildcard disassocation event to // disassociate all STA associated before. // /***************************************************************** - 20150416 Sinda. + 20150416 Sinda. We need to delete peer in WDI architecture, but peer had been deleted before. pass NULL to skip this case to avoid delete incorrect peer. *****************************************************************/ - DrvIFIndicateDisassociation(Adapter, unspec_reason, NULL); + DrvIFIndicateDisassociation(Adapter, unspec_reason, NULL); // // step 2. Indicate dummy STA assocation event. // - // 061228, rcnjko: UI need fake AP mode to enter connected + // 061228, rcnjko: UI need fake AP mode to enter connected // state immediate for ICS easy implementation. // MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, DummySta, 6); @@ -2798,29 +2798,29 @@ AP_ResetVariables( } // Change Link status to connected. - MgntIndicateMediaStatus(Adapter, RT_MEDIA_CONNECT, TRUE); + MgntIndicateMediaStatus(Adapter, RT_MEDIA_CONNECT, TRUE); } else { // STA mode. if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED) { // - // step 1. Indicate wildcard disassocation event to + // step 1. Indicate wildcard disassocation event to // disassociate all STA associated before. // /***************************************************************** - 20150416 Sinda. + 20150416 Sinda. We need to delete peer in WDI architecture, but peer had been deleted before. pass NULL to skip this case to avoid delete incorrect peer. *****************************************************************/ - DrvIFIndicateDisassociation(Adapter, unspec_reason, NULL); + DrvIFIndicateDisassociation(Adapter, unspec_reason, NULL); } // Change Link status to disconnected. MgntIndicateMediaStatus(Adapter, RT_MEDIA_DISCONNECT, TRUE); // Reset TStream related, 070614, by rcnjko. - QosResetAllTs(Adapter); + QosResetAllTs(Adapter); } FunctionOut(COMP_AP); } @@ -2847,8 +2847,8 @@ AP_SetupStartApInfo( PlatformCancelTimer(Adapter, &pMgntInfo->globalKeyInfo.KeyMgntTimer ); DFS_TimerContrl(Adapter, DFS_TIMER_CANCEL); - - // Reset scan related state. + + // Reset scan related state. if(MgntScanInProgress(pMgntInfo)) MgntResetScanProcess(Adapter); @@ -2869,10 +2869,10 @@ AP_SetupStartApInfo( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 4\n")); return; } - + MgntRoamComplete(Adapter, MlmeStatus_invalid); } - + // Initialize dirver operating states to AP mode. RT_ASSERT(ACTING_AS_AP(Adapter), ("AP_SetupStartApInfo(): ACTING_AS_AP(Adapter) == FALSE!!!\n")); pMgntInfo->OpMode = RT_OP_MODE_AP; @@ -2887,7 +2887,7 @@ AP_SetupStartApInfo( RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: AP_SetupStartApInfo(), clear NumBssDesc4Query\n")); // BSSID PlatformMoveMemory(pMgntInfo->Bssid, Adapter->CurrentAddress, 6); - + RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "AP_SetupStartApInfo(): BSSID = ", pMgntInfo->Bssid); // Capability. @@ -2905,7 +2905,7 @@ AP_SetupStartApInfo( // DTIM Period. pMgntInfo->dot11DtimPeriod = pMgntInfo->Regdot11DtimPeriod; - + //Set dot11currentchannelnumber-------------- if(pDefMgntInfo->mAssoc && !IsDefaultAdapter(Adapter)) pMgntInfo->dot11CurrentChannelNumber = pDefMgntInfo->dot11CurrentChannelNumber; @@ -2914,8 +2914,8 @@ AP_SetupStartApInfo( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("GetFirstGOPort(Adapter): %p\n", GetFirstGOPort(Adapter))); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Adapter: %p\n", Adapter)); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("pMgntInfo->dot11CurrentChannelNumber: %d\n", pMgntInfo->dot11CurrentChannelNumber)); - -#if (MULTICHANNEL_SUPPORT == 1 && P2P_SUPPORT == 1) + +#if (MULTICHANNEL_SUPPORT == 1 && P2P_SUPPORT == 1) if(Adapter == GetFirstGOPort(Adapter)) { // Win8 will set the GO channel: @@ -2925,26 +2925,26 @@ AP_SetupStartApInfo( PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); PADAPTER pDeviceAdapter = NULL; - if(RT_MEDIA_CONNECT != MgntLinkStatusQuery(pDefaultAdapter) && + if(RT_MEDIA_CONNECT != MgntLinkStatusQuery(pDefaultAdapter) && (NULL != (pDeviceAdapter = GetFirstDevicePort(Adapter)))) - { + { pDefMgntInfo->dot11CurrentChannelNumber = pP2PInfo->OperatingChannel; pMgntInfo->dot11CurrentChannelNumber = pP2PInfo->OperatingChannel; pDeviceAdapter->MgntInfo.dot11CurrentChannelNumber = pP2PInfo->OperatingChannel; } else { - pMgntInfo->dot11CurrentChannelNumber = pMgntInfo->Regdot11ChannelNumber; + pMgntInfo->dot11CurrentChannelNumber = pMgntInfo->Regdot11ChannelNumber; } } else -#endif +#endif { pMgntInfo->dot11CurrentChannelNumber = pMgntInfo->Regdot11ChannelNumber; } } - + //[Win7] Default port and Extension port can use different wireless mode, but they // should share the same bandwidth and QoS parameters like EDCA . 2009.07.09, by Bohn @@ -2958,7 +2958,7 @@ AP_SetupStartApInfo( else if(IS_WIRELESS_MODE_24G(Adapter) && IS_WIRELESS_MODE_5G(pDefaultAdapter)) bSetDefPortWirelessMode = TRUE; - //If they use different band , after ScanComplete of Default port, band will mismatch of Ext AP port. + //If they use different band , after ScanComplete of Default port, band will mismatch of Ext AP port. if(bSetDefPortWirelessMode) Adapter->HalFunc.SetWirelessModeHandler(pDefaultAdapter, pMgntInfo->dot11CurrentWirelessMode); } @@ -2978,32 +2978,32 @@ AP_SetupStartApInfo( // Protection mode. ActUpdate_ProtectionMode(Adapter, FALSE); - + // Reset roaming status, 2004.10.12, by rcnjko. pMgntInfo->AsocRetryCount = 0; // Set Key management timer. Annie, 2005-07-06. - if( (pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK || + if( (pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK || pMgntInfo->SecurityInfo.SecLvl == RT_SEC_LVL_WPA2 ) && - MgntActQuery_ApType(Adapter) != RT_AP_TYPE_VWIFI_AP + MgntActQuery_ApType(Adapter) != RT_AP_TYPE_VWIFI_AP && MgntActQuery_ApType(Adapter) != RT_AP_TYPE_LINUX) // key mgnt is done by OS in Win7 AP mode { PlatformSetTimer( Adapter, &pMgntInfo->globalKeyInfo.KeyMgntTimer, KEY_MGNT_INTERVAL ); } - + DFS_TimerContrl(Adapter, DFS_TIMER_SET); // Reset CCX related setting. CCX_OnBssReset(Adapter); - + // Set default EDCA parameter for AP mode. if(pMgntInfo->pStaQos->QosCapability != QOS_DISABLE) { // TODO: CurrentQosMode can be set to others. Now only support WMM. pMgntInfo->pStaQos->CurrentQosMode = QOS_WMM; pMgntInfo->pStaQos->QBssWirelessMode = pMgntInfo->dot11CurrentWirelessMode; - - //[Win7 For Two Port Shared Data this function will retrurn the Right Port Ones]2009.07.22, by Bohn + + //[Win7 For Two Port Shared Data this function will retrurn the Right Port Ones]2009.07.22, by Bohn SET_WMM_PARAM_ELE_AC_PARAMS( (pu1Byte)GetTwoPortSharedResource(Adapter,TWO_PORT_SHARED_OBJECT__SET_OF_pStaQos_WMMParamEle,pMgntInfo->pStaQos->WMMParamEle,NULL) , Adapter->AP_EDCA_PARAM); @@ -3015,7 +3015,7 @@ AP_SetupStartApInfo( else { pMgntInfo->pStaQos->CurrentQosMode = QOS_DISABLE; - pMgntInfo->pStaQos->QBssWirelessMode = WIRELESS_MODE_UNKNOWN; + pMgntInfo->pStaQos->QBssWirelessMode = WIRELESS_MODE_UNKNOWN; } // Using HT Default setting when startup AP mode. @@ -3035,15 +3035,15 @@ AP_SetupStartApInfo( pMgntInfo->IOTPeer = pDefMgntInfo->IOTPeer; else pMgntInfo->IOTPeer = HT_IOT_PEER_SELF_SOFTAP; - } + } // Reset TStream related, 070614, by rcnjko. - QosResetAllTs(Adapter); + QosResetAllTs(Adapter); FunctionOut(COMP_AP); } -// +// // Configure HW to start AP mode. // VOID @@ -3078,11 +3078,11 @@ AP_StartApRequest( pMgntInfo->BeaconState = BEACON_STARTING; MultichannelEnableGoQueue(Adapter); - + //-------------------------------------------------------------------------------- // Infrastructure AP mode HW Configuration. //-------------------------------------------------------------------------------- - + pHalData->bNeedIQK = TRUE; pHalData->DM_OutSrc.RFCalibrateInfo.bNeedIQK = TRUE; @@ -3092,8 +3092,8 @@ AP_StartApRequest( // // Update Capability field related setting. // - // To solve Win98 IRQL==PASIVE_LEVEL in timer callback function, - // we call ActUpdate_mCapInfo() here to make sure related IOs are perfomed in correct IRQL, + // To solve Win98 IRQL==PASIVE_LEVEL in timer callback function, + // we call ActUpdate_mCapInfo() here to make sure related IOs are perfomed in correct IRQL, // that is, PASSIVE_LEVEL=>Syn IO for this case. 2005.03.15, by rcnjko. // ActUpdate_mCapInfo( Adapter, pMgntInfo->mCap ); @@ -3102,16 +3102,16 @@ AP_StartApRequest( Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BSSID, pMgntInfo->Bssid ); // Set Beacon related registers - // We shall update AtimWindow specified in Beacon of the IBSS if "every thing is ready." + // We shall update AtimWindow specified in Beacon of the IBSS if "every thing is ready." pMgntInfo->dot11AtimWindow = 2; // ATIM Window (in unit of TU). Adapter->HalFunc.SetBeaconRelatedRegistersHandler(Adapter, (PVOID)(&pMgntInfo->OpMode), \ pMgntInfo->dot11BeaconPeriod, pMgntInfo->dot11AtimWindow); - // Set operation mode to IBSS. + // Set operation mode to IBSS. Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_RETRY_LIMIT, (pu1Byte)(&RetryLimit)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_AP_IBSS_INTERRUPT, (pu1Byte)&intMode); - - PlatformAtomicExchange((pu4Byte)(&GET_HAL_DATA(Adapter)->RegBcnCtrlVal), GET_HAL_DATA(Adapter)->RegBcnCtrlVal|BIT2); + + PlatformAtomicExchange((pu4Byte)(&GET_HAL_DATA(Adapter)->RegBcnCtrlVal), GET_HAL_DATA(Adapter)->RegBcnCtrlVal|BIT2); PlatformEFIOWrite1Byte(Adapter, REG_BCN_CTRL, (u1Byte)(GET_HAL_DATA(Adapter)->RegBcnCtrlVal)); // Set EDCA Parameter Set for QAP @@ -3134,7 +3134,7 @@ AP_StartApRequest( HTSetCCKSupport(Adapter, TRUE, NULL); - // Adjust rate related setting according to current wireless mode and current bandwidth. + // Adjust rate related setting according to current wireless mode and current bandwidth. SelectRateSet( Adapter, pMgntInfo->Regdot11OperationalRateSet ); // To ensure AP is started at default channel to prevent from that STA cannot scan AP. (e.g., single-band STA) @@ -3142,11 +3142,11 @@ AP_StartApRequest( if((!(P2P_ENABLED(GET_P2P_INFO(Adapter)) && (GET_P2P_INFO(Adapter)->Role == P2P_GO))) && (pDefaultMgntInfo->mAssoc == FALSE) ) #else - if(pDefaultMgntInfo->mAssoc == FALSE) + if(pDefaultMgntInfo->mAssoc == FALSE) #endif pMgntInfo->dot11CurrentChannelNumber = pDefaultMgntInfo->Regdot11ChannelNumber;; - - //Fix Vwifi channel show error + + //Fix Vwifi channel show error N62CAPIndicateFrequencyAdopted(Adapter); // Send beacon shall be delay until finish bw & channel offset setttings. @@ -3159,11 +3159,11 @@ AP_StartApRequest( { // note that only win7 enters here since only win7 has vwifi ap // // In this case, we are called from PnpSetPower(). - // NDISTest preview 3 SoftAP_Power_ext requries us to stop beaconing + // NDISTest preview 3 SoftAP_Power_ext requries us to stop beaconing // after resuming from hibernation. So we do nothing here. // 2008.12.05, haich // - + // // We have to set MSR to no link so that HW will not send beacon automatically. // @@ -3190,11 +3190,11 @@ AP_StartApRequest( PlatformSetTimer(Adapter, &pMgntInfo->SwBeaconTimer, 0); } else - { // H/W Beacon. + { // H/W Beacon. RT_TRACE(COMP_AP, DBG_LOUD, ("AP_StartApRequest(): Send H/W Beacon....\n")); - + ResumeTxBeacon_92C(Adapter); - + ConstructBeaconFrame(Adapter); SendBeaconFrame(Adapter, BEACON_QUEUE); Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_DIS_SW_BCN, (pu1Byte)(&Adapter)); @@ -3233,7 +3233,7 @@ AP_StartApRequest( P2P_StartApRequest(Adapter); - // 2014/02/11 MH For ICS/DHCP delay, if ics and dhcp are not ready. And we start to + // 2014/02/11 MH For ICS/DHCP delay, if ics and dhcp are not ready. And we start to // send beacon. Then the client ca not acces ip directly, we need to delay until ICS is ready // wait OID to trigger. if(!pDefaultAdapter->bInHctTest && pMgntInfo->Regbcndelay) @@ -3248,7 +3248,7 @@ AP_StartApRequest( } -// +// // Start AP mode. // 2005.05.27, by rcnjko. // @@ -3256,7 +3256,7 @@ VOID AP_Restart( IN PADAPTER Adapter ) -{ +{ FunctionIn(COMP_AP); #if USE_WORKITEM { @@ -3287,8 +3287,8 @@ AP_Restart( FunctionOut(COMP_AP); } -// -// Reset SW and start AP mode. +// +// Reset SW and start AP mode. // 2005.05.27, by rcnjko. // VOID @@ -3305,10 +3305,10 @@ AP_Reset( FunctionIn(COMP_AP); Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_USE_RA_MASK, &bUseRAMask); - + // Disable Beacon early interrupt mask. Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_AP_IBSS_INTERRUPT, (pu1Byte)&intMode); - + // Return all packets queued (TxQ, PsQ, etc.). PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); AP_PS_ReturnAllQueuedPackets(Adapter,FALSE); @@ -3322,16 +3322,16 @@ AP_Reset( // Start AP mode if requested. if(ACTING_AS_AP(Adapter)) - { + { if(GET_TDLS_ENABLED(pDefMgntInfo)) { if(pDefMgntInfo->mAssoc) TDLS_Stop(GetDefaultAdapter(Adapter)); } - //sherry moved set check bssid here + //sherry moved set check bssid here //for wlk1.6 VWifiInfraSoftAP_ext, 20110926 - if(bUseRAMask && + if(bUseRAMask && (MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_EXT_AP)) { @@ -3345,7 +3345,7 @@ AP_Reset( Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_CHECK_BSSID, (pu1Byte)(&bFilterOutNonAssociatedBSSID)); } - AP_Restart(Adapter); + AP_Restart(Adapter); } else { // STA mode setting. Added by Annie, 2005-11-23. @@ -3353,7 +3353,7 @@ AP_Reset( u1Byte RetryLimit = HAL_RETRY_LIMIT_INFRA; pMgntInfo->OpMode = RT_OP_MODE_NO_LINK; - + // Under Win7, when AP mode is stopped, // default port may still connect to AP. // Hence, we have to set HwReg back to Infrastructure mode. @@ -3394,10 +3394,10 @@ AP_Reset( } // - // In AP_StartApRequest(), this flag is set to true, therefore if we are going to stop AP mode, + // In AP_StartApRequest(), this flag is set to true, therefore if we are going to stop AP mode, // we should recover this flag. - // When Win7 starts SoftAP, it does reset for 2 times, at the second time, if this flag is still true, - // the driver would call MgntDisconnectAP and send disassociation to itself. + // When Win7 starts SoftAP, it does reset for 2 times, at the second time, if this flag is still true, + // the driver would call MgntDisconnectAP and send disassociation to itself. // 2010.11.15, haich. // pMgntInfo->mAssoc = FALSE; @@ -3427,15 +3427,15 @@ Ap_SendDisassocWithOldChnlWorkitemCallback( PMGNT_INFO pExtMgntInfo = &pAdapter->MgntInfo; PRT_CHANNEL_INFO pExtChnlInfo = GET_CHNL_INFO(pExtMgntInfo); WIRELESS_MODE wirelessModebackup = pDefMgntInfo->dot11CurrentWirelessMode; - + RT_TRACE(COMP_AP, DBG_LOUD, ("====> Ap_SendDisassocWithOldChnlWorkitemCallback\n")); pExtAdapter->bAPChannelInprogressForNewconnected = TRUE; -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) P2PIndicateChangingApChnl(GET_P2P_INFO(pExtAdapter), pExtMgntInfo->dot11CurrentChannelNumber, pDefMgntInfo->dot11CurrentChannelNumber); #endif - + // 1. ========== AP Swith to Original Channel Send DisAssoc ========== pExtAdapter->HalFunc.SetWirelessModeHandler(pExtAdapter,pExtMgntInfo->dot11CurrentWirelessMode); @@ -3443,7 +3443,7 @@ Ap_SendDisassocWithOldChnlWorkitemCallback( pExtChnlInfo->PrimaryChannelNumber, pExtChnlInfo->CurrentChannelBandWidth, pExtChnlInfo->Ext20MHzChnlOffsetOf40MHz - ); + ); //wait for switch channel successful before sending disassociation by sherry 20130117 while(RT_IsSwChnlAndBwInProgress(pAdapter)) @@ -3482,13 +3482,13 @@ Ap_SendDisassocWithOldChnlWorkitemCallback( //4 [win7 Two Port BW40Mhz issue] We May Recard the value for Extension Port, by Bohn, 2009.06.05 //CHNL_SetChnlInfoFromDestPort(pExtAdapter, pDefAdapter); MgntStopBeacon(pExtAdapter); -// 3. ============= Restart AP ====================== +// 3. ============= Restart AP ====================== if(1)//pDefAdapter->bInHctTest) // In HctTest, do not delay beacon for 20seconds. PlatformSetTimer(pAdapter, &pExtMgntInfo->DelaySendBeaconTimer , 1000); - else + else PlatformSetTimer(pAdapter, &pExtMgntInfo->DelaySendBeaconTimer , pDefMgntInfo->ResumeBeaconTime); - N62CAPIndicateFrequencyAdopted(pExtAdapter); + N62CAPIndicateFrequencyAdopted(pExtAdapter); pExtAdapter->bAPChannelInprogressForNewconnected = FALSE; @@ -3497,8 +3497,8 @@ Ap_SendDisassocWithOldChnlWorkitemCallback( // Called by Two port System -VOID -AP_DisconnectAfterSTANewConnected( +VOID +AP_DisconnectAfterSTANewConnected( PADAPTER Adapter ) { @@ -3517,19 +3517,19 @@ AP_DisconnectAfterSTANewConnected( PMGNT_INFO pExtMgntInfo = &ExtAdapter->MgntInfo; PRT_CHANNEL_INFO pDefChnlInfo = GET_CHNL_INFO(pDefMgntInfo); PRT_CHANNEL_INFO pExtChnlInfo = GET_CHNL_INFO(pExtMgntInfo); - + RT_TRACE(COMP_AP, DBG_LOUD, ("Def Channel %d Ext Channel %d \n", pDefMgntInfo->dot11CurrentChannelNumber, pExtMgntInfo->dot11CurrentChannelNumber)); - RT_TRACE(COMP_AP, DBG_LOUD, ("Ext BW=%d, offset=%d\n", + RT_TRACE(COMP_AP, DBG_LOUD, ("Ext BW=%d, offset=%d\n", pExtChnlInfo->CurrentChannelBandWidth, pExtChnlInfo->Ext20MHzChnlOffsetOf40MHz)); - RT_TRACE(COMP_AP, DBG_LOUD, ("Def BW=%d, offset=%d\n", + RT_TRACE(COMP_AP, DBG_LOUD, ("Def BW=%d, offset=%d\n", pDefChnlInfo->CurrentChannelBandWidth, pDefChnlInfo->Ext20MHzChnlOffsetOf40MHz)); - + if( AP_DetermineAlive(ExtAdapter) && ( (pExtMgntInfo->dot11CurrentChannelNumber !=pDefMgntInfo->dot11CurrentChannelNumber) || (pExtChnlInfo->CurrentChannelCenterFrequency != pDefChnlInfo->CurrentChannelCenterFrequency)) ) - { + { PlatformScheduleWorkItem( &(pExtMgntInfo->ApSendDisassocWithOldChnlWorkitem)); } else @@ -3537,17 +3537,17 @@ AP_DisconnectAfterSTANewConnected( RT_TRACE( COMP_AP, DBG_LOUD, ("Channel are the Same, Wouldn't Change\n")); } - // Under win7, we may have an adapter running in AP/IBSS mode, + // Under win7, we may have an adapter running in AP/IBSS mode, // this action would stop updating beacon (UpdateBeaconFrame()). // If one of the adapters needs to send beacon, we skip this action. // 2008.07.10, haich. - // Update Interrup Mask for STA in infrastructure mode. - // Currently, we only remove the masks set in IBSS mode. 2005.12.14, by rcnjko. + // Update Interrup Mask for STA in infrastructure mode. + // Currently, we only remove the masks set in IBSS mode. 2005.12.14, by rcnjko. if(!(pDefMgntInfo->OpMode == RT_OP_MODE_AP || pDefMgntInfo->OpMode == RT_OP_MODE_IBSS || pExtMgntInfo->OpMode == RT_OP_MODE_AP ||pExtMgntInfo->OpMode == RT_OP_MODE_IBSS)) { HAL_AP_IBSS_INT_MODE intMode = HAL_AP_IBSS_INT_DISABLE; - + Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_AP_IBSS_INTERRUPT, (pu1Byte)&intMode); } @@ -3575,7 +3575,7 @@ AP_StatusWatchdog( pDefMgntInfo->bSwitchingSTAStateInProgress = FALSE; RT_TRACE(COMP_AP,DBG_LOUD, ("Handle bDelaySwitchToApMode in AP_StatusWatchdog\n")); EXT_AP_START_AP_MODE(Adapter); - } + } else if(pDefMgntInfo->bSwitchingSTAStateInProgress) { pDefMgntInfo->bSwitchingSTAStateInProgress = FALSE; @@ -3637,7 +3637,7 @@ AP_CheckRSNIE( pEntry->perSTAKeyInfo.NumOfPTKReplayCounter = 0; pEntry->perSTAKeyInfo.NumOfGTKReplayCounter = 0; } - + RSNIE = PacketGetElement(asocpdu, EID_WPA2, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(RSNIE.Length != 0){ pEntry->perSTAKeyInfo.SecLvl = RT_SEC_LVL_WPA2; @@ -3649,18 +3649,18 @@ AP_CheckRSNIE( else if (pEntry->AuthAlg == OPEN_SYSTEM && bWPSEnable) { pEntry->Capability = GET_ASOC_REQ_CAPABILITY_INFO(asocpdu.Octet); - + if(pEntry->Capability & cPrivacy) { u1Byte count; - + pEntry->perSTAKeyInfo.GroupCipherSuite = RT_ENC_ALG_WEP; for(count = 0; count < MAX_CIPHER_SUITE_NUM; count++){ pEntry->perSTAKeyInfo.PairwiseCipherSuite[count] = RT_ENC_ALG_WEP; - } + } pEntry->AuthMode = RT_802_11AuthModeOpen; } - + Match = TRUE; return Match; } @@ -3668,7 +3668,7 @@ AP_CheckRSNIE( if(RSNIE.Length != 0){ u2Byte count; - + //2004/09/15, kcwu, parse WPA2 packet if(pEntry->perSTAKeyInfo.SecLvl == RT_SEC_LVL_WPA) { @@ -3707,14 +3707,14 @@ AP_CheckRSNIE( GET_OUI_WITH_TYPE(GET_RSN_IE_GROUP_CIPHER_SUITE(RSNIE.Octet), tmpOUI, tmpOUIType); Sec_MapOUITypeToCipherSuite(tmpOUI, &tmpOUIType, RT_SEC_LVL_WPA2, &(pEntry->perSTAKeyInfo.GroupCipherSuite)); - // Pairwise Cipher + // Pairwise Cipher pEntry->perSTAKeyInfo.PairwiseCipherCount = GET_RSN_IE_PAIRWISE_CIPHER_SUITE_CNT(RSNIE.Octet); // Bruce_Test DbgPrint("Client PairwiseCipherCount = %d\n", pEntry->perSTAKeyInfo.PairwiseCipherCount); for(count = 0; count < pEntry->perSTAKeyInfo.PairwiseCipherCount && count < MAX_CIPHER_SUITE_NUM; count ++) { - GET_OUI_WITH_TYPE(GET_RSN_IE_PAIRWISE_CIPHER_SUITE_LIST(RSNIE.Octet, count), tmpOUI, tmpOUIType); + GET_OUI_WITH_TYPE(GET_RSN_IE_PAIRWISE_CIPHER_SUITE_LIST(RSNIE.Octet, count), tmpOUI, tmpOUIType); Sec_MapOUITypeToCipherSuite(tmpOUI, &tmpOUIType, RT_SEC_LVL_WPA2, &(pEntry->perSTAKeyInfo.PairwiseCipherSuite[count])); // Bruce_Test DbgPrint("Pairwise[%d] OUI = %02X-%02X-%02X-%02X, Pairwise = 0x%08X\n", count, tmpOUI[0], tmpOUI[1], tmpOUI[2], tmpOUIType, pEntry->perSTAKeyInfo.PairwiseCipherSuite[count]); @@ -3736,12 +3736,12 @@ AP_CheckRSNIE( else { RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("RSNIE parsing error!") ); - } + } } //2 Step 2. Compare with Authenticator's RSNIE - + // Code reference: SelectNetworkBySSID() { int i; @@ -3763,7 +3763,7 @@ AP_CheckRSNIE( RT_TRACE_F(COMP_AP, DBG_LOUD, ("Cannot find matched pairwise cipher suite with ours (0x%08X)\n", pMgntInfo->SecurityInfo.PairwiseEncAlgorithm)); Match = FALSE; } - + } } @@ -3774,7 +3774,7 @@ AP_CheckRSNIE( } -void +void AP_OnEAPOL( IN PADAPTER Adapter, IN PRT_RFD pRfd @@ -3863,16 +3863,16 @@ AP_HTResetSTAEntry( ) { pSTAEntry->HTInfo.bEnableHT = FALSE; - + // LDPC support CLEAR_FLAGS(pSTAEntry->HTInfo.LDPC); - + // STBC support CLEAR_FLAGS(pSTAEntry->HTInfo.STBC); - + pSTAEntry->HTInfo.AMPDU_Factor = 0; pSTAEntry->HTInfo.AMSDU_MaxSize = 0; - pSTAEntry->HTInfo.MPDU_Density = 0; + pSTAEntry->HTInfo.MPDU_Density = 0; pSTAEntry->HTInfo.bSupportCck = FALSE; pSTAEntry->HTInfo.HTHighestOperaRate = 0; } @@ -3892,13 +3892,13 @@ AP_HTCheckHTCap( OCTET_STRING osHTCap = PacketGetElement(asocpdu, EID_HTCapability, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); //1 Reject STA to connect in N mode - // If we do not support CCK rate in N mode, reject the B mode + // If we do not support CCK rate in N mode, reject the B mode if(IS_WIRELESS_MODE_HT_24G(Adapter) && pHTInfo->bCurSuppCCK==FALSE) { if(pEntry->WirelessMode == WIRELESS_MODE_B) return FALSE; } - + //1 Set Wireless Mode if(osHTCap.Length != 0) { @@ -3917,9 +3917,9 @@ AP_HTCheckHTCap( } HTCheckHTCap(Adapter, pEntry, pPeerHTCap); - + return TRUE; - + } @@ -3950,12 +3950,12 @@ DelaySendBeaconTimerCallback( if(AP_DetermineAlive(pExtAdapter) == FALSE) { RT_TRACE(COMP_AP, DBG_LOUD, ("DelaySendBeaconTimerCallback:() AP not started\n")); - return; + return; } //[Win7] For Default-G _Extension-N20 case, we must reset SW and HW part. 2009.07.09, by Bohn AP_SetupStartApInfo(pExtAdapter); - + PlatformScheduleWorkItem( &(pMgntInfo->ApStartRequestWorkItem) ); } @@ -3963,9 +3963,9 @@ DelaySendBeaconTimerCallback( /** Get AP state */ AP_STATE GetAPState( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) -{ +{ return (AP_STATE)PlatformAtomicOr((pu1Byte)(&pAdapter->MgntInfo.APState),0); } @@ -3990,7 +3990,7 @@ AP_DetermineApType( BOOLEAN bFakeApFlagSet = FALSE; PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; RT_AP_TYPE ApType = RT_AP_TYPE_NONE; - + if(IsDefaultAdapter(pAdapter)) bFakeApFlagSet = TRUE; @@ -4025,10 +4025,10 @@ AP_DetermineApType( { ApType = RT_AP_TYPE_NORMAL; } - RT_TRACE(COMP_AP, DBG_LOUD, + RT_TRACE(COMP_AP, DBG_LOUD, ("AP_DetermineApType(): pMgntInfo->NdisVersion: %u, ApType is determined to be: %u\n", pMgntInfo->NdisVersion, ApType)); return ApType; - + } @@ -4040,7 +4040,7 @@ AP_DetermineAlive( BOOLEAN bFakeApFlagSet = FALSE; PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; BOOLEAN bAlive = FALSE; - + if(IsDefaultAdapter(pAdapter)) bFakeApFlagSet = TRUE; @@ -4059,14 +4059,14 @@ AP_DetermineAlive( bAlive = TRUE; else bAlive = FALSE; - } + } else { if(GetAPState(pAdapter)==AP_STATE_STARTED) bAlive = TRUE; else bAlive = FALSE; - } + } } else if(pMgntInfo->NdisVersion == RT_NDIS_VERSION_6_1) {// vista, only fake AP mode is valid @@ -4096,7 +4096,7 @@ AP_DetermineAlive( { bAlive = FALSE; } - RT_TRACE(COMP_AP, DBG_TRACE, + RT_TRACE(COMP_AP, DBG_TRACE, ("AP_DetermineAlive(): pMgntInfo->NdisVersion: %u, Ap alive is determined to be: %u\n", pMgntInfo->NdisVersion, bAlive)); return bAlive; } @@ -4292,7 +4292,7 @@ Ap_PsTxFeedbackCallback( pEntry = (PRT_WLAN_STA)pTxFeedbackInfo->pContext; if(pEntry == NULL) return; - + RT_TRACE(COMP_AP, DBG_LOUD, ("Ap_PsTxFeedbackCallback()=====>\n")); // This tx packet feedback is the wmm ps packet. @@ -4314,10 +4314,10 @@ Ap_PsTxFeedbackCallback( if(WmmSp && pEntry->WmmEosp == RT_STA_EOSP_STATE_OPENED) { PRT_TCB pTcb; - OCTET_STRING osMpdu; + OCTET_STRING osMpdu; if(!RTIsListEmpty(&pEntry->WmmPsQueue)) - { + { pTcb = (PRT_TCB)RTRemoveHeadList(&pEntry->WmmPsQueue); FillOctetString(osMpdu, GET_FRAME_OF_FIRST_FRAG(pAdapter, pTcb), (u2Byte)pTcb->BufferList[0].Length); @@ -4331,10 +4331,10 @@ Ap_PsTxFeedbackCallback( if(TxFeedbackInstallTxFeedbackInfoForTcb(pAdapter, pTcb)) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - (pEntry->WmmEosp == RT_STA_EOSP_STATE_OPENED) ? RT_TX_FEEDBACK_ID_AP_WMM_PS_PKT : RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, - pTxFeedbackInfo->pAdapter, - Ap_PsTxFeedbackCallback, + pTcb, + (pEntry->WmmEosp == RT_STA_EOSP_STATE_OPENED) ? RT_TX_FEEDBACK_ID_AP_WMM_PS_PKT : RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, + pTxFeedbackInfo->pAdapter, + Ap_PsTxFeedbackCallback, (PVOID)pEntry ); } @@ -4358,7 +4358,7 @@ Ap_PsTxFeedbackCallback( { PRT_TX_LOCAL_BUFFER pBuf; u1Byte AC = 0; - + if(GET_VO_UAPSD(pEntry->WmmStaQosInfo)) AC = 7; else if(GET_VI_UAPSD(pEntry->WmmStaQosInfo)) @@ -4367,11 +4367,11 @@ Ap_PsTxFeedbackCallback( AC = 3; else if(GET_BK_UAPSD(pEntry->WmmStaQosInfo)) AC = 2; - + if(MgntGetBuffer(pTxFeedbackInfo->pAdapter, &pTcb, &pBuf)) { ConstructNullFunctionData( - pTxFeedbackInfo->pAdapter, + pTxFeedbackInfo->pAdapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pEntry->MacAddr, @@ -4384,10 +4384,10 @@ Ap_PsTxFeedbackCallback( if(TxFeedbackInstallTxFeedbackInfoForTcb(pAdapter, pTcb)) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, - pTxFeedbackInfo->pAdapter, - Ap_PsTxFeedbackCallback, + pTcb, + RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, + pTxFeedbackInfo->pAdapter, + Ap_PsTxFeedbackCallback, (PVOID)pEntry ); @@ -4407,11 +4407,11 @@ Ap_PsTxFeedbackCallback( } -VOID +VOID AP_AllPowerSaveDisable( IN PADAPTER pAdapter ) -{ +{ PADAPTER Adapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); @@ -4433,12 +4433,12 @@ AP_AllPowerSaveReturn( PADAPTER Adapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - + IPSReturn(Adapter, IPS_DISABLE_EXT_OPMODE); // Return LPS by UpdateLPSStatus(). by tynli. 2011.01.04. Adapter->HalFunc.UpdateLPSStatusHandler( - Adapter, - pPSC->RegLeisurePsMode, + Adapter, + pPSC->RegLeisurePsMode, pPSC->RegPowerSaveMode); pPSC->bGpioRfSw = REGISTRY(Adapter, bRegGpioRfSw); @@ -4489,10 +4489,10 @@ AP_PS_SendAllMcastPkts( // RT_TRACE_F(COMP_AP, DBG_LOUD, ("Send all Mcst/Bcst pkts!\n")); RTInitializeListHead(&tmpList); - + PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); // - // We remove all TCBs from the PsQueue and insert into the tmp list to prevent that the TCBs may be recurcively + // We remove all TCBs from the PsQueue and insert into the tmp list to prevent that the TCBs may be recurcively // inserted back into the PsQueue when the client enters and leaves PS mode frequently. // By Bruce, 2010-06-02. // @@ -4517,7 +4517,7 @@ AP_PS_SendAllMcastPkts( else { SET_80211_HDR_MORE_DATA(osMpdu.Octet, 0); - } + } rtStatus = TransmitTCB(pAdapter, pTcb); if(RT_STATUS_SUCCESS != rtStatus && RT_STATUS_PKT_DROP != rtStatus) @@ -4543,7 +4543,7 @@ AP_VHTResetSTAEntry ( // LDPC support CLEAR_FLAGS(pSTAEntry->VHTInfo.LDPC); - + // STBC support CLEAR_FLAGS(pSTAEntry->VHTInfo.STBC); } @@ -4566,7 +4566,7 @@ AP_VHTCheckVHTCap( pEntry->VHTInfo.bEnableVHT = TRUE; pVHTCap = (pu1Byte)osVHTCap.Octet; - + if(pEntry->WirelessMode == WIRELESS_MODE_N_24G) pEntry->WirelessMode = WIRELESS_MODE_AC_24G; else @@ -4597,17 +4597,17 @@ AP_GetBandWidth( PRT_CHANNEL_INFO pDefChnlInfo = GET_CHNL_INFO(pDefaultMgntInfo); - + EXTCHNL_OFFSET ExtChnlOffset= EXTCHNL_OFFSET_NO_EXT; CHANNEL_WIDTH ChnlWidth; ChnlWidth = (CHANNEL_WIDTH)AP_CheckBwWidth(pDefaultAdapter); - RT_TRACE(COMP_AP, DBG_LOUD, ("AP_GetBandWidth(): set to %d mode Ch=%d\n", ChnlWidth, pMgntInfo->dot11CurrentChannelNumber)); + RT_TRACE(COMP_AP, DBG_LOUD, ("AP_GetBandWidth(): set to %d mode Ch=%d\n", ChnlWidth, pMgntInfo->dot11CurrentChannelNumber)); - //[Win 7] Two Port Issue + //[Win 7] Two Port Issue // Extension Port Must Set Offset Accroding to Default Port's if he connected - // by Bohn, 2009.06.05 + // by Bohn, 2009.06.05 if(!ACTING_AS_AP(pDefaultAdapter) && pDefaultMgntInfo->bMediaConnect) { RT_TRACE(COMP_AP, DBG_LOUD, ("Def Connected.\n")); @@ -4630,14 +4630,14 @@ AP_GetBandWidth( { if(pMgntInfo->dot11CurrentChannelNumber == 1 || pMgntInfo->dot11CurrentChannelNumber == 5) ExtChnlOffset = EXTCHNL_OFFSET_UPPER; - else + else ExtChnlOffset = EXTCHNL_OFFSET_LOWER; } - else + else ExtChnlOffset =(pMgntInfo->dot11CurrentChannelNumber<=7)? EXTCHNL_OFFSET_UPPER:EXTCHNL_OFFSET_LOWER; - } + } } - RT_TRACE(COMP_AP , DBG_LOUD, ("ExtChnlOffset=%d\n", ExtChnlOffset)); + RT_TRACE(COMP_AP , DBG_LOUD, ("ExtChnlOffset=%d\n", ExtChnlOffset)); *pChnlBW = ChnlWidth; @@ -4653,13 +4653,13 @@ AP_SetBandWidth( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PMGNT_INFO pDefaultMgntInfo = GetDefaultMgntInfo(Adapter); - + EXTCHNL_OFFSET ExtChnlOffset= EXTCHNL_OFFSET_NO_EXT; CHANNEL_WIDTH ChnlWidth; AP_GetBandWidth(Adapter, &ChnlWidth, &ExtChnlOffset); RT_TRACE(COMP_AP, DBG_LOUD,("AP_SetBandWidth: ChnlWidth %d \n", ChnlWidth)); - + if(Adapter->bInHctTest ) { if(!((pDefaultMgntInfo->mAssoc || pDefaultMgntInfo->mIbss) && (!ACTING_AS_AP(pDefaultAdapter)))) @@ -4674,7 +4674,7 @@ AP_SetBandWidth( } else { - CHNL_SetBwChnl(Adapter, pMgntInfo->dot11CurrentChannelNumber, ChnlWidth, ExtChnlOffset); + CHNL_SetBwChnl(Adapter, pMgntInfo->dot11CurrentChannelNumber, ChnlWidth, ExtChnlOffset); } } @@ -4683,9 +4683,9 @@ u1Byte AP_CheckBwWidth ( PADAPTER Adapter ) -{ +{ u1Byte ret = (u1Byte)CHANNEL_WIDTH_80; - + // XP, Win7 Follow default port first. (Two port) // XP, Vista bCurBW40MHz <- pHTInfo->bRegBW40MHz (One port) GetTwoPortSharedResource(Adapter,TWO_PORT_SHARED_OBJECT__BW,NULL,(pu1Byte)(&ret)); @@ -4695,7 +4695,7 @@ AP_CheckBwWidth ( if (Adapter->MgntInfo.bRegVht24g == 1) ret = CHANNEL_WIDTH_40; - + RT_TRACE(COMP_AP, DBG_TRACE, ("AP_CheckBwWidth(): set to %s mode\n", (ret==CHANNEL_WIDTH_80)?"80MHz":"20_40MHz")); return ret; @@ -4703,7 +4703,7 @@ AP_CheckBwWidth ( // // Description: Handle incoming Association Request. -// Output: Return TRUE if we will response the incoming auth frame, FALSE o.w.. +// Output: Return TRUE if we will response the incoming auth frame, FALSE o.w.. // // 2005.06.01, by rcnjko. // @@ -4724,7 +4724,7 @@ AP_OnAsocReq( BOOLEAN bQosSTA = FALSE, bIndicate = TRUE; BOOLEAN bSendRsp = TRUE; u8Byte curTime = PlatformGetCurrentTime(); - + FunctionIn(COMP_MLME); // Check Bssid. @@ -4764,7 +4764,7 @@ AP_OnAsocReq( } // Check RSN-IE if necessary. - if( pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK || + if( pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK || pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPA2PSK ) { if( !AP_CheckRSNIE(Adapter, pEntry, asocpdu) ) @@ -4785,7 +4785,7 @@ AP_OnAsocReq( if(pEntry->bAssociated) { // - // If the STA failed to receive the AssocRsp previously sent, + // If the STA failed to receive the AssocRsp previously sent, // it may keep retry but we have already indicate asoc complete to OS and // 4-way is started. In this case, we indicate disassociation and process the AsocReq // to prevent association failure. 2011.05.31, haich. @@ -4847,7 +4847,7 @@ AP_OnAsocReq( // if(!MgntIsRateSupport(pEntry->bdSupportRateEXBuf[i], pMgntInfo->dot11OperationalRateSet)) continue; - + if( (pEntry->bdSupportRateEXBuf[i] & 0x7f) > pEntry->HighestOperaRate) pEntry->HighestOperaRate = pEntry->bdSupportRateEXBuf[i] & 0x7f; } @@ -4876,7 +4876,7 @@ AP_OnAsocReq( AsocStatusCode = StatusCode_success; // AP QOS mode select - if((pMgntInfo->pStaQos->CurrentQosMode & QOS_WMM) + if((pMgntInfo->pStaQos->CurrentQosMode & QOS_WMM) ||(pMgntInfo->pStaQos->CurrentQosMode & QOS_WMMSA)) { osQosInfo = PacketGetElement(asocpdu, EID_Vendor, OUI_SUB_WMM, OUI_SUBTYPE_WMM_INFO); @@ -4921,12 +4921,12 @@ AP_OnAsocReq( } - // Enable protection mode and Disable short slot time if an [B-mode STA joined] or[ G-mode Connect to Soft N AP] + // Enable protection mode and Disable short slot time if an [B-mode STA joined] or[ G-mode Connect to Soft N AP] // Do not update bUseProtection bit when G mode STA add or leave. 2010.11.24. by tynli. if(pEntry->WirelessMode == WIRELESS_MODE_B) { ActUpdate_ProtectionMode(Adapter, TRUE); - + if(pEntry->WirelessMode == WIRELESS_MODE_B) pMgntInfo->mCap &= (~cShortSlotTime); else @@ -4952,26 +4952,26 @@ AP_OnAsocReq( // // Association Request. // - AsocEntry_UpdateAsocInfo(Adapter, - pEntry->MacAddr, - NULL, - 0, + AsocEntry_UpdateAsocInfo(Adapter, + pEntry->MacAddr, + NULL, + 0, ALLOCATE_ASOC_REQ); - AsocEntry_UpdateAsocInfo(Adapter, - pEntry->MacAddr, - asocpdu.Octet, - asocpdu.Length, + AsocEntry_UpdateAsocInfo(Adapter, + pEntry->MacAddr, + asocpdu.Octet, + asocpdu.Length, UPDATE_ASOC_REQ); // // IE from OS that is to be carried in Association Response. // - AsocEntry_UpdateAsocInfo(Adapter, - pEntry->MacAddr, - NULL, - 0, + AsocEntry_UpdateAsocInfo(Adapter, + pEntry->MacAddr, + NULL, + 0, ALLOCATE_ASOC_RSP_IE_FROM_OS); - + if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP && bIndicate) { // @@ -4981,23 +4981,23 @@ AP_OnAsocReq( // cached in the station entry already. We need to process it now. // pMgntInfo->pCurrentSta = pEntry; - DrvIFIndicateIncommingAssociationStart(Adapter); + DrvIFIndicateIncommingAssociationStart(Adapter); DrvIFIndicateIncommingAssocReqRecv(Adapter); if(OS_SUPPORT_WDI(Adapter)) {// let WDI to decide whether to send the rsp bSendRsp = FALSE; } - else + else if(!pEntry->bOsDecisionMade) { - RT_TRACE_F(COMP_INDIC, DBG_WARNING, + RT_TRACE_F(COMP_INDIC, DBG_WARNING, ("[WARNING] OS did not make decision whether to accept the AsocReq.\n")); AsocStatusCode = StatusCode_Unspecified_failure; } else if(pEntry->bNotAcceptedByOs) - { - RT_TRACE_F(COMP_INDIC, DBG_WARNING, + { + RT_TRACE_F(COMP_INDIC, DBG_WARNING, ("[WARNING] the AssocReq is not accepted by OS.\n")); AsocStatusCode = pEntry->OsReasonCode; @@ -5012,8 +5012,8 @@ AP_OnAsocReq( // This client is associated our AP successfully. // These actions must be updated before sending assoication response because there may be some packets will be // received immediately after sending the response packet. - if(AsocStatusCode == StatusCode_success) - { + if(AsocStatusCode == StatusCode_success) + { // Change the last scan complete time to block scan request for a while from the default port. // If the scan process is executed, the next handshake may fail because this port is not in the // correct channel now. @@ -5042,8 +5042,8 @@ AP_OnAsocReq( pEntry->MacAddr, NULL, 0, - FREE_ASOC_RSP_IE_FROM_OS); - + FREE_ASOC_RSP_IE_FROM_OS); + if(pEntry->HTInfo.bEnableHT) { u4Byte Length = 0; @@ -5056,7 +5056,7 @@ AP_OnAsocReq( Length += BroadcomElement.Length; BroadcomElement = PacketGetElement( asocpdu, EID_Vendor, OUI_SUB_BROADCOM_IE_3, OUI_SUBTYPE_DONT_CARE); Length += BroadcomElement.Length; - + if( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40|| pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104 ||pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP) @@ -5064,9 +5064,9 @@ AP_OnAsocReq( //DbgPrint("WEP DON't Use AMSDU\n"); pEntry->IOTAction = 0; } - + OnMimoPs(Adapter, pRfd,&asocpdu); - + } FunctionOut(COMP_MLME); @@ -5114,7 +5114,7 @@ AP_SendAsocRsp( else { pAdapter->HalFunc.UpdateHalRATRTableHandler( - pAdapter, + pAdapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet,pEntry); } @@ -5128,7 +5128,7 @@ AP_SendAsocRsp( // Added by Annie, 2005-06-30. if( pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK || pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPA2PSK) { -#if (WPS_SUPPORT == 1) +#if (WPS_SUPPORT == 1) PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(pDefaultMgntInfo); BOOLEAN bWpsInProgress = pSimpleConfig->bEnabled; #else @@ -5141,11 +5141,11 @@ AP_SendAsocRsp( Authenticator_OnAuthenticationRequest(pAdapter, &pEntry->perSTAKeyInfo); } - + // - // 061227, rcnjko: + // 061227, rcnjko: // Just Indicate association start and association complete events, - // connection start and connection complete events will be indicate up + // connection start and connection complete events will be indicate up // when UI set the fake profile before. // if(MgntActQuery_ApType(pAdapter) == RT_AP_TYPE_IBSS_EMULATED @@ -5160,16 +5160,16 @@ AP_SendAsocRsp( pMgntInfo->pCurrentSta = pEntry; DrvIFIndicateIncommingAssociationComplete(pAdapter, status); } - + AsocEntry_UpdateAsocInfo(pAdapter, pEntry->MacAddr, NULL, 0, FREE_ASOC_RSP); - + } #else -#endif +#endif diff --git a/network/wlan/WDI/COMMON/ApEngine.h b/network/wlan/WDI/COMMON/ApEngine.h index 675b55508..102c209f0 100644 --- a/network/wlan/WDI/COMMON/ApEngine.h +++ b/network/wlan/WDI/COMMON/ApEngine.h @@ -149,8 +149,8 @@ Ap_SendDisassocWithOldChnlWorkitemCallback( IN PVOID pContext ); -VOID -AP_DisconnectAfterSTANewConnected( +VOID +AP_DisconnectAfterSTANewConnected( PADAPTER Adapter ); @@ -195,8 +195,8 @@ AP_SendAsocRsp( BOOLEAN AP_DisassociateStation( - IN PADAPTER Adapter, - IN PRT_WLAN_STA pSta, + IN PADAPTER Adapter, + IN PRT_WLAN_STA pSta, IN u1Byte asRsn); VOID @@ -219,7 +219,7 @@ VOID AP_PS_FillTim( IN PMGNT_INFO pMgntInfo); -VOID +VOID AP_PS_OnPSPoll( IN PADAPTER Adapter, IN OCTET_STRING osMpdu); @@ -232,13 +232,13 @@ AP_ForwardPacketWithFromDS( BOOLEAN AP_FromWdsToBss( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_RFD pRfd, IN BOOLEAN bNeedCopy); BOOLEAN AP_FromBssToWds( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_RFD pRfd, IN BOOLEAN bNeedCopy); @@ -253,7 +253,7 @@ AP_CheckRSNIE( IN PRT_WLAN_STA pEntry, IN OCTET_STRING asocpdu); -void +void AP_OnEAPOL( IN PADAPTER Adapter, IN PRT_RFD pRfd ); @@ -262,7 +262,7 @@ AP_OnEAPOL( AP_STATE GetAPState( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); VOID @@ -361,7 +361,7 @@ Ap_PsTxFeedbackCallback( const RT_TX_FEEDBACK_INFO * const pTxFeedbackInfo ); -VOID +VOID AP_AllPowerSaveDisable( IN PADAPTER pAdapter ); diff --git a/network/wlan/WDI/COMMON/Authenticator.c b/network/wlan/WDI/COMMON/Authenticator.c index 1746bbc30..16398b513 100644 --- a/network/wlan/WDI/COMMON/Authenticator.c +++ b/network/wlan/WDI/COMMON/Authenticator.c @@ -14,8 +14,8 @@ // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_OnDeauthenticationRequest( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt @@ -29,8 +29,8 @@ Authenticator_OnDeauthenticationRequest( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_OnAuthenticationRequest( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt @@ -44,8 +44,8 @@ Authenticator_OnAuthenticationRequest( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_OnReAuthenticationRequest( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt @@ -64,7 +64,7 @@ Authenticator_OnReAuthenticationRequest( // Modify: Annie, 2005-07-02 // Discard using condition pKeyMgnt->bPTKInstalled. // Instead, I add a macro KeyMgntStateIsWaitingEAPOLKey to check the state. -void +void Authenticator_OnEAPOLKeyRecvd( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt, @@ -94,15 +94,15 @@ Authenticator_OnEAPOLKeyRecvd( //PRINT_DATA( ("EapolKeyMsgRecvd: "), pGlInfo->EapolKeyMsgRecvd.Octet, pGlInfo->EapolKeyMsgRecvd.Length); RSNIE.Octet = NULL; RSNIE.Length = 0; - + // Get the message number. if( Message_KeyType(pGlInfo->EapolKeyMsgRecvd) == type_Pairwise ) { if( (Message_Error(pGlInfo->EapolKeyMsgRecvd) == 1) && (Message_Request(pGlInfo->EapolKeyMsgRecvd) == 1)) - { - //Enter integrity failure state... - Authenticator_StateINTEGRITYFAILURE(Adapter, pEntry); + { + //Enter integrity failure state... + Authenticator_StateINTEGRITYFAILURE(Adapter, pEntry); } if( (eapol_key_recvd->key_info[0]==0x01 && eapol_key_recvd->key_info[1]==0x09) || @@ -114,7 +114,7 @@ Authenticator_OnEAPOLKeyRecvd( RSNIE = EAPOLkeyGetRSNIE( pGlInfo->EapolKeyMsgRecvd, EID_Vendor ); else if( pMgntInfo->SecurityInfo.SecLvl == RT_SEC_LVL_WPA2) RSNIE = EAPOLkeyGetRSNIE( pGlInfo->EapolKeyMsgRecvd, EID_WPA2 ); - + if( RSNIE.Length != 0 ) msg_type = type_4way2nd; // with RSNIE: msg 2 (159 or 161) else @@ -133,7 +133,7 @@ Authenticator_OnEAPOLKeyRecvd( // msg_type = type_2way2nd; // group key msg2 (155) //else // RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("unknow group EAPOL-key: info=0x%X-0x%X\n", eapol_key_recvd->key_info[0], eapol_key_recvd->key_info[1]) ); - + msg_type = type_2way2nd; } @@ -152,7 +152,7 @@ Authenticator_OnEAPOLKeyRecvd( SNonce = Message_KeyNonce( pGlInfo->EapolKeyMsgRecvd ); CopyMem( pKeyMgnt->SNonce, SNonce.Octet, KEY_NONCE_LEN ); - + CalcPTK( pAP_addr, pSTA_addr, pKeyMgnt->ANonce, pKeyMgnt->SNonce, pGlInfo->PMK, PMK_LEN, pKeyMgnt->PTK_update, PTK_LEN ); @@ -161,7 +161,7 @@ Authenticator_OnEAPOLKeyRecvd( SendDeauthentication( Adapter, pSTA_addr , mic_failure ); PlatformStallExecution(100); RT_TRACE_F(COMP_AP, DBG_TRACE, ("AsocEntry_RemoveStation\n")); - + AsocEntry_RemoveStation( Adapter , pSTA_addr); RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("MIC erroe\n")); return; @@ -181,7 +181,7 @@ Authenticator_OnEAPOLKeyRecvd( SendDeauthentication( Adapter, pSTA_addr , mic_failure ); PlatformStallExecution(100); RT_TRACE_F(COMP_AP, DBG_TRACE, ("AsocEntry_RemoveStation case 2\n")); - + AsocEntry_RemoveStation( Adapter , pSTA_addr); RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("MIC erroe\n")); return; @@ -191,7 +191,7 @@ Authenticator_OnEAPOLKeyRecvd( pEntry->perSTAKeyInfo.RxIV &= UINT64_C(0x0000ffffffffffff); //RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("pEntry->perSTAKeyInfo.RxIV = 0x%16"i64fmt"x", pEntry->perSTAKeyInfo.RxIV)); - Authenticator_StatePTKINITDONE(Adapter, pEntry); + Authenticator_StatePTKINITDONE(Adapter, pEntry); } else if( pKeyMgnt->GrState == ASMGS_REKEYNEGOTIATING && msg_type==type_2way2nd ) { @@ -236,7 +236,7 @@ Authenticator_OnEAPOLKeyRecvd( // Reference: PacketGetElement(), which is only used for management frame. // In fact, this two function should be merged and reused. // -OCTET_STRING +OCTET_STRING EAPOLkeyGetRSNIE( IN OCTET_STRING eapolkeypkt, IN ELEMENT_ID ID @@ -271,7 +271,7 @@ EAPOLkeyGetRSNIE( -void +void KeyMgntTimeout( PRT_TIMER pTimer ) @@ -317,7 +317,7 @@ KeyMgntTimeout( { if( pKeyMgnt->TimeoutCtr >= MAX_TIMEOUT_CNT ) { - pKeyMgnt->TimeoutCtr = 0; + pKeyMgnt->TimeoutCtr = 0; Authenticator_OnTimeoutCountExceeded(Adapter, pKeyMgnt); } else @@ -326,7 +326,7 @@ KeyMgntTimeout( { //RT_TRACE(COMP_AUTHENTICATOR, DBG_LOUD, ("KeyMgntTimeout(): Retry! [TimeSlot:%"i64fmt"d, TimeoutCtr:%d]\n", // pMgntInfo->globalKeyInfo.CurrentTimeSlot, (int)pKeyMgnt->TimeoutCtr )); - + pKeyMgnt->TimeoutCtr ++; if( pKeyMgnt->PrState == ASMPS_PTKSTART ) // waiting for 2nd msg in 4-way handshake @@ -340,7 +340,7 @@ KeyMgntTimeout( else if( pKeyMgnt->GrState == ASMGS_REKEYNEGOTIATING ) // waiting for 2nd msg in 2-way handshake { Authenticator_StateREKEYNEGOTIATING(Adapter, &pMgntInfo->AsocEntry[i]); - } + } } else { @@ -350,7 +350,7 @@ KeyMgntTimeout( } } - + } //RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("KeyMgntTimeout: AsocNum=%d, CurrentTimeSlot=%"i64fmt"d\n", AsocNum, pMgntInfo->globalKeyInfo.CurrentTimeSlot ) ); @@ -358,7 +358,7 @@ KeyMgntTimeout( // Continue setting the timer only when RT_802_11AuthModeWPAPSK. pMgntInfo->globalKeyInfo.CurrentTimeSlot ++; PlatformSetTimer( Adapter, &pMgntInfo->globalKeyInfo.KeyMgntTimer, KEY_MGNT_INTERVAL ); - + } } @@ -368,7 +368,7 @@ KeyMgntTimeout( // Description: // Output: void // Modify: Annie, 2005-07-12 -void +void Authenticator_OnTimeoutCountExceeded( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt @@ -376,7 +376,7 @@ Authenticator_OnTimeoutCountExceeded( { RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("Authenticator_OnTimeoutCountExceeded!\n") ); pKeyMgnt->EvntID = ASMEID_TimeOutExceeded; - + //pKeyMgnt->TimeoutCtr = 0; // it should be cleared in KeyMgntTimeout(). if( pKeyMgnt->PrState == ASMPS_PTKSTART || pKeyMgnt->PrState == ASMPS_PTKINITNEGOTIATING ) @@ -392,7 +392,7 @@ Authenticator_OnTimeoutCountExceeded( { RT_TRACE(COMP_AUTHENTICATOR, DBG_LOUD, ("Authenticator_OnTimeoutCountExceeded(): Unexpected State!!\n")); RT_TRACE(COMP_AUTHENTICATOR, DBG_LOUD, ("--- PairwiseKeyState:%d, GroupKeyState:%d ---\n", pKeyMgnt->PrState, pKeyMgnt->GrState)); - } + } } @@ -402,7 +402,7 @@ Authenticator_OnTimeoutCountExceeded( // Description: Disconnect the station // Output: void // Modify: Annie, 2005-07-12. -void +void Authenticator_StateDISCONNECT( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA, @@ -418,7 +418,7 @@ Authenticator_StateDISCONNECT( RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("[Warning] current: STA mode, return.")); return; } - + pSTA->perSTAKeyInfo.PrState = ASMPS_DISCONNECTE; if( AsocEntry_IsStationAssociated( &Adapter->MgntInfo, pSTA->MacAddr ) ) @@ -434,8 +434,8 @@ Authenticator_StateDISCONNECT( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateDISCONNECTED( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -466,7 +466,7 @@ Authenticator_StateDISCONNECTED( // Discard using condition pKeyMgnt->bPTKInstalled. // Instead, I add a macro KeyMgntStateIsWaitingEAPOLKey to check the state. -void +void Authenticator_StateINITIALIZE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -481,7 +481,7 @@ Authenticator_StateINITIALIZE( RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("===> Authenticator_StateINITIALIZE()\n") ); if( !ACTING_AS_AP(Adapter) - && !GET_TDLS_ENABLED(&(Adapter->MgntInfo)) + && !GET_TDLS_ENABLED(&(Adapter->MgntInfo)) ) { RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("[Warning] current: STA mode, return.")); @@ -498,14 +498,14 @@ Authenticator_StateINITIALIZE( { // 3. 802.1x::PortMode = Disable; pKeyMgnt->portMode = pmt_Disable; // [TODO] other auth mode - + // 4. 802.1x::PortSecure = 0; pKeyMgnt->portSecure= psec_Unauthorized; // [TODO] other auth mode } - + // 1. MSK = 0 ...? - + // 2. GNoStations = 0 // ...it's for group key update. I don't do it currently. Annie, 2005-07-01. @@ -519,7 +519,7 @@ Authenticator_StateINITIALIZE( PlatformMoveMemory( pKeyMgnt->ANonce , NonceBuf , KEY_NONCE_LEN ); - + // 5. RemovePTK PlatformZeroMemory( pKeyMgnt->PTK, PTK_LEN ); @@ -529,7 +529,7 @@ Authenticator_StateINITIALIZE( //AP-WPA AES ,CCW PlatformZeroMemory( pKeyMgnt->AESKeyBuf , AESCCMP_BLK_SIZE_TOTAL ); - + //pKeyMgnt->bPTKInstalled = FALSE; pKeyMgnt->PInitAKeys = FALSE; pKeyMgnt->GInitAKeys = FALSE; @@ -543,10 +543,10 @@ Authenticator_StateINITIALIZE( //Remove key from SW/HW CAM table, Add by CCW AP_RemoveKey( Adapter , pSTA ); - + // 7. Reset ReplayCounter pKeyMgnt->KeyReplayCounter = 0; - + // 8. Reset SNonce PlatformZeroMemory( pKeyMgnt->SNonce, KEY_NONCE_LEN ); @@ -555,7 +555,7 @@ Authenticator_StateINITIALIZE( pKeyMgnt->RxIV = DEFAULT_INIT_RX_IV; pKeyMgnt->TxIV = DEFAULT_INIT_TX_IV; - pKeyMgnt->KeyRSC = pKeyMgnt->TxIV; + pKeyMgnt->KeyRSC = pKeyMgnt->TxIV; // Added by Annie for debug, 2005-07-25. pKeyMgnt->MicErrorCnt = 0; @@ -573,8 +573,8 @@ Authenticator_StateINITIALIZE( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateAUTHENTICATION( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -602,15 +602,15 @@ Authenticator_StateAUTHENTICATION( // 4. 802.1x::PortMode = Enabled pSTA->perSTAKeyInfo.portMode = pmt_Enable; - + // UCT Authenticator_StateAUTHENTICATION2( Adapter, pSTA ); } // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateAUTHENTICATION2( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -639,8 +639,8 @@ Authenticator_StateAUTHENTICATION2( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StatePTKSTART( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -667,35 +667,35 @@ Authenticator_StatePTKSTART( // [AnnieTODO] // 1. Construct 1st message in 4-way handshake. // EAPOL(0, 0, 1, 0, 0, p, ANonce, 0, 0) - // 2. Send 1st msg + // 2. Send 1st msg pKeyMgnt->KeyReplayCounter ++; RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("Send 4-way message 1\n")); //RT_TRACE(COMP_AUTHENTICATOR, DBG_LOUD , (" KeyReplayCounter = %08"i64fmt"x \n",pKeyMgnt->KeyReplayCounter )); - + for( indexi = 0 ; indexi < 8 ; indexi++) temp[indexi] = (u1Byte)((pKeyMgnt->KeyReplayCounter >>( (7-indexi) *8)) &0xff ); PlatformMoveMemory( &KeyReplayCounter , temp , 8 ); - + SendEapolKeyPacket( - Adapter, - pSTA->MacAddr, //StaAddr, + Adapter, + pSTA->MacAddr, //StaAddr, NULL, // Pointer to KCK (EAPOL-Key Confirmation Key). - NULL, // + NULL, // type_Pairwise, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. FALSE, // EAPOL-Key Information field: Install Flag. TRUE, // EAPOL-Key Information field: Key Ack bit. - FALSE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + FALSE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. FALSE, // EAPOL-Key Information field: Secure bit. FALSE, // EAPOL-Key Information field: Error bit. True for MIC failure report. FALSE, // EAPOL-Key Information field: Requst bit. KeyReplayCounter, // EAPOL-KEY Replay Counter field. //pSTA->perSTAKeyInfo.KeyReplayCounter pKeyMgnt->ANonce, // EAPOL-Key Key Nonce field (32-byte). 0, // EAPOL-Key Key RSC field (8-byte). - NULL, // Key Data field: Pointer to RSN IE, NULL if + NULL, // Key Data field: Pointer to RSN IE, NULL if NULL // Key Data field: Pointer to GTK, NULL if Key Data Length = 0. ); @@ -710,8 +710,8 @@ Authenticator_StatePTKSTART( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StatePTKINITNEGOTIATING( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -739,7 +739,7 @@ Authenticator_StatePTKINITNEGOTIATING( // [AnnieTODO] // 1. Construct 3rd message in 4-way handshake. // EAPOL(0, 1, 1, Pair,0, P, ANonce, MIC(PTK_update), 0) - // 2. Send 3rd msg + // 2. Send 3rd msg pKeyMgnt->KeyReplayCounter ++; @@ -750,46 +750,46 @@ Authenticator_StatePTKINITNEGOTIATING( temp[indexi] = (u1Byte)((pKeyMgnt->KeyReplayCounter >>( (7-indexi) *8)) &0xff ); PlatformMoveMemory( &KeyReplayCounter , temp , 8 ); - + if( pMgntInfo->SecurityInfo.SecLvl == RT_SEC_LVL_WPA ) { SendEapolKeyPacket( - Adapter, - pSTA->MacAddr, + Adapter, + pSTA->MacAddr, pSTA->perSTAKeyInfo.PTK_update, // Pointer to KCK (EAPOL-Key Confirmation Key). pSTA->perSTAKeyInfo.PTK_update + 16, type_Pairwise, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. TRUE, // EAPOL-Key Information field: Install Flag. TRUE, // EAPOL-Key Information field: Key Ack bit. - TRUE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + TRUE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. FALSE, // EAPOL-Key Information field: Secure bit. FALSE, // EAPOL-Key Information field: Error bit. True for MIC failure report. FALSE, // EAPOL-Key Information field: Requst bit. KeyReplayCounter, //pSTA->perSTAKeyInfo.KeyReplayCounter, // EAPOL-KEY Replay Counter field. pKeyMgnt->ANonce, // EAPOL-Key Key Nonce field (32-byte). pSTA->perSTAKeyInfo.KeyRSC, // perSTA EAPOL-Key Key RSC field (8-byte). - &(pMgntInfo->SecurityInfo.RSNIE), // Key Data field: Pointer to RSN IE, NULL if + &(pMgntInfo->SecurityInfo.RSNIE), // Key Data field: Pointer to RSN IE, NULL if NULL // Key Data field: Pointer to GTK, NULL if Key Data Length = 0. ); } else if( pMgntInfo->SecurityInfo.SecLvl == RT_SEC_LVL_WPA2 ) { SendEapolKeyPacket( - Adapter, - pSTA->MacAddr, + Adapter, + pSTA->MacAddr, pSTA->perSTAKeyInfo.PTK_update, // Pointer to KCK (EAPOL-Key Confirmation Key). pSTA->perSTAKeyInfo.PTK_update + 16, type_Pairwise, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. TRUE, // EAPOL-Key Information field: Install Flag. TRUE, // EAPOL-Key Information field: Key Ack bit. - TRUE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + TRUE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. TRUE, // EAPOL-Key Information field: Secure bit. FALSE, // EAPOL-Key Information field: Error bit. True for MIC failure report. FALSE, // EAPOL-Key Information field: Requst bit. KeyReplayCounter,//pSTA->perSTAKeyInfo.KeyReplayCounter, // EAPOL-KEY Replay Counter field. pKeyMgnt->ANonce, // EAPOL-Key Key Nonce field (32-byte). pSTA->perSTAKeyInfo.KeyRSC, // perSTA EAPOL-Key Key RSC field (8-byte). - &(pMgntInfo->SecurityInfo.RSNIE), // Key Data field: Pointer to RSN IE, NULL if + &(pMgntInfo->SecurityInfo.RSNIE), // Key Data field: Pointer to RSN IE, NULL if pGlInfo->GTK // Key Data field: Pointer to GTK, NULL if Key Data Length = 0. ); } @@ -805,8 +805,8 @@ Authenticator_StatePTKINITNEGOTIATING( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StatePTKINITDONE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -827,8 +827,8 @@ Authenticator_StatePTKINITDONE( } pSTA->perSTAKeyInfo.PrState = ASMPS_PTKINITDONE; - - // TODO: Check SetKey completed, these lines were moved from Authenticator_OnEAPOLKeyRecvd() by Jay + + // TODO: Check SetKey completed, these lines were moved from Authenticator_OnEAPOLKeyRecvd() by Jay if (pSTA->perSTAKeyInfo.Pair) { u4Byte ucIndex = 0; @@ -836,51 +836,51 @@ Authenticator_StatePTKINITDONE( if( Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm != RT_ENC_ALG_AESCCMP ) { pSTA->perSTAKeyInfo.TempEncKey = pKeyMgnt->PTK+TKIP_ENC_KEY_POS; - pSTA->perSTAKeyInfo.TxMICKey = pKeyMgnt->PTK+(TKIP_MIC_KEY_POS); + pSTA->perSTAKeyInfo.TxMICKey = pKeyMgnt->PTK+(TKIP_MIC_KEY_POS); pSTA->perSTAKeyInfo.RxMICKey = pKeyMgnt->PTK+(TKIP_MIC_KEY_POS+TKIP_MIC_KEY_LEN); - //Add for AP mode HW enc,by CCW + //Add for AP mode HW enc,by CCW ucIndex = AP_FindFreeEntry(Adapter , pSTA->MacAddr ); if(ucIndex == Adapter->TotalCamEntry) { RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("[Warning] Authenticator_StatePTKINITDONE: Cam Entry is FULL!!!\n")); return; } - + //set key - AP_Setkey( Adapter , + AP_Setkey( Adapter , pSTA->perSTAKeyInfo.pWLanSTA->MacAddr, - ucIndex, // Entey index + ucIndex, // Entey index CAM_TKIP, - 0, // Parise key - pSTA->perSTAKeyInfo.TempEncKey); + 0, // Parise key + pSTA->perSTAKeyInfo.TempEncKey); pSTA->keyindex = ucIndex; }else{ // AES mode AP-WPA AES,CCW - + AESCCMP_BLOCK blockKey; //RT_TRACE( COMP_WPAAES, DBG_LOUD, ("====> Set Station Key.")); - //Add for AP mode HW enc,by CCW + //Add for AP mode HW enc,by CCW ucIndex = AP_FindFreeEntry(Adapter , pSTA->MacAddr); if(ucIndex == Adapter->TotalCamEntry) { RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("[Warning] Authenticator_StatePTKINITDONE: Cam Entry is FULL!!!\n")); return; } - - //Set Key + + //Set Key PlatformMoveMemory( blockKey.x , pKeyMgnt->PTK+TKIP_ENC_KEY_POS , 16); AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pSTA->perSTAKeyInfo.AESKeyBuf); //set hw key - AP_Setkey( Adapter , + AP_Setkey( Adapter , pSTA->perSTAKeyInfo.pWLanSTA->MacAddr, - ucIndex, // Entey index + ucIndex, // Entey index CAM_AES, - 0, // Parise key - pSTA->perSTAKeyInfo.PTK+TKIP_ENC_KEY_POS); + 0, // Parise key + pSTA->perSTAKeyInfo.PTK+TKIP_ENC_KEY_POS); pSTA->keyindex = ucIndex; } - + } //pSTA->perSTAKeyInfo.bPTKInstalled = TRUE; pSTA->perSTAKeyInfo.GInitAKeys = TRUE; @@ -899,8 +899,8 @@ Authenticator_StatePTKINITDONE( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateUPDATEKEYS( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -923,14 +923,14 @@ Authenticator_StateUPDATEKEYS( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateINTEGRITYFAILURE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ) { -#if 1 //Added by Jay 0713 for process integrity failure +#if 1 //Added by Jay 0713 for process integrity failure u8Byte DiffTimeSlot; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); #endif @@ -947,20 +947,20 @@ Authenticator_StateINTEGRITYFAILURE( pSTA->perSTAKeyInfo.MicErrorCnt ++; // Added by Annie for debug, 2005-07-25. -#if 1 //Added by Jay 0713 for process integrity failure +#if 1 //Added by Jay 0713 for process integrity failure //RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("IntegrityFail(): AP mode, TimeSlot_lastIntegrityFailed=%"i64fmt"d\n", pSTA->perSTAKeyInfo.TimeSlot_lastIntegrityFailed )); //RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("IntegrityFail(): AP mode, CurrentTimeSlot =%"i64fmt"d\n", pMgntInfo->globalKeyInfo.CurrentTimeSlot )); - DiffTimeSlot = pMgntInfo->globalKeyInfo.CurrentTimeSlot - + DiffTimeSlot = pMgntInfo->globalKeyInfo.CurrentTimeSlot - pSTA->perSTAKeyInfo.TimeSlot_lastIntegrityFailed; - - pSTA->perSTAKeyInfo.TimeSlot_lastIntegrityFailed = + + pSTA->perSTAKeyInfo.TimeSlot_lastIntegrityFailed = pMgntInfo->globalKeyInfo.CurrentTimeSlot; if(DiffTimeSlot > 60) { #if SUPPORT_WPA_VERSION_D3 - //update the PTK with this STA and GTK with all STAs + //update the PTK with this STA and GTK with all STAs Authenticator_StateKEYUPDATE(Adapter, pSTA); #endif } @@ -982,8 +982,8 @@ Authenticator_StateINTEGRITYFAILURE( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateKEYUPDATE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -1011,8 +1011,8 @@ Authenticator_StateKEYUPDATE( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateREKEYNEGOTIATING( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -1049,23 +1049,23 @@ Authenticator_StateREKEYNEGOTIATING( temp[indexi] = (u1Byte)((pKeyMgnt->KeyReplayCounter >>( (7-indexi) *8)) &0xff ); PlatformMoveMemory( &KeyReplayCounter , temp , 8 ); - + SendEapolKeyPacket( - Adapter, - pSTA->MacAddr, + Adapter, + pSTA->MacAddr, pSTA->perSTAKeyInfo.PTK, // Pointer to KCK (EAPOL-Key Confirmation Key). pSTA->perSTAKeyInfo.PTK + 16, // [AnnieWorkaround] type_Group, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. FALSE, // EAPOL-Key Information field: Install Flag. TRUE, // EAPOL-Key Information field: Key Ack bit. - TRUE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + TRUE, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. TRUE, // EAPOL-Key Information field: Secure bit. FALSE, // EAPOL-Key Information field: Error bit. True for MIC failure report. FALSE, // EAPOL-Key Information field: Requst bit. KeyReplayCounter,//pSTA->perSTAKeyInfo.KeyReplayCounter, // EAPOL-KEY Replay Counter field. pGlInfo->GNonce, // EAPOL-Key Key Nonce field (32-byte). pGlInfo->KeyRSC, // EAPOL-Key Key RSC field (8-byte). - NULL, // Key Data field: Pointer to RSN IE, NULL if + NULL, // Key Data field: Pointer to RSN IE, NULL if pGlInfo->GTK // Key Data field: Pointer to GTK, NULL if Key Data Length = 0. ); @@ -1080,8 +1080,8 @@ Authenticator_StateREKEYNEGOTIATING( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateREKEYESTABLISHED( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA @@ -1114,8 +1114,8 @@ Authenticator_StateREKEYESTABLISHED( // Description: // Output: -// Modify: -void +// Modify: +void Authenticator_StateKEYERROR( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA, @@ -1150,7 +1150,7 @@ Authenticator_StateKEYERROR( // Now Global/group key data (PMK, GTK, ANonce): all kept in pMgntInfo->globalKeyInfo. // global key state: recorded in pEntry->perSTAKeyInfo.GrState. (I think it should be kept in per station.) // -void +void Authenticator_GlobalReset( IN PADAPTER Adapter ) @@ -1162,7 +1162,7 @@ Authenticator_GlobalReset( int i; u1Byte RdmBuf[20], NonceBuf[KEY_NONCE_LEN]; static u1Byte CAM_CONST_BROAD[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - AESCCMP_BLOCK blockKey; + AESCCMP_BLOCK blockKey; //--- [AnnieWorkaround] See 11i D3.0 page91, GTK should be generated by PRF-X. @@ -1191,7 +1191,7 @@ Authenticator_GlobalReset( NonceBuf[16+i] = RdmBuf[19-i]; } NonceBuf[KEY_NONCE_LEN-1] = 0; //[AnnieWorkaround] Remove it if ANonce addition is ready. 2005-11-25. - RT_PRINT_DATA( COMP_AUTHENTICATOR, DBG_LOUD, "Authenticator_GlobalReset(): NonceBuf", NonceBuf, KEY_NONCE_LEN ); + RT_PRINT_DATA( COMP_AUTHENTICATOR, DBG_LOUD, "Authenticator_GlobalReset(): NonceBuf", NonceBuf, KEY_NONCE_LEN ); // 1. Install PMK if( pGlInfo->PassphraseLen < 64 ){ @@ -1216,13 +1216,13 @@ Authenticator_GlobalReset( pGlInfo->TxMICKey = pGlInfo->GTK + GTK_MIC_TX_POS; pGlInfo->RxMICKey = pGlInfo->GTK + GTK_MIC_RX_POS; - //AP WPA AES,CCW + //AP WPA AES,CCW PlatformMoveMemory( blockKey.x , pGlInfo->GTK , 16); AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pGlInfo->AESGTK); // pSecInfo->GroupTransmitKeyIdx = 1; - - + + // 3. Install ANonce // CopyMem( pGlInfo->ANonce, NonceBuf, KEY_NONCE_LEN ); @@ -1234,7 +1234,7 @@ Authenticator_GlobalReset( // 5. Reset KeyRSC pGlInfo->KeyRSC = 0; - + // 6. Reset time slot. pGlInfo->CurrentTimeSlot = 0; @@ -1257,16 +1257,16 @@ Authenticator_GlobalReset( //reset SWCamTabe and HWCamtable ,add by CCW AP_ClearAllKey(Adapter); - + if( (MgntActQuery_ApType(Adapter) == RT_AP_TYPE_NORMAL || - MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED - || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) && + MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED + || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) && ( pMgntInfo->NdisVersion < RT_NDIS_VERSION_6_20 )) { switch( pSecInfo->PairwiseEncAlgorithm ) { case RT_ENC_ALG_TKIP: - AP_Setkey( Adapter , + AP_Setkey( Adapter , CAM_CONST_BROAD, 1, // Index entry CAM_TKIP, @@ -1275,7 +1275,7 @@ Authenticator_GlobalReset( break; case RT_ENC_ALG_AESCCMP: - AP_Setkey( Adapter , + AP_Setkey( Adapter , CAM_CONST_BROAD, 1, // Index entry CAM_AES, @@ -1283,7 +1283,7 @@ Authenticator_GlobalReset( pGlInfo->GTK); break; - case RT_ENC_ALG_WEP40: + case RT_ENC_ALG_WEP40: case RT_ENC_ALG_WEP104: { static u1Byte CAM_CONST_ADDR[4][6] = { @@ -1292,13 +1292,13 @@ Authenticator_GlobalReset( {0x00, 0x00, 0x00, 0x00, 0x00, 0x02}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}; u1Byte EncAlgo = ((pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) ? CAM_WEP40 : CAM_WEP104); - + for(i = 0; i < 4; i++) { if(pSecInfo->KeyLen[i] > 0) { AP_Setkey( - Adapter , + Adapter , CAM_CONST_ADDR[i], i, // Index entry EncAlgo, @@ -1313,9 +1313,9 @@ Authenticator_GlobalReset( break; } } - + RT_TRACE( COMP_AUTHENTICATOR, DBG_LOUD, ("<=== Authenticator_GlobalReset()\n") ); - + } diff --git a/network/wlan/WDI/COMMON/Authenticator.h b/network/wlan/WDI/COMMON/Authenticator.h index a52e0e14d..035b0ccdf 100644 --- a/network/wlan/WDI/COMMON/Authenticator.h +++ b/network/wlan/WDI/COMMON/Authenticator.h @@ -8,27 +8,27 @@ // On event -void +void Authenticator_OnDeauthenticationRequest( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt ); -void +void Authenticator_OnAuthenticationRequest( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt ); -void +void Authenticator_OnReAuthenticationRequest( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt ); -void +void Authenticator_OnEAPOLKeyRecvd( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt, @@ -36,7 +36,7 @@ Authenticator_OnEAPOLKeyRecvd( ); -OCTET_STRING +OCTET_STRING EAPOLkeyGetRSNIE( IN OCTET_STRING eapolkeypkt, IN ELEMENT_ID ID @@ -48,7 +48,7 @@ KeyMgntTimeout( PRT_TIMER pTimer ); -void +void Authenticator_OnTimeoutCountExceeded( IN PADAPTER Adapter, IN PAUTH_PKEY_MGNT_TAG pKeyMgnt @@ -56,87 +56,87 @@ Authenticator_OnTimeoutCountExceeded( // Status handle -void +void Authenticator_StateDISCONNECT( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA, IN u1Byte ReasonCode ); -void +void Authenticator_StateDISCONNECTED( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateINITIALIZE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateAUTHENTICATION( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateAUTHENTICATION2( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StatePTKSTART( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StatePTKINITNEGOTIATING( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StatePTKINITDONE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateUPDATEKEYS( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateINTEGRITYFAILURE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateKEYUPDATE( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateREKEYNEGOTIATING( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateREKEYESTABLISHED( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA ); -void +void Authenticator_StateKEYERROR( IN PADAPTER Adapter, IN PRT_WLAN_STA pSTA, @@ -144,7 +144,7 @@ Authenticator_StateKEYERROR( ); -void +void Authenticator_GlobalReset( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/COMMON/BAGen.c b/network/wlan/WDI/COMMON/BAGen.c index 6d789c041..8aa37949f 100644 --- a/network/wlan/WDI/COMMON/BAGen.c +++ b/network/wlan/WDI/COMMON/BAGen.c @@ -11,7 +11,7 @@ ActivateBAEntry( u2Byte Time ) { - RT_TRACE(COMP_HT, DBG_LOUD, ("pBA->bValid = TRUE\r\n")); + RT_TRACE(COMP_HT, DBG_LOUD, ("pBA->bValid = TRUE\r\n")); pBA->bValid = TRUE; if(Time != 0) PlatformSetTimer(Adapter, &pBA->Timer, Time); @@ -114,10 +114,10 @@ ConstructADDBAReq( *pLength = 0; ConstructMaFrameHdr( - Adapter, - Addr, - ACT_CAT_BA, - ACT_ADDBAREQ, + Adapter, + Addr, + ACT_CAT_BA, + ACT_ADDBAREQ, &osADDBAFrame ); // Dialog Token @@ -155,10 +155,10 @@ ConstructADDBARsp( *pLength = 0; ConstructMaFrameHdr( - Adapter, - Addr, - ACT_CAT_BA, - ACT_ADDBARSP, + Adapter, + Addr, + ACT_CAT_BA, + ACT_ADDBARSP, &osADDBAFrame ); // Dialog Token @@ -201,10 +201,10 @@ ConstructDELBA( *pLength = 0; ConstructMaFrameHdr( - Adapter, - Addr, - ACT_CAT_BA, - ACT_DELBA, + Adapter, + Addr, + ACT_CAT_BA, + ACT_DELBA, &osDELBAFrame ); // DELBA Parameter Set @@ -215,7 +215,7 @@ ConstructDELBA( FillOctetString(tmp, &ReasonCode, 2); PacketAppendData(&osDELBAFrame, tmp); - *pLength = osDELBAFrame.Length; + *pLength = osDELBAFrame.Length; } VOID @@ -245,7 +245,7 @@ SendADDBAReq( MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } } - + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } @@ -267,17 +267,17 @@ SendADDBARsp( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructADDBARsp( - Adapter, + Adapter, Addr, pBA, - StatusCode, - pBuf->Buffer.VirtualAddress, + StatusCode, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength ); if(pTcb->PacketLength != 0) MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } @@ -300,19 +300,19 @@ SendDELBA( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructDELBA( - Adapter, + Adapter, Addr, pBA, - TxRxSelect, - ReasonCode, - pBuf->Buffer.VirtualAddress, + TxRxSelect, + ReasonCode, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength ); if(pTcb->PacketLength != 0) MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } @@ -347,23 +347,23 @@ OnADDBAReq( StatusCode = ADDBA_STATUS_REFUSED; goto OnADDBAReq_Fail; } - + // Add by hpfan: reject addba when 4-way is not finished - if(pMgntInfo->bWiFiConfg && + if(pMgntInfo->bWiFiConfg && pMgntInfo->SecurityInfo.SecLvl > RT_SEC_LVL_NONE && !SecIsTxKeyInstalled(Adapter, pMgntInfo->Bssid)) { StatusCode = ADDBA_STATUS_REFUSED; goto OnADDBAReq_Fail; } - + // // Search for related traffic stream. // If there is no matched TS, reject the ADDBA request. // if( !GetTs( - Adapter, - (PTS_COMMON_INFO*)(&pTS), - Addr, + Adapter, + (PTS_COMMON_INFO*)(&pTS), + Addr, GET_BA_FRAME_PARAM_SET_TID(mmpdu->Octet), RX_DIR, TRUE) ) @@ -396,11 +396,11 @@ OnADDBAReq( // // Admit the ADDBA Request // - DeActivateBAEntry(Adapter, pBA); + DeActivateBAEntry(Adapter, pBA); PlatformMoveMemory(&(pBA->DialogToken) , GET_BA_FRAME_DIALOG_TOKEN(mmpdu->Octet), 1); PlatformMoveMemory(&(pBA->BaParamSet) , GET_BA_FRAME_PARAM_SET(mmpdu->Octet), 2); - PlatformMoveMemory(&(pBA->BaTimeoutValue), GET_BA_FRAME_TIMEOUT_VALUE(mmpdu->Octet), 2); - PlatformMoveMemory(&(pBA->BaStartSeqCtrl), GET_BAREQ_FRAME_START_SQECTRL(mmpdu->Octet), 2); + PlatformMoveMemory(&(pBA->BaTimeoutValue), GET_BA_FRAME_TIMEOUT_VALUE(mmpdu->Octet), 2); + PlatformMoveMemory(&(pBA->BaStartSeqCtrl), GET_BAREQ_FRAME_START_SQECTRL(mmpdu->Octet), 2); { SET_BA_PARAM_SET_FIELD_BUF_SIZE( &(pBA->BaParamSet), 64); // At least, forced by SPEC @@ -418,7 +418,7 @@ OnADDBAReq( BA_RECORD BA; PlatformMoveMemory(&(BA.BaParamSet), GET_BA_FRAME_PARAM_SET(mmpdu->Octet), 2); PlatformMoveMemory(&(BA.BaTimeoutValue), GET_BA_FRAME_TIMEOUT_VALUE(mmpdu->Octet), 2); - PlatformMoveMemory(&(BA.DialogToken), GET_BA_FRAME_DIALOG_TOKEN(mmpdu->Octet), 1); + PlatformMoveMemory(&(BA.DialogToken), GET_BA_FRAME_DIALOG_TOKEN(mmpdu->Octet), 1); SET_BA_PARAM_SET_FIELD_BA_POLICY(&(BA.BaParamSet), BA_POLICY_IMMEDIATE); SendADDBARsp(Adapter, Addr, &BA, StatusCode); RT_TRACE(COMP_QOS, DBG_LOUD, ("OnADDBAReq(): OnADDBAReq_Fail\n")); @@ -460,15 +460,15 @@ OnADDBARsp( ReasonCode = DELBA_REASON_UNKNOWN_BA; goto OnADDBARsp_Reject; } - + // // Search for related TS. // If there is no TS found, we wil reject ADDBA Rsp by sending DELBA frame. // if (!GetTs( - Adapter, - (PTS_COMMON_INFO*)(&pTS), - Addr, + Adapter, + (PTS_COMMON_INFO*)(&pTS), + Addr, GET_BA_FRAME_PARAM_SET_TID(mmpdu->Octet), TX_DIR, FALSE) ) @@ -515,7 +515,7 @@ OnADDBARsp( { // Since this is a kind of ADDBA failed, we delay next ADDBA process. pTS->bAddBaReqDelayed = TRUE; - + DeActivateBAEntry(Adapter, pAdmittedBA); ReasonCode = DELBA_REASON_END_BA; goto OnADDBARsp_Reject; @@ -529,7 +529,7 @@ OnADDBARsp( PlatformMoveMemory(&(pAdmittedBA->BaTimeoutValue), GET_BA_FRAME_TIMEOUT_VALUE(mmpdu->Octet), 2); PlatformMoveMemory(&(pAdmittedBA->BaStartSeqCtrl), &(pPendingBA->BaStartSeqCtrl), 2); PlatformMoveMemory(&(pAdmittedBA->BaParamSet) , GET_BA_FRAME_PARAM_SET(mmpdu->Octet), 2); - pAdmittedBA->BufferSize = GET_BA_FRAME_PARAM_SET_BUF_SIZE(mmpdu->Octet); + pAdmittedBA->BufferSize = GET_BA_FRAME_PARAM_SET_BUF_SIZE(mmpdu->Octet); if(0 == pAdmittedBA->BufferSize) { @@ -551,7 +551,7 @@ OnADDBARsp( { TDLS_OnAddBaRsp(Adapter, mmpdu); } - + return RT_STATUS_SUCCESS; OnADDBARsp_Reject: @@ -593,18 +593,18 @@ OnDELBA( PRX_TS_RECORD pRxTs; if( !GetTs( - Adapter, - (PTS_COMMON_INFO*)&pRxTs, - Addr, + Adapter, + (PTS_COMMON_INFO*)&pRxTs, + Addr, GET_DELBA_FRAME_PARAM_SET_TID(mmpdu->Octet), RX_DIR, FALSE) ) { return RT_STATUS_FAILURE; } - + //BA Process Error when link with Netgear3500 v1 - //Fix do S3/S4 long run error + //Fix do S3/S4 long run error //by sherry 20101124 if(pMgntInfo->IOTPeer == HT_IOT_PEER_MARVELL) { @@ -619,16 +619,16 @@ OnDELBA( PTX_TS_RECORD pTxTs; if(!GetTs( - Adapter, - (PTS_COMMON_INFO*)&pTxTs, - Addr, + Adapter, + (PTS_COMMON_INFO*)&pTxTs, + Addr, GET_DELBA_FRAME_PARAM_SET_TID(mmpdu->Octet), TX_DIR, FALSE) ) { return RT_STATUS_FAILURE; } - + pTxTs->bUsingBa = FALSE; pTxTs->bAddBaReqInProgress = FALSE; pTxTs->bAddBaReqDelayed = FALSE; @@ -654,13 +654,13 @@ TsInitAddBA( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); RT_TRACE(COMP_QOS, DBG_LOUD, ("=====>TsInitAddBA()\n")); - + if(pBA->bValid==TRUE && bOverwritePending==FALSE) return; // Set parameters to "Pending" variable set DeActivateBAEntry(Adapter, pBA); - + pBA->DialogToken++; // DialogToken: Only keep the latest dialog token SET_BA_PARAM_SET_FIELD_AMSDU_SUPPORT(&(pBA->BaParamSet), 0); // Do not support A-MSDU with A-MPDU now!! SET_BA_PARAM_SET_FIELD_BA_POLICY(&(pBA->BaParamSet), Policy); // Policy: Delayed or Immediate @@ -678,7 +678,7 @@ TsInitAddBA( } pBA->BaTimeoutValue = 0; // Timeout value: Set 0 to disable Timer - SET_BA_START_SQECTRL_FIELD_SEQ_NUM(&(pBA->BaStartSeqCtrl), ((pTS->TxCurSeq) % 4096)); + SET_BA_START_SQECTRL_FIELD_SEQ_NUM(&(pBA->BaStartSeqCtrl), ((pTS->TxCurSeq) % 4096)); ActivateBAEntry(Adapter, pBA, BA_SETUP_TIMEOUT); @@ -687,7 +687,7 @@ TsInitAddBA( if(!ACTING_AS_AP(Adapter)) { // Negoitate with current SeqNum, but active this BA after 3 packets Txed - SET_BA_START_SQECTRL_FIELD_SEQ_NUM(&(pBA->BaStartSeqCtrl), ((pTS->TxCurSeq + 3) % 4096)); + SET_BA_START_SQECTRL_FIELD_SEQ_NUM(&(pBA->BaStartSeqCtrl), ((pTS->TxCurSeq + 3) % 4096)); } } @@ -699,17 +699,17 @@ TsInitDelBA( ) { RT_TRACE(COMP_QOS, DBG_LOUD, ("=====>TsInitDelBA()\n")); - + if(TxRxSelect == TX_DIR) { PTX_TS_RECORD pTxTs = (PTX_TS_RECORD)pTsCommonInfo; if(TxTsDeleteBA(Adapter, pTxTs)) SendDELBA( - Adapter, - pTsCommonInfo->Addr, - (pTxTs->TxAdmittedBARecord.bValid)?(&pTxTs->TxAdmittedBARecord):(&pTxTs->TxPendingBARecord), - TxRxSelect, + Adapter, + pTsCommonInfo->Addr, + (pTxTs->TxAdmittedBARecord.bValid)?(&pTxTs->TxAdmittedBARecord):(&pTxTs->TxPendingBARecord), + TxRxSelect, DELBA_REASON_END_BA ); } else if(TxRxSelect == RX_DIR) @@ -717,10 +717,10 @@ TsInitDelBA( PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)pTsCommonInfo; if(RxTsDeleteBA(Adapter, pRxTs)) SendDELBA( - Adapter, - pTsCommonInfo->Addr, - &pRxTs->RxAdmittedBARecord, - TxRxSelect, + Adapter, + pTsCommonInfo->Addr, + &pRxTs->RxAdmittedBARecord, + TxRxSelect, DELBA_REASON_END_BA ); } } @@ -749,10 +749,10 @@ TxBaInactTimeout( RT_TRACE(COMP_QOS, DBG_LOUD, ("=====>TxBaInactTimeout()\n")); TxTsDeleteBA(Adapter, pTxTs); SendDELBA( - Adapter, - pTxTs->TsCommonInfo.Addr, + Adapter, + pTxTs->TsCommonInfo.Addr, &pTxTs->TxAdmittedBARecord, - TX_DIR, + TX_DIR, DELBA_REASON_TIMEOUT ); } @@ -763,17 +763,17 @@ RxBaInactTimeout( { PADAPTER Adapter = (PADAPTER)pTimer->Adapter; PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)pTimer->Context; - + RT_TRACE(COMP_QOS, DBG_LOUD, ("=====>RxBaInactTimeout()\n")); if(ACTING_AS_AP(Adapter)) return; - + RxTsDeleteBA(Adapter, pRxTs); SendDELBA( - Adapter, - pRxTs->TsCommonInfo.Addr, + Adapter, + pRxTs->TsCommonInfo.Addr, &pRxTs->RxAdmittedBARecord, - RX_DIR, + RX_DIR, DELBA_REASON_TIMEOUT ); } @@ -784,7 +784,7 @@ RxBACheck( POCTET_STRING pFrame ) { - + } // @@ -842,7 +842,7 @@ OnBAReq( { // Basic BlockAckReq BARType = BAR_TYPE_BASIC_BAR; - } + } else if(MultiTID == 0 && CompressedBitmap == 1 && GCR == 0) { // Compressed BlockAckReq @@ -867,7 +867,7 @@ OnBAReq( { // Reserved RT_TRACE(COMP_QOS, DBG_LOUD, ("OnBAReq(): BAR type is reserved.\n")); - + } } else @@ -881,9 +881,9 @@ OnBAReq( // Search for related traffic stream. // if(!GetTs( - Adapter, - (PTS_COMMON_INFO*)(&pTS), - Addr, + Adapter, + (PTS_COMMON_INFO*)(&pTS), + Addr, TIDInfo, RX_DIR, TRUE)) @@ -897,7 +897,7 @@ OnBAReq( PRT_LIST_ENTRY pList = &pTS->RxPendingPktList; // Get BAR Info - pBARFrame += 2; + pBARFrame += 2; StartSeqNum = GET_BAR_PARAM_INFO_FIELD_STARTING_SEQ_NUM(pBARFrame); // Check the last received sequence number @@ -917,7 +917,7 @@ OnBAReq( // // Indicate packets queued in driver for RxReorder and prepare to receive packet from new // new sequence start!! - // + // if(pTS->RxIndicateState==RXTS_INDICATE_BATCH) IndicateRxReorderList(Adapter, pTS, FALSE); else if(pTS->RxIndicateState==RXTS_INDICATE_REORDER) @@ -929,7 +929,7 @@ OnBAReq( RT_TRACE(COMP_QOS, DBG_LOUD, ("OnBAReq(): Update Rx indcate starting sequence (%#X)!!\n", StartSeqNum)); } } - //RT_TRACE(COMP_QOS, DBG_LOUD, ("OnBAReq(): BARAckPolicy=%d, MultiTID=%d, CompressedBitmap=%#X, GCR=%d, TIDInfo=%d, StartSeqNum=%#X\n", + //RT_TRACE(COMP_QOS, DBG_LOUD, ("OnBAReq(): BARAckPolicy=%d, MultiTID=%d, CompressedBitmap=%#X, GCR=%d, TIDInfo=%d, StartSeqNum=%#X\n", // BARAckPolicy, MultiTID, CompressedBitmap, GCR, TIDInfo, StartSeqNum)); } else if(BARType == BAR_TYPE_MULTI_TID_BAR) diff --git a/network/wlan/WDI/COMMON/BssCoexistence.c b/network/wlan/WDI/COMMON/BssCoexistence.c index 9335c634f..ad29e37be 100644 --- a/network/wlan/WDI/COMMON/BssCoexistence.c +++ b/network/wlan/WDI/COMMON/BssCoexistence.c @@ -12,7 +12,7 @@ BSS_ParsingOBSSInfoElement( PRT_WLAN_BSS pBssDesc ) { - pBssDesc->BssHT.OBSSScanInterval = + pBssDesc->BssHT.OBSSScanInterval = GET_OBSS_PARAM_ELE_SCAN_INTERVAL(osFrame.Octet); } @@ -23,7 +23,7 @@ BSS_ParsingBSSCoexistElement( PRT_WLAN_BSS pBssDesc ) { - pBssDesc->BssHT.bdOBSSExemption = + pBssDesc->BssHT.bdOBSSExemption = GET_BSS_COEXISTENCE_ELE_OBSS_EXEMPTION_GRT(osFrame.Octet); } @@ -39,7 +39,7 @@ BSS_AppendExentedCapElement( u1Byte InfoContent[8] = {0}; FillOctetString(Info, InfoContent, sizeof(InfoContent)); - + if(pHTInfo->bBssCoexist) { SET_EXT_CAPABILITY_ELE_BSS_COEXIST(InfoContent, 1); @@ -75,7 +75,7 @@ BSS_AppendBSSCoexistReportElement( // to allocate two layers pointer for array ICS[255][15]. To simplize the problem. We will only // support one dimenssion arry to simulate 2/3/.. layer array as below. // - + pGenBufICS = GetGenTempBuffer (Adapter, 255*15); //ICS = (u1Byte **)pGenBufICS->Buffer.Ptr; ICS = (u1Byte *)pGenBufICS->Buffer.Ptr; @@ -84,7 +84,7 @@ BSS_AppendBSSCoexistReportElement( for (i=0; iNumBssDesc4Query; i++) { pRtBss = pMgntInfo->bssDesc4Query+i; - + if(pRtBss->BssHT.bdSupportHT == FALSE) { //ICS[pRtBss->RegulatoryClass][pRtBss->ChannelNumber]=1; @@ -114,13 +114,13 @@ BSS_AppendBSSCoexistReportElement( { SET_BSS_INTOLERANT_ELE_CHANNEL(InfoContent+k, j); k++; - } - } - } + } + } + } FillOctetString(Info, InfoContent, 2+k-1); //PRINT_DATA("", Info.Octet, Info.Length); PacketMakeElement(posFrame, EID_BSSIntolerantChlReport, Info); - } + } } ReturnGenTempBuffer (Adapter, pGenBufICS); } @@ -145,11 +145,11 @@ ConstructBSSCoexistPacket( *pLength = 0; ConstructMaFrameHdr( - Adapter, - Adapter->MgntInfo.Bssid, - ACT_CAT_PUBLIC, - ACT_PUBLIC_BSSCOEXIST, - &osBSSCOEXISTFrame); + Adapter, + Adapter->MgntInfo.Bssid, + ACT_CAT_PUBLIC, + ACT_PUBLIC_BSSCOEXIST, + &osBSSCOEXISTFrame); if(IS_WIRELESS_MODE_5G(Adapter)) { @@ -159,17 +159,17 @@ ConstructBSSCoexistPacket( { SET_BSS_COEXISTENCE_ELE_FORTY_INTOLERANT(InfoContent, pHTInfo->b40Intolerant); } - + if(TE_B) SET_BSS_COEXISTENCE_ELE_20_WIDTH_REQ(InfoContent, 1); - + FillOctetString(Info, InfoContent, 1); - PacketMakeElement(&osBSSCOEXISTFrame, EID_BSSCoexistence, Info); + PacketMakeElement(&osBSSCOEXISTFrame, EID_BSSCoexistence, Info); if(TE_A) BSS_AppendBSSCoexistReportElement(Adapter, &osBSSCOEXISTFrame); - *pLength = osBSSCOEXISTFrame.Length; + *pLength = osBSSCOEXISTFrame.Length; } @@ -189,8 +189,8 @@ SendBSSCoexistPacket( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructBSSCoexistPacket( - Adapter, - pBuf->Buffer.VirtualAddress, + Adapter, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, TE_A, TE_B @@ -199,8 +199,8 @@ SendBSSCoexistPacket( if(pTcb->PacketLength != 0) MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } RT_STATUS @@ -245,7 +245,7 @@ BSS_OnScanComplete( for (i=0; iNumBssDesc4Query; i++) { pRtBss = pMgntInfo->bssDesc4Query+i; - + if(pRtBss->BssHT.bdSupportHT == FALSE) TE_A = TRUE; else if(pRtBss->BssHT.bd40Intolerant == TRUE) @@ -254,16 +254,16 @@ BSS_OnScanComplete( if(TE_A && TE_B) break; } - + pHTInfo->IdleOBSSScanCnt = 0; curSystemTimeUs = PlatformGetCurrentTime(); // Check the conditions and the interval to send the report (we don't send the report repeatly as soon) if((TE_A || TE_B) && - (0 == pHTInfo->lastTimeSentObssRptUs || + (0 == pHTInfo->lastTimeSentObssRptUs || ((curSystemTimeUs - pHTInfo->lastTimeSentObssRptUs) > ((pHTInfo->CurOBSSScanInterval * 2 / 3) * 1000000)))) - { - RT_TRACE_F(COMP_HT, DBG_LOUD, + { + RT_TRACE_F(COMP_HT, DBG_LOUD, ("SendBSSCoexistPacket() TE_A(%d), TE_B(%d), (curSystemTimeUs - pHTInfo->lastTimeSentObssRptUs) = %d \n", TE_A, TE_B, (u4Byte)(curSystemTimeUs - pHTInfo->lastTimeSentObssRptUs))); pHTInfo->lastTimeSentObssRptUs = curSystemTimeUs; SendBSSCoexistPacket(Adapter, TE_A, TE_B); @@ -293,17 +293,17 @@ BSS_IdleScanWatchDog( PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); u2Byte ObssScanInterfaval = 0; - // Only collect information to associated ap + // Only collect information to associated ap if(!pMgntInfo->mAssoc) return; - + // Only sent message to FC HT AP if(pHTInfo->bCurrentHTSupport == FALSE) return; // We are not in 40MHz else if(!CHNL_RUN_ABOVE_40MHZ(pMgntInfo)) return; - else if(pHTInfo->bBssCoexist == FALSE || pHTInfo->bPeerBssCoexistence == FALSE) + else if(pHTInfo->bBssCoexist == FALSE || pHTInfo->bPeerBssCoexistence == FALSE) return; else if(pHTInfo->bCurOBSSScanExemptionGrt == TRUE) return; @@ -311,7 +311,7 @@ BSS_IdleScanWatchDog( return; else if(pMgntInfo->LinkDetectInfo.bHigherBusyTraffic) return; - + // We don't want the scan interval too small. // By Bruce, 2011-07-28. if(pHTInfo->CurOBSSScanInterval < RT_OBSS_MIN_TRIGGER_SCAN_INTERVAL) @@ -325,7 +325,7 @@ BSS_IdleScanWatchDog( { RT_TRACE_F(COMP_HT, DBG_LOUD, ("Reaches the OBSS scan interval, start to scan....\n")); pHTInfo->IdleOBSSScanCnt = 0; - + MgntActSet_802_11_BSSID_LIST_SCAN(pAdapter); } } diff --git a/network/wlan/WDI/COMMON/CcxGen.h b/network/wlan/WDI/COMMON/CcxGen.h index a268c2403..129229926 100644 --- a/network/wlan/WDI/COMMON/CcxGen.h +++ b/network/wlan/WDI/COMMON/CcxGen.h @@ -113,19 +113,19 @@ CCX_VerifyRxMFP_MHDRIE( //------------------------------------------------------------------------------ // Layer 2 roaming routines. //------------------------------------------------------------------------------ -VOID +VOID CCX_ClearAdjacentApReport( IN PADAPTER pAdapter ); -VOID +VOID CCX_UpdateAdjacentApReport( IN PADAPTER pAdapter ); VOID CCX_SendAdjacentApReport( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); unsigned int @@ -169,10 +169,10 @@ CCX_TryToRoam( VOID CCX_SendNeighborPoll( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); //------------------------------------------------------------------------------ -// Link Test. +// Link Test. //------------------------------------------------------------------------------ u4Byte CCX_OnLinkTestRequest( @@ -233,7 +233,7 @@ VOID CCX_AddLinkTestReply( IN PADAPTER Adapter, IN u2Byte SeqNo, - IN u2Byte FrameNumber + IN u2Byte FrameNumber ); PRT_LT_REP_RETRY @@ -351,7 +351,7 @@ CCX_FlushAllTs( //------------------------------------------------------------------------------ // -//Description: +//Description: // Follow an SSIDInfo to Construct BSS //Input : // pSSIDInfo : an SSID entry of SSIDL @@ -374,8 +374,8 @@ CCX_GetSSIDLToBssList( // -// Description: -// Constr New Beacon for Indic to WZC to Pass check +// Description: +// Constr New Beacon for Indic to WZC to Pass check // // Input : // pSSIDInfo : an SSID entry of SSIDL ( Connect SSID name ) @@ -447,7 +447,7 @@ CCX_ConstructQosDELTSPacket( OUT POCTET_STRING osDelTs ); -VOID +VOID CCX_MgntLinkKeepAlive( IN PADAPTER pAdapter ); @@ -493,7 +493,7 @@ BOOLEAN CCX_QosReturnAllPendingTxMsdu( IN PADAPTER Adapter ); - + BOOLEAN CCX_ParseRfd( IN PADAPTER Adapter, @@ -701,7 +701,7 @@ CCX_AppendAssocRspCCKMIE( #define CCX_SetCCKMTimeStamp(Adapter, TimeStamp) #define CCX_MlmeAssociateRequest(Adapter) (FALSE) #define CCX_CellPowerLimit(Adapter, channel, rate, pTxPower) -#define CCX_UpdateUsedTime(Adapter) +#define CCX_UpdateUsedTime(Adapter) #define CCX_SSIDLUpdateJoinBss(_pAdapter, _pRfd, pBssDesc) (RT_STATUS_NOT_SUPPORT) #define CCX_AppendAssocReqCCKMIE(_pAdapter, _pBuffer, _pOutputLen) (RT_STATUS_NOT_SUPPORT) #define CCX_AppendAssocRspCCKMIE(_pAdapter, _pBuffer, _pOutputLen) (RT_STATUS_NOT_SUPPORT) diff --git a/network/wlan/WDI/COMMON/ChannelInfo.c b/network/wlan/WDI/COMMON/ChannelInfo.c index 40ec119b3..526d48183 100644 --- a/network/wlan/WDI/COMMON/ChannelInfo.c +++ b/network/wlan/WDI/COMMON/ChannelInfo.c @@ -4,7 +4,7 @@ #include "ChannelInfo.tmh" #endif -u1Byte +u1Byte CHNL_GetCenterFrequency( IN u1Byte Channel, IN CHANNEL_WIDTH ChnlBW, @@ -60,7 +60,7 @@ CHNL_GetExt20OffsetOf5G( ExtChnlOffset = EXTCHNL_OFFSET_UPPER; RT_DISP(FCHNL, FCHNL_INFO, ("%s channel=%d, ExtChnlOffset=%d\n", __FUNCTION__, channel, ExtChnlOffset)); - + return ExtChnlOffset; } @@ -76,13 +76,13 @@ CHNL_IsLegalChannel( RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL_LIST, NULL, &pChanneList); - //Skip check legal channel when doing fast USB switch, since we only have one channel in channel list, 20150408, Sean. + //Skip check legal channel when doing fast USB switch, since we only have one channel in channel list, 20150408, Sean. if (pChanneList->ChannelLen == 1) { return (u1Byte)freq_channel; } - + for(i = 0; i < pChanneList->ChannelLen; i ++) { if(freq_channel == pChanneList->ChnlListEntry[i].ChannelNum) @@ -102,13 +102,13 @@ CHNL_IsLegalChannel( } -BOOLEAN +BOOLEAN CHNL_IsLegal5GChannel( IN PADAPTER Adapter, IN u1Byte channel ) { - + u1Byte i=0; u1Byte Channel_5G[45] = {36,38,40,42,44,46,48,50,52,54,56,58, 60,62,64,100,102,104,106,108,110,112,114,116,118,120,122, @@ -153,7 +153,7 @@ CHNL_ReleaseOpLock( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_CHANNEL_INFO pChnlInfo = pMgntInfo->pChannelInfo; - + PlatformAcquireSpinLock(Adapter, RT_CHNLOP_SPINLOCK); pChnlInfo->ChnlOp = CHNLOP_NONE; PlatformReleaseSpinLock(Adapter, RT_CHNLOP_SPINLOCK); @@ -162,13 +162,13 @@ CHNL_ReleaseOpLock( BOOLEAN CHNL_ValidForWirelessMode( - u1Byte channel, + u1Byte channel, u2Byte wirelessmode ) -{ +{ BOOLEAN ret = FALSE; - + do { if(IS_5G_WIRELESS_MODE(wirelessmode) && channel > 14) @@ -176,7 +176,7 @@ CHNL_ValidForWirelessMode( ret = TRUE; break; } - + if(IS_24G_WIRELESS_MODE(wirelessmode) && channel <= 14) { ret = TRUE; @@ -206,10 +206,10 @@ CHNL_GetRegBWSupport( else if(IS_WIRELESS_MODE_5G(Adapter)) retBW = (pHTInfo->bRegBW40MHzFor5G ? CHANNEL_WIDTH_40:CHANNEL_WIDTH_20) ; } - else + else retBW = pChnlInfo->RegBWSetting; - - + + return retBW; } @@ -245,7 +245,7 @@ chnl_GetBWFrom_IE( ChnlBW = CHANNEL_WIDTH_20; else // 40 STA -> 40 AP { - if( PeerExtChnlOffset == EXTCHNL_OFFSET_UPPER && + if( PeerExtChnlOffset == EXTCHNL_OFFSET_UPPER && CHNL_IsLegalChannel(Adapter, pMgntInfo->dot11CurrentChannelNumber + 2)) bBW40MHz = TRUE; else if(PeerExtChnlOffset== EXTCHNL_OFFSET_LOWER && @@ -258,7 +258,7 @@ chnl_GetBWFrom_IE( { ChnlBW = PeerChnlBW; ExtChnlOffset = PeerExtChnlOffset; - } + } else { ChnlBW = CHANNEL_WIDTH_20; @@ -270,7 +270,7 @@ chnl_GetBWFrom_IE( else ChnlBW = CHANNEL_WIDTH_20; - + if(bBW40MHz && pVHTInfo->bCurrentVHTSupport) { bBW80MHz = (CHNL_GetRegBWSupport(Adapter) >= CHANNEL_WIDTH_80)?(pVHTInfo->PeerChnlBW?1:0):0; @@ -293,7 +293,7 @@ CHNL_ChangeBwChnlFromPeerWorkitemCallBack( IN PVOID Context ) { - PADAPTER Adapter = (PADAPTER)Context; + PADAPTER Adapter = (PADAPTER)Context; CHANNEL_WIDTH ChnlBW; EXTCHNL_OFFSET ExtChnlOffset; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; @@ -328,17 +328,17 @@ CHNL_ChangeBwChnlFromPeerWorkitemCallBack( return; } } - + #if 0 if(GetDefaultAdapter(Adapter)->bInHctTest) { RT_DISP(FCHNL, FCHNL_ERROR, ("%s: hct test , return \n", __FUNCTION__)); return; - + } -#endif +#endif + - chnl_GetBWFrom_IE(Adapter, &ChnlBW, &ExtChnlOffset); if( pChnlInfo->CurrentChannelBandWidth != ChnlBW || @@ -353,8 +353,8 @@ CHNL_ChangeBwChnlFromPeerWorkitemCallBack( pMgntInfo->dot11CurrentChannelNumber, ChnlBW, ExtChnlOffset)); CHNL_SetBwChnl(Adapter, pMgntInfo->dot11CurrentChannelNumber, ChnlBW, ExtChnlOffset); - // We should set RA H2C cmd because the BW in TxDesc will be filled again by Fw, we - // need to inform Fw the BW changed information. 2012.11.26. by tynli. + // We should set RA H2C cmd because the BW in TxDesc will be filled again by Fw, we + // need to inform Fw the BW changed information. 2012.11.26. by tynli. // Suggested by SD1 Alex Chou. if(!ACTING_AS_AP(Adapter) && !ACTING_AS_IBSS(Adapter)) { @@ -396,8 +396,8 @@ CHNL_GetCurrnetChnlInfo( { *pBufLen = 4; return FALSE; - } - + } + *pBufLen = 4; *pBuf = pChnlInfo->CurrentChannelBandWidth; @@ -407,7 +407,7 @@ CHNL_GetCurrnetChnlInfo( return TRUE; } - + VOID @@ -437,9 +437,9 @@ chnl_HalSwBwChnl( { u1Byte offset; - Mgnt_SwChnl(Adapter, pChnlCommInfo->CurrentChannelCenterFrequency, 1); + Mgnt_SwChnl(Adapter, pChnlCommInfo->CurrentChannelCenterFrequency, 1); - // last bandwidth offset + // last bandwidth offset if(pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER) offset = EXTCHNL_OFFSET_LOWER; else if (pHalData->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_LOWER) @@ -447,7 +447,7 @@ chnl_HalSwBwChnl( else offset = EXTCHNL_OFFSET_NO_EXT; // 1.20M to 40M or 40M to 20M - // 2.40M to 40M as offset different or bandtype different + // 2.40M to 40M as offset different or bandtype different if( (pHalData->CurrentChannelBW != pChnlCommInfo->CurrentChannelBandWidth )|| (pHalData->CurrentChannelBW == CHANNEL_WIDTH_40 && pChnlCommInfo->Ext20MHzChnlOffsetOf40MHz !=offset) || (pHalData->LastBandType !=pHalData->CurrentBandType)) @@ -457,12 +457,12 @@ chnl_HalSwBwChnl( pChnlCommInfo->CurrentChannelBandWidth, pChnlCommInfo->Ext20MHzChnlOffsetOf40MHz ); - } + } } - + FunctionOut(COMP_SCAN); -} +} VOID @@ -480,12 +480,12 @@ CHNL_SetBwChnlCallback( if(RT_DRIVER_HALT(Adapter)) { - RT_DISP(FCHNL, FCHNL_ERROR, ("<===%s bDriverStopped %d bSurpriseRemoved %d bDriverIsGoingToUnload %d\n", __FUNCTION__, Adapter->bDriverStopped, Adapter->bSurpriseRemoved, Adapter->bDriverIsGoingToUnload)); + RT_DISP(FCHNL, FCHNL_ERROR, ("<===%s bDriverStopped %d bSurpriseRemoved %d bDriverIsGoingToUnload %d\n", __FUNCTION__, Adapter->bDriverStopped, Adapter->bSurpriseRemoved, Adapter->bDriverIsGoingToUnload)); return; } if(Adapter->bInSetPower && RT_CANNOT_IO(Adapter)) - + { RT_DISP(FCHNL, FCHNL_ERROR, ("<===%s can NOT IO\n", __FUNCTION__)); bSwBW = FALSE; @@ -493,10 +493,10 @@ CHNL_SetBwChnlCallback( if(MgntResetOrPnPInProgress(Adapter)) { - RT_DISP(FCHNL, FCHNL_ERROR, ("<===%s MgntResetOrPnPInProgress\n", __FUNCTION__)); + RT_DISP(FCHNL, FCHNL_ERROR, ("<===%s MgntResetOrPnPInProgress\n", __FUNCTION__)); bSwBW = FALSE; } - + if(bSwBW == FALSE) { PlatformAcquireSpinLock(Adapter, RT_BW_SPINLOCK); @@ -504,18 +504,18 @@ CHNL_SetBwChnlCallback( PlatformReleaseSpinLock(Adapter, RT_BW_SPINLOCK); return; } - + if(MgntInitAdapterInProgress(pMgntInfo)) { PlatformSetTimer(Adapter, &pChnlInfo->SwBwTimer, 100); return; } - + if(RT_IsSwChnlAndBwInProgress(Adapter)) - { - RT_DISP(FCHNL, FCHNL_FUN, ("<===%s pHalData->SwChnlInProgress: %d, pHalData->SetBWModeInProgress: %d, pHalData->bSwChnlAndSetBWInProgress: %d\n", + { + RT_DISP(FCHNL, FCHNL_FUN, ("<===%s pHalData->SwChnlInProgress: %d, pHalData->SetBWModeInProgress: %d, pHalData->bSwChnlAndSetBWInProgress: %d\n", __FUNCTION__, pHalData->SwChnlInProgress, pHalData->SetBWModeInProgress, pHalData->bSwChnlAndSetBWInProgress)); - + PlatformSetTimer(Adapter, &pChnlInfo->SwBwTimer, 10); return; } @@ -526,7 +526,7 @@ CHNL_SetBwChnlCallback( PlatformSetTimer(Adapter, &pChnlInfo->SwBwTimer, 10); return; } - + if(!CHNL_AcquireOpLock(Adapter, CHNLOP_SWBW)) { PlatformSetTimer(Adapter, &pChnlInfo->SwBwTimer, 10); @@ -543,29 +543,29 @@ CHNL_SetBwChnlCallback( } PlatformAcquireSpinLock(Adapter, RT_BW_SPINLOCK); - pChnlInfo->bSwBwInProgress = TRUE; + pChnlInfo->bSwBwInProgress = TRUE; PlatformReleaseSpinLock(Adapter, RT_BW_SPINLOCK); chnl_HalSwBwChnl(Adapter); - - // bandtype different only occur in 92d ; for 92c/92s last band type is the same as current band type - pHalData->LastBandType = pHalData->CurrentBandType; + + // bandtype different only occur in 92d ; for 92c/92s last band type is the same as current band type + pHalData->LastBandType = pHalData->CurrentBandType; PlatformAcquireSpinLock(Adapter, RT_BW_SPINLOCK); pChnlInfo->bSwBwInProgress = FALSE; PlatformReleaseSpinLock(Adapter, RT_BW_SPINLOCK); - CHNL_ReleaseOpLock(Adapter); - + CHNL_ReleaseOpLock(Adapter); + RT_DISP(FCHNL, FCHNL_FUN, ("<===%s\n", __FUNCTION__)); } CHANNEL_WIDTH CHNL_CheckChnlPlanWithBW( IN PADAPTER pAdapter, - IN u1Byte PrimaryChnl, - IN CHANNEL_WIDTH Bandwidth, - IN EXTCHNL_OFFSET BwOffset + IN u1Byte PrimaryChnl, + IN CHANNEL_WIDTH Bandwidth, + IN EXTCHNL_OFFSET BwOffset ) { CHANNEL_WIDTH finalBw = CHANNEL_WIDTH_20; @@ -624,7 +624,7 @@ CHNL_CheckChnlPlanWithBW( { bFind =TRUE; findcnt =0; - break; + break; } } @@ -634,7 +634,7 @@ CHNL_CheckChnlPlanWithBW( { // remove, advised by Bryant, this will cause IOT issue with TP link Ap // TP link will be 40MHz, but NIC is 20MHz => problem. -#if 0 +#if 0 if( BT_1Ant(pAdapter) && BT_IsBtLinkExist(pAdapter) && IS_WIRELESS_MODE_24G(pAdapter) ) { @@ -645,10 +645,10 @@ CHNL_CheckChnlPlanWithBW( { if(bFind) finalBw = CHANNEL_WIDTH_40; - else + else finalBw = CHANNEL_WIDTH_20; } - } + } return finalBw; } @@ -667,7 +667,7 @@ CHNL_SetBwChnl( { PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; PRT_CHANNEL_INFO pChnlInfo = GET_CHNL_INFO(pMgntInfo); - + PADAPTER DefAdapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pDefMgntInfo = &DefAdapter->MgntInfo; PRT_CHANNEL_INFO pDefChnlInfo = GET_CHNL_INFO(pDefMgntInfo); @@ -695,12 +695,12 @@ CHNL_SetBwChnl( ToSetBandWidth = Bandwidth; ToSTAExtChnlOffsetof40MHz = BwOffset; ToSTACenterFrequency = CHNL_GetCenterFrequency(PrimaryChnl, Bandwidth, BwOffset); - + ToSetBandWidth = CHNL_CheckChnlPlanWithBW(pAdapter,PrimaryChnl,Bandwidth,BwOffset); if((ToSetBandWidth != Bandwidth) && ToSetBandWidth==CHANNEL_WIDTH_20) ToSTACenterFrequency =PrimaryChnl; - + if(Bandwidth == CHANNEL_WIDTH_80) { if(ToSTACenterFrequency > pMgntInfo->dot11CurrentChannelNumber) @@ -708,7 +708,7 @@ CHNL_SetBwChnl( else if(ToSTACenterFrequency < pMgntInfo->dot11CurrentChannelNumber) ToSTAExtChnlOffsetof80MHz = EXTCHNL_OFFSET_LOWER; else - ToSTAExtChnlOffsetof80MHz = EXTCHNL_OFFSET_NO_EXT; + ToSTAExtChnlOffsetof80MHz = EXTCHNL_OFFSET_NO_EXT; } RT_DISP(FCHNL, FCHNL_FUN, ("Set ToSetBandWidth = %d, ToSTAExtChnlOffset = %d,ToSTAExtChnlOffsetof80MHz %d, ToSTACenterFrequency= %d \n", ToSetBandWidth, ToSTAExtChnlOffsetof40MHz,ToSTAExtChnlOffsetof80MHz,ToSTACenterFrequency)); @@ -723,7 +723,7 @@ CHNL_SetBwChnl( // TODO: 2007.7.13 by Emily Wait 2000ms in order to garantee that switching // bandwidth is executed after scan is finished. It is a temporal solution // because software should ganrantee the last operation of switching bandwidth - // is executed properlly. + // is executed properlly. if(!(RT_DRIVER_HALT(DefAdapter))) PlatformSetTimer(DefAdapter, &pDefChnlInfo->SwBwTimer, 0); @@ -746,9 +746,9 @@ CHNL_SetChnlInfoFromDestPort( pDestMgntInfo->dot11CurrentChannelNumber = pSrcMgntInfo->dot11CurrentChannelNumber; pDestMgntInfo->dot11CurrentChannelBandWidth = pSrcMgntInfo->dot11CurrentChannelBandWidth; - // Best way is restart AP mode. 2012.01.08 lanhsin. + // Best way is restart AP mode. 2012.01.08 lanhsin. //pDestMgntInfo->CurrentBssWirelessMode = pDestMgntInfo->dot11CurrentWirelessMode = pSrcMgntInfo->dot11CurrentWirelessMode; - + pDestChnlInfo->PrimaryChannelNumber = pSrcChnlInfo->PrimaryChannelNumber; pDestChnlInfo->CurrentChannelBandWidth = pSrcChnlInfo->CurrentChannelBandWidth; pDestChnlInfo->CurrentChannelCenterFrequency = pSrcChnlInfo->CurrentChannelCenterFrequency; @@ -756,7 +756,7 @@ CHNL_SetChnlInfoFromDestPort( pDestChnlInfo->Ext20MHzChnlOffsetOf40MHz = pSrcChnlInfo->Ext20MHzChnlOffsetOf40MHz; pDestChnlInfo->Ext40MHzChnlOffsetOf80MHz = pSrcChnlInfo->Ext40MHzChnlOffsetOf80MHz; - RT_DISP(FCHNL, FCHNL_FUN, ("%s: pDestChnlInfo->CurrentChannelCenterFrequency=%d, pSrcChnlInfo->CurrentChannelCenterFrequency=%d\n", + RT_DISP(FCHNL, FCHNL_FUN, ("%s: pDestChnlInfo->CurrentChannelCenterFrequency=%d, pSrcChnlInfo->CurrentChannelCenterFrequency=%d\n", __FUNCTION__, pDestChnlInfo->CurrentChannelCenterFrequency, pSrcChnlInfo->CurrentChannelCenterFrequency)); } @@ -813,7 +813,7 @@ RT_GetChannelNumber( RT_TRACE_F(COMP_SCAN, DBG_WARNING, ("[WARNING] Get hw channel = 0 by HW_VAR_CUR_CENTER_CHNL, access hal directly = %d\n", hwCenterChannel)); } - + if(((GetDefaultAdapter(pAdapter)->pPortCommonInfo->pChnlCommInfo->CurrentChannelCenterFrequency) == hwCenterChannel)) { return (GetDefaultAdapter(pAdapter)->pPortCommonInfo->pChnlCommInfo->PrimaryChannelNumber); diff --git a/network/wlan/WDI/COMMON/ChannelInfo.h b/network/wlan/WDI/COMMON/ChannelInfo.h index 787cc9d1e..ad6cb10ee 100644 --- a/network/wlan/WDI/COMMON/ChannelInfo.h +++ b/network/wlan/WDI/COMMON/ChannelInfo.h @@ -10,11 +10,11 @@ #define CHNL_RUN_ABOVE_40MHZ(_pMgntInfo) \ (((_pMgntInfo)->dot11CurrentChannelBandWidth >= CHANNEL_WIDTH_40)?TRUE:FALSE) - + #define CHNL_RUN_ABOVE_80MHZ(_pMgntInfo) \ (((_pMgntInfo)->dot11CurrentChannelBandWidth >= CHANNEL_WIDTH_80)?TRUE:FALSE) -u1Byte +u1Byte CHNL_GetCenterFrequency( IN u1Byte Channel, IN CHANNEL_WIDTH ChnlBW, @@ -35,7 +35,7 @@ CHNL_IsLegalChannel( ); -BOOLEAN +BOOLEAN CHNL_IsLegal5GChannel( IN PADAPTER Adapter, IN u1Byte channel @@ -94,9 +94,9 @@ CHNL_SetBwChnlCallback( CHANNEL_WIDTH CHNL_CheckChnlPlanWithBW( IN PADAPTER pAdapter, - IN u1Byte PrimaryChnl, - IN CHANNEL_WIDTH Bandwidth, - IN EXTCHNL_OFFSET BwOffset + IN u1Byte PrimaryChnl, + IN CHANNEL_WIDTH Bandwidth, + IN EXTCHNL_OFFSET BwOffset ); diff --git a/network/wlan/WDI/COMMON/CustomizedScan.c b/network/wlan/WDI/COMMON/CustomizedScan.c index 50b788e8a..9fe8b4484 100644 --- a/network/wlan/WDI/COMMON/CustomizedScan.c +++ b/network/wlan/WDI/COMMON/CustomizedScan.c @@ -30,7 +30,7 @@ static const char *req_sig = "CUSTOM_SCAN_REQ"; ? (__req)->timeBound - CUSTOM_SCAN_TERM_SCAN_BUF_MS\ : (__req)->timeBound\ ) - + #define CUSTOM_SCAN_TIME_DUE(__req) (0 < (__req)->timeBound && CUSTOM_SCAN_ALLOW_TIME(__req) <= CUSTOM_SCAN_ELAPSE_TIME(__req)) #define CHNL_ENTRY_EXT_FLAG_CHNL_SHUT BIT0 @@ -38,7 +38,7 @@ static const char *req_sig = "CUSTOM_SCAN_REQ"; typedef struct _CHNL_ENTRY_EXT { RT_LIST_ENTRY list; - + // super RT_CHNL_LIST_ENTRY super; @@ -64,9 +64,9 @@ typedef struct _CUSTOM_SCAN_REQ CUSTOM_SCAN_STATE state; u8Byte stateTime; - // force passive scan + // force passive scan BOOLEAN bForcePassive; - + // probe req FRAME_BUF probeReqBuf; u1Byte probeReqRsvd[CUSTOMIZED_SCAN_MAX_FRAME_LEN]; @@ -146,7 +146,7 @@ typedef struct _CUSTOM_SCAN_INFO u1Byte scanChnlListLen; BOOLEAN bWorkerExited; - + }CUSTOM_SCAN_INFO; //----------------------------------------------------------------------------- @@ -213,19 +213,19 @@ customscan_InitReq( ) { PlatformZeroMemory(req, sizeof(*req)); - + RTInitializeListHead(&req->list); req->sig = req_sig; req->flag = 0; req->type = CUSTOM_SCAN_SRC_TYPE_UNSPECIFIED; req->state = CUSTOM_SCAN_STATE_IDLE; FrameBuf_Init(sizeof(req->probeReqRsvd), 0, req->probeReqRsvd, &req->probeReqBuf); - + RTInitializeListHead(&req->chnlListQ); req->chnlListCnt = 0; - Pool_Init(&req->chnlEntryPool, "chnl entry pool", sizeof(req->chnlEntryPoolRsvd), - req->chnlEntryPoolRsvd, sizeof(req->chnlEntryPoolRsvd[0]), + Pool_Init(&req->chnlEntryPool, "chnl entry pool", sizeof(req->chnlEntryPoolRsvd), + req->chnlEntryPoolRsvd, sizeof(req->chnlEntryPoolRsvd[0]), BIT45, DBG_LOUD); req->cbCtx = NULL; @@ -238,7 +238,7 @@ customscan_InitReq( req->curChnl = NULL; req->repeatCount = 1; - + return; } @@ -317,7 +317,7 @@ customscan_GetScanChnlInDrvChnlList( ) { u4Byte itChnl = 0; - + for(itChnl = 0; itChnl < chnlListLen; itChnl++) { if(pChnlList[itChnl]->ChannelNum == chnl) @@ -333,7 +333,7 @@ customscan_ScanStateTxt( IN CUSTOM_SCAN_STATE state ) { - switch (state) + switch (state) { case CUSTOM_SCAN_STATE_IDLE: return "idle"; @@ -366,7 +366,7 @@ customscan_SrcTypeTxt( IN CUSTOM_SCAN_SRC_TYPE type ) { - switch (type) + switch (type) { case CUSTOM_SCAN_SRC_TYPE_SYS: return "sys"; @@ -389,9 +389,9 @@ customscan_DumpChnlExt( IN u4Byte dbgLevel ) { - RT_TRACE(COMP_SCAN, DBG_LOUD, ("chnl: %u, active: %u, duration: %u, flag: 0x%08X\n", - chnlExt->super.ChannelNum, - SCAN_ACTIVE == chnlExt->super.ScanType, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("chnl: %u, active: %u, duration: %u, flag: 0x%08X\n", + chnlExt->super.ChannelNum, + SCAN_ACTIVE == chnlExt->super.ScanType, chnlExt->super.ScanPeriod, chnlExt->flag )); @@ -438,7 +438,7 @@ customscan_DumpReqQ( RT_LIST_ENTRY *pEntry = NULL; RT_TRACE(COMP_SCAN, DBG_LOUD, ("reqQ: %u\n", info->reqCnt)); - + RtEntryListForEach(&info->reqQ, pEntry) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("req:\n")); @@ -483,11 +483,11 @@ customscan_TerminateCurrentChnl( if(!CUSTOM_SCAN_PROCESSING_REQ(info)) return RT_STATUS_INVALID_STATE; - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("req: %s, state: %s\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("req: %s, state: %s\n", info->pCurReq->typeInfo, customscan_ScanStateTxt(info->pCurReq->state))); - + if(CUSTOM_SCAN_STATE_DWELL == info->pCurReq->state) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("terminating cur req on chnl\n")); @@ -529,7 +529,7 @@ customscan_FreeDanglingReq( bFreed = TRUE; }while(FALSE); - + return bFreed; } @@ -546,14 +546,14 @@ customscan_TerminateCurrentReq( if(!CUSTOM_SCAN_PROCESSING_REQ(info)) return RT_STATUS_INVALID_STATE; - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("req: %s, state: %s, ScanStep: %u\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("req: %s, state: %s, ScanStep: %u\n", info->pCurReq->typeInfo, customscan_ScanStateTxt(info->pCurReq->state), pAdapter->MgntInfo.ScanStep ) ); - + if(CUSTOM_SCAN_STATE_SW_CHNL == info->pCurReq->state || CUSTOM_SCAN_STATE_DWELL == info->pCurReq->state || CUSTOM_SCAN_STATE_STARTED == info->pCurReq->state @@ -566,10 +566,10 @@ customscan_TerminateCurrentReq( { ADAPTER *pda = GetDefaultAdapter(pAdapter); ADAPTER *pla = pda; - u1Byte curChnl = RT_GetChannelNumber(pla); + u1Byte curChnl = RT_GetChannelNumber(pla); EXTCHNL_OFFSET hwBW40MOffset = EXTCHNL_OFFSET_NO_EXT; EXTCHNL_OFFSET hwBW80MOffset = EXTCHNL_OFFSET_NO_EXT; - + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_BW40MHZ_EXTCHNL, (pu1Byte)(&hwBW40MOffset)); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_BW80MHZ_EXTCHNL, (pu1Byte)(&hwBW80MOffset)); @@ -592,14 +592,14 @@ customscan_TerminateCurrentReq( { pda->MgntInfo.SettingBeforeScan.ChannelBandwidth = CHANNEL_WIDTH_20; } - + pla->MgntInfo.SettingBeforeScan.CenterFrequencyIndex1 = CHNL_GetCenterFrequency( pda->MgntInfo.SettingBeforeScan.ChannelNumber, pda->MgntInfo.SettingBeforeScan.ChannelBandwidth, - pda->MgntInfo.SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz); + pda->MgntInfo.SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz); pla = GetNextExtAdapter(pla); } - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("to stop on chnl: %u\n", curChnl)); } @@ -623,13 +623,13 @@ customscan_TerminateCurrentReq( && TEST_FLAG(info->pCurReq->flag, CUSTOM_SCAN_REQ_FLAG_RESET) ) { - // Previously in terminating state because of scan reset - // and now the req is to be terminated again (aborted by OS) + // Previously in terminating state because of scan reset + // and now the req is to be terminated again (aborted by OS) // before ScanComplete is invoked. RT_TRACE(COMP_SCAN, DBG_LOUD, ("%s(): req %s is in terminating state and reset flag set, free it\n", __FUNCTION__, info->pCurReq->typeInfo)); customscan_FreeDanglingReq(info); } - + else { RT_ASSERT(TRUE, ("invalid req state: %s\n", customscan_ScanStateTxt(info->pCurReq->state))); @@ -646,20 +646,20 @@ customscan_RequeueCurReq( ) { size_t it = 0; - + FunctionIn(COMP_SCAN); - + customscan_SetReqState(info, info->pCurReq, CUSTOM_SCAN_STATE_DEFERRED); SET_FLAG(info->pCurReq->flag, CUSTOM_SCAN_REQ_FLAG_REQUEUED); - for(it = 0; - it < sizeof(info->pCurReq->chnlEntryPoolRsvd) / sizeof(info->pCurReq->chnlEntryPoolRsvd[0]); + for(it = 0; + it < sizeof(info->pCurReq->chnlEntryPoolRsvd) / sizeof(info->pCurReq->chnlEntryPoolRsvd[0]); it++ ) { info->pCurReq->chnlEntryPoolRsvd[it].flag = 0; } info->pCurReq->curChnl = NULL; - + RTInsertHeadListWithCnt(&info->reqQ, &info->pCurReq->list, &info->reqCnt); info->pCurReq = NULL; @@ -698,17 +698,17 @@ customscan_InvokeMgntLinkReq( ) { BOOLEAN bScanStarted = FALSE; - + // // Formerly, system scan comes from N6CSet_DOT11_SCAN_REQUEST and may // be called directly down to ScanCallback if timeout specified is 0, // and if scan is rejected by MgntLinkRequest (or the function it calls) // N6CSet_DOT11_SCAN_REQUEST does not try to handle this. - // So for N6CSet_DOT11_SCAN_REQUEST, it is safe to simply call - // MgntLinkRequest here and don't care about indicate scan complete at + // So for N6CSet_DOT11_SCAN_REQUEST, it is safe to simply call + // MgntLinkRequest here and don't care about indicate scan complete at // all. - // - + // + MgntLinkRequest( info->pAdapter, TRUE, //bScanOnly @@ -728,25 +728,25 @@ customscan_InvokeMgntLinkReq( // // Note: the following code handles the cases scan is not actually started // and we need to free the custom scan req. - // + // // pCurReq may be NULL: // After MgntLinkRequest, pCurReq may have been freed by the scan time check - // mechanism (pMgntInfo->bCheckScanTime). In this case, the req is safely + // mechanism (pMgntInfo->bCheckScanTime). In this case, the req is safely // freed (or requeued if repeat count is not 0) in CustomScan_ScanCompleteCb. // // MgntLinkRequest rescheduled: - // If MgntLinkRequest is rescheduled via MgntLinkRequestReschedule, it + // If MgntLinkRequest is rescheduled via MgntLinkRequestReschedule, it // will be called again when RF is turned on in InactivePsTimerCallback. - // In this case, we leave the custom scan req as the cur req and it will + // In this case, we leave the custom scan req as the cur req and it will // be activated again when RF is on. // // If scan request is rejected by MgntLinkRequest non rescheduled cases or // ScanByTimer, we need to free the request here. - // + // // If scan request is rejected by ScanCallback (and note that the scan timer // is not set again when returned), such as MgntResetOrPnPInProgress, we are // not able to detect that here, and the state of the custom scan req is left - // as starting and will be recycled by the worker if the state time exceeds + // as starting and will be recycled by the worker if the state time exceeds // CUSTOM_SCAN_MAX_TIME_WAIT_SCAN_STARTED_MS. // @@ -803,8 +803,8 @@ customscan_WorkerCb( if(customscan_LinkInProgress(info)) { - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("skip and wait %u ms for link in progress\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("skip and wait %u ms for link in progress\n", CUSTOM_SCAN_WAIT_LINK_DONE_MS)); PlatformSleepUs(CUSTOM_SCAN_WAIT_LINK_DONE_MS * 1000); PlatformSetEventToTrigerThread(info->pAdapter, &info->worker); @@ -843,7 +843,7 @@ customscan_WorkerCb( customscan_Unlock(info); FunctionOut(COMP_SCAN); return; - } + } } } @@ -856,8 +856,8 @@ customscan_WorkerCb( } else { - RT_ASSERT(NULL == info->pCurReq, - ("%s(): there's ongoing custom req %s when scan in progress is false, state: %s\n", + RT_ASSERT(NULL == info->pCurReq, + ("%s(): there's ongoing custom req %s when scan in progress is false, state: %s\n", __FUNCTION__, info->pCurReq->typeInfo, customscan_ScanStateTxt(info->pCurReq->state))); } @@ -865,7 +865,7 @@ customscan_WorkerCb( FunctionOut(COMP_SCAN); return; } - + // Check if any request queued if(!info->reqCnt) { @@ -876,7 +876,7 @@ customscan_WorkerCb( // Make curReq ready so it is available in the callbacks info->pCurReq = (CUSTOM_SCAN_REQ *)RTRemoveHeadListWithCnt(&info->reqQ, &info->reqCnt); - RT_ASSERT(CUSTOM_SCAN_STATE_WAITING == info->pCurReq->state || CUSTOM_SCAN_STATE_DEFERRED == info->pCurReq->state, + RT_ASSERT(CUSTOM_SCAN_STATE_WAITING == info->pCurReq->state || CUSTOM_SCAN_STATE_DEFERRED == info->pCurReq->state, ("%s(): invalid req state: %s\n", __FUNCTION__, customscan_ScanStateTxt(info->pCurReq->state))); customscan_SetReqState(info, info->pCurReq, CUSTOM_SCAN_STATE_STARTING); @@ -894,7 +894,7 @@ customscan_WorkerCb( } bForcePassive = info->pCurReq->bForcePassive; - + customscan_Unlock(info); if(bDelayMs) @@ -903,7 +903,7 @@ customscan_WorkerCb( customscan_InvokeMgntLinkReq(info, bForcePassive); FunctionOut(COMP_SCAN); - + return; } @@ -920,7 +920,7 @@ customscan_PreWorkerExitCb( RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); info->bWorkerExited = TRUE; - + return; } @@ -942,7 +942,7 @@ CustomScan_ResetReqNoScanCb( RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); - + if(MgntScanInProgress(&pAdapter->MgntInfo)) { return; @@ -952,17 +952,17 @@ CustomScan_ResetReqNoScanCb( // since we are doing reset, flush all queued reqs customscan_FlushReqQ(info); - - if(CUSTOM_SCAN_PROCESSING_REQ(info) + + if(CUSTOM_SCAN_PROCESSING_REQ(info) && CUSTOM_SCAN_STATE_STARTING == info->pCurReq->state && TEST_FLAG(info->pCurReq->flag, CUSTOM_SCAN_REQ_FLAG_RESCHEDULED) ) { // A rescheduled scan req still waiting for RF on, we free it here, otherwise: - // * If there's a subsequent connect request, the return point would be changed to + // * If there's a subsequent connect request, the return point would be changed to // IPS_CALLBACK_JOIN_REQUEST and when subsequent scan is issued, CustomScan_IssueSysScan // would think that the driver is doing custom scan and return media busy. In addition, - // JoinRequest may issue scan and that scan would be associated with the rescheduled + // JoinRequest may issue scan and that scan would be associated with the rescheduled // custom scan request and that is wrong. // * If there's no connect request, the scan would continue when RF is on and that's not // desiarble since we shall stop scan when receive a reset request. @@ -972,9 +972,9 @@ CustomScan_ResetReqNoScanCb( customscan_Lock(info); customscan_FreeCurReq(info); } - + customscan_Unlock(info); - + return; } @@ -999,7 +999,7 @@ CustomScan_ScanResetCb( RT_TRACE(COMP_SCAN, DBG_WARNING, ("cur req:\n")); customscan_DumpReq(info->pCurReq); } - + do { // since we are doing reset, flush all queued reqs @@ -1009,7 +1009,7 @@ CustomScan_ScanResetCb( if(CUSTOM_SCAN_PROCESSING_REQ(info)) { SET_FLAG(info->pCurReq->flag, CUSTOM_SCAN_REQ_FLAG_RESET); - + if(CUSTOM_SCAN_STATE_STARTING == info->pCurReq->state || CUSTOM_SCAN_STATE_STARTED == info->pCurReq->state || CUSTOM_SCAN_STATE_SW_CHNL == info->pCurReq->state @@ -1019,11 +1019,11 @@ CustomScan_ScanResetCb( RT_TRACE(COMP_SCAN, DBG_LOUD, ("req %s got reset\n", info->pCurReq->typeInfo)); customscan_SetReqState(info, info->pCurReq, CUSTOM_SCAN_STATE_TERMINATING); } - } + } }while(FALSE); - + customscan_Unlock(info); - + return; } @@ -1055,9 +1055,9 @@ CustomScan_ScanByTimerCb( RT_TRACE(COMP_SCAN, DBG_LOUD, ("req issued: %s\n", info->pCurReq->typeInfo)); } }while(FALSE); - + customscan_Unlock(info); - + return; } @@ -1077,7 +1077,7 @@ CustomScan_ConstructScanListCb( // Not to acquire lock because // 1. it is not necessary since constructing scan list is already an exclusive action - // 2. it may cause deadlock + // 2. it may cause deadlock //customscan_Lock(info); do @@ -1133,7 +1133,7 @@ CustomScan_ConstructScanListCb( } bSysScan = (CUSTOM_SCAN_SRC_TYPE_SYS == info->pCurReq->type); - + }while(FALSE); //customscan_Unlock(info); @@ -1149,12 +1149,12 @@ CustomScan_PreSwChnlCb( { u2Byte extDwellTime = 0; CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); customscan_Lock(info); - + do { if(!CUSTOM_SCAN_PROCESSING_REQ(info)) @@ -1171,14 +1171,14 @@ CustomScan_PreSwChnlCb( } customscan_SetReqState(info, info->pCurReq, CUSTOM_SCAN_STATE_SW_CHNL); - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("%s: to sw from: %u to %u\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("%s: to sw from: %u to %u\n", info->pCurReq->typeInfo, - info->pCurReq->curChnl ? info->pCurReq->curChnl->super.ChannelNum : 0, + info->pCurReq->curChnl ? info->pCurReq->curChnl->super.ChannelNum : 0, chnl->ChannelNum)); info->pCurReq->curChnl = (CHNL_ENTRY_EXT *)CONTAINING_RECORD(chnl, CHNL_ENTRY_EXT, super); - + }while(FALSE); customscan_Unlock(info); @@ -1196,7 +1196,7 @@ CustomScan_OnChnlCb( RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); - customscan_Lock(info); + customscan_Lock(info); do { @@ -1214,13 +1214,13 @@ CustomScan_OnChnlCb( { RT_TRACE(COMP_SCAN, DBG_LOUD, ("flag: %u\n", info->pCurReq->curChnl->flag)); } - + if(CUSTOM_SCAN_TIME_DUE(info->pCurReq)) { customscan_TerminateCurrentReq(info, FALSE); } }while(FALSE); - + customscan_Unlock(info); return; @@ -1238,7 +1238,7 @@ CustomScan_PreSetDwellTimerCb( RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); - customscan_Lock(info); + customscan_Lock(info); do { @@ -1255,7 +1255,7 @@ CustomScan_PreSetDwellTimerCb( } }while(FALSE); - + customscan_Unlock(info); return bSetDwellTimer; @@ -1290,8 +1290,8 @@ CustomScan_SendProbeCb( break; } - RT_ASSERT((VOID *)info->pCurReq->chnlEntryPool.start <= (VOID *)chnl - && (VOID *)chnl < (VOID *)info->pCurReq->chnlEntryPool.end, + RT_ASSERT((VOID *)info->pCurReq->chnlEntryPool.start <= (VOID *)chnl + && (VOID *)chnl < (VOID *)info->pCurReq->chnlEntryPool.end, ("%s(): chnl is not the customized one\n", __FUNCTION__)); chnlExt = (CHNL_ENTRY_EXT *)CONTAINING_RECORD(chnl, CHNL_ENTRY_EXT, super); @@ -1322,17 +1322,17 @@ CustomScan_SendProbeCb( if(MgntGetBuffer(pAdapter, &pTcb, &pBuf)) { - PlatformMoveMemory(pBuf->Buffer.VirtualAddress, - FrameBuf_MHead(chnlExt->probeReq), + PlatformMoveMemory(pBuf->Buffer.VirtualAddress, + FrameBuf_MHead(chnlExt->probeReq), FrameBuf_Length(chnlExt->probeReq)); pTcb->PacketLength = FrameBuf_Length(chnlExt->probeReq); - + MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, chnlExt->dataRate); } - PlatformReleaseSpinLock(info->pAdapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(info->pAdapter, RT_TX_SPINLOCK); } - + return bContinue; } @@ -1358,11 +1358,11 @@ CustomScan_DualBandScanCb( } RT_TRACE(COMP_SCAN, DBG_LOUD, ("state: %s\n", customscan_ScanStateTxt(info->pCurReq->state))); - + if(CUSTOM_SCAN_STATE_TERMINATING == info->pCurReq->state) { - RT_CHNL_LIST_ENTRY *pChnlEntry = NULL; - + RT_CHNL_LIST_ENTRY *pChnlEntry = NULL; + while(RtActChannelList(info->pAdapter, RT_CHNL_LIST_ACTION_POP_SCAN_CHANNEL, NULL, &pChnlEntry)){} terminated = TRUE; } @@ -1372,7 +1372,7 @@ CustomScan_DualBandScanCb( customscan_TerminateCurrentReq(info, FALSE); } }while(FALSE); - + customscan_Unlock(info); return terminated; @@ -1419,10 +1419,10 @@ CustomScan_ScanCompleteCb( { info->pCurReq->repeatCount--; - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("repeatCount: %u, state: %s\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("repeatCount: %u, state: %s\n", info->pCurReq->repeatCount, customscan_ScanStateTxt(info->pCurReq->state))); - + if(info->pCurReq->repeatCount && CUSTOM_SCAN_STATE_TERMINATING != info->pCurReq->state ) @@ -1438,14 +1438,14 @@ CustomScan_ScanCompleteCb( } else { - RT_TRACE(COMP_SCAN, DBG_WARNING, + RT_TRACE(COMP_SCAN, DBG_WARNING, ("current req's repeat count reaches 0 already and it is not freed and scan complete is invoked again\n")); SET_FLAG(info->pCurReq->flag, CUSTOM_SCAN_REQ_FLAG_POTENTIAL_REPEATE_COUNT_UNDERFLOW); } } customscan_Unlock(info); - + return; } @@ -1462,7 +1462,7 @@ CustomScan_ScanCompleteReturnCb( RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); FunctionIn(COMP_SCAN); - + customscan_Lock(info); if(CUSTOM_SCAN_PROCESSING_REQ(info)) { @@ -1495,13 +1495,13 @@ CustomScan_ScanCompleteReturnCb( // Trigger thread when ScanComplete has done everything it needs to do if(info->reqCnt) { - PlatformSetEventToTrigerThread(info->pAdapter, &info->worker); + PlatformSetEventToTrigerThread(info->pAdapter, &info->worker); } customscan_Unlock(info); - + FunctionOut(COMP_SCAN); - + return; } @@ -1516,7 +1516,7 @@ CustomScan_RescheduleCb( RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); customscan_Lock(info); - + do { if(!CUSTOM_SCAN_PROCESSING_REQ(info)) @@ -1531,7 +1531,7 @@ CustomScan_RescheduleCb( SET_FLAG(info->pCurReq->flag, CUSTOM_SCAN_REQ_FLAG_RESCHEDULED); }while(FALSE); customscan_Unlock(info); - + return; } @@ -1546,7 +1546,7 @@ CustomScan_WatchDogCb( {// not initialized yet return; } - + if(info->bWorkerExited) { info->bWorkerExited = FALSE; @@ -1580,7 +1580,7 @@ CustomScan_OnProbeRspCb( } customscan_Unlock(info); - + return; } @@ -1601,7 +1601,7 @@ CustomScan_AllocInfo( pMgntInfo = &pAdapter->MgntInfo; pMgntInfo->pCustomScanInfo = NULL; - + if(RT_STATUS_SUCCESS != PlatformAllocateMemory(pAdapter, (PVOID *)&info, sizeof(*info))) { return NULL; @@ -1655,20 +1655,20 @@ CustomScan_Init( ) { CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(pScanAdapter, ("%s(): pScanAdapter is NULL!!!\n", __FUNCTION__)); FunctionIn(COMP_SCAN); PlatformZeroMemory(info, sizeof(*info)); - + info->sig = info_sig; info->pAdapter = pScanAdapter; RTInitializeListHead(&info->reqQ); info->reqCnt = 0; - Pool_Init(&info->reqPool, "req pool", sizeof(info->reqPoolRsvd), - info->reqPoolRsvd, sizeof(info->reqPoolRsvd[0]), + Pool_Init(&info->reqPool, "req pool", sizeof(info->reqPoolRsvd), + info->reqPoolRsvd, sizeof(info->reqPoolRsvd[0]), dbgComp, dbgLevel); info->pCurReq = NULL; info->dbgComp = dbgComp; @@ -1692,14 +1692,14 @@ CustomScan_Start( { CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; ADAPTER *pScanAdapter = info->pAdapter; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); FunctionIn(COMP_SCAN); PlatformInitializeThreadEx(pScanAdapter, &info->worker, customscan_WorkerCb, customscan_PreWorkerExitCb, "custom scan worker thread", TRUE, 1000, pInfo); PlatformSetEventTrigerThread(pScanAdapter, &info->worker, PASSIVE_LEVEL, pInfo); - + FunctionOut(COMP_SCAN); return; @@ -1711,7 +1711,7 @@ CustomScan_Stop( ) { CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); FunctionIn(COMP_SCAN); @@ -1738,7 +1738,7 @@ CustomScan_Deinit( ) { CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); @@ -1785,7 +1785,7 @@ CustomScan_GetProbeReqBuf( ) { CUSTOM_SCAN_REQ *req = (CUSTOM_SCAN_REQ *)scanReq; - + RT_ASSERT(scanReq, ("%s(): scanReq is NULL!!!\n", __FUNCTION__)); RT_ASSERT(req_sig == req->sig, ("%s(): invalid scanReq\n", __FUNCTION__)); RT_ASSERT(CUSTOM_SCAN_STATE_IDLE == req->state, ("%s(): invalid req state: %s\n", __FUNCTION__, customscan_ScanStateTxt(req->state))); @@ -1808,7 +1808,7 @@ CustomScan_SetupCbCtx( req->cb = cb; req->cbCtx = ctx; - + return; } @@ -1820,7 +1820,7 @@ CustomScan_TermReq( { RT_STATUS status = RT_STATUS_SUCCESS; CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); @@ -1837,18 +1837,18 @@ CustomScan_TermReq( do { customscan_FlushReqQ(info); - + if(!CUSTOM_SCAN_PROCESSING_REQ(info)) break; info->pAdapter->MgntInfo.bCompleteScan = TRUE; RT_TRACE(COMP_SCAN, DBG_LOUD, ("CustomScan_TermReq(): info bCompleteScan %d\n", info->pAdapter->MgntInfo.bCompleteScan)); - + if(RT_STATUS_SUCCESS != (status = customscan_TerminateCurrentReq(info, bStopOnCurChnl))) break; - + }while(FALSE); - + customscan_Unlock(info); return status; @@ -1869,7 +1869,7 @@ CustomScan_AddScanChnl( CUSTOM_SCAN_REQ *req = (CUSTOM_SCAN_REQ *)scanReq; RT_CHNL_LIST_ENTRY chnlEntry; u4Byte itChnl = 0; - + RT_ASSERT(scanReq, ("%s(): scanReq is NULL!!!\n", __FUNCTION__)); RT_ASSERT(req_sig == req->sig, ("%s(): invalid scanReq\n", __FUNCTION__)); RT_ASSERT(CUSTOM_SCAN_STATE_IDLE == req->state, ("%s(): invalid req state: %s\n", __FUNCTION__, customscan_ScanStateTxt(req->state))); @@ -1889,7 +1889,7 @@ CustomScan_AddScanChnl( for(itChnl = 0; itChnl < count; itChnl++) { CHNL_ENTRY_EXT *pExt = (CHNL_ENTRY_EXT *)Pool_Acquire(&req->chnlEntryPool); - + if(!pExt) { RT_TRACE(COMP_SCAN, DBG_WARNING, ("Failed to acquire chnl ext from pool\n")); @@ -1935,7 +1935,7 @@ CustomScan_AddChnlPlanChnls( dataRate, probeReqBuf ); - } + } } else {// new definition, see DefaultChannelPlan @@ -1965,7 +1965,7 @@ CustomScan_AddChnlPlanChnls( dataRate, probeReqBuf ); - } + } } @@ -2106,7 +2106,7 @@ CustomScan_NumAddedChnl( ) { CUSTOM_SCAN_REQ *req = (CUSTOM_SCAN_REQ *)scanReq; - + RT_ASSERT(scanReq, ("%s(): scanReq is NULL!!!\n", __FUNCTION__)); RT_ASSERT(req_sig == req->sig, ("%s(): invalid scanReq\n", __FUNCTION__)); @@ -2123,14 +2123,14 @@ CustomScan_IssueReq( { CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; CUSTOM_SCAN_REQ *req = (CUSTOM_SCAN_REQ *)scanReq; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); RT_ASSERT(scanReq, ("%s(): scanReq is NULL!!!\n", __FUNCTION__)); RT_ASSERT(req_sig == req->sig, ("%s(): invalid scanReq\n", __FUNCTION__)); RT_ASSERT(CUSTOM_SCAN_STATE_IDLE == req->state, ("%s(): invalid req state: %s\n", __FUNCTION__, customscan_ScanStateTxt(req->state))); RT_ASSERT(typeInfo, ("%s(): typeInfo is NULL!!!\n", __FUNCTION__)); - + FunctionIn(COMP_SCAN); req->type = type; @@ -2144,7 +2144,7 @@ CustomScan_IssueReq( customscan_Unlock(info); return RT_STATUS_SUCCESS; } - + customscan_Lock(info); if(CUSTOM_SCAN_SRC_TYPE_SYS == type) {// give system scan the highest priority @@ -2157,7 +2157,7 @@ CustomScan_IssueReq( customscan_SetReqState(info, req, CUSTOM_SCAN_STATE_WAITING); customscan_DumpReq(req); - + customscan_Unlock(info); if(RT_DRIVER_STOP(info->pAdapter)) @@ -2168,7 +2168,7 @@ CustomScan_IssueReq( PlatformSetEventToTrigerThread(info->pAdapter, &info->worker); - + return RT_STATUS_SUCCESS; } @@ -2182,8 +2182,8 @@ CustomScan_IssueSysScan( CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; CUSTOM_SCAN_REQ *req = NULL; RT_CHANNEL_PLAN *plan = NULL; - - + + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); @@ -2196,7 +2196,7 @@ CustomScan_IssueSysScan( status = RT_STATUS_MEDIA_BUSY; break; } - + if(NULL == (req = (CUSTOM_SCAN_REQ *)CustomScan_AllocReq(pInfo, NULL, NULL))) { status = RT_STATUS_RESOURCE; @@ -2237,12 +2237,12 @@ CustomScan_IssueSysScan( req->type = CUSTOM_SCAN_SRC_TYPE_SYS; req->typeInfo = "sys"; req->issueTime = PlatformGetCurrentTime() / 1000; - + // set state customscan_Lock(info); customscan_SetReqState(info, info->pCurReq, CUSTOM_SCAN_STATE_STARTING); customscan_Unlock(info); - + // issue scan if(!customscan_InvokeMgntLinkReq(info, !bActiveScan)) { @@ -2257,7 +2257,7 @@ CustomScan_IssueSysScan( customscan_Lock(info); if(req == info->pCurReq) info->pCurReq = NULL; - + customscan_FreeReq(info, req); customscan_Unlock(info); @@ -2276,7 +2276,7 @@ CustomScan_ExtendDwellTime( { RT_STATUS status = RT_STATUS_SUCCESS; CUSTOM_SCAN_INFO *info = (CUSTOM_SCAN_INFO *)pInfo; - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); @@ -2290,20 +2290,20 @@ CustomScan_ExtendDwellTime( status = RT_STATUS_INVALID_STATE; break; } - + if(CUSTOM_SCAN_STATE_DWELL != info->pCurReq->state) { - RT_TRACE(COMP_SCAN, DBG_WARNING, + RT_TRACE(COMP_SCAN, DBG_WARNING, ("Failed to extend dwell time: state is: %s\n", customscan_ScanStateTxt(info->pCurReq->state))); status = RT_STATUS_INVALID_STATE; break; } - + info->pCurReq->extDwellTime = dwellTime; }while(FALSE); customscan_Unlock(info); - + return status; } @@ -2319,7 +2319,7 @@ CustomScan_ShutDwellTime( CUSTOM_SCAN_REQ *reqIn = (CUSTOM_SCAN_REQ *)req; FunctionIn(COMP_SCAN); - + RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); @@ -2338,21 +2338,21 @@ CustomScan_ShutDwellTime( status = RT_STATUS_INVALID_STATE; break; } - + if(CUSTOM_SCAN_STATE_DWELL != reqIn->state) { - RT_TRACE(COMP_SCAN, DBG_WARNING, + RT_TRACE(COMP_SCAN, DBG_WARNING, ("Failed to shut dwell time: state is: %s\n", customscan_ScanStateTxt(reqIn->state))); status = RT_STATUS_INVALID_STATE; break; } - - RT_TRACE(COMP_SCAN, DBG_WARNING, + + RT_TRACE(COMP_SCAN, DBG_WARNING, ("shutting off scan req %s dwell time\n", reqIn->typeInfo)); - + if(RT_STATUS_SUCCESS != (status = customscan_TerminateCurrentChnl(info))) { - RT_TRACE(COMP_SCAN, DBG_WARNING, + RT_TRACE(COMP_SCAN, DBG_WARNING, ("customscan_TerminateCurrentChnl failed: 0x%08X\n", status)); break; } @@ -2364,7 +2364,7 @@ CustomScan_ShutDwellTime( }while(FALSE); FunctionOut(COMP_SCAN); - + return status; } @@ -2415,7 +2415,7 @@ CustomScan_AcquireCurCtx( } VOID -CustomScan_ReleaseCurCtx( +CustomScan_ReleaseCurCtx( IN VOID *pInfo ) { @@ -2423,7 +2423,7 @@ CustomScan_ReleaseCurCtx( RT_ASSERT(pInfo, ("%s(): pInfo is NULL!!!\n", __FUNCTION__)); RT_ASSERT(info_sig == info->sig, ("%s(): invalid info\n", __FUNCTION__)); - + customscan_Unlock(info); } diff --git a/network/wlan/WDI/COMMON/CustomizedScan.h b/network/wlan/WDI/COMMON/CustomizedScan.h index a719d7a10..65e6dd6ff 100644 --- a/network/wlan/WDI/COMMON/CustomizedScan.h +++ b/network/wlan/WDI/COMMON/CustomizedScan.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_CUSTOMIZED_SCAN_H @@ -77,7 +77,7 @@ VOID CustomScan_ScanByTimerCb( IN VOID *pInfo ); - + BOOLEAN CustomScan_ConstructScanListCb( IN VOID *pInfo, @@ -312,7 +312,7 @@ CustomScan_AcquireCurCtx( ); VOID -CustomScan_ReleaseCurCtx( +CustomScan_ReleaseCurCtx( IN VOID *pInfo ); diff --git a/network/wlan/WDI/COMMON/DFS.c b/network/wlan/WDI/COMMON/DFS.c index eb1b82799..49e68f5dd 100644 --- a/network/wlan/WDI/COMMON/DFS.c +++ b/network/wlan/WDI/COMMON/DFS.c @@ -5,19 +5,19 @@ Module: DFS.c (RTL8190 Source C File) Note: Declare some variable which will be used by any debug command. - - Function: - - Export: - Abbrev: + Function: + + Export: + + Abbrev: History: Data Who Remark - + ??/??/2010 Cosa Create initial version. 12/23/2010 MHC Gather the code from other source files. - + ******************************************************************************/ /* Header Files. */ #include "Mp_Precomp.h" @@ -39,7 +39,7 @@ Hal_PauseTx( #if (DFS_SUPPORT == 1) //============================================ -// The following is for DFS local function, +// The following is for DFS local function, // start with dfs_*() //============================================ VOID @@ -53,7 +53,7 @@ dfs_StaDisableTx( if(type == DFS_DISABLE_TX_ALL) { RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], dfs_StaDisableTx all!!\n")); - Hal_PauseTx(Adapter, HW_DISABLE_TX_ALL); + Hal_PauseTx(Adapter, HW_DISABLE_TX_ALL); } else if(type == DFS_DISABLE_TX_DATA) { @@ -97,14 +97,14 @@ dfs_StaCsaWorkItemCallback( pMgntDFS->staMode.dfsSwitchChannel)); pMgntDFS->staMode.dfsOldConnectedChannel = pMgntInfo->dot11CurrentChannelNumber; - + if(pMgntInfo->dot11CurrentChannelNumber != pMgntDFS->staMode.dfsSwitchChannel) { pMgntInfo->dot11CurrentChannelNumber = pMgntDFS->staMode.dfsSwitchChannel; Mgnt_SwChnl(GetDefaultAdapter(Adapter) ,pMgntInfo->dot11CurrentChannelNumber,2); } - + pMgntDFS->staMode.dfsSwitchChannel = 0; if(DFS_5G_RADAR_CHANNEL(pMgntInfo->dot11CurrentChannelNumber)) @@ -178,10 +178,10 @@ dfs_ApInsertRejectChnl( { PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; u1Byte i; - + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], dfs_ApInsertRejectChnl(), insert chnl %d to Radar channel list\n", Rejectchnl)); - + for(i=0; iapMode.dfsRadarChnl[i].radarChnl == 0) @@ -211,7 +211,7 @@ dfs_ApDisableTx( ) { PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; - + if(type == DFS_DISABLE_TX_ALL) { RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], dfs_ApDisableTx all!!\n")); @@ -250,7 +250,7 @@ dfs_ApResetMonitorState( ) { PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; - + if(bNeedMonitor) { pMgntDFS->apMode.bMonitored = FALSE; @@ -281,14 +281,14 @@ dfs_ApEnableTx( VOID dfs_ApSwitchChnl( IN PVOID Context - ) + ) { PADAPTER Adapter = (PADAPTER)Context; PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], dfs_ApSwitchChnl(), switch chnl to %d\n", pMgntDFS->apMode.dfsSwitchChannel)); - + dfs_ApDisableTx(Adapter, DFS_DISABLE_TX_ALL); MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH(Adapter, pMgntDFS->apMode.dfsSwitchChannel); @@ -314,14 +314,14 @@ dfs_ApSelectChannel( } RT_TRACE( COMP_DFS, DBG_LOUD, ("]\n")); - num = (u1Byte)GetRandomNumber(0, AviNum); + num = (u1Byte)GetRandomNumber(0, AviNum); which_channel = aviChnl[num]; } else { which_channel = 153; } - + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], dfs_ApSelectChannel to chnl-%d\n", which_channel)); return which_channel; } @@ -360,14 +360,14 @@ dfs_ApDetecting( #endif if(pMgntDFS->apMode.bRadarDetected) - { + { // Only display counters when real radar signal is detected if(pMgntDFS->apMode.dfsTestAlert) pMgntDFS->apMode.dfsTestAlert = 0; if(radar_type == 1) { - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], 0xcf8=0x%x, 0xcf4=0x%x !\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], 0xcf8=0x%x, 0xcf4=0x%x !\n", radar_detect_val, radar_cnt)); } @@ -375,7 +375,7 @@ dfs_ApDetecting( pMgntDFS->apMode.dfsState = DFS_AP_BECONING; dfs_ApDisableTx(Adapter, DFS_DISABLE_TX_DATA); - + ReleaseDataFrameQueued(Adapter); // Insert current channel to the reject list. @@ -442,7 +442,7 @@ dfs_ApInitialize( pMgntDFS->apMode.dfsRadarChnl[i].radarChnl = 0; pMgntDFS->apMode.dfsRadarChnl[i].rejectTime = 0; } - + pMgntDFS->apMode.bRadarDetected = FALSE; pMgntDFS->apMode.bDisableTx = FALSE; pMgntDFS->apMode.dfsSwitchChannel = 0; @@ -485,7 +485,7 @@ dfs_APDFSTimerWorkItemCallback( RT_TRACE(COMP_DFS, DBG_LOUD, ("[DFS], AP switch channel!!\n")); dfs_ApSwitchChnl(Adapter); break; - + default: RT_ASSERT(FALSE, ("AP Unknown state\n")); break; @@ -514,7 +514,7 @@ dfs_ApDfsTimerCallback( //============================================ -// The following is for DFS Extern function, +// The following is for DFS Extern function, // start with DFS_*() //============================================ @@ -525,7 +525,7 @@ DFS_Init( { PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; BOOLEAN bSupportDFS = FALSE; - + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_SUPPORT_5G, (PBOOLEAN)&bSupportDFS); if (bSupportDFS) { @@ -566,9 +566,9 @@ DFS_TimerContrl( if(pMgntDFS->apMode.bDisableDfs) return; - // Comment out for compiler type cast warnning on Vista x64 + // Comment out for compiler type cast warnning on Vista x64 //RT_TRACE(COMP_DFS, DBG_LOUD, ("[DFS], DFS_TimerContrl(), Adapter=0x%x, type=", (u4Byte)Adapter)); - + switch(TimerCtrlType) { case DFS_TIMER_INIT: @@ -580,7 +580,7 @@ DFS_TimerContrl( RT_TRACE( COMP_DFS, DBG_LOUD, ("Set Timer for AP mode!!\n")); PlatformSetTimer( Adapter, &pMgntInfo->DFSMgnt.apMode.dfsTimer, 100); break; - + case DFS_TIMER_CANCEL: RT_TRACE( COMP_DFS, DBG_LOUD, ("Cancel Timer for AP mode!!\n")); PlatformCancelTimer(Adapter, &pMgntInfo->DFSMgnt.apMode.dfsTimer); @@ -590,7 +590,7 @@ DFS_TimerContrl( RT_TRACE( COMP_DFS, DBG_LOUD, ("Release Timer for AP mode!!\n")); PlatformReleaseTimer(Adapter, &pMgntInfo->DFSMgnt.apMode.dfsTimer); break; - + default: RT_ASSERT(FALSE, ("Unknown Action!!\n")); break; @@ -608,13 +608,13 @@ DFS_WorkItemContrl( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; - + if(Adapter->DFSSupport == FALSE) return; - + // Comment out for compiler type cast warnning on Vista x64 //RT_TRACE(COMP_DFS, DBG_LOUD, ("[DFS], DFS_WorkItemContrl(), Adapter=0x%x, type=", (u4Byte)Adapter)); - + switch(WorkItemCtrlType) { case DFS_WORKITEM_INIT: @@ -623,8 +623,8 @@ DFS_WorkItemContrl( RT_TRACE(COMP_DFS, DBG_LOUD, ("Workitem initialization for AP mode!!\n")); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->DFSMgnt.apMode.dfsTimerWorkItem), - (RT_WORKITEM_CALL_BACK)dfs_APDFSTimerWorkItemCallback, + &(pMgntInfo->DFSMgnt.apMode.dfsTimerWorkItem), + (RT_WORKITEM_CALL_BACK)dfs_APDFSTimerWorkItemCallback, (PVOID)Adapter, "AP_DFSTimerWorkItem"); } @@ -633,13 +633,13 @@ DFS_WorkItemContrl( RT_TRACE(COMP_DFS, DBG_LOUD, ("Workitem initialization for STA mode!!\n")); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->DFSMgnt.staMode.csaWorkItem), - (RT_WORKITEM_CALL_BACK)dfs_StaCsaWorkItemCallback, + &(pMgntInfo->DFSMgnt.staMode.csaWorkItem), + (RT_WORKITEM_CALL_BACK)dfs_StaCsaWorkItemCallback, (PVOID)Adapter, "DFS_CSAWorkItem"); } break; - + case DFS_WORKITEM_FREE: if(!pMgntDFS->apMode.bDisableDfs) { @@ -652,7 +652,7 @@ DFS_WorkItemContrl( PlatformFreeWorkItem(&(pMgntInfo->DFSMgnt.staMode.csaWorkItem)); } break; - + default: break; } @@ -667,7 +667,7 @@ DFS_IsTxDisabled( if (Adapter->DFSSupport == FALSE) return FALSE; - + if(ACTING_AS_AP(Adapter)) { if (!pMgntDFS->apMode.bDisableDfs && @@ -704,7 +704,7 @@ DFS_ApChnlLocked( if (pMgntDFS->apMode.bDisableDfs) return FALSE; - + for(i=0; iapMode.dfsRadarChnl[i].radarChnl == chnl)) @@ -742,19 +742,19 @@ DFS_ApIfNeedMonitorChnl( if (pMgntDFS->apMode.bDisableDfs) return; - + if(!ACTING_AS_AP(Adapter)) return; RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_ApIfNeedMonitorChnl()!!\n")); - + dfs_ApResetRadarDetectCounterAndFlag(Adapter); if(DFS_5G_RADAR_CHANNEL(pMgntInfo->dot11CurrentChannelNumber)) { RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], chnl %d is a Radar channel, have to monitor first!!\n", pMgntInfo->dot11CurrentChannelNumber)); - + dfs_ApResetMonitorState(Adapter, TRUE); dfs_ApDisableTx(Adapter, DFS_DISABLE_TX_ALL); } @@ -773,7 +773,7 @@ DFS_ApConstructBeaconIEcsa( IN PADAPTER Adapter ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; OCTET_STRING ChlSwitchAnnounce; u1Byte ChlSwitchAnnounceBuf[3]; @@ -784,7 +784,7 @@ DFS_ApConstructBeaconIEcsa( if(pMgntDFS->apMode.bDisableDfs) return; - + if(ACTING_AS_AP(Adapter)) { pbcn = pMgntInfo->beaconframe.Octet; @@ -801,9 +801,9 @@ DFS_ApConstructBeaconIEcsa( FillOctetString(ChlSwitchAnnounce, ChlSwitchAnnounceBuf, 3); PacketMakeElement(&pMgntInfo->beaconframe, EID_ChlSwitchAnnounce, ChlSwitchAnnounce); - + pMgntDFS->apMode.dfsSwitchChCountDown--; - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS counting = %d\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS counting = %d\n", pMgntDFS->apMode.dfsSwitchChCountDown)); if( pMgntDFS->apMode.dfsSwitchChCountDown == 0 && @@ -830,7 +830,7 @@ DFS_StaInsertToRadarChnlList( if(pMgntDFS->staMode.bDisableDfs) return; - + for(i=0; istaMode.dfsRadarChnl[i].radarChnl == 0)) @@ -867,7 +867,7 @@ DFS_StaMgntResetVars( pMgntDFS->staMode.dfsRadarChnl[i].radarChnl = 0; pMgntDFS->staMode.dfsRadarChnl[i].rxBcnTime = 0; } - + pMgntDFS->staMode.bDisableTx = FALSE; pMgntDFS->staMode.dfsSwitchChannel = 0; pMgntDFS->staMode.dfsSwitchChCountDown = 0; @@ -889,10 +889,10 @@ DFS_StaCheckCsaInfo( if(pMgntDFS->staMode.bDisableDfs) return; - + if(pBssDesc->CSA.bWithCSA) - { - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], OnBeacon_Bss(), CSA info, Mode/ Newchnl/ Cnt = %d/ %d/ %d !!!\n", + { + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], OnBeacon_Bss(), CSA info, Mode/ Newchnl/ Cnt = %d/ %d/ %d !!!\n", pBssDesc->CSA.channelSwtichMode, pBssDesc->CSA.NewChnlNum, pBssDesc->CSA.channelSwitchCnt)); if(pMgntDFS->staMode.dfsState == DFS_STA_LISTEN) @@ -926,9 +926,9 @@ DFS_StaConstructAssociateReq( if(pMgntDFS->staMode.bDisableDfs) return; - + //for 11H, add Power Capability. - //For 11H,add Supported Channels element + //For 11H,add Supported Channels element if(asocCap & BIT8) { RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaConstructAssociateReq()\n")); @@ -938,7 +938,7 @@ DFS_StaConstructAssociateReq( PowerCap.Octet = PowerCapConnent; PowerCap.Length = 2; PacketMakeElement( &AsocReq, EID_PowerCap, PowerCap ); - + pChannelList = MgntActQuery_ChannelList(Adapter); RT_TRACE(COMP_SCAN, DBG_LOUD, ("@@@Channel Plan: ")); for(i = 0; i < pChannelList->ChannelLen; i ++) @@ -951,7 +951,7 @@ DFS_StaConstructAssociateReq( else SupportChannelConnent[i] = 1; } - + //FillOctetString(SupportChannelIE, SuppRatesContent, i*2); SupportChannelIE.Octet = SupportChannelConnent; SupportChannelIE.Length = i; @@ -974,10 +974,10 @@ DFS_StaGetValueFromBeacon( { PDFS_MGNT pMgntDFS = &Adapter->MgntInfo.DFSMgnt; OCTET_STRING ChlSwitchAnnounceInfo; - + if (Adapter->DFSSupport == FALSE) return; - + if (pMgntDFS->staMode.bDisableDfs) return; @@ -988,7 +988,7 @@ DFS_StaGetValueFromBeacon( bssDesc->CSA.channelSwitchCnt = EF1Byte(*(ChlSwitchAnnounceInfo.Octet+2)); bssDesc->CSA.NewChnlNum= EF1Byte(*(ChlSwitchAnnounceInfo.Octet+1)); bssDesc->CSA.channelSwtichMode = EF1Byte(*(ChlSwitchAnnounceInfo.Octet)); - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], GetValueFromBeaconOrProbeRsp(), CSA info, Mode/ Newchnl/ Cnt = %d/ %d/ %d !!!\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], GetValueFromBeaconOrProbeRsp(), CSA info, Mode/ Newchnl/ Cnt = %d/ %d/ %d !!!\n", bssDesc->CSA.channelSwtichMode, bssDesc->CSA.NewChnlNum, bssDesc->CSA.channelSwitchCnt)); } else @@ -1016,7 +1016,7 @@ DFS_StaMonitor( if(ACTING_AS_AP(Adapter)) return; - + if(pMgntDFS->staMode.bMonitorAfterSwitch) { currTime = PlatformGetCurrentTime(); @@ -1026,14 +1026,14 @@ DFS_StaMonitor( { RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaMonitor(), monitor started!!\n")); } - + if(PlatformDivision64(diffTime,1000000) < DFS_STA_CHNL_MONITOR_TIME) { if( Adapter->MgntInfo.LinkDetectInfo.NumRecvBcnInPeriod==0 || Adapter->MgntInfo.LinkDetectInfo.NumRecvDataInPeriod==0 ) - { + { Adapter->MgntInfo.LinkDetectInfo.NumRecvBcnInPeriod = 1; - Adapter->MgntInfo.LinkDetectInfo.NumRecvDataInPeriod= 1; + Adapter->MgntInfo.LinkDetectInfo.NumRecvDataInPeriod= 1; } } else @@ -1041,7 +1041,7 @@ DFS_StaMonitor( pMgntDFS->staMode.bMonitorAfterSwitch = FALSE; pMgntDFS->staMode.bMonitorAfterSwitchIsDone = TRUE; dfs_StaEnableTx(Adapter); - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaMonitor(), monitor is finished, over %d seconds!!\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaMonitor(), monitor is finished, over %d seconds!!\n", DFS_STA_CHNL_MONITOR_TIME)); } } @@ -1063,7 +1063,7 @@ DFS_StaCheckRadarChnl( if (pMgntDFS->staMode.bDisableDfs) return; - + #if (DFS_CLIENT_PASSIVE_SCAN_ONLY == 1) return; #endif @@ -1073,9 +1073,9 @@ DFS_StaCheckRadarChnl( if(!DFS_5G_RADAR_CHANNEL(chnl)) return; - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaCheckRadarChnl(), rx beacon, channel = %d!!\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaCheckRadarChnl(), rx beacon, channel = %d!!\n", pbssdesc->ChannelNumber)); - + if(pbssdesc->CSA.bWithCSA) { // Beacon with Channel Switch Annouence, set rx beacon time = 0. @@ -1085,20 +1085,20 @@ DFS_StaCheckRadarChnl( { if(pMgntDFS->staMode.dfsRadarChnl[i].radarChnl == chnl) { - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaCheckRadarChnl(), CSA beacon, set rx beacon time = 0 at channel = %d!!\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaCheckRadarChnl(), CSA beacon, set rx beacon time = 0 at channel = %d!!\n", chnl)); pMgntDFS->staMode.dfsRadarChnl[i].rxBcnTime = 0; } } } else - { + { // Update the rx beacon time. for(i=0; istaMode.dfsRadarChnl[i].radarChnl == chnl) { - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaCheckRadarChnl(), update rx beacon time at channel = %d!!\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaCheckRadarChnl(), update rx beacon time at channel = %d!!\n", chnl)); pMgntDFS->staMode.dfsRadarChnl[i].rxBcnTime = PlatformGetCurrentTime(); } @@ -1144,22 +1144,22 @@ DFS_StaUpdateRadarChnlScanType( if(pChanneList->ChnlListEntry[j].ChannelNum == radarChnl) { ch_idx = (u1Byte)j; - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaUpdateRadarChnlScanType(), find channel-%d in channel plan!!", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaUpdateRadarChnlScanType(), find channel-%d in channel plan!!", radarChnl)); break; } } if(ch_idx == 0xff) { - RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaUpdateRadarChnlScanType(), channel-%d NOT found in channel plan!!\n", + RT_TRACE( COMP_DFS, DBG_LOUD, ("[DFS], DFS_StaUpdateRadarChnlScanType(), channel-%d NOT found in channel plan!!\n", radarChnl)); return; } - + if(PlatformDivision64(diffTime,1000000) < DFS_STA_CHNL_SCAN_TYPE_MONITOR_TIME) { RT_TRACE( COMP_DFS, DBG_LOUD, (" and set to Active scan!!\n")); - pChanneList->ChnlListEntry[ch_idx].ScanType = SCAN_ACTIVE; + pChanneList->ChnlListEntry[ch_idx].ScanType = SCAN_ACTIVE; } else { @@ -1167,7 +1167,7 @@ DFS_StaUpdateRadarChnlScanType( pChanneList->ChnlListEntry[ch_idx].ScanType = SCAN_PASSIVE; } } - } + } } diff --git a/network/wlan/WDI/COMMON/DFS.h b/network/wlan/WDI/COMMON/DFS.h index e7719c31d..330f44ba1 100644 --- a/network/wlan/WDI/COMMON/DFS.h +++ b/network/wlan/WDI/COMMON/DFS.h @@ -5,17 +5,17 @@ * * * Note: Declare some variable which will be used by any debug command. - * * - * Export: * - * Abbrev: + * Export: * - * History: - * Data Who Remark + * Abbrev: + * + * History: + * Data Who Remark * ??/??/2010 Cosa Create initial version in different filed. * 12/23/2010 MHC Gather the code from other source files. - * + * *****************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __DFS_H__ @@ -33,7 +33,7 @@ (__channel >= 94 && __channel <= 145)) #else//test radar chnl #define DFS_5G_RADAR_CHANNEL(__channel) \ - (__channel >= 40 && __channel <= 60) + (__channel >= 40 && __channel <= 60) #endif #define DFS_DEFAULT_NON_RADAR_CHNL 40 diff --git a/network/wlan/WDI/COMMON/DbgCmd.h b/network/wlan/WDI/COMMON/DbgCmd.h index 04a6baaf9..bec6cb825 100644 --- a/network/wlan/WDI/COMMON/DbgCmd.h +++ b/network/wlan/WDI/COMMON/DbgCmd.h @@ -8,19 +8,19 @@ * * * Note: Declare some variable which will be used by any debug command. - * * - * Export: * - * Abbrev: + * Export: * - * History: - * Data Who Remark + * Abbrev: + * + * History: + * Data Who Remark * 08/01/2007 MHC Create initial version. - * 08/02/2007 MHC Because some variable use strcure defined in HAL + * 08/02/2007 MHC Because some variable use strcure defined in HAL * relative header files. We must copy the structure to * pass all NIC's source files in common directory. - * + * *****************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __DBG_CMD_H__ @@ -39,7 +39,7 @@ /*--------------------------Define Parameters-------------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /* 2007/08/02 MH The structure must be the same with _TX_FWINFO_8190PCI */ #ifdef REMOVE_PACK @@ -53,18 +53,18 @@ typedef struct _TX_FWINFO_STRUCUTRE{ u1Byte RtsRate:7; u1Byte RtsEnable:1; u1Byte TxHT:1; - u1Byte Short:1; - u1Byte TxBandwidth:1; - u1Byte TxSubCarrier:2; + u1Byte Short:1; + u1Byte TxBandwidth:1; + u1Byte TxSubCarrier:2; u1Byte STBC:2; u1Byte AllowAggregation:1; - u1Byte RtsHT:1; - u1Byte RtsShort:1; - u1Byte RtsBandwidth:1; - u1Byte RtsSubcarrier:2; + u1Byte RtsHT:1; + u1Byte RtsShort:1; + u1Byte RtsBandwidth:1; + u1Byte RtsSubcarrier:2; u1Byte RtsSTBC:2; - u1Byte EnableCPUDur:1; - + u1Byte EnableCPUDur:1; + //DWORD 1 u4Byte RxMF:2; u4Byte RxAMD:3; @@ -96,19 +96,19 @@ typedef struct tag_Dbg_Cmd_Interrupt_Service_Time_Count_Structure typedef enum tag_Interrupt_Service_Type_Definition { - ISR_ALL = 0, + ISR_ALL = 0, ISR_TX, ISR_RX, ISR_NUM_MAX, ISR_MP_SEND_PACKET, ISR_MP_RETURN_PACKET, ISR_MP_CHK_FOR_HANG, - + }ISR_TYPE_E; typedef enum tag_Interrupt_Service_Action_Type_Definition { - ISR_ENTER = 0, + ISR_ENTER = 0, ISR_EXIT }ISR_ACTION_TYPE_E; @@ -122,10 +122,10 @@ typedef struct tag_Dbg_Verification_Console_Structure u2Byte TxPktLength; u4Byte TransPktNum; }VERA_CONSOLE_T; - -// Byte[0] BIT7 in Frame Control is reserved for QoS. Added by Annie, 2005-12-02. + +// Byte[0] BIT7 in Frame Control is reserved for QoS. Added by Annie, 2005-12-02. #define FC_QOS_BIT BIT7 // Byte[0] BIT6 in Frame Control seems to be reserved for "No Data". Added by Annie, 2006-01-06. @@ -162,10 +162,10 @@ typedef struct _DEBUG_CONSOLE_VAIABLE_STRUCTURE{ u4Byte DBG_MpSendEnd; u4Byte DBG_MpcaptureFlag; - // Capture the max time range from MP sned to inser polling + // Capture the max time range from MP sned to inser polling u4Byte DBG_MpPollCapStart; u4Byte DBG_MpPollRangeMax; - + // --------Use to switch debug print or not-------- // Display current beacom interrupt number from MAC u4Byte DBG_Beacon_Cnt; @@ -185,11 +185,11 @@ typedef struct _DEBUG_CONSOLE_VAIABLE_STRUCTURE{ // --------Use to switch or display RX Descriptor content-------- // Control to print RX DESC BUF ADDR u4Byte DBG_RxDescBuffAddr; - + // Collect MP send packet and complete NDIS packet number u4Byte DBG_MpTxCnt; u4Byte DBG_MpTxCompleteCnt; - + // Check RFD memory sapce to check if it is modified incorrectlly VIRTUAL_MEMORY PseudoRfd; @@ -204,7 +204,7 @@ typedef struct _DEBUG_CONSOLE_VAIABLE_STRUCTURE{ u1Byte UserSwitchTid; u1Byte UserForceTid; u1Byte UserForceQue; - + // Fragmentation debug structure!! u1Byte pSenderAddr[4]; u1Byte TID[4]; @@ -225,7 +225,7 @@ typedef struct _DEBUG_CONSOLE_VAIABLE_STRUCTURE{ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ @@ -267,7 +267,7 @@ extern void DBG_ConsoleInitialize();// PADAPTER pAdapter); extern void DBG_RecordSvnVersion(); -extern void DBG_IsrTimeCapture( PADAPTER pAdapter, +extern void DBG_IsrTimeCapture( PADAPTER pAdapter, u1Byte Isr_Type, u1Byte Isr_Action); extern void DBG_IsrTimeClear( void); diff --git a/network/wlan/WDI/COMMON/DbgMon.h b/network/wlan/WDI/COMMON/DbgMon.h index fca99e03c..62d9a29a8 100644 --- a/network/wlan/WDI/COMMON/DbgMon.h +++ b/network/wlan/WDI/COMMON/DbgMon.h @@ -35,7 +35,7 @@ typedef enum _DBGM_CALLER_{ DBGM_CALLER_DBG_CMD = 0x0, DBGM_CALLER_AUTO = 0x1, - DBGM_CALLER_MAX + DBGM_CALLER_MAX }DBGM_CALLER,*PDBGM_CALLER; @@ -45,36 +45,36 @@ typedef enum _DBGM_WIFI_BW_MODE{ DBGM_WIFI_BW_HT40 = 0x2, DBGM_WIFI_BW_HT80 = 0x3, DBGM_WIFI_BW_HT160 = 0x4, - DBGM_WIFI_BW_MAX + DBGM_WIFI_BW_MAX }DBGM_WIFI_BW_MODE,*PDBGM_WIFI_BW_MODE; typedef enum _DBGM_WIFI_TRAFFIC_DIR{ DBGM_WIFI_TRAFFIC_TX = 0x0, DBGM_WIFI_TRAFFIC_RX = 0x1, - DBGM_WIFI_TRAFFIC_MAX + DBGM_WIFI_TRAFFIC_MAX }DBGM_WIFI_TRAFFIC_DIR,*PDBGM_WIFI_TRAFFIC_DIR; typedef enum _DBGM_PWR_MODE_{ DBGM_PWR_DC_MODE = 0x0, DBGM_PWR_AC_MODE = 0x1, - DBGM_PWR_MODE_MAX + DBGM_PWR_MODE_MAX }DBGM_PWR_MODE,*PDBGM_PWR_MODE; typedef enum _DBGM_WIFI_FREQ_{ DBGM_WIFI_FREQ_24G = 0x0, DBGM_WIFI_FREQ_5G = 0x1, - DBGM_WIFI_FREQ_MAX + DBGM_WIFI_FREQ_MAX }DBGM_WIFI_FREQ,*PDBGM_WIFI_FREQ; -typedef struct _DBGM_BASIC_WIFI_INFO_{ +typedef struct _DBGM_BASIC_WIFI_INFO_{ u2Byte vid; u2Byte did; u2Byte svid; u2Byte smid; u1Byte customerId; u1Byte macAddr[6]; - + u2Byte apNum; u1Byte chnl; u4Byte bandwidth; @@ -122,7 +122,7 @@ typedef struct _DBGM_BASIC_WIFI_INFO_{ BOOLEAN bWowlan32k; // ap type info - u1Byte apType; + u1Byte apType; u4Byte numTxBcnOk; u4Byte numTxBcnErr; u4Byte numTxBcnUpdate; diff --git a/network/wlan/WDI/COMMON/Debug.c b/network/wlan/WDI/COMMON/Debug.c index 81bca9d60..a98deb3bc 100644 --- a/network/wlan/WDI/COMMON/Debug.c +++ b/network/wlan/WDI/COMMON/Debug.c @@ -3,7 +3,7 @@ #if WPP_SOFTWARE_TRACE #include "Debug.tmh" #endif - + u4Byte GlobalDebugLevel = DBG_LOUD; // // 2009/06/22 MH Allow Fre build to print none debug info at init time. @@ -48,7 +48,7 @@ u8Byte GlobalDebugComponents = \ // COMP_WPS | // COMP_CMD | // COMP_EFUSE | -// COMP_CCX | +// COMP_CCX | // COMP_IOCTL | // COMP_P2P | // COMP_TDLS | @@ -106,15 +106,15 @@ DBGP_HEAD_T DBGP_Head; * *---------------------------------------------------------------------------*/ extern void DBGP_Flag_Init(void) -{ +{ UINT8 i; - + for (i = 0; i < DBGP_TYPE_MAX; i++) { DBGP_Type[i] = 0; } - -#if DBG + +#if DBG // 2010/06/02 MH Free build driver can not out any debug message!!! // Init Debug flag enable condition @@ -183,13 +183,13 @@ extern void DBGP_Flag_Init(void) // DBG_CTRL_TRACE | // DBG_CTRL_INBAND_NOISE | 0; - - // 2011/07/20 MH Add for short cut + + // 2011/07/20 MH Add for short cut DBGP_Type[FSHORT_CUT] = \ -// SHCUT_TX | +// SHCUT_TX | // SHCUT_RX | 0; - + // 2011/09/28 Sinda Add for batch indication DBGP_Type[FBATCH_INDICATION] = \ // INDICATE_TRACE | @@ -218,12 +218,12 @@ extern void DBGP_Flag_Init(void) // FMPBT_C2H_CONTENT | // FMPBT_C2H_STATE | 0; - + DBGP_Type[FMPHAL] = \ // FMPHAL_CONTENT | // FMPHAL_STATE | - 0; - + 0; + DBGP_Type[FPHY] = \ // PHY_BBR | // PHY_BBW | @@ -238,49 +238,49 @@ extern void DBGP_Flag_Init(void) // PHY_SICR | // PHY_SICW | // PHY_TXPWR_EFUSE | - 0; + 0; DBGP_Type[FRW_POINT] = \ // FRW_POINT_TX | -// FRW_POINT_TX_DATA | -// FRW_POINT_RX | -// FRW_POINT_RX_DATA | -// FRW_POINT_DBG | +// FRW_POINT_TX_DATA | +// FRW_POINT_RX | +// FRW_POINT_RX_DATA | +// FRW_POINT_DBG | 0; DBGP_Type[FBEAM] = \ // FBEAM_FUN | // FBEAM_ERROR | // FBEAM_DATA | - 0; + 0; DBGP_Type[FACTION_TIMER] = \ // COMP_ACTION_TIMER_LIFE | // COMP_ACTION_TIMER_ITEM | - 0; - + 0; + DBGP_Type[FHAL_MAC_ID] = \ // COMP_MAC_ID | - 0; + 0; DBGP_Type[FCHNL] = \ // FCHNL_FUN | // FCHNL_ERROR | // FCHNL_INFO | - 0; + 0; DBGP_Type[FCCX] = \ // CCX_CELLPWRLMT | // CCX_RM | // CCX_CAC | - 0; + 0; DBGP_Type[FUSWITCH] = \ // FUSWITCH_FUN | // FUSWITCH_ERROR | // FUSWITCH_INFO | - 0; + 0; -#endif +#endif /* Define debug header of every service module. */ DBGP_Head.pMANS = "\n\r[MANS] "; DBGP_Head.pRTOS = "\n\r[RTOS] "; @@ -290,7 +290,7 @@ extern void DBGP_Flag_Init(void) DBGP_Head.pRAPD = "\n\r[RAPD] "; DBGP_Head.pTXPB = "\n\r[TXPB] "; DBGP_Head.pQUMG = "\n\r[QUMG] "; - + } /* DBGP_Flag_Init */ @@ -327,7 +327,7 @@ extern void DBG_PrintAllFlag(void) RT_TRACE(COMP_CMD, DBG_LOUD, ("DBGFLAG 13 FDM\n")); RT_TRACE(COMP_CMD, DBG_LOUD, ("DBGFLAG 14 FDBG_CTRL\n")); RT_TRACE(COMP_CMD, DBG_LOUD, ("DBGFLAG 15 FC2H\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("DBGFLAG 16 FBT\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("DBGFLAG 16 FBT\n")); } // DBG_PrintAllFlag @@ -382,7 +382,7 @@ extern void DBG_PrintFlagEvent(UINT8 DbgFlag) case FMLME: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 MEDIA_STS\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 LINK_STS\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 LINK_STS\n")); break; case FRESOURCE: @@ -391,7 +391,7 @@ extern void DBG_PrintFlagEvent(UINT8 DbgFlag) case FBEACON: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 BCN_SHOW\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 BCN_PEER\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 BCN_PEER\n")); break; case FISR: @@ -413,15 +413,15 @@ extern void DBG_PrintFlagEvent(UINT8 DbgFlag) case FMP: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 MP_RX\n")); break; - + case FEEPROM: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 EEPROM_W\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 EFUSE_PG\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 EFUSE_PG\n")); break; - + case FPWR: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 LPS\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 IPS\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 IPS\n")); RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 2 PWRSW\n")); RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 3 PWRHW\n")); RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 4 PWRHAL\n")); @@ -429,22 +429,22 @@ extern void DBG_PrintFlagEvent(UINT8 DbgFlag) case FDM: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 WA_IOT\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 DM_PWDB\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 2 DM_Monitor\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 3 DM_DIG\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 DM_PWDB\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 2 DM_Monitor\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 3 DM_DIG\n")); break; case FDBG_CTRL: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 DBG_CTRL_TRACE\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 DBG_CTRL_INBAND_NOISE\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 DBG_CTRL_INBAND_NOISE\n")); break; - + case FC2H: RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 0 C2H_Summary\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 C2H_PacketData\n")); - RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 2 C2H_ContentData\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 1 C2H_PacketData\n")); + RT_TRACE(COMP_CMD, DBG_LOUD, ("BIT 2 C2H_ContentData\n")); break; - + default: break; } diff --git a/network/wlan/WDI/COMMON/Debug.h b/network/wlan/WDI/COMMON/Debug.h index 74cb17812..13011c4e2 100644 --- a/network/wlan/WDI/COMMON/Debug.h +++ b/network/wlan/WDI/COMMON/Debug.h @@ -6,11 +6,11 @@ // Define the debug levels // // 1. DBG_TRACE and DBG_LOUD are used for normal cases. -// So that, they can help SW engineer to develope or trace states changed -// and also help HW enginner to trace every operation to and from HW, -// e.g IO, Tx, Rx. +// So that, they can help SW engineer to develope or trace states changed +// and also help HW enginner to trace every operation to and from HW, +// e.g IO, Tx, Rx. // -// 2. DBG_WARNNING and DBG_SERIOUS are used for unusual or error cases, +// 2. DBG_WARNNING and DBG_SERIOUS are used for unusual or error cases, // which help us to debug SW or HW. // //----------------------------------------------------------------------------- @@ -20,14 +20,14 @@ #define DBG_OFF 0 // -// Deprecated! Don't use it! +// Deprecated! Don't use it! // TODO: fix related debug message! // //#define DBG_SEC 1 // -// Fatal bug. -// For example, Tx/Rx/IO locked up, OS hangs, memory access violation, +// Fatal bug. +// For example, Tx/Rx/IO locked up, OS hangs, memory access violation, // resource allocation failed, unexpected HW behavior, HW BUG and so on. // #define DBG_SERIOUS 2 // WPP Error condition @@ -39,8 +39,8 @@ #define DBG_WARNING 3 // WPP Warning // -// Normal case with useful information about current SW or HW state. -// For example, Tx/Rx descriptor to fill, Tx/Rx descriptor completed status, +// Normal case with useful information about current SW or HW state. +// For example, Tx/Rx descriptor to fill, Tx/Rx descriptor completed status, // SW protocol state change, dynamic mechanism state change and so on. // #define DBG_LOUD 4 // WPP Information @@ -57,7 +57,7 @@ // // Trace framework definition when WPP based tracing is enabled // Re-map WPP trace level in following DBG level, revised by Roger, 2014.02.11. -// +// //#define WPP_LEVEL_NONE 0 //#define WPP_LEVEL_FATAL 1 // fatal error //#define WPP_LEVEL_ERROR 2 // error condition @@ -163,7 +163,7 @@ #ifndef WPP_COMPID_LOGGER #define WPP_COMPID_LOGGER(CTL) (WPP_CONTROL(WPP_BIT_ ## CTL).Logger), #endif - + #else // WPP_SOFTWARE_TRACE == 0 @@ -188,10 +188,10 @@ #define COMP_AUTHENTICATOR BIT14 // For AP mode Authenticator. Added by Annie, 2006-01-30. #define COMP_BEACON BIT15 // For Beacon related, by rcnjko. #define COMP_WFD BIT16 // WiFi Display -#define COMP_RM BIT17 // For Radio Measurement. +#define COMP_RM BIT17 // For Radio Measurement. #define COMP_MP BIT18 // For mass production test, by shien chang, 2006.07.13 #define COMP_CKIP BIT19 // For CCX 1 S13: CKIP. Added by Annie, 2006-08-14. -#define COMP_RSNA BIT20 // For RSNA IBSS , 061201, by CCW. +#define COMP_RSNA BIT20 // For RSNA IBSS , 061201, by CCW. #define COMP_INDIC BIT21 // For link indication #define COMP_LED BIT22 // For LED. #define COMP_RF BIT23 // For RF. @@ -204,7 +204,7 @@ #define COMP_POWER_TRACKING BIT25 //FOR 8190 TX POWER TRACKING #define COMP_RX_REORDER BIT26 // 8190 Rx Reorder #define COMP_AMSDU BIT27 // For A-MSDU Debugging -#define COMP_WPS BIT28 //WPS Debug Message +#define COMP_WPS BIT28 //WPS Debug Message #define COMP_CMD BIT29 #define COMP_EFUSE BIT30 #define COMP_CCX BIT31 //CCX Debug Flag @@ -252,14 +252,14 @@ /*------------------------------Define structure----------------------------*/ /* 2007/07/13 MH *//*------For DeBuG Print modeue------*/ -/* Defnie structure to store different debug flag variable. Every debug flag +/* Defnie structure to store different debug flag variable. Every debug flag is a UINT32 integer and you can assign 32 different events. */ typedef struct tag_DBGP_Debug_Flag_Structure { UINT32 Mans; /* Main Scheduler module. */ UINT32 Rtos; /* RTOS module. */ - UINT32 Alarm; /* Alarm module. */ - UINT32 Pm; /* Performance monitor module. */ + UINT32 Alarm; /* Alarm module. */ + UINT32 Pm; /* Performance monitor module. */ }DBGP_FLAG_T; /* Define debug print header for every service module.*/ @@ -280,9 +280,9 @@ typedef struct tag_DBGP_Service_Module_Header_Name_Structure // Each module has independt 32 bit debug flag you cnn define the flag as yout require. typedef enum tag_DBGP_Flag_Type_Definition { - FQoS = 0, + FQoS = 0, FTX = 1, - FRX = 2, + FRX = 2, FSEC = 3, FMGNT = 4, FMLME = 5, @@ -327,7 +327,7 @@ typedef enum tag_DBGP_Flag_Type_Definition #define TX_PATH BIT2 // Define RX relative debug bit --> FRX -#define RX_DATA BIT0 +#define RX_DATA BIT0 #define RX_PHY_STS BIT1 #define RX_PHY_SS BIT2 #define RX_PHY_SQ BIT3 @@ -440,7 +440,7 @@ typedef enum tag_DBGP_Flag_Type_Definition #define IOCTL_BT_RX_ACLDATA_DETAIL BIT19 #define IOCTL_BT_TP BIT20 // section 4 : BT connection state machine. -#define IOCTL_STATE BIT21 +#define IOCTL_STATE BIT21 #define IOCTL_BT_LOGO BIT22 #define IOCTL_BT_MGNT_PACKET BIT23 // section 5 : BT function trace diff --git a/network/wlan/WDI/COMMON/Defrag.c b/network/wlan/WDI/COMMON/Defrag.c index 0de12e5d2..6b02a34b8 100644 --- a/network/wlan/WDI/COMMON/Defrag.c +++ b/network/wlan/WDI/COMMON/Defrag.c @@ -19,7 +19,7 @@ DefragReset( ) { u2Byte i; - + for(i=0;iDefragArray[i].bUsed) @@ -47,7 +47,7 @@ DefragAddRFD( * 2. Fragment number is not zero * The RFD passed in will be queued or freed after this function call. * ICV should be removed before this function. - * + * * Return: NULL, if no MSDU is complete * RFD list, if one MSDU is complete * @@ -76,14 +76,14 @@ DefragAddRFD( { // No free entry, do age function and try again DefragAge( - Adapter->DefragArray, + Adapter->DefragArray, MAX_DEFRAG_PEER, PlatformGetCurrentTime(), Adapter); pEntry=DefragFindFreeEntry(Adapter->DefragArray, MAX_DEFRAG_PEER); } - + if(pEntry==NULL) { // If we stall can not get a free entry, knock out the least rescent used (LRU) @@ -95,9 +95,9 @@ DefragAddRFD( pEntry=DefragFindFreeEntry(Adapter->DefragArray, MAX_DEFRAG_PEER); RT_ASSERT(pEntry!=NULL, ("DefragAddRFD(): pEntry should not be NULL.\n")); - + } - + DefragEntrySetRFD( pEntry, pRfd, @@ -105,12 +105,12 @@ DefragAddRFD( TID, SeqNum, FragNum); - + } else { // 2~ frag pEntry=DefragSearch( - Adapter->DefragArray, + Adapter->DefragArray, MAX_DEFRAG_PEER, pSenderAddr, TID, @@ -139,14 +139,14 @@ DefragAddRFD( } //2 Remove header and MPDU head overhead (ex. IV) MAKE_RFD_OFFSET_AT_FRONT(pRfd, sMacHdrLng + QosCtrlLen + HTCLen + EncryptionOverhead) // Add QosCtrlLen; Modified by Annie, 2006-01-09. - + DefragEntryAddRFD(pEntry, pRfd, FragNum); if(!bMoreFrag) { //2 This MSDU is complete, return it pRetRfd=pEntry->pRfdHead; pEntry->bUsed=FALSE; } - } + } } return pRetRfd; } @@ -163,7 +163,7 @@ DefragInit( ) { u2Byte i; - + for(i=0;iDefragArray; - + for(i=0; i pDefragArray[i].usMaxLifeTimeStamp ) { Oldest_Frag = i; - } + } } if( Oldest_Frag != MAX_DEFRAG_PEER ) @@ -237,7 +237,7 @@ DefragFindFreeEntry( ) { u2Byte i; - + for(i=0;iLastFragNum+1), ("DefragEntryAddRFD() with wrong FragNum !!\n")); - + pEntry->LastFragNum=FragNum; // Increment fragment counter @@ -306,10 +306,10 @@ DefragEntryAddRFD( // Add packet length pEntry->pRfdHead->PacketLength+=pRfd->FragLength; - + // Update arrival time pEntry->usLastArriveTimeStamp=PlatformGetCurrentTime(); - + // Insert to tail pEntry->pRfdTail->NextRfd=pRfd; pEntry->pRfdTail=pRfd; @@ -318,7 +318,7 @@ DefragEntryAddRFD( VOID DefragEntryFree( PDEFRAG_ENTRY pEntry, - PADAPTER Adapter + PADAPTER Adapter ) { ReturnRFDList(Adapter, (PRT_RFD)pEntry->pRfdHead); @@ -333,7 +333,7 @@ DefragRecycleRFD( // There may be many ways to recycle RFDs. // Now we only free the LRU RFDs in DefragArray. 2006.07.25, by shien chang. PADAPTER pAdapter; - pAdapter = GetDefaultAdapter(Adapter); + pAdapter = GetDefaultAdapter(Adapter); DefragFreeLRUEntry(pAdapter->DefragArray, MAX_DEFRAG_PEER, pAdapter); } @@ -362,7 +362,7 @@ DefragFreeLRUEntry( { if (!pDefragArray[i].bUsed) continue; - + if (pDefragArray[i].usLastArriveTimeStamp < pDefragArray[target].usLastArriveTimeStamp) target = i; } diff --git a/network/wlan/WDI/COMMON/Defrag.h b/network/wlan/WDI/COMMON/Defrag.h index 690fe7fe0..27f0ddbd0 100644 --- a/network/wlan/WDI/COMMON/Defrag.h +++ b/network/wlan/WDI/COMMON/Defrag.h @@ -73,20 +73,20 @@ DefragEntrySetRFD( pu1Byte pSenderAddr, u1Byte TID, u2Byte SeqNum, - u1Byte FragNum + u1Byte FragNum ); VOID DefragEntryAddRFD( PDEFRAG_ENTRY pEntry, PRT_RFD pRfd, - u1Byte FragNum + u1Byte FragNum ); VOID DefragEntryFree( PDEFRAG_ENTRY pEntry, - PADAPTER Adapter + PADAPTER Adapter ); VOID diff --git a/network/wlan/WDI/COMMON/Dot11d.c b/network/wlan/WDI/COMMON/Dot11d.c index be55b3f46..520904206 100644 --- a/network/wlan/WDI/COMMON/Dot11d.c +++ b/network/wlan/WDI/COMMON/Dot11d.c @@ -3,7 +3,7 @@ // Dot11d.c // // Description: -// Implement 802.11d. +// Implement 802.11d. // //----------------------------------------------------------------------------- @@ -38,7 +38,7 @@ (((__pChannelList)->ScanChannelIndex >= (__pChannelList)->ScanChannelListLength) ? \ NULL : (__pChannelList)->ScanChannelList[(__pChannelList)->ScanChannelIndex ++]) - + #define RtResetChannelList(__pChannelList) \ { \ (__pChannelList)->ChannelPlan = RT_CHANNEL_DOMAIN_MAX; \ @@ -52,7 +52,7 @@ static u1Byte s_MaxChnlList[] = { - 1,2,3,4,5,6,7,8,9,10,11,12,13,14, + 1,2,3,4,5,6,7,8,9,10,11,12,13,14, 36,40,44,48,52,56,60,64,149,153,157,161,165 }; @@ -62,7 +62,7 @@ static u1Byte s_MaxChnlList[] = { #define DOMAIN_CODE_2G_ETSI1 \ {1,2,3,4,5,6,7,8,9,10,11,12,13}, 13 #define DOMAIN_CODE_2G_ETSI2 \ - {1,2,3,4,5,6,7,8,9,10,11,12,13,14}, 14 + {1,2,3,4,5,6,7,8,9,10,11,12,13,14}, 14 #define DOMAIN_CODE_2G_FCC1 \ {1,2,3,4,5,6,7,8,9,10,11}, 11 #define DOMAIN_CODE_2G_MKK1 \ @@ -123,7 +123,7 @@ static u1Byte s_MaxChnlList[] = { {36,40,44,48,52,56,60,64,100,104,108,112,116,132,136,140,149,153,157,161,165}, 21 #define DOMAIN_CODE_5G_FCC10 \ {36,40,44,48,52,56,60,64,100,104,108,112,116,132,136,140,149,153,157,161}, 20 - + #define DOMAIN_CODE_5G_IC1 \ {36,40,44,48,52,56,60,64,100,104,108,112,116,136,140,149,153,157,161,165}, 20 @@ -142,7 +142,7 @@ static u1Byte s_MaxChnlList[] = { #define DOMAIN_CODE_5G_NCC1 \ {56,60,64,100,104,108,112,116,132,136,140,149,153,157,161,165}, 16 #define DOMAIN_CODE_5G_NCC2 \ - {56,60,64,149,153,157,161,165}, 8 + {56,60,64,149,153,157,161,165}, 8 #define DOMAIN_CODE_5G_NCC3 \ {149,153,157,161,165}, 5 #define DOMAIN_CODE_5G_NCC4 \ @@ -161,7 +161,7 @@ static u1Byte s_MaxChnlList[] = { // (2) We shall not add/modify the channel plans excpet when the channels in the channel plan // are different from the existing channel plan. // (3) All extra infomation about the channel plan for customized requests should not put into the -// definitions of the DefaultChannelPlan, and instead, keep the information in the +// definitions of the DefaultChannelPlan, and instead, keep the information in the // RT_CHNL_LIST_ENTRY when we construct the RT_CHANNEL_LIST. To compatible with the // past customized requests, I merge old customized channel plan in the RtConstructChannelList(). // By Bruce, 2008-09-01. @@ -172,169 +172,169 @@ static RT_CHANNEL_PLAN DefaultChannelPlan[RT_CHANNEL_DOMAIN_MAX] = { #if (DFS_TEST_CHNL_PLAN == 1) // The channel plan is for DFS test only. //4 #00 EFUSE_00h: RT_CHANNEL_DOMAIN_FCC - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,100,104,124,128,149,153,157,161,165} ,28, UNDEFINED, UNDEFINED}, -#else + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,100,104,124,128,149,153,157,161,165} ,28, UNDEFINED, UNDEFINED}, +#else //4 #00 EFUSE_00h: RT_CHANNEL_DOMAIN_FCC - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165} ,35, UNDEFINED, UNDEFINED}, + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165} ,35, UNDEFINED, UNDEFINED}, #endif //4 #01 EFUSE_01h: RT_CHANNEL_DOMAIN_IC - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,100,104,108,112,116,136,140,149,153,157,161,165} , 31, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,100,104,108,112,116,136,140,149,153,157,161,165} , 31, UNDEFINED, UNDEFINED}, + //4 #02 EFUSE_02h: RT_CHANNEL_DOMAIN_ETSI - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,100,104,108,112,116,120,124,128,132,136,140} , 31, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,100,104,108,112,116,120,124,128,132,136,140} , 31, UNDEFINED, UNDEFINED}, + //4 #03 EFUSE_03h: RT_CHANNEL_DOMAIN_SPAIN - {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, + //4 #04 EFUSE_04h: RT_CHANNEL_DOMAIN_FRANCE - {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, + //4 #05 EFUSE_05h: RT_CHANNEL_DOMAIN_MKK - {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, + //4 #06 EFUSE_06h: RT_CHANNEL_DOMAIN_MKK1 - {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, + //4 #07 EFUSE_07h: RT_CHANNEL_DOMAIN_ISRAEL - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64} , 21, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64} , 21, UNDEFINED, UNDEFINED}, + //4 #08 EFUSE_08h: RT_CHANNEL_DOMAIN_TELEC - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64} , 22, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64} , 22, UNDEFINED, UNDEFINED}, + //4 #09 EFUSE_09h: RT_CHANNEL_DOMAIN_MIC - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64} , 21, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64} , 21, UNDEFINED, UNDEFINED}, + //4 #10 EFUSE_0Ah: RT_CHANNEL_DOMAIN_GLOBAL_DOMAIN - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14} , 14, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,14} , 14, UNDEFINED, UNDEFINED}, + //4 #11 EFUSE_0Bh: RT_CHANNEL_DOMAIN_WORLD_WIDE_13 - {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13} , 13, UNDEFINED, UNDEFINED}, + //4 #12 EFUSE_0Ch: RT_CHANNEL_DOMAIN_TAIWAN - {{1,2,3,4,5,6,7,8,9,10,11,56,60,64,100,104,108,112,116,136,140,149,153,157,161,165} , 26, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,56,60,64,100,104,108,112,116,136,140,149,153,157,161,165} , 26, UNDEFINED, UNDEFINED}, + //4 #13 EFUSE_0Dh: RT_CHANNEL_DOMAIN_CHIAN - {{1,2,3,4,5,6,7,8,9,10,11,12,13,149,153,157,161,165} , 18, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,149,153,157,161,165} , 18, UNDEFINED, UNDEFINED}, + //4 #14 EFUSE_0Eh: RT_CHANNEL_DOMAIN_SINGAPORE_INDIA_MEXICO - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,149,153,157,161,165} , 24, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,149,153,157,161,165} , 24, UNDEFINED, UNDEFINED}, + //4 #15 EFUSE_0Fh: RT_CHANNEL_DOMAIN_KOREA - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,149,153,157,161,165} , 33, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,149,153,157,161,165} , 33, UNDEFINED, UNDEFINED}, + //4 #16 EFUSE_10h: RT_CHANNEL_DOMAIN_TURKEY - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64} , 19, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64} , 19, UNDEFINED, UNDEFINED}, + //4 #17 EFUSE_11h: RT_CHANNEL_DOMAIN_JAPAN - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140} , 32, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140} , 32, UNDEFINED, UNDEFINED}, + //4 #18 EFUSE_12h: FCC_No_DFS - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,149,153,157,161,165} , 20, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,149,153,157,161,165} , 20, UNDEFINED, UNDEFINED}, + //4 #19 EFUSE_13h: Japan_No_DFS - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48} , 17, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48} , 17, UNDEFINED, UNDEFINED}, + //4 #20 EFUSE_14h: WORLD_WIDE_5G // RT_CHANNEL_DOMAIN_WORLD_WIDE_5G {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165} , 37, UNDEFINED, UNDEFINED}, //4 #21 Taiwan_No_DFS // RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS - {{1,2,3,4,5,6,7,8,9,10,11,56,60,64,149,153,157,161,165},19, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,56,60,64,149,153,157,161,165},19, UNDEFINED, UNDEFINED}, + //4 #22 EFUSE_16h Default 7F: RealtekReserved // RT_CHANNEL_DOMAIN_DEFAULT // 2013/01/29 MH According to new definition from RF team, RTK default channel plan will support all CH. - {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165},37, UNDEFINED, UNDEFINED}, - + {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165},37, UNDEFINED, UNDEFINED}, + //4 #23 EFUSE_17h OmniPeek-All-Channel (RT_CHANNEL_DOMAIN_OMNIPEEK_ALL_CHANNEL): 2.4G and 5G now - {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165},38, UNDEFINED, UNDEFINED}, + {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165},38, UNDEFINED, UNDEFINED}, //4 #24 RT_CHANNEL_DOMAIN_WHQL - {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,149,157,165} , 18, UNDEFINED, UNDEFINED}, + {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,149,157,165} , 18, UNDEFINED, UNDEFINED}, //1 ============= New definition supports 2.4G and 5G ============= // #25 EFUSE_20h: RT_CHANNEL_DOMAIN_WW13_2G 2.4G World Wide 13 {UNDEFINED, DOMAIN_CODE_2G_WORLD, UNDEFINED}, - - // #26 EFUSE_21h: RT_CHANNEL_DOMAIN_EUROPE_2G 2.4G Europe + + // #26 EFUSE_21h: RT_CHANNEL_DOMAIN_EUROPE_2G 2.4G Europe {UNDEFINED, DOMAIN_CODE_2G_ETSI1, UNDEFINED}, - + // #27 EFUSE_22h: RT_CHANNEL_DOMAIN_US_2G 2.4G US {UNDEFINED, DOMAIN_CODE_2G_FCC1, UNDEFINED}, - + // #28 EFUSE_23h: RT_CHANNEL_DOMAIN_JAPAN_2G 2.4G Japan {UNDEFINED, DOMAIN_CODE_2G_MKK1, UNDEFINED}, - + // #29 EFUSE_24h: RT_CHANNEL_DOMAIN_FRANCE_2G 2.4G France {UNDEFINED, DOMAIN_CODE_2G_ETSI2, UNDEFINED}, - + // #30 EFUSE_25h: RT_CHANNEL_DOMAIN_US_2G_5G 2.4G/5G US {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC1}, - + // #31 EFUSE_26h: RT_CHANNEL_DOMAIN_WW13_2G_EUROPE_5G 2.4G World Wide 13 + 5G Europe {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI1}, - - // #32 EFUSE_27h: RT_CHANNEL_DOMAIN_JAPAN_2G_5G 2.4G/5G Japan + + // #32 EFUSE_27h: RT_CHANNEL_DOMAIN_JAPAN_2G_5G 2.4G/5G Japan {UNDEFINED, DOMAIN_CODE_2G_MKK1, DOMAIN_CODE_5G_MKK1}, - + // #33 EFUSE_28h: RT_CHANNEL_DOMAIN_WW13_2G_KOREA_5G 2.4G World Wide 13 + 5G Korea {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_KCC1}, - + // #34 EFUSE_29h: RT_CHANNEL_DOMAIN_WW13_2G_US_5G 2.4G World Wide 13 + 5G US/DFS Channels {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_FCC2}, - - // #35 EFUSE_30h: RT_CHANNEL_DOMAIN_WW13_2G_INDIA_5G 2.4G World Wide 13 + 5G India/Mexico + + // #35 EFUSE_30h: RT_CHANNEL_DOMAIN_WW13_2G_INDIA_5G 2.4G World Wide 13 + 5G India/Mexico {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_FCC3}, - - // #36 EFUSE_31h: RT_CHANNEL_DOMAIN_WW13_2G_VENEZUELA_5G 2.4G World Wide 13 + 5G Venezuela + + // #36 EFUSE_31h: RT_CHANNEL_DOMAIN_WW13_2G_VENEZUELA_5G 2.4G World Wide 13 + 5G Venezuela {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_FCC4}, - - // #37 EFUSE_32h: RT_CHANNEL_DOMAIN_WW13_2G_CHINA_5G 2.4G World Wide 13 + 5G China + + // #37 EFUSE_32h: RT_CHANNEL_DOMAIN_WW13_2G_CHINA_5G 2.4G World Wide 13 + 5G China {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_FCC5}, - - // #38 EFUSE_33h: RT_CHANNEL_DOMAIN_WW13_2G_ISRAEL_5G 2.4G World Wide 13 + 5G Israel + + // #38 EFUSE_33h: RT_CHANNEL_DOMAIN_WW13_2G_ISRAEL_5G 2.4G World Wide 13 + 5G Israel {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_FCC6}, - + // #39 EFUSE_34h: RT_CHANNEL_DOMAIN_US_2G_CANADA_5G 2.4G US + 5G US/Canada {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC7}, - + // #40 EFUSE_35h: RT_CHANNEL_DOMAIN_WW13_2G_AUSTRALIA_5G 2.4G World Wide 13 + 5G Australia/New Zealand {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI2}, - + // #41 EFUSE_36h: RT_CHANNEL_DOMAIN_WW13_2G_RUSSIA_5G 2.4G World Wide 13 + 5G Russia {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI3}, - + // #42 EFUSE_37h: RT_CHANNEL_DOMAIN_JAPAN_2G_W52_W53_5G 2.4G Japan + 5G Japan(W52, W53) {UNDEFINED, DOMAIN_CODE_2G_MKK1, DOMAIN_CODE_5G_MKK2}, - + // #43 EFUSE_38h: RT_CHANNEL_DOMAIN_JAPAN_2G_W56_5G {UNDEFINED, DOMAIN_CODE_2G_MKK1, DOMAIN_CODE_5G_MKK3}, - + // #44 EFUSE_39h: RT_CHANNEL_DOMAIN_US_2G_TAIWAN_5G {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_NCC1}, - + // #45 EFUSE_40h: RT_CHANNEL_DOMAIN_US_2G_TAIWAN_DFS_5G - {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_NCC2}, + {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_NCC2}, // #46 EFUSE_41h: RT_CHANNEL_DOMAIN_GLOBAL_DOMAIN_2G - {UNDEFINED, DOMAIN_CODE_2G_GLOBAL, UNDEFINED}, + {UNDEFINED, DOMAIN_CODE_2G_GLOBAL, UNDEFINED}, // #47 EFUSE_42h: RT_CHANNEL_DOMAIN_2G_ETSI1_5G_ETSI4 - {UNDEFINED, DOMAIN_CODE_2G_ETSI1, DOMAIN_CODE_5G_ETSI4}, + {UNDEFINED, DOMAIN_CODE_2G_ETSI1, DOMAIN_CODE_5G_ETSI4}, // #48 EFUSE_43h: RT_CHANNEL_DOMAIN_2G_FCC1_5G_FCC2 - {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC2}, + {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC2}, // #49 EFUSE_44h: RT_CHANNEL_DOMAIN_2G_FCC1_5G_NCC3 - {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_NCC3}, + {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_NCC3}, // #50 EFUSE_45h: RT_CHANNEL_DOMAIN_WW13_2G_5G_ETSI5 - {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI5}, + {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI5}, // #51 EFUSE_46h: RT_CHANNEL_DOMAIN_2G_FCC1_5G_FCC8 - {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC8}, + {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC8}, // #52 EFUSE_47h: RT_CHANNEL_DOMAIN_WW13_2G_5G_ETSI6 - {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI6}, + {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI6}, // #53 EFUSE_48h: RT_CHANNEL_DOMAIN_WW13_2G_5G_ETSI7 {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI7}, @@ -359,26 +359,26 @@ static RT_CHANNEL_PLAN DefaultChannelPlan[RT_CHANNEL_DOMAIN_MAX] = { // #60 EFUSE_55h: RT_CHANNEL_DOMAIN_2G_FCC1_5G_FCC9 {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC9}, - + // #61 EFUSE_56h: RT_CHANNEL_DOMAIN_WW13_2G_5G_ETSI13 {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI13}, // #62 EFUSE_57h: RT_CHANNEL_DOMAIN_2G_FCC1_5G_FCC10 {UNDEFINED, DOMAIN_CODE_2G_FCC1, DOMAIN_CODE_5G_FCC10}, - + // #63 EFUSE_58h: RT_CHANNEL_DOMAIN_2G_MKK2_5G_MKK4 {UNDEFINED, DOMAIN_CODE_2G_MKK2, DOMAIN_CODE_5G_MKK4}, - + // #64 EFUSE_59h: RT_CHANNEL_DOMAIN_WW13_2G_5G_ETSI14 {UNDEFINED, DOMAIN_CODE_2G_WORLD, DOMAIN_CODE_5G_ETSI14}, - + //1 ============= End of customer definition ============= //4 RT_CHANNEL_DOMAIN_WHQL_WFD {UNDEFINED, DOMAIN_CODE_2G_WHQL_WFD, DOMAIN_CODE_5G_WHQL_WFD}, //1 ============= End of New definition ============= -}; +}; /*------------------------Private of Protected Funtion Declaration-------------------------------------*/ // The following function are called only in Dot11d.c @@ -424,7 +424,7 @@ DumpScanChannelList( /*------------------------ End of Private of Protected Funtion Declaration------------------------------*/ //------------------------------------------------------------------------------ -// Debug routines. +// Debug routines. //------------------------------------------------------------------------------ #if DBG VOID @@ -455,7 +455,7 @@ DumpChannelList( RT_TRACE(COMP_SCAN, DBG_TRACE, ("\n")); FunctionOut(COMP_SCAN); - + } VOID @@ -478,20 +478,20 @@ DumpScanChannelList( // <20140311, Kordan> Knuth Shuffle Algorithm // Please refer to http://rosettacode.org/wiki/Knuth_shuffle#C -void _shuffle(PRT_CHNL_LIST_ENTRY *list, u1Byte len) { - u4Byte j; - PRT_CHNL_LIST_ENTRY tmp; - - while(len) { - j = (u4Byte)(PlatformGetCurrentTime()%len); - if (j != len - 1) { - tmp = list[j]; +void _shuffle(PRT_CHNL_LIST_ENTRY *list, u1Byte len) { + u4Byte j; + PRT_CHNL_LIST_ENTRY tmp; + + while(len) { + j = (u4Byte)(PlatformGetCurrentTime()%len); + if (j != len - 1) { + tmp = list[j]; list[j] = list[len - 1]; - list[len - 1] = tmp; - } + list[len - 1] = tmp; + } len--; - } -} + } +} VOID shuffleScanChannelList( @@ -538,10 +538,10 @@ Dot11d_Reset( // // Description: -// Update country IE from Beacon or Probe Resopnse +// Update country IE from Beacon or Probe Resopnse // and configure PHY for operation in the regulatory domain. // -// TODO: +// TODO: // Configure Tx power. // // Assumption: @@ -552,7 +552,7 @@ VOID Dot11d_UpdateCountryIe( IN PADAPTER pAdapter, IN pu1Byte pTaddr, - IN POCTET_STRING posCoutryIe + IN POCTET_STRING posCoutryIe ) { PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); @@ -566,20 +566,20 @@ Dot11d_UpdateCountryIe( pTriple = (PCHNL_TXPOWER_TRIPLE)(posCoutryIe->Octet + 3); if(posCoutryIe->Length > MAX_IE_LEN) - return; - + return; + for(i = 0; i < NumTriples; i++) { if(MaxChnlNum >= pTriple->FirstChnl) { // It is not in a monotonically increasing order, so stop processing. RT_TRACE(COMP_SCAN, DBG_WARNING, ("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........\n")); - return; + return; } if((pTriple->NumChnls+ChnlListLen) > DOT11D_MAX_CHNL_NUM) {// To prevent malicious attack. Added by Roger, 2010.02.24. RT_TRACE(COMP_SCAN, DBG_WARNING, ("Dot11d_UpdateCountryIe(): Invalid channel list length, skip it........\n")); - return; + return; } for(j = 0 ; j < pTriple->NumChnls; j++) @@ -588,24 +588,24 @@ Dot11d_UpdateCountryIe( pDot11dInfo->MaxTxPwrDbmList[ChnlListLen] = pTriple->MaxTxPowerInDbm; MaxChnlNum = pDot11dInfo->ChnlList[ChnlListLen];// Keep tracking maximal channel number. ChnlListLen++; - } + } pTriple = (PCHNL_TXPOWER_TRIPLE)((pu1Byte)pTriple + 3); } pDot11dInfo->ChnlListLen = ChnlListLen; - RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "Dot11d_UpdateCountryIe(): Channel List:", + RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "Dot11d_UpdateCountryIe(): Channel List:", pDot11dInfo->ChnlList, pDot11dInfo->ChnlListLen); UPDATE_CIE_SRC(pMgntInfo, pTaddr); pDot11dInfo->CountryIeLen = posCoutryIe->Length; PlatformMoveMemory( - pDot11dInfo->CountryIeBuf, + pDot11dInfo->CountryIeBuf, posCoutryIe->Octet, pDot11dInfo->CountryIeLen); pDot11dInfo->State = DOT11D_STATE_LEARNED; RT_PRINT_STR(COMP_SCAN, DBG_LOUD, "Dot11d_UpdateCountryIe(): Country Code", &pDot11dInfo->CountryIeBuf[0], 3); - RT_PRINT_DATA(COMP_SCAN, DBG_TRACE, "Dot11d_UpdateCountryIe(): Country IE:", + RT_PRINT_DATA(COMP_SCAN, DBG_TRACE, "Dot11d_UpdateCountryIe(): Country IE:", pDot11dInfo->CountryIeBuf, pDot11dInfo->CountryIeLen); AddDrvLog(pAdapter, LID_DOT11D_GET_COUNTRY_IE, pDot11dInfo->CountryIeBuf, pDot11dInfo->CountryIeLen); } @@ -614,7 +614,7 @@ Dot11d_UpdateCountryIe( // // Assumption: // 1. IS_DOT11D_ENABLE() is TRUE. -// 2. Channel numbers in s_MaxChnlList[] or pDot11dInfo->ChnlList +// 2. Channel numbers in s_MaxChnlList[] or pDot11dInfo->ChnlList // are monotonically increasing. // u1Byte @@ -679,7 +679,7 @@ DOT11D_GetMaxTxPwrInDbm( { if(Channel == pDot11dInfo->ChnlList[ChnlIdx]) { - MaxTxPwrInDbm = (s4Byte)pDot11dInfo->MaxTxPwrDbmList[ChnlIdx]; + MaxTxPwrInDbm = (s4Byte)pDot11dInfo->MaxTxPwrDbmList[ChnlIdx]; break; } } @@ -700,18 +700,18 @@ DOT11D_ScanComplete( { case DOT11D_STATE_LEARNED: pDot11dInfo->State = DOT11D_STATE_DONE; - + // Reset the channel list because dot11d has changed. RtResetChannelList(GET_RT_CHANNEL_LIST(pMgntInfo)); break; case DOT11D_STATE_DONE: if( GET_CIE_WATCHDOG(pMgntInfo) == 0 ) - { // Reset country IE if previous one is gone. - Dot11d_Reset(Adapter); + { // Reset country IE if previous one is gone. + Dot11d_Reset(Adapter); } break; - + default: //MacOS warning:enum value "DOT11D_STATE_NONE" not handled in switch break; } @@ -745,7 +745,7 @@ RtActChannelList( { PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); BOOLEAN bResult = TRUE; - + switch(ActionCode) { case RT_CHNL_LIST_ACTION_INIT: @@ -761,23 +761,23 @@ RtActChannelList( case RT_CHNL_LIST_ACTION_GET_CHANNEL_LIST: { PlatformAcquireSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); - + if(!IS_CHANNEL_LIST_VALID(pMgntInfo)) { PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("RtActChannelList(): <=====RT_CHNL_LIST_ACTION_GET_CHANNEL_LIST IS_CHANNEL_LIST_VALID FALSE\n")); - + RtConstructChannelList(pAdapter); // Because RtConstructChannelList() will reset the scan list, so we construct again bResult = RtConstructScanList(pAdapter); - RT_ASSERT(bResult, ("RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_LIST fail!!\n")); + RT_ASSERT(bResult, ("RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_LIST fail!!\n")); } else { PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); } - + // Save the channel list address to the output context. if(pOutputBuf) *((PRT_CHANNEL_LIST*)pOutputBuf) = GET_RT_CHANNEL_LIST(pMgntInfo); @@ -801,14 +801,14 @@ RtActChannelList( if(!IS_CHANNEL_LIST_VALID(pMgntInfo)) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("RtActChannelList(): <=====RT_CHNL_LIST_ACTION_UPDATE(ADD)_CHANNEL IS_CHANNEL_LIST_VALID FALSE\n")); - + PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); - + RtConstructChannelList(pAdapter); } else { - PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); + PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); } pChnlListEntry = RtGetChnlListEntry(pAdapter, pChannelUpdateInfo->ChannelNum); @@ -840,7 +840,7 @@ RtActChannelList( u1Byte Channel = *((pu1Byte)pInputBuf); PRT_CHANNEL_LIST pChannelList = GET_RT_CHANNEL_LIST(pMgntInfo); u1Byte i; - + bResult = FALSE; for(i = 0; i < pChannelList->ChannelLen; i ++) { @@ -868,13 +868,13 @@ RtActChannelList( if(!IS_CHANNEL_LIST_VALID(pMgntInfo)) { RT_TRACE(COMP_SCAN, DBG_TRACE, ("RtActChannelList(): <=====RT_CHNL_LIST_ACTION_GET_CHANNEL IS_CHANNEL_LIST_VALID FALSE\n")); - - PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); + + PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); RtConstructChannelList(pAdapter); } else { - PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); + PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); } if((pChnlListEntry = RtGetChnlListEntry(pAdapter, Channel)) != NULL) @@ -904,7 +904,7 @@ RtActChannelList( bResult = RtConstructScanList(pAdapter); } //RT_ASSERT(bResult, ("RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_LIST fail!!\n")); - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("RtActChannelList(): <=====RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_LIST\n")); break; @@ -946,7 +946,7 @@ RtActChannelList( } if(pChannelList != NULL) - RT_TRACE(COMP_SCAN, DBG_LOUD, ("RtActChannelList(): <=====RT_CHNL_LIST_ACTION_GET_SCAN_CHANNEL index %d length %d channellength %d\n", pChannelList->ScanChannelIndex, pChannelList->ScanChannelListLength, pChannelList->ChannelLen)); + RT_TRACE(COMP_SCAN, DBG_LOUD, ("RtActChannelList(): <=====RT_CHNL_LIST_ACTION_GET_SCAN_CHANNEL index %d length %d channellength %d\n", pChannelList->ScanChannelIndex, pChannelList->ScanChannelListLength, pChannelList->ChannelLen)); } break; @@ -956,7 +956,7 @@ RtActChannelList( *(RT_CHANNEL_PLAN **)pOutputBuf = &DefaultChannelPlan[*(RT_CHANNEL_DOMAIN *)pInputBuf]; } break; - + default: bResult = FALSE; RT_TRACE(COMP_SCAN, DBG_WARNING, ("RtActChannelList(): NO RT_CHNL_LIST_ACTION!!!\n")); @@ -1018,7 +1018,7 @@ RtCustomizeChannelList( { pChnlListEntry = &(pChnlList[i]); - // (1) Start IBSS at channel 1~11. + // (1) Start IBSS at channel 1~11. // (2) Join IBSS at channel 1~11. if(pChnlListEntry->ChannelNum >= 12 && pChnlListEntry->ChannelNum <= 14) { @@ -1029,7 +1029,7 @@ RtCustomizeChannelList( { pChnlListEntry->ExInfo &= ~CHANNEL_EXINFO_NO_IBSS_JOIN; pChnlListEntry->ExInfo &= ~CHANNEL_EXINFO_NO_IBSS_START; - } + } // (3) Channel 1~11 is active, and 12~14 is passive when dot11 is not learned yet. if(!IS_COUNTRY_IE_VALID(pMgntInfo)) @@ -1041,7 +1041,7 @@ RtCustomizeChannelList( } if((pChnlListEntry->ChannelNum >= 12 && pChnlListEntry->ChannelNum <= 14)) - { + { pChnlListEntry->ScanType = SCAN_PASSIVE; pChnlListEntry->ScanPeriod = DEFAULT_PASSIVE_SCAN_PERIOD; } @@ -1049,13 +1049,13 @@ RtCustomizeChannelList( } } break; - + case RT_CHANNEL_DOMAIN_WORLD_WIDE_13: { for(i = 0; i < ChannelLen; i ++) { pChnlListEntry = &(pChnlList[i]); - + // (1) Channel 14 is disable if(pChnlListEntry->ChannelNum == 14) { @@ -1066,7 +1066,7 @@ RtCustomizeChannelList( ChannelLen --; break; } - + // (2) Join IBSS at channel 1~11. // (3) Start IBSS at channel 1~11. // (4) channel 12~13, passive scan @@ -1085,7 +1085,7 @@ RtCustomizeChannelList( for(i = 0; i < ChannelLen; i ++) { pChnlListEntry = &(pChnlList[i]); - + // (2) Join IBSS at channel 1~11. // (3) Start IBSS at channel 1~11. // (4) channel 12~13, passive scan @@ -1103,17 +1103,17 @@ RtCustomizeChannelList( default: break; } - + switch(pMgntInfo->CustomerID) { - + case RT_CID_WHQL: { for(i = 0; i < ChannelLen; i ++) { pChnlListEntry = &(pChnlList[i]); - pChnlListEntry->ScanPeriod = SCAN_PERIOD_Long_Win_DTM; + pChnlListEntry->ScanPeriod = SCAN_PERIOD_Long_Win_DTM; } } break; @@ -1133,26 +1133,26 @@ _ForcedChannelPlan( pu1Byte pChannelLen ) { - ps1Byte s = (ps1Byte)((bIs5G) ? -pMgntInfo->RegChannelPlan5G.Octet : + ps1Byte s = (ps1Byte)((bIs5G) ? +pMgntInfo->RegChannelPlan5G.Octet : pMgntInfo->RegChannelPlan2G.Octet); - u2Byte len = ((bIs5G) ? -pMgntInfo->RegChannelPlan5G.Length : - pMgntInfo->RegChannelPlan2G.Length); + u2Byte len = ((bIs5G) ? +pMgntInfo->RegChannelPlan5G.Length : + pMgntInfo->RegChannelPlan2G.Length); u2Byte c = 0, n = 0, i = 0; RT_TRACE( COMP_INIT, DBG_LOUD, ("===> _ForcedChannelPlan\n")); - - if (bIs5G) + + if (bIs5G) if (pMgntInfo->RegChannelPlan5G.bDefaultStr) return; - else + else if (pMgntInfo->RegChannelPlan2G.bDefaultStr) - return; + return; PlatformZeroMemory(pChnlList, *pChannelLen); *pChannelLen = 0; - + for (i = 0; i < len; ++i, ++s) { while (*s != ',' && *s >= '0' && *s <= '9') { c = 10 * c + (*s - '0'); @@ -1163,8 +1163,8 @@ pMgntInfo->RegChannelPlan5G.Length : } *pChannelLen = (u1Byte)n; - - RT_TRACE( COMP_INIT, DBG_LOUD, ("<=== _ForcedChannelPlan\n")); + + RT_TRACE( COMP_INIT, DBG_LOUD, ("<=== _ForcedChannelPlan\n")); } // @@ -1193,7 +1193,7 @@ RtConstructChannelList( if(ChannelPlan >= RT_CHANNEL_DOMAIN_MAX) // Channel Plan is invalid, fix it. pMgntInfo->ChannelPlan = RT_CHANNEL_DOMAIN_FCC; - + RtResetChannelList(pChannelList); pChannelList->ChannelPlan = ChannelPlan; @@ -1211,10 +1211,10 @@ RtConstructChannelList( ChnlsLen = Dot11d_GetChannelList(pAdapter, &pChnlList); if(ChnlsLen > MAX_CHANNEL_NUM) - { + { PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); return FALSE; - } + } for(i = 0; i < ChnlsLen; i ++) { @@ -1235,7 +1235,7 @@ RtConstructChannelList( } else pChnlListEntry->ScanType = scanType; - + pChnlListEntry->ScanPeriod = (scanType == SCAN_ACTIVE) ? DEFAULT_ACTIVE_SCAN_PERIOD : DEFAULT_PASSIVE_SCAN_PERIOD; pChnlListEntry->MaxTxPwrDbm = DOT11D_GetMaxTxPwrInDbm(pAdapter, pChnlListEntry->ChannelNum); pChnlListEntry->ExInfo = 0; @@ -1244,7 +1244,7 @@ RtConstructChannelList( { // domain learning is not complete, we cannot start IBSS. pChnlListEntry->ExInfo |= CHANNEL_EXINFO_NO_IBSS_START; } - + pChannelList->ChannelLen ++; } @@ -1253,35 +1253,35 @@ RtConstructChannelList( else { // Normal Case u1Byte usbswchnl; - RT_TRACE( COMP_SCAN, DBG_LOUD, ("_RT_CHANNEL_DOMAIN(0x%X) mapped from hal_MapChannelPlan: %s channel plan is applied.\n", + RT_TRACE( COMP_SCAN, DBG_LOUD, ("_RT_CHANNEL_DOMAIN(0x%X) mapped from hal_MapChannelPlan: %s channel plan is applied.\n", ChannelPlan, (ChannelPlan >= RT_CHANNEL_DOMAIN_WHQL)?"New":"Legacy")); if (ChannelPlan < RT_CHANNEL_DOMAIN_WW13_2G) { pChnlList = DefaultChannelPlan[pChannelList->ChannelPlan].Channel; - ChnlsLen = DefaultChannelPlan[pChannelList->ChannelPlan].Len; + ChnlsLen = DefaultChannelPlan[pChannelList->ChannelPlan].Len; } else { if(IS_WIRELESS_MODE_5G(pAdapter)) { pChnlList = DefaultChannelPlan[pChannelList->ChannelPlan].Channel5G; - ChnlsLen = DefaultChannelPlan[pChannelList->ChannelPlan].Len5G; + ChnlsLen = DefaultChannelPlan[pChannelList->ChannelPlan].Len5G; RT_TRACE(COMP_SCAN, DBG_LOUD, ("===>RtConstructChannelList, DefaultChannelPlan[%d].Channel5G: ", pChannelList->ChannelPlan)); } else { pChnlList = DefaultChannelPlan[pChannelList->ChannelPlan].Channel2_4G; - ChnlsLen = DefaultChannelPlan[pChannelList->ChannelPlan].Len2_4G; + ChnlsLen = DefaultChannelPlan[pChannelList->ChannelPlan].Len2_4G; RT_TRACE(COMP_SCAN, DBG_LOUD, ("===>RtConstructChannelList, DefaultChannelPlan[%d].Channel2.4G: ", pChannelList->ChannelPlan)); - } - + } + } if (pMgntInfo->RegChannelPlan2G.bDefaultStr != TRUE || pMgntInfo->RegChannelPlan5G.bDefaultStr != TRUE) _ForcedChannelPlan(pMgntInfo, IS_WIRELESS_MODE_5G(pAdapter), pChnlList, &ChnlsLen); - + for(i = 0; i < ChnlsLen; i ++) { @@ -1291,9 +1291,9 @@ RtConstructChannelList( // RT_TRACE_F(COMP_SCAN, DBG_LOUD, ("Skip channel (%d) for wirelessMode (%d)\n", pChnlList[i], pMgntInfo->dot11CurrentWirelessMode)); continue; } - + pChnlListEntry = &(pChannelList->ChnlListEntry[pChannelList->ChannelLen]); - + pChnlListEntry->ChannelNum = pChnlList[i]; // For 5G FCC Radar channel, default passive scan @@ -1309,7 +1309,7 @@ RtConstructChannelList( { // 0= by channel plan, 1=5g all passive scan / 2= 24g passive scan /3= 2/5g all passive scan if (pMgntInfo->RegPassiveScan == 1 && pChnlListEntry->ChannelNum >= 36) - { + { RT_TRACE( COMP_DFS, DBG_LOUD, ("CHNL-%d passive scan", pChnlListEntry->ChannelNum)); pChnlListEntry->ScanType = SCAN_PASSIVE; } @@ -1342,7 +1342,7 @@ RtConstructChannelList( pChnlListEntry->MaxTxPwrDbm = UNSPECIFIED_PWR_DBM; pChnlListEntry->ExInfo = 0; - pChannelList->ChannelLen ++; + pChannelList->ChannelLen ++; } RT_TRACE(COMP_SCAN, DBG_LOUD, ("===>RtConstructChannelList, ChannelList: ")); for (i = 0; i < pChannelList->ChannelLen; ++i) @@ -1373,13 +1373,13 @@ RtConstructChannelList( { pChnlListEntry = &(pChannelList->ChnlListEntry[i]); pChnlListEntry->ScanPeriod = SCAN_PERIOD_Long; - } + } } DumpChannelList(pAdapter); PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); - + FunctionOut(COMP_SCAN); return TRUE; @@ -1409,7 +1409,7 @@ RtGetConnectedChannels( if(IsAPModeExist(pDefaultAdapter)) { bDuplicate = FALSE; - + for(i = 0; i < uNumberOfConnectedChannel; i++) { if(ConnectedChannels[i] == pDefaultAdapter->MgntInfo.dot11CurrentChannelNumber) @@ -1426,11 +1426,11 @@ RtGetConnectedChannels( } // -------------------------------------------------------------------------------------------------------- - + return uNumberOfConnectedChannel; } - + // // Description: @@ -1452,14 +1452,14 @@ RtConstructScanList( u1Byte ConnectedChannels[MAX_SCAN_CHANNEL_NUM]; u1Byte uNumberOfConnectedChannel = 0; - + const u1Byte CountForAddConnectedChannel = 2; - u1Byte uAccumulatedCountForAdd = 0; + u1Byte uAccumulatedCountForAdd = 0; u1Byte BackupScanChannelListLength; PRT_CHNL_LIST_ENTRY BackupScanChannelList[MAX_SCAN_CHANNEL_NUM]; BOOLEAN bRet = FALSE; - + if(pAdapter->pNdis62Common != NULL) RT_TRACE_F(COMP_SCAN, DBG_LOUD, ("port number %d \n", pAdapter->pNdis62Common->PortNumber)); @@ -1507,7 +1507,7 @@ RtConstructScanList( } } } - + if(pFinalChnlListEntry) { RtInsertScanChannel(pChannelList, pFinalChnlListEntry); @@ -1517,7 +1517,7 @@ RtConstructScanList( if(pMgntInfo->bNeedSkipScan )//Add hidded ssid's channel to first place. { PRT_CHNL_LIST_ENTRY ptmpChnlListEntry = NULL; - ptmpChnlListEntry = (pChannelList->ScanChannelList[0]); + ptmpChnlListEntry = (pChannelList->ScanChannelList[0]); for(j = 1; j < pChannelList->ChannelLen; j ++) { pChnlListEntry = (pChannelList->ScanChannelList[j]); @@ -1535,13 +1535,13 @@ RtConstructScanList( // Construct Connected Channels: --------------------------------------------------------------- uNumberOfConnectedChannel = RtGetConnectedChannels(pAdapter, ConnectedChannels, MAX_SCAN_CHANNEL_NUM); - RT_TRACE(COMP_SCAN, DBG_LOUD, ("%s: uNumberOfConnectedChannel: %d\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, ("%s: uNumberOfConnectedChannel: %d\n", __FUNCTION__, uNumberOfConnectedChannel) ); - + for(i = 0; i < uNumberOfConnectedChannel; i++) { - RT_TRACE(COMP_SCAN, DBG_LOUD, ("%s: Connected Channel: %d\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, ("%s: Connected Channel: %d\n", __FUNCTION__, ConnectedChannels[i]) ); } @@ -1568,10 +1568,10 @@ RtConstructScanList( // Set the Flag for Connected Channel pChnlListEntry->ExInfo |= CHANNEL_EXINFO_CONNECTED_CHANNEL; - + for(j = 0, uAccumulatedCountForAdd = 0; j < BackupScanChannelListLength; j++) { - RtInsertScanChannel(pChannelList, BackupScanChannelList[j]); + RtInsertScanChannel(pChannelList, BackupScanChannelList[j]); if(BackupScanChannelList[j]->ChannelNum != ConnectedChannels[k]) {// Different Channel @@ -1579,7 +1579,7 @@ RtConstructScanList( if(uAccumulatedCountForAdd % CountForAddConnectedChannel == 0) {// Insert Connected Channel - RtInsertScanChannel(pChannelList, pChnlListEntry); + RtInsertScanChannel(pChannelList, pChnlListEntry); } } else @@ -1587,7 +1587,7 @@ RtConstructScanList( uAccumulatedCountForAdd = 0; } } - + break; } } @@ -1607,7 +1607,7 @@ RtConstructScanList( DumpScanChannelList(pAdapter); bRet = (0 != pChannelList->ScanChannelListLength); } - + PlatformReleaseSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); FunctionOut(COMP_SCAN); @@ -1645,7 +1645,7 @@ RtCalcScanStatistic( pChannelList->EachChannelSTAs[j]++; break; } - } + } } } @@ -1664,13 +1664,13 @@ RtCalcScanPeriod( PRT_CHANNEL_LIST pChannelList = GET_RT_CHANNEL_LIST(pMgntInfo); static u1Byte Scan5gCnt = 0; BOOLEAN bShortScanPeriod = FALSE; - - if(IsActiveAPModeExist(pAdapter) - /*||pMgntInfo->mAssoc || pMgntInfo->bMediaConnect*/)// comment out for temporary solve less AP scaned when connected, Sean, 201501 - { + + if(IsActiveAPModeExist(pAdapter) + /*||pMgntInfo->mAssoc || pMgntInfo->bMediaConnect*/)// comment out for temporary solve less AP scaned when connected, Sean, 201501 + { bShortScanPeriod = TRUE; } - + if(IS_5G_WIRELESS_MODE(pChannelList->WirelessMode)) Scan5gCnt++; @@ -1753,7 +1753,7 @@ RtCalcScanPeriod( else pChannelList->ChnlListEntry[i].ScanPeriod = pMgntInfo->RegScanActive; } - + RT_TRACE(COMP_SCAN, DBG_TRACE, ("channel %d STAs %d Period %d\n", pChannelList->ChnlListEntry[i].ChannelNum, pChannelList->EachChannelSTAs[i], pChannelList->ChnlListEntry[i].ScanPeriod)); } @@ -1761,7 +1761,7 @@ RtCalcScanPeriod( //sherry sync with 92C_92D, 20110701 GetDualBandChannelList -u1Byte +u1Byte RtGetDualBandChannel( IN PADAPTER Adapter, OUT PRT_CHNL_LIST_ENTRY ChnlListEntryArray @@ -1797,10 +1797,10 @@ RtGetDualBandChannel( if(listLen > MAX_CHANNEL_NUM) listLen = MAX_CHANNEL_NUM; - + RT_TRACE(COMP_SCAN, DBG_LOUD,("RtGetDualBandChannel: Dot11d case listLen %d \n", listLen)); RT_TRACE(COMP_SCAN, DBG_LOUD, ("ChannelNum")); - + for(i = 0; i < listLen; i ++) { ChnlListEntryArray[i].ChannelNum = pChnlList[i]; @@ -1819,10 +1819,10 @@ RtGetDualBandChannel( } else { // Normal Case - + RT_TRACE(COMP_SCAN, DBG_LOUD,("RtGetDualBandChannel: Normal case")); - //RT_CHANNEL_DOMAIN_WW13_2G and after are in new format to support both 2.4G & 5G + //RT_CHANNEL_DOMAIN_WW13_2G and after are in new format to support both 2.4G & 5G if(pMgntInfo->ChannelPlan < RT_CHANNEL_DOMAIN_WW13_2G) { RT_TRACE(COMP_SCAN, DBG_LOUD,("DefaultChannelPlan[%d].Len %d \n", pMgntInfo->ChannelPlan, DefaultChannelPlan[pMgntInfo->ChannelPlan].Len)); @@ -1841,7 +1841,7 @@ RtGetDualBandChannel( { RT_TRACE(COMP_SCAN, DBG_LOUD,("DefaultChannelPlan[%d].Len2_4G %d \n", pMgntInfo->ChannelPlan, DefaultChannelPlan[pMgntInfo->ChannelPlan].Len2_4G)); RT_TRACE(COMP_SCAN, DBG_LOUD, ("ChannelNum")); - + for(i = 0; i < DefaultChannelPlan[pMgntInfo->ChannelPlan].Len2_4G; i++) { ChnlListEntryArray[i].ChannelNum = DefaultChannelPlan[pMgntInfo->ChannelPlan].Channel2_4G[i]; @@ -1854,7 +1854,7 @@ RtGetDualBandChannel( ChannelLen = DefaultChannelPlan[pMgntInfo->ChannelPlan].Len2_4G; for(i = 0; i < DefaultChannelPlan[pMgntInfo->ChannelPlan].Len5G; i++) { - ChnlListEntryArray[ChannelLen].ChannelNum = DefaultChannelPlan[pMgntInfo->ChannelPlan].Channel5G[i]; + ChnlListEntryArray[ChannelLen].ChannelNum = DefaultChannelPlan[pMgntInfo->ChannelPlan].Channel5G[i]; RT_TRACE(COMP_SCAN, DBG_LOUD,(" %d ",ChnlListEntryArray[ChannelLen].ChannelNum)); ChannelLen++; } @@ -1865,7 +1865,7 @@ RtGetDualBandChannel( for(i = 0; i < ChannelLen; i ++) { - // For 5G FCC Radar channel, default passive scan + // For 5G FCC Radar channel, default passive scan if(DFS_5G_RADAR_CHANNEL(ChnlListEntryArray[i].ChannelNum)) ChnlListEntryArray[i].ScanType = SCAN_PASSIVE; else @@ -1874,7 +1874,7 @@ RtGetDualBandChannel( } RT_TRACE(COMP_SCAN, DBG_LOUD,("pMgntInfo->ChannelPlan %d \n",pMgntInfo->ChannelPlan)); - + ChannelLen = RtCustomizeChannelList(pMgntInfo, pMgntInfo->ChannelPlan, ChannelLen, ChnlListEntryArray); return ChannelLen; diff --git a/network/wlan/WDI/COMMON/Dot11d.h b/network/wlan/WDI/COMMON/Dot11d.h index e15d4dbb1..2efafecc0 100644 --- a/network/wlan/WDI/COMMON/Dot11d.h +++ b/network/wlan/WDI/COMMON/Dot11d.h @@ -27,7 +27,7 @@ typedef struct _RT_DOT11D_INFO { u2Byte CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element. u1Byte CountryIeBuf[MAX_IE_LEN]; u1Byte CountryIeSrcAddr[6]; // Source AP of the country IE. - u1Byte CountryIeWatchdog; + u1Byte CountryIeWatchdog; u1Byte ChnlListLen; // #Bytes valid in ChnlList[]. u1Byte ChnlList[DOT11D_MAX_CHNL_NUM]; @@ -40,8 +40,8 @@ typedef enum _REGULATION_TXPWR_LMT { TXPWR_LMT_FCC = 0, TXPWR_LMT_MKK = 1, TXPWR_LMT_ETSI = 2, - TXPWR_LMT_WW = 3, - + TXPWR_LMT_WW = 3, + TXPWR_LMT_MAX_REGULATION_NUM = 4 } REGULATION_TXPWR_LMT; @@ -83,15 +83,15 @@ typedef enum _REGULATION_TXPWR_LMT { // // Channel Plan Type. -// Note: -// We just add new channel plan when the new channel plan is different from any of the following -// channel plan. +// Note: +// We just add new channel plan when the new channel plan is different from any of the following +// channel plan. // If you just wnat to customize the acitions(scan period or join actions) about one of the channel plan, // customize them in RT_CHNL_LIST_ENTRY in the RT_CHANNEL_LIST. -// +// //3 |-----------------------------------------------------------------------| -//3 | When a new domain code added, check if the order correctly mapped with -//3 | DefaultChannelPlan array index. +//3 | When a new domain code added, check if the order correctly mapped with +//3 | DefaultChannelPlan array index. //3 |-----------------------------------------------------------------------| typedef enum _RT_CHANNEL_DOMAIN { @@ -119,8 +119,8 @@ typedef enum _RT_CHANNEL_DOMAIN RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS = 21, RT_CHANNEL_DOMAIN_DEFAULT = 22, RT_CHANNEL_DOMAIN_OMNIPEEK_ALL_CHANNEL = 23, - RT_CHANNEL_DOMAIN_WHQL = 24, - + RT_CHANNEL_DOMAIN_WHQL = 24, + //4 // <20120516, Kordan> The naming is according to the specification of channel plan on Mantis #11235. // (The legacy definition above is still reserved to be compatible with legacy EFUSE maps.) @@ -164,10 +164,10 @@ typedef enum _RT_CHANNEL_DOMAIN RT_CHANNEL_DOMAIN_2G_FCC1_5G_FCC10, // 62 RT_CHANNEL_DOMAIN_2G_MKK2_5G_MKK4, // 63 RT_CHANNEL_DOMAIN_WW13_2G_5G_ETSI14, // 64 - - + + //4 <----------------End of New Definitions----------------> - + //===== Add new channel plan above this line ===============// #if 0 // For new architecture we define different 2G/5G CH area for all country. @@ -182,9 +182,9 @@ typedef enum _RT_CHANNEL_DOMAIN RT_CHANNEL_DOMAIN_2G_WORLD_5G_ETSI1 = 0x26, RT_CHANNEL_DOMAIN_2G_WORLD_5G_ETSI1 = 0x27, // ..... -#endif +#endif - RT_CHANNEL_DOMAIN_WHQL_WFD, + RT_CHANNEL_DOMAIN_WHQL_WFD, RT_CHANNEL_DOMAIN_UNDEFINED, RT_CHANNEL_DOMAIN_MAX, @@ -193,7 +193,7 @@ typedef enum _RT_CHANNEL_DOMAIN typedef struct _RT_CHANNEL_PLAN { u1Byte Channel[MAX_CHANNEL_NUM]; - u1Byte Len; + u1Byte Len; u1Byte Channel2_4G[MAX_CHANNEL_NUM]; u1Byte Len2_4G; u1Byte Channel5G[MAX_CHANNEL_NUM]; @@ -246,7 +246,7 @@ typedef struct _RT_CHNL_LIST_ENTRY typedef struct _RT_CHANNEL_LIST { DECLARE_RT_OBJECT(RT_CHANNEL_LIST); - BOOLEAN bDot11d; // True if this channel list supports dot11d. + BOOLEAN bDot11d; // True if this channel list supports dot11d. u1Byte ChannelLen; // Availabe channel number. RT_CHANNEL_DOMAIN ChannelPlan; // Current channel plan for this channel list. u2Byte WirelessMode; // Record the wireless mode if this channel list is conformed to the current wireless mode. @@ -264,7 +264,7 @@ typedef struct _RT_CHANNEL_LIST #define IS_COUNTRY_IE_VALID(__pMgntInfo) ( (GET_DOT11D_INFO(__pMgntInfo)->CountryIeLen > 0) && \ (IS_DOT11D_STATE_DONE(__pMgntInfo))) -#define IS_EQUAL_CIE_SRC(__pMgntInfo, __pTa) eqMacAddr(GET_DOT11D_INFO(__pMgntInfo)->CountryIeSrcAddr, __pTa) +#define IS_EQUAL_CIE_SRC(__pMgntInfo, __pTa) eqMacAddr(GET_DOT11D_INFO(__pMgntInfo)->CountryIeSrcAddr, __pTa) #define UPDATE_CIE_SRC(__pMgntInfo, __pTa) cpMacAddr(GET_DOT11D_INFO(__pMgntInfo)->CountryIeSrcAddr, __pTa) #define IS_COUNTRY_IE_CHANGED(__pMgntInfo, __Ie) \ @@ -274,7 +274,7 @@ typedef struct _RT_CHANNEL_LIST #define CIE_WATCHDOG_TH 1 #define GET_CIE_WATCHDOG(__pMgntInfo) GET_DOT11D_INFO(__pMgntInfo)->CountryIeWatchdog -#define RESET_CIE_WATCHDOG(__pMgntInfo) GET_CIE_WATCHDOG(__pMgntInfo) = 0 +#define RESET_CIE_WATCHDOG(__pMgntInfo) GET_CIE_WATCHDOG(__pMgntInfo) = 0 #define UPDATE_CIE_WATCHDOG(__pMgntInfo) ++GET_CIE_WATCHDOG(__pMgntInfo) #define IS_DOT11D_STATE_DONE(__pMgntInfo) (GET_DOT11D_INFO(__pMgntInfo)->State == DOT11D_STATE_DONE) @@ -296,7 +296,7 @@ VOID Dot11d_UpdateCountryIe( IN PADAPTER pAdapter, IN pu1Byte pTaddr, - IN POCTET_STRING posCoutryIe + IN POCTET_STRING posCoutryIe ); u1Byte @@ -324,7 +324,7 @@ RtActChannelList( OUT PVOID pOutputBuf ); -u1Byte +u1Byte RtGetDualBandChannel( IN PADAPTER Adapter, OUT PRT_CHNL_LIST_ENTRY ChnlListEntryArray diff --git a/network/wlan/WDI/COMMON/DriverInterface.c b/network/wlan/WDI/COMMON/DriverInterface.c index a05fa3786..c94d9f06b 100644 --- a/network/wlan/WDI/COMMON/DriverInterface.c +++ b/network/wlan/WDI/COMMON/DriverInterface.c @@ -36,13 +36,13 @@ NicIFAssociateNIC( VOID NicIFDisassociateNIC( PADAPTER Adapter -) +) { HalDisassociateNic(Adapter); } -// +// // 2010/07/06 MH Seperate the HAL mempro and correspond resource allocaton. // All the HAL/common resource and variable shoule be allocated after the HAL memory // pointer is allocated. @@ -63,18 +63,18 @@ NicIFInitResource( // ---------------------------------------------------------- Hal_InitVars(Adapter); - + Hal_InitCamEntry(Adapter); - + DFS_Init(Adapter); HAL_DiffTXDummyLen(Adapter); - HAL_DiffTXRXLen(Adapter); - + HAL_DiffTXRXLen(Adapter); + Adapter->HalFunc.InitializeVariablesHandler(Adapter); - // 2015/03/10 Hana, Init Tx Feedback, + // 2015/03/10 Hana, Init Tx Feedback, // the Tx Feedback capability of each IC depends on the HAL define variable HAL_DEF_TX_FEEDBACK_SUPPORT TxFeedbackInitialize(Adapter); @@ -92,7 +92,7 @@ NicIFInitResource( VOID NicIFDeInitResource( PADAPTER Adapter -) +) { ADCSmp_DeInit(Adapter); @@ -106,7 +106,7 @@ NicIFDeInitResource( DeInitializeMgntVariables(Adapter); DeInitializeRxVariables(Adapter); - + // DeInitialize the ActionTimerCommon ---------------------------- // init ActionTimer list. ActionTimerDeInitializeCommonContext(Adapter); @@ -123,9 +123,9 @@ NicIFReadAdapterInfo( PADAPTER Adapter ) { - // <20130227, Kordan> Initialize the HW-independant data structure for EFUSE related operation. + // <20130227, Kordan> Initialize the HW-independant data structure for EFUSE related operation. HAL_CmnInitPGData(Adapter); - + // Read EEPROM size before call any EEPROM function Adapter->EepromAddressSize=Adapter->HalFunc.GetEEPROMSizeHandler(Adapter); // 2011/03/09 MH Add description. This is used to define different EEPROm offset of different @@ -134,10 +134,10 @@ NicIFReadAdapterInfo( // 2011/03/09 MH Add description. According to predefined offset to capture EFUSE content. Adapter->HalFunc.ReadAdapterInfoHandler(Adapter); - // 2013/09/12 MH When registry channel plan is upadted, we need to update regulatory again, - // otherwise, it will use WW table as default. + // 2013/09/12 MH When registry channel plan is upadted, we need to update regulatory again, + // otherwise, it will use WW table as default. PHY_MapChnlPlanRegulatory(Adapter); - + } RT_STATUS @@ -151,8 +151,8 @@ NicIFAllocateMemory( int nTxQueueNum = PLATFORM_GET_RT_NUM_SDIO_TX_QUEUE(sdiodevice); // TX_HIQ, TX_MIQ and TX_LOQ if(RT_DRIVER_STOP(Adapter)) - return status; - + return status; + RT_TRACE(COMP_INIT, DBG_LOUD, ("NicIFAllocateMemory() ==>\n")); do @@ -169,45 +169,45 @@ NicIFAllocateMemory( status = RT_STATUS_FAILURE; break; } - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before PrepareRFDs\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before PrepareRFDs\n")); RT_TRACE(COMP_INIT, DBG_LOUD, ("PrepareRFDs() ==>\n")); status=PrepareRFDs(Adapter); RT_TRACE(COMP_INIT, DBG_LOUD, ("PrepareRFDs() <==\n")); if(status!=RT_STATUS_SUCCESS) - { + { RT_TRACE_F(COMP_INIT, DBG_LOUD, ("PrepareRFDs fail\n")); FreeRFDs(Adapter, FALSE); break; } - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before PrepareTCBs\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before PrepareTCBs\n")); status=PrepareTCBs(Adapter); if(status!=RT_STATUS_SUCCESS) { - RT_TRACE_F(COMP_INIT, DBG_LOUD, ("PrepareTCBs fail\n")); + RT_TRACE_F(COMP_INIT, DBG_LOUD, ("PrepareTCBs fail\n")); FreeTCBs(Adapter, FALSE); break; } - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before MgntAllocateBeaconBuf\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before MgntAllocateBeaconBuf\n")); status = MgntAllocateBeaconBuf( Adapter ); if(status!=RT_STATUS_SUCCESS) { - RT_TRACE_F(COMP_INIT, DBG_LOUD, ("MgntAllocateBeaconBuf fail\n")); + RT_TRACE_F(COMP_INIT, DBG_LOUD, ("MgntAllocateBeaconBuf fail\n")); MgntFreeBeaconBuf(Adapter); break; } - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before FW_AllocateMemory\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before FW_AllocateMemory\n")); status = FW_AllocateMemory(Adapter); if(status!=RT_STATUS_SUCCESS) { - RT_TRACE_F(COMP_INIT, DBG_LOUD, ("FW_AllocateMemory fail\n")); + RT_TRACE_F(COMP_INIT, DBG_LOUD, ("FW_AllocateMemory fail\n")); FW_FreeMemory(Adapter); - break; + break; } }while(FALSE); @@ -230,7 +230,7 @@ NicIFFreeMemory( // Free Qos related resources. QosDeinitializeSTA(Adapter); - + //2 Note: TCB must be freed before RFD FreeTCBs(Adapter, FALSE); FreeRFDs(Adapter, FALSE); @@ -346,13 +346,13 @@ NicIFInitializeAdapter( { MultiPortSetAllPortsHWReadyStatus(Adapter, FALSE); - // 2010/12/17 MH After Code base Lable 977, we need to move the flag here, otherwise, - // HCT card init sequence will be BSOD when transfer adapter in InitializeAdapterHandler. + // 2010/12/17 MH After Code base Lable 977, we need to move the flag here, otherwise, + // HCT card init sequence will be BSOD when transfer adapter in InitializeAdapterHandler. Adapter->bInitializeInProgress=TRUE; if(!ACTING_AS_AP(Adapter)) { - RT_TRACE(COMP_INIT, DBG_LOUD, ("InitializeAdapterHandler Delay\n")); + RT_TRACE(COMP_INIT, DBG_LOUD, ("InitializeAdapterHandler Delay\n")); } else { @@ -386,7 +386,7 @@ NicIFInitializeAdapter( rtStatus = Adapter->HalFunc.InitializeAdapterHandler(Adapter, pMgntInfo->dot11CurrentChannelNumber); #if (VISTA_RX_BATCH_INDICATE) InitBatchIndication(Adapter); - #endif + #endif MultiPortSetAllPortsHWReadyStatus(Adapter, TRUE); #if (UNDER_LOW_PWR_SOC_PLATFORM && NDIS_SUPPORT_NDIS630) @@ -394,7 +394,7 @@ NicIFInitializeAdapter( #else Adapter->MgntInfo.bSetWatchDogTimerByDriver = FALSE; #endif - } + } if(rtStatus == RT_STATUS_SUCCESS) @@ -423,14 +423,14 @@ NicIFHandleInterrupt( /** * This function is called by Checkforhang to check whether we should ask OS to reset driver -* +* * \param pAdapter The adapter context for this miniport * * Note:NIC with USB interface sholud not call this function because we cannot scan descriptor * to judge whether there is tx stuck. * Note: This function may be required to be rewrite for Vista OS. * <<>> -* +* * 8185 and 8185b does not implement this function. This is added by Emily at 2006.11.24 */ RESET_TYPE @@ -457,7 +457,7 @@ NicIFCheckResetOrNot( VOID NicIFCoalesceReceivedPacketAndFreeUnusedRFD( PADAPTER Adapter, - PRT_RFD pRfd + PRT_RFD pRfd ) { PRT_RFD frag; @@ -484,9 +484,9 @@ NicIFCoalesceReceivedPacketAndFreeUnusedRFD( pRfd->Buffer.VirtualAddress + pRfd->FragOffset + pRfd->FragLength, frag->Buffer.VirtualAddress + frag->FragOffset, frag->FragLength); - + pRfd->FragLength += frag->FragLength; - + frag=frag->NextRfd; } @@ -507,15 +507,15 @@ NicIFCoalesceReceivedPacketAndFreeUnusedRFD( VOID NicIFReturnPacket( PADAPTER Adapter, - PRT_RFD pRfd + PRT_RFD pRfd ) -{ +{ #if WLAN_ETW_SUPPORT // // No activity needs to be associated with this event, the ActivityId is optional and can be NULL. // 2014.01.14. - // + // PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); EventWriteRxReturnToDriver( NULL, //Without associated with the event @@ -524,7 +524,7 @@ NicIFReturnPacket( (u2Byte)RT_GET_RCV_REF(Adapter),// RxBacklog 0, // CustomData1 0, // CustomData2 - 0);// CustomData3 + 0);// CustomData3 PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); #endif @@ -603,7 +603,7 @@ NicIFResetNIC( } pMgntInfo->RFChangeInProgress = TRUE; PlatformReleaseSpinLock(Adapter, RT_RF_STATE_SPINLOCK); - + status = NicIFDisableNIC( Adapter ); if( status != RT_STATUS_SUCCESS ){ goto END; diff --git a/network/wlan/WDI/COMMON/DrvLog.h b/network/wlan/WDI/COMMON/DrvLog.h index 40d974c88..14f56c16d 100644 --- a/network/wlan/WDI/COMMON/DrvLog.h +++ b/network/wlan/WDI/COMMON/DrvLog.h @@ -32,7 +32,7 @@ typedef struct _DRV_LOG_DATA_T unsigned int Id; // Key to associated with DRV_LOG_ATTRIBUTE_T. unsigned int TimeStampLow; unsigned int TimeStampHigh; - unsigned int BufferLenUsed; + unsigned int BufferLenUsed; unsigned char Buffer[1]; }DRV_LOG_DATA_T, *PDRV_LOG_DATA_T; diff --git a/network/wlan/WDI/COMMON/DrvLogImp.c b/network/wlan/WDI/COMMON/DrvLogImp.c index e8ac90520..9acaf5965 100644 --- a/network/wlan/WDI/COMMON/DrvLogImp.c +++ b/network/wlan/WDI/COMMON/DrvLogImp.c @@ -3,7 +3,7 @@ // DrvLogImp.c // // Description: -// Driver log event mechanism. +// Driver log event mechanism. // //----------------------------------------------------------------------------- @@ -19,14 +19,14 @@ // // Description: -// Table of attribute of type of logs. +// Table of attribute of type of logs. // -// Note that: +// Note that: // 1. the order MUST be the same as enum _DRV_LOG_TYPE_E declared. // 2. Size of Description must < MAX_LOG_DESC_LEN. -// -#define DEFAULT_LOG_CNT_PWR 5 // 2^5 = 32 -DRV_LOG_TYPE_ATTR_IMP_T g_LogTypes[LTYPE_TOTAL_COUNT] = +// +#define DEFAULT_LOG_CNT_PWR 5 // 2^5 = 32 +DRV_LOG_TYPE_ATTR_IMP_T g_LogTypes[LTYPE_TOTAL_COUNT] = { // MaxLogCountPwr, Description {DEFAULT_LOG_CNT_PWR, "Error"}, // LTYPE_ERROR @@ -42,13 +42,13 @@ DRV_LOG_TYPE_ATTR_IMP_T g_LogTypes[LTYPE_TOTAL_COUNT] = // - Type: value enum _DRV_LOG_TYPE_E, which declare catagory of this log. // - Description: null-terminated char string, one MUST restrict size of it smaller than MAX_LOG_DESC_LEN. // -// Note that: +// Note that: // 1. the order MUST be the same as enum _DRV_LOG_ID_E declared. // 2. Size of Description must < MAX_LOG_DESC_LEN. // -DRV_LOG_ATTR_IMP_T g_LogAttributes[LID_TOTAL_COUNT] = +DRV_LOG_ATTR_IMP_T g_LogAttributes[LID_TOTAL_COUNT] = { - // Type, Description + // Type, Description {LTYPE_DOT11D, "Entering a regulatory domain"}, // LID_DOT11D_RESET {LTYPE_DOT11D, "Get a valid country IE"}, // LID_DOT11D_GET_COUNTRY_IE {LTYPE_DOT11D, "Active scan: Channels"}, // LID_DOT11D_ACTIVE_SCAN_CHNL @@ -61,7 +61,7 @@ DRV_LOG_ATTR_IMP_T g_LogAttributes[LID_TOTAL_COUNT] = // // Description: -// Allocate memory for driver log mechansim. +// Allocate memory for driver log mechansim. // // Assumption: // Target address had been initalized to NULL pointer. @@ -98,7 +98,7 @@ AllocDrvLogMemory( // for(i = 0; i < (u4Byte)LTYPE_TOTAL_COUNT; i++) { - Size = sizeof(DRV_LOG_POOL_T) + ( sizeof(DRV_LOG_DATA_IMP_T) << g_LogTypes[i].MaxLogCountPwr); + Size = sizeof(DRV_LOG_POOL_T) + ( sizeof(DRV_LOG_DATA_IMP_T) << g_LogTypes[i].MaxLogCountPwr); status = PlatformAllocateMemory(pAdapter, &pTmp, Size); if( RT_STATUS_SUCCESS != status ) { @@ -110,22 +110,22 @@ AllocDrvLogMemory( RT_TRACE(COMP_INIT, DBG_LOUD, ("AllocDrvLogMemory(): %p is allocated for driver log pool %d\n", pTmp, i)); PlatformZeroMemory(pTmp, Size); SET_DRV_LOG_POOL(pAdapter, i, pTmp); - GET_DRV_LOG_POOL(pAdapter, i)->pLogDataRing = (PDRV_LOG_DATA_IMP_T)((pu1Byte)pTmp + sizeof(DRV_LOG_POOL_T)); + GET_DRV_LOG_POOL(pAdapter, i)->pLogDataRing = (PDRV_LOG_DATA_IMP_T)((pu1Byte)pTmp + sizeof(DRV_LOG_POOL_T)); RT_PRINT_DATA(COMP_INIT, DBG_TRACE, "driver log pool: ", (pu1Byte)pTmp, sizeof(DRV_LOG_POOL_T)); } } - + return TRUE; } // // Description: -// Free memory block for driver log mechansim. +// Free memory block for driver log mechansim. // // Assumption: -// Target address is NOT NULL pointer if it had been allocated sucessfully. +// Target address is NOT NULL pointer if it had been allocated sucessfully. // VOID FreeDrvLogMemory( @@ -150,7 +150,7 @@ FreeDrvLogMemory( pTmp = (PVOID)GET_DRV_LOG_POOL(pAdapter, i); if(pTmp != NULL) { - Size = sizeof(DRV_LOG_POOL_T) + ( sizeof(DRV_LOG_DATA_IMP_T) << g_LogTypes[i].MaxLogCountPwr); + Size = sizeof(DRV_LOG_POOL_T) + ( sizeof(DRV_LOG_DATA_IMP_T) << g_LogTypes[i].MaxLogCountPwr); RT_TRACE(COMP_INIT, DBG_LOUD, ("FreeDrvLogMemory(): free %p, log pool %d.\n", pTmp, i)); PlatformFreeMemory(pTmp, Size); } @@ -174,11 +174,11 @@ AddDrvLog( IN PADAPTER pAdapter, IN DRV_LOG_ID_E eLogId, IN pu1Byte pBuffer, - IN u4Byte BufferLen + IN u4Byte BufferLen ) { DRV_LOG_TYPE_E eLogType = (DRV_LOG_TYPE_E)g_LogAttributes[eLogId].Type; - PDRV_LOG_POOL_T pLogPool = GET_DRV_LOG_POOL(pAdapter, eLogType); + PDRV_LOG_POOL_T pLogPool = GET_DRV_LOG_POOL(pAdapter, eLogType); u8Byte CurrTime = PlatformGetCurrentTime(); u4Byte MaxLogCount = ((u4Byte)1 << g_LogTypes[eLogType].MaxLogCountPwr); u4Byte LogCountMask = MaxLogCount - 1; @@ -188,7 +188,7 @@ AddDrvLog( if( pLogPool->LogCountUsed < MaxLogCount ) { - pLogData = pLogPool->pLogDataRing + + pLogData = pLogPool->pLogDataRing + ( (pLogPool->LogStartIndex + pLogPool->LogCountUsed) & LogCountMask ); pLogPool->LogCountUsed++; } @@ -213,7 +213,7 @@ AddDrvLog( // Retrive one log data from specified pool // // Assumption: -// pDstLogData must pointer to a buffer with enough space, +// pDstLogData must pointer to a buffer with enough space, // e.g. sizeof(DRV_LOG_DATA_IMP_T). // BOOLEAN @@ -223,7 +223,7 @@ RemoveDrvLog( OUT PDRV_LOG_DATA_T pDstLogData ) { - PDRV_LOG_POOL_T pLogPool = GET_DRV_LOG_POOL(pAdapter, eLogType); + PDRV_LOG_POOL_T pLogPool = GET_DRV_LOG_POOL(pAdapter, eLogType); PlatformAcquireSpinLock(pAdapter, RT_LOG_SPINLOCK); if(pLogPool->LogCountUsed == 0) @@ -238,8 +238,8 @@ RemoveDrvLog( u4Byte LogCountMask = MaxLogCount - 1; PlatformMoveMemory( - pDstLogData, - pSrcLogData, + pDstLogData, + pSrcLogData, sizeof(DRV_LOG_DATA_T) + pSrcLogData->BufferLenUsed); pLogPool->LogStartIndex = (pLogPool->LogStartIndex + 1) & LogCountMask; pLogPool->LogCountUsed--; diff --git a/network/wlan/WDI/COMMON/DrvLogImp.h b/network/wlan/WDI/COMMON/DrvLogImp.h index b84846f81..f11ef650d 100644 --- a/network/wlan/WDI/COMMON/DrvLogImp.h +++ b/network/wlan/WDI/COMMON/DrvLogImp.h @@ -24,13 +24,13 @@ typedef struct _DRV_LOG_DATA_IMP_T unsigned int Id; // Key to associated with DRV_LOG_ATTRIBUTE_T. unsigned int TimeStampLow; unsigned int TimeStampHigh; - unsigned int BufferLenUsed; + unsigned int BufferLenUsed; unsigned char Buffer[MAX_LOG_BUFFER_LEN]; }DRV_LOG_DATA_IMP_T, *PDRV_LOG_DATA_IMP_T; // // Description: -// ID for each catagory of log. +// ID for each catagory of log. // To add new type, one must also update g_LogTypes[]. // We will allocate an DRV_LOG_POOL_T object for each type. // @@ -86,7 +86,7 @@ typedef struct _DRV_LOG_POOL_T #define SET_DRV_LOG_POOL(__pAdapter, __idx, __pTmp) GET_DRV_LOG_POOL(__pAdapter, __idx) = (PDRV_LOG_POOL_T)(__pTmp) // -// Get current number of log of specified type. +// Get current number of log of specified type. // #define GetDrvLogCnt(__pAdapter, __eLogType) GET_DRV_LOG_POOL(pAdapter, eLogType)->LogCountUsed @@ -106,24 +106,24 @@ AddDrvLog( IN PADAPTER pAdapter, IN DRV_LOG_ID_E eLogId, IN pu1Byte pBuffer, - IN u4Byte BufferLen + IN u4Byte BufferLen ); BOOLEAN RemoveDrvLog( IN PADAPTER pAdapter, - IN DRV_LOG_TYPE_E eLogType, + IN DRV_LOG_TYPE_E eLogType, OUT PDRV_LOG_DATA_T pDstLogData ); #else -#define AllocDrvLogMemory(pAdapter) TRUE -#define FreeDrvLogMemory(pAdapter) -#define AddDrvLog(pAdapter, eLogId, pBuffer, BufferLen) -#define RemoveDrvLog(pAdapter, eLogType, pDstLogData) FALSE -#define GetDrvLogCnt(__pAdapter, __eLogType) 0 +#define AllocDrvLogMemory(pAdapter) TRUE +#define FreeDrvLogMemory(pAdapter) +#define AddDrvLog(pAdapter, eLogId, pBuffer, BufferLen) +#define RemoveDrvLog(pAdapter, eLogType, pDstLogData) FALSE +#define GetDrvLogCnt(__pAdapter, __eLogType) 0 #endif // #if DRV_LOG diff --git a/network/wlan/WDI/COMMON/Frame_Buf.c b/network/wlan/WDI/COMMON/Frame_Buf.c index 377e83d8c..35f31883a 100644 --- a/network/wlan/WDI/COMMON/Frame_Buf.c +++ b/network/wlan/WDI/COMMON/Frame_Buf.c @@ -36,7 +36,7 @@ framebuf_Init( pBuf->os.Octet = buf; pBuf->flags = flags; pBuf->dbgLevel = dbgLevel; - + return; } @@ -50,14 +50,14 @@ framebuf_Add( u1Byte *pData = FrameBuf_MTail(pBuf); RT_ASSERT(framebuf_Initialized(pBuf), ("%s(): accessing uninitialized frame buffer\n", __FUNCTION__)); - + if(pBuf->cap < pBuf->os.Length + size) {// overflow return NULL; } pBuf->os.Length += size; - + return pData; } @@ -189,7 +189,7 @@ FrameBuf_Free( {// we are not responsible for external buf return; } - + PlatformFreeMemory(pBuf, sizeof(FRAME_BUF) + pBuf->cap); return; @@ -257,7 +257,7 @@ FrameBuf_Add_u1( if(!pData) return FALSE; WriteEF1Byte(pData, data); - + return TRUE; } @@ -270,9 +270,9 @@ FrameBuf_Add_le_u2( pu1Byte pData = framebuf_Add(pBuf, 2); if(!pData) return FALSE; - + WriteEF2Byte(pData, data); - + return TRUE; } @@ -285,9 +285,9 @@ FrameBuf_Add_le_u4( pu1Byte pData = framebuf_Add(pBuf, 4); if(!pData) return FALSE; - + WriteEF4Byte(pData, data); - + return TRUE; } @@ -300,7 +300,7 @@ FrameBuf_Add_be_u2( pu1Byte pData = framebuf_Add(pBuf, 2); if(!pData) return FALSE; - + WriteH2N2BYTE(pData, data); return TRUE; @@ -315,9 +315,9 @@ FrameBuf_Add_be_u4( pu1Byte pData = framebuf_Add(pBuf, 4); if(!pData) return FALSE; - + WriteH2N4BYTE(pData, data); - + return TRUE; } @@ -335,7 +335,7 @@ FrameBuf_Add_Data( // Not to use PlatformMoveMemory because it dosen't declare src as const for(it = 0; it < len; it++) pData[it] = ((u1Byte *)data)[it]; - + return TRUE; } diff --git a/network/wlan/WDI/COMMON/Frame_Buf.h b/network/wlan/WDI/COMMON/Frame_Buf.h index 3fc59a51b..13df56d09 100644 --- a/network/wlan/WDI/COMMON/Frame_Buf.h +++ b/network/wlan/WDI/COMMON/Frame_Buf.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_FRAME_BUF_H diff --git a/network/wlan/WDI/COMMON/GeneralFunc.c b/network/wlan/WDI/COMMON/GeneralFunc.c index 3666a25e4..dee9c1c77 100644 --- a/network/wlan/WDI/COMMON/GeneralFunc.c +++ b/network/wlan/WDI/COMMON/GeneralFunc.c @@ -4,7 +4,7 @@ #include "GeneralFunc.tmh" #endif -BOOLEAN +BOOLEAN eqNByte( pu1Byte str1, pu1Byte str2, @@ -25,7 +25,7 @@ eqNByte( // // Description: -// Return TRUE if chTmp is represent for hex digit and +// Return TRUE if chTmp is represent for hex digit and // FALSE otherwise. // // @@ -34,7 +34,7 @@ IsHexDigit( IN s1Byte chTmp ) { - if( (chTmp >= '0' && chTmp <= '9') || + if( (chTmp >= '0' && chTmp <= '9') || (chTmp >= 'a' && chTmp <= 'f') || (chTmp >= 'A' && chTmp <= 'F') ) { @@ -60,10 +60,10 @@ MapCharToHexDigit( return (chTmp - '0'); else if(chTmp >= 'a' && chTmp <= 'f') return (10 + (chTmp - 'a')); - else if(chTmp >= 'A' && chTmp <= 'F') + else if(chTmp >= 'A' && chTmp <= 'F') return (10 + (chTmp - 'A')); else - return 0; + return 0; } @@ -72,7 +72,7 @@ MapCharToHexDigit( // Description: // Parse hex number from the string pucStr. // -BOOLEAN +BOOLEAN GetHexValueFromString( IN ps1Byte szStr, IN OUT pu4Byte pu4bVal, @@ -84,7 +84,7 @@ GetHexValueFromString( // Check input parameter. if(szStr == NULL || pu4bVal == NULL || pu4bMove == NULL) { - RT_TRACE(COMP_DBG, DBG_WARNING, + RT_TRACE(COMP_DBG, DBG_WARNING, ("GetHexValueFromString(): Invalid inpur argumetns! szStr: %p, pu4bVal: %p, pu4bMove: %p\n", szStr, pu4bVal, pu4bMove)); return FALSE; } @@ -94,7 +94,7 @@ GetHexValueFromString( *pu4bVal = 0; // Skip leading space. - while( *szScan != '\0' && + while( *szScan != '\0' && (*szScan == ' ' || *szScan == '\t') ) { szScan++; @@ -106,9 +106,9 @@ GetHexValueFromString( { szScan += 2; (*pu4bMove) += 2; - } + } - // Check if szScan is now pointer to a character for hex digit, + // Check if szScan is now pointer to a character for hex digit, // if not, it means this is not a valid hex number. if(!IsHexDigit(*szScan)) { @@ -128,7 +128,7 @@ GetHexValueFromString( return TRUE; } -BOOLEAN +BOOLEAN GetFractionValueFromString( IN ps1Byte szStr, IN OUT pu1Byte pInteger, @@ -157,11 +157,11 @@ GetFractionValueFromString( ++szScan; ++(*pu4bMove); - if ( *szScan == '.' ) + if ( *szScan == '.' ) { ++szScan; ++(*pu4bMove); - + if ( *szScan < '0' || *szScan > '9' ) return FALSE; else { @@ -196,16 +196,16 @@ IsCommentString( } } -// <20121004, Kordan> For example, +// <20121004, Kordan> For example, // ParseQualifiedString(inString, 0, outString, '[', ']') gets "Kordan" from a string "Hello [Kordan]". // If RightQualifier does not exist, it will hang on in the while loop -BOOLEAN +BOOLEAN ParseQualifiedString( - IN ps1Byte In, - IN OUT pu4Byte Start, + IN ps1Byte In, + IN OUT pu4Byte Start, OUT ps1Byte Out, - OUT const u4Byte MaxOutLen, - IN s1Byte LeftQualifier, + OUT const u4Byte MaxOutLen, + IN s1Byte LeftQualifier, IN s1Byte RightQualifier ) { @@ -219,7 +219,7 @@ ParseQualifiedString( i = (*Start); - while ((c = In[(*Start)++]) != RightQualifier) + while ((c = In[(*Start)++]) != RightQualifier) ; // Keep going until the RightQualifier is found. j = (*Start) - 2; @@ -237,7 +237,7 @@ ParseQualifiedString( if (status == FALSE) *Start = origin; // Reset the position - + return status; } @@ -276,9 +276,9 @@ GetS1ByteIntegerFromStringInDecimal( { u2Byte i = 0; s1Byte Sign = 1; // Positive - + *pInt = 0; - + if( Str[i] == '-' ) { Sign = -1; // Negative @@ -340,10 +340,10 @@ GenTag( { u2Byte units, tens = 0; u4Byte tag; - + units = (u2Byte)strlen(pFunName); tag = pFunName[0] | (pFunName[units-1] << 8); - + while(units >= 10) { units -= 10; diff --git a/network/wlan/WDI/COMMON/GeneralFunc.h b/network/wlan/WDI/COMMON/GeneralFunc.h index cf02a46ca..f6b762ab2 100644 --- a/network/wlan/WDI/COMMON/GeneralFunc.h +++ b/network/wlan/WDI/COMMON/GeneralFunc.h @@ -57,7 +57,7 @@ // Version - The version of content. Different versions cause different content or format of data. // Length - The total length in byte of Value. // Format: -// | Type | Id |Version | Length | Value +// | Type | Id |Version | Length | Value // | ULONG | ULONG |ULONG | ULONG | Veriable.... // Remark: // It's a general header for data commnuication between layers and applications under variable versions. @@ -91,14 +91,14 @@ typedef struct _RT_OBJECT_HEADER #define RT_OB_HDR_TYPE_INDIC 4 #define RT_OB_HDR_TYPE_DATA 5 -BOOLEAN +BOOLEAN eqNByte( pu1Byte str1, pu1Byte str2, u4Byte num ); -BOOLEAN +BOOLEAN IsHexDigit( IN s1Byte chTmp ); @@ -108,14 +108,14 @@ MapCharToHexDigit( IN s1Byte chTmp ); -BOOLEAN +BOOLEAN GetHexValueFromString( IN ps1Byte szStr, IN OUT pu4Byte pu4bVal, IN OUT pu4Byte pu4bMove ); -BOOLEAN +BOOLEAN GetFractionValueFromString( IN ps1Byte szStr, IN OUT pu1Byte pInteger, @@ -129,13 +129,13 @@ IsCommentString( IN ps1Byte szStr ); -BOOLEAN +BOOLEAN ParseQualifiedString( - IN ps1Byte In, - IN OUT pu4Byte Start, + IN ps1Byte In, + IN OUT pu4Byte Start, OUT ps1Byte Out, - OUT const u4Byte MaxOutLen, - IN s1Byte LeftQualifier, + OUT const u4Byte MaxOutLen, + IN s1Byte LeftQualifier, IN s1Byte RightQualifier ); @@ -161,6 +161,6 @@ u4Byte GenTag( IN char *pFunName ); - + #endif // #ifndef __INC_GENERALFUNC_H diff --git a/network/wlan/WDI/COMMON/HTGen.c b/network/wlan/WDI/COMMON/HTGen.c index 84af5275a..ede6486cb 100644 --- a/network/wlan/WDI/COMMON/HTGen.c +++ b/network/wlan/WDI/COMMON/HTGen.c @@ -8,25 +8,25 @@ u1Byte MCS_FILTER_ALL[16] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -u1Byte MCS_FILTER_1SS[16] = { 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +u1Byte MCS_FILTER_1SS[16] = { 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -const u2Byte MCS_DATA_RATE[2][2][33] = - { { { 13, 26, 39, 52, 78, 104, 117, 130, +const u2Byte MCS_DATA_RATE[2][2][33] = + { { { 13, 26, 39, 52, 78, 104, 117, 130, 26, 52, 78 ,104, 156, 208, 234, 260, - 39, 78, 117, 156, 234, 312, 351, 390, + 39, 78, 117, 156, 234, 312, 351, 390, 52, 104, 156, 208, 312, 416, 468, 520, 0}, // Long GI, 20MHz - { 14, 29, 43, 58, 87, 116, 130, 144, - 29, 58, 87, 116, 173, 231, 260, 289, - 43, 87, 130, 173, 260, 347, 390, 433, + { 14, 29, 43, 58, 87, 116, 130, 144, + 29, 58, 87, 116, 173, 231, 260, 289, + 43, 87, 130, 173, 260, 347, 390, 433, 58, 116, 173, 231, 347, 462, 520, 578, 0} }, // Short GI, 20MHz - { { 27, 54, 81, 108, 162, 216, 243, 270, - 54, 108, 162, 216, 324, 432, 486, 540, - 81, 162, 243, 324, 486, 648, 729, 810, + { { 27, 54, 81, 108, 162, 216, 243, 270, + 54, 108, 162, 216, 324, 432, 486, 540, + 81, 162, 243, 324, 486, 648, 729, 810, 108, 216, 324, 432, 648, 864, 972, 1080, 12}, // Long GI, 40MHz - { 30, 60, 90, 120, 180, 240, 270, 300, - 60, 120, 180, 240, 360, 480, 540, 600, - 90, 180, 270, 360, 540, 720, 810, 900, + { 30, 60, 90, 120, 180, 240, 270, 300, + 60, 120, 180, 240, 360, 480, 540, 600, + 90, 180, 270, 360, 540, 720, 810, 900, 120, 240, 360, 480, 720, 960, 1080, 1200, 13} } // Short GI, 40MHz }; @@ -53,16 +53,16 @@ static u1Byte NETGEAR_BROADCOM[3] = {0x00, 0x1f, 0x33}; /** * Function: HTDebugHTCapability -* +* * Overview: Print out each field on HT capability IE in(Beacon/ProbeRsp/AssocReq/ * AssocRsp) -* -* Input: +* +* Input: * u4Byte DebugLevel * PADAPTER Adapter, * POCTET_STRING pocCap, * pu1Byte titleString -* +* * Output: None * Return: None * Note: Driver should not print out this message by default @@ -73,23 +73,23 @@ HTDebugHTCapability( PADAPTER Adapter, POCTET_STRING pocCap, pu1Byte TitleString - + ) { - + static u1Byte EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; // For 11n EWC definition, 2007.07.17, by Emily pu1Byte pCapELE; pu1Byte pMCS; - + if(!PlatformCompareMemory(pocCap->Octet, EWC11NHTCap, sizeof(EWC11NHTCap))) { // Not EWC IE - pCapELE = (pu1Byte)&pocCap->Octet[4]; + pCapELE = (pu1Byte)&pocCap->Octet[4]; }else - pCapELE = (pu1Byte)&pocCap->Octet[0]; - + pCapELE = (pu1Byte)&pocCap->Octet[0]; + pMCS= GET_HT_CAPABILITY_ELE_MCS(pCapELE); - + RT_TRACE(COMP_HT, DebugLevel, (". Called by %s\n", TitleString )); RT_TRACE(COMP_HT, DebugLevel, ("\tSupported Channel Width = %s\n", (GET_HT_CAPABILITY_ELE_CHL_WIDTH(pCapELE) )?"20MHz": "20/40MHz")); @@ -102,21 +102,21 @@ HTDebugHTCapability( RT_TRACE(COMP_HT, DebugLevel, ("\tMPDU Density = %d\n", GET_HT_CAPABILITY_ELE_MPDU_DENSITY(pCapELE))); //RT_TRACE(COMP_HT, DebugLevel, ("\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pMCS[0],\ // pMCS[1], pMCS[2], pMCS[3], pMCS[4])); - RT_TRACE(COMP_HT, DebugLevel, ("\n")); - + RT_TRACE(COMP_HT, DebugLevel, ("\n")); + } /** * Function: HTDebugHTInfo -* +* * Overview: Print out each field on HT Information IE in(Beacon/PorbeRsp) -* -* Input: +* +* Input: * u4Byte DebugLevel, * PADAPTER Adapter, * POCTET_STRING pocCap, * pu1Byte TitleString -* +* * Output: None * Return: None * Note: Driver should not print out this message by default @@ -129,18 +129,18 @@ HTDebugHTInfo( pu1Byte TitleString ) { - + static u1Byte EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34}; // For 11n EWC definition, 2007.07.17, by Emily pu1Byte pHTInfoEle, pBasicMCS; - + if(!PlatformCompareMemory(pocInfo->Octet, EWC11NHTInfo, sizeof(EWC11NHTInfo))) pHTInfoEle = (pu1Byte)(&pocInfo->Octet[4]); // Not EWC IE else pHTInfoEle = (pu1Byte)(&pocInfo->Octet[0]); - - + + pBasicMCS= GET_HT_INFO_ELE_BASIC_MCS(pHTInfoEle); - + RT_TRACE(COMP_HT, DebugLevel, (". Called by %s\n", TitleString )); RT_TRACE(COMP_HT, DebugLevel, ("\tPrimary channel = %d\n", GET_HT_INFO_ELE_CONTROL_CHL(pHTInfoEle))); @@ -148,16 +148,16 @@ HTDebugHTInfo( switch(GET_HT_INFO_ELE_EXT_CHL_OFFSET(pHTInfoEle)) { case 0: - RT_TRACE(COMP_HT, DebugLevel, ("Not Present\n")); + RT_TRACE(COMP_HT, DebugLevel, ("Not Present\n")); break; case 1: RT_TRACE(COMP_HT, DebugLevel, ("Upper channel\n")); break; case 2: - RT_TRACE(COMP_HT, DebugLevel, ("Reserved. Eooro!!!\n")); + RT_TRACE(COMP_HT, DebugLevel, ("Reserved. Eooro!!!\n")); break; case 3: - RT_TRACE(COMP_HT, DebugLevel, ("Lower Channel\n")); + RT_TRACE(COMP_HT, DebugLevel, ("Lower Channel\n")); break; } RT_TRACE(COMP_HT, DebugLevel, ("\tRecommended channel width = %s\n", (GET_HT_INFO_ELE_STA_CHL_WIDTH(pHTInfoEle))?"20Mhz": "40Mhz")); @@ -166,23 +166,23 @@ HTDebugHTInfo( switch(GET_HT_INFO_ELE_OPT_MODE(pHTInfoEle)) { case 0: - RT_TRACE(COMP_HT, DebugLevel, ("No Protection\n")); + RT_TRACE(COMP_HT, DebugLevel, ("No Protection\n")); break; case 1: RT_TRACE(COMP_HT, DebugLevel, ("HT non-member protection mode\n")); break; case 2: - RT_TRACE(COMP_HT, DebugLevel, ("Suggest to open protection\n")); + RT_TRACE(COMP_HT, DebugLevel, ("Suggest to open protection\n")); break; case 3: - RT_TRACE(COMP_HT, DebugLevel, ("HT mixed mode\n")); + RT_TRACE(COMP_HT, DebugLevel, ("HT mixed mode\n")); break; } //RT_TRACE(COMP_HT, DebugLevel, ("\tBasic MCS Rate Set = [%x][%x][%x][%x][%x]\n", pBasicMCS[0],\ // pBasicMCS[1], pBasicMCS[2], pBasicMCS[3], pBasicMCS[4])); - RT_TRACE(COMP_HT, DebugLevel, ("\n")); + RT_TRACE(COMP_HT, DebugLevel, ("\n")); } @@ -195,7 +195,7 @@ HTMcsToDataRate( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); u1Byte BandWidth; - + u1Byte isShortGI = CHNL_RUN_ABOVE_40MHZ(pMgntInfo)? ((pHTInfo->bCurShortGI40MHz)?1:0): ((pHTInfo->bCurShortGI20MHz)?1:0); @@ -206,9 +206,9 @@ HTMcsToDataRate( // Prefast warning ignore #pragma warning( disable:6385 ) - RT_TRACE_F(COMP_HT, DBG_LOUD, ("MCS_DATA_RATE[%d][%d][(%d&0x3f)] = %d\n", + RT_TRACE_F(COMP_HT, DBG_LOUD, ("MCS_DATA_RATE[%d][%d][(%d&0x3f)] = %d\n", BandWidth, isShortGI, nMcsRate, MCS_DATA_RATE[BandWidth][isShortGI][(nMcsRate&0x3f)])); - + return MCS_DATA_RATE[BandWidth][isShortGI][nMcsRate]; } @@ -237,7 +237,7 @@ HTPeerMcsToDataRate( VOID HTSetCCKSupport( PADAPTER Adapter, - BOOLEAN bStarter, + BOOLEAN bStarter, pu1Byte pPeerHTCap ) { @@ -256,7 +256,7 @@ HTSetCCKSupport( pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK?GET_HT_CAPABILITY_ELE_DSS_CCK(pPeerHTCap):FALSE; else pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK; - } + } } VOID @@ -290,7 +290,7 @@ IOTPeerDetermine( // 2011/11/28 MH We need to disable TXOP for the AP to preven serious collision. if (pBssDesc->SubTypeOfVender == HT_IOT_PEER_BROADCOM_NETGEAR_WNDAP4500) { - pMgntInfo->IOTAction |=HT_IOT_ACT_DISABLE_AC_TXOP; + pMgntInfo->IOTAction |=HT_IOT_ACT_DISABLE_AC_TXOP; } else { @@ -312,7 +312,7 @@ IOTPeerDetermine( pMgntInfo->IOTMaxMpduLen = 0; pMgntInfo->IOTVhtAmsduSupport = FALSE; } - + } } @@ -321,12 +321,12 @@ IOTPeerDetermine( /** * Function: HTIOTActIsDisableMCSTwoSpatialStream -* +* * Overview: Check whether driver should declare capability of receving All 2 ss packets -* -* Input: +* +* Input: * PADAPTER Adapter, -* +* * Output: None * Return: TRUE if driver should disable all two spatial stream packet * 2008.04.21 Emily @@ -341,20 +341,20 @@ HTIOTActIsDisableMCSTwoSpatialStream( // Apply for 819u only - if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || + if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) || - (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || + (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP) ) { if( (pBssDesc->Vender != HT_IOT_PEER_ATHEROS) && (pBssDesc->Vender != HT_IOT_PEER_UNKNOWN) && - (pBssDesc->Vender != HT_IOT_PEER_MARVELL) && + (pBssDesc->Vender != HT_IOT_PEER_MARVELL) && (pBssDesc->Vender != HT_IOT_PEER_REALTEK_92SE) && (pBssDesc->Vender != HT_IOT_PEER_RALINK) ) retValue = TRUE; } - + return retValue; } @@ -375,7 +375,7 @@ HTIOTActIsForcedCTS2Self( retValue = FALSE; else if(pBssDesc->Vender == HT_IOT_PEER_MARVELL || pBssDesc->Vender == HT_IOT_PEER_ATHEROS) retValue = TRUE; - + return retValue; } @@ -393,7 +393,7 @@ HTIOTActIsEDCABiasRx( if(HAL_IsEdcaBiasRx(Adapter, pBssDesc)) retValue = TRUE; - + return retValue; } @@ -415,7 +415,7 @@ HTIOTActDisableHighPower( return retValue; } - + BOOLEAN HTIOTActIsDisableTx40MHz( @@ -425,10 +425,10 @@ HTIOTActIsDisableTx40MHz( { BOOLEAN retValue = FALSE; - if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || + if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) || - (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || + (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP) ) { if((pBssDesc->Vender==HT_IOT_PEER_REALTEK) && (pBssDesc->BssHT.bdSupportHT)) @@ -446,10 +446,10 @@ HTIOTActIsTxNoAggregation( { BOOLEAN retValue = FALSE; - if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || + if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) || - (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || + (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP) ) { if(pBssDesc->Vender==HT_IOT_PEER_REALTEK) @@ -467,10 +467,10 @@ HTIOTActIsDisableTx2SS( { BOOLEAN retValue = FALSE; - if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || + if( (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || (Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) || - (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || + (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || (Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP) ) { if((pBssDesc->Vender==HT_IOT_PEER_REALTEK) && (pBssDesc->BssHT.bdSupportHT)) @@ -495,7 +495,7 @@ HTIOCActIsDisableCckRate( { retValue = TRUE; } - + return retValue; } @@ -540,17 +540,17 @@ HTConstructCapabilityElement( POCTET_STRING posHTCap, BOOLEAN bAssoc ) -{ +{ PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); pu1Byte pCapELE = NULL, pCapMCS; - CHANNEL_WIDTH ChnlWidth; + CHANNEL_WIDTH ChnlWidth; u1Byte HtAggrSize = HT_AGG_SIZE_64K; u1Byte HtDensity = HT_DENSITY_NO_RESTRICTION; u1Byte HtSTBC = 0; PlatformZeroMemory(posHTCap->Octet, posHTCap->Length); - + if(bAssoc && pHTInfo->ePeerHTSpecVer == HT_SPEC_VER_EWC) { u1Byte EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; // For 11n EWC definition, 2007.07.17, by Emily @@ -558,17 +558,17 @@ HTConstructCapabilityElement( pCapELE = (pu1Byte)&posHTCap->Octet[4]; posHTCap->Length = 30; } - else + else { pCapELE = (pu1Byte)posHTCap->Octet; posHTCap->Length = 26; } - // B0 + // B0 SET_HT_CAPABILITY_ELE_LDPC_CAP(pCapELE, (pHTInfo->HtLdpcCap & LDPC_HT_ENABLE_RX) ? 1 : 0); - + ChnlWidth = (CHANNEL_WIDTH)AP_CheckBwWidth(Adapter); - + if(ACTING_AS_AP(Adapter) == FALSE && ACTING_AS_IBSS(Adapter) == FALSE) { // Determine peer capability for 40MHz bandwidth support when using STA mode. @@ -578,7 +578,7 @@ HTConstructCapabilityElement( if(GET_HT_CAPABILITY_ELE_CHL_WIDTH(pHTInfo->PeerHTCapBuf) == 0) ChnlWidth = CHANNEL_WIDTH_20; } - + ChnlWidth = CHNL_CheckChnlPlanWithBW(Adapter,pMgntInfo->dot11CurrentChannelNumber,ChnlWidth,pMgntInfo->ChannelOffset); } @@ -586,7 +586,7 @@ HTConstructCapabilityElement( if(ChnlWidth == CHANNEL_WIDTH_40 || ChnlWidth == CHANNEL_WIDTH_80) { SET_HT_CAPABILITY_ELE_CHL_WIDTH(pCapELE, 1); - } + } else { SET_HT_CAPABILITY_ELE_CHL_WIDTH(pCapELE, 0); @@ -620,7 +620,7 @@ HTConstructCapabilityElement( { SET_HT_CAPABILITY_ELE_RX_STBC(pCapELE, 0); } - + // B10 SET_HT_CAPABILITY_ELE_DELAY_BA(pCapELE, 0); // Do not support now!! // B11 @@ -628,7 +628,7 @@ HTConstructCapabilityElement( SET_HT_CAPABILITY_ELE_MAX_AMSDU_SIZE(pCapELE, ( (Adapter->MAX_RECEIVE_BUFFER_SIZE >= HT_AMSDU_SIZE_8K) && \ (!PLATFORM_LIMITED_RX_BUF_SIZE(Adapter)))?1:0); } - + // B12 if(IS_WIRELESS_MODE_5G(Adapter)) { @@ -660,7 +660,7 @@ HTConstructCapabilityElement( // RX AMPDU factor and MPDU density SET_HT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pCapELE, HtAggrSize); - SET_HT_CAPABILITY_ELE_MPDU_DENSITY(pCapELE, HtDensity); + SET_HT_CAPABILITY_ELE_MPDU_DENSITY(pCapELE, HtDensity); // Supported MCS set pCapMCS = GET_HT_CAPABILITY_ELE_MCS(pCapELE); @@ -680,7 +680,7 @@ HTConstructCapabilityElement( SET_HT_CAP_TXBF_COMP_STEERING_NUM_ANTENNAS(pCapELE, 1); SET_HT_CAP_TXBF_CHNL_ESTIMATION_NUM_ANTENNAS(pCapELE, HAL_QueryBeamformerCap(Adapter)); } - + // HT Beamformee if(TEST_FLAG(pHTInfo->HtBeamformCap, BEAMFORMING_HT_BEAMFORMEE_ENABLE)) { @@ -705,11 +705,11 @@ HTConstructCapabilityElement( SET_HT_CAPABILITY_ELE_SHORT_GI20M(pCapELE, 0); } - + RT_PRINT_DATA( COMP_HT, DBG_TRACE, "Construct HTCap in Beacon/Assoc/ReAssoc", posHTCap->Octet, posHTCap->Length); - + //Print each field in detail. Driver should not print out this message by default - HTDebugHTCapability(DBG_TRACE, Adapter, posHTCap, (pu1Byte)"HTConstructCapability()"); + HTDebugHTCapability(DBG_TRACE, Adapter, posHTCap, (pu1Byte)"HTConstructCapability()"); } /* @@ -726,22 +726,22 @@ HTConstructInfoElement( PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); pu1Byte pHTInfoEle = (pu1Byte)(posHTInfo->Octet); PRT_CHANNEL_INFO pChnlInfo = GET_CHNL_INFO(pMgntInfo); - + PlatformZeroMemory(posHTInfo->Octet, posHTInfo->Length); if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) { - + if((GetDefaultAdapter(Adapter)->MgntInfo.bForceGoTxData20MBw == TRUE) && IsFirstGoAdapter(Adapter)){ SET_HT_INFO_ELE_STA_CHL_WIDTH(pHTInfoEle, FALSE); SET_HT_INFO_ELE_EXT_CHL_OFFSET(pHTInfoEle, EXTCHNL_OFFSET_NO_EXT); } else{ SET_HT_INFO_ELE_STA_CHL_WIDTH(pHTInfoEle, CHNL_RUN_ABOVE_40MHZ(pMgntInfo)); - SET_HT_INFO_ELE_EXT_CHL_OFFSET(pHTInfoEle, pChnlInfo->Ext20MHzChnlOffsetOf40MHz); + SET_HT_INFO_ELE_EXT_CHL_OFFSET(pHTInfoEle, pChnlInfo->Ext20MHzChnlOffsetOf40MHz); } - SET_HT_INFO_ELE_CONTROL_CHL(pHTInfoEle, pMgntInfo->dot11CurrentChannelNumber); + SET_HT_INFO_ELE_CONTROL_CHL(pHTInfoEle, pMgntInfo->dot11CurrentChannelNumber); SET_HT_INFO_ELE_RIFS(pHTInfoEle, 0); SET_HT_INFO_ELE_PSMP_ACCESS_ONLY(pHTInfoEle, 0); SET_HT_INFO_ELE_SRV_INT_GRAN(pHTInfoEle, 0); @@ -761,9 +761,9 @@ HTConstructInfoElement( { //STA should not generate High Throughput Information Element posHTInfo->Length = 0; - } + } -} +} @@ -774,12 +774,12 @@ HT_PickMCSRate( ) { u1Byte i; - + if(IS_WIRELESS_MODE_N(Adapter)) {//HT part if(HAL_SkipMcsRates(Adapter)) pOperateMCS[1] &=0xF8; //Skip MCS8~11 because mcs7 > mcs6, 9, 10, 11. 2007.01.16 by Emily - + pOperateMCS[4] &= RATE_ADPT_MCS32_MASK; } else @@ -798,7 +798,7 @@ HT_PickMCSRate( * /param Adapter Pionter to Adapter entity * pMCSRateSet Pointer to MCS rate bitmap * pMCSFilter Pointer to MCS rate filter -* +* * /return Highest MCS rate included in pMCSRateSet and filtered by pMCSFilter. * */ @@ -834,7 +834,7 @@ HTGetHighestMCSRate( { if((bitMap%2) != 0) { - k = 8*i+j; + k = 8*i+j; if(MCS_DATA_RATE[0][0][k] > MCS_DATA_RATE[0][0][mcsRate]) mcsRate = k; } @@ -844,12 +844,12 @@ HTGetHighestMCSRate( } return (mcsRate + MGN_MCS0); } - + /* ** -**1.Filter our operation rate set with AP's rate set +**1.Filter our operation rate set with AP's rate set **2.shall reference channel bandwidth, STBC, Antenna number **3.generate rate adative table for firmware **David 20060906 @@ -865,7 +865,7 @@ HTFilterMCSRate( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; UINT i=0; - + // filter out operational rate set not supported by AP, the lenth of it is 16 for(i = 0;i <= 15; i++) pOperateMCS[i] = pMgntInfo->Regdot11HTOperationalRateSet[i] & pSupportMCS[i]; @@ -897,29 +897,29 @@ HTOnAssocRsp( RT_TRACE( COMP_QOS, DBG_LOUD, ("<=== HTOnAssocRsp(): HT_DISABLE\n") ); return; } - + PlatformZeroMemory(pHTInfo->PeerHTCapBuf, sizeof(pHTInfo->PeerHTCapBuf)); PlatformZeroMemory(pHTInfo->PeerHTInfoBuf, sizeof(pHTInfo->PeerHTInfoBuf)); - + // Get HT CAP and copy into buffer osTmp= PacketGetElement( asocpdu, EID_HTCapability, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(osTmp.Length == 0) osTmp = PacketGetElement( asocpdu, EID_Vendor, OUI_SUB_11N_EWC_HT_CAP, OUI_SUBTYPE_DONT_CARE); - + osTmp.Length = osTmp.Length > sizeof(pHTInfo->PeerHTCapBuf)?\ sizeof(pHTInfo->PeerHTCapBuf):osTmp.Length; //prevent from overflow - + if(osTmp.Length > 0) CopyMem(pHTInfo->PeerHTCapBuf, osTmp.Octet, osTmp.Length); - + // Get HT Info and copy into buffer osTmp= PacketGetElement( asocpdu, EID_HTInfo, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(osTmp.Length == 0) osTmp = PacketGetElement( asocpdu, EID_Vendor, OUI_SUB_11N_EWC_HT_INFO, OUI_SUBTYPE_DONT_CARE); - + osTmp.Length = osTmp.Length>sizeof(pHTInfo->PeerHTCapBuf)?\ sizeof(pHTInfo->PeerHTCapBuf):osTmp.Length; //prevent from overflow - + if(osTmp.Length > 0) CopyMem(pHTInfo->PeerHTInfoBuf, osTmp.Octet, osTmp.Length); @@ -930,9 +930,9 @@ HTOnAssocRsp( if(!PlatformCompareMemory(pHTInfo->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo))) pPeerHTInfo = (pu1Byte)(&pHTInfo->PeerHTInfoBuf[4]); - else + else pPeerHTInfo = (pu1Byte)(pHTInfo->PeerHTInfoBuf); - + // Get 20/40 BSS Coexistence Management Support from Extended Capabilities element osTmp = PacketGetElement(asocpdu, EID_EXTCapability, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(osTmp.Length != 0) @@ -951,14 +951,14 @@ HTOnAssocRsp( pHTInfo->bPeer40MHzCap = GET_HT_CAPABILITY_ELE_CHL_WIDTH(pPeerHTCap); pHTInfo->PeerExtChnlOffset = (EXTCHNL_OFFSET)GET_HT_INFO_ELE_EXT_CHL_OFFSET(pPeerHTInfo); pHTInfo->bPeer40MHzIntolerant = GET_HT_CAPABILITY_ELE_FORTY_INTOLERANT(pPeerHTCap); - + // B0 Config LDPC Coding Capability if(TEST_FLAG(pHTInfo->HtLdpcCap, LDPC_HT_ENABLE_TX)) { SET_FLAG(pHTInfo->HtCurLdpc, GET_HT_CAPABILITY_ELE_LDPC_CAP(pPeerHTCap) ? (LDPC_HT_ENABLE_TX | LDPC_HT_CAP_TX) : 0); RT_TRACE_F(COMP_HT, DBG_LOUD, ("Target BSS support HT LDPC, enable Tx LDPC!\n")); - } + } // B5 B6 Config Short GI/ Long GI setting pHTInfo->bCurShortGI20MHz = GET_HT_CAPABILITY_ELE_SHORT_GI20M(pPeerHTCap); @@ -985,17 +985,17 @@ HTOnAssocRsp( // A-MPDU setting pHTInfo->bCurrentAMPDUEnable = pHTInfo->bAMPDUEnable; - if( (pMgntInfo->SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || + if( (pMgntInfo->SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP104) || (pMgntInfo->SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_WEP40) || (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) || - (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || + (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) || (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP)) { if( (pMgntInfo->IOTPeer == HT_IOT_PEER_ATHEROS) || (pMgntInfo->IOTPeer == HT_IOT_PEER_UNKNOWN) ) pHTInfo->bCurrentAMPDUEnable = FALSE; - } - + } + // B16 B17 Maximum A-MPDU Length Exponent if(GET_HT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pPeerHTCap) < pHTInfo->CurrentAMPDUFactor) pHTInfo->CurrentAMPDUFactor = GET_HT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pPeerHTCap); @@ -1023,18 +1023,18 @@ HTOnAssocRsp( pHTInfo->bCurRxReorderEnable = pHTInfo->bRegRxReorderEnable; pCapMCS = GET_HT_CAPABILITY_ELE_MCS(pPeerHTCap); - + HTFilterMCSRate(Adapter, pCapMCS, pMgntInfo->dot11HTOperationalRateSet); - + // B2 B3 SM Power Save pHTInfo->PeerMimoPs = GET_HT_CAPABILITY_ELE_MIMO_PWRSAVE(pPeerHTCap); if(pHTInfo->PeerMimoPs <= MIMO_PS_DYNAMIC) pMcsFilter = MCS_FILTER_1SS; else pMcsFilter = MCS_FILTER_ALL; - + pMgntInfo->HTHighestOperaRate = HTGetHighestMCSRate( - Adapter, + Adapter, pMgntInfo->dot11HTOperationalRateSet, pMcsFilter ); @@ -1061,7 +1061,7 @@ HTOnAssocRsp( // Config current operation mode. pHTInfo->CurrentOpMode = GET_HT_INFO_ELE_OPT_MODE(pPeerHTInfo); -} +} /* @@ -1076,7 +1076,7 @@ HTInitializeHTInfo(PADAPTER Adapter) { PRT_HIGH_THROUGHPUT pHTInfo = Adapter->MgntInfo.pHTInfo; - // These parameters will be reset when receiving deauthentication packet + // These parameters will be reset when receiving deauthentication packet pHTInfo->bCurrentHTSupport = FALSE; // LDPC support @@ -1112,7 +1112,7 @@ HTInitializeHTInfo(PADAPTER Adapter) pHTInfo->IdleOBSSScanCnt = 0; pHTInfo->lastTimeSentObssRptUs = 0; - // Initialize all of the parameters related to 11n + // Initialize all of the parameters related to 11n PlatformZeroMemory((PVOID)(&(pHTInfo->SelfHTCap)), sizeof(pHTInfo->SelfHTCap)); PlatformZeroMemory((PVOID)(&(pHTInfo->SelfHTInfo)), sizeof(pHTInfo->SelfHTInfo)); PlatformZeroMemory((PVOID)(&(pHTInfo->PeerHTCapBuf)), sizeof(pHTInfo->PeerHTCapBuf)); @@ -1122,13 +1122,13 @@ HTInitializeHTInfo(PADAPTER Adapter) pHTInfo->ePeerHTSpecVer = HT_SPEC_VER_IEEE; // Realtek proprietary aggregation mode - pHTInfo->RT2RT_HT_Mode = 0; + pHTInfo->RT2RT_HT_Mode = 0; // Beamforming support CLEAR_FLAGS(pHTInfo->HtCurBeamform); } -VOID +VOID HTInitializeBssDesc( IN PBSS_HT pBssHT ) @@ -1141,7 +1141,7 @@ HTInitializeBssDesc( pBssHT->bdHTInfoLen = 0; pBssHT->bdHTSpecVer= HT_SPEC_VER_IEEE; - + pBssHT->RT2RT_HT_Mode = 0; pBssHT->bd40Intolerant = FALSE; @@ -1159,21 +1159,21 @@ HTParsingHTCapElement( ) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + if( HTCapIE.Length > sizeof(pBssDesc->BssHT.bdHTCapBuf) ) { RT_TRACE( COMP_HT, DBG_LOUD, ("HTParsingHTCapElement(): HT Capability Element length is too long!\n") ); return; } - // TODO: Check the correctness of HT Cap + // TODO: Check the correctness of HT Cap //Print each field in detail. Driver should not print out this message by default if(!ACTING_AS_AP(Adapter) && !pMgntInfo->mAssoc) HTDebugHTCapability(DBG_TRACE, Adapter, &HTCapIE, (pu1Byte)"HTParsingHTCapElement()"); HTCapIE.Length = HTCapIE.Length > sizeof(pBssDesc->BssHT.bdHTCapBuf)?\ sizeof(pBssDesc->BssHT.bdHTCapBuf):HTCapIE.Length; //prevent from overflow - + CopyMem(pBssDesc->BssHT.bdHTCapBuf, HTCapIE.Octet, HTCapIE.Length); pBssDesc->BssHT.bdHTCapLen = HTCapIE.Length; @@ -1188,21 +1188,21 @@ HTParsingHTInfoElement( ) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + if( HTInfoIE.Length > sizeof(pBssDesc->BssHT.bdHTInfoBuf)) { RT_TRACE( COMP_HT, DBG_LOUD, ("HTParsingHTInfoElement(): HT Information Element length is too long!\n") ); return; } - // TODO: Check the correctness of HT Info + // TODO: Check the correctness of HT Info //Print each field in detail. Driver should not print out this message by default - if(!ACTING_AS_AP(Adapter) && !pMgntInfo->mAssoc) - HTDebugHTInfo(DBG_TRACE, Adapter, &HTInfoIE, (pu1Byte)"HTParsingHTInfoElement()"); - + if(!ACTING_AS_AP(Adapter) && !pMgntInfo->mAssoc) + HTDebugHTInfo(DBG_TRACE, Adapter, &HTInfoIE, (pu1Byte)"HTParsingHTInfoElement()"); + HTInfoIE.Length = HTInfoIE.Length > sizeof(pBssDesc->BssHT.bdHTInfoBuf)?\ sizeof(pBssDesc->BssHT.bdHTInfoBuf):HTInfoIE.Length; //prevent from overflow - + CopyMem( pBssDesc->BssHT.bdHTInfoBuf, HTInfoIE.Octet, HTInfoIE.Length); pBssDesc->BssHT.bdHTInfoLen = HTInfoIE.Length; } @@ -1213,10 +1213,10 @@ HTParsingHTInfoElement( * (1) Parse HTCap, and HTInfo, and record whether it is 11n AP * (2) If peer is HT, but not WMM, call QosSetLegacyWMMParamWithHT() * (3) Check whether peer is Realtek AP (for Realtek proprietary aggregation mode). - * Input: + * Input: * PADAPTER Adapter - * - * Output: + * + * Output: * PRT_TCB BssDesc * */ @@ -1231,26 +1231,26 @@ HTGetValueFromBeaconOrProbeRsp( mmpdu.Octet = pSRCmmpdu->Octet; mmpdu.Length = pSRCmmpdu->Length; - - //2Note: - // Mark for IOT testing using Linksys WRT350N, This AP does not contain WMM IE when + + //2Note: + // Mark for IOT testing using Linksys WRT350N, This AP does not contain WMM IE when // it is configured at pure-N mode. // if(bssDesc->BssQos.bdQoSMode & QOS_WMM) - // + // HTInitializeBssDesc (&bssDesc->BssHT); //2<1> Parse HTCap, and HTInfo // Get HT Capability IE: (1) Get IEEE Draft N IE or (2) Get EWC IE HTCapIE = PacketGetElement(mmpdu, EID_HTCapability, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); - RT_DISP(FBEACON, BCN_SHOW, + RT_DISP(FBEACON, BCN_SHOW, ("EID_HTCapability HTCapIE.Length=%d\r\n", HTCapIE.Length)) if(HTCapIE.Length == 0) { - HTCapIE = PacketGetElement(mmpdu, EID_Vendor, OUI_SUB_11N_EWC_HT_CAP, OUI_SUBTYPE_DONT_CARE); + HTCapIE = PacketGetElement(mmpdu, EID_Vendor, OUI_SUB_11N_EWC_HT_CAP, OUI_SUBTYPE_DONT_CARE); if(HTCapIE.Length != 0) bssDesc->BssHT.bdHTSpecVer= HT_SPEC_VER_EWC; - RT_DISP(FBEACON, BCN_SHOW, + RT_DISP(FBEACON, BCN_SHOW, ("EID_Vendor HTCapIE.Length=%d\r\n", HTCapIE.Length)) } if(HTCapIE.Length != 0) @@ -1272,7 +1272,7 @@ HTGetValueFromBeaconOrProbeRsp( { bssDesc->BssHT.bdSupportHT = TRUE; if(bssDesc->BssQos.bdQoSMode == QOS_DISABLE) - QosSetLegacyWMMParamWithHT(Adapter, bssDesc); + QosSetLegacyWMMParamWithHT(Adapter, bssDesc); } else { @@ -1283,13 +1283,13 @@ HTGetValueFromBeaconOrProbeRsp( OBSSIE = PacketGetElement(mmpdu, EID_OBSS, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(OBSSIE.Length != 0) BSS_ParsingOBSSInfoElement(Adapter, OBSSIE, bssDesc); - + //2<3>Parse 20 40 BSS Coexistence IE - // 23. 20/40 BSS Coexistence element + // 23. 20/40 BSS Coexistence element BssCoexistenceIE = PacketGetElement(mmpdu, EID_BSSCoexistence, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE ); if(BssCoexistenceIE.Length != 0) BSS_ParsingBSSCoexistElement(Adapter, BssCoexistenceIE, bssDesc); - + //2<4>Check peer configuration if(HTCapIE.Length!=0 && HTCapIE.Octet != NULL) { @@ -1303,16 +1303,16 @@ HTGetValueFromBeaconOrProbeRsp( /*----------------------------------------------------------------------------- * Function: HTResetSelfAndSavePeerSetting() * - * Overview: This function should ONLY be called before association. SetupJoinInfraInfo(). + * Overview: This function should ONLY be called before association. SetupJoinInfraInfo(). * Driver reset it's state to it's capability and peer's capability - * + * * Input: PADAPTER Adapter - * PRT_WLAN_BSS pBssDesc + * PRT_WLAN_BSS pBssDesc * * Output: NONE * * Return: NONE - + *---------------------------------------------------------------------------*/ VOID HTResetSelfAndSavePeerSetting( @@ -1341,13 +1341,13 @@ HTResetSelfAndSavePeerSetting( if(pBssDesc->BssHT.bdHTCapLen != 0) pHTInfo->bPeer40MHzCap = GET_HT_CAPABILITY_ELE_CHL_WIDTH(pBssDesc->BssHT.bdHTCapBuf); - + if(pBssDesc->BssHT.bdHTInfoLen != 0) pHTInfo->PeerExtChnlOffset = (EXTCHNL_OFFSET)GET_HT_INFO_ELE_EXT_CHL_OFFSET(pBssDesc->BssHT.bdHTInfoBuf); // Check whether RT to RT aggregation mode is enabled pHTInfo->RT2RT_HT_Mode = pBssDesc->BssHT.RT2RT_HT_Mode; - + // Decide IOT Action // Must be called after the parameter of pHTInfo->bCurrentRT2RTAggregation is decided pMgntInfo->IOTAction = 0; @@ -1356,7 +1356,7 @@ HTResetSelfAndSavePeerSetting( pMgntInfo->IOTAction |= HT_IOT_ACT_DISABLE_ALL_2SS; bIOTAction = HTIOTActIsForcedCTS2Self(Adapter, pBssDesc); - if(bIOTAction) + if(bIOTAction) pMgntInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF; bIOTAction = HTIOTActIsEDCABiasRx(Adapter, pBssDesc); @@ -1404,7 +1404,7 @@ HTResetSelfAndSavePeerSetting( pHTInfo->RT2RT_HT_Mode = 0; pMgntInfo->IOTAction = 0; } - + } VOID @@ -1416,7 +1416,7 @@ HTUpdateSelfAndPeerSetting( PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); pu1Byte pPeerHTInfo = (pu1Byte)pBssDesc->BssHT.bdHTInfoBuf; - + if(pHTInfo->bCurrentHTSupport) { // Config current operation mode. @@ -1445,7 +1445,7 @@ HTUseDefaultSettingFromReg( pHTInfo->HtCurLdpc = pHTInfo->HtLdpcCap; pHTInfo->HtCurStbc = pHTInfo->HtStbcCap; pHTInfo->HtCurBeamform = pHTInfo->HtBeamformCap; - + pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK; pHTInfo->bCurShortGI20MHz= TRUE; pHTInfo->bCurShortGI40MHz= bRegBW40MHz?TRUE:FALSE; @@ -1461,7 +1461,7 @@ HTUseDefaultSettingFromReg( // Vista DefAdapter AP mode mAssoc = FALSE. AP_SetupStartApInfo/SetupStartIBSSInfo (only default port) if(DefAdapter->MgntInfo.mAssoc == TRUE) pMgntInfo->IOTPeer = DefAdapter->MgntInfo.IOTPeer; - else + else pMgntInfo->IOTPeer = HT_IOT_PEER_SELF_SOFTAP; pHTInfo->bCurRxReorderEnable = pHTInfo->bRegRxReorderEnable; @@ -1493,8 +1493,8 @@ HTUseDefaultSettingFromDefault( PADAPTER DefAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pDefMgntInfo = &DefAdapter->MgntInfo; PRT_HIGH_THROUGHPUT pDefHTInfo = DefAdapter->MgntInfo.pHTInfo; - - //===== The ones that not follow ====== + + //===== The ones that not follow ====== pHTInfo->bCurShortGI20MHz = TRUE; pHTInfo->HtCurLdpc = pHTInfo->HtLdpcCap; @@ -1512,8 +1512,8 @@ HTUseDefaultSettingFromDefault( Adapter, pMgntInfo->dot11HTOperationalRateSet, MCS_FILTER_ALL ); - - //============================== + + //============================== pHTInfo->bCurSuppCCK = pDefHTInfo->bCurSuppCCK; pHTInfo->bCurShortGI40MHz = pDefMgntInfo->dot11CurrentChannelBandWidth?FALSE:TRUE; //AMPDU Factor and Density is register, can't be per pkt. AMPDU_Factor must use Default for register. by Bohn, 2009.12.18 @@ -1521,13 +1521,13 @@ HTUseDefaultSettingFromDefault( pHTInfo->CurrentMPDUDensity = pDefHTInfo->CurrentMPDUDensity; //[Win7] Adapter act as AP already, Defaualt Port Connected already, 2009.07.30, by Bohn pMgntInfo->IOTPeer = pDefMgntInfo->IOTPeer; - + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AMPDU_FACTOR, &pHTInfo->CurrentAMPDUFactor); - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AMPDU_MIN_SPACE, &pHTInfo->CurrentMPDUDensity); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AMPDU_MIN_SPACE, &pHTInfo->CurrentMPDUDensity); pMgntInfo->dot11CurrentChannelBandWidth = pDefMgntInfo->dot11CurrentChannelBandWidth; } - + VOID HTUseDefaultSetting( @@ -1541,19 +1541,19 @@ HTUseDefaultSetting( if(pHTInfo->bEnableHT) { pHTInfo->bCurrentHTSupport = TRUE; - + //[Win7] [Vista/XP] Cross Platform Capbility Enable!, 2009.07.31, by Bohn GetTwoPortSharedResource(Adapter,TWO_PORT_SHARED_OBJECT__STATUS,NULL,&TwoPortStatus); //[win7 Two Port BW40Mhz issue] Extention Port Use Reg's Default Value. 2009.05.20, by bohn if( TwoPortStatus==TWO_PORT_STATUS__DEFAULT_ONLY || TwoPortStatus==TWO_PORT_STATUS__EXTENSION_ONLY || - TwoPortStatus==TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE) + TwoPortStatus==TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE) { - HTUseDefaultSettingFromReg(Adapter); + HTUseDefaultSettingFromReg(Adapter); } else if(TwoPortStatus==TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT) - { + { //[win7 Two Port BW40Mhz issue] Extention Port obey the rule of Default Port. 2009.05.20, by bohn HTUseDefaultSettingFromDefault(Adapter); } @@ -1611,12 +1611,12 @@ HTCheckHTCap( pEntry->HTInfo.MimoPs = GET_HT_CAPABILITY_ELE_MIMO_PWRSAVE(pHTCap); // B5 B6 Config Short GI/ Long GI setting - if(pHTInfo->bCurShortGI20MHz) + if(pHTInfo->bCurShortGI20MHz) pEntry->HTInfo.bShortGI20M = GET_HT_CAPABILITY_ELE_SHORT_GI20M(pHTCap)?TRUE:FALSE; else pEntry->HTInfo.bShortGI20M = FALSE; - if(pHTInfo->bCurShortGI40MHz) + if(pHTInfo->bCurShortGI40MHz) pEntry->HTInfo.bShortGI40M = GET_HT_CAPABILITY_ELE_SHORT_GI40M(pHTCap)?TRUE:FALSE; else pEntry->HTInfo.bShortGI40M = FALSE; @@ -1633,13 +1633,13 @@ HTCheckHTCap( // B11 Config A-MSDU setting TmpValue = (GET_HT_CAPABILITY_ELE_MAX_AMSDU_SIZE(pHTCap)==0)?HT_AMSDU_SIZE_4K:HT_AMSDU_SIZE_8K; - if(pHTInfo->nAMSDU_MaxSize >= TmpValue) + if(pHTInfo->nAMSDU_MaxSize >= TmpValue) pEntry->HTInfo.AMSDU_MaxSize = TmpValue; else pEntry->HTInfo.AMSDU_MaxSize = pHTInfo->nAMSDU_MaxSize; // B12 Config DSSS/CCK mode in 40MHz mode - pEntry->HTInfo.bSupportCck = + pEntry->HTInfo.bSupportCck = ((pHTInfo->bCurSuppCCK)?(GET_HT_CAPABILITY_ELE_DSS_CCK(pHTCap)?TRUE:FALSE):FALSE); // Get operation bandwidth @@ -1651,7 +1651,7 @@ HTCheckHTCap( // Get AMPDU Factor if(GET_HT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pHTCap) < pHTInfo->CurrentAMPDUFactor) pEntry->HTInfo.AMPDU_Factor = GET_HT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pHTCap); - else + else pEntry->HTInfo.AMPDU_Factor = pHTInfo->CurrentAMPDUFactor; // Get AMPDU Density @@ -1673,7 +1673,7 @@ HTCheckHTCap( CLEAR_FLAGS(pEntry->HTInfo.HtCurBeamform); // B11 SU Beamformer Capable, we are Beamformee - if( TEST_FLAG(pHTInfo->HtBeamformCap, BEAMFORMING_HT_BEAMFORMEE_ENABLE) && + if( TEST_FLAG(pHTInfo->HtBeamformCap, BEAMFORMING_HT_BEAMFORMEE_ENABLE) && GET_HT_CAP_TXBF_EXPLICIT_COMP_STEERING_CAP(pHTCap)) { SET_FLAG(pEntry->HTInfo.HtCurBeamform, BEAMFORMING_HT_BEAMFORMER_ENABLE); @@ -1682,7 +1682,7 @@ HTCheckHTCap( } // B12 SU Beamformee Capable, we are Beamformer - if( TEST_FLAG(pHTInfo->HtBeamformCap, BEAMFORMING_HT_BEAMFORMER_ENABLE) && + if( TEST_FLAG(pHTInfo->HtBeamformCap, BEAMFORMING_HT_BEAMFORMER_ENABLE) && GET_HT_CAP_TXBF_EXPLICIT_COMP_FEEDBACK_CAP(pHTCap)) { SET_FLAG(pEntry->HTInfo.HtCurBeamform, BEAMFORMING_HT_BEAMFORMEE_ENABLE); @@ -1703,7 +1703,7 @@ HTCheckHTCap( // 2.4G AP will switch BW (40 <--> 20MHz) in some cases, and we will really switch BW // to 20MHz if our BSS AP enable the capability in beacon. It will cause an issue that if we // switch BW to 20MHz before the system enters WoWLAN mode, and the AP returns to 40MHz -// such that we cannot receive 40MHz data and will be deauth by AP in some cases, so we +// such that we cannot receive 40MHz data and will be deauth by AP in some cases, so we // recover the BW to 40MHz in order to Rx 40MHz data and we should make sure that we will // not Tx MCS rate during WoWLAN mode (now we set all the Tx packet rates to 1M, see // FillFakeTxDescriptor_XXX().). diff --git a/network/wlan/WDI/COMMON/HTGen.h b/network/wlan/WDI/COMMON/HTGen.h index 1ed55dfac..ab97de75e 100644 --- a/network/wlan/WDI/COMMON/HTGen.h +++ b/network/wlan/WDI/COMMON/HTGen.h @@ -36,7 +36,7 @@ extern u1Byte MCS_FILTER_1SS[16]; typedef enum _AMSDU_SIZE{ AMSDU_SIZE_UNSPECIFED = 0, HT_AMSDU_SIZE_4K = 3839, - HT_AMSDU_SIZE_8K = 7935, + HT_AMSDU_SIZE_8K = 7935, VHT_AMSDU_SIZE_4K = 3895, VHT_AMSDU_SIZE_8K = 7991, VHT_AMSDU_SIZE_11K = 11454, @@ -78,13 +78,13 @@ typedef enum _HT_IOT_PEER HT_IOT_PEER_RALINK = 4, HT_IOT_PEER_ATHEROS = 5, HT_IOT_PEER_CISCO = 6, - HT_IOT_PEER_MERU = 7, + HT_IOT_PEER_MERU = 7, HT_IOT_PEER_MARVELL = 8, HT_IOT_PEER_REALTEK_SOFTAP = 9,// peer is RealTek SOFT_AP, by Bohn, 2009.12.17 HT_IOT_PEER_SELF_SOFTAP = 10, // Self is SoftAP HT_IOT_PEER_AIRGO = 11, HT_IOT_PEER_REALTEK_JAGUAR_BCUTAP = 12, - HT_IOT_PEER_REALTEK_JAGUAR_CCUTAP = 13, + HT_IOT_PEER_REALTEK_JAGUAR_CCUTAP = 13, HT_IOT_PEER_CMW500 = 14, HT_IOT_PEER_MAX, }HT_IOT_PEER_E, *PHTIOT_PEER_E; @@ -95,7 +95,7 @@ typedef enum _HT_IOT_PEER_SUBTYPE HT_IOT_PEER_ATHEROS_DIR655 = 1, HT_IOT_PEER_ATHEROS_NETGEAR_WNDAP3200 = 3, HT_IOT_PEER_BROADCOM_NETGEAR_WNDAP4500 = 4, - HT_IOT_PEER_ATHEROS_NETGEAR_WNDAP3500 = 5, + HT_IOT_PEER_ATHEROS_NETGEAR_WNDAP3500 = 5, HT_IOT_PEER_LINKSYS_E4200_V1 = 6, HT_IOT_PEER_TPLINK_AC1750 = 7, HT_IOT_PEER_RALINK_DIR300 = 8, @@ -110,7 +110,7 @@ typedef enum _HT_IOT_ACTION{ HT_IOT_ACT_DISABLE_EDCA_TURBO = 0x00000010, HT_IOT_ACT_MGNT_USE_CCK_6M = 0x00000020, HT_IOT_ACT_FORCED_DATA_RATE = 0x00000040, - + HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200, HT_IOT_ACT_FORCED_RTS = 0x00000400, @@ -145,8 +145,8 @@ typedef enum _RT_HT_INF0_CAP{ RT_HT_CAP_USE_TURBO_AGGR = 0x01, RT_HT_CAP_USE_LONG_PREAMBLE = 0x02, RT_HT_CAP_USE_AMPDU = 0x04, - RT_HT_CAP_USE_WOW = 0x8, - RT_HT_CAP_USE_SOFTAP = 0x10, + RT_HT_CAP_USE_WOW = 0x8, + RT_HT_CAP_USE_SOFTAP = 0x10, RT_HT_CAP_USE_92SE = 0x20, RT_HT_CAP_USE_88C_92C = 0x40, RT_HT_CAP_USE_AP_CLIENT_MODE = 0x80, // AP team request to reserve this bit, by Emily @@ -175,7 +175,7 @@ HTPeerMcsToDataRate( VOID HTSetCCKSupport( PADAPTER Adapter, - BOOLEAN bStarter, + BOOLEAN bStarter, pu1Byte pPeerHTCap ); @@ -200,7 +200,7 @@ VOID HTInitializeHTInfo( PADAPTER Adapter); -VOID +VOID HTInitializeBssDesc( IN PBSS_HT pBssHT ); @@ -226,7 +226,7 @@ HTGetValueFromBeaconOrProbeRsp( VOID ResetIOTSetting( PMGNT_INFO pMgntInfo); - + VOID HTResetSelfAndSavePeerSetting( PADAPTER Adapter, diff --git a/network/wlan/WDI/COMMON/HashTable.c b/network/wlan/WDI/COMMON/HashTable.c index c2a54b9b4..39106fb69 100644 --- a/network/wlan/WDI/COMMON/HashTable.c +++ b/network/wlan/WDI/COMMON/HashTable.c @@ -6,17 +6,17 @@ // Generic hash table for kernel mode module. // // Note: -// 1. Memory allocation is a issue on kernel space for calling context -// and computation time limitation. So we don't re-hash the table even -// it is full. In short, this implementation is not a perfect hash, -// however, if user has a good guess on hash table usage to prevent -// full and colission condition, this implementation is still a +// 1. Memory allocation is a issue on kernel space for calling context +// and computation time limitation. So we don't re-hash the table even +// it is full. In short, this implementation is not a perfect hash, +// however, if user has a good guess on hash table usage to prevent +// full and colission condition, this implementation is still a // constant time on put, remove, and get operations. // -// 2. This implementation is not thread-safe, that is, user have to -// protect related resource and the function exported here by their +// 2. This implementation is not thread-safe, that is, user have to +// protect related resource and the function exported here by their // own means. -// +// // 070606, by rcnjko. //----------------------------------------------------------------------------- @@ -31,7 +31,7 @@ typedef struct _RT_HASH_TABLE RT_HASH_TABLE; //================================================================================ // Prototype of protected function. //================================================================================ -int +int RtCompareKeys( IN pu1Byte Key1, IN pu1Byte Key2, @@ -73,23 +73,23 @@ RtResetHashTable( } idx = 0; - for(pTmpSListEntry = RTGetHeadSList( &(hHashTable->FreeValuesList) ); - pTmpSListEntry != NULL && idx < hHashTable->Capacity; + for(pTmpSListEntry = RTGetHeadSList( &(hHashTable->FreeValuesList) ); + pTmpSListEntry != NULL && idx < hHashTable->Capacity; pTmpSListEntry = pTmpSListEntry->Next) { pHashEntry = RT_HASH_ENTRY_FROM_FREE_LINK(pTmpSListEntry); - RT_ASSERT( ((pu1Byte)pHashEntry >= (pu1Byte)(hHashTable->pValuesBuf) && - (pu1Byte)pHashEntry < ((pu1Byte)(hHashTable->pValuesBuf) + (hHashTable->ValueSize * hHashTable->NumValuesAlloc))), + RT_ASSERT( ((pu1Byte)pHashEntry >= (pu1Byte)(hHashTable->pValuesBuf) && + (pu1Byte)pHashEntry < ((pu1Byte)(hHashTable->pValuesBuf) + (hHashTable->ValueSize * hHashTable->NumValuesAlloc))), ("hHashTable(%p) idx(%d) pHashEntry(%p): invalid pHashEntry!!!\n", hHashTable, idx, pHashEntry)); idx++; } - RT_ASSERT(idx == hHashTable->NumValuesAlloc, - ("hHashTable(%p) idx(%d) != NumValuesAlloc(%d), pTmpSListEntry(%p)\n", + RT_ASSERT(idx == hHashTable->NumValuesAlloc, + ("hHashTable(%p) idx(%d) != NumValuesAlloc(%d), pTmpSListEntry(%p)\n", hHashTable, idx, hHashTable->NumValuesAlloc, pTmpSListEntry)); - RT_ASSERT(pTmpSListEntry == NULL, - ("hHashTable(%p) pTmpSListEntry(%p) != NULL, idx(%d), NumValuesAlloc(%d)\n", + RT_ASSERT(pTmpSListEntry == NULL, + ("hHashTable(%p) pTmpSListEntry(%p) != NULL, idx(%d), NumValuesAlloc(%d)\n", hHashTable, pTmpSListEntry, idx, hHashTable->NumValuesAlloc)); } #endif @@ -103,7 +103,7 @@ RtResetHashTable( // Input: // Capacity: number of bucket of the hash table to allocated. // ValueSize: number of byte of a value object. -// KeySize: number of byte of the key. +// KeySize: number of byte of the key. // pfHash: pointer to the hash function, see definition of RT_HT_HASH_FUNC for detail. // // Output: @@ -196,7 +196,7 @@ RtAllocateHashTable( { pHashEntry->Key = pKey; RTInsertTailSList(&(pTable->FreeValuesList), &(pHashEntry->FreeLink)); - + pHashEntry = (PRT_HASH_ENTRY)((pu1Byte)pHashEntry + ValueSize); pKey = (pu1Byte)pKey + KeySize; } @@ -218,7 +218,7 @@ RtAllocateHashTable( return pTable; }while(FALSE); - + // // Error case. // @@ -237,7 +237,7 @@ RtAllocateHashTable( // // Description: -// Return the value object of specified key if found, +// Return the value object of specified key if found, // NULL otherwise. // PRT_HASH_ENTRY @@ -252,16 +252,16 @@ RtGetValueFromHashTable( idx = hHashTable->pfHash(Key); for( pTmpListEntry = hHashTable->Buckets[idx].Flink; - pTmpListEntry != &(hHashTable->Buckets[idx]); + pTmpListEntry != &(hHashTable->Buckets[idx]); pTmpListEntry = pTmpListEntry->Flink ) { pHashEntry = RT_HASH_ENTRY_FROM_BUCKET_LINK(pTmpListEntry); // Compare the keys if they are equal. if( RtCompareKeys(Key, pHashEntry->Key, hHashTable->KeySize) == 0 ) - { + { return pHashEntry; } - } + } return NULL; } @@ -270,7 +270,7 @@ RtGetValueFromHashTable( // Description: // Compare the two keys and return 0 if they are equal, otherwise return an interger indicating the difference. // -int +int RtCompareKeys( IN pu1Byte Key1, IN pu1Byte Key2, @@ -292,11 +292,11 @@ RtCompareKeys( // // Description: -// Retrive an value object from pool and put it to the hash table +// Retrive an value object from pool and put it to the hash table // according to hash value of the key. // // Output: -// Return the value object assocaited with the key specfied, +// Return the value object assocaited with the key specfied, // NULL if no available value object now. // PRT_HASH_ENTRY @@ -316,9 +316,9 @@ RtPutKeyToHashTable( { return pHashEntry; } - + // - // Retrive an value object from pool for a new Key, + // Retrive an value object from pool for a new Key, // and put it into hash table. // idx = hHashTable->pfHash(Key); @@ -366,7 +366,7 @@ RtFreeHashTable( RT_TRACE(COMP_INIT, DBG_TRACE, ("RtFreeHashTable(): pValuesBuf: %p, ValuesBufSize: %d\n", hHashTable->pValuesBuf, ValuesBufSize)); PlatformFreeMemory(hHashTable->pValuesBuf, ValuesBufSize); } - + TableSize = sizeof(RT_HASH_TABLE) + ((hHashTable->Capacity - 1) * sizeof(RT_LIST_ENTRY)); RT_TRACE(COMP_INIT, DBG_TRACE, ("RtFreeHashTable(): hHashTable: %p, TableSize: %d\n", hHashTable, TableSize)); PlatformFreeMemory(hHashTable, TableSize); @@ -375,7 +375,7 @@ RtFreeHashTable( // // Description: -// Remove value object of specified key from hash table. +// Remove value object of specified key from hash table. // void RtRemoveKeyFromVaHashTable( @@ -389,17 +389,17 @@ RtRemoveKeyFromVaHashTable( idx = hHashTable->pfHash(Key); for( pTmpListEntry = hHashTable->Buckets[idx].Flink; - pTmpListEntry != &(hHashTable->Buckets[idx]); + pTmpListEntry != &(hHashTable->Buckets[idx]); pTmpListEntry = pTmpListEntry->Flink ) { pHashEntry = RT_HASH_ENTRY_FROM_BUCKET_LINK(pTmpListEntry); if( RtCompareKeys(Key, pHashEntry->Key, hHashTable->KeySize) == 0 ) - { + { RTRemoveEntryList( &(pHashEntry->BucketLink) ); RTRemoveEntryList( &(pHashEntry->BusyLink) ); RTInsertTailSList( &(hHashTable->FreeValuesList), &(pHashEntry->FreeLink) ); } - } + } } diff --git a/network/wlan/WDI/COMMON/Hotspot20.c b/network/wlan/WDI/COMMON/Hotspot20.c index 8ccfb883e..a2ee9cb6f 100644 --- a/network/wlan/WDI/COMMON/Hotspot20.c +++ b/network/wlan/WDI/COMMON/Hotspot20.c @@ -15,11 +15,11 @@ GAS_OnInitReq( { RT_STATUS RtStatus = RT_STATUS_SUCCESS; pu1Byte pOUI = NULL; - + FunctionIn(COMP_MLME); PlatformIndicateActionFrame(pAdapter, (PVOID)posMpdu); - + pOUI = Frame_GAS_QueryReq_OUI(*posMpdu); RT_PRINT_DATA(COMP_MLME, DBG_LOUD, ("GAS Initial request: "), pOUI, 3); if( PlatformCompareMemory(pOUI, WFA_OUI, SIZE_OUI) == 0 ) @@ -47,7 +47,7 @@ GAS_OnInitRsp( { RT_STATUS RtStatus = RT_STATUS_SUCCESS; pu1Byte pOUI = NULL; - + FunctionIn(COMP_MLME); PlatformIndicateActionFrame(pAdapter, (PVOID)posMpdu); @@ -57,7 +57,7 @@ GAS_OnInitRsp( if( PlatformCompareMemory(pOUI, WFA_OUI, SIZE_OUI) == 0 ) { pOUI = Frame_GAS_QueryRsp_Type(*posMpdu); - + if(0x09 == *pOUI) P2P_OnSDRsp(pAdapter, pRfd, posMpdu); } @@ -65,7 +65,7 @@ GAS_OnInitRsp( { RT_TRACE(COMP_MLME, DBG_WARNING, ("No matched OUI: %2x:%2x:%2x\n", pOUI[0], pOUI[1], pOUI[2])); } - + FunctionOut(COMP_MLME); return RtStatus; } @@ -79,16 +79,16 @@ GAS_OnComebackReq( { RT_STATUS RtStatus = RT_STATUS_SUCCESS; pu1Byte pOUI = NULL; - + FunctionIn(COMP_MLME); PlatformIndicateActionFrame(pAdapter, (PVOID)posMpdu); - + pOUI = Frame_GAS_ComebackRsp_OUI(*posMpdu); if( PlatformCompareMemory(pOUI, WFA_OUI, SIZE_OUI) == 0 ) { pOUI = Frame_GAS_ComebackRsp_Type(*posMpdu); - + if(0x09 == *pOUI) P2P_OnSDComebackReq(pAdapter, pRfd, posMpdu); } @@ -96,7 +96,7 @@ GAS_OnComebackReq( { RT_TRACE(COMP_MLME, DBG_WARNING, ("No matched OUI: %2x:%2x:%2x\n", pOUI[0], pOUI[1], pOUI[2])); } - + FunctionOut(COMP_MLME); return RtStatus; } @@ -110,16 +110,16 @@ GAS_OnComebackRsp( { RT_STATUS RtStatus = RT_STATUS_SUCCESS; pu1Byte pOUI = NULL; - + FunctionIn(COMP_MLME); PlatformIndicateActionFrame(pAdapter, (PVOID)posMpdu); - + pOUI = Frame_GAS_ComebackRsp_OUI(*posMpdu); if( PlatformCompareMemory(pOUI, WFA_OUI, SIZE_OUI) == 0 ) { pOUI = Frame_GAS_ComebackRsp_Type(*posMpdu); - + if(0x09 == *pOUI) P2P_OnSDComebackRsp(pAdapter, pRfd, posMpdu); } @@ -127,7 +127,7 @@ GAS_OnComebackRsp( { RT_TRACE(COMP_MLME, DBG_WARNING, ("No matched OUI: %2x:%2x:%2x\n", pOUI[0], pOUI[1], pOUI[2])); } - + FunctionOut(COMP_MLME); return RtStatus; } diff --git a/network/wlan/WDI/COMMON/IOTGen.h b/network/wlan/WDI/COMMON/IOTGen.h index 30725b8de..676538cc5 100644 --- a/network/wlan/WDI/COMMON/IOTGen.h +++ b/network/wlan/WDI/COMMON/IOTGen.h @@ -23,7 +23,7 @@ IOTActIsNullDataPowerSaving( BOOLEAN IOTActIsForcedRTSCTS( PADAPTER Adapter, - PRT_WLAN_BSS pBssDesc + PRT_WLAN_BSS pBssDesc ); BOOLEAN diff --git a/network/wlan/WDI/COMMON/MgntActQueryParam.c b/network/wlan/WDI/COMMON/MgntActQueryParam.c index efbc4dd5f..f661e6189 100644 --- a/network/wlan/WDI/COMMON/MgntActQueryParam.c +++ b/network/wlan/WDI/COMMON/MgntActQueryParam.c @@ -26,26 +26,26 @@ u1Byte SS_Rate_Map_N_MCS7_Lv5[5][2]= {{40, MGN_MCS7}, {10, MGN_MCS6}, {8, MGN_MC u1Byte SS_Rate_Map_N_MCS7_Lv6[3][2]= {{20, MGN_MCS7}, {5, MGN_MCS6}, {2, MGN_MCS5}}; // For rate display for 2T2R. -u1Byte SS_Rate_Map_AC_2SS_MCS9[13][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS5}, {32, MGN_VHT2SS_MCS4}, {28, MGN_VHT1SS_MCS7}, {24, MGN_VHT1SS_MCS7}, {21, MGN_VHT1SS_MCS6}, {18, MGN_VHT1SS_MCS5}, {14, MGN_VHT1SS_MCS3}, {10, MGN_12M}, {0, MGN_6M}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9[13][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS5}, {32, MGN_VHT2SS_MCS4}, {28, MGN_VHT1SS_MCS7}, {24, MGN_VHT1SS_MCS7}, {21, MGN_VHT1SS_MCS6}, {18, MGN_VHT1SS_MCS5}, {14, MGN_VHT1SS_MCS3}, {10, MGN_12M}, {0, MGN_6M}}; // Lvl1 replace as original value. -u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv1[13][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS4}, {32, MGN_VHT1SS_MCS6}, {28, MGN_VHT1SS_MCS4}, {24, MGN_VHT1SS_MCS3}, {21, MGN_VHT1SS_MCS2}, {18, MGN_VHT1SS_MCS1}, {14, MGN_VHT1SS_MCS0}, {10, MGN_12M}, {0, MGN_6M}}; -u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv2[11][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS4}, {32, MGN_VHT1SS_MCS6}, {28, MGN_VHT1SS_MCS4}, {24, MGN_VHT1SS_MCS3}, {20, MGN_VHT1SS_MCS2}, {10, MGN_VHT1SS_MCS1}, {0, MGN_12M}}; -u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv3[9][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS5}, {32, MGN_VHT1SS_MCS7}, {20, MGN_VHT1SS_MCS4}, {10, MGN_VHT1SS_MCS1}, {0, MGN_VHT1SS_MCS0}}; -u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv4[7][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {30, MGN_VHT2SS_MCS6}, {20, MGN_VHT2SS_MCS5}, {10, MGN_VHT1SS_MCS4}, {0, MGN_VHT1SS_MCS1}}; -u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv5[5][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {30, MGN_VHT2SS_MCS7}, {15, MGN_VHT2SS_MCS4}, {0, MGN_VHT1SS_MCS2}}; -u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv6[5][2]= {{45, MGN_VHT2SS_MCS9}, {40, MGN_VHT2SS_MCS8}, {30, MGN_VHT2SS_MCS7}, {10, MGN_VHT2SS_MCS6}, {0, MGN_VHT2SS_MCS4}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv1[13][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS4}, {32, MGN_VHT1SS_MCS6}, {28, MGN_VHT1SS_MCS4}, {24, MGN_VHT1SS_MCS3}, {21, MGN_VHT1SS_MCS2}, {18, MGN_VHT1SS_MCS1}, {14, MGN_VHT1SS_MCS0}, {10, MGN_12M}, {0, MGN_6M}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv2[11][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS4}, {32, MGN_VHT1SS_MCS6}, {28, MGN_VHT1SS_MCS4}, {24, MGN_VHT1SS_MCS3}, {20, MGN_VHT1SS_MCS2}, {10, MGN_VHT1SS_MCS1}, {0, MGN_12M}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv3[9][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS5}, {32, MGN_VHT1SS_MCS7}, {20, MGN_VHT1SS_MCS4}, {10, MGN_VHT1SS_MCS1}, {0, MGN_VHT1SS_MCS0}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv4[7][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {44, MGN_VHT2SS_MCS7}, {30, MGN_VHT2SS_MCS6}, {20, MGN_VHT2SS_MCS5}, {10, MGN_VHT1SS_MCS4}, {0, MGN_VHT1SS_MCS1}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv5[5][2]= {{50, MGN_VHT2SS_MCS9}, {47, MGN_VHT2SS_MCS8}, {30, MGN_VHT2SS_MCS7}, {15, MGN_VHT2SS_MCS4}, {0, MGN_VHT1SS_MCS2}}; +u1Byte SS_Rate_Map_AC_2SS_MCS9_Lv6[5][2]= {{45, MGN_VHT2SS_MCS9}, {40, MGN_VHT2SS_MCS8}, {30, MGN_VHT2SS_MCS7}, {10, MGN_VHT2SS_MCS6}, {0, MGN_VHT2SS_MCS4}}; //(10以下請顯示6M in 5G) -u1Byte SS_Rate_Map_AC_2SS_MCS7[12][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS5}, {32, MGN_VHT2SS_MCS4}, {28, MGN_VHT1SS_MCS5}, {24, MGN_VHT1SS_MCS4}, {21, MGN_VHT1SS_MCS3}, {18, MGN_VHT1SS_MCS2}, {14, MGN_VHT1SS_MCS1}, {10, MGN_VHT1SS_MCS0}, {0, MGN_6M}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7[12][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS5}, {32, MGN_VHT2SS_MCS4}, {28, MGN_VHT1SS_MCS5}, {24, MGN_VHT1SS_MCS4}, {21, MGN_VHT1SS_MCS3}, {18, MGN_VHT1SS_MCS2}, {14, MGN_VHT1SS_MCS1}, {10, MGN_VHT1SS_MCS0}, {0, MGN_6M}}; // Lvl1 replace as original value. -u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv1[12][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS4}, {32, MGN_VHT1SS_MCS6}, {28, MGN_VHT1SS_MCS4}, {24, MGN_VHT1SS_MCS3}, {21, MGN_VHT1SS_MCS2}, {18, MGN_VHT1SS_MCS1}, {14, MGN_VHT1SS_MCS0}, {10, MGN_12M}, {0, MGN_6M}}; -u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv2[6][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {30, MGN_VHT2SS_MCS4}, {20, MGN_VHT1SS_MCS4}, {10, MGN_VHT1SS_MCS1}, {0, MGN_VHT1SS_MCS1}}; -u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv3[5][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {30, MGN_VHT2SS_MCS4}, {15, MGN_VHT1SS_MCS3}, {0, MGN_VHT1SS_MCS1}}; -u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv4[5][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {30, MGN_VHT2SS_MCS5}, {15, MGN_VHT1SS_MCS4}, {0, MGN_VHT1SS_MCS1}}; -u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv5[5][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {27, MGN_VHT2SS_MCS6}, {15, MGN_VHT1SS_MCS5}, {0, MGN_VHT1SS_MCS1}}; -u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv6[3][2]= {{36, MGN_VHT2SS_MCS7}, {20, MGN_VHT2SS_MCS6}, {0, MGN_VHT2SS_MCS4}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv1[12][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {36, MGN_VHT2SS_MCS4}, {32, MGN_VHT1SS_MCS6}, {28, MGN_VHT1SS_MCS4}, {24, MGN_VHT1SS_MCS3}, {21, MGN_VHT1SS_MCS2}, {18, MGN_VHT1SS_MCS1}, {14, MGN_VHT1SS_MCS0}, {10, MGN_12M}, {0, MGN_6M}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv2[6][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {30, MGN_VHT2SS_MCS4}, {20, MGN_VHT1SS_MCS4}, {10, MGN_VHT1SS_MCS1}, {0, MGN_VHT1SS_MCS1}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv3[5][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {30, MGN_VHT2SS_MCS4}, {15, MGN_VHT1SS_MCS3}, {0, MGN_VHT1SS_MCS1}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv4[5][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {30, MGN_VHT2SS_MCS5}, {15, MGN_VHT1SS_MCS4}, {0, MGN_VHT1SS_MCS1}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv5[5][2]= {{44, MGN_VHT2SS_MCS7}, {40, MGN_VHT2SS_MCS6}, {27, MGN_VHT2SS_MCS6}, {15, MGN_VHT1SS_MCS5}, {0, MGN_VHT1SS_MCS1}}; +u1Byte SS_Rate_Map_AC_2SS_MCS7_Lv6[3][2]= {{36, MGN_VHT2SS_MCS7}, {20, MGN_VHT2SS_MCS6}, {0, MGN_VHT2SS_MCS4}}; -u1Byte SS_Rate_Map_AC_3SS_MCS9[12][2]= {{50, MGN_VHT3SS_MCS9}, {47, MGN_VHT3SS_MCS8}, {44, MGN_VHT3SS_MCS7}, {40, MGN_VHT3SS_MCS6}, {36, MGN_VHT3SS_MCS5}, {32, MGN_VHT3SS_MCS4}, {28, MGN_VHT3SS_MCS3}, {24, MGN_VHT3SS_MCS2}, {21, MGN_VHT3SS_MCS1}, {18, MGN_VHT3SS_MCS0}, {10, MGN_12M}, {0, MGN_6M}}; +u1Byte SS_Rate_Map_AC_3SS_MCS9[12][2]= {{50, MGN_VHT3SS_MCS9}, {47, MGN_VHT3SS_MCS8}, {44, MGN_VHT3SS_MCS7}, {40, MGN_VHT3SS_MCS6}, {36, MGN_VHT3SS_MCS5}, {32, MGN_VHT3SS_MCS4}, {28, MGN_VHT3SS_MCS3}, {24, MGN_VHT3SS_MCS2}, {21, MGN_VHT3SS_MCS1}, {18, MGN_VHT3SS_MCS0}, {10, MGN_12M}, {0, MGN_6M}}; //(10以下請顯示6M in 5G) @@ -69,17 +69,17 @@ u2Byte CONVERT_RATE ( PADAPTER Adapter, u2Byte MGN_RATE -) +) { u2Byte RetValue = MGN_RATE; - + if(MGN_RATE >= MGN_VHT1SS_MCS0 && MGN_RATE <= MGN_VHT4SS_MCS9) RetValue = VHTMcsToDataRate(Adapter, MGN_RATE); else if(MGN_RATE >= MGN_MCS0 && MGN_RATE <= MGN_MCS31) RetValue = HTMcsToDataRate(Adapter, MGN_RATE); - + return RetValue; -} +} // Returns the current AP MAC address BOOLEAN @@ -93,7 +93,7 @@ MgntActQuery_802_11_BSSID( // <1>Set management bssid CopyMem( bssidbuf, pMgntInfo->Bssid, 6 ); - //TODO: + //TODO: return TRUE; } @@ -135,7 +135,7 @@ MgntActQuery_802_11_ASSOCIATION_INFORMATION( // Req_4. OffsetRequestIEs // [WindowsDesignNoteForWPA2] - // - This field contains the offset in the buffer containing any variable length information elements from the association or reassociation request message. + // - This field contains the offset in the buffer containing any variable length information elements from the association or reassociation request message. // - During a query, this contains the information elements that were in the last association or reassociate request attempt. The request may succeed or fail. pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); @@ -149,32 +149,32 @@ MgntActQuery_802_11_ASSOCIATION_INFORMATION( if( (pMgntInfo->State_AsocService == STATE_Asoc_Idle && (pMgntInfo->mAssoc || pMgntInfo->mIbss )) || (pMgntInfo->State_AsocService == STATE_Wait_Asoc_Response || pMgntInfo->State_AsocService == STATE_Wait_Reasoc_Response)) { - // IE_1. Last SSID in Association Request + // IE_1. Last SSID in Association Request pDest[0] = (u1Byte)EID_SsId; pDest[1] = (u1Byte)pMgntInfo->Ssid.Length; - + PlatformMoveMemory((pu1Byte)pDest + 2, - &pMgntInfo->Ssid.Octet[0], + &pMgntInfo->Ssid.Octet[0], pMgntInfo->Ssid.Length); pDest = (pu1Byte)pDest + (2 + pMgntInfo->Ssid.Length); pAssocInfo->RequestIELength += (2 + pMgntInfo->Ssid.Length); - - // IE_2. Last Supported Rate in Association Request + + // IE_2. Last Supported Rate in Association Request pDest[0] = EID_SupRates; pDest[1] = (u1Byte)pMgntInfo->Regdot11OperationalRateSet.Length; PlatformMoveMemory((pu1Byte)pDest + 2, - pMgntInfo->Regdot11OperationalRateSet.Octet, + pMgntInfo->Regdot11OperationalRateSet.Octet, pMgntInfo->Regdot11OperationalRateSet.Length); pDest += (2 + pMgntInfo->Regdot11OperationalRateSet.Length); pAssocInfo->RequestIELength += (2 + pMgntInfo->Regdot11OperationalRateSet.Length); - // IE_3. Last RSNIE in Association Request + // IE_3. Last RSNIE in Association Request if( pSecInfo->SecLvl > RT_SEC_LVL_NONE ) { pDest[0] = ( pSecInfo->SecLvl == RT_SEC_LVL_WPA )? EID_Vendor : EID_WPA2; - pDest[1] = (u1Byte)pSecInfo->RSNIE.Length; + pDest[1] = (u1Byte)pSecInfo->RSNIE.Length; PlatformMoveMemory((pu1Byte)pDest + 2, - pSecInfo->RSNIE.Octet, + pSecInfo->RSNIE.Octet, pSecInfo->RSNIE.Length); pDest += (2 + pSecInfo->RSNIE.Length); pAssocInfo->RequestIELength += (2 + pSecInfo->RSNIE.Length); @@ -217,19 +217,19 @@ MgntActQuery_802_11_ASSOCIATION_INFORMATION( // Rsp_4. OffsetResponseIEs // [WindowsDesignNoteForWPA2] - // - This field contains the offset in the buffer containing any variable length information elements from the association or reassociation response message. + // - This field contains the offset in the buffer containing any variable length information elements from the association or reassociation response message. // - During a query, this contains the information elements that were in the last association or reassociate response. - pAssocInfo->OffsetResponseIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength; + pAssocInfo->OffsetResponseIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength; CCX_AppendAssocRspCCKMIE(Adapter, pDest, &(pAssocInfo->ResponseIELength)); - } - + } + return TRUE; } -// Returns the SSID with which the NIC is associated. +// Returns the SSID with which the NIC is associated. // The driver returns 0 SSIDLength if the NIC is not associated with any SSID. BOOLEAN MgntActQuery_802_11_SSID( @@ -257,7 +257,7 @@ MgntActQuery_802_11_SSID( -// Description: +// Description: // Return the current transmit power level in dBm. // s4Byte @@ -265,14 +265,14 @@ MgntActQuery_TX_POWER_DBM( PADAPTER Adapter ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; s4Byte powerlevel; Adapter->HalFunc.GetTxPowerLevelHandler( Adapter, &powerlevel ); - + // // Get the min power in dbm. By Bruce, 2009-04-07. - // Because we may not really update the Tx Power from the CCX Cell Power IE, we shall compare the + // Because we may not really update the Tx Power from the CCX Cell Power IE, we shall compare the // client configured power and cell power to get the min power returned to UI. // // Compare with the Client Configured Power @@ -301,7 +301,7 @@ MgntActQuery_802_11_INFRASTRUCTURE_MODE( { return RT_JOIN_NETWORKTYPE_ADHOC; } - else + else { return (RT_JOIN_NETWORKTYPE)(Adapter->MgntInfo.Regdot11networktype); } @@ -346,7 +346,7 @@ MgntActQuery_802_11_SUPPORTED_RATES( } else{ return FALSE; - } + } return TRUE; } @@ -363,7 +363,7 @@ MgntActQuery_802_11_BSSID_LIST( u4Byte i=0; BOOLEAN matchFound = FALSE; PRT_WLAN_BSS pBSSDesc = NULL; - + u1Byte Rssibuf[MAX_BSS_DESC]; u4Byte idxBuf[MAX_BSS_DESC]; @@ -397,7 +397,7 @@ MgntActQuery_802_11_BSSID_LIST( // // // This part of copying WLAN BSS from NumBssDesc4Query may conflict with that - // in ScanComplete(), so that there would be no consistency between "NumBssDesc4Query" + // in ScanComplete(), so that there would be no consistency between "NumBssDesc4Query" // and "NumBssDesc". After that, some BSS we access with incorrect length infomation will // access the invlaid memory or make system crash. // By Bruce, 2008-05-29. @@ -411,8 +411,8 @@ MgntActQuery_802_11_BSSID_LIST( pMgntInfo->NumBssDesc4Query = tmpNumBssDesc; // - // Roger, 071203: We should redirect the Octet pointer to the new destination. - // Rcnjko, 080201: We'd better use the macro CopyWlanBss() to duplicate + // Roger, 071203: We should redirect the Octet pointer to the new destination. + // Rcnjko, 080201: We'd better use the macro CopyWlanBss() to duplicate // RT_WLAN_BSS objects to handle OCTET_STRING copy issues. // for(i = 0; i < tmpNumBssDesc; i ++) @@ -439,7 +439,7 @@ MgntActQuery_802_11_BSSID_LIST( Rssibuf[i]= pBSSDesc[i].RSSI; idxBuf[i] = (u2Byte)i; } - //Select sort for rssi. + //Select sort for rssi. for(idx=0;idxNumberOfItems;idx++) { MaxRSSI =0; @@ -451,8 +451,8 @@ MgntActQuery_802_11_BSSID_LIST( MaxRSSI = Rssibuf[a]; findidx =a; } - } - + } + Rssibuf[findidx] =Rssibuf[idx]; Rssibuf[idx] = MaxRSSI; tmpidx = idxBuf[findidx]; @@ -464,7 +464,7 @@ MgntActQuery_802_11_BSSID_LIST( { CopyWlanBss(&pBssidList->pbssidentry[i], &pBSSDesc[idxBuf[i]]); } - + PlatformReleaseSpinLock(Adapter, RT_SCAN_SPINLOCK); // An workaround to prevent that we show empty SSID for the AP we've associated. @@ -481,11 +481,11 @@ MgntActQuery_802_11_BSSID_LIST( PlatformCompareMemory(pBssidList->pbssidentry[i].bdBssIdBuf, pMgntInfo->Bssid, 6) == 0 ) { bCurrApFound = TRUE; - pBssdesc = &(pBssidList->pbssidentry[i]); + pBssdesc = &(pBssidList->pbssidentry[i]); break; } } - + if(bCurrApFound == TRUE && pBssdesc != NULL) { if(BeHiddenSsid(pBssdesc->bdSsIdBuf, pBssdesc->bdSsIdLen)) @@ -529,7 +529,7 @@ MgntActQuery_802_11_ENCRYPTION_STATUS( ) { *pEncAlgorithm = Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm; - + return TRUE; } @@ -546,10 +546,10 @@ MgntActQuery_802_11_ENCRYPTION_KEY( { *KeyLength = Adapter->MgntInfo.SecurityInfo.KeyLen[KeyIndex]; *KeyLength = (*KeyLength<32)? *KeyLength :32; - - PlatformMoveMemory( + + PlatformMoveMemory( KeyMaterial, - Adapter->MgntInfo.SecurityInfo.KeyBuf[KeyIndex], + Adapter->MgntInfo.SecurityInfo.KeyBuf[KeyIndex], *KeyLength ); @@ -587,9 +587,9 @@ MgntActQuery_802_11_TX_RATES( else if(IS_WIRELESS_MODE_B(Adapter)) rate = MGN_11M; // 11 M else if(IS_WIRELESS_MODE_AC(Adapter)) - rate = VHTMcsToDataRate(Adapter, pMgntInfo->VHTHighestOperaRate); + rate = VHTMcsToDataRate(Adapter, pMgntInfo->VHTHighestOperaRate); else if(IS_WIRELESS_MODE_N(Adapter)) - rate = HTMcsToDataRate(Adapter, pMgntInfo->HTHighestOperaRate); + rate = HTMcsToDataRate(Adapter, pMgntInfo->HTHighestOperaRate); else rate = MGN_1M; // 1 M @@ -647,7 +647,7 @@ MgntActQuery_802_11_RX_RATES( rate = VHTMcsToDataRate(Adapter, MGN_VHT1SS_MCS9); } else - rate = MGN_1M; // 1 M + rate = MGN_1M; // 1 M return rate; } @@ -663,8 +663,8 @@ MgntActQuery_802_11_WIRELESS_MODE( BOOLEAN MgntActQuery_802_11_RETRY_LIMIT( - PADAPTER Adapter, - pu2Byte ShortRetryLimit, + PADAPTER Adapter, + pu2Byte ShortRetryLimit, pu2Byte LongRetryLimit ) { @@ -684,7 +684,7 @@ MgntActQuery_MultiDomainImp( ) { // - // TODO: Implemented. + // TODO: Implemented. // return FALSE; } @@ -707,7 +707,7 @@ MgntActQuery_StrictlyOrderedImp( ) { // - // TODO: Implement it if necessary. + // TODO: Implement it if necessary. // return FALSE; } @@ -718,7 +718,7 @@ MgntActQuery_ShortRetryLimit( ) { // - // TODO: Implement it. + // TODO: Implement it. // return 7; } @@ -729,7 +729,7 @@ MgntActQuery_LongRetryLimit( ) { // - // TODO: Implement it. + // TODO: Implement it. // return 7; } @@ -740,7 +740,7 @@ MgntActQuery_MaxTxMsduLifeTime( ) { // - // TODO: use it to timeout MSDU in wait queue. + // TODO: use it to timeout MSDU in wait queue. // return 512; } @@ -768,10 +768,10 @@ MgntActQuery_ExcludedMacAddressList( u4Byte BytesNeeded = (pMgntInfo->ExcludedMacAddrListLength) * 6; PlatformZeroMemory(pMacAddrList, BufLength); - + if (BytesNeeded > BufLength) { - return 0; + return 0; } PlatformMoveMemory( @@ -791,9 +791,9 @@ MgntActQuery_ChannelList( // Reconstruct channel list so that channel info modified during customized scan (or other function) could be recovered. RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_CONSTRUCT, NULL, NULL); - + RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL_LIST, NULL, (&pChannelList)); - + return pChannelList; } @@ -851,7 +851,7 @@ MgntActQuery_DrvLogTypeList( { // This is an unexpted condition and might cause buffer overflow. RT_ASSERT(FALSE, ("MgntActQuery_DrvLogTypeList(): check g_LogTypes[%ld].Description!!!\n", idx)); - g_LogTypes[idx].Description[DescLen] = 0; + g_LogTypes[idx].Description[DescLen] = 0; break; } } @@ -870,8 +870,8 @@ MgntActQuery_DrvLogTypeList( pEntry->MaxLogCountPwr = g_LogTypes[idx].MaxLogCountPwr; pEntry->DescLen = DescLen + 1; // 1 is for EOS. PlatformMoveMemory( - pEntry->Description, - g_LogTypes[idx].Description, + pEntry->Description, + g_LogTypes[idx].Description, pEntry->DescLen); *pBytesWritten += EntrySize; @@ -883,7 +883,7 @@ MgntActQuery_DrvLogTypeList( bResult = FALSE; } } - + return bResult; #endif @@ -944,7 +944,7 @@ MgntActQuery_DrvLogAttrList( { // This is an unexpted condition and might cause buffer overflow. RT_ASSERT(FALSE, ("MgntActQuery_DrvLogAttrList(): check g_LogAttributes[%ld].Description!!!\n", idx)); - g_LogAttributes[idx].Description[DescLen] = 0; + g_LogAttributes[idx].Description[DescLen] = 0; break; } } @@ -963,8 +963,8 @@ MgntActQuery_DrvLogAttrList( pEntry->Type = g_LogAttributes[idx].Type; pEntry->DescLen = DescLen + 1; // 1 is for EOS. PlatformMoveMemory( - pEntry->Description, - g_LogAttributes[idx].Description, + pEntry->Description, + g_LogAttributes[idx].Description, pEntry->DescLen); *pBytesWritten += EntrySize; @@ -976,7 +976,7 @@ MgntActQuery_DrvLogAttrList( bResult = FALSE; } } - + return bResult; #endif @@ -1010,12 +1010,12 @@ MgntActQuery_DrvLogDataList( // // Figure out max entry size. // - // 070305, rcnjko: I use a max estimation instead of - // figure out exact size of the each entry to reduce - // computation overhead. Besides, I assume UI can cover + // 070305, rcnjko: I use a max estimation instead of + // figure out exact size of the each entry to reduce + // computation overhead. Besides, I assume UI can cover // this assumption easily. // - static u4Byte MaxEntrySize = sizeof(DRV_LOG_DATA_IMP_T); + static u4Byte MaxEntrySize = sizeof(DRV_LOG_DATA_IMP_T); // // Check minimal buffer size required. @@ -1031,7 +1031,7 @@ MgntActQuery_DrvLogDataList( if(eLogType >= LTYPE_TOTAL_COUNT) { return FALSE; - } + } // // Enumerate into each entry and fill up if we have enough space. @@ -1053,7 +1053,7 @@ MgntActQuery_DrvLogDataList( pEntry) ) { // - // Now, we can get exact entry size and apply it + // Now, we can get exact entry size and apply it // to fill up *pBytesNeeded and *pBytesWritten. // EntrySize = sizeof(DRV_LOG_DATA_T) - sizeof(pEntry->Buffer[0]) + pEntry->BufferLenUsed; @@ -1062,7 +1062,7 @@ MgntActQuery_DrvLogDataList( *pBytesWritten += EntrySize; pEntry = (PDRV_LOG_DATA_T)((pu1Byte)(pEntry->Buffer) + pEntry->BufferLenUsed); pBuffer->Count++; - } + } else { // No more log available. break; @@ -1073,13 +1073,13 @@ MgntActQuery_DrvLogDataList( *pBytesNeeded += MaxEntrySize; } } - + return TRUE; #endif } -u1Byte +u1Byte DecorateTxRateBySingalStrength( u4Byte SignalStrength, u1Byte *SS_Rate_Map, @@ -1087,7 +1087,7 @@ DecorateTxRateBySingalStrength( ) { int index = 0; - + for(index=0; index<(MapSize*2); index+=2) { if(SignalStrength > SS_Rate_Map[index]) @@ -1104,9 +1104,9 @@ DecorateTxRateBySingalStrength( // Return 11N Tx rate to let Normal User. // 2008-04-14 by Jacken // -u2Byte -MgntActQuery_RT_11N_USER_SHOW_RATES( - PADAPTER Adapter , +u2Byte +MgntActQuery_RT_11N_USER_SHOW_RATES( + PADAPTER Adapter , BOOLEAN TxorRx, //FALSE:Tx TRUE:Rx BOOLEAN bLinkStateRx ) @@ -1117,7 +1117,7 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( u4Byte Sgstrength; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - + // Forced data rate: Tx rate is forced to a constant value. if(pMgntInfo->ForcedDataRate != 0) { @@ -1128,7 +1128,7 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( { return CONVERT_RATE(Adapter, pHalData->CurrentRARate); } - + if(!TxorRx) // Tx rate {//This value is also refresh in dm_CheckStatistics() every 2 seconds. // 1 == TxRateTypeCurrent @@ -1140,7 +1140,7 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( // 2 == TxRateTypeStartRate else if(pMgntInfo->OSTxRateDisplayType == 2) { - // Report initial rate in HW. + // Report initial rate in HW. return CONVERT_RATE(Adapter, Adapter->TxStats.CurrentInitTxRate); } } @@ -1149,7 +1149,7 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( if(pMgntInfo->bForcedShowRateStill == TRUE) Sgstrength = 100; else if (ACTING_AS_AP(Adapter)) - Sgstrength = 100; + Sgstrength = 100; else Sgstrength = GET_UNDECORATED_AVERAGE_RSSI(Adapter); @@ -1164,7 +1164,7 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( else if(IS_WIRELESS_MODE_N_24G(Adapter) || IS_WIRELESS_MODE_N_5G(Adapter)) { BOOLEAN bMaxRateMcs15; - + // Determine the max rate for N mode. if( (rftype==RF_1T1R) || ((!TxorRx) && (rftype==RF_1T2R)) || @@ -1176,57 +1176,57 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( if(rftype == RF_3T3R) { - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS23, sizeof(SS_Rate_Map_N_MCS23)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS23, sizeof(SS_Rate_Map_N_MCS23)/2); } else if(rftype == RF_2T4R || rftype == RF_2T3R) { - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS23, sizeof(SS_Rate_Map_N_MCS23)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS23, sizeof(SS_Rate_Map_N_MCS23)/2); } else if(bMaxRateMcs15) { if (pMgntInfo->bRegLinkSpeedLevel == 0) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15, sizeof(SS_Rate_Map_N_MCS15)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15, sizeof(SS_Rate_Map_N_MCS15)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 12) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv1, sizeof(SS_Rate_Map_N_MCS15_Lv1)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv1, sizeof(SS_Rate_Map_N_MCS15_Lv1)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 14) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv2, sizeof(SS_Rate_Map_N_MCS15_Lv2)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv2, sizeof(SS_Rate_Map_N_MCS15_Lv2)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 16) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv3, sizeof(SS_Rate_Map_N_MCS15_Lv3)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv3, sizeof(SS_Rate_Map_N_MCS15_Lv3)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 18) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv4, sizeof(SS_Rate_Map_N_MCS15_Lv4)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv4, sizeof(SS_Rate_Map_N_MCS15_Lv4)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 20) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv5, sizeof(SS_Rate_Map_N_MCS15_Lv5)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv5, sizeof(SS_Rate_Map_N_MCS15_Lv5)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 24) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv6, sizeof(SS_Rate_Map_N_MCS15_Lv6)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15_Lv6, sizeof(SS_Rate_Map_N_MCS15_Lv6)/2); else - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15, sizeof(SS_Rate_Map_N_MCS15)/2); - } + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS15, sizeof(SS_Rate_Map_N_MCS15)/2); + } else { if (pMgntInfo->bRegLinkSpeedLevel == 0) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7, sizeof(SS_Rate_Map_N_MCS7)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7, sizeof(SS_Rate_Map_N_MCS7)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 12) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv1, sizeof(SS_Rate_Map_N_MCS7_Lv1)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv1, sizeof(SS_Rate_Map_N_MCS7_Lv1)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 14) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv2, sizeof(SS_Rate_Map_N_MCS7_Lv2)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv2, sizeof(SS_Rate_Map_N_MCS7_Lv2)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 16) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv3, sizeof(SS_Rate_Map_N_MCS7_Lv3)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv3, sizeof(SS_Rate_Map_N_MCS7_Lv3)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 18) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv4, sizeof(SS_Rate_Map_N_MCS7_Lv4)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv4, sizeof(SS_Rate_Map_N_MCS7_Lv4)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 20) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv5, sizeof(SS_Rate_Map_N_MCS7_Lv5)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv5, sizeof(SS_Rate_Map_N_MCS7_Lv5)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 24) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv6, sizeof(SS_Rate_Map_N_MCS7_Lv6)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7_Lv6, sizeof(SS_Rate_Map_N_MCS7_Lv6)/2); else - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7, sizeof(SS_Rate_Map_N_MCS7)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_N_MCS7, sizeof(SS_Rate_Map_N_MCS7)/2); } - } + } else if(IS_WIRELESS_MODE_AC(Adapter)) { if(rftype == RF_1T1R) { if(pMgntInfo->VHTHighestOperaRate < MGN_VHT1SS_MCS9) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_1SS_MCS7, sizeof(SS_Rate_Map_AC_1SS_MCS7)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_1SS_MCS7, sizeof(SS_Rate_Map_AC_1SS_MCS7)/2); else rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_1SS_MCS9, sizeof(SS_Rate_Map_AC_1SS_MCS9)/2); } @@ -1235,49 +1235,49 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( if(pMgntInfo->VHTHighestOperaRate < MGN_VHT2SS_MCS9) { if (pMgntInfo->bRegLinkSpeedLevel == 0) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7, sizeof(SS_Rate_Map_AC_2SS_MCS7)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7, sizeof(SS_Rate_Map_AC_2SS_MCS7)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 12) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv1, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv1)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv1, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv1)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 14) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv2, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv2)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv2, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv2)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 16) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv3, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv3)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv3, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv3)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 18) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv4, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv4)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv4, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv4)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 20) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv5, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv5)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv5, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv5)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 24) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv6, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv6)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7_Lv6, sizeof(SS_Rate_Map_AC_2SS_MCS7_Lv6)/2); else - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7, sizeof(SS_Rate_Map_AC_2SS_MCS7)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS7, sizeof(SS_Rate_Map_AC_2SS_MCS7)/2); } else { if (pMgntInfo->bRegLinkSpeedLevel == 0) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9, sizeof(SS_Rate_Map_AC_2SS_MCS9)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9, sizeof(SS_Rate_Map_AC_2SS_MCS9)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 12) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv1, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv1)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv1, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv1)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 14) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv2, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv2)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv2, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv2)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 16) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv3, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv3)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv3, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv3)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 18) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv4, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv4)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv4, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv4)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 20) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv5, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv5)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv5, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv5)/2); else if (pMgntInfo->bRegLinkSpeedLevel == 24) - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv6, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv6)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9_Lv6, sizeof(SS_Rate_Map_AC_2SS_MCS9_Lv6)/2); else - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9, sizeof(SS_Rate_Map_AC_2SS_MCS9)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_2SS_MCS9, sizeof(SS_Rate_Map_AC_2SS_MCS9)/2); } - } + } else if(rftype == RF_3T3R) { - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_3SS_MCS9, sizeof(SS_Rate_Map_AC_3SS_MCS9)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_3SS_MCS9, sizeof(SS_Rate_Map_AC_3SS_MCS9)/2); } else if(rftype == RF_2T4R || rftype == RF_2T3R) { - rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_3SS_MCS9, sizeof(SS_Rate_Map_AC_3SS_MCS9)/2); + rate = DecorateTxRateBySingalStrength(Sgstrength, (pu1Byte)SS_Rate_Map_AC_3SS_MCS9, sizeof(SS_Rate_Map_AC_3SS_MCS9)/2); } } else @@ -1287,14 +1287,14 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( if(IS_WIRELESS_MODE_N_24G(Adapter) || IS_WIRELESS_MODE_N_5G(Adapter)) { if(rate > pMgntInfo->HTHighestOperaRate && pMgntInfo->HTHighestOperaRate != 0) - { - rate = pMgntInfo->HTHighestOperaRate; + { + rate = pMgntInfo->HTHighestOperaRate; } } else if(IS_WIRELESS_MODE_AC(Adapter)) { if(rate > pMgntInfo->VHTHighestOperaRate && pMgntInfo->VHTHighestOperaRate != 0) - rate = pMgntInfo->VHTHighestOperaRate; + rate = pMgntInfo->VHTHighestOperaRate; } else { @@ -1307,7 +1307,7 @@ MgntActQuery_RT_11N_USER_SHOW_RATES( if(rate < pHalData->CurrentRARate) rate = pHalData->CurrentRARate; } - + return CONVERT_RATE(Adapter, rate); } @@ -1330,20 +1330,20 @@ MgntActQuery_AdditionalBeaconIE( if (*pAdditionalIEBufLen < pMgntInfo->AdditionalBeaconIESize) { *pAdditionalIEBufLen = pMgntInfo->AdditionalBeaconIESize; - bResult = FALSE; + bResult = FALSE; break; } - PlatformMoveMemory(pAdditionalIEBuf, - pMgntInfo->AdditionalBeaconIEData, + PlatformMoveMemory(pAdditionalIEBuf, + pMgntInfo->AdditionalBeaconIEData, pMgntInfo->AdditionalBeaconIESize); bResult = TRUE; - + } while(FALSE); return bResult; - + } // @@ -1359,7 +1359,7 @@ MgntActQuery_AdditionalProbeRspIE( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; BOOLEAN bResult = FALSE; - + do { if (*pAdditionalIEBufLen < pMgntInfo->AdditionalResponseIESize) @@ -1369,16 +1369,16 @@ MgntActQuery_AdditionalProbeRspIE( break; } - PlatformMoveMemory(pAdditionalIEBuf, - pMgntInfo->AdditionalResponseIEData, + PlatformMoveMemory(pAdditionalIEBuf, + pMgntInfo->AdditionalResponseIEData, pMgntInfo->AdditionalResponseIESize); bResult = TRUE; - + } while(FALSE); return bResult; - + } RT_AP_TYPE @@ -1388,12 +1388,12 @@ MgntActQuery_ApType( { if(pAdapter == NULL) return RT_AP_TYPE_NONE; - else + else return pAdapter->MgntInfo.ApType; } -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) P2P_ROLE MgntActQuery_P2PMode( IN PADAPTER Adapter @@ -1422,29 +1422,29 @@ MgntActQuery_P2PScanList( BytesNeeded = pP2PInfo->ScanList4QuerySize* sizeof(P2P_DEVICE_DISCRIPTOR) + sizeof(u4Byte); - if(*pBufLen < BytesNeeded) + if(*pBufLen < BytesNeeded) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("MgntActQuery_P2PScanList(): bytes needed: %u, given: %u\n", BytesNeeded, *pBufLen)); // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_TRACE(COMP_P2P, DBG_LOUD, - ("MgntActQuery_P2PScanList(): sizeof ClientInfoDesc: %u, ScanListSize: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("MgntActQuery_P2PScanList(): sizeof ClientInfoDesc: %u, ScanListSize: %u\n", sizeof(P2P_CLIENT_INFO_DISCRIPTOR), pP2PInfo->ScanList4QuerySize)); *pBufLen = BytesNeeded; return FALSE; } *((pu4Byte)pBuf) = pP2PInfo->ScanList4QuerySize; - PlatformMoveMemory(pBuf + sizeof(u4Byte), - pP2PInfo->ScanList4Query, + PlatformMoveMemory(pBuf + sizeof(u4Byte), + pP2PInfo->ScanList4Query, pP2PInfo->ScanList4QuerySize * sizeof(P2P_DEVICE_DISCRIPTOR)); *pBufLen = BytesNeeded; - RT_TRACE(COMP_P2P, DBG_LOUD, - ("MgntActQuery_P2PScanList(): %u items indicated\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("MgntActQuery_P2PScanList(): %u items indicated\n", pP2PInfo->ScanList4QuerySize)); - + return TRUE; } @@ -1472,8 +1472,8 @@ MgntActQuery_P2PSelfDeviceDescriptor( // Return: // Return RT_STATUS_SUCCESS if the parsing succeeds. // Remark: -// Enumerates each channel in channel entery list in P2PInfo of the adapter. Duplicated channels -// are filtered out. +// Enumerates each channel in channel entery list in P2PInfo of the adapter. Duplicated channels +// are filtered out. // RT_STATUS MgntActQuery_P2PChannelList( @@ -1489,13 +1489,13 @@ MgntActQuery_P2PChannelList( if(ChannelListBufLen < 1) return RT_STATUS_RESOURCE; *pChennelListLen = 0; - + for(i = 0; i < pP2PInfo->ChannelEntryList.regClasses; i++) // foreach regulatory class { for(j = 0; j < pP2PInfo->ChannelEntryList.regClass[i].channels; j++) // foreach channels we support in the regulatory class { u1Byte curChannel = pP2PInfo->ChannelEntryList.regClass[i].channel[j]; - + if(*pChennelListLen > ChannelListBufLen) { return RT_STATUS_RESOURCE; @@ -1508,12 +1508,12 @@ MgntActQuery_P2PChannelList( // Add the channel pChannelList[(*pChennelListLen)++] = curChannel; - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("MgntActQuery_P2PChannelList: add channel: %u, %4s: %4u, %4s: %4u\n", k, "reg", pP2PInfo->ChannelEntryList.regClass[i].regClass, "ch", curChannel)); - } + } } - + return RT_STATUS_SUCCESS; } @@ -1527,7 +1527,7 @@ MgntActQuery_P2PListenChannel( *pListenChannel = pP2PInfo->ListenChannel; return; } -#endif // #if (P2P_SUPPORT == 1) +#endif // #if (P2P_SUPPORT == 1) #if (WPS_SUPPORT == 1) u4Byte @@ -1542,7 +1542,7 @@ MgntActQuery_WPS_Information( u1Byte BytesNeeded = 3; u1Byte queryInfo = pSimpleConfig->InfoCtrl; u4Byte BytesCopied = 0; - + if(pSimpleConfig->WpsIeVersion < SUPPORT_WPS_INFO_VERSION) { RT_TRACE(COMP_WPS, DBG_LOUD, ("MgntActQuery_WPS_Information(): Not support this version!\n")); @@ -1569,7 +1569,7 @@ MgntActQuery_WPS_Information( RT_TRACE(COMP_WPS, DBG_LOUD, ("MgntActQuery_WPS_Information(): unspecified query information!\n")); break; } - + End: return BytesCopied; } diff --git a/network/wlan/WDI/COMMON/MgntActQueryParam.h b/network/wlan/WDI/COMMON/MgntActQueryParam.h index 603a00ad3..529f7e3e8 100644 --- a/network/wlan/WDI/COMMON/MgntActQueryParam.h +++ b/network/wlan/WDI/COMMON/MgntActQueryParam.h @@ -16,7 +16,7 @@ MgntActQuery_802_11_BSSID( ); -// Returns the SSID with which the NIC is associated. +// Returns the SSID with which the NIC is associated. // The driver returns 0 SSIDLength if the NIC is not associated with any SSID. BOOLEAN MgntActQuery_802_11_SSID( @@ -123,18 +123,18 @@ MgntActQuery_802_11_WIRELESS_MODE( BOOLEAN MgntActQuery_802_11_RETRY_LIMIT( - PADAPTER Adapter, - pu2Byte ShortRetryLimit, + PADAPTER Adapter, + pu2Byte ShortRetryLimit, pu2Byte LongRetryLimit ); - + BOOLEAN MgntActQuery_MultiDomainImp( IN PADAPTER Adapter ); - + BOOLEAN MgntActQuery_CfPollable( IN PADAPTER Adapter diff --git a/network/wlan/WDI/COMMON/MgntActSetParam.c b/network/wlan/WDI/COMMON/MgntActSetParam.c index 3dc09934b..9bfd3ed48 100644 --- a/network/wlan/WDI/COMMON/MgntActSetParam.c +++ b/network/wlan/WDI/COMMON/MgntActSetParam.c @@ -59,21 +59,21 @@ MgntActSet_EnterTurboMode( IN BOOLEAN bEnterTurboMode ) { - - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - PRT_TURBO_CA pTurboCa = &(pMgntInfo->TurboChannelAccess); - BOOLEAN bEnterTCA; + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PRT_TURBO_CA pTurboCa = &(pMgntInfo->TurboChannelAccess); + BOOLEAN bEnterTCA; - pTurboCa->bEnabled = bEnterTCA = bEnterTurboMode; //Modefied by Roger, 2006.12.15. + + pTurboCa->bEnabled = bEnterTCA = bEnterTurboMode; //Modefied by Roger, 2006.12.15. if( bEnterTurboMode ) { // Enter turbo mode - Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_TURBO_MODE, (UCHAR*)&bEnterTCA ); + Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_TURBO_MODE, (UCHAR*)&bEnterTCA ); } - else + else { // Resume - Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_TURBO_MODE, (UCHAR*)&bEnterTCA ); + Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_TURBO_MODE, (UCHAR*)&bEnterTCA ); } @@ -148,14 +148,14 @@ MgntActSet_Locked_STA_Address( for( idx=0; idxAsocEntry[idx]); - + if( pSta->bUsed && pSta->bAssociated && !pSta->bLocked ) { AP_DisassociateStation( Adapter, pSta, inactivity ); } } } - + RT_TRACE( COMP_AP, DBG_LOUD, ("MgntActSet_Locked_STA_Address() <====\n") ); return TRUE; } @@ -224,7 +224,7 @@ MgntActSet_Accepted_STA_Address( for( idx=0; idxAsocEntry[idx]); - + if( pSta->bUsed && pSta->bAssociated && !pSta->bLocked ) { AP_DisassociateStation( Adapter, pSta, inactivity ); @@ -236,14 +236,14 @@ MgntActSet_Accepted_STA_Address( for( idx=0; idxAsocEntry[idx]); - + if( pSta->bUsed && pSta->bAssociated) { AP_DisassociateStation( Adapter, pSta, inactivity ); } } } - + RT_TRACE( COMP_AP, DBG_LOUD, ("MgntActSet_Accepted_STA_Address() <====\n") ); return TRUE; } @@ -310,14 +310,14 @@ MgntActSet_Rejected_STA_Address( for( idx=0; idxAsocEntry[idx]); - + if( pSta->bUsed && pSta->bAssociated && pSta->bLocked ) { AP_DisassociateStation( Adapter, pSta, inactivity ); } } } - + RT_TRACE( COMP_AP, DBG_LOUD, ("MgntActSet_Rejected_STA_Address() <====\n") ); return TRUE; } @@ -357,7 +357,7 @@ MgntActSet_802_11_BSSID( { CopyMem( pMgntInfo->Bssid, bssidbuf, 6 ); } - + // Prefast warning C6011: Dereferencing NULL pointer 'bssidbuf'. if (bssidbuf != NULL) { @@ -380,7 +380,7 @@ MgntActSet_802_11_SSID( BOOLEAN JoinAfterSetSSID ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_WLAN_BSS pRtBss; BOOLEAN bTheSameSSID = FALSE; RT_JOIN_ACTION join_action; @@ -389,7 +389,7 @@ MgntActSet_802_11_SSID( RT_PRINT_STR(COMP_MLME, DBG_LOUD, "MgntActSet_802_11_SSID()====> SSID ", ssidbuf, ssidlen); // - // For XP DTM 1.0C association_cmn T1017, we have to clear reject list when + // For XP DTM 1.0C association_cmn T1017, we have to clear reject list when // upper layer try to link with new profile. 070912, by rcnjko. // MgntClearRejectedAsocAP(Adapter); @@ -402,7 +402,7 @@ MgntActSet_802_11_SSID( if(ACTING_AS_AP(Adapter)) { OCTET_STRING SsidToCheck; - + FillOctetString( SsidToCheck, ssidbuf, ssidlen ); // @@ -414,9 +414,9 @@ MgntActSet_802_11_SSID( RT_TRACE( COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_SSID(): mActingAsAp, Dummy SSID! Not to set it!\n") ); return FALSE; } - + CopySsid(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length, ssidbuf, ssidlen); - + if(pMgntInfo->bAutoSelChnl) { { @@ -444,7 +444,7 @@ MgntActSet_802_11_SSID( } else { - AP_Reset(Adapter); + AP_Reset(Adapter); } return TRUE; } @@ -476,7 +476,7 @@ MgntActSet_802_11_SSID( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("theSameSSID bIbssStarter TRUE bMediaConnect FALSE!\n")); return TRUE; } - + // If SSID is the same, update security status. if( pMgntInfo->bMlmeStartReqRsn == MLMESTARTREQ_NONE ) { @@ -503,7 +503,7 @@ MgntActSet_802_11_SSID( { // 2004/03/09 For NDTest -> Indicating connect while connect to the same AP. MgntIndicateMediaStatus( Adapter, RT_MEDIA_CONNECT, FORCE_INDICATE ); - + // If SSID is the same, update security status. if( pMgntInfo->bMlmeStartReqRsn == MLMESTARTREQ_NONE ) { @@ -521,7 +521,7 @@ MgntActSet_802_11_SSID( // Set RegSSID, ssid2match. CopySsid(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length, ssidbuf, ssidlen); - + // // Do not scan but reset all mgnt variables when the OS wants to reset. By Bruce, 2009-04-10. // @@ -531,9 +531,9 @@ MgntActSet_802_11_SSID( RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_SSID(): Dummy SSID! Return!!!!\n")); return FALSE; } - + if( pMgntInfo->bScanInProgress || (pMgntInfo->bDualModeScanStep!=0) ) - { + { pMgntInfo->bScanOnly = FALSE; RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_SSID():pMgntInfo->bScanInProgress=true Return!!!!\n")); @@ -549,7 +549,7 @@ MgntActSet_802_11_SSID( } MgntResetJoinCounter(pMgntInfo); - + //2004/08/23, kcwu, set the Privacy bit on in Capability field if(pMgntInfo->SecurityInfo.PairwiseEncAlgorithm != RT_ENC_ALG_NO_CIPHER) pMgntInfo->mCap |= cPrivacy; @@ -564,8 +564,8 @@ MgntActSet_802_11_SSID( CurrTime = PlatformGetCurrentTime(); // In micro-second. DiffTime = CurrTime - Adapter->LastScanCompleteTime; // In micro-second. - - if (DiffTime >= 10000000) //it's over 10 sec after last scan complete + + if (DiffTime >= 10000000) //it's over 10 sec after last scan complete { if((Adapter->bInHctTest || pMgntInfo->IsAMDIOIC) && pMgntInfo->RoamingType == RT_ROAMING_BY_SLEEP) { @@ -573,10 +573,10 @@ MgntActSet_802_11_SSID( // // This is a very dirty work around for Win7 NDISTest performance_ext. // It requires that the period from system transit to D0 to the time we - // associate with the AP to be less than 1.1 sec. Since LastScanCompleteTime + // associate with the AP to be less than 1.1 sec. Since LastScanCompleteTime // is greater than 10 sec., we will have to do a scan before associate with the AP // in the original design. The scan takes too much time (around 1.7 sec) - // to associate with the AP (threshold = 1.1 sec). We ignore checking of + // to associate with the AP (threshold = 1.1 sec). We ignore checking of // LastScanCompleteTime to avoid scan and time is saved. // If the original AP disappears then join timeout occurs. // 2008.08.28, haich. @@ -585,7 +585,7 @@ MgntActSet_802_11_SSID( join_action = SelectNetworkBySSID( Adapter, &pMgntInfo->Ssid, FALSE, pRtBss ); } else - { + { bNeedChkJoinAction = FALSE; Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_CHK_JOINACTION, (pu1Byte)(&bNeedChkJoinAction)); if(bNeedChkJoinAction) @@ -609,7 +609,7 @@ MgntActSet_802_11_SSID( JoinRequest( Adapter, join_action, pRtBss ); } else - { + { u1Byte ssid2scanbuf[33]; OCTET_STRING ssid2scan; @@ -619,7 +619,7 @@ MgntActSet_802_11_SSID( FillOctetString(ssid2scan, ssid2scanbuf, 0); CopySsid(ssid2scan.Octet, ssid2scan.Length, ssidbuf, ssidlen); - + FillOctetString(SuppRate, SuppRatebuf, 0); CopyMemOS( &SuppRate, pMgntInfo->Regdot11OperationalRateSet, pMgntInfo->Regdot11OperationalRateSet.Length); @@ -649,7 +649,7 @@ MgntActSet_802_11_SSID( } PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - pMgntInfo->bMlmeStartReqRsn = MLMESTARTREQ_NONE; + pMgntInfo->bMlmeStartReqRsn = MLMESTARTREQ_NONE; return TRUE; } @@ -689,12 +689,12 @@ MgntActSet_802_11_RSSI_TRIGGER( // Sets mode to Infrastructure or IBSS, or automatic switch between the two. // This also resets the network association algorithm. -// When this OID is called to set the mode, +// When this OID is called to set the mode, // all keys set through OID_802_11_ADD_WEP and OID_802_11_ADD_KEY should be deleted. // -// Refering to the DDK 3790, " If the device is associated and a set of this OID changes the driver's network mode, +// Refering to the DDK 3790, " If the device is associated and a set of this OID changes the driver's network mode, // the driver must disassociate and make a media disconnect indication." -// However, whenever the WZC changes the security setting of the same profile and set infrastructure mode as the previous, +// However, whenever the WZC changes the security setting of the same profile and set infrastructure mode as the previous, // the NIC never becomes disconnected. Actually we just reassociate and wait for the security handshake from // WZC supplicant, but the supplicant cannot determine which the settings between the profile and driver shall be used, // because we never indicate disconnected status. @@ -708,8 +708,8 @@ MgntActSet_802_11_INFRASTRUCTURE_MODE( RT_JOIN_NETWORKTYPE networktype ) { - PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; - + PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; + if( Adapter->bHWInitReady == FALSE ) return FALSE; @@ -717,14 +717,14 @@ MgntActSet_802_11_INFRASTRUCTURE_MODE( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 4\n")); return FALSE; - } + } switch( networktype ) { @@ -737,18 +737,18 @@ MgntActSet_802_11_INFRASTRUCTURE_MODE( if(MgntRoamingInProgress(pMgntInfo)) MgntRoamComplete(Adapter, MlmeStatus_invalid); - + if (!IS_DUAL_BAND_SUPPORT(Adapter)) MgntResetLinkProcess(Adapter); else - { + { //When we do scan for connect on dual band. The scan time is so long(>2s) that it can't be completed before connect. //We do connect in ScanComplete(). by Lawrence. // 2013/08/21 MH Revise for XP, when reset link process is blocked, the 4 query scan list will not exist // previous linked AP and the scan process will be delay for a while and this will cause XP 2sec reset event. - // The case: Link with one AP, then AP disappear. Then the scan and connect process will be delayed - // due to the the reset process is not executed. Need to find why - + // The case: Link with one AP, then AP disappear. Then the scan and connect process will be delayed + // due to the the reset process is not executed. Need to find why + if(pMgntInfo->bMediaConnect || MgntIsLinkInProgress(pMgntInfo)) MgntResetLinkProcess(Adapter); else @@ -762,14 +762,14 @@ MgntActSet_802_11_INFRASTRUCTURE_MODE( pMgntInfo->bJoinInProgress = FALSE; } } - + if(IS_HARDWARE_TYPE_8821U(Adapter)) { pMgntInfo->LEDAssocState = LED_ASSOC_SECURITY_NONE; } - + break; - + default: break;// auto mode } @@ -781,18 +781,18 @@ MgntActSet_802_11_INFRASTRUCTURE_MODE( // which according as network type, i.e., infracture mode will disable PSP control as default. // 2009.12.03. // - if( pMgntInfo->bDefaultPSPXlinkMode && + if( pMgntInfo->bDefaultPSPXlinkMode && networktype == RT_JOIN_NETWORKTYPE_ADHOC ) { - // Update ReceiveConfig variable. + // Update ReceiveConfig variable. Adapter->HalFunc.AllowAllDestAddrHandler(Adapter, TRUE, TRUE); pMgntInfo->bPSPXlinkMode = TRUE; RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_INFRASTRUCTURE_MODE(): Enable PSP Xlink!!\n")); } else {// Disable PSP Xlink control even bDefaultPSPXlinkMode is TRUE. - - // Update ReceiveConfig variable. + + // Update ReceiveConfig variable. if(!pMgntInfo->bNetMonitorMode) Adapter->HalFunc.AllowAllDestAddrHandler(Adapter, FALSE, TRUE); pMgntInfo->bPSPXlinkMode = FALSE; @@ -915,7 +915,7 @@ MgntActSet_802_11_CONFIGURATION( { PMGNT_INFO pMgntInfo= &Adapter->MgntInfo; - // Change default value of beacon period. + // Change default value of beacon period. pMgntInfo->Regdot11BeaconPeriod = BeaconPeriod; // Switch to channel specified. @@ -964,14 +964,14 @@ MgntActSet_802_11_ADD_WEP( // add for set CKIP key exp. and AES_set Key( for MIC ) , by CCW if( KeyLength==5 && KeyIndex<4 ) - { + { CopyMem( pSecInfo->pCkipPara->CKIPKeyBuf[KeyIndex]+0*KeyLength , KeyMaterial, KeyLength ); CopyMem( pSecInfo->pCkipPara->CKIPKeyBuf[KeyIndex]+1*KeyLength , KeyMaterial, KeyLength ); CopyMem( pSecInfo->pCkipPara->CKIPKeyBuf[KeyIndex]+2*KeyLength , KeyMaterial, KeyLength ); CopyMem( pSecInfo->pCkipPara->CKIPKeyBuf[KeyIndex]+3*KeyLength , KeyMaterial, 1 ); } else if( KeyLength==13 && KeyIndex<4 ) - { + { CopyMem( pSecInfo->pCkipPara->CKIPKeyBuf[KeyIndex]+0*KeyLength , KeyMaterial, KeyLength ); CopyMem( pSecInfo->pCkipPara->CKIPKeyBuf[KeyIndex]+1*KeyLength , KeyMaterial, CKIP_KEY_LEN-KeyLength ); } @@ -983,7 +983,7 @@ MgntActSet_802_11_ADD_WEP( pSecInfo->TxIV = DEFAULT_INIT_TX_IV; AES_SetKey( blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pSecInfo->AESKeyBuf[KeyIndex] ); - + RT_TRACE(COMP_SEC, DBG_LOUD, ("MgntActSet_802_11_ADD_WEP() <====\n")); return TRUE; @@ -1038,9 +1038,9 @@ MgntActSet_802_11_DISASSOCIATE( // if(pMgntInfo->mPss != eAwake) { - // + // // Using AwkaeTimer to prevent mismatch ps state. - // In the timer the state will be changed according to the RF is being awoke or not. By Bruce, 2007-10-31. + // In the timer the state will be changed according to the RF is being awoke or not. By Bruce, 2007-10-31. // // PlatformScheduleWorkItem( &(pMgntInfo->AwakeWorkItem) ); PlatformSetTimer( Adapter, &(pMgntInfo->AwakeTimer), 0 ); @@ -1052,7 +1052,7 @@ MgntActSet_802_11_DISASSOCIATE( RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_DISASSOCIATE() ===> AP_DisassociateAllStation\n")); AP_DisassociateAllStation(Adapter, unspec_reason); return ndisStatus; - } + } pMgntInfo->RequestFromUplayer = FALSE; @@ -1063,14 +1063,14 @@ MgntActSet_802_11_DISASSOCIATE( { RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_DISASSOCIATE() ===> MgntDisconnectIBSS\n")); - //should clear key here,if not , AES/TKIP Can not ping after use WAPI zhiyuan 2009/12/25 + //should clear key here,if not , AES/TKIP Can not ping after use WAPI zhiyuan 2009/12/25 RT_TRACE(COMP_SEC,DBG_LOUD,("MgntActSet_802_11_Disassociate sec mode = 0x%08X\n",pMgntInfo->SecurityInfo.PairwiseEncAlgorithm)); if(pMgntInfo->SecurityInfo.PairwiseEncAlgorithm==RT_ENC_ALG_SMS4 && WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPISUPPORT, 0)) - SecClearAllKeys(Adapter); + SecClearAllKeys(Adapter); MgntDisconnectIBSS( Adapter ); } - + if( pMgntInfo->mAssoc ) { // We should leave LPS mode first. 2011.03.23. by tynli. @@ -1078,34 +1078,34 @@ MgntActSet_802_11_DISASSOCIATE( { LeisurePSLeave(Adapter, LPS_DISABLE_SET_DISASSOCIATE); } - + RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_DISASSOCIATE() ===> MgntDisconnectAP\n")); MgntDisconnectAP(Adapter, asRsn); - - // We clear key here instead of MgntDisconnectAP() because that - // MgntActSet_802_11_DISASSOCIATE() is an interface called by OS, - // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is + + // We clear key here instead of MgntDisconnectAP() because that + // MgntActSet_802_11_DISASSOCIATE() is an interface called by OS, + // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is // used to handle disassociation related things to AP, e.g. send Disassoc // frame to AP. 2005.01.27, by rcnjko. // The key shall be cleared after sending disassociate/deauth to AP because these disconnecting frames // may be protected by the keys, we shall keep the key before sending the mgnt frames. - SecClearAllKeys(Adapter); + SecClearAllKeys(Adapter); } // Inidicate Disconnect, 2005.02.23, by rcnjko. - MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); + MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); } - else - { + else + { if(pMgntInfo->bScanInProgress == TRUE || pMgntInfo->bDualModeScanStep != 0) - { //2013.05.14, Revised by Ping-Yan, to avoid skip scans when Port1 exists for single band chip. + { //2013.05.14, Revised by Ping-Yan, to avoid skip scans when Port1 exists for single band chip. MgntResetScanProcess(Adapter); } ndisStatus = NDIS_STATUS_INVALID_STATE; } - + //Set SSID as dummy to stop the current join process. SET_SSID_DUMMY(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length); @@ -1131,20 +1131,20 @@ MgntActSet_802_11_DEAUTHENTICATION( { // AP Mode. // TODO: AP MODE. return TRUE; - } + } if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return TRUE; + return TRUE; } - + if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return TRUE; } - + // In adhoc mode, update beacon frame. if( pMgntInfo->bMediaConnect || pMgntInfo->bIbssStarter) { @@ -1159,19 +1159,19 @@ MgntActSet_802_11_DEAUTHENTICATION( { LeisurePSLeave(Adapter, LPS_DISABLE_SET_DEAUTH); } - - // We clear key here instead of MgntDisconnectAP() because that - // MgntActSet_802_11_DISASSOCIATE() is an interface called by OS, - // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is + + // We clear key here instead of MgntDisconnectAP() because that + // MgntActSet_802_11_DISASSOCIATE() is an interface called by OS, + // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is // used to handle disassociation related things to AP, e.g. send Disassoc // frame to AP. 2005.01.27, by rcnjko. - SecClearAllKeys(Adapter); + SecClearAllKeys(Adapter); MlmeDeauthenticateRequest( Adapter, pMgntInfo->Bssid, asRsn ); } // Inidicate Disconnect, 2005.02.23, by rcnjko. - MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); + MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); } //Set SSID as dummy to stop the current join process. @@ -1191,7 +1191,7 @@ MgntActSet_802_11_AUTHENTICATION_MODE( ) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + if( pMgntInfo->SecurityInfo.AuthMode != authmode ) { pMgntInfo->SecurityInfo.AuthMode = authmode; @@ -1264,10 +1264,10 @@ MgntActSet_802_11_BSSID_LIST_SCAN( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; u8Byte now_time, Diff_Time; - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("====> MgntActSet_802_11_BSSID_LIST_SCAN()\n")); - + // Follow 8180 AP mode, 2005.05.30, by rcnjko. // The client may still want to scan in AP mode. if(ACTING_AS_AP(Adapter)) @@ -1276,16 +1276,16 @@ MgntActSet_802_11_BSSID_LIST_SCAN( DrvIFIndicateScanComplete(Adapter, RT_STATUS_FAILURE); return TRUE; } - + now_time = PlatformGetCurrentTime(); Diff_Time = now_time - pMgntInfo->uConnectedTime; if(Diff_Time/100000 <=100) { return TRUE; } - + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_SITE_SURVEY); - + if( !MgntScanInProgress(pMgntInfo) && !MgntIsLinkInProgress(pMgntInfo) ) { @@ -1316,7 +1316,7 @@ MgntActSet_802_11_BSSID_LIST_SCAN( DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); } } - + RT_TRACE(COMP_SCAN, DBG_TRACE, ("MgntActSet_802_11_BSSID_LIST_SCAN(): return TRUE. <====\n")); return TRUE; } @@ -1374,7 +1374,7 @@ MgntActSet_802_11_ADD_KEY( u8Byte KeyRSC // Instialized value used for received multicast packet. Only used when the input parameter "IsGroup" is set TRUE and "IsGroupTransmitKey" set FALSE and KeyIndex | ADD_KEY_IDX_RSC. ) { - + PRT_SECURITY_T pSecInfo = &Adapter->MgntInfo.SecurityInfo; pu1Byte pKeyRSC = (pu1Byte)&KeyRSC; @@ -1428,9 +1428,9 @@ MgntActSet_802_11_ADD_KEY( // Check the previous WOL event if the GTK triggered waking. WolByGtkUpdate(Adapter); } - - // + + // // No need to check SecLvl in WEP mode, and it only depends on EncAlgorithm. // Comment out for testing over DTM XP 1.0c, by Bruce, 2007-07-26. // @@ -1464,7 +1464,7 @@ MgntActSet_802_11_ADD_KEY( // Note: // Maybe we shall check the flag IsGroupTransmitKey as FALSE for RX group key case. // By Bruce, 2010-11-04. - pSecInfo->RXMutiIV = DEFAULT_INIT_RX_IV; + pSecInfo->RXMutiIV = DEFAULT_INIT_RX_IV; } // @@ -1476,7 +1476,7 @@ MgntActSet_802_11_ADD_KEY( if(IsGroup) { // Record the RSC for multicast IV to avoid IV replay. - pSecInfo->RXMutiIV = + pSecInfo->RXMutiIV = //LowPart ( (u8Byte)( (u4Byte)((u1Byte)*(pKeyRSC+0) << 8) | (u4Byte)((u1Byte)*(pKeyRSC+1) << 0) @@ -1485,7 +1485,7 @@ MgntActSet_802_11_ADD_KEY( //HighPart |((u4Byte)((u1Byte)*(pKeyRSC+2) << 8) | (u4Byte)((u1Byte)*(pKeyRSC+3) << 0)); } - } + } /* Remove It , Group Key Updata should not init Unicase IV else { @@ -1497,7 +1497,7 @@ MgntActSet_802_11_ADD_KEY( */ KeyIndex &= 0x00000003; - + //kcwu: Indicate this key idx is used for TX if(IsGroup){//Group transmit key if(IsGroupTransmitKey){ @@ -1507,7 +1507,7 @@ MgntActSet_802_11_ADD_KEY( CopyMem(pSecInfo->KeyBuf[KeyIndex], KeyMaterial, KeyLength ); pSecInfo->KeyLen[KeyIndex]= (u1Byte)KeyLength; }else{ - + //kcwu: clear keybuffer SecClearPairwiseKeyByMacAddr(Adapter, 0); CopyMem( pSecInfo->PairwiseKey, KeyMaterial, KeyLength ); @@ -1516,19 +1516,19 @@ MgntActSet_802_11_ADD_KEY( pSecInfo->KeyLen[PAIRWISE_KEYIDX]= (u1Byte)KeyLength; // - // We had done 4-way + // We had done 4-way // Adapter->MgntInfo.mDeauthCount = 0; RT_TRACE( COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_ADD_KEY: Set Retry count to be 0!\n") ); } - - + + if(EncAlgorithm == RT_ENC_ALG_TKIP) { if((KeyIndex & ADD_KEY_IDX_AS)){//kcwu: Key is set by an Authenticator, exchange Tx/Rx MIC u1Byte tmpbuf[TKIP_MIC_KEY_LEN]; PlatformMoveMemory(tmpbuf, KeyMaterial+TKIP_ENC_KEY_LEN, TKIP_MIC_KEY_LEN); - PlatformMoveMemory(KeyMaterial+TKIP_ENC_KEY_LEN, + PlatformMoveMemory(KeyMaterial+TKIP_ENC_KEY_LEN, KeyMaterial+TKIP_ENC_KEY_LEN+TKIP_MIC_KEY_LEN, TKIP_MIC_KEY_LEN); PlatformMoveMemory(KeyMaterial+TKIP_ENC_KEY_LEN+TKIP_MIC_KEY_LEN, tmpbuf, TKIP_MIC_KEY_LEN); } @@ -1555,14 +1555,14 @@ MgntActSet_802_11_ADD_KEY( Adapter->MgntInfo.bMlmeStartReqRsn = MLMESTARTREQ_KEY_CHANGE; //No matter software en/de-cryption is turned on or not, always set key into hardware - Adapter->HalFunc.SetKeyHandler(Adapter, + Adapter->HalFunc.SetKeyHandler(Adapter, KeyIndex, MacAddress, IsGroup, EncAlgorithm, FALSE, FALSE); - + RT_TRACE( COMP_SEC, DBG_LOUD, ("MgntActSet_802_11_ADD_KEY(): return TRUE. <====\n") ); return TRUE; } @@ -1597,7 +1597,7 @@ MgntActSet_RSNA_REMOVE_DEAULT_KEY( PlatformZeroMemory(pDefKey->DefKeyBuf+KeyIndex, AESCCMP_BLK_SIZE_TOTAL); pDefKey->DefkeyValid[KeyIndex] = FALSE; - + for( index = 0 ; index < 4 ; index++ ) { if(pDefKey->DefkeyValid[index] == TRUE) @@ -1607,7 +1607,7 @@ MgntActSet_RSNA_REMOVE_DEAULT_KEY( if( index == 4 ) { PlatformZeroMemory(pDefKey ,sizeof(PER_STA_DEFAULT_KEY_ENTRY)); - pDefKey->Valid = FALSE; + pDefKey->Valid = FALSE; } RT_TRACE(COMP_RSNA, DBG_LOUD, ("====>Remove Default Key\n")); return TRUE; @@ -1616,8 +1616,8 @@ MgntActSet_RSNA_REMOVE_DEAULT_KEY( //vivi added for new cam search flow, 2009102 /* vivi only modify add default key function but not remove default key function, - cause actually MgntActSet_RSNA_REMOVE_DEAULT_KEY will not be called, - and we reset all the key in N6CQuerySet_DOT11_RESET_REQUEST: SecClearAllKeys, + cause actually MgntActSet_RSNA_REMOVE_DEAULT_KEY will not be called, + and we reset all the key in N6CQuerySet_DOT11_RESET_REQUEST: SecClearAllKeys, in that function all sw&hw key will be reset including RSNA IBSS key */ BOOLEAN @@ -1640,7 +1640,7 @@ MgntActSet_RSNA_ADD_DEAULT_KEY( //u1Byte CAM_CONST_BROAD[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; u1Byte NullMacadress[6] = {0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00}; u1Byte MacAddress_Original[6] = {0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00}; - + RT_TRACE(COMP_RSNA, DBG_LOUD, ("====> Add Default Key\n")); RT_PRINT_ADDR(COMP_RSNA, DBG_LOUD, " Station MAC : ", MacAddress); RT_PRINT_DATA(COMP_RSNA, DBG_LOUD, " KeyMaterial : ", pKeyMaterial, KeyLen); @@ -1669,14 +1669,14 @@ MgntActSet_RSNA_ADD_DEAULT_KEY( // PlatformMoveMemory(MacAddress,Adapter->CurrentAddress,6); } - + for( index = 0 ; index < MAX_NUM_PER_STA_KEY ; index++, pDefKey++) { if( pDefKey->Valid && (PlatformCompareMemory(MacAddress,pDefKey->MACAdrss, 6)==0)) break; // find out the same entry. if( !pDefKey->Valid && emptyindex == MAX_NUM_PER_STA_KEY ) - emptyindex = index; // find out one empty entry. + emptyindex = index; // find out one empty entry. } if( index == MAX_NUM_PER_STA_KEY ) //Don't find the same entry @@ -1692,14 +1692,14 @@ MgntActSet_RSNA_ADD_DEAULT_KEY( { pDefKey = pSecInfo->PerStaDefKeyTable + index; } - - //Set Key + + //Set Key PlatformMoveMemory( blockKey.x , pKeyMaterial , KeyLen); AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pDefKey->DefKeyBuf[KeyIndex] ); - - + + pDefKey->DefkeyValid[KeyIndex] = TRUE; - pDefKey->Valid = TRUE; + pDefKey->Valid = TRUE; //all above reserved, vivi. actually for sw en/decryption if (IS_EN_DE_CRYPTION_NEW_CAM_SUPPORT()) @@ -1723,12 +1723,12 @@ MgntActSet_RSNA_ADD_DEAULT_KEY( Adapter->MgntInfo.SWCamTable[EntryId].bUsed = 1; Adapter->MgntInfo.SWCamTable[EntryId].ulUseDK= KeyIndex; PlatformMoveMemory(Adapter->MgntInfo.SWCamTable[EntryId].macAddress, MacAddress_Original, 6); - CopyMem( Adapter->MgntInfo.SWCamTable[EntryId].pucKey , pKeyMaterial , sizeof(Adapter->MgntInfo.SWCamTable[EntryId].pucKey) ); + CopyMem( Adapter->MgntInfo.SWCamTable[EntryId].pucKey , pKeyMaterial , sizeof(Adapter->MgntInfo.SWCamTable[EntryId].pucKey) ); Adapter->MgntInfo.SWCamTable[EntryId].ulEncAlg = EncAlgorithm; - Adapter->MgntInfo.SWCamTable[EntryId].ulKeyId = EntryId; //cam entryid in cam - Adapter->MgntInfo.SWCamTable[EntryId].portNumber = 0; // to ID different port + Adapter->MgntInfo.SWCamTable[EntryId].ulKeyId = EntryId; //cam entryid in cam + Adapter->MgntInfo.SWCamTable[EntryId].portNumber = 0; // to ID different port } - else //otherwise, set EntryId according to macaddr + else //otherwise, set EntryId according to macaddr { //find EntryId, and also set sw cam, this sw cam table is consistent with hw table...later virtual also use sw cam table EntryId = Sta_FindFreeEntry(Adapter, @@ -1753,10 +1753,10 @@ MgntActSet_RSNA_ADD_DEAULT_KEY( RT_TRACE(COMP_RSNA, DBG_LOUD, (" KeyINdex: %02x\n", Adapter->MgntInfo.SWCamTable[EntryId].ulUseDK)); } - + RT_TRACE(COMP_RSNA, DBG_LOUD, ("====>Add Default Key\n")); return TRUE; - + } @@ -1829,7 +1829,7 @@ MgntActSet_RSNA_ADD_MAPPING_KEY( break; // find out the same entry. if( !pMAPKey->Valid && emptyindex == MAX_NUM_PER_STA_KEY ) - emptyindex = index; // find out one empty entry. + emptyindex = index; // find out one empty entry. } if( index == MAX_NUM_PER_STA_KEY ) //Don't find the same entry @@ -1845,7 +1845,7 @@ MgntActSet_RSNA_ADD_MAPPING_KEY( pMAPKey = pSecInfo->MAPKEYTable + index; } - //Set Key + //Set Key PlatformMoveMemory( blockKey.x , pKeyMaterial , KeyLen); AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pMAPKey->MapKeyBuf ); @@ -1856,7 +1856,7 @@ MgntActSet_RSNA_ADD_MAPPING_KEY( //all above reserved, vivi. actually for sw en/decryption //1 vivi add new for hw encryption, 20091028 - //get EntryId according to macaddr + //get EntryId according to macaddr //find EntryId, and also set sw cam, this sw cam table is consistent with hw table...later virtual also use sw cam table EntryId = Sta_FindFreeEntry(Adapter, MacAddress, @@ -1919,8 +1919,8 @@ MgntActSet_802_11_WIRELESS_MODE( if( (WirelessMode!=WIRELESS_MODE_AUTO) && ((WirelessMode & SupportedWirelessMode) == 0) ) { // Don't switch to unsupported wireless mode, 2006.02.15, by rcnjko. - RT_TRACE(COMP_DBG, DBG_SERIOUS, - ("MgntActSet_802_11_WIRELESS_MODE(): WirelessMode(0x%X) is not supported (0x%X)!\n", + RT_TRACE(COMP_DBG, DBG_SERIOUS, + ("MgntActSet_802_11_WIRELESS_MODE(): WirelessMode(0x%X) is not supported (0x%X)!\n", WirelessMode, SupportedWirelessMode)); return FALSE; } @@ -1928,7 +1928,7 @@ MgntActSet_802_11_WIRELESS_MODE( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) @@ -1948,38 +1948,38 @@ MgntActSet_802_11_WIRELESS_MODE( Adapter->RegWirelessMode = WirelessMode; - // In prevent of switching back to wrong band in scancallback(). 2004.12.10, by rcnjko. + // In prevent of switching back to wrong band in scancallback(). 2004.12.10, by rcnjko. pMgntInfo->SettingBeforeScan.WirelessMode = WirelessMode; switch(WirelessMode) { case WIRELESS_MODE_A: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_A\n")); - break; + break; case WIRELESS_MODE_B: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_B\n")); - break; + break; case WIRELESS_MODE_G: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_G\n")); - break; + break; case WIRELESS_MODE_AUTO: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_AUTO\n")); - break; - case WIRELESS_MODE_N_24G: + break; + case WIRELESS_MODE_N_24G: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_N_24G\n")); break; - case WIRELESS_MODE_AC_24G: + case WIRELESS_MODE_AC_24G: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_AC_24G\n")); - break; - case WIRELESS_MODE_N_5G: + break; + case WIRELESS_MODE_N_5G: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_N_5G\n")); - break; - case WIRELESS_MODE_AC_5G: + break; + case WIRELESS_MODE_AC_5G: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_AC_5G\n")); - break; + break; default: //For MacOs Warning: "WIRELESS_MODE_UNKNOWN" not handled in switch. RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set WIRELESS_MODE_UNKNOWN\n")); - break; + break; } Adapter->HalFunc.SetWirelessModeHandler(Adapter, (u1Byte)Adapter->RegWirelessMode); @@ -1998,8 +1998,8 @@ MgntActSet_802_11_WIRELESS_MODE( BOOLEAN MgntActSet_802_11_RETRY_LIMIT( - PADAPTER Adapter, - u2Byte ShortRetryLimit, + PADAPTER Adapter, + u2Byte ShortRetryLimit, u2Byte LongRetryLimit ) { @@ -2018,7 +2018,7 @@ MgntActSet_802_11_RETRY_LIMIT( static BOOLEAN MgntActSet_802_11_20MHZ_CHANNEL( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte channel ) { @@ -2043,9 +2043,9 @@ MgntActSet_802_11_20MHZ_CHANNEL( { RT_CHNL_LIST_ENTRY ChnlListEntryArray[MAX_CHANNEL_NUM] = {0}; u1Byte ChannelLen = 0, i = 0, firstLegalIndex = 0xFF; - + ChannelLen = RtGetDualBandChannel(Adapter, ChnlListEntryArray); - + if(ChannelLen == 0) return FALSE; @@ -2080,11 +2080,11 @@ MgntActSet_802_11_20MHZ_CHANNEL( #pragma warning( disable: 6385 ) channel = ChnlListEntryArray[firstLegalIndex].ChannelNum; } - -#if 0 + +#if 0 if(channel <= 14) { - if(IS_WIRELESS_MODE_5G(Adapter)) + if(IS_WIRELESS_MODE_5G(Adapter)) pMgntInfo->dot11CurrentWirelessMode = WIRELESS_MODE_N_24G; } else @@ -2099,15 +2099,15 @@ MgntActSet_802_11_20MHZ_CHANNEL( Adapter->HalFunc.SetWirelessModeHandler(Adapter,pMgntInfo->dot11CurrentWirelessMode); } // ------------------------------------------------------------------------------------ - + #else RT_TRACE_F(COMP_MLME,DBG_LOUD, ("ChangeWirelessModeHandler\n")); HalChangeWirelessMode(Adapter,channel); -// SetupWirelessMode(Adapter,channel); -#endif +// SetupWirelessMode(Adapter,channel); +#endif + - } else { @@ -2117,7 +2117,7 @@ MgntActSet_802_11_20MHZ_CHANNEL( { // Update MAC Channel and Wireless Mode --------------------------------------------------- PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); - + while(pLoopAdapter != NULL) { pLoopAdapter->MgntInfo.dot11CurrentChannelNumber = channel; @@ -2139,7 +2139,7 @@ MgntActSet_802_11_20MHZ_CHANNEL( // Use this interface to swith channel and bandwidth in MAC layer -------------- VOID MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - PADAPTER pAdapter, + PADAPTER pAdapter, u1Byte Primary20MhzChannel, CHANNEL_WIDTH BandWidthMode, EXTCHNL_OFFSET ExtChnlOffsetOf40MHz, @@ -2150,13 +2150,13 @@ MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( int i; FunctionIn(COMP_MLME); - + switch(BandWidthMode) { case CHANNEL_WIDTH_20: RT_ASSERT(Primary20MhzChannel != 0, ("Wrong Primary20MhzChannel: %d\n", Primary20MhzChannel)); break; - + case CHANNEL_WIDTH_40: RT_ASSERT(Primary20MhzChannel != 0, ("Wrong Primary20MhzChannel: %d\n", Primary20MhzChannel)); RT_ASSERT(ExtChnlOffsetOf40MHz == EXTCHNL_OFFSET_UPPER || ExtChnlOffsetOf40MHz == EXTCHNL_OFFSET_LOWER, ("Wrong ExtChnlOffsetOf40MHz: %d\n", ExtChnlOffsetOf40MHz)); @@ -2167,7 +2167,7 @@ MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( RT_ASSERT(ExtChnlOffsetOf40MHz == EXTCHNL_OFFSET_UPPER || ExtChnlOffsetOf40MHz == EXTCHNL_OFFSET_LOWER, ("Wrong ExtChnlOffsetOf40MHz: %d\n", ExtChnlOffsetOf40MHz)); RT_ASSERT(ExtChnlOffsetOf80MHz == EXTCHNL_OFFSET_UPPER || ExtChnlOffsetOf80MHz == EXTCHNL_OFFSET_LOWER, ("Wrong ExtChnlOffsetOf80MHz: %d\n", ExtChnlOffsetOf80MHz)); break; - + case CHANNEL_WIDTH_160: case CHANNEL_WIDTH_80_80: RT_ASSERT(0, ("Currently No Use for BandwidthMode: %d\n", BandWidthMode)); @@ -2183,7 +2183,7 @@ MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( if(GetDefaultAdapter(pAdapter)->bInHctTest) { if(GET_HAL_DATA(pAdapter)->CurrentChannel == Primary20MhzChannel ) - { + { RT_TRACE(COMP_MLME,DBG_LOUD,("MgntActSet_802_11_CHANNEL_AND_BANDWIDTH: the channel is same return \n")); return; } @@ -2196,11 +2196,11 @@ MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( CHNL_SetBwChnl(pAdapter, Primary20MhzChannel, BandWidthMode, ExtChnlOffsetOf40MHz); //wait for channel switch successful by sherry 20130117 - for(i = 0; i < 100; i++) - { + for(i = 0; i < 100; i++) + { if(!RT_IsSwChnlAndBwInProgress(pAdapter) && !CHNL_SwChnlAndSetBwInProgress(pAdapter)) break; - + RT_TRACE_F(COMP_MULTICHANNEL, DBG_LOUD, ("MgntActSet_802_11_CHANNEL_AND_BANDWIDTH:Delay 100 us Waiting for Switch Channel Complete!\n")); delay_us(100); } @@ -2212,7 +2212,7 @@ MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( BOOLEAN MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte channel ) { @@ -2224,7 +2224,7 @@ MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH( if(bSwitchOk) { // Update Reg MAC Channel -------------------------------------------------------------- pLoopAdapter = GetDefaultAdapter(Adapter); - + while(pLoopAdapter != NULL) { pLoopAdapter->MgntInfo.Regdot11ChannelNumber = channel; @@ -2238,7 +2238,7 @@ MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH( // Annie, 2004-12-27 BOOLEAN MgntActSet_802_11_CHANNELPLAN( - PADAPTER Adapter, + PADAPTER Adapter, u2Byte ChannelPlan ) { @@ -2252,7 +2252,7 @@ MgntActSet_802_11_CHANNELPLAN( if(ChannelPlan >= RT_CHANNEL_DOMAIN_MAX) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_CHANNELPLAN(): not support this channel plan (%d > MAX: %d). (HW reject)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_CHANNELPLAN(): not support this channel plan (%d > MAX: %d). (HW reject)\n", ChannelPlan, RT_CHANNEL_DOMAIN_MAX)); return FALSE; } @@ -2273,7 +2273,7 @@ MgntActSet_802_11_PMKID( { RT_TRACE( COMP_SEC, DBG_LOUD, ("MgntActSet_802_11_PMKID(): Length=%d\n", InformationBufferLength) ); RT_PRINT_DATA( COMP_SEC, DBG_TRACE, "OID Buffer", InformationBuffer, InformationBufferLength ); - + SecSetPMKID( Adapter, (PN5_802_11_PMKID)InformationBuffer ); return TRUE; } @@ -2361,7 +2361,7 @@ MgntActSet_802_3_MULTICAST_LIST( for( i=0; i < Adapter->MCAddrCount; i++ ) { - RT_PRINT_ADDR(COMP_MLME | COMP_OID_SET, DBG_TRACE, "MgntActSet_802_3_MULTICAST_LIST: ", Adapter->MCList[i]); + RT_PRINT_ADDR(COMP_MLME | COMP_OID_SET, DBG_TRACE, "MgntActSet_802_3_MULTICAST_LIST: ", Adapter->MCList[i]); if( i < MAX_MCAST_LIST_NUM ) { GetMulticastBit( Adapter->MCList[i], &Byte, &Bit ); @@ -2393,7 +2393,7 @@ MgntActSet_802_3_MULTICAST_LIST( -// +// // Change current and default preamble mode. // 2005.01.06, by rcnjko. // @@ -2410,7 +2410,7 @@ MgntActSet_802_11_PREAMBLE_MODE( } -// +// // Change current and default preamble mode. // 2005.01.06, by rcnjko. // @@ -2424,17 +2424,17 @@ MgntActSet_802_11_PowerSaveMode( PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); u1Byte FwPwrMode; - // Currently, we do not change power save mode on IBSS mode. - if(pMgntInfo->mIbss) + // Currently, we do not change power save mode on IBSS mode. + if(pMgntInfo->mIbss) return FALSE; if(pMgntInfo->dot11PowerSaveMode == rtPsMode) return TRUE; - + // Update power save mode configured. pMgntInfo->dot11PowerSaveMode = rtPsMode; - // Determine ListenInterval. + // Determine ListenInterval. if(pMgntInfo->dot11PowerSaveMode == eMaxPs) { pMgntInfo->ListenInterval = pMgntInfo->dot11DtimPeriod; @@ -2444,7 +2444,7 @@ MgntActSet_802_11_PowerSaveMode( pMgntInfo->ListenInterval = 2; } - if(pMgntInfo->mPss != eAwake && rtPsMode == eActive) + if(pMgntInfo->mPss != eAwake && rtPsMode == eActive) PlatformSetTimer(Adapter, &(pMgntInfo->AwakeTimer), 0); if(!pPSC->bFwCtrlLPS) @@ -2463,13 +2463,13 @@ MgntActSet_802_11_PowerSaveMode( } // - // 1. Enter PS mode + // 1. Enter PS mode // Set RPWM to Fw to turn RF off and send H2C FwPwrMode cmd to set Fw into PS mode. // 2. Leave PS mode // Send H2C FwPwrMode cmd to Fw to set Fw into Active mode and set RPWM to turn RF on. // By tynli. 2009.01.19. if((pPSC->bFwCtrlLPS)) - { + { if(pMgntInfo->dot11PowerSaveMode == eActive) { FwPwrMode = FW_PS_ACTIVE_MODE; @@ -2493,8 +2493,8 @@ MgntActSet_802_11_PowerSaveMode( } -// -// Change to either AP or STA mode. +// +// Change to either AP or STA mode. // 2005.05.27, by rcnjko. // BOOLEAN @@ -2517,7 +2517,7 @@ MgntActSet_ApMode( pMgntInfo->bSwitchingAsApInProgress = TRUE; MgntActSet_ApType(Adapter, TRUE); - // We use SW encryption/decryption in this stage, + // We use SW encryption/decryption in this stage, // and we should use HW encryption/decryption later. 2005.07.01, by rcnjko. SecSetSwEncryptionDecryption(Adapter, FALSE, FALSE); @@ -2529,7 +2529,7 @@ MgntActSet_ApMode( RT_TRACE(COMP_AP, DBG_LOUD, ("MgntActSet_ApMode(): Switch to STA. Do nothing since already in STA mode.\n")); return TRUE; } - + AP_DisassociateAllStation(Adapter, unspec_reason); PlatformSleepUs(5000); if(ACTING_AS_AP(Adapter)) @@ -2542,9 +2542,9 @@ MgntActSet_ApMode( //To let WZC show disconnect when change from AP to STA if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED) //YJ,ADD,110504 { - DrvIFIndicateDisassociation(Adapter, unspec_reason, pMgntInfo->Bssid); + DrvIFIndicateDisassociation(Adapter, unspec_reason, pMgntInfo->Bssid); } - + pMgntInfo->bSwitchingAsApInProgress = TRUE; MgntActSet_ApType(Adapter, FALSE); @@ -2552,8 +2552,8 @@ MgntActSet_ApMode( // // 2012/01/17 CCW Add for fake soft ap & vwifi soft ap coexist mode. // - PlatformZeroMemory(pMgntInfo->Bssid, 6); - + PlatformZeroMemory(pMgntInfo->Bssid, 6); + AP_Reset(Adapter); // I assume STA only using SW encryption/decryption. @@ -2590,7 +2590,7 @@ MgntActSet_802_11_BeaconInterval( { pMgntInfo->Regdot11BeaconPeriod = u2BeaconPeriod; pMgntInfo->dot11BeaconPeriod = pMgntInfo->Regdot11BeaconPeriod; - + Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BEACON_INTERVAL, (pu1Byte)(&pMgntInfo->dot11BeaconPeriod) ); } } @@ -2598,11 +2598,11 @@ MgntActSet_802_11_BeaconInterval( // // Send magic packet to each channel for WOL feature. -// Currently, we use the replace the probe request with magic packet to +// Currently, we use the replace the probe request with magic packet to // achive the feature, see ScanCallback(), ScanComplete() and PreTransmitTcb() for details. // 2005.06.27, by rcnjko. // -VOID +VOID MgntActSet_802_11_ScanWithMagicPacket( PADAPTER Adapter, pu1Byte pDstAddr @@ -2616,7 +2616,7 @@ MgntActSet_802_11_ScanWithMagicPacket( MgntActSet_802_11_BSSID_LIST_SCAN(Adapter); if(!pMgntInfo->bScanInProgress) - { + { // Prevent the scan request failed, 2005.06.29, by rcnjko. pMgntInfo->bScanWithMagicPacket = FALSE; } @@ -2632,7 +2632,7 @@ MgntActSet_Passphrase( PAUTH_GLOBAL_KEY_TAG pGlInfo = &(pMgntInfo->globalKeyInfo); RT_ASSERT( (posPassphrase->Length >= 8 && posPassphrase->Length <= 64), // Modify length from 1-61 to 8-63. Annie, 2005-11-21. - ("MgntActSet_Passphrase(): passphrase len: %d !!!", posPassphrase->Length)); // Modify length 63 to 64 for PMK 64-Hex mode + ("MgntActSet_Passphrase(): passphrase len: %d !!!", posPassphrase->Length)); // Modify length 63 to 64 for PMK 64-Hex mode if(ACTING_AS_AP(Adapter)) { // AP mode. @@ -2660,7 +2660,7 @@ MgntActSet_Passphrase( // 3. Set PassphraseLen to 64 ... Point to 64-Hex mode !! pGlInfo->PassphraseLen = 64; } - + } } @@ -2708,7 +2708,7 @@ MgntReturnTxResource( } // -// Description: +// Description: // Chang RF Power State. // Note that, only MgntActSet_RF_State() is allowed to set HW_VAR_RF_STATE. // @@ -2724,7 +2724,7 @@ MgntActSet_RF_State( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - BOOLEAN bActionAllowed = FALSE; + BOOLEAN bActionAllowed = FALSE; BOOLEAN bConnectBySSID = FALSE; RT_RF_POWER_STATE rtState; u2Byte RFWaitCounter = 0; @@ -2739,7 +2739,7 @@ MgntActSet_RF_State( } //1// - //1//<1>Prevent the race condition of RF state change. + //1//<1>Prevent the race condition of RF state change. //1// // Only one thread can change the RF state at one time, and others should wait to be executed. By Bruce, 2007-11-28. @@ -2752,7 +2752,7 @@ MgntActSet_RF_State( if(pMgntInfo->RFChangeInProgress) { RT_TRACE(COMP_RF, DBG_LOUD, ("MgntActSet_RF_State(): RF Change in progress! Wait to set..StateToSet(%d).\n", StateToSet)); - // Set RF after the previous action is done. + // Set RF after the previous action is done. while(pMgntInfo->RFChangeInProgress) { PlatformReleaseSpinLock(Adapter, RT_RF_STATE_SPINLOCK); @@ -2767,7 +2767,7 @@ MgntActSet_RF_State( // TODO: Reset RF state? return FALSE; } - PlatformAcquireSpinLock(Adapter, RT_RF_STATE_SPINLOCK); + PlatformAcquireSpinLock(Adapter, RT_RF_STATE_SPINLOCK); } PlatformReleaseSpinLock(Adapter, RT_RF_STATE_SPINLOCK); } @@ -2791,18 +2791,18 @@ MgntActSet_RF_State( } return FALSE; } - + Mgnt_SetLedForRfState(Adapter, StateToSet, ChangeSource); - - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); + + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); - switch(StateToSet) + switch(StateToSet) { case eRfOn: // // Turn On RF no matter the IPS setting because we need to update the RF state to Ndis under Vista, or - // the Windows does not allow the driver to perform site survey any more. By Bruce, 2007-10-02. + // the Windows does not allow the driver to perform site survey any more. By Bruce, 2007-10-02. // pMgntInfo->RfOffReason &= (~ChangeSource); @@ -2811,7 +2811,7 @@ MgntActSet_RF_State( if(! pMgntInfo->RfOffReason) { pMgntInfo->RfOffReason = 0; - + if(rtState != eRfOn) { bActionAllowed = TRUE; @@ -2846,7 +2846,7 @@ MgntActSet_RF_State( { RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntActSet_RF_State - is not AP mode.\n")); //Porting from 8xb, by Maddest 20090921 - if ( (ChangeSource> RF_CHANGE_BY_PS) && + if ( (ChangeSource> RF_CHANGE_BY_PS) && !(pMgntInfo->RfOffReason & (RF_CHANGE_BY_SW|RF_CHANGE_BY_HW)) ) { if((pMgntInfo->bMediaConnect || pMgntInfo->bIbssStarter) @@ -2855,15 +2855,15 @@ MgntActSet_RF_State( { MgntDisconnect(tempAdapter, disas_lv_ss); - //for Win 7 it must indicate Roaming_Start and set Roaming state - //By doing this, OS does not set RESET_REQUEST within 10 seconds which may + //for Win 7 it must indicate Roaming_Start and set Roaming state + //By doing this, OS does not set RESET_REQUEST within 10 seconds which may //interrupt auto-connect mechanism activated by driver //by sherry, 20091225 //MgntLinkStatusSetRoamingState(tempAdapter, 0, RT_ROAMING_BY_DEAUTH, ROAMINGSTATE_SCANNING); //DrvIFIndicateRoamingStart(tempAdapter); } - - // Clear content of bssDesc[] and bssDesc4Query[] to avoid reporting old bss to UI. + + // Clear content of bssDesc[] and bssDesc4Query[] to avoid reporting old bss to UI. // 2007.05.28, by shien chang. //PlatformZeroMemory( pMgntInfo->bssDesc, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC ); pMgntInfo->NumBssDesc = 0; @@ -2871,7 +2871,7 @@ MgntActSet_RF_State( RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: MgntActSet_RF_State(), clear NumBssDesc4Query\n")); } - + pMgntInfo->RfOffReason |= ChangeSource; } else @@ -2881,7 +2881,7 @@ MgntActSet_RF_State( AP_DisassociateAllStation(tempAdapter, unspec_reason); MgntIndicateMediaStatus( tempAdapter, RT_MEDIA_DISCONNECT, FORCE_INDICATE ); } - + tempAdapter = GetNextExtAdapter(tempAdapter); } bActionAllowed = TRUE; @@ -2903,7 +2903,7 @@ MgntActSet_RF_State( // We should update RfOffReason for each port to keep consistency on multi-port architecture. // 2013.09.04. // - tempAdapter = GetDefaultAdapter(Adapter); + tempAdapter = GetDefaultAdapter(Adapter); while(tempAdapter !=NULL){ tempAdapter->MgntInfo.RfOffReason = pMgntInfo->RfOffReason; tempAdapter = GetNextExtAdapter(tempAdapter); @@ -2914,25 +2914,25 @@ MgntActSet_RF_State( RT_TRACE(COMP_POWER, DBG_LOUD, ("MgntActSet_RF_State(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n", StateToSet, pMgntInfo->RfOffReason)); // We should leave device power state D2 prior to the following pipe configurations, added by Roger, 2010.03.30. - if((StateToSet == eRfOn) && (rtState ==eRfOff)) + if((StateToSet == eRfOn) && (rtState ==eRfOff)) { Adapter->HalFunc.HalEnableTxHandler(Adapter); Adapter->HalFunc.HalEnableRxHandler(Adapter); - Adapter->HalFunc.HalLeaveSSHandler(Adapter); - } - + Adapter->HalFunc.HalLeaveSSHandler(Adapter); + } + // Config HW to the specified mode. Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&StateToSet)); - + // // Background : - // When RF is turned to OFF by HW/SW, sometimes due to too much low rate retry packets in tx FIFO or - // a lot of RTS packets(no CTS rsp), it will spend a lot of time to tx all packets in Tx FIFO. - // Currently, after RF is turned off, there are possibility that HW FIFO not tx all the packets and then it's power is + // When RF is turned to OFF by HW/SW, sometimes due to too much low rate retry packets in tx FIFO or + // a lot of RTS packets(no CTS rsp), it will spend a lot of time to tx all packets in Tx FIFO. + // Currently, after RF is turned off, there are possibility that HW FIFO not tx all the packets and then it's power is // turned to OFF, these packets are just gone. // We must handle this here to return all the tx packets to upper layer windows to avoid BSOD 0x9f or some strange condition. // Solution: The following, when RF is turned off by HW/SW, we will return all the packets back to OS. - // + // if(StateToSet == eRfOff && rtState == eRfOn && bHwOrSwRfChange) { // If RF is from Hw/Sw ON => OFF @@ -2940,26 +2940,26 @@ MgntActSet_RF_State( } // Turn on RF. - if(StateToSet == eRfOn) - { + if(StateToSet == eRfOn) + { if(rtState ==eRfOff) { - Adapter->HalFunc.HalEnableTxHandler(Adapter); + Adapter->HalFunc.HalEnableTxHandler(Adapter); Adapter->HalFunc.HalEnableRxHandler(Adapter); - + DrvIFIndicateCurrentPhyStatus(Adapter); } } // Turn off RF. else if(StateToSet == eRfOff) - { + { Adapter->HalFunc.HalDisableRxHandler(Adapter); - Adapter->HalFunc.HalDisableTxHandler(Adapter); - + Adapter->HalFunc.HalDisableTxHandler(Adapter); + // - // If RF OFF control is set by this routine, which means the power state + // If RF OFF control is set by this routine, which means the power state // our device currently in D0. So we shedule Idle IRP request immediately. 2009.07.03. - // + // RT_TRACE(COMP_RF, DBG_LOUD, ("MgntActSet_RF_State(): Turn off RF!!\n")); Adapter->HalFunc.HalEnterSSHandler(Adapter); @@ -2969,9 +2969,9 @@ MgntActSet_RF_State( RT_TRACE(COMP_SCAN, DBG_LOUD, ("Terminate scan because of radio off\n")); - if(pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) + if(pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) DrvIFIndicateCurrentPhyStatus(Adapter); - } + } Adapter->pPortCommonInfo->WdiData.bRFOffSwitchProgress = FALSE; } @@ -2987,13 +2987,13 @@ MgntActSet_RF_State( pMgntInfo->RFChangeInProgress = FALSE; PlatformReleaseSpinLock(Adapter, RT_RF_STATE_SPINLOCK); } - + RT_TRACE(COMP_POWER, DBG_LOUD, ("MgntActSet_RF_State() <====\n")); return bActionAllowed; } // -// Description: +// Description: // Update current transmit power level. // TxPowerLevel Setting // 0 => Default 1 => 100% 2 => 75% 3 => 50% 4 => 25% @@ -3007,13 +3007,13 @@ MgntActSet_TX_POWER_LEVEL( { s4Byte minPowerDBM = 0; s4Byte maxPowerDBM = 0; - s4Byte PowerAmount =0; - + s4Byte PowerAmount =0; + if(TxPowerLevel == 0) { return; } - + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_MIN_TX_POWER_DBM, (pu1Byte)&minPowerDBM); Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_MAX_TX_POWER_DBM, (pu1Byte)&maxPowerDBM); @@ -3021,12 +3021,12 @@ MgntActSet_TX_POWER_LEVEL( PowerAmount = ((maxPowerDBM - minPowerDBM)/6)*(TxPowerLevel+1); MgntActSet_TX_POWER_DBM(Adapter,(maxPowerDBM-PowerAmount)); - RT_TRACE(COMP_RM, DBG_LOUD, ("MgntActSet_TX_POWER_LEVEL(): Set TX Power(TX Power Level: %d) to Dbm(%d)\n",TxPowerLevel,(maxPowerDBM-PowerAmount))); - + RT_TRACE(COMP_RM, DBG_LOUD, ("MgntActSet_TX_POWER_LEVEL(): Set TX Power(TX Power Level: %d) to Dbm(%d)\n",TxPowerLevel,(maxPowerDBM-PowerAmount))); + } // -// Description: +// Description: // Update current transmit power level in dBm. // By Bruce, 2008-02-04. // @@ -3037,7 +3037,7 @@ MgntActSet_TX_POWER_DBM( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + PlatformAcquireSpinLock(Adapter, RT_RM_SPINLOCK); if( !pMgntInfo->bUpdateTxPowerInProgress ) { @@ -3062,8 +3062,8 @@ MgntActSet_TX_POWER_DBM( } // -// Description: -// callback function of UpdateTxPowerWorkItem. +// Description: +// callback function of UpdateTxPowerWorkItem. // By Bruce, 2008-02-04. // VOID @@ -3101,7 +3101,7 @@ MgntActSet_AdditionalBeaconIE( do { - // + // // allocate memory for the new IE data and copy the IEs // if (AdditionalIEBufLen > 0) @@ -3112,10 +3112,10 @@ MgntActSet_AdditionalBeaconIE( if (Status != RT_STATUS_SUCCESS) { break; - } + } - PlatformMoveMemory(newBeaconIeData, - pAdditionalIEBuf, + PlatformMoveMemory(newBeaconIeData, + pAdditionalIEBuf, AdditionalIEBufLen); newBeaconIeSize = AdditionalIEBufLen; } @@ -3124,7 +3124,7 @@ MgntActSet_AdditionalBeaconIE( } - // + // // free the old IEs // if (pMgntInfo->AdditionalBeaconIESize > 0) @@ -3134,8 +3134,8 @@ MgntActSet_AdditionalBeaconIE( pMgntInfo->AdditionalBeaconIESize = 0; } - // - // cache new IEs. + // + // cache new IEs. // Note that if AdditionalIEBufLen == 0, pMgntInfo->AdditionalBeaconIEData is cleared. // pMgntInfo->AdditionalBeaconIEData = newBeaconIeData; @@ -3159,10 +3159,10 @@ MgntActSet_AdditionalProbeReqIE( RT_STATUS Status = RT_STATUS_SUCCESS; PVOID newIeData = NULL; u4Byte newIeSize = 0; - + do { - // + // // allocate memory for the new IE data and copy the IEs // if (AdditionalIEBufLen > 0) @@ -3173,10 +3173,10 @@ MgntActSet_AdditionalProbeReqIE( if (Status != RT_STATUS_SUCCESS) { break; - } + } - PlatformMoveMemory(newIeData, - pAdditionalIEBuf, + PlatformMoveMemory(newIeData, + pAdditionalIEBuf, AdditionalIEBufLen); newIeSize = AdditionalIEBufLen; } @@ -3185,7 +3185,7 @@ MgntActSet_AdditionalProbeReqIE( } - // + // // free the old IEs // if (pMgntInfo->AdditionalProbeReqIESize > 0) @@ -3195,8 +3195,8 @@ MgntActSet_AdditionalProbeReqIE( pMgntInfo->AdditionalProbeReqIESize = 0; } - // - // cache new IEs. + // + // cache new IEs. // Note that if AdditionalIEBufLen == 0, pMgntInfo->AdditionalBeaconIEData is cleared. // pMgntInfo->AdditionalProbeReqIEData = newIeData; @@ -3227,21 +3227,21 @@ MgntActSet_AdditionalProbeRspIE( do { - // + // // allocate memory for the new IE data and copy the IEs // if (AdditionalIEBufLen > 0) - { + { Status = PlatformAllocateMemory(pAdapter, &newProbeRspIeData, AdditionalIEBufLen); if (Status != RT_STATUS_SUCCESS) { break; - } + } - PlatformMoveMemory(newProbeRspIeData, - pAdditionalIEBuf, + PlatformMoveMemory(newProbeRspIeData, + pAdditionalIEBuf, AdditionalIEBufLen); newProbeRspIeSize = AdditionalIEBufLen; } @@ -3250,7 +3250,7 @@ MgntActSet_AdditionalProbeRspIE( } - // + // // free the old IEs // if (pMgntInfo->AdditionalResponseIESize > 0) @@ -3260,7 +3260,7 @@ MgntActSet_AdditionalProbeRspIE( pMgntInfo->AdditionalResponseIESize = 0; } - // + // // cache new IEs // pMgntInfo->AdditionalResponseIEData = newProbeRspIeData; @@ -3282,24 +3282,24 @@ MgntActSet_AdditionalAssocReqIE( RT_STATUS Status = RT_STATUS_SUCCESS; PVOID newIeData = NULL; u4Byte newIeSize = 0; - + do { - // + // // allocate memory for the new IE data and copy the IEs // if (AdditionalIEBufLen > 0) - { + { Status = PlatformAllocateMemory(pAdapter, &newIeData, AdditionalIEBufLen); if (Status != RT_STATUS_SUCCESS) { break; - } + } - PlatformMoveMemory(newIeData, - pAdditionalIEBuf, + PlatformMoveMemory(newIeData, + pAdditionalIEBuf, AdditionalIEBufLen); newIeSize = AdditionalIEBufLen; } @@ -3308,7 +3308,7 @@ MgntActSet_AdditionalAssocReqIE( } - // + // // free the old IEs // if (pMgntInfo->AdditionalAssocReqIESize > 0) @@ -3318,8 +3318,8 @@ MgntActSet_AdditionalAssocReqIE( pMgntInfo->AdditionalAssocReqIESize = 0; } - // - // cache new IEs. + // + // cache new IEs. // Note that if AdditionalIEBufLen == 0, pMgntInfo->AdditionalBeaconIEData is cleared. // pMgntInfo->AdditionalAssocReqIEData = newIeData; @@ -3336,7 +3336,7 @@ MgntTranslateNdisVersionToRtNdisVersion( ) { RT_NDIS_VERSION ret = RT_NDIS_VERSION_NONE_NDIS; - + if(NdisVersion == 0) { ret = RT_NDIS_VERSION_NONE_NDIS; @@ -3366,24 +3366,24 @@ MgntTranslateNdisVersionToRtNdisVersion( ret = RT_NDIS_VERSION_6_30; } else if(NdisVersion <= NDIS_VERSION_BASE_6_40) - { + { ret = RT_NDIS_VERSION_6_40; } else if(NdisVersion <= NDIS_VERSION_BASE_6_50) - { + { ret = RT_NDIS_VERSION_6_50; } else {// should not get here RT_ASSERT(0, ("Wrong NdisVersion: 0x%X\n", NdisVersion)); - + ret = RT_NDIS_VERSION_NONE_NDIS; } - RT_TRACE(COMP_INIT, DBG_LOUD, + RT_TRACE(COMP_INIT, DBG_LOUD, ("MgntTranslateNdisVersionToRtNdisVersion(): %X => %X\n", NdisVersion, ret)); - + return ret; } @@ -3443,7 +3443,7 @@ MgntActSet_802_11_WMM_MODE( // Restore SSID. CopySsid(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length, tmpSsid.Octet, tmpSsid.Length); - + if (bWMMEnable) { pMgntInfo->pStaQos->QosCapability |= QOS_WMM; @@ -3463,10 +3463,10 @@ MgntActSet_802_11_WMM_MODE( if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) return; - + join_action = SelectNetworkBySSID(Adapter, &pMgntInfo->Ssid, FALSE, pRtBss); JoinRequest(Adapter, join_action, pRtBss); - + PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); } } @@ -3494,7 +3494,7 @@ MgntActSet_802_11_WMM_UAPSD( BOOLEAN bReconnect = FALSE; RT_TRACE(COMP_QOS, DBG_LOUD, ("MgntActSet_802_11_WMM_UAPSD(): UPSD is %X\n", WMM_UAPSD)); - + // Backup SSID. tmpSsid.Octet = tmpSsidBuf; tmpSsid.Length = sizeof(tmpSsidBuf); @@ -3508,7 +3508,7 @@ MgntActSet_802_11_WMM_UAPSD( // Restore SSID. CopySsid(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length, tmpSsid.Octet, tmpSsid.Length); - + pMgntInfo->pStaQos->b4ac_Uapsd = WMM_UAPSD & 0x0F; if(pMgntInfo->pStaQos->b4ac_Uapsd & 0x0F) { @@ -3518,7 +3518,7 @@ MgntActSet_802_11_WMM_UAPSD( { pMgntInfo->pStaQos->QosCapability &= ~QOS_WMM_UAPSD; } - + // Use MSB 4 BIT for MaxSPLength pMgntInfo->pStaQos->MaxSPLength = WMM_UAPSD>>4; @@ -3528,7 +3528,7 @@ MgntActSet_802_11_WMM_UAPSD( if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) return; - + join_action = SelectNetworkBySSID(Adapter, &pMgntInfo->Ssid, FALSE, pRtBss); JoinRequest(Adapter, join_action, pRtBss); @@ -3550,13 +3550,13 @@ MgntActSet_802_11_CustomizedAsocIE( // // Minimum IE length should be larger than zero, // Maximum IE length should be less/equal than 0xFF + IE ID + length (0xFF + 2) - // - + // + pMgntInfo->bCustomizedAsocIE = FALSE; if(AsocIeLength > 0 && AsocIeLength <= (MAX_IE_LEN+2)) { - + pMgntInfo->bCustomizedAsocIE = TRUE; pMgntInfo->CustomizedAsocIELength = AsocIeLength; PlatformZeroMemory(pMgntInfo->CustomizedAsocIEBuf, sizeof(pMgntInfo->CustomizedAsocIEBuf)); @@ -3565,7 +3565,7 @@ MgntActSet_802_11_CustomizedAsocIE( RT_PRINT_DATA(COMP_MLME, DBG_TRACE, ("MgntActSet_802_11_CustomizedAsocIE():"), pMgntInfo->CustomizedAsocIEBuf, pMgntInfo->CustomizedAsocIELength); return TRUE; - } + } #endif return FALSE; } @@ -3587,7 +3587,7 @@ MgntActSet_802_11_Sigma_Capability( if(InformationBufferLength < neededLen) goto end; - + switch(capability) { @@ -3596,7 +3596,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + pHTInfo->b40Intolerant = (BOOLEAN)(*((pu1Byte)InformationBuffer+1)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set 40 intolerant = %d\n", pHTInfo->b40Intolerant)); } @@ -3607,7 +3607,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + pHTInfo->bAMPDUManual = (BOOLEAN)(*((pu1Byte)InformationBuffer+1)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set AMPDU (manual) = %d\n", pHTInfo->bAMPDUManual)); } @@ -3619,7 +3619,7 @@ MgntActSet_802_11_Sigma_Capability( if(InformationBufferLength < neededLen) goto end; RT_TRACE(COMP_HT, DBG_LOUD, ("Set HT_CAP_OP_STBC\n")); - if(RT_STATUS_SUCCESS != + if(RT_STATUS_SUCCESS != (rtStatus = MgntActSet_802_11_STBC_MODE(Adapter, ((pu1Byte)InformationBuffer+1), InformationBufferLength - 1))) { RT_TRACE_F(COMP_HT, DBG_WARNING, ("[WARNING] MgntActSet_802_11_STBC_MODE failed = %d\n", rtStatus)); @@ -3635,7 +3635,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + if((CHANNEL_WIDTH)(*((pu1Byte)InformationBuffer+1)) == CHANNEL_WIDTH_20) pChnlInfo->RegBWSetting = CHANNEL_WIDTH_20; else if((CHANNEL_WIDTH)(*((pu1Byte)InformationBuffer+1)) == CHANNEL_WIDTH_40) @@ -3651,11 +3651,11 @@ MgntActSet_802_11_Sigma_Capability( { PTX_TS_RECORD pTxTs = NULL; u1Byte tid = (*((pu1Byte)InformationBuffer+1)); - + neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + if(GetTs(Adapter, (PTS_COMMON_INFO*)(&pTxTs), pMgntInfo->Bssid, tid, TX_DIR, TRUE)) { TsStartAddBaProcess(Adapter, pTxTs); @@ -3671,7 +3671,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + pMgntInfo->pStaQos->AcNoAck = (*(PAC_NOACK)((pu1Byte)InformationBuffer+1)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set NoAckPolicy = %x\n", pMgntInfo->pStaQos->AcNoAck)); } @@ -3693,7 +3693,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + pVHTInfo->nRxSPStream = (*((pu1Byte)InformationBuffer+1)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set VHT RxSPStream = %d\n", pVHTInfo->nRxSPStream)); } @@ -3704,7 +3704,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + pHTInfo->nTxSPStream = (*((pu1Byte)InformationBuffer+1)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set TxSPStream = %d\n", pHTInfo->nTxSPStream)); } @@ -3715,7 +3715,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 1; if(InformationBufferLength < neededLen) goto end; - + pHTInfo->nRxSPStream = (*((pu1Byte)InformationBuffer+1)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set RxSPStream = %d\n", pHTInfo->nRxSPStream)); } @@ -3730,12 +3730,12 @@ MgntActSet_802_11_Sigma_Capability( pVHTInfo->BWToSwitch = (CHANNEL_WIDTH)(*((pu1Byte)InformationBuffer+1)); DbgPrint("set value = %d\n", pVHTInfo->BWToSwitch); - + pVHTInfo->RxSSToSwitch = (*((pu1Byte)InformationBuffer+2)); VHTSendOperatingModeNotification(Adapter, pMgntInfo->Bssid); - CHNL_SetBwChnl( Adapter, + CHNL_SetBwChnl( Adapter, pMgntInfo->dot11CurrentChannelNumber, - pVHTInfo->BWToSwitch, + pVHTInfo->BWToSwitch, pMgntInfo->pChannelInfo->Ext20MHzChnlOffsetOf40MHz); RT_TRACE(COMP_HT, DBG_LOUD, ("Set Bw to %d\n", pVHTInfo->BWToSwitch)); RT_TRACE(COMP_HT, DBG_LOUD, ("Set RxSS to %d\n", pVHTInfo->RxSSToSwitch)); @@ -3747,7 +3747,7 @@ MgntActSet_802_11_Sigma_Capability( neededLen += 2; if(InformationBufferLength < neededLen) goto end; - + pVHTInfo->RxSSToSwitch = (*((pu1Byte)InformationBuffer+1)); if(pVHTInfo->RxSSToSwitch == 0) { @@ -3772,7 +3772,7 @@ MgntActSet_802_11_Sigma_Capability( if(InformationBufferLength < neededLen) goto end; RT_TRACE(COMP_HT, DBG_LOUD, ("Set HT_CAP_OP_BEAMFORMING_CAP\n")); - if(RT_STATUS_SUCCESS != + if(RT_STATUS_SUCCESS != (rtStatus = MgntActSet_802_11_Beamforming_MODE(Adapter, ((pu1Byte)InformationBuffer+1), InformationBufferLength - 1))) { RT_TRACE_F(COMP_HT, DBG_WARNING, ("[WARNING] MgntActSet_802_11_Beamforming_MODE failed = %d\n", rtStatus)); @@ -3821,7 +3821,7 @@ MgntActSet_802_11_Sigma_Capability( break; case HT_CAP_OP_NSS_MCS_CAP: - { + { neededLen += 2; if(InformationBufferLength < neededLen) goto end; @@ -3849,7 +3849,7 @@ MgntActSet_802_11_Sigma_Capability( case HT_CAP_OP_SGI20: { u1Byte shortGI = 0; - + neededLen += 1; if(InformationBufferLength < neededLen) goto end; @@ -3897,10 +3897,10 @@ MgntActSet_802_11_Sigma_Capability( break; case HT_CAP_OP_CTS_ENABLE: - { + { PRT_CHANNEL_INFO pChnlInfo = pMgntInfo->pChannelInfo; u1Byte BWFallBackLvl = 0; - + pVHTInfo->DynamicCTSBW = (CHANNEL_WIDTH)((u1Byte)(*((pu1Byte)InformationBuffer+1))); if(pChnlInfo->RegBWSetting == CHANNEL_WIDTH_80) // If current BW is 80MHz @@ -3923,7 +3923,7 @@ MgntActSet_802_11_Sigma_Capability( { RT_TRACE(COMP_HT, DBG_LOUD, ("Set HT_CAP_OP_CTS_ENABLE: Not support RegBWSetting=%d,\n", pVHTInfo->DynamicCTSBW)); } - + Adapter->HalFunc.HalSetCTSDynamicBWSelectHandler(Adapter, BWFallBackLvl); RT_TRACE(COMP_HT, DBG_LOUD, ("Set dynamic CTS BW = %d, RegBWSetting=%d, BWFallBackLvl(%d)\n", pVHTInfo->DynamicCTSBW, pChnlInfo->RegBWSetting, BWFallBackLvl)); } @@ -3940,7 +3940,7 @@ MgntActSet_802_11_Sigma_Capability( } break; #endif - + default: break; } @@ -3967,11 +3967,11 @@ MgntActSet_802_11_Sigma_Capability( // The length in byte of InformationBuffer. // Remark: // Information Buffer contains one byte as the following setting. -// BIT0 - BEAMFORMING_VHT_BEAMFORMER_ENABLE, +// BIT0 - BEAMFORMING_VHT_BEAMFORMER_ENABLE, // BIT1 - BEAMFORMING_VHT_BEAMFORMEE_ENABLE // BIT2 - BEAMFORMING_VHT_BEAMFORMER_TEST (Transmiting Beamforming no matter the target supports it or not) // BIT3 - BEAMFORMING_VHT_MU_BEAMFORMER_ENABLE -// BIT4 - BEAMFORMING_HT_BEAMFORMER_ENABLE, +// BIT4 - BEAMFORMING_HT_BEAMFORMER_ENABLE, // BIT5 - BEAMFORMING_HT_BEAMFORMEE_ENABLE // BIT6 - BEAMFORMING_HT_BEAMFORMER_TEST (Transmiting Beamforming no matter the target supports it or not) // BIT7 - BEAMFORMING_VHT_MU_BEAMFORMEE_ENABLE @@ -4000,7 +4000,7 @@ MgntActSet_802_11_Beamforming_MODE( userBeamformSet = *(InformationBuffer); RT_TRACE_F(COMP_HT, DBG_LOUD, ("Beamforming config = 0x%02X\n", userBeamformSet)); - + // Set for all adapters do { @@ -4097,7 +4097,7 @@ MgntActSet_802_11_Beamforming_MODE( // The length in byte of InformationBuffer. // Remark: // Information Buffer contains one byte as the following setting. -// BIT0 - LDPC_VHT_ENABLE_RX, +// BIT0 - LDPC_VHT_ENABLE_RX, // BIT1 - LDPC_VHT_ENABLE_TX // BIT2 - LDPC_VHT_TEST_TX_ENABLE(Don't care protocol, just sending VHT LDPC) // @@ -4135,8 +4135,8 @@ MgntActSet_802_11_LDPC_MODE( userLdpcSet = *(InformationBuffer); - if(!bHwSupportLdpcTx && - ((userLdpcSet & LDPC_VHT_ENABLE_TX) || + if(!bHwSupportLdpcTx && + ((userLdpcSet & LDPC_VHT_ENABLE_TX) || (userLdpcSet & LDPC_VHT_TEST_TX_ENABLE) || (userLdpcSet & LDPC_HT_ENABLE_TX) || (userLdpcSet & LDPC_HT_TEST_TX_ENABLE))) @@ -4151,11 +4151,11 @@ MgntActSet_802_11_LDPC_MODE( RT_TRACE_F(COMP_HT, DBG_WARNING, ("[WARNING] HW doesn't support set LDPC Rx\n")); return RT_STATUS_FAILURE; } - + SetRegLdpc(pAdapter, *(InformationBuffer) ); RT_TRACE_F(COMP_HT, DBG_LOUD, ("LDPC config = 0x%02X\n", userLdpcSet)); - + // Set for all adapters do { @@ -4206,7 +4206,7 @@ MgntActSet_802_11_LDPC_MODE( // The length in byte of InformationBuffer. // Remark: // Information Buffer contains one byte as the following setting. -// BIT0 - STBC_VHT_ENABLE_RX, +// BIT0 - STBC_VHT_ENABLE_RX, // BIT1 - STBC_VHT_ENABLE_TX // BIT2 - STBC_VHT_TEST_TX_ENABLE(Don't care protocol, just sending VHT STBC), test mode. // @@ -4235,7 +4235,7 @@ MgntActSet_802_11_STBC_MODE( } pAdapter->HalFunc.GetHalDefVarHandler(pAdapter, HAL_DEF_TX_STBC, (pu1Byte)&bHwSupportStbc); - + if(!bHwSupportStbc) { RT_TRACE_F(COMP_HT, DBG_WARNING, ("[WARNING] HW doesn't not support STBC, skip setting...\n")); @@ -4245,7 +4245,7 @@ MgntActSet_802_11_STBC_MODE( SetRegStbc(pAdapter, *(InformationBuffer)); RT_TRACE_F(COMP_HT, DBG_LOUD, ("STBC config = 0x%02X\n", userStbcSet)); - + // Set for all adapters do { @@ -4294,7 +4294,7 @@ MgntActSet_S5_WAKEUP_INFO( { PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_S5WakeUPInfo pS5WakeInfo = NULL; - + pS5WakeInfo = (PRT_S5WakeUPInfo)InformationBuffer; pMgntInfo->mPasspharseLen = pS5WakeInfo->PSKLen; @@ -4308,7 +4308,7 @@ MgntActSet_S5_WAKEUP_INFO( -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) VOID MgntActSet_P2PMode( IN PADAPTER Adapter, @@ -4321,8 +4321,8 @@ MgntActSet_P2PMode( { PP2P_INFO pP2PInfo = (PP2P_INFO)(Adapter->MgntInfo.pP2PInfo); BOOLEAN bCurrentP2PEnabled = P2P_ENABLED(pP2PInfo); - - RT_TRACE_F(COMP_P2P, DBG_LOUD, + + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bP2PMode(%u), bGO(%u), LsnCh(%u), OpCh(%u), GOIntent(%u)\n", bP2PMode, bGO, ListenChannel, IntendedOpChannel, GOIntent)); @@ -4334,12 +4334,12 @@ MgntActSet_P2PMode( if(bCurrentP2PEnabled) { BOOLEAN bScanInProgress; - + // // Stop any existing scan // bScanInProgress = MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo); - + if(P2P_DOING_DEVICE_DISCOVERY(pP2PInfo)) {// Doing P2P Device Discovery //DbgPrint("P2P_DOING_DEVICE_DISCOVERY\n"); @@ -4352,7 +4352,7 @@ MgntActSet_P2PMode( P2PScanListCeaseScan(pP2PInfo); P2PExtendedListenComplete(pP2PInfo); } - else if(bScanInProgress) + else if(bScanInProgress) {// Doing normal scan //DbgPrint("bScanInProgress\n"); P2PScanListCeaseScan(pP2PInfo); @@ -4360,13 +4360,13 @@ MgntActSet_P2PMode( } } - if(bP2PMode) + if(bP2PMode) { if(!P2P_ENABLED(pP2PInfo)) { P2PInitialize(pP2PInfo, Adapter, ListenChannel, IntendedOpChannel, GOIntent); } - + if(bGO) { P2PGOStartAutomously(pP2PInfo); @@ -4375,7 +4375,7 @@ MgntActSet_P2PMode( { } } - else + else { //Disconnect when set P2P disable //by sherry 20130117 @@ -4395,9 +4395,9 @@ MgntActSet_P2PProvisionIE( IN u2Byte InformationLen ) { - RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "MgntActSet_P2PProvisionIE:\n", + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "MgntActSet_P2PProvisionIE:\n", Information, InformationLen); - + P2P_SetWpsIe(Adapter, InformationLen, Information); } @@ -4407,7 +4407,7 @@ MgntActSet_P2PFlushScanList( ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); - + if(P2P_ENABLED(pP2PInfo)) { P2PScanListClear(pP2PInfo); @@ -4423,7 +4423,7 @@ MgntActSet_P2PProvisioningResult( ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); - + if(P2P_ENABLED(pP2PInfo)) { pP2PInfo->ConnectionContext.ProvisioningResult = ProvisioningResult; @@ -4456,7 +4456,7 @@ MgntActSet_P2PChannelList( PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); u4Byte nRegClasses = 0; u1Byte i = 0; - + if(!P2P_ENABLED(pP2PInfo)) { //return; @@ -4465,8 +4465,8 @@ MgntActSet_P2PChannelList( RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ChannelList to set: ", pChannelList, ChannelListLen); nRegClasses = sizeof(P2PRegClass) / sizeof(P2PRegClass[0]) - 1; - - RT_ASSERT(nRegClasses <= P2P_MAX_REG_CLASSES, + + RT_ASSERT(nRegClasses <= P2P_MAX_REG_CLASSES, ("MgntActSet_P2PChannelList(): not enough space for all regulatory class: %u > %u", nRegClasses, P2P_MAX_REG_CLASSES)); @@ -4482,8 +4482,8 @@ MgntActSet_P2PChannelList( if(CHANNEL_WIDTH_40 == pRecClass->chWidth && !(GET_HT_INFO(&Adapter->MgntInfo))->bEnableHT) { - RT_TRACE(COMP_P2P, DBG_LOUD, - ("MgntActSet_P2PChannelList(): skip reg class: %u because HT not enabled\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("MgntActSet_P2PChannelList(): skip reg class: %u because HT not enabled\n", pRecClass->RegClass)); continue; } @@ -4492,9 +4492,9 @@ MgntActSet_P2PChannelList( pChEntry->regClass= pRecClass->RegClass; pChEntry->channels= 0; pP2PInfo->ChannelEntryList.regClasses++; - - for (Channel = pRecClass->MinChannel; - Channel <= pRecClass->MaxChannel; + + for (Channel = pRecClass->MinChannel; + Channel <= pRecClass->MaxChannel; Channel += pRecClass->ChannelGap) // foreach channels in the regulatory class { u1Byte j = 0; @@ -4510,8 +4510,8 @@ MgntActSet_P2PChannelList( pChEntry->channel[pChEntry->channels] = Channel; pChEntry->channels++; - RT_TRACE(COMP_P2P, DBG_LOUD, - ("MgntActSet_P2PChannelList: add channel: %4s: %4u, %4s: %4u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("MgntActSet_P2PChannelList: add channel: %4s: %4u, %4s: %4u\n", "reg", pChEntry->regClass, "ch", Channel)); } @@ -4526,10 +4526,10 @@ MgntActSet_P2PListenChannel( { PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); PADAPTER pDefAdapter = GetDefaultAdapter(Adapter); - PADAPTER pLoopAdapter = pDefAdapter; + PADAPTER pLoopAdapter = pDefAdapter; PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pDefAdapter); BOOLEAN bSetChannel = TRUE; - + if(!P2P_ENABLED(pP2PInfo)) { return; @@ -4562,32 +4562,32 @@ MgntActSet_P2PListenChannel( if(bSetChannel) { - if(IS_NEED_EXT_IQK(pDefAdapter)) + if(IS_NEED_EXT_IQK(pDefAdapter)) { - pHalData->bNeedIQK = TRUE; + pHalData->bNeedIQK = TRUE; pHalData->DM_OutSrc.RFCalibrateInfo.bNeedIQK = TRUE; } - RT_TRACE(COMP_P2P, DBG_LOUD, - ("MgntActSet_P2PListenChannel(): from %u to %u \n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("MgntActSet_P2PListenChannel(): from %u to %u \n", pP2PInfo->ListenChannel, ListenChannel)); pP2PInfo->pAdapter->MgntInfo.dot11CurrentChannelNumber = ListenChannel; - pP2PInfo->ListenChannel = ListenChannel; - + pP2PInfo->ListenChannel = ListenChannel; + if(!pDefAdapter->MgntInfo.RegRfOff) { Adapter->HalFunc.SetWirelessModeHandler(Adapter, (u1Byte)WIRELESS_MODE_G); - CHNL_SetBwChnl( Adapter, + CHNL_SetBwChnl( Adapter, Adapter->MgntInfo.dot11CurrentChannelNumber, - CHANNEL_WIDTH_20, + CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT ); } } } -#endif // #if (P2P_SUPPORT == 1) +#endif // #if (P2P_SUPPORT == 1) #if (WPS_SUPPORT == 1) RT_STATUS @@ -4606,7 +4606,7 @@ MgntActSet_WPS_Information( if(pSimpleConfig == NULL) goto End; - + if(pSimpleConfig->WpsIeVersion < SUPPORT_WPS_INFO_VERSION) { RT_TRACE(COMP_WPS, DBG_LOUD, ("MgntActSet_WPS_Information(): Not support this version!\n")); @@ -4622,7 +4622,7 @@ MgntActSet_WPS_Information( wpsinfoOpcode = *((pu1Byte)InformationBuffer); paraLength = *((pu2Byte)((pu1Byte)InformationBuffer+1)); - + NeedLength += paraLength; if(InformationBufferLength < NeedLength) { @@ -4630,7 +4630,7 @@ MgntActSet_WPS_Information( rtStatus = RT_STATUS_RESOURCE; goto End; } - + switch(wpsinfoOpcode) { case WPS_INFO_BEACON_IE: diff --git a/network/wlan/WDI/COMMON/MgntActSetParam.h b/network/wlan/WDI/COMMON/MgntActSetParam.h index f7e593a79..58e54d851 100644 --- a/network/wlan/WDI/COMMON/MgntActSetParam.h +++ b/network/wlan/WDI/COMMON/MgntActSetParam.h @@ -15,7 +15,7 @@ #endif typedef union _TURBOMODE_TYPE{ - u1Byte charData; + u1Byte charData; struct { u1Byte SupportTurboMode:1; @@ -54,7 +54,7 @@ typedef enum _HT_CAP_OP_CODE{ HT_CAP_OP_BW_SGNL = 25, HT_CAP_OP_CTS_ENABLE = 26, //------------------------------------------// realtek custom - HT_CAP_OP_SEND_ADDBA = 0x81, + HT_CAP_OP_SEND_ADDBA = 0x81, HT_CAP_OP_RTS_THRESHOLD = 0x82, HT_CAP_OP_FRAGMENT = 0x83, HT_CAP_OP_PREAMBLE = 0x84, @@ -83,7 +83,7 @@ typedef enum _HT_CAP_OP_CODE{ //Name : MgntActSet_RSNA_REMOVE_DEAULT_KEY //Function : Remove Key from PerStable //Input : Keyindex = Perstation DefKeybuf index. -// MacAddress = Per-station's MAC address +// MacAddress = Per-station's MAC address //------------------------------------------ BOOLEAN MgntActSet_RSNA_REMOVE_DEAULT_KEY( @@ -97,7 +97,7 @@ MgntActSet_RSNA_REMOVE_DEAULT_KEY( //Function : Remove Key from PerStable //Input : Keyindex = Perstation DefKeybuf index. // pKeyMaterial = conent of key -// MacAddress = Per-station's MAC address +// MacAddress = Per-station's MAC address //------------------------------------------ //vivi added for new cam search flow, 20091028 BOOLEAN @@ -112,8 +112,8 @@ MgntActSet_RSNA_ADD_DEAULT_KEY( //------------------------------------------ //Name : MgntActSet_RSNA_REMOVE_MAPPING_KEY //Function : Remove Key from PerStable -//Input : -// MacAddress = Per-station's MAC address +//Input : +// MacAddress = Per-station's MAC address //------------------------------------------ BOOLEAN MgntActSet_RSNA_REMOVE_MAPPING_KEY( @@ -125,7 +125,7 @@ MgntActSet_RSNA_REMOVE_MAPPING_KEY( //Name : MgntActSet_RSNA_ADD_MAPPING_KEY //Function : Remove Key from PerStable //Input : pKeyMaterial = conent of key -// MacAddress = Per-station's MAC address +// MacAddress = Per-station's MAC address //------------------------------------------ //vivi added for new cam search flow, 20091028 BOOLEAN @@ -285,15 +285,15 @@ MgntActSet_802_11_WIRELESS_MODE( BOOLEAN MgntActSet_802_11_RETRY_LIMIT( - PADAPTER Adapter, - u2Byte ShortRetryLimit, + PADAPTER Adapter, + u2Byte ShortRetryLimit, u2Byte LongRetryLimit ); // Use this interface to swith channel and bandwidth in MAC layer -------------- VOID MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - PADAPTER pAdapter, + PADAPTER pAdapter, u1Byte Primary20MhzChannel, CHANNEL_WIDTH BandWidthMode, EXTCHNL_OFFSET ExtChnlOffsetOf40MHz, @@ -305,7 +305,7 @@ MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( // Use this interface to change Reg 20Mhz channel ------------------------------ BOOLEAN MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte channel ); // ---------------------------------------------------------------------- @@ -313,7 +313,7 @@ MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH( // Annie, 2004-12-27 BOOLEAN MgntActSet_802_11_CHANNELPLAN( - PADAPTER Adapter, + PADAPTER Adapter, u2Byte ChannelPlan ); @@ -346,7 +346,7 @@ MgntActSet_802_11_CONFIGURATION( u1Byte ChannelNumber ); -BOOLEAN +BOOLEAN MgntActSet_802_11_PowerSaveMode( PADAPTER Adapter, RT_PS_MODE rtPsMode @@ -370,7 +370,7 @@ MgntActSet_802_11_BeaconInterval( u2Byte u2BeaconPeriod ); -VOID +VOID MgntActSet_802_11_ScanWithMagicPacket( PADAPTER Adapter, pu1Byte pDstAddr @@ -546,7 +546,7 @@ MgntActSet_S5_WAKEUP_INFO( IN u4Byte InformationBufferLength ); -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) VOID MgntActSet_P2PMode( IN PADAPTER Adapter, @@ -587,7 +587,7 @@ MgntActSet_P2PListenChannel( IN PADAPTER Adapter, IN u1Byte ListenChannel ); -#endif // #if (P2P_SUPPORT == 1) +#endif // #if (P2P_SUPPORT == 1) #if ( WPS_SUPPORT == 1 ) RT_STATUS @@ -596,7 +596,7 @@ MgntActSet_WPS_Information( IN pu1Byte InformationBuffer, IN u2Byte InformationBufferLength ); -#endif +#endif #endif // #ifndef __INC_MGNTACTSETPARAM_H diff --git a/network/wlan/WDI/COMMON/MgntConstructPacket.c b/network/wlan/WDI/COMMON/MgntConstructPacket.c index 34576a46b..9b10038c2 100644 --- a/network/wlan/WDI/COMMON/MgntConstructPacket.c +++ b/network/wlan/WDI/COMMON/MgntConstructPacket.c @@ -15,21 +15,21 @@ AppendQoSElement( { u1Byte szQoSOUI[] ={221, 0, 0x00, 0x50, 0xf2, OUI_SUB_WMM, 0, 1}; OCTET_STRING tmp; - + if (OUI_Subtype == OUI_SUBTYPE_QOS_CAPABI) { szQoSOUI[0] = 46; szQoSOUI[1] = (u1Byte)element->Length; FillOctetString(tmp, szQoSOUI, 2); - PacketAppendData(packet, tmp); - } + PacketAppendData(packet, tmp); + } else { szQoSOUI[1] = element->Length + 6; szQoSOUI[6] = OUI_Subtype; FillOctetString(tmp, szQoSOUI, 8); PacketAppendData(packet, tmp); - } + } // QoS Capability IE PacketAppendData(packet, *element); @@ -43,7 +43,7 @@ SelectSupportedRatesElement( IN BOOLEAN bFilterCck, OUT POCTET_STRING pSuppRates, OUT POCTET_STRING pExtSuppRates -) +) { OCTET_STRING FilteredSuppRates; u1Byte FilteredSuppRatesBuf[MAX_NUM_RATES]; @@ -73,7 +73,7 @@ SelectSupportedRatesElement( PlatformMoveMemory(FilteredSuppRates.Octet, SuppRates.Octet, SuppRates.Length); FilteredSuppRates.Length = SuppRates.Length; } - + pSuppRates->Length = 0; pExtSuppRates->Length = 0; @@ -88,7 +88,7 @@ SelectSupportedRatesElement( } else if(wirelessmode & (WIRELESS_MODE_G|WIRELESS_MODE_N_24G|WIRELESS_MODE_AC_24G)) { - u4Byte i; + u4Byte i; for(i = 0; i < FilteredSuppRates.Length; i++) { @@ -125,10 +125,10 @@ SelectSupportedRatesElement( SupRateAddLen = MAX_SUP_RATE_LEN - pSuppRates->Length; NewLen_ExtSupRate = pExtSuppRates->Length - SupRateAddLen; - + CopyMem( pSuppRates->Octet+pSuppRates->Length, pExtSuppRates->Octet, SupRateAddLen); pSuppRates->Length = MAX_SUP_RATE_LEN; - + CopyMem( TmpRateBuffer, pExtSuppRates->Octet+SupRateAddLen, NewLen_ExtSupRate); CopyMem(pExtSuppRates->Octet, TmpRateBuffer, NewLen_ExtSupRate); pExtSuppRates->Length = NewLen_ExtSupRate; @@ -139,9 +139,9 @@ SelectSupportedRatesElement( } else { - RT_ASSERT(FALSE, ("SelectSupportedRatesElement(): Unknown wirelessmode: 0x%x\n", wirelessmode)); + RT_ASSERT(FALSE, ("SelectSupportedRatesElement(): Unknown wirelessmode: 0x%x\n", wirelessmode)); } -#else +#else switch( wirelessmode ) { case WIRELESS_MODE_A: @@ -161,7 +161,7 @@ SelectSupportedRatesElement( case WIRELESS_MODE_N_24G: //Added by Emily 2006.11.10 case WIRELESS_MODE_AC_24G: { - u4Byte i; + u4Byte i; for(i = 0; i < FilteredSuppRates.Length; i++) { @@ -198,10 +198,10 @@ SelectSupportedRatesElement( SupRateAddLen = MAX_SUP_RATE_LEN - pSuppRates->Length; NewLen_ExtSupRate = pExtSuppRates->Length - SupRateAddLen; - + CopyMem( pSuppRates->Octet+pSuppRates->Length, pExtSuppRates->Octet, SupRateAddLen); pSuppRates->Length = MAX_SUP_RATE_LEN; - + CopyMem( TmpRateBuffer, pExtSuppRates->Octet+SupRateAddLen, NewLen_ExtSupRate); CopyMem(pExtSuppRates->Octet, TmpRateBuffer, NewLen_ExtSupRate); pExtSuppRates->Length = NewLen_ExtSupRate; @@ -211,29 +211,29 @@ SelectSupportedRatesElement( RT_PRINT_DATA(COMP_SEC, DBG_TRACE, "pExtSuppRates", pExtSuppRates->Octet, pExtSuppRates->Length); } break; - + // Note: HT rate is filled in HTCapability Information Element, so the supported MCS rate is not initialized here default: RT_ASSERT(FALSE, ("SelectSupportedRatesElement(): Unknown wirelessmode: 0x%x\n", wirelessmode)); break; } -#endif +#endif } /* - * According to experiment, Realtek AP to STA (based on rtl8190) may achieve best performance - * if both STA and AP set limitation of aggregation size to 32K, that is, set AMPDU density to 2 - * (Ref: IEEE 11n specification). However, if Realtek STA associates to other AP, STA should set - * limitation of aggregation size to 8K, otherwise, performance of traffic stream from STA to AP - * will be much less than the traffic stream from AP to STA if both of the stream runs concurrently + * According to experiment, Realtek AP to STA (based on rtl8190) may achieve best performance + * if both STA and AP set limitation of aggregation size to 32K, that is, set AMPDU density to 2 + * (Ref: IEEE 11n specification). However, if Realtek STA associates to other AP, STA should set + * limitation of aggregation size to 8K, otherwise, performance of traffic stream from STA to AP + * will be much less than the traffic stream from AP to STA if both of the stream runs concurrently * at the same time. - * + * * Frame Format * Element ID Length OUI Type1 Reserved * 1 byte 1 byte 3 bytes 1 byte 1 byte - * + * * OUI = 0x00, 0xe0, 0x4c, * Type = 0x02 * Reserved = 0x00 @@ -248,7 +248,7 @@ ConstructRTKAggElement( { BOOLEAN bSupportRemoteWakeUp; PlatformZeroMemory(posRTKAggIE->Octet, 7); - + posRTKAggIE->Octet[0] = 0x00; posRTKAggIE->Octet[1] = 0xe0; posRTKAggIE->Octet[2] = 0x4c; @@ -260,12 +260,12 @@ ConstructRTKAggElement( if(IS_VENDOR_8812A_C_CUT(Adapter)) posRTKAggIE->Octet[6] |= RT_HT_CAP_USE_JAGUAR_CCUT; - + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); if(bSupportRemoteWakeUp) posRTKAggIE->Octet[5] |=RT_HT_CAP_USE_WOW; - + posRTKAggIE->Length = 7; } @@ -276,7 +276,7 @@ ConstructBeaconFrame( PADAPTER Adapter ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; OCTET_STRING DSParms; OCTET_STRING IBSSParms; u8Byte TimeStamp; @@ -291,7 +291,7 @@ ConstructBeaconFrame( u1Byte EDCAInfo[1]; OCTET_STRING IbssAdditionalIEs; BOOLEAN bFilterCck = FALSE; - + pbcn = pMgntInfo->beaconframe.Octet; //------------------------------------------------------------------------- @@ -311,9 +311,9 @@ ConstructBeaconFrame( // // Sequence Control. - // - // TODO: - // 1. If the beacon is send by TransmitTcb, Seq shall be 0, otherwise, we shall fill it with + // + // TODO: + // 1. If the beacon is send by TransmitTcb, Seq shall be 0, otherwise, we shall fill it with // proper value. // 2. We shall fix SendBeaconFrame to allow PCI use TransmitTCB to send beacon. // @@ -374,14 +374,14 @@ ConstructBeaconFrame( // Supported rate. FillOctetString(SuppRates, SuppRatesContent, 0); FillOctetString(ExtSuppRates, ExtSuppRatesContent, 0); - // Set supported and extended supported rate according to Wirelessmode and dot11OperationalRateSet. + // Set supported and extended supported rate according to Wirelessmode and dot11OperationalRateSet. P2P_FilerCck(Adapter, &bFilterCck); SelectSupportedRatesElement( pMgntInfo->dot11CurrentWirelessMode, pMgntInfo->dot11OperationalRateSet, bFilterCck,&SuppRates, &ExtSuppRates ); PacketMakeElement(&pMgntInfo->beaconframe, EID_SupRates, SuppRates); - + // DS parameters element. // Note: // We should have changed the dot11CurrentChannelNumber before constructing beacon frame no matter when the media is connected. @@ -406,7 +406,7 @@ ConstructBeaconFrame( // Update DTIM Count. if(pMgntInfo->mDtimCount == 0) pMgntInfo->mDtimCount = pMgntInfo->dot11DtimPeriod - 1; - else + else pMgntInfo->mDtimCount--; AP_PS_FillTim(pMgntInfo); @@ -415,7 +415,7 @@ ConstructBeaconFrame( } DFS_ApConstructBeaconIEcsa(Adapter); - + // Wireless mode dependent elements. if( IS_WIRELESS_OFDM_24G(Adapter)) { @@ -453,8 +453,8 @@ ConstructBeaconFrame( } } - RT_DISP(FBEACON, BCN_SHOW, - ("Support Mode=%x pMgntInfo->mIbss=%d pMgntInfo->dot11CurrentWirelessMode=%x\n", + RT_DISP(FBEACON, BCN_SHOW, + ("Support Mode=%x pMgntInfo->mIbss=%d pMgntInfo->dot11CurrentWirelessMode=%x\n", Adapter->HalFunc.GetSupportedWirelessModeHandler(Adapter), pMgntInfo->mIbss, pMgntInfo->dot11CurrentWirelessMode)); // @@ -465,7 +465,7 @@ ConstructBeaconFrame( { // Construct HTCapability and HTInfo IE OCTET_STRING osHTCap, osHTInfo; - + FillOctetString(osHTCap, &(pMgntInfo->pHTInfo->SelfHTCap), sizeof(pMgntInfo->pHTInfo->SelfHTCap)); FillOctetString(osHTInfo, &(pMgntInfo->pHTInfo->SelfHTInfo), sizeof(pMgntInfo->pHTInfo->SelfHTInfo)); HTConstructCapabilityElement(Adapter, &osHTCap, FALSE); @@ -498,7 +498,7 @@ ConstructBeaconFrame( PacketMakeElement(&pMgntInfo->beaconframe, EID_VHTOperation, osVHTOperation); } - + //2004/07/22, kcwu, construct Security IE //2004/09/15, kcwu, decide to construct which kind of element,WPA or WPA2 if(pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch) @@ -517,14 +517,14 @@ ConstructBeaconFrame( AppendAdditionalIEs(&pMgntInfo->beaconframe, IbssAdditionalIEs); } - if(pMgntInfo->pStaQos->QosCapability != QOS_DISABLE) + if(pMgntInfo->pStaQos->QosCapability != QOS_DISABLE) { FillOctetString(osEDCAInfoElem, EDCAInfo, 1); - PlatformZeroMemory(osEDCAInfoElem.Octet, 1); + PlatformZeroMemory(osEDCAInfoElem.Octet, 1); AppendQoSElement(&pMgntInfo->beaconframe, &osEDCAInfoElem, OUI_SUBTYPE_WMM_INFO); } } - + // // Append additional IEs. By haich, 2008.08.01. // @@ -548,18 +548,18 @@ ConstructBeaconFrame( WPS_ConstructBeaconFrame(Adapter); - + #if (P2P_SUPPORT == 1) P2P_Append_BeaconIe(Adapter); #endif WFD_AppendBeaconIEs(Adapter, pMgntInfo->BcnSharedMemory.Length, &(pMgntInfo->beaconframe)); - + } // -// Description: Construct a beacon frame according to current status and +// Description: Construct a beacon frame according to current status and // update the beacon to HW beacon queue. // 2005.06.15, by rcnjko. // @@ -582,7 +582,7 @@ Isdot11acAvailable( { u4Byte Availabledot11acCountry[] = {0x818, 0x368, 0x398, 0x417, 0x516, 0x643, 0x804, 0x360}; u1Byte index, result; - + result = TRUE; // RT_TRACE(COMP_INIT, DBG_LOUD, ("$$$ Isdot11acAvailable(): Adapter->bDisable11ac = %d\n", Adapter->bDisable11ac)); if(Adapter->bDisable11ac) @@ -612,7 +612,7 @@ ConstructProbeRequest( BOOLEAN bForcePowerSave ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; OCTET_STRING os; OCTET_STRING ProbeReq; pu1Byte pProbeRequestPartial; @@ -622,7 +622,7 @@ ConstructProbeRequest( u1Byte ExtSuppRatesContent[255]; // NOTE! Length of Support Rates <= 255. u1Byte RegSuppRatesIdx=0; WIRELESS_MODE wirelessmode = WIRELESS_MODE_UNKNOWN; - + pProbeRequestPartial = Buffer; SET_80211_HDR_FRAME_CONTROL(pProbeRequestPartial, 0); @@ -630,7 +630,7 @@ ConstructProbeRequest( SET_80211_HDR_PWR_MGNT(pProbeRequestPartial, (bForcePowerSave) ? 1 : 0); SET_80211_HDR_DURATION(pProbeRequestPartial, 0); SET_80211_HDR_ADDRESS1(pProbeRequestPartial, BroadcastAddress); - SET_80211_HDR_ADDRESS2(pProbeRequestPartial, Adapter->CurrentAddress); + SET_80211_HDR_ADDRESS2(pProbeRequestPartial, Adapter->CurrentAddress); if(bBroadcastBssid) { SET_80211_HDR_ADDRESS3(pProbeRequestPartial, BroadcastAddress); @@ -639,7 +639,7 @@ ConstructProbeRequest( { SET_80211_HDR_ADDRESS3(pProbeRequestPartial, Adapter->MgntInfo.Bssid); } - + SET_80211_HDR_FRAGMENT_SEQUENCE(pProbeRequestPartial, 0); //3 Size of Probe Request, can not use sizeof(GeneralPacketPartial) @@ -659,11 +659,11 @@ ConstructProbeRequest( // Supported rates FillOctetString(SuppRates, SuppRatesContent, 0); FillOctetString(ExtSuppRates, ExtSuppRatesContent, 0); - + // // Basic rate setting should follow default setting in registry // instead of CurrentWirelessMode. Otherwise, previous connection may effect on - // later connection. Neo, 2011/11/9 + // later connection. Neo, 2011/11/9 // 2011/03/17 MH For 92D, we need to change RegWirelessMode when dual mac contrl algorithm // want to switch between 2.4G & 5G. @@ -690,7 +690,7 @@ ConstructProbeRequest( wirelessmode = WIRELESS_MODE_AC_5G; else wirelessmode = WIRELESS_MODE_N_5G; - + if (Adapter->RegWirelessMode == WIRELESS_MODE_AC_5G) wirelessmode = WIRELESS_MODE_AC_5G; else if (Adapter->RegWirelessMode == WIRELESS_MODE_N_5G) @@ -698,10 +698,10 @@ ConstructProbeRequest( else if (Adapter->RegWirelessMode == WIRELESS_MODE_A) wirelessmode = WIRELESS_MODE_A; } -#if 0 +#if 0 if(!Isdot11acAvailable(Adapter)) { - if(wirelessmode == WIRELESS_MODE_AC_5G) + if(wirelessmode == WIRELESS_MODE_AC_5G) { wirelessmode = WIRELESS_MODE_N_5G; } @@ -727,7 +727,7 @@ ConstructProbeRequest( // Simple config IE. by CCW - copy from 818x // if(GET_SIMPLE_CONFIG_ENABLED(pMgntInfo)) - { + { WPS_AppendElement(Adapter, &ProbeReq, TRUE, WPS_INFO_PROBEREQ_IE); } @@ -735,7 +735,7 @@ ConstructProbeRequest( // For CCXv4 S59.2.3 // CCX_RM_AppendRmCapIE(Adapter, &ProbeReq); - + //merge from 1020 to pass WHCK Scan_AdditionalIE if( pMgntInfo->AdditionalProbeReqIESize > 0&& @@ -745,7 +745,7 @@ ConstructProbeRequest( OCTET_STRING osAdditionalIEs; osAdditionalIEs.Length = (u2Byte)pMgntInfo->AdditionalProbeReqIESize; osAdditionalIEs.Octet = (pu1Byte)pMgntInfo->AdditionalProbeReqIEData; - + AppendAdditionalIEs(&ProbeReq, osAdditionalIEs); } @@ -769,7 +769,7 @@ ConstructProbeRequest( OCTET_STRING osAdditionalIEs; osAdditionalIEs.Length = (u2Byte)pMgntInfo->AdditionalProbeReqIESize; osAdditionalIEs.Octet = (pu1Byte)pMgntInfo->AdditionalProbeReqIEData; - + AppendAdditionalIEs(&ProbeReq, osAdditionalIEs); } @@ -788,7 +788,7 @@ ConstructProbeRequest( // Append WFD Probe request IEs WFD_AppendProbeReqIEs(Adapter, Adapter->MAX_TRANSMIT_BUFFER_SIZE, &ProbeReq); - + *pLength=ProbeReq.Length; } @@ -817,7 +817,7 @@ ConstructProbeRequestEx( OCTET_STRING os; u1Byte RegSuppRatesIdx=0; WIRELESS_MODE wirelessmode = WIRELESS_MODE_UNKNOWN; - + pProbeRequestPartial = Buffer; SET_80211_HDR_FRAME_CONTROL(pProbeRequestPartial, 0); @@ -827,7 +827,7 @@ ConstructProbeRequestEx( SET_80211_HDR_ADDRESS1(pProbeRequestPartial, BroadcastAddress); SET_80211_HDR_ADDRESS2(pProbeRequestPartial, Adapter->CurrentAddress); SET_80211_HDR_ADDRESS3(pProbeRequestPartial, BroadcastAddress); - + SET_80211_HDR_FRAGMENT_SEQUENCE(pProbeRequestPartial, 0); //3 Size of Probe Request, can not use sizeof(GeneralPacketPartial) @@ -844,7 +844,7 @@ ConstructProbeRequestEx( // // Basic rate setting should follow default setting in registry // instead of CurrentWirelessMode. Otherwise, previous connection may effect on - // later connection. Neo, 2011/11/9 + // later connection. Neo, 2011/11/9 // 2011/03/17 MH For 92D, we need to change RegWirelessMode when dual mac contrl algorithm // want to switch between 2.4G & 5G. @@ -871,7 +871,7 @@ ConstructProbeRequestEx( wirelessmode = WIRELESS_MODE_AC_5G; else wirelessmode = WIRELESS_MODE_N_5G; - + if (Adapter->RegWirelessMode == WIRELESS_MODE_AC_5G) wirelessmode = WIRELESS_MODE_AC_5G; else if (Adapter->RegWirelessMode == WIRELESS_MODE_N_5G) @@ -910,11 +910,11 @@ ConstructProbeRequestEx( #if P2P_SUPPORT == 1 // Solution for service discovery. P2P_Append_ProbeReqIe(&ProbeReq, GET_P2P_INFO(Adapter)); -#endif +#endif // Append WFD Probe request IEs WFD_AppendProbeReqIEs(Adapter, Adapter->MAX_TRANSMIT_BUFFER_SIZE, &ProbeReq); - + if((Adapter->HalFunc.GetSupportedWirelessModeHandler(Adapter) & WIRELESS_MODE_AC_5G) && (Adapter->RegWirelessMode ==WIRELESS_MODE_AUTO || Adapter->RegWirelessMode == WIRELESS_MODE_AC_5G)) { @@ -922,7 +922,7 @@ ConstructProbeRequestEx( VHTConstructCapabilityElement(Adapter, &os, FALSE); PacketMakeElement(&ProbeReq, EID_VHTCapability, os); } - + *pLength=ProbeReq.Length; } @@ -948,7 +948,7 @@ ConstructAuthenticatePacket( SET_80211_HDR_FRAME_CONTROL(osAuthPkt.Octet, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(osAuthPkt.Octet, Type_Auth); SET_80211_HDR_DURATION(osAuthPkt.Octet, 0); - + SET_80211_HDR_ADDRESS1(osAuthPkt.Octet, auStaAddr); SET_80211_HDR_ADDRESS2(osAuthPkt.Octet, Adapter->CurrentAddress); SET_80211_HDR_ADDRESS3(osAuthPkt.Octet, Adapter->MgntInfo.Bssid); @@ -956,7 +956,7 @@ ConstructAuthenticatePacket( if(AuthSeq != 3) { - //add for CCX NETWORK EAP (LEAP) 2006.07.31 ,by CCW + //add for CCX NETWORK EAP (LEAP) 2006.07.31 ,by CCW if( !Adapter->MgntInfo.bNETWORKEAP) SET_AUTH_FRAME_AUTH_ALG_NUM(osAuthPkt.Octet, AuthAlg); // Auth Algorithm: Open system else @@ -977,7 +977,7 @@ ConstructAuthenticatePacket( else if(1 == AuthSeq) { //4 // RSN IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_AppendRSNIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -991,7 +991,7 @@ ConstructAuthenticatePacket( } //4 // Fast Transition MD IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = FT_AppendMdIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1005,7 +1005,7 @@ ConstructAuthenticatePacket( } //4 // Fast Transition FT IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = FT_AppendFtIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1024,11 +1024,11 @@ ConstructAuthenticatePacket( // Set WEP bit, see also MgntGetEncryptionInfo(), 2005.08.18, by rcnjko. SET_80211_HDR_WEP(osAuthPkt.Octet, 1); - // Auth Alg Num. + // Auth Alg Num. *((UNALIGNED pu2Byte)(osAuthPkt.Octet+28)) = EF2Byte(AuthAlg); // 24+4+0, 802.11 Header + IV + field offset // Auth Seq Num. *((UNALIGNED pu2Byte)(osAuthPkt.Octet+30)) = EF2Byte(AuthSeq); // 24+4+2 - // Status Code. + // Status Code. *((UNALIGNED pu2Byte)(osAuthPkt.Octet+32)) = EF2Byte(AuthStatusCode); // 24+4+4 osAuthPkt.Length = 34; // 24+4+6 @@ -1095,7 +1095,7 @@ ConstructAssociateReq( u1Byte ExtSuppRatesContent[255]; // NOTE! Length of Extended Support Rates <= 255. BOOLEAN bFilterCck = FALSE; RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("===> ConstructAssociateReq()\n")); @@ -1105,7 +1105,7 @@ ConstructAssociateReq( // if (CCX_Construct_DiagChnl_AssocReq(Adapter, Buffer, pLength)) return; - + pAsocPartial = Buffer; SET_80211_HDR_FRAME_CONTROL(pAsocPartial, 0); @@ -1155,7 +1155,7 @@ ConstructAssociateReq( else { //4 // WPA IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_AppendWPAIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1169,7 +1169,7 @@ ConstructAssociateReq( } //4 // RSN IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_AppendRSNIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1183,7 +1183,7 @@ ConstructAssociateReq( } //4 // Fast Transition MD IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = FT_AppendMdIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1198,9 +1198,9 @@ ConstructAssociateReq( } } } - + DFS_StaConstructAssociateReq(Adapter, asocCap, AsocReq); - + if( pMgntInfo->pStaQos->CurrentQosMode > QOS_DISABLE ) { PacketMakeElement( &AsocReq, EID_Vendor, pMgntInfo->pStaQos->WMMIE ); @@ -1214,7 +1214,7 @@ ConstructAssociateReq( // For CCX 2 S36, Radio Management Capability element, 2006.05.15, by rcnjko. CCX_RM_AppendRmCapIE(Adapter, &AsocReq); - + // For CCX 2 S38, WLAN Device Version Number element. CCX_AppendCcxVerIE(Adapter, &AsocReq); @@ -1223,9 +1223,9 @@ ConstructAssociateReq( // Include High Throuput capability if( pMgntInfo->pHTInfo->bCurrentHTSupport ) - { + { // Construct HTCapability and HTInfo IE - OCTET_STRING osHTCap; + OCTET_STRING osHTCap; RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): Trying to associate to an 802.11n HT AP\n")); FillOctetString(osHTCap, &(pMgntInfo->pHTInfo->SelfHTCap), sizeof(pMgntInfo->pHTInfo->SelfHTCap)); HTConstructCapabilityElement(Adapter, &osHTCap, TRUE); @@ -1234,17 +1234,17 @@ ConstructAssociateReq( else PacketMakeElement(&AsocReq, EID_HTCapability, osHTCap); - BSS_AppendExentedCapElement(Adapter, &AsocReq); + BSS_AppendExentedCapElement(Adapter, &AsocReq); } if(pMgntInfo->pVHTInfo->bCurrentVHTSupport ) - { - OCTET_STRING osVHTCap; + { + OCTET_STRING osVHTCap; u1Byte opmode = 0; OCTET_STRING osVHTNotif; CHANNEL_WIDTH opNotifBW = CHNL_GetRegBWSupport(Adapter); u1Byte opNotifNss = pMgntInfo->pVHTInfo->nRxSPStream; - + RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): Trying to associate to an 802.11ac VHT AP\n")); FillOctetString(osVHTCap, &(pMgntInfo->pVHTInfo->SelfVHTCap), sizeof(pMgntInfo->pVHTInfo->SelfVHTCap)); VHTConstructCapabilityElement(Adapter, &osVHTCap, TRUE); @@ -1256,7 +1256,7 @@ ConstructAssociateReq( DbgPrint("pMgntInfo->pVHTInfo->bOpModeNotif = TRYE BW = %d\n", opNotifBW); opNotifNss = pMgntInfo->pVHTInfo->RxSSToSwitch; } - + RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): carry operating mode notification with BW(%d) RxSS(%d)\n", opNotifBW, opNotifNss)); FillOctetString(osVHTNotif, &opmode, sizeof(opmode)); SET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(&opmode, opNotifBW); @@ -1265,12 +1265,12 @@ ConstructAssociateReq( PacketMakeElement(&AsocReq, EID_OpModeNotification, osVHTNotif); } - + // For WiFi VHT Testbed, it requires special feature: VHT under TKIP & WEP mode if(pMgntInfo->VhtWeakSecurity > 0) { OCTET_STRING osHTCap; - OCTET_STRING osVHTCap; + OCTET_STRING osVHTCap; WIRELESS_MODE wirelessModeBackup = pMgntInfo->dot11CurrentWirelessMode; RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): Trying to associate to an 802.11n HT AP\n")); @@ -1281,7 +1281,7 @@ ConstructAssociateReq( pMgntInfo->dot11CurrentWirelessMode = WIRELESS_MODE_AC_5G; MgntRefreshSuppRateSet(Adapter); pMgntInfo->dot11CurrentWirelessMode = wirelessModeBackup; - + // HT IE HTConstructCapabilityElement(Adapter, &osHTCap, TRUE); PacketMakeElement(&AsocReq, EID_HTCapability, osHTCap); @@ -1289,12 +1289,12 @@ ConstructAssociateReq( VHTConstructCapabilityElement(Adapter, &osVHTCap, TRUE); PacketMakeElement(&AsocReq, EID_VHTCapability, osVHTCap); } - - // Construct Realtek Proprietary Aggregation mode (Set AMPDU Factor to 2, 32k) + + // Construct Realtek Proprietary Aggregation mode (Set AMPDU Factor to 2, 32k) //2008.08.13 If connect to realtek ap, append realtek OUI for WOW if(pMgntInfo->bRealtekAggCapExist) { - OCTET_STRING osRealtekIEType2; + OCTET_STRING osRealtekIEType2; FillOctetString(osRealtekIEType2, pMgntInfo->RTIEType2Buffer, sizeof(pMgntInfo->RTIEType2Buffer)); ConstructRTKAggElement(Adapter, &osRealtekIEType2); PacketMakeElement(&AsocReq, EID_Vendor, osRealtekIEType2); @@ -1307,7 +1307,7 @@ ConstructAssociateReq( { WPS_AppendElement(Adapter, &AsocReq, FALSE, WPS_INFO_ASOCREQ_IE); } - + // // CCX4 CAC -- TSPEC IE, 2006.06.26, by shien chang. // @@ -1349,14 +1349,14 @@ ConstructAssociateReq( osCustomizedIE.Octet = &pMgntInfo->CustomizedAsocIEBuf[0]; AppendAdditionalIEs(&AsocReq, osCustomizedIE); } -#endif - +#endif + // // Append additional IEs. By haich, 2008.11.27. // - RT_PRINT_DATA(COMP_OID_SET | COMP_MLME, DBG_LOUD, "ConstructAssociateReq(): append AssocReqIE", + RT_PRINT_DATA(COMP_OID_SET | COMP_MLME, DBG_LOUD, "ConstructAssociateReq(): append AssocReqIE", pMgntInfo->AdditionalAssocReqIEData, pMgntInfo->AdditionalAssocReqIESize); - + if(pMgntInfo->AdditionalAssocReqIESize > 0&& pMgntInfo->AdditionalAssocReqIEData != NULL && AsocReq.Length + pMgntInfo->AdditionalAssocReqIESize <= sMaxMpduLng) @@ -1364,7 +1364,7 @@ ConstructAssociateReq( OCTET_STRING osAdditionalIEs; osAdditionalIEs.Length = (u2Byte)pMgntInfo->AdditionalAssocReqIESize; osAdditionalIEs.Octet = (pu1Byte)pMgntInfo->AdditionalAssocReqIEData; - + AppendAdditionalIEs(&AsocReq, osAdditionalIEs); } @@ -1372,9 +1372,9 @@ ConstructAssociateReq( #if (P2P_SUPPORT == 1) P2P_Append_AssociationReqIe(&AsocReq, Adapter); #endif - + WFD_AppendAssocReqIEs(Adapter, Adapter->MAX_TRANSMIT_BUFFER_SIZE, &AsocReq); - + *pLength=AsocReq.Length; RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== ConstructAssociateReq()\n")); @@ -1393,7 +1393,7 @@ ConstructReAssociateReq( OCTET_STRING ReasocSuppRates ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; OCTET_STRING ReAsocReq; pu1Byte pReAsocPartial; OCTET_STRING SuppRates; @@ -1405,7 +1405,7 @@ ConstructReAssociateReq( RT_STATUS rtStatus = RT_STATUS_SUCCESS; RT_TRACE(COMP_MLME, DBG_LOUD, ("===> ConstructReAssociateReq()\n")); - + pReAsocPartial = Buffer; //Init CCKM IE CCKMIE.Octet = CCKMIEBuff; @@ -1445,7 +1445,7 @@ ConstructReAssociateReq( } if(!GET_SIMPLE_CONFIG_ENABLED(pMgntInfo)) - { + { // RSNIE. 2004/07/22, kcwu. if(pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch) { @@ -1458,7 +1458,7 @@ ConstructReAssociateReq( else if(pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch) { //4 // WPA IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_AppendWPAIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1472,7 +1472,7 @@ ConstructReAssociateReq( } //4 // RSN IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_AppendRSNIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1486,7 +1486,7 @@ ConstructReAssociateReq( } //4 // Fast Transition MD IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = FT_AppendMdIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1500,7 +1500,7 @@ ConstructReAssociateReq( } //4 // Fast Transition FT IE - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = FT_AppendFtIE( Adapter, // Adapter context (CONTENT_PKT_TYPE_802_11 | CONTENT_PKT_TYPE_CLIENT), // content type @@ -1530,7 +1530,7 @@ ConstructReAssociateReq( // For CCX 2 S36, Radio Management Capability element, 2006.05.15, by rcnjko. CCX_RM_AppendRmCapIE(Adapter, &ReAsocReq); - + // For CCX 2 S38, WLAN Device Version Number element. CCX_AppendCcxVerIE(Adapter, &ReAsocReq); @@ -1539,15 +1539,15 @@ ConstructReAssociateReq( // CCKM Fast Roam , by CCW CCX_ConstructReAssociateReq(Adapter, &ReAsocReq); - + // Include High Throuput capability && Realtek proprietary if( pMgntInfo->pHTInfo->bCurrentHTSupport ) - { + { // // Construct HTCapability and HTInfo IE - // - OCTET_STRING osHTCap; + // + OCTET_STRING osHTCap; RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): Trying to associate to an 802.11n HT AP\n")); FillOctetString(osHTCap, &(pMgntInfo->pHTInfo->SelfHTCap), sizeof(pMgntInfo->pHTInfo->SelfHTCap)); HTConstructCapabilityElement(Adapter, &osHTCap, TRUE); @@ -1558,13 +1558,13 @@ ConstructReAssociateReq( } if( pMgntInfo->pVHTInfo->bCurrentVHTSupport ) - { - OCTET_STRING osVHTCap; + { + OCTET_STRING osVHTCap; u1Byte opmode = 0; OCTET_STRING osVHTNotif; CHANNEL_WIDTH opNotifBW = CHNL_GetRegBWSupport(Adapter); u1Byte opNotifNss = pMgntInfo->pVHTInfo->nRxSPStream; - + RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): Trying to associate to an 802.11ac VHT AP\n")); FillOctetString(osVHTCap, &(pMgntInfo->pVHTInfo->SelfVHTCap), sizeof(pMgntInfo->pVHTInfo->SelfVHTCap)); VHTConstructCapabilityElement(Adapter, &osVHTCap, TRUE); @@ -1576,7 +1576,7 @@ ConstructReAssociateReq( DbgPrint("pMgntInfo->pVHTInfo->bOpModeNotif = TRYE BW = %d 222\n", opNotifBW); opNotifNss = pMgntInfo->pVHTInfo->RxSSToSwitch; } - + RT_TRACE(COMP_HT, DBG_LOUD, ("ConstructAssociateReq(): carry operating mode notification with BW(%d) RxSS(%d)\n", opNotifBW, opNotifNss)); FillOctetString(osVHTNotif, &opmode, sizeof(opmode)); SET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(&opmode, opNotifBW); @@ -1592,13 +1592,13 @@ ConstructReAssociateReq( //2008.08.13 If connect to realtek ap, append realtek OUI for WOW if(pMgntInfo->bRealtekAggCapExist) { - OCTET_STRING osRealtekIEType2; + OCTET_STRING osRealtekIEType2; FillOctetString(osRealtekIEType2, pMgntInfo->RTIEType2Buffer, sizeof(pMgntInfo->RTIEType2Buffer)); ConstructRTKAggElement(Adapter, &osRealtekIEType2); PacketMakeElement(&ReAsocReq, EID_Vendor, osRealtekIEType2); } - + // // Simple config IE. by CCW - copy from 818x // @@ -1617,12 +1617,12 @@ ConstructReAssociateReq( PQOS_TSTREAM pTs = NULL; PSTA_QOS pStaQos = pMgntInfo->pStaQos; u1Byte tidVoice = 0; - RT_DISP( FCCX, CCX_CAC, ( "VoTs exists, append Voice TSPEC Signal TSPEC in Reassoc Req\n" ) ); - + RT_DISP( FCCX, CCX_CAC, ( "VoTs exists, append Voice TSPEC Signal TSPEC in Reassoc Req\n" ) ); + CCX_CAC_ConstructVoiceTspec(Adapter, tsVoice); FillOctetString(VoiceEle, &tsVoice[2], TSPEC_SIZE - 2); PacketMakeElement( &ReAsocReq, EID_Vendor, VoiceEle ); - + CCX_CAC_ConstructSignalTspec(Adapter, tsSignal); FillOctetString(SignalEle, &tsSignal[2], TSPEC_SIZE - 2); PacketMakeElement( &ReAsocReq, EID_Vendor, SignalEle ); @@ -1632,7 +1632,7 @@ ConstructReAssociateReq( if (QOS_RATE_TO_BPS( QosGetNPR(Adapter, pTs) ) >= GET_TSPEC_MIN_PHY_RATE(pTs->OutStandingTSpec) ) { - RT_DISP( FCCX, CCX_CAC, ( "Append TSRS in Reassoc Req\n" ) ); + RT_DISP( FCCX, CCX_CAC, ( "Append TSRS in Reassoc Req\n" ) ); QosConstructTSRS(Adapter, pTs, &ReAsocReq); } } @@ -1640,7 +1640,7 @@ ConstructReAssociateReq( #if (P2P_SUPPORT == 1) P2P_Append_AssociationReqIe(&ReAsocReq, Adapter); #endif - + WFD_AppendAssocReqIEs(Adapter, Adapter->MAX_TRANSMIT_BUFFER_SIZE, &ReAsocReq); WriteEF4Byte(pLength, ReAsocReq.Length); @@ -1760,17 +1760,17 @@ ConstructAssociateRsp( } if(ACTING_AS_AP(Adapter)) - { + { // // Append IE for AsocRsp from OS. // - PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, asocStaAddr); + PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, asocStaAddr); if(pEntry) { OCTET_STRING asocReqIe = {NULL, 0}; OCTET_STRING wpsIe = {NULL, 0}; - + if(pEntry->AP_AsocRspIEFromOSLength > 0&& pEntry->AP_AsocRspIEFromOS != NULL && AsocRsp.Length + pEntry->AP_AsocRspIEFromOSLength <= sMaxMpduLng) @@ -1827,7 +1827,7 @@ ConstructDeauthenticatePacket( SET_80211_HDR_ADDRESS2(pdeauth, Adapter->CurrentAddress); SET_80211_HDR_ADDRESS3(pdeauth, Adapter->MgntInfo.Bssid); SET_80211_HDR_FRAGMENT_SEQUENCE(pdeauth, 0); - + // Size of this Frame until last fixed size field. Deauth.Octet = Buffer; Deauth.Length = sMacHdrLng; @@ -1836,29 +1836,29 @@ ConstructDeauthenticatePacket( // Security Header: leave space for it if necessary. //------------------------------------------------------------------------- CCX_ConstructDeauthenticatePacket(Adapter, pdeauth, &Deauth); - + if( pMgntInfo->bInBIPMFPMode ) { if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_AESCCMP && // Now we just support AES MFP !! !(MacAddr_isBcst(auSta) )) { // Set WEP bit !! - SET_80211_HDR_WEP( pdeauth , 1 ); + SET_80211_HDR_WEP( pdeauth , 1 ); if(pSecInfo->EncryptionHeadOverhead > 0) { PlatformZeroMemory( ( Deauth.Octet+ Deauth.Length ) , pSecInfo->EncryptionHeadOverhead); Deauth.Length += pSecInfo->EncryptionHeadOverhead; - } + } } } - + // Add reason code WriteEF2Byte( ( Deauth.Octet+ Deauth.Length ) , asRsn ); Deauth.Length += 2; // - // if need, Append MHDRIE + // if need, Append MHDRIE // CCX_AppendMHDRIE( Adapter, &Deauth ); @@ -1897,7 +1897,7 @@ ConstructDisassociatePacket( SET_80211_HDR_ADDRESS2(pdisassoc, Adapter->CurrentAddress); SET_80211_HDR_ADDRESS3(pdisassoc, Adapter->MgntInfo.Bssid); SET_80211_HDR_FRAGMENT_SEQUENCE(pdisassoc, 0); - + // Size of this Frame until last fixed size field. Disas.Octet = Buffer; Disas.Length = sMacHdrLng; @@ -1905,7 +1905,7 @@ ConstructDisassociatePacket( //------------------------------------------------------------------------- // Security Header: leave space for it if necessary. //------------------------------------------------------------------------- - CCX_ConstructDisassociatePacket(Adapter, pdisassoc, &Disas); + CCX_ConstructDisassociatePacket(Adapter, pdisassoc, &Disas); if( pMgntInfo->bInBIPMFPMode ) { @@ -1913,16 +1913,16 @@ ConstructDisassociatePacket( !(MacAddr_isBcst(asSta) )) { // Set WEP bit !! - SET_80211_HDR_WEP( pdisassoc , 1 ); + SET_80211_HDR_WEP( pdisassoc , 1 ); if(pSecInfo->EncryptionHeadOverhead > 0) { PlatformZeroMemory( ( Disas.Octet+ Disas.Length ) , pSecInfo->EncryptionHeadOverhead); Disas.Length += pSecInfo->EncryptionHeadOverhead; - } + } } - - + + } // Add reason code @@ -1930,7 +1930,7 @@ ConstructDisassociatePacket( Disas.Length += 2; // - // if need, Append MHDRIE + // if need, Append MHDRIE // CCX_AppendMHDRIE( Adapter, &Disas ); @@ -1943,7 +1943,7 @@ ConstructDisassociatePacket( } // -// Description: +// Description: // Construct a Probe Response packet. // Arguments: // [in] Adapter - @@ -1994,16 +1994,16 @@ ConstructProbeRsp( u1Byte ExtSuppRatesContent[255]; // NOTE! Length of Extended Support Rates <= 255. OCTET_STRING ERPInfo; u1Byte ERPInfoContent[1]; - + OCTET_STRING IbssAdditionalIEs; OCTET_STRING osEDCAInfoElem; u1Byte EDCAInfo[1]; - BOOLEAN bFilterCck = FALSE; + BOOLEAN bFilterCck = FALSE; PMGNT_INFO pDefaultMgntInfo; - + pMgntInfo = &Adapter->MgntInfo; pProbeRsp = Buffer; - + //------------------------------------------------------------------------- // MAC Header. //------------------------------------------------------------------------- @@ -2019,7 +2019,7 @@ ConstructProbeRsp( // Sequence Control. SET_80211_HDR_FRAGMENT_SEQUENCE(pProbeRsp, 0); - + //------------------------------------------------------------------------- // Frame Body. @@ -2036,11 +2036,11 @@ ConstructProbeRsp( // Capability information. if( ACTING_AS_AP(Adapter) ) { - SET_BEACON_PROBE_RSP_CAPABILITY_INFO(pProbeRsp, (pMgntInfo->mCap & ~cIBSS) ); + SET_BEACON_PROBE_RSP_CAPABILITY_INFO(pProbeRsp, (pMgntInfo->mCap & ~cIBSS) ); } else { - SET_BEACON_PROBE_RSP_CAPABILITY_INFO(pProbeRsp, (pMgntInfo->mCap & ~cESS) ); + SET_BEACON_PROBE_RSP_CAPABILITY_INFO(pProbeRsp, (pMgntInfo->mCap & ~cESS) ); } if( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm!= RT_ENC_ALG_NO_CIPHER ) @@ -2075,10 +2075,10 @@ ConstructProbeRsp( P2P_FilerCck(Adapter, &bFilterCck); - // Set supported and extended supported rate according to Wirelessmode and dot11OperationalRateSet. + // Set supported and extended supported rate according to Wirelessmode and dot11OperationalRateSet. SelectSupportedRatesElement( pMgntInfo->dot11CurrentWirelessMode, pMgntInfo->dot11OperationalRateSet, bFilterCck, &SuppRates, &ExtSuppRates ); PacketMakeElement(&ProbeRspFrame, EID_SupRates, SuppRates); - + // DS parameters element. DSParms.Octet = &pMgntInfo->dot11CurrentChannelNumber; DSParms.Length = 1; @@ -2137,10 +2137,10 @@ ConstructProbeRsp( AppendAdditionalIEs(&ProbeRspFrame, IbssAdditionalIEs); } - if(pMgntInfo->pStaQos->QosCapability != QOS_DISABLE) + if(pMgntInfo->pStaQos->QosCapability != QOS_DISABLE) { FillOctetString(osEDCAInfoElem, EDCAInfo, 1); - PlatformZeroMemory(osEDCAInfoElem.Octet, 1); + PlatformZeroMemory(osEDCAInfoElem.Octet, 1); AppendQoSElement(&ProbeRspFrame, &osEDCAInfoElem, OUI_SUBTYPE_WMM_INFO); } } @@ -2171,7 +2171,7 @@ ConstructProbeRsp( if(IS_WIRELESS_MODE_N(Adapter)) { OCTET_STRING osHTCap, osHTInfo; - + FillOctetString(osHTCap, &(pMgntInfo->pHTInfo->SelfHTCap), sizeof(pMgntInfo->pHTInfo->SelfHTCap)); FillOctetString(osHTInfo, &(pMgntInfo->pHTInfo->SelfHTInfo), sizeof(pMgntInfo->pHTInfo->SelfHTInfo)); HTConstructCapabilityElement(Adapter, &osHTCap, FALSE); @@ -2205,9 +2205,9 @@ ConstructProbeRsp( PacketMakeElement(&ProbeRspFrame, EID_VHTCapability, osVHTCap); PacketMakeElement(&ProbeRspFrame, EID_VHTOperation, osVHTOperation); } - + WAPI_SecFuncHandler(WAPI_CONSTRUCTPROBERSP, Adapter, (PVOID)&ProbeRspFrame, WAPI_END); - + // // Simple config IE. by CCW - copy from 818x // @@ -2221,7 +2221,7 @@ ConstructProbeRsp( #if (P2P_SUPPORT == 1) P2P_Append_GoProbeRspIe(&ProbeRspFrame, Adapter, Type_Probe_Rsp, pRfdProbeReq, posProbeReq); #endif - + WFD_AppendProbeRspIEs(Adapter, Adapter->MAX_TRANSMIT_BUFFER_SIZE, &ProbeRspFrame, pRfdProbeReq, posProbeReq); *pLength = ProbeRspFrame.Length; @@ -2241,19 +2241,19 @@ ConstructCustomizedData( { PMGNT_INFO pMgntInfo; pu1Byte pHeader; - + pMgntInfo = &Adapter->MgntInfo; pHeader = Buffer; - + SET_80211_HDR_FRAME_CONTROL(pHeader, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); SET_80211_HDR_PWR_MGNT(pHeader, 0); - + SET_80211_HDR_TO_DS(pHeader, 1); SET_80211_HDR_ADDRESS1(pHeader, pMgntInfo->Bssid); SET_80211_HDR_ADDRESS2(pHeader, Adapter->CurrentAddress); SET_80211_HDR_ADDRESS3(pHeader, pMgntInfo->Bssid); - + SET_80211_HDR_DURATION(pHeader, 0); SET_80211_HDR_FRAGMENT_SEQUENCE(pHeader, 0); @@ -2279,15 +2279,15 @@ ConstructNullFunctionData( { PMGNT_INFO pMgntInfo; pu1Byte pHeader; - + pMgntInfo = &Adapter->MgntInfo; pHeader = Buffer; - - // [APSD] QoS Null Function Data , 2006-06-22, by Isaiah + + // [APSD] QoS Null Function Data , 2006-06-22, by Isaiah SET_80211_HDR_FRAME_CONTROL(pHeader, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, ( (bQoS) ? Type_QosNull: Type_Null_Frame) ); SET_80211_HDR_PWR_MGNT(pHeader, (bForcePowerSave) ? 1 : 0 ); - + switch(pMgntInfo->OpMode) { case RT_OP_MODE_INFRASTRUCTURE: // 1,0 @@ -2338,11 +2338,11 @@ ConstructBtNullFunctionData( { PMGNT_INFO pMgntInfo; pu1Byte pHeader; - + pMgntInfo = &Adapter->MgntInfo; pHeader = Buffer; - - // [APSD] QoS Null Function Data , 2006-06-22, by Isaiah + + // [APSD] QoS Null Function Data , 2006-06-22, by Isaiah SET_80211_HDR_FRAME_CONTROL(pHeader, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, ( (bQoS) ? Type_QosNull: Type_Null_Frame) ); SET_80211_HDR_PWR_MGNT(pHeader, (bForcePowerSave) ? 1 : 0 ); @@ -2439,13 +2439,13 @@ ConstructMagicPacket( PMGNT_INFO pMgntInfo; pu1Byte pHeader; int i; - + pMgntInfo = &Adapter->MgntInfo; pHeader = Buffer; - + SET_80211_HDR_FRAME_CONTROL(pHeader, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); - + switch(pMgntInfo->OpMode) { case RT_OP_MODE_INFRASTRUCTURE: // 1,0 @@ -2462,7 +2462,7 @@ ConstructMagicPacket( case RT_OP_MODE_AP: // 0,1 SET_80211_HDR_FROM_DS(pHeader, 1); - SET_80211_HDR_ADDRESS1(pHeader, StaAddr); + SET_80211_HDR_ADDRESS1(pHeader, StaAddr); // Old: //PlatformMoveMemory( pHeader->Addr2, pMgntInfo->Bssid, 6 ); // BSSID @@ -2520,11 +2520,11 @@ ConstructEapolKeyPacket( KeyType eKeyType, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. BOOLEAN bInstall, // EAPOL-Key Information field: Install Flag. BOOLEAN bKeyAck, // EAPOL-Key Information field: Key Ack bit. - BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. BOOLEAN bSecure, // EAPOL-Key Information field: Secure bit. BOOLEAN bError, // EAPOL-Key Information field: Error bit. True for MIC failure report. BOOLEAN bRequest, // EAPOL-Key Information field: Requst bit. - + u8Byte u8bKeyReplayCounter, // EAPOL-KEY Replay Counter field. pu1Byte pKeyNonce, // EAPOL-Key Key Nonce field (32-byte). u8Byte u8bKeyRSC, // EAPOL-Key Key RSC field (8-byte). @@ -2546,7 +2546,7 @@ ConstructEapolKeyPacket( u2Byte u2bEapolKeyMsgSz = 0; u2Byte u2bEapolKeyDataLen = 0; u1Byte tmpBuf[256]; - OCTET_STRING osKeyNonce; + OCTET_STRING osKeyNonce; OCTET_STRING osEapolKeyIV; OCTET_STRING osKeyRSC; OCTET_STRING osKeyID; @@ -2581,7 +2581,7 @@ ConstructEapolKeyPacket( //------------------------------------------------------------------------- SET_80211_HDR_FRAME_CONTROL(pHeader, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); - + switch(pMgntInfo->OpMode) { case RT_OP_MODE_INFRASTRUCTURE: // 1,0 @@ -2617,7 +2617,7 @@ ConstructEapolKeyPacket( { // EAPOL-Key of Group key handshake will be encrypted via PTK, 2005.07.01, by rcnjko. PlatformFillMemory( &(Buffer[*pLength]), pSecInfo->EncryptionHeadOverhead, 0x00); *pLength += pSecInfo->EncryptionHeadOverhead; - } + } //------------------------------------------------------------------------- // Frame Body. @@ -2639,7 +2639,7 @@ ConstructEapolKeyPacket( pEapol->packet_type = LIB1X_EAPOL_KEY; short2net(u2bEapolKeyMsgSz, ((pu1Byte)&(pEapol->packet_body_length)) ); *pLength += LIB1X_EAPOL_HDRLEN; - + // // 3. EAPOL-Key descriptor. // @@ -2679,7 +2679,7 @@ ConstructEapolKeyPacket( PlatformFillMemory(tmpBuf, KEY_IV_LEN, 0); FillOctetString(osEapolKeyIV, tmpBuf, KEY_IV_LEN); Message_setKeyIV(osEapolKey, osEapolKeyIV); - + // 3.7 Key RSC. FillOctetString(osKeyRSC, &(u8bKeyRSC), sizeof(u8bKeyRSC)); Message_setKeyRSC(osEapolKey, osKeyRSC); @@ -2691,15 +2691,15 @@ ConstructEapolKeyPacket( // 3.9 Key MIC. We will fill it up later if required. Message_clearMIC(osEapolKey); - + // 3.10 Key Data Length. Message_setKeyDataLength(osEapolKey, u2bEapolKeyDataLen); - + // 3.11 Key Data. // IE. if(posRSNIE != NULL && posRSNIE->Length > 0) { - PacketMakeElement( &osEapolKey, + PacketMakeElement( &osEapolKey, (pSecInfo->SecLvl == RT_SEC_LVL_WPA) ? EID_Vendor : EID_WPA2, (*posRSNIE) ); } // KDE. @@ -2731,19 +2731,19 @@ ConstructEapolKeyPacket( PKDE_STRUCT pKDE = NULL; u1Byte KEDOUI[] = {0x00,0x0F,0xAC}; //00-0F-AC pKDE = (PKDE_STRUCT)( &(osEapolKey.Octet[osEapolKey.Length])); - // KeyID = bit0~bit2 + // KeyID = bit0~bit2 // TX = bit3 // resved = bit4~bit7 and byte2 // GTK data length = ( Length -6 ) - + pKDE->IEType= 0xdd; //IE ID = 0xDD - + if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_AESCCMP ) { pKDE->IELen = 0x16; // 18+4 = 22 osEapolKey.Length += 24+8+2; } - else if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_TKIP ) + else if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_TKIP ) { pKDE->IELen = 0x26; // 34+4 = 38 osEapolKey.Length += 40+8+2; @@ -2752,7 +2752,7 @@ ConstructEapolKeyPacket( PlatformMoveMemory(pKDE->OUI, KEDOUI, 3); pKDE->Datatype = 0x01; - + pKDE->KID = 0x01; //Set Group Key ID = 1; pKDE->Reserved = 0x00; // Set Reserved to all 0; @@ -2763,13 +2763,13 @@ ConstructEapolKeyPacket( PlatformMoveMemory(pKDE->GTK , pGTK , 16); else if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_TKIP ) PlatformMoveMemory(pKDE->GTK , pGTK , 32); - + if(pKEK) { // Encode Key Data field if necessary. EncEapolKeyData(Adapter, osEapolKey, pKEK, PTK_LEN_EAPOLENC); } - } + } *pLength += u2bEapolKeyMsgSz; // Figure out EAPOL-Key MIC if required. @@ -2789,7 +2789,7 @@ ConstructEapolKeyPacket( // // Description: Construct EAPOL-Star Packet Let AP try to re-key !! -// +// VOID ConstructEAPOLStartPacket( IN PADAPTER Adapter, @@ -2848,7 +2848,7 @@ ConstructEAPOLStartPacket( *pLength += pSecInfo->EncryptionHeadOverhead; } - + //------------------------------------------------------------------------- // Frame Body. //------------------------------------------------------------------------- @@ -2899,7 +2899,7 @@ ConstructCcxRmReport( //------------------------------------------------------------------------- // MAC Header. //------------------------------------------------------------------------- - RT_ASSERT(pMgntInfo->OpMode==RT_OP_MODE_INFRASTRUCTURE, + RT_ASSERT(pMgntInfo->OpMode==RT_OP_MODE_INFRASTRUCTURE, ("ConstructCcxRmReport(): OpMode(%d) != RT_OP_MODE_INFRASTRUCTURE(%d)\n", pMgntInfo->OpMode, RT_OP_MODE_INFRASTRUCTURE)); SET_80211_HDR_FRAME_CONTROL(pHeader, 0); @@ -2930,12 +2930,12 @@ ConstructCcxRmReport( { PlatformZeroMemory(&(Buffer[*pLength]), pSecInfo->EncryptionHeadOverhead); *pLength += pSecInfo->EncryptionHeadOverhead; - } + } //------------------------------------------------------------------------- // Frame Body. //------------------------------------------------------------------------- - pRmRptPkt = (PRM_REPORT_PACKET)(Buffer + *pLength); + pRmRptPkt = (PRM_REPORT_PACKET)(Buffer + *pLength); // // 1. Cisco Aironet SNAP Header. @@ -2944,21 +2944,21 @@ ConstructCcxRmReport( *pLength += CISCO_AIRONET_SNAP_LENGTH; // - // 2. IAPP ID & Length + // 2. IAPP ID & Length // - IappIdLen = (CISCO_RM_RPT_IAPP_LENGTH - CISCO_AIRONET_SNAP_LENGTH - 1) + posRpts->Length; + IappIdLen = (CISCO_RM_RPT_IAPP_LENGTH - CISCO_AIRONET_SNAP_LENGTH - 1) + posRpts->Length; RT_TRACE(COMP_SEND, DBG_LOUD, ("IAPP ID & Length: 0x%04X\n", IappIdLen)); RT_ASSERT((IappIdLen < 0x1000), ("ConstructCcxRmReport(): IappIdLen(%#X) should < 0x1000 !!!\n", IappIdLen)); SET_RMRPT_IAPPIDLEN(pRmRptPkt, IappIdLen); // - // 3. IAPP Type + // 3. IAPP Type // SET_RMRPT_IAPPTYPE(pRmRptPkt, CCX_RM_IAPP_TYPE); // - // 4. IAPP SubType + // 4. IAPP SubType // SET_RMRPT_IAPPSUBTYPE(pRmRptPkt, CCX_RM_REPORT_IAPP_SUBTYPE); @@ -3094,19 +3094,19 @@ ConstructCcxROGUEAPReport( { PlatformZeroMemory(&(Buffer[*pLength]), pSecInfo->EncryptionHeadOverhead); *pLength += pSecInfo->EncryptionHeadOverhead; - } + } //------------------------------------------------------------------------- // Frame Body. //------------------------------------------------------------------------- - pROGUEAPRptPkt = (PROGUEAP_REPORT_PACKET)(Buffer + *pLength); + pROGUEAPRptPkt = (PROGUEAP_REPORT_PACKET)(Buffer + *pLength); // // 1. Cisco Aironet SNAP Header. // PlatformMoveMemory( pROGUEAPRptPkt->SnapHeader, CiscoAironetSnap, CISCO_AIRONET_SNAP_LENGTH); - - *pLength += CISCO_AIRONET_SNAP_LENGTH; + + *pLength += CISCO_AIRONET_SNAP_LENGTH; // @@ -3114,29 +3114,29 @@ ConstructCcxROGUEAPReport( // PlatformMoveMemory(&(pROGUEAPRptPkt->ROGUEAPLen) , ROGUEAPRptLen , 2 ); - + // // 3.message type : 0x40 // - + pROGUEAPRptPkt->message_type = H2N1BYTE(ROGUEAP_message_type); - + // // 4.function code : 0x8e // - + pROGUEAPRptPkt->function_code = H2N1BYTE(ROGUEAP_function_code); - + // - // 5.Destination MAC Address. + // 5.Destination MAC Address. // PlatformMoveMemory(pROGUEAPRptPkt->DstAddr, pMgntInfo->Bssid, 6); - + // // 6.Source MAC Address. // PlatformMoveMemory(pROGUEAPRptPkt->SrcAddr, Adapter->CurrentAddress, 6); - + // // 7.Failure Reason // @@ -3160,12 +3160,12 @@ ConstructCcxROGUEAPReport( break; } - + // // 8. Rogue AP Mac address // PlatformMoveMemory(pROGUEAPRptPkt->RogueAPAddr, pMgntInfo->ROGUE_AP_ENTEY[index].bssid , 6); - + // // 9.Rogue AP name // @@ -3174,10 +3174,10 @@ ConstructCcxROGUEAPReport( *pLength += 40; ln = *pLength; - + //RT_PRINT_DATA((COMP_RM|COMP_SEND), DBG_LOUD, ("ROGUE AP Report: "), Buffer, *pLength); - + } @@ -3207,11 +3207,11 @@ ConstructMaFrameHdr( MaHdr[1] = Action; FillOctetString(osTemp, MaHdr, 2); - PacketAppendData(posMaFrame, osTemp); - + PacketAppendData(posMaFrame, osTemp); + } -// +// // Description: // Append the additional IEs to the Beacon frame, by Bruce, 2007-08-13. // Note: @@ -3282,7 +3282,7 @@ ConstructQosADDTSPacket( FillOctetString(osTempField, WMM_Filed, sizeof(WMM_Filed)); PacketAppendData(&osAddTs, osTempField); - + //------------------------------------------------------------------------- // TSPEC IE & TSRS //------------------------------------------------------------------------- @@ -3293,20 +3293,20 @@ ConstructQosADDTSPacket( PacketAppendData(&osAddTs, osTempField); // TSRS - // CCXv4 S54, A STA shall use the TSRS IE in the ADDTS request or (Re-)association Request. This value of Nominal PHY rate must be + // CCXv4 S54, A STA shall use the TSRS IE in the ADDTS request or (Re-)association Request. This value of Nominal PHY rate must be // greater than or equal to the Minimum PHY rate expressed in the TSPEC IE. By Bruce, 2009-06-23. if (QOS_RATE_TO_BPS( QosGetNPR(Adapter, pStream) ) >= GET_TSPEC_MIN_PHY_RATE(pStream->OutStandingTSpec) ) { QosConstructTSRS(Adapter, pStream, &osAddTs); } - + pStream->DialogToken = pStaQos->DialogToken; pStream ++; } //------------------------------------------------------------------------- - // MHDR IE for MFP + // MHDR IE for MFP //------------------------------------------------------------------------- CCX_AppendMHDRIE(Adapter, &osAddTs); @@ -3337,7 +3337,7 @@ ConstructQosDELTSPacket( RT_ASSERT(pTs!=NULL, ("ConstructQosDELTSPacket(): pTs should not be NULL\n")); FillOctetString(osDelTs, Buffer, 0); - + //------------------------------------------------------------------------- // MAC Header. //------------------------------------------------------------------------- @@ -3355,7 +3355,7 @@ ConstructQosDELTSPacket( // Security Header: leave space for it if necessary. //------------------------------------------------------------------------- CCX_ConstructQosDELTSPacket(Adapter, &osDelTs); - + //------------------------------------------------------------------------- // WMM Action Frame Fixed Field //------------------------------------------------------------------------- @@ -3366,7 +3366,7 @@ ConstructQosDELTSPacket( FillOctetString(osTempField, WMM_Filed, sizeof(WMM_Filed)); PacketAppendData(&osDelTs, osTempField); - + //------------------------------------------------------------------------- // TSPEC IE //------------------------------------------------------------------------- @@ -3376,13 +3376,13 @@ ConstructQosDELTSPacket( PacketAppendData(&osDelTs, osTempField); pStream ++; } - + //------------------------------------------------------------------------- - // MHDR IE for MFP + // MHDR IE for MFP //------------------------------------------------------------------------- CCX_AppendMHDRIE(Adapter, &osDelTs ); - *pLength = osDelTs.Length; + *pLength = osDelTs.Length; } // @@ -3408,8 +3408,8 @@ ConstructCcxNeighborPoll( // // Figure out IAPP pakcet length. // - IappIdLen = 0x10; - + IappIdLen = 0x10; + //------------------------------------------------------------------------- // MAC Header. //------------------------------------------------------------------------- @@ -3441,18 +3441,18 @@ ConstructCcxNeighborPoll( { PlatformZeroMemory(&(Buffer[*pLength]), pSecInfo->EncryptionHeadOverhead); *pLength += pSecInfo->EncryptionHeadOverhead; - } + } //------------------------------------------------------------------------- // Frame Body. //------------------------------------------------------------------------- - pIappPkt = (Buffer + *pLength); + pIappPkt = (Buffer + *pLength); // // 1. Cisco Aironet SNAP Header. // SET_AARPT_IAPP_SNAP_HEADER(pIappPkt, CiscoAironetSnap, CISCO_AIRONET_SNAP_LENGTH); - *pLength += CISCO_AIRONET_SNAP_LENGTH; + *pLength += CISCO_AIRONET_SNAP_LENGTH; // @@ -3461,21 +3461,21 @@ ConstructCcxNeighborPoll( tmp2Byte = H2N2BYTE(IappIdLen); SET_AARPT_IAPPIDLEN(pIappPkt, &tmp2Byte); *pLength += 2; - + // // 3. IAPP type: 0x33 // SET_AARPT_IAPPTYPE(pIappPkt, CCX_L2ROAM_IAPP_TYPE); *pLength += 1; - + // // 4. Function code: 0x01 // SET_AARPT_IAPPFUNCTION(pIappPkt, 0x01); *pLength += 1; - - // - // 5. Destination MAC Address. + + // + // 5. Destination MAC Address. // SET_AARPT_IAPPDEST(pIappPkt, pMgntInfo->Bssid, 6); *pLength += 6; @@ -3507,7 +3507,7 @@ ConstructARPResponse( PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); pu1Byte pARPRspPkt = Buffer; static u1Byte ARPLLCHeader[8] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x08, 0x06}; - + //------------------------------------------------------------------------- // MAC Header. //------------------------------------------------------------------------- @@ -3542,14 +3542,14 @@ ConstructARPResponse( PlatformZeroMemory(&(Buffer[*pLength]), pSecInfo->EncryptionHeadOverhead); *pLength += pSecInfo->EncryptionHeadOverhead; SET_80211_HDR_WEP(pARPRspPkt, 1); //Suggested by CCW. - } + } //------------------------------------------------------------------------- // Frame Body. //------------------------------------------------------------------------- - pARPRspPkt = (pu1Byte)(Buffer + *pLength); + pARPRspPkt = (pu1Byte)(Buffer + *pLength); // LLC header - PlatformMoveMemory(pARPRspPkt, ARPLLCHeader, 8); + PlatformMoveMemory(pARPRspPkt, ARPLLCHeader, 8); *pLength += 8; // ARP element @@ -3579,17 +3579,17 @@ ConstructCtsPacket( pu1Byte pCts; RT_TRACE(COMP_MLME, DBG_LOUD, ("===> ConstructCtsPacket()\n")); - + pCts = Buffer; SET_80211_HDR_FRAME_CONTROL(pCts, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pCts, Type_CTS); SET_80211_HDR_DURATION(pCts, 0); - + SET_80211_HDR_ADDRESS1(pCts, pStaAddr); *pLength = 10; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== ConstructCtsPacket()\n")); } @@ -3598,10 +3598,10 @@ ConstructCtsPacket( // Description: // Construct the IP66 NS packet to support NS offload. // -// buffer : +// buffer : // Packet buffer -// pLength : -// Packet Length after construct +// pLength : +// Packet Length after construct // PTAAdress : // IPv6 , Target Link address ( MAC address ) VOID @@ -3609,7 +3609,7 @@ ConstructNSPacket( IN PADAPTER Adapter, IN pu1Byte Buffer, IN pu4Byte pLength, - IN pu1Byte pTAAddress + IN pu1Byte pTAAddress ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); @@ -3620,7 +3620,7 @@ ConstructNSPacket( static u1Byte IPv6HeadInfo[4] = {0x60, 0x00, 0x00, 0x00}; static u1Byte IPv6HeadContx[4] = {0x00, 0x20, 0x3a, 0xff}; static u1Byte ICMPv6Head[8] = {0x88, 0x00, 0x00, 0x00 , 0x60 , 0x00 , 0x00 , 0x00}; - + //------------------------------------------------------------------------- // MAC Header. //------------------------------------------------------------------------- @@ -3655,26 +3655,26 @@ ConstructNSPacket( PlatformZeroMemory(&(Buffer[*pLength]), pSecInfo->EncryptionHeadOverhead); *pLength += pSecInfo->EncryptionHeadOverhead; SET_80211_HDR_WEP(pNSRspPkt, 1); //Suggested by CCW. - } + } //------------------------------------------------------------------------- // Frame Body. //------------------------------------------------------------------------- - pNSRspPkt = (pu1Byte)(Buffer + *pLength); + pNSRspPkt = (pu1Byte)(Buffer + *pLength); // LLC header - PlatformMoveMemory(pNSRspPkt, NSLLCHeader, 8); + PlatformMoveMemory(pNSRspPkt, NSLLCHeader, 8); pNSRspPkt += 8; *pLength += 8; //------------------------------------------------------------------------- - // IPv6 Heard + // IPv6 Heard //------------------------------------------------------------------------- // 1 . Information (4 bytes): 0x60 0x00 0x00 0x00 - PlatformMoveMemory(pNSRspPkt, IPv6HeadInfo, 4); + PlatformMoveMemory(pNSRspPkt, IPv6HeadInfo, 4); pNSRspPkt += 4; *pLength += 4; - // 2 . playload : 0x00 0x20 , NextProt : 0x3a (ICMPv6) HopLim : 0xff - PlatformMoveMemory(pNSRspPkt, IPv6HeadContx, 4); + // 2 . playload : 0x00 0x20 , NextProt : 0x3a (ICMPv6) HopLim : 0xff + PlatformMoveMemory(pNSRspPkt, IPv6HeadContx, 4); pNSRspPkt += 4; *pLength += 4; // 3 . SA : 16 bytes , DA : 16 bytes ( Fw will filled ) @@ -3683,10 +3683,10 @@ ConstructNSPacket( *pLength += 32; //------------------------------------------------------------------------- - // ICMPv6 + // ICMPv6 //------------------------------------------------------------------------- // 1. Type : 0x88 (NA) , Code : 0x00 , ChechSum : 0x00 0x00 (RSvd) NAFlag: 0x60 0x00 0x00 0x00 ( Solicited , Override) - PlatformMoveMemory(pNSRspPkt, ICMPv6Head, 8); + PlatformMoveMemory(pNSRspPkt, ICMPv6Head, 8); pNSRspPkt += 8; *pLength += 8; // 2. TA : 16 bytes @@ -3694,10 +3694,10 @@ ConstructNSPacket( pNSRspPkt += 16; *pLength += 16; //------------------------------------------------------------------------- - // ICMPv6 Target Link Layer address + // ICMPv6 Target Link Layer address //------------------------------------------------------------------------- pNSRspPkt[0] = 0x02 ; // Type - pNSRspPkt[1] = 0x01 ; // Len 1 unit of 8 octes + pNSRspPkt[1] = 0x01 ; // Len 1 unit of 8 octes pNSRspPkt += 2; *pLength += 2; //PlatformMoveMemory(pNSRspPkt, pTAAddress, 6); @@ -3860,7 +3860,7 @@ FT_AppendMdIE( PRT_WLAN_BSS pTargetBss = NULL; u1Byte pktType = 0xFF; - CHECK_NULL_RETURN_STATUS(posOutContent); + CHECK_NULL_RETURN_STATUS(posOutContent); do { @@ -3878,10 +3878,10 @@ FT_AppendMdIE( { pktType = PacketGetType(*posOutContent); } - + if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_CLIENT)) { - if(!pInfoBuf || InfoBufLen < sizeof(RT_WLAN_BSS)) + if(!pInfoBuf || InfoBufLen < sizeof(RT_WLAN_BSS)) { RT_TRACE_F(COMP_SEC, DBG_SERIOUS, ("Invalid input buffer or length, pInfoBuf = %p, InfoBufLen = %d\n", pInfoBuf, InfoBufLen)); rtStatus = RT_STATUS_INVALID_DATA; @@ -3928,15 +3928,15 @@ FT_AppendMdIE( RT_TRACE_F(COMP_MLME, DBG_TRACE, ("pktType = 0x%02X, no need to append MD IE\n", pktType)); break; } - + // MD Element - FillOctetString(osMdIe, pEntry->MDE, (u2Byte)(pEntry->MDELen)); + FillOctetString(osMdIe, pEntry->MDE, (u2Byte)(pEntry->MDELen)); } else { //3 // ToDo: Support AP mode later. rtStatus = RT_STATUS_NOT_SUPPORT; - break; + break; } if(maxBufLen < ((u4Byte)posOutContent->Length + osMdIe.Length)) @@ -4000,7 +4000,7 @@ FT_AppendFtIE( PRT_WLAN_BSS pTargetBss = NULL; u1Byte pktType = 0xFF; - CHECK_NULL_RETURN_STATUS(posOutContent); + CHECK_NULL_RETURN_STATUS(posOutContent); do { @@ -4018,10 +4018,10 @@ FT_AppendFtIE( { pktType = PacketGetType(*posOutContent); } - + if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_CLIENT)) { - if(!pInfoBuf || InfoBufLen < sizeof(RT_WLAN_BSS)) + if(!pInfoBuf || InfoBufLen < sizeof(RT_WLAN_BSS)) { RT_TRACE_F(COMP_SEC, DBG_SERIOUS, ("Invalid input buffer or length, pInfoBuf = %p, InfoBufLen = %d\n", pInfoBuf, InfoBufLen)); rtStatus = RT_STATUS_INVALID_DATA; @@ -4068,15 +4068,15 @@ FT_AppendFtIE( RT_TRACE_F(COMP_MLME, DBG_TRACE, ("pktType = 0x%02X, no need to append Ft IE\n", pktType)); break; } - + // MD Element - FillOctetString(osFtIe, pEntry->FTE, (u2Byte)(pEntry->FTELen)); + FillOctetString(osFtIe, pEntry->FTE, (u2Byte)(pEntry->FTELen)); } else { //3 // ToDo: Support AP mode later. rtStatus = RT_STATUS_NOT_SUPPORT; - break; + break; } if(maxBufLen < ((u4Byte)posOutContent->Length + osFtIe.Length)) diff --git a/network/wlan/WDI/COMMON/MgntConstructPacket.h b/network/wlan/WDI/COMMON/MgntConstructPacket.h index e095299b9..12d6e4623 100644 --- a/network/wlan/WDI/COMMON/MgntConstructPacket.h +++ b/network/wlan/WDI/COMMON/MgntConstructPacket.h @@ -187,11 +187,11 @@ ConstructEapolKeyPacket( KeyType eKeyType, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. BOOLEAN bInstall, // EAPOL-Key Information field: Install Flag. BOOLEAN bKeyAck, // EAPOL-Key Information field: Key Ack bit. - BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. BOOLEAN bSecure, // EAPOL-Key Information field: Secure bit. BOOLEAN bError, // EAPOL-Key Information field: Error bit. True for MIC failure report. BOOLEAN bRequest, // EAPOL-Key Information field: Requst bit. - + u8Byte u8bKeyReplayCounter, // EAPOL-KEY Replay Counter field. pu1Byte pKeyNonce, // EAPOL-Key Key Nonce field (32-byte). u8Byte u8bKeyRSC, // EAPOL-Key Key RSC field (8-byte). diff --git a/network/wlan/WDI/COMMON/MgntEngine.c b/network/wlan/WDI/COMMON/MgntEngine.c index 0e10f7f64..87512dfd3 100644 --- a/network/wlan/WDI/COMMON/MgntEngine.c +++ b/network/wlan/WDI/COMMON/MgntEngine.c @@ -168,7 +168,7 @@ DFS_OnBeacon_Bss( // // Description: -// Add new STA of the IBSS and indicate association start, +// Add new STA of the IBSS and indicate association start, // association complete events for it. // BOOLEAN @@ -186,16 +186,16 @@ AsocEntry_AddIbssPeerSta( BOOLEAN bAMSDUTestChk; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc; - + // - // Add the STA into table and indicate association related event + // Add the STA into table and indicate association related event // if this is the 1st time we hear Beacon from this STA. // if(AsocEntry_GetEntry(pMgntInfo, pTaddr) != NULL) { return FALSE; } - + AsocEntry_AddStation(pAdapter, pTaddr, OPEN_SYSTEM); pEntry = AsocEntry_GetEntry(pMgntInfo, pTaddr); if(pEntry != NULL) @@ -206,7 +206,7 @@ AsocEntry_AddIbssPeerSta( pEntry->AID = AsocEntry_AssignAvailableAID(pMgntInfo, pTaddr); pEntry->IOTPeer = pBssDesc->Vender; pEntry->AssociatedMacId = (u1Byte) MacIdRegisterMacIdForAssociatedID(pAdapter, MAC_ID_OWNER_AD_HOC, pEntry->AID); - + //YJ, add for TX RPT, 111213 if(pMgntInfo->MaxMACID < pEntry->AssociatedMacId) { @@ -221,7 +221,7 @@ AsocEntry_AddIbssPeerSta( // pEntry->bdSupportRateEXLen = pBssDesc->bdSupportRateEXLen; CopyMem(pEntry->bdSupportRateEXBuf, pBssDesc->bdSupportRateEXBuf, pEntry->bdSupportRateEXLen); - + // // Get highest supported rate of the STA. // @@ -254,7 +254,7 @@ AsocEntry_AddIbssPeerSta( { pEntry->WirelessMode = WIRELESS_MODE_A; } - + // Update HT related information if(pHTInfo->bCurrentHTSupport && pBssDesc->BssHT.bdSupportHT) { @@ -263,7 +263,7 @@ AsocEntry_AddIbssPeerSta( // Use tx adsud for 11n adhoc mode if(pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_NO_CIPHER) { - + bAMSDUTestChk = FALSE; pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_AMSDU_TEST_SETTING, (pu1Byte)(&bAMSDUTestChk)); if(bAMSDUTestChk) @@ -272,7 +272,7 @@ AsocEntry_AddIbssPeerSta( pEntry->IOTAction = HT_IOT_ACT_AMSDU_ENABLE; else if(pHTInfo->ForcedAMSDUMode == HT_AMSDU_WITHIN_AMPDU) pEntry->IOTAction = HT_IOT_ACT_AMSDU_AMPDU; - else + else pEntry->IOTAction = 0; } } @@ -288,7 +288,7 @@ AsocEntry_AddIbssPeerSta( if(pVHTInfo->bCurrentVHTSupport && pBssDesc->BssVHT.bdSupportVHT) { pu1Byte pVHTCapEle = (pu1Byte)pBssDesc->BssVHT.bdVHTCapBuf; - + pEntry->VHTInfo.bEnableVHT = TRUE; if(pEntry->WirelessMode == WIRELESS_MODE_N_5G) pEntry->WirelessMode = WIRELESS_MODE_AC_5G; @@ -301,11 +301,11 @@ AsocEntry_AddIbssPeerSta( // Porting from AP_OnAsocReq() to initialize the protection mechnism in IBSS mode. // These part is lost before. 2010.11.02. Added by tynli. - // Enable protection mode and Disable short slot time if an [B-mode STA joined] or[ G-mode Connect to Soft N AP] + // Enable protection mode and Disable short slot time if an [B-mode STA joined] or[ G-mode Connect to Soft N AP] if(pEntry->WirelessMode == WIRELESS_MODE_B) { ActUpdate_ProtectionMode(pAdapter, TRUE); - + if(pEntry->WirelessMode == WIRELESS_MODE_B) pMgntInfo->mCap &= (~cShortSlotTime); else @@ -318,7 +318,7 @@ AsocEntry_AddIbssPeerSta( pEntry->IOTPeer == HT_IOT_PEER_REALTEK_JAGUAR_CCUTAP) { u2Byte JaguarPatch = (HT_IOT_PEER_REALTEK_JAGUAR_CCUTAP << 8) | (RT_MEDIA_CONNECT); - pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_JAGUAR_PATCH, (pu1Byte)(&JaguarPatch)); + pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_JAGUAR_PATCH, (pu1Byte)(&JaguarPatch)); } // Update the Operation mode field in HT Info element. @@ -332,7 +332,7 @@ AsocEntry_AddIbssPeerSta( pHTInfo->CurrentOpMode = HT_OPMODE_40MHZ_PROTECT; else pHTInfo->CurrentOpMode = HT_OPMODE_NO_PROTECT; - + } } @@ -346,7 +346,7 @@ AsocEntry_AddIbssPeerSta( else { pAdapter->HalFunc.UpdateHalRATRTableHandler( - pAdapter, + pAdapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet,pEntry); } @@ -378,7 +378,7 @@ OnBeacon_Scan( } -void +void ChangeRsnIEOnSameBssid( PADAPTER Adapter, PRT_RFD pRfd, @@ -390,8 +390,8 @@ ChangeRsnIEOnSameBssid( OCTET_STRING mmpdu; u1Byte *pCurr; u1Byte count; - u1Byte PairwiseCipherCount = 0; - + u1Byte PairwiseCipherCount = 0; + mmpdu.Octet = pRfd->Buffer.VirtualAddress; mmpdu.Length = pRfd->PacketLength; @@ -416,7 +416,7 @@ ChangeRsnIEOnSameBssid( RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, " Change :\n" , RSNIE.Octet , RSNIE.Length); pCurr = RSNIE.Octet; - // SKIP Head + // SKIP Head if( pMgntInfo->SecurityInfo.SecLvl == RT_SEC_LVL_WPA) { pCurr+=4; @@ -458,31 +458,31 @@ OnBeacon_Join( PRT_RFD pRfd ) { - PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; + PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; PRT_WLAN_BSS pBssDesc = NULL; // Reduce stack size if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } pMgntInfo->LinkDetectInfo.OnBeaconJoinCnt_OnBeacon_Join++; //cosa add for debug. pBssDesc = &pMgntInfo->bssDesc_OnBeacon; - + GetValueFromBeaconOrProbeRsp( Adapter, pRfd, pBssDesc, FALSE); RT_PRINT_ADDR(COMP_MLME|COMP_BEACON, DBG_TRACE, "===> OnBeacon_Join():", pBssDesc->bdBssIdBuf); RT_TRACE(COMP_MLME, DBG_TRACE, ("OnBeacon_Join(): channel = %d\n", pBssDesc->ChannelNumber)); // - // 061026, Rcnjko: + // 061026, Rcnjko: // 1. 8186 doesn't include Realtek CAP IE in ProbeRsp and therefore we - // determine bRealtekCapType1Exist here instead of SetupJoinInfraInfo. - // 2. awlays keep Realtek CAP IE. We might use it + // determine bRealtekCapType1Exist here instead of SetupJoinInfraInfo. + // 2. awlays keep Realtek CAP IE. We might use it // for 8186 Auto Turbo mode or other compatibility issue. - // 3. 8186 include this IE in Beacon when its Turbo Mode is configured + // 3. 8186 include this IE in Beacon when its Turbo Mode is configured // as "Auto" or "Always". // Added by Roger, 2006.12.08. // @@ -491,7 +491,7 @@ OnBeacon_Join( if(pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE) { // Infra-structure mode. - // For Hidden AP and EzConfig AP, their beacons won't contain the SSID + // For Hidden AP and EzConfig AP, their beacons won't contain the SSID // we want, and therefore, either BSSID or SSID matched is acceptable. // 2004.11.18, by rcnjko. if( PlatformCompareMemory( pMgntInfo->Bssid, pBssDesc->bdBssIdBuf, 6) != 0 ) // BSSID mismatched @@ -515,8 +515,8 @@ OnBeacon_Join( } CopyWlanBss(&(pMgntInfo->targetBSS), pBssDesc); - - RT_PRINT_ADDR(COMP_MLME|COMP_BEACON, DBG_LOUD, "===> OnBeacon_Join():", pBssDesc->bdBssIdBuf); + + RT_PRINT_ADDR(COMP_MLME|COMP_BEACON, DBG_LOUD, "===> OnBeacon_Join():", pBssDesc->bdBssIdBuf); RT_TRACE(COMP_MLME, DBG_LOUD, ("OnBeacon_Join(): channel = %d\n", pBssDesc->ChannelNumber)); //Update Dtim period. @@ -528,13 +528,13 @@ OnBeacon_Join( { pMgntInfo->ListenInterval = pMgntInfo->dot11DtimPeriod; } - + // Update beacon and peer information, 2006.11.14, by shien chang. MgntUpdateAsocInfo(Adapter, UpdateAsocBeacon, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, pBssDesc->bdMacAddressBuf, 6); CCX_SSIDLUpdateJoinBss(Adapter, pRfd, pBssDesc); - + pMgntInfo->TSFValue = pBssDesc->bdTstamp; // by tynli. //Set state_Synchronization_Sta @@ -542,7 +542,7 @@ OnBeacon_Join( { // For receiving beacon and preventing wrong restoration in ScanComplete() ------------------------------------- pMgntInfo->state_Synchronization_Sta = pMgntInfo->state_Synchronization_Sta_BeforeScan = STATE_Bss; - RT_TRACE_F(COMP_SCAN, DBG_LOUD, ("Set Port (%d) pMgntInfo->state_Synchronization_Sta = %d\n", + RT_TRACE_F(COMP_SCAN, DBG_LOUD, ("Set Port (%d) pMgntInfo->state_Synchronization_Sta = %d\n", GET_PORT_NUMBER(Adapter), Adapter->MgntInfo.state_Synchronization_Sta) ); // --------------------------------------------------------------------------------------------------- @@ -551,9 +551,9 @@ OnBeacon_Join( { if(pMgntInfo->pHTInfo->bCurrentHTSupport == TRUE) { - OCTET_STRING pduOS; + OCTET_STRING pduOS; FillOctetString(pduOS, pMgntInfo->AsocInfo.Beacon, (u2Byte)pMgntInfo->AsocInfo.BeaconLength); - HTOnAssocRsp(Adapter, pduOS); + HTOnAssocRsp(Adapter, pduOS); if(pMgntInfo->pVHTInfo->bCurrentVHTSupport) VHTOnAssocRsp(Adapter, pduOS); @@ -563,7 +563,7 @@ OnBeacon_Join( else { PlatformZeroMemory(pMgntInfo->dot11HTOperationalRateSet, 16); - CHNL_SetBwChnl(Adapter, pMgntInfo->dot11CurrentChannelNumber, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT); + CHNL_SetBwChnl(Adapter, pMgntInfo->dot11CurrentChannelNumber, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT); } if(MgntResetOrPnPInProgress(Adapter)) @@ -571,16 +571,16 @@ OnBeacon_Join( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case IBSS\n")); return; } - + // - // 061205, rcnjko: Add new STA of the IBSS and indicate association start, + // 061205, rcnjko: Add new STA of the IBSS and indicate association start, // association complete events for it. // if(AsocEntry_AddIbssPeerSta(Adapter, pBssDesc)) { // Preprocessing for association operation. 2006.11.14, by shien chang. DrvIFIndicateAssociationStart(Adapter); - + // Postprocessing for association operation. 2006.11.14, by shien chang. DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_SUCCESS); } @@ -592,9 +592,9 @@ OnBeacon_Join( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case IBSS 2\n")); return; } - + // Sync from 91su branch, 2009.04.27. - if( !pMgntInfo->bInToSleep && + if( !pMgntInfo->bInToSleep && !MgntRoamingInProgress(pMgntInfo) && pMgntInfo->RequestFromUplayer) DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_SUCCESS); else if(MgntRoamingInProgress(pMgntInfo)) @@ -602,10 +602,10 @@ OnBeacon_Join( MgntRoamComplete(Adapter, MlmeStatus_success); } - pMgntInfo->bInToSleep = FALSE; + pMgntInfo->bInToSleep = FALSE; pMgntInfo->state_Synchronization_Sta = STATE_Ibss_Idle; - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK); + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK); } else { @@ -638,9 +638,9 @@ OnBeacon_Bss( PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; PRT_WLAN_BSS pBssDesc = NULL; pu1Byte pbssid = pRfd->Buffer.VirtualAddress + 16; - + pMgntInfo->LinkDetectInfo.OnBeaconBssCnt_OnBeacon_Bss++; //cosa add for debug - + if( pMgntInfo->mAssoc == FALSE ) return; @@ -653,13 +653,13 @@ OnBeacon_Bss( pBssDesc = &pMgntInfo->bssDesc_OnBeacon; - + if(pDefaultAdapter->MgntInfo.RegMultiChannelFcsMode == MULTICHANNEL_FCS_SUPPORT_GO) { u8Byte u8APTsf = 0; u8Byte uCurrentTsf = 0; - + u8APTsf = GET_BEACON_PROBE_RSP_TIME_STAMP_HIGH(pRfd->Buffer.VirtualAddress); u8APTsf <<= 32; u8APTsf |= GET_BEACON_PROBE_RSP_TIME_STAMP_LOW(pRfd->Buffer.VirtualAddress); @@ -676,11 +676,11 @@ OnBeacon_Bss( // We should not compare SSID for Hidden AP case. 2005.04.14, by rcnjko. // // Check SSID. -// if( !CompareSSID(bssDesc.bdSsIdBuf, bssDesc.bdSsIdLen, pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length) ) +// if( !CompareSSID(bssDesc.bdSsIdBuf, bssDesc.bdSsIdLen, pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length) ) // { // // SSID mismatched. // return; -// } +// } // // Filter beacon from IBSS, 2006.11.22, by shien chang. @@ -699,9 +699,9 @@ OnBeacon_Bss( { pMgntInfo->ListenInterval = pMgntInfo->dot11DtimPeriod; } - + // Update beacon informaton, 2006.11.14, by shien chang. - // Just Update on Join step !! + // Just Update on Join step !! //MgntUpdateAsocInfo(Adapter, UpdateAsocBeacon, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); // For WMM QoS Info Field update (WMM Power Save Mode). Annie, 2005-11-14. @@ -761,7 +761,7 @@ OnBeacon_Bss( { // I don't want to enter original 8187 turbo mechanism in this case. Added by Roger, 2006.12.07. // Still need to check the MgntActSet_EnterTurboModeByStyle function(should be moved!!). - + RT_ASSERT( (!pMgntInfo->bSupportTurboMode), ("OnBeacon_Bss(): bSupportTurboMode is TRUE in 8186 Auto Turbo Mdoe!!!\n") ); if( GET_RTIE_CAPABILITY_TURBO_MODE(&(pBssDesc->RealtekCap) ) ) @@ -770,22 +770,22 @@ OnBeacon_Bss( PRT_TURBO_CA pTurboCa = &(pMgntInfo->TurboChannelAccess); // For debug, added by Roger, 2006.12.11. - RT_TRACE(COMP_MLME, DBG_TRACE, + RT_TRACE(COMP_MLME, DBG_TRACE, ("OnBeacon_Bss(): Auto Turbo Mode by 8186.\n")); - RT_TRACE(COMP_MLME, DBG_TRACE, + RT_TRACE(COMP_MLME, DBG_TRACE, ("OnBeacon_Bss():bEnterTurbo = %d, pTurboCa->bEnabled = %d\n",bEnterTurbo, pTurboCa->bEnabled)); if( bEnterTurbo != pTurboCa->bEnabled ) - { + { // For debug, added by Roger, 2006.12.11. - RT_TRACE(COMP_MLME, DBG_TRACE, + RT_TRACE(COMP_MLME, DBG_TRACE, ("OnBeacon_Bss(): Enter Turbo Mode by 8186.\n")); //Modefied by Roger, 2006.12.07. MgntActSet_EnterTurboMode( Adapter, bEnterTurbo ); } } } - + //------------------------------------------------------------------------- MgntLinkStatusUpdateRxBeacon( Adapter ); @@ -802,7 +802,7 @@ OnBeacon_Ibss( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - OCTET_STRING pduOS; + OCTET_STRING pduOS; PRT_WLAN_BSS pBssDesc = NULL; pu1Byte pbssid, pTaddr; PRT_WLAN_STA pEntry; @@ -820,7 +820,7 @@ OnBeacon_Ibss( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } pMgntInfo->LinkDetectInfo.OnBeaconIbssCnt_OnBeacon_Ibss++; //cosa add for debug @@ -828,13 +828,13 @@ OnBeacon_Ibss( FillOctetString(pduOS, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); pbssid = Frame_Addr3(pduOS); pTaddr = Frame_Addr2(pduOS); - + // Skip it if we are not in IBSS mode. if( pMgntInfo->mIbss == FALSE ) { return; } - + bssDescTmp = BssDescDupSource( Adapter, pRfd ); pBssDesc = &pMgntInfo->bssDesc_OnBeacon; @@ -864,7 +864,7 @@ OnBeacon_Ibss( { return; } - + if(pChnlListEntry->ExInfo & CHANNEL_EXINFO_NO_IBSS_JOIN) { return; @@ -891,7 +891,7 @@ OnBeacon_Ibss( { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return; - } + } // Check BSSID. if( PlatformCompareMemory( pMgntInfo->Bssid, pbssid, 6) == 0 ) @@ -904,15 +904,15 @@ OnBeacon_Ibss( pEntry = AsocEntry_GetEntry(pMgntInfo, pTaddr); if(pEntry != NULL) - { - // Update information about this STA. + { + // Update information about this STA. AsocEntry_UpdateTimeStamp(pEntry); } else - { + { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("MgntUpdateAsocInfo")); - + MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, pTaddr, 6); // 061204, rcnjko: this is a MUST before indicating association related event. if(MgntResetOrPnPInProgress(Adapter)) @@ -920,9 +920,9 @@ OnBeacon_Ibss( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return; } - + // - // 061205, rcnjko: Add new STA of the IBSS and indicate association start, + // 061205, rcnjko: Add new STA of the IBSS and indicate association start, // association complete events for it. // if(AsocEntry_AddIbssPeerSta(Adapter, pBssDesc)) @@ -932,13 +932,13 @@ OnBeacon_Ibss( // Postprocessing for association operation. 2006.11.14, by shien chang. DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_SUCCESS); - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK); + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK); } } - // Fixed by CCW, Bruce It will cause beacon channel number error when media connect + // Fixed by CCW, Bruce It will cause beacon channel number error when media connect if( !pMgntInfo->bMediaConnect ) { - MgntIndicateMediaStatus( Adapter, RT_MEDIA_CONNECT, GENERAL_INDICATE ); + MgntIndicateMediaStatus( Adapter, RT_MEDIA_CONNECT, GENERAL_INDICATE ); } else { @@ -966,13 +966,13 @@ OnBeacon_Ibss( GetValueFromBeaconOrProbeRsp( Adapter, pRfd, bssDescTmp, FALSE); // Determine the receiving packet type for BSS weighting. - bssDescTmp->BssPacketType |= + bssDescTmp->BssPacketType |= (PacketGetType(mmpdu) == Type_Probe_Rsp) ? BSS_PKT_PROBE_RSP : BSS_PKT_BEACON; CopyWlanBss(pMgntInfo->bssDesc4Query+pMgntInfo->NumBssDesc, pMgntInfo->bssDesc+pMgntInfo->NumBssDesc); - pMgntInfo->NumBssDesc += 1; + pMgntInfo->NumBssDesc += 1; pMgntInfo->NumBssDesc4Query = pMgntInfo->NumBssDesc; - + }while(0); } } @@ -993,7 +993,7 @@ OnBeacon_Ibss( pMgntInfo->JoinAction = RT_JOIN_IBSS; pMgntInfo->bInToSleep = TRUE; - + JoinRequest( Adapter, pMgntInfo->JoinAction, pBssDesc ); } } @@ -1009,7 +1009,7 @@ OnBeacon( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; OCTET_STRING osMpdu = {pRfd->Buffer.VirtualAddress, pRfd->PacketLength}; - + RT_TRACE(COMP_RECV, DBG_TRACE,("OnBeacon!!!\n")); pMgntInfo->LinkDetectInfo.OnBeaconCnt_OnBeacon++; //cosa add for debug. @@ -1060,14 +1060,14 @@ OnBeacon( return TRUE; } -VOID +VOID OnProbeRsp( PADAPTER Adapter, PRT_RFD pRfd ) { OCTET_STRING osMpdu = {NULL, 0}; - + if(Adapter->MgntInfo.state_Synchronization_Sta == STATE_Join_Wait_Beacon) { RT_TRACE( COMP_MLME , DBG_LOUD , ( " Used ProbeRsp to Join!! \n" ) ); @@ -1101,9 +1101,9 @@ OnAuth_even( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } - + //Check Bssid if( PlatformCompareMemory( pMgntInfo->Bssid, Frame_Addr3( authpdu ), 6 ) != 0 ){ return FALSE; @@ -1129,7 +1129,7 @@ OnAuth_even( //TODO: Need to check source address?? if( Frame_AuthStatusCode(authpdu) != StatusCode_success ){ - + // // If Responding station does NOT support the specified WEP Auth, // we shall NOT retry the same WEP Auth algorithm any more. @@ -1137,10 +1137,10 @@ OnAuth_even( // if((Frame_AuthStatusCode(authpdu) == StatusCode_notsupport_authalg) && (pMgntInfo->SecurityInfo.AuthMode != RT_802_11AuthModeAutoSwitch) && - (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || + (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104)) { - pMgntInfo->AuthRetryCount = RT_AUTH_RETRY_LIMIT; + pMgntInfo->AuthRetryCount = RT_AUTH_RETRY_LIMIT; } pMgntInfo->State_AuthReqService = STATE_Auth_Req_Idle; MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_refused); @@ -1152,17 +1152,17 @@ OnAuth_even( //Check Auth algorithm auth_alg = (AUTH_ALGORITHM)Frame_AuthAlgorithmNum(authpdu); if( ((pMgntInfo->AuthReq_auAlg == OPEN_SYSTEM) - && (auth_alg == OPEN_SYSTEM ) )|| + && (auth_alg == OPEN_SYSTEM ) )|| ( (auth_alg == NETWORK_EAP) && Adapter->MgntInfo.bNETWORKEAP)) //For NETWORK EAP { pMgntInfo->State_AuthReqService = STATE_Auth_Req_Idle; MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_success); - } + } else if( (pMgntInfo->AuthReq_auAlg == SHARED_KEY) && (auth_alg == SHARED_KEY) ) { OCTET_STRING AuthChallengetext; - + // Cancel AuthTimer PlatformCancelTimer( Adapter, &pMgntInfo->AuthTimer ); @@ -1178,7 +1178,7 @@ OnAuth_even( else if(AUTH_ALG_FT == auth_alg) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + pMgntInfo->State_AuthReqService = STATE_Auth_Req_Idle; FtUpdateEntryInfo(Adapter, FT_WAIT_OS_DECISION, pMgntInfo->Bssid, NULL, 0); // Indicate to WDI to request the association request information for FT @@ -1193,9 +1193,9 @@ OnAuth_even( else{ pMgntInfo->State_AuthReqService = STATE_Auth_Req_Idle; RT_TRACE(COMP_MLME, DBG_LOUD, ("Mismatch auth_alg: %#X\n", auth_alg)); - MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_invalid); + MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_invalid); } - + } break; @@ -1212,7 +1212,7 @@ OnAuth_even( { pMgntInfo->State_AuthReqService = STATE_Auth_Req_Idle; RT_TRACE(COMP_INIT, DBG_LOUD,("Mismatch auth_alg\n")); - MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_invalid); + MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_invalid); return FALSE; } @@ -1234,7 +1234,7 @@ OnAuth_even( } RT_TRACE(COMP_MLME, DBG_LOUD, ("<====OnAuth_even(): State_AuthReqService %d \n", pMgntInfo->State_AuthReqService)); - + //Check Status Code return TRUE; } @@ -1276,9 +1276,9 @@ OnAssocRsp( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } - + asocpdu.Octet = pRfd->Buffer.VirtualAddress; asocpdu.Length = pRfd->PacketLength; @@ -1287,13 +1287,13 @@ OnAssocRsp( //2004/08/23, kcwu, for ndtest pMgntInfo->RspCapability = Frame_AssocCap(asocpdu); pMgntInfo->RspStatusCode = Frame_AssocStatusCode(asocpdu); - pMgntInfo->RspAssociationID = Frame_AssocAID(asocpdu); + pMgntInfo->RspAssociationID = Frame_AssocAID(asocpdu); if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return FALSE; - } + } switch( pMgntInfo->State_AsocService ) { @@ -1308,7 +1308,7 @@ OnAssocRsp( MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, pMgntInfo->Bssid, 6); MgntUpdateAsocInfo(Adapter, UpdateAsocResp, asocpdu.Octet, asocpdu.Length); MgntUpdateAsocInfo(Adapter, UpdateFlagReAsocResp, (UCHAR*)&FlagReAsoc, sizeof(BOOLEAN)); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("OnAssocRsp(): STATE_Wait_Asoc_Response => RspStatusCode: %d, RspAssociationID: %d\n", pMgntInfo->RspStatusCode, pMgntInfo->RspAssociationID)); MlmeAssociateConfirm( Adapter, pRfd, &asocpdu, FALSE, MlmeStatus_success ); } @@ -1344,9 +1344,9 @@ OnReAssocRsp( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } - + Reasocpdu.Octet = pRfd->Buffer.VirtualAddress; Reasocpdu.Length = pRfd->PacketLength; @@ -1376,7 +1376,7 @@ OnReAssocRsp( MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, pMgntInfo->Bssid, 6); MgntUpdateAsocInfo(Adapter, UpdateAsocResp, Reasocpdu.Octet, Reasocpdu.Length); MgntUpdateAsocInfo(Adapter, UpdateFlagReAsocResp, (UCHAR*)&FlagReAsoc, sizeof(BOOLEAN)); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("OnReAssocRsp(): STATE_Wait_Reasoc_Response => RspStatusCode: %d, RspAssociationID: %d\n", Frame_AssocStatusCode(Reasocpdu), Frame_AssocAID(Reasocpdu))); MlmeAssociateConfirm( Adapter, pRfd, &Reasocpdu, TRUE, MlmeStatus_success ); } @@ -1410,11 +1410,11 @@ OnDisassoc( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } pMgntInfo->LinkDetectInfo.OnDisassocCnt++; //cosa add for debug - + disassocpdu.Octet = pRfd->Buffer.VirtualAddress; disassocpdu.Length = pRfd->PacketLength; @@ -1438,7 +1438,7 @@ OnDisassoc( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return FALSE; } - + disassocReason = Frame_DeassocReasonCode(disassocpdu); if(!ACTING_AS_AP(Adapter)) @@ -1447,13 +1447,13 @@ OnDisassoc( { u1Byte tmp_ssid[256]; u2Byte tmp_len = pMgntInfo->Ssid.Length; - + if(!pMgntInfo->bMediaConnect || pMgntInfo->bDisconnectRequest) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("bMediaConnect %d bDisconnectRequest %d \n", pMgntInfo->bMediaConnect, pMgntInfo->bDisconnectRequest)); return FALSE; } - + RT_TRACE(COMP_MLME, DBG_LOUD, ("OnDisassoc in STA mode (mAssoc%d, mIbss:%d)\n", pMgntInfo->mAssoc, pMgntInfo->mIbss)); RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "OnDisassoc from\n", disassocSta); @@ -1496,11 +1496,11 @@ OnDisassoc( DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_FAILURE); RT_TRACE(COMP_MLME, DBG_LOUD, ("OnDisassoc(): ReasonCode = %X\n", Frame_DeassocReasonCode(disassocpdu))); DrvIFIndicateDisassociation(Adapter, Frame_DeassocReasonCode(disassocpdu), pMgntInfo->Bssid); - + //2004/08/23, kcwu, the ssid should be retained PlatformMoveMemory(tmp_ssid, pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length); tmp_len = pMgntInfo->Ssid.Length; - + ResetMgntVariables( Adapter ); //Fix WPA WPA2 issue , New key will set after re-handshaking, by CCW 20070521 @@ -1509,7 +1509,7 @@ OnDisassoc( BOOLEAN bCCX8021xenable = FALSE; CCX_QueryCCKMSupport(Adapter, &bCCX8021xenable, &bAPSuportCCKM); - + if( pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch || (bAPSuportCCKM && bCCX8021xenable) ) // In CCKM mode will Clear key { @@ -1522,7 +1522,7 @@ OnDisassoc( pMgntInfo->Ssid.Length = tmp_len; Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BSSID, pMgntInfo->Bssid ); Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_MEDIA_STATUS, (pu1Byte)(&pMgntInfo->OpMode) ); - + // Start Roaming and do not indicate status to OS (XP), so we still keep connected until retry failed. By Bruce, 2008-08-16. // CCW said: we must indicate DISCONNECT when received DEAUTH frme include 4-way timeout. 2008-11-24 if( pMgntInfo->mDeauthCount > 2 || pMgntInfo->IndicateByDeauth) @@ -1540,7 +1540,7 @@ OnDisassoc( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return FALSE; } - + if( OS_SUPPORT_WDI(Adapter) == FALSE) { // Roaming, 2006.12.07, by shien chang. @@ -1557,12 +1557,12 @@ OnDisassoc( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); return FALSE; } MgntRoamComplete(Adapter, MlmeStatus_refused); // Roam failed. } - } + } } } } @@ -1576,11 +1576,11 @@ OnDisassoc( if(pEntry != NULL) { // Added by Annie, 2005-07-12. - if( pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK + if( pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK ||pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPA2PSK ||pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPA) Authenticator_StateINITIALIZE( Adapter, pEntry ); - + // // We should complete all SendNBLs before NDIS_STATUS_DOT11_DISASSOCIATION status is indicated // to prevent MiniportReturnNetBufferLists routine will be called in the same thread context and Rx deadlock in N6PciReturnNetBufferLists @@ -1588,18 +1588,18 @@ OnDisassoc( // 2013.06.26. // AsocEntry_BecomeDisassoc(Adapter, pEntry); - + if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) { - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, disassocSta, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, disassocSta, 6); DrvIFIndicateDisassociation(Adapter, Frame_DeassocReasonCode(disassocpdu), disassocSta); } else if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP) { pMgntInfo->pCurrentSta = pEntry; RT_TRACE(COMP_MLME, DBG_LOUD, ("OnDisassoc(): on VWIFI_AP ReasonCode = %X\n", Frame_DeassocReasonCode(disassocpdu))); - + DrvIFIndicateIncommingAssociationComplete(Adapter, Frame_DeassocReasonCode(disassocpdu)); DrvIFIndicateDisassociation(Adapter, Frame_DeassocReasonCode(disassocpdu), disassocSta); } @@ -1609,7 +1609,7 @@ OnDisassoc( } RemovePeerTS(Adapter, Frame_pSaddr(disassocpdu)); - + return TRUE; } @@ -1621,12 +1621,12 @@ OnDeauth( IN PRT_RFD pRfd ) { - PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; + PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; OCTET_STRING deauthpdu; pu1Byte deauBssid; u1Byte QueueID; PRT_TCB pTcb = NULL; - + pu1Byte deauSta; u1Byte tmp_ssid[256]; u2Byte tmp_len = pMgntInfo->Ssid.Length; @@ -1635,18 +1635,18 @@ OnDeauth( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } pMgntInfo->LinkDetectInfo.OnDeauthCnt++; //cosa add for debug - + deauthpdu.Octet = pRfd->Buffer.VirtualAddress; deauthpdu.Length = pRfd->PacketLength; deauBssid = Frame_pBssid(deauthpdu); - deauSta = Frame_Addr2(deauthpdu); + deauSta = Frame_Addr2(deauthpdu); - if(!IsDefaultAdapter(Adapter)&& + if(!IsDefaultAdapter(Adapter)&& !ACTING_AS_AP(Adapter) ) { // Is it possible failing into this condition???? Neo Test 123 @@ -1670,16 +1670,16 @@ OnDeauth( { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return FALSE; - } + } //RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "deauth:\n", deauthpdu.Octet, deauthpdu.Length); if( !ACTING_AS_AP(Adapter)) { // STA mode. - if( !MacAddr_isBcst(deauBssid)&&((PlatformCompareMemory( pMgntInfo->Bssid, deauBssid, 6 ) == 0) + if( !MacAddr_isBcst(deauBssid)&&((PlatformCompareMemory( pMgntInfo->Bssid, deauBssid, 6 ) == 0) || MgntIsMacAddrGroup( pMgntInfo->Bssid ))) - { + { switch(pMgntInfo->OpMode) { case RT_OP_MODE_IBSS: @@ -1688,7 +1688,7 @@ OnDeauth( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("bMediaConnect %d bDisconnectRequest %d \n", pMgntInfo->bMediaConnect, pMgntInfo->bDisconnectRequest)); break; } - + RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "OnDeauth in IBSS by deauSta: \n", deauSta); pEntry = AsocEntry_GetEntry(pMgntInfo, deauSta); @@ -1697,12 +1697,12 @@ OnDeauth( RT_TRACE(COMP_MLME, DBG_LOUD, ("OnDeauth in IBSS receive duplicate deauth \n")); break; } - + // - // We have to indicate the address of leaving peer STA to upper layer. + // We have to indicate the address of leaving peer STA to upper layer. // for example, authenticator/supplicant. // - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, deauSta, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, deauSta, 6); DrvIFIndicateDisassociation(Adapter, Frame_DeauthReasonCode(deauthpdu), deauSta); // @@ -1713,7 +1713,7 @@ OnDeauth( // 2008.08.05, haich. // //if(Adapter->bInHctTest == TRUE) -#if 0 +#if 0 { static u1Byte DummySta[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; @@ -1735,10 +1735,10 @@ OnDeauth( default: if(!pMgntInfo->bMediaConnect || pMgntInfo->bDisconnectRequest) { - RT_TRACE_F(COMP_MLME, DBG_LOUD, ("bMediaConnect %d bDisconnectRequest %d \n", pMgntInfo->bMediaConnect, pMgntInfo->bDisconnectRequest)); + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("bMediaConnect %d bDisconnectRequest %d \n", pMgntInfo->bMediaConnect, pMgntInfo->bDisconnectRequest)); break; } - + RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "OnDeauth in infra-BSS by deauSta: \n", deauSta); RT_TRACE(COMP_MLME, DBG_LOUD, ("OnDeauth() reason %d\n",Frame_DeauthReasonCode(deauthpdu))); @@ -1774,19 +1774,19 @@ OnDeauth( if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return FALSE; } - + // 2006.11.15, by shien chang. DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_FAILURE); DrvIFIndicateDisassociation(Adapter, Frame_DeauthReasonCode(deauthpdu), pMgntInfo->Bssid); - + //2004/08/23, kcwu, the ssid should be retained PlatformMoveMemory(tmp_ssid, pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length); tmp_len = pMgntInfo->Ssid.Length; - + if(GET_TDLS_ENABLED(pMgntInfo)) TDLS_Stop(Adapter); @@ -1801,7 +1801,7 @@ OnDeauth( { MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, FORCE_NO_INDICATE); } - + ResetMgntVariables( Adapter ); //Fix WPA WPA2 issue , New key will set after re-handshaking, by CCW 20070521 @@ -1810,7 +1810,7 @@ OnDeauth( BOOLEAN bCCX8021xenable = FALSE; CCX_QueryCCKMSupport(Adapter, &bCCX8021xenable, &bAPSuportCCKM); - + if( pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch || (bAPSuportCCKM && bCCX8021xenable) ) // In CCKM mode will Clear key { @@ -1826,10 +1826,10 @@ OnDeauth( if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); return FALSE; } - + if( OS_SUPPORT_WDI(Adapter) == FALSE ) { // Roaming, 2006.12.07, by shien chang. @@ -1856,16 +1856,16 @@ OnDeauth( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress MgntRoamRetry FAIL\n")); + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress MgntRoamRetry FAIL\n")); return FALSE; - } + } MgntRoamComplete(Adapter, MlmeStatus_refused); // Roam failed. - } + } } - } - + } + //do not send buffered packets while STA is deauthed by AP. - PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); for(QueueID = 0; QueueID < MAX_TX_QUEUE; QueueID++) { // 2004.08.11, revised by rcnjko. @@ -1885,19 +1885,19 @@ OnDeauth( } } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - + break; - } + } } } else { // AP mode. - if( PlatformCompareMemory( pMgntInfo->Bssid, deauBssid, 6 ) == 0) + if( PlatformCompareMemory( pMgntInfo->Bssid, deauBssid, 6 ) == 0) { if( MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) { - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, deauSta, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, deauSta, 6); pEntry = AsocEntry_GetEntry(pMgntInfo, deauSta); if( pEntry != NULL ) DrvIFIndicateDisassociation(Adapter, Frame_DeauthReasonCode(deauthpdu), deauSta); @@ -1912,7 +1912,7 @@ OnDeauth( RT_TRACE_F(COMP_AP, DBG_LOUD, ("AP_DisassociateStation in progress\n")); return TRUE; } - + DrvIFIndicateIncommingAssociationComplete(Adapter, Frame_DeauthReasonCode(deauthpdu)); if(pMgntInfo->pCurrentSta->bAssociated) { @@ -1928,13 +1928,13 @@ OnDeauth( MacIdDeregisterSpecificMacId(Adapter, pMgntInfo->pCurrentSta->AssociatedMacId); RT_TRACE(COMP_MLME, DBG_LOUD, ("OnDeauth(): ReasonCode = %X\n", Frame_DeauthReasonCode(deauthpdu))); - + DrvIFIndicateDisassociation(Adapter, Frame_DeauthReasonCode(deauthpdu), pMgntInfo->pCurrentSta->MacAddr); - } + } } } RT_TRACE_F(COMP_AP, DBG_LOUD, ("AsocEntry_RemoveStation case 2\n")); - + AsocEntry_RemoveStation(Adapter, deauSta); } } @@ -1970,9 +1970,9 @@ OnProbeReq( do { //3 //Note, the sequence of conditions are very important. - // Skip ProbeReq if SSID is neither any nor our SSID. + // Skip ProbeReq if SSID is neither any nor our SSID. ssidToScan = PacketGetElement(mmpdu, EID_SsId, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE ); - + // Check if this packet should be handled by P2P if(RT_STATUS_SUCCESS != P2P_OnProbeReq(Adapter, pRfd, &mmpdu)) { @@ -1981,13 +1981,13 @@ OnProbeReq( } // Skip ProbeReq if we are not in AP mode or we are not a coordinator of IBSS mode. - if( !(ACTING_AS_AP(Adapter)) && + if( !(ACTING_AS_AP(Adapter)) && !(pMgntInfo->mIbss && !pMgntInfo->mDisable && pMgntInfo->bIbssCoordinator) ) { break; } - // Skip ProbeReq if we are scanning. + // Skip ProbeReq if we are scanning. if( pMgntInfo->bScanInProgress && (Adapter->MgntInfo.dot11CurrentChannelNumber != RT_GetChannelNumber(Adapter))) { // RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "OnProbeReq(): Skip by ScanInProgress, Addr = ", SrcAddr); @@ -2014,9 +2014,9 @@ OnProbeReq( // RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "OnProbeReq(): Skip by P2P_IsGoAcceptProbeReq == BEACON_STOP, Addr = ", SrcAddr); } - // Skip ProbeReq if SSID is neither any nor our SSID. + // Skip ProbeReq if SSID is neither any nor our SSID. if( ssidToScan.Length > 0 && EqualOS(ssidToScan, pMgntInfo->Ssid) == FALSE) - break; + break; }while(FALSE); if(bSentProbRsp) @@ -2024,12 +2024,12 @@ OnProbeReq( // Send ProbeRsp to respond the ProbeReq received. SendProbeRsp(Adapter, SrcAddr, IsSSIDAny(ssidToScan), pRfd, &mmpdu); } - + return TRUE; } -VOID +VOID MlmeDeauthenticateRequest( PADAPTER Adapter, pu1Byte auSta, @@ -2050,7 +2050,7 @@ MlmeDeauthenticateRequest( u1Byte i; DrvIFIndicateDisassociation(Adapter, unspec_reason, pMgntInfo->Bssid); - + pMgntInfo->mAssoc = FALSE; pMgntInfo->AsocTimestamp = 0; for(i=0;i<6;i++) pMgntInfo->Bssid[i] = 0x22; //0x11; // Modified to 0x22 by Annie, I don't want it set addr[0] BIT0. 2006-05-04. @@ -2077,7 +2077,7 @@ MlmeDisassociateRequest( RemovePeerTS(Adapter, asSta); - if(!ACTING_AS_AP(Adapter)) + if(!ACTING_AS_AP(Adapter)) { if(pMgntInfo->RoamingState == ROAMINGSTATE_IDLE) SendDisassociation( Adapter, asSta, asRsn ); @@ -2096,13 +2096,13 @@ MlmeDisassociateRequest( if(!MgntRoamingInProgress(pMgntInfo)) MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE ); - + pMgntInfo->mAssoc = FALSE; pMgntInfo->AsocTimestamp = 0; for(i=0;i<6;i++) pMgntInfo->Bssid[i] = 0x22; pMgntInfo->OpMode = RT_OP_MODE_NO_LINK; Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_MEDIA_STATUS, (pu1Byte)(&pMgntInfo->OpMode) ); - + if(pMgntInfo->RoamingState == ROAMINGSTATE_IDLE) MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE ); @@ -2157,7 +2157,7 @@ OnCls2err( // 5. Remove whole entry. RT_TRACE_F(COMP_AP, DBG_LOUD, ("AsocEntry_RemoveStation case 3\n")); - + AsocEntry_RemoveStation( Adapter, auSta ); } else @@ -2165,7 +2165,7 @@ OnCls2err( //MlmeDeauthenticateRequest(Adapter, auSta, class2_err); } - RT_TRACE( COMP_RECV, DBG_LOUD, (" <== OnCls2err()\n") ); + RT_TRACE( COMP_RECV, DBG_LOUD, (" <== OnCls2err()\n") ); } @@ -2245,7 +2245,7 @@ OnAction( // // Note: - // Most types of action frame are issued for the specified BSS (depend on BSSID), but some like + // Most types of action frame are issued for the specified BSS (depend on BSSID), but some like // measurement pilot of Public Action frame similar to a subset of a beacon is allowed to receive // for any station when performing a scan process. // If anyone implements such action frames, we shall not check the BSSID here. By Bruce, 2009-07-17. @@ -2273,13 +2273,13 @@ OnAction( rtStatus = ActionFrameCmd[idx].CmdHandler(pAdapter, pRfd, posMpdu); if(RT_STATUS_SUCCESS != rtStatus) { - RT_TRACE_F(COMP_MLME, DBG_WARNING, + RT_TRACE_F(COMP_MLME, DBG_WARNING, ("[WARNING] Execute %s with status = %d\n", ActionFrameCmd[idx].Name, rtStatus)); } break; } - } - + } + return rtStatus; } @@ -2445,7 +2445,7 @@ EncapDataFrame_ParsePkt( rtStatus = EncapDataFrameCmd[idx].CmdHandler(pAdapter, pRfd, &osMpdu, contentOffset); if(RT_STATUS_SUCCESS != rtStatus) { - RT_TRACE_F(COMP_MLME, DBG_WARNING, + RT_TRACE_F(COMP_MLME, DBG_WARNING, ("[WARNING] Execute %s with status = %d\n", EncapDataFrameCmd[idx].Name, rtStatus)); } break; @@ -2466,15 +2466,15 @@ CopyWlanBss( FillOctetString((dest)->IE, (dest)->IEBuf, (src)->IE.Length); #if (WPS_SUPPORT == 1) - FillOctetString((dest)->bdSimpleConfIE, (dest)->bdSimpleConfIEBuf, (src)->bdSimpleConfIE.Length); - FillOctetString((dest)->osBeaconWcnIe, (dest)->BeaconWcnIeBuf, (src)->osBeaconWcnIe.Length); - FillOctetString((dest)->osProbeRspWcnIe, (dest)->ProbeRspWcnIeBuf, (src)->osProbeRspWcnIe.Length); + FillOctetString((dest)->bdSimpleConfIE, (dest)->bdSimpleConfIEBuf, (src)->bdSimpleConfIE.Length); + FillOctetString((dest)->osBeaconWcnIe, (dest)->BeaconWcnIeBuf, (src)->osBeaconWcnIe.Length); + FillOctetString((dest)->osProbeRspWcnIe, (dest)->ProbeRspWcnIeBuf, (src)->osProbeRspWcnIe.Length); #endif - FillOctetString((dest)->bdCountryIE, (dest)->bdCountryIEBuf, (src)->bdCountryIE.Length); - FillOctetString((dest)->BssQos.bdWMMIE, (dest)->BssQos.bdWMMIEBuf, (src)->BssQos.bdWMMIE.Length); - FillOctetString((dest)->WpaIe, (dest)->WpaIeBuf, (src)->WpaIe.Length); - FillOctetString((dest)->RsnIe, (dest)->RsnIeBuf, (src)->RsnIe.Length); - FillOctetString((dest)->osWmmAcParaIE, (dest)->WmmAcParaBuf, (src)->osWmmAcParaIE.Length); + FillOctetString((dest)->bdCountryIE, (dest)->bdCountryIEBuf, (src)->bdCountryIE.Length); + FillOctetString((dest)->BssQos.bdWMMIE, (dest)->BssQos.bdWMMIEBuf, (src)->BssQos.bdWMMIE.Length); + FillOctetString((dest)->WpaIe, (dest)->WpaIeBuf, (src)->WpaIe.Length); + FillOctetString((dest)->RsnIe, (dest)->RsnIeBuf, (src)->RsnIe.Length); + FillOctetString((dest)->osWmmAcParaIE, (dest)->WmmAcParaBuf, (src)->osWmmAcParaIE.Length); FillOctetString((dest)->osPowerConstraintIe, (dest)->PowerConstraintBuf, (src)->osPowerConstraintIe.Length); } diff --git a/network/wlan/WDI/COMMON/MgntGen.c b/network/wlan/WDI/COMMON/MgntGen.c index f45a22cb7..89a191f42 100644 --- a/network/wlan/WDI/COMMON/MgntGen.c +++ b/network/wlan/WDI/COMMON/MgntGen.c @@ -70,7 +70,7 @@ MgntInitRateSet( } // "|0x80" to tag it as basic rate. - + // WIRELESS_MODE_A: // WIRELESS_MODE_N_5G: // WIRELESS_MODE_AC_5G: @@ -150,19 +150,19 @@ MgntRefreshSuppRateSet( case WIRELESS_MODE_AC_24G: pMgntInfo->Regdot11OperationalRateSet = pMgntInfo->RegSuppRateSets[2]; break; - + default: pMgntInfo->Regdot11OperationalRateSet.Length = 0; // No legacy rate support!! break; - } + } if(IS_WIRELESS_MODE_N(Adapter)) { BOOLEAN b1SSSupport = FALSE; u1Byte Rf_Type = RT_GetRFType(Adapter); - PlatformMoveMemory( pMgntInfo->Regdot11HTOperationalRateSet, - pMgntInfo->RegHTSuppRateSet, + PlatformMoveMemory( pMgntInfo->Regdot11HTOperationalRateSet, + pMgntInfo->RegHTSuppRateSet, 16 ); if(Rf_Type == RF_1T1R || Rf_Type == RF_1T2R) b1SSSupport = TRUE; @@ -173,7 +173,7 @@ MgntRefreshSuppRateSet( if(b1SSSupport) pMgntInfo->Regdot11HTOperationalRateSet[1] = pMgntInfo->Regdot11HTOperationalRateSet[2] = 0x00; - } + } else PlatformZeroMemory(pMgntInfo->Regdot11HTOperationalRateSet, 16); @@ -181,8 +181,8 @@ MgntRefreshSuppRateSet( { u1Byte Rf_Type = RT_GetRFType(Adapter); - PlatformMoveMemory( pMgntInfo->Regdot11VHTOperationalRateSet, - pMgntInfo->RegVHTSuppRateSet, + PlatformMoveMemory( pMgntInfo->Regdot11VHTOperationalRateSet, + pMgntInfo->RegVHTSuppRateSet, 2 ); if(Rf_Type == RF_1T1R || Rf_Type == RF_1T2R) pMgntInfo->Regdot11VHTOperationalRateSet[0] = 0xfe; // Support 1SS MCS 0~9 @@ -196,9 +196,9 @@ MgntRefreshSuppRateSet( if(pVHTInfo->bUpdateMcsCap) VHTMaskSuppDataRate(pMgntInfo->Regdot11VHTOperationalRateSet, pVHTInfo->nRxSPStream, pVHTInfo->McsCapability); - pMgntInfo->RegVHTHighestOperaRate = VHTGetHighestMCSRate( Adapter, + pMgntInfo->RegVHTHighestOperaRate = VHTGetHighestMCSRate( Adapter, pMgntInfo->Regdot11VHTOperationalRateSet); - } + } else PlatformZeroMemory(pMgntInfo->Regdot11VHTOperationalRateSet, 2); @@ -207,7 +207,7 @@ MgntRefreshSuppRateSet( } // Allocate a fixed size buffer for general purpose using. -BOOLEAN +BOOLEAN MgntAllocGenTempBuffer( IN PADAPTER pAdapter ) @@ -220,10 +220,10 @@ MgntAllocGenTempBuffer( Status = PlatformAllocateMemory(pAdapter, &pAdapter->GenTempBufferArray.Ptr, pAdapter->GenTempBufferArray.Length); if(Status != RT_STATUS_SUCCESS) return FALSE; - + PlatformZeroMemory(pAdapter->GenTempBufferArray.Ptr, pAdapter->GenTempBufferArray.Length); RTInitializeListHead(&pAdapter->GenTempBufferQueue); - + pGenTmpBuf = (PRT_GEN_TEMP_BUFFER)pAdapter->GenTempBufferArray.Ptr; for(i=0;iGenTempBufferQueue, &pGenTmpBuf[i].List, &pAdapter->NumGenTempBufferIdle); + RTInsertTailListWithCnt(&pAdapter->GenTempBufferQueue, &pGenTmpBuf[i].List, &pAdapter->NumGenTempBufferIdle); } if (Status != RT_STATUS_SUCCESS) @@ -240,7 +240,7 @@ MgntAllocGenTempBuffer( return TRUE; } -BOOLEAN +BOOLEAN MgntFreeGenTempBuffer( IN PADAPTER pAdapter ) @@ -262,15 +262,15 @@ MgntFreeGenTempBuffer( while(!RTIsListEmpty(&pAdapter->GenTempBufferQueue)) { pGenTmpBuf = (PRT_GEN_TEMP_BUFFER)RTRemoveHeadListWithCnt(&pAdapter->GenTempBufferQueue, &pAdapter->NumGenTempBufferIdle); - + PlatformFreeMemory(pGenTmpBuf->Buffer.Ptr, GEN_TEMP_BUFFER_SIZE); nFreed++; } RT_ASSERT((nFreed==GEN_TEMP_BUFFER_NUM),("Freed General buffer(%d) less than allocated(%d)!!\n", nFreed, GEN_TEMP_BUFFER_NUM)); bReturn = FALSE; } - - + + { PlatformFreeMemory(pAdapter->GenTempBufferArray.Ptr, pAdapter->GenTempBufferArray.Length); } @@ -302,9 +302,9 @@ GetGenTempBuffer( else { pBuffer->isDynaAlloc = TRUE; - pBuffer->Buffer.Ptr = (u1Byte *)pBuffer + sizeof(RT_GEN_TEMP_BUFFER); + pBuffer->Buffer.Ptr = (u1Byte *)pBuffer + sizeof(RT_GEN_TEMP_BUFFER); pBuffer->Buffer.Length = Length; - PlatformZeroMemory((u1Byte *)pBuffer->Buffer.Ptr, Length); + PlatformZeroMemory((u1Byte *)pBuffer->Buffer.Ptr, Length); } } else @@ -339,20 +339,20 @@ ReturnGenTempBuffer( // // Description: -// Allocate memory of COMMON\. +// Allocate memory of COMMON\. // // Usage: // Memory Allocation: -// step 1. Add DECLARE_RT_OBJECT(OBJECT_TYPE) into the the type +// step 1. Add DECLARE_RT_OBJECT(OBJECT_TYPE) into the the type // (OBJECT_TYPE) to allocated. -// step 2. Use MGNT_ALLOC_RT_OBJECT(__ppObject, OBJECT_TYPE) to allocate memory -// for the type (OBJECT_TYPE) to specified address (__ppObject). +// step 2. Use MGNT_ALLOC_RT_OBJECT(__ppObject, OBJECT_TYPE) to allocate memory +// for the type (OBJECT_TYPE) to specified address (__ppObject). // // Memory Release: -// The object allocated in MgntAllocateMemory() will be release at +// The object allocated in MgntAllocateMemory() will be release at // MgntFreeMemory() automatically. // -// TODO: +// TODO: // Allocate MGNT_INFO. // #define MGNT_ALLOC_RT_OBJECT(__pAdapter, __ObjectList, __ppObject, __OBJECT_TYPE) \ @@ -373,9 +373,9 @@ MgntAllocMemory( INIT_RT_OBJECT_LIST(pObjectList); do { - MGNT_ALLOC_RT_OBJECT(pAdapter, pObjectList, (void**)&(pMgntInfo->pStaQos), STA_QOS); + MGNT_ALLOC_RT_OBJECT(pAdapter, pObjectList, (void**)&(pMgntInfo->pStaQos), STA_QOS); MGNT_ALLOC_RT_OBJECT(pAdapter, pObjectList, (void**)&(pMgntInfo->SecurityInfo.pCkipPara),CKIP_PARAMETER); -#if (WPS_SUPPORT == 1) +#if (WPS_SUPPORT == 1) MGNT_ALLOC_RT_OBJECT(pAdapter, pObjectList, &(pMgntInfo->pSimpleConfig), SIMPLE_CONFIG_T); #endif MGNT_ALLOC_RT_OBJECT(pAdapter, pObjectList, &(pMgntInfo->pDot11dInfo), RT_DOT11D_INFO); @@ -390,7 +390,7 @@ MgntAllocMemory( if(pAdapter == GetDefaultAdapter(pAdapter) && !CustomScan_AllocInfo(pAdapter)) break; - if( !AllocDrvLogMemory(pAdapter) ) + if( !AllocDrvLogMemory(pAdapter) ) break; if( !MgntAllocHashTables(pAdapter) ) @@ -430,9 +430,9 @@ MgntAllocMemory( // // Description: -// Free memory of COMMON\. +// Free memory of COMMON\. // -// TODO: +// TODO: // Allocate MGNT_INFO. // VOID @@ -444,17 +444,17 @@ MgntFreeMemory( PRT_LIST_ENTRY pObjectList = &(pMgntInfo->ObjectList); PRT_WLAN_STA pEntry = NULL; u4Byte i = 0; - - RT_ASSERT((pObjectList->Flink != NULL && pObjectList->Blink != NULL), + + RT_ASSERT((pObjectList->Flink != NULL && pObjectList->Blink != NULL), ("MgntFreeMemory(): Flink(%p) Blink(%p)\n", pObjectList->Flink, pObjectList->Blink)); - + WFD_FreeWfdInfo(pAdapter); P2PFreeAllocatedMemory(pAdapter); P2P_FreeP2PInfo(pAdapter); - - NAN_Free(pAdapter); + + NAN_Free(pAdapter); TDLS_FreeMemory(pAdapter); @@ -469,7 +469,7 @@ MgntFreeMemory( PlatformFreeMemory(pMgntInfo->AdditionalBeaconIEData, pMgntInfo->AdditionalBeaconIESize); pMgntInfo->AdditionalBeaconIESize = 0; } - + if(pMgntInfo->AdditionalResponseIESize > 0) { PlatformFreeMemory(pMgntInfo->AdditionalResponseIEData, pMgntInfo->AdditionalResponseIESize); @@ -481,24 +481,24 @@ MgntFreeMemory( PlatformFreeMemory(pMgntInfo->AdditionalAssocReqIEData, pMgntInfo->AdditionalAssocReqIESize); pMgntInfo->AdditionalAssocReqIESize= 0; } - + if (pMgntInfo->AdditionalProbeReqIESize > 0) { PlatformFreeMemory(pMgntInfo->AdditionalProbeReqIEData, pMgntInfo->AdditionalProbeReqIESize); pMgntInfo->AdditionalProbeReqIESize = 0; } - + for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { pEntry = &(pMgntInfo->AsocEntry[i]); if(pEntry) { if(pEntry->AP_RecvAsocReqLength > 0) - PlatformFreeMemory(pEntry->AP_RecvAsocReq, + PlatformFreeMemory(pEntry->AP_RecvAsocReq, pEntry->AP_RecvAsocReqLength); - + if(pEntry->AP_SendAsocRespLength > 0) - PlatformFreeMemory(pEntry->AP_SendAsocResp, + PlatformFreeMemory(pEntry->AP_SendAsocResp, pEntry->AP_SendAsocRespLength); } } @@ -522,7 +522,7 @@ MgntInitializeAllTimer( ) { PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; - PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); + PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; PRT_CHANNEL_INFO pChnlInfo = pMgntInfo->pChannelInfo; @@ -538,14 +538,14 @@ MgntInitializeAllTimer( PlatformInitializeTimer( Adapter, &pMgntInfo->JoinProbeReqTimer, (RT_TIMER_CALL_BACK)JoinProbeReq, NULL, "JoinProbeReq"); PlatformInitializeTimer(Adapter, &pMgntInfo->AuthTimer, (RT_TIMER_CALL_BACK) AuthTimeout, NULL, "AuthTimer"); PlatformInitializeTimer(Adapter, &pMgntInfo->AsocTimer, (RT_TIMER_CALL_BACK) AsocTimeout, NULL, "AsocTimer"); - PlatformInitializeTimer(Adapter, &pMgntInfo->SwBeaconTimer, (RT_TIMER_CALL_BACK)SwBeaconCallback, NULL, "SwBeaconTimer"); //use HW beacon Isaiah + PlatformInitializeTimer(Adapter, &pMgntInfo->SwBeaconTimer, (RT_TIMER_CALL_BACK)SwBeaconCallback, NULL, "SwBeaconTimer"); //use HW beacon Isaiah PlatformInitializeTimer(Adapter, &pMgntInfo->globalKeyInfo.KeyMgntTimer, (RT_TIMER_CALL_BACK)KeyMgntTimeout, NULL, "globalKeyInfo.KeyMgntTimer"); // Added by Annie, 2005-06-29. PlatformInitializeTimer(Adapter, &pMgntInfo->AwakeTimer, (RT_TIMER_CALL_BACK)AwakeTimerCallback, NULL, "AwakeTimer"); PlatformInitializeTimer(Adapter, &pPSC->InactivePsTimer, (RT_TIMER_CALL_BACK)InactivePsTimerCallback, NULL, "InactivePsTimer"); - PlatformInitializeTimer( Adapter, &pMgntInfo->PnpWakeUpJoinTimer, (RT_TIMER_CALL_BACK)PnPWakeUpJoinTimerCallback, NULL, "PnPWakeUpJoinTimerCallback"); - PlatformInitializeTimer(Adapter, &pMgntInfo->LedTimer, (RT_TIMER_CALL_BACK)LedTimerCallback, NULL, "LedTimer"); + PlatformInitializeTimer( Adapter, &pMgntInfo->PnpWakeUpJoinTimer, (RT_TIMER_CALL_BACK)PnPWakeUpJoinTimerCallback, NULL, "PnPWakeUpJoinTimerCallback"); + PlatformInitializeTimer(Adapter, &pMgntInfo->LedTimer, (RT_TIMER_CALL_BACK)LedTimerCallback, NULL, "LedTimer"); PlatformInitializeTimer(Adapter, &(pStaQos->ACMTimer), (RT_TIMER_CALL_BACK)QosACMTimerCallback, NULL, "ACMTimer"); - PlatformInitializeTimer(Adapter, &(pStaQos->AddTsTimer), (RT_TIMER_CALL_BACK)QosAddTsTimerCallback, NULL, "AddTsTimer"); + PlatformInitializeTimer(Adapter, &(pStaQos->AddTsTimer), (RT_TIMER_CALL_BACK)QosAddTsTimerCallback, NULL, "AddTsTimer"); PlatformInitializeTimer(Adapter, &(pMgntInfo->DelaySendBeaconTimer), (RT_TIMER_CALL_BACK)DelaySendBeaconTimerCallback, NULL, "DelayStartTimer"); PlatformInitializeTimer(Adapter, &(pMgntInfo->SecurityInfo.SAQueryTimer), (RT_TIMER_CALL_BACK)SAQueryTimerCallback, NULL, "SAQueryTimerCallback"); @@ -560,9 +560,9 @@ MgntInitializeAllTimer( NAN_InitTimer(Adapter); - PlatformInitializeTimer( Adapter, &pMgntInfo->WaitingKeyTimer, (RT_TIMER_CALL_BACK)WaitingKeyTimerCallback, NULL, "WaitingKeyTimerCallback"); + PlatformInitializeTimer( Adapter, &pMgntInfo->WaitingKeyTimer, (RT_TIMER_CALL_BACK)WaitingKeyTimerCallback, NULL, "WaitingKeyTimerCallback"); - //Move from HTInitializeHTInfo for avoiding defining duplicately. by wl 2012-01-13 + //Move from HTInitializeHTInfo for avoiding defining duplicately. by wl 2012-01-13 PlatformInitializeTimer( Adapter, &(pChnlInfo->SwBwTimer), (RT_TIMER_CALL_BACK)CHNL_SetBwChnlCallback, NULL, "SwVHTBwTimer"); } @@ -573,7 +573,7 @@ ResetPSCParameters(PADAPTER Adapter) { PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - //pPSC->bSwRfProcessing = FALSE ; + //pPSC->bSwRfProcessing = FALSE ; pPSC->ReturnPoint = IPS_CALLBACK_NONE; } @@ -601,31 +601,31 @@ ReleaseWatchDogTimer( PlatformReleaseTimer(Adapter, &Adapter->MgntInfo.WatchDogTimer); } - + VOID MgntCancelAllTimer( PADAPTER Adapter ) { PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; - PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); + PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; PRT_CHANNEL_INFO pChannelInfo = pMgntInfo->pChannelInfo; FunctionIn(COMP_MLME); - + if(MgntScanInProgress(pMgntInfo)) MgntResetScanProcess(Adapter); PlatformCancelTimer(Adapter, &pMgntInfo->ScanTimer); { PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); - + while(pLoopAdapter) { pLoopAdapter->MgntInfo.bScanInProgress = FALSE; pLoopAdapter->MgntInfo.bDualModeScanStep = 0; - + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } @@ -637,11 +637,11 @@ MgntCancelAllTimer( PlatformCancelTimer(Adapter, &pMgntInfo->AsocTimer); PlatformCancelTimer(Adapter, &pMgntInfo->SwBeaconTimer); PlatformCancelTimer(Adapter, &pMgntInfo->globalKeyInfo.KeyMgntTimer); // Added by Annie, 2005-06-29. - PlatformCancelTimer(Adapter, &pMgntInfo->AwakeTimer); - PlatformCancelTimer(Adapter, &pPSC->InactivePsTimer); + PlatformCancelTimer(Adapter, &pMgntInfo->AwakeTimer); + PlatformCancelTimer(Adapter, &pPSC->InactivePsTimer); pPSC->ReturnPoint = IPS_CALLBACK_NONE; PlatformCancelTimer(Adapter, &pMgntInfo->PnpWakeUpJoinTimer); - PlatformCancelTimer(Adapter, &pMgntInfo->LedTimer); + PlatformCancelTimer(Adapter, &pMgntInfo->LedTimer); PlatformCancelTimer(Adapter, &(pStaQos->ACMTimer)); PlatformCancelTimer(Adapter, &(pStaQos->AddTsTimer)); PlatformCancelTimer(Adapter, &(pMgntInfo->DelaySendBeaconTimer)); @@ -650,7 +650,7 @@ MgntCancelAllTimer( DFS_TimerContrl(Adapter, DFS_TIMER_CANCEL); -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) { P2PCancelTimer(Adapter); } @@ -694,7 +694,7 @@ MgntReleaseAllTimer( PlatformReleaseTimer(Adapter, &pMgntInfo->globalKeyInfo.KeyMgntTimer); PlatformReleaseTimer(Adapter, &pMgntInfo->AwakeTimer); PlatformReleaseTimer(Adapter, &pPSC->InactivePsTimer); - PlatformReleaseTimer(Adapter, &pMgntInfo->PnpWakeUpJoinTimer); + PlatformReleaseTimer(Adapter, &pMgntInfo->PnpWakeUpJoinTimer); PlatformReleaseTimer(Adapter, &pMgntInfo->DelaySendBeaconTimer); PlatformReleaseTimer(Adapter, &pMgntInfo->SecurityInfo.SAQueryTimer); PlatformReleaseTimer(Adapter, &pMgntInfo->LedTimer); @@ -702,7 +702,7 @@ MgntReleaseAllTimer( PlatformReleaseTimer(Adapter, &(pStaQos->AddTsTimer)); DFS_TimerContrl(Adapter, DFS_TIMER_RELEASE); - + #if (P2P_SUPPORT == 1) { P2PReleaseTimer(Adapter); @@ -718,7 +718,7 @@ MgntReleaseAllTimer( // // Description: -// Initialize workitems at driver initialization. +// Initialize workitems at driver initialization. // VOID MgntInitializeAllWorkItem( @@ -726,54 +726,54 @@ MgntInitializeAllWorkItem( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->IbssStartRequestWorkItem), - IbssStartRequestCallback, + &(pMgntInfo->IbssStartRequestWorkItem), + IbssStartRequestCallback, (PVOID)Adapter, "IbssStartRequestWorkItem"); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->ApStartRequestWorkItem), - AP_StartApRequest, + &(pMgntInfo->ApStartRequestWorkItem), + AP_StartApRequest, (PVOID)Adapter, "ApStartRequestWorkItem"); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->DropPacketWorkItem), - DropPacketWorkitemCallback, + &(pMgntInfo->DropPacketWorkItem), + DropPacketWorkitemCallback, (PVOID)Adapter, "DropPacketWorkItem"); PlatformInitializeWorkItem( - Adapter, + Adapter, &(pMgntInfo->ApSendDisassocWithOldChnlWorkitem), Ap_SendDisassocWithOldChnlWorkitemCallback, - (PVOID)Adapter, + (PVOID)Adapter, "Ap_SendDisassocWithOldChnlWorkitem"); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->DozeWorkItem), - DozeWorkItemCallback, + &(pMgntInfo->DozeWorkItem), + DozeWorkItemCallback, (PVOID)Adapter, "DozeWorkItem"); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->AwakeWorkItem), - AwakeWorkItemCallback, + &(pMgntInfo->AwakeWorkItem), + AwakeWorkItemCallback, (PVOID)Adapter, "AwakeWorkItem"); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->TbttPollingWorkItem), - TbttPollingWorkItemCallback, + &(pMgntInfo->TbttPollingWorkItem), + TbttPollingWorkItemCallback, (PVOID)Adapter, "TbttPollingWorkItem"); @@ -786,8 +786,8 @@ MgntInitializeAllWorkItem( PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->UpdateTxPowerWorkItem), - UpdateTxPowerDbmWorkItemCallback, + &(pMgntInfo->UpdateTxPowerWorkItem), + UpdateTxPowerDbmWorkItemCallback, (PVOID)Adapter, "UpdateTxPowerWorkItem"); @@ -798,19 +798,19 @@ MgntInitializeAllWorkItem( &(pMgntInfo->NICVerify), (RT_WORKITEM_CALL_BACK)DBG_Verify_Console, (PVOID)Adapter, - "NIC Verify Console"); + "NIC Verify Console"); #endif DFS_WorkItemContrl(Adapter, DFS_WORKITEM_INIT); - -#if (P2P_SUPPORT == 1) + +#if (P2P_SUPPORT == 1) { PP2P_INFO pP2PInfo = (PP2P_INFO)pMgntInfo->pP2PInfo; - + PlatformInitializeWorkItem( Adapter, - &(pP2PInfo->P2PPSWorkItem), + &(pP2PInfo->P2PPSWorkItem), (RT_WORKITEM_CALL_BACK)P2PPsWorkItemCallback, (PVOID)pP2PInfo, "P2PPsTimeoutWorkItem"); @@ -826,32 +826,32 @@ MgntInitializeAllWorkItem( #if(AUTO_CHNL_SEL_NHM == 1) PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->AutoChnlSel.AutoChnlSelWorkitem), - MgntAutoChnlSelWorkitemCallback, + &(pMgntInfo->AutoChnlSel.AutoChnlSelWorkitem), + MgntAutoChnlSelWorkitemCallback, (PVOID)Adapter, "MgntAutoChnlSelWorkitemCallback"); #endif PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->PowerSaveControl.FwPsClockOnWorkitem), - FwPsClockOnWorkitemCallback, + &(pMgntInfo->PowerSaveControl.FwPsClockOnWorkitem), + FwPsClockOnWorkitemCallback, (PVOID)Adapter, "FwPsClockOnWorkitemCallback"); PlatformInitializeWorkItem( Adapter, - &(pMgntInfo->ChangeBwChnlFromPeerWorkitem), - CHNL_ChangeBwChnlFromPeerWorkitemCallBack, + &(pMgntInfo->ChangeBwChnlFromPeerWorkitem), + CHNL_ChangeBwChnlFromPeerWorkitemCallBack, (PVOID)Adapter, - "CHNL_ChangeBwChnlFromPeerWorkitemCallBack"); + "CHNL_ChangeBwChnlFromPeerWorkitemCallBack"); } // // Description: -// Free workitems at driver unload. +// Free workitems at driver unload. // VOID MgntFreeAllWorkItem( @@ -875,14 +875,14 @@ MgntFreeAllWorkItem( #if (AUTO_CHNL_SEL_NHM == 1) PlatformFreeWorkItem(&(pMgntInfo->AutoChnlSel.AutoChnlSelWorkitem)); #endif - -#if DBG_CMD + +#if DBG_CMD PlatformFreeWorkItem(&(pMgntInfo->NICVerify)); -#endif +#endif DFS_WorkItemContrl(Adapter, DFS_WORKITEM_FREE); NAN_FreeAllWorkItem(Adapter); - + #if (P2P_SUPPORT == 1) { PP2P_INFO pP2PInfo = (PP2P_INFO)pMgntInfo->pP2PInfo; @@ -956,7 +956,7 @@ ResetMgntVariables( pMgntInfo->state_Synchronization_Sta_BeforeScan = STATE_No_Bss; pMgntInfo->bJoinInProgress = FALSE; - + pMgntInfo->bMlmeStartReqRsn = MLMESTARTREQ_NONE; MgntResetRoamingState(pMgntInfo); MgntResetJoinCounter(pMgntInfo); @@ -970,7 +970,7 @@ ResetMgntVariables( } pMgntInfo->LinkDetectInfo.SlotNum = 2; pMgntInfo->LinkDetectInfo.SlotIndex = 0; - + MgntRefreshSuppRateSet( Adapter ); // Intialize IBSS related setting. 2004.12.10, by rcnjko. @@ -986,21 +986,21 @@ ResetMgntVariables( pMgntInfo->LastRxUniFragNum = 0xff; pMgntInfo->LastRxUniSeqNum = 0xffff; - + // Reset QoS related variables. Added by Annie, 2005-11-07. QosInitializeSTA( Adapter ); // Reset HT related variables. - //[win7 Two Port BW40Mhz issue] Extention Port obey the rule of Default Port + //[win7 Two Port BW40Mhz issue] Extention Port obey the rule of Default Port //2009.05.20, by Bohn HTInitializeHTInfo( Adapter ); //VHT VHTInitializeVHTInfo(Adapter); - + // Reset TS related variables. TSInitialize( Adapter ); @@ -1025,13 +1025,13 @@ ResetMgntVariables( PlatformFreeMemory(pMgntInfo->AdditionalBeaconIEData, pMgntInfo->AdditionalBeaconIESize); pMgntInfo->AdditionalBeaconIESize = 0; } - + if(pMgntInfo->AdditionalResponseIESize > 0) { PlatformFreeMemory(pMgntInfo->AdditionalResponseIEData, pMgntInfo->AdditionalResponseIESize); pMgntInfo->AdditionalResponseIESize = 0; } - + if(pMgntInfo->AdditionalAssocReqIESize > 0) { PlatformFreeMemory(pMgntInfo->AdditionalAssocReqIEData, pMgntInfo->AdditionalAssocReqIESize); @@ -1040,7 +1040,7 @@ ResetMgntVariables( // // Initialize SSID list to scan. - // + // MgntInitSsidsToScan(Adapter); pMgntInfo->bIndicateConnectEvent = FALSE; @@ -1055,7 +1055,7 @@ ResetMgntVariables( DFS_StaMgntResetVars(Adapter); - // Initialize TIE and 802.11 MFP + // Initialize TIE and 802.11 MFP pMgntInfo->TIE.Octet = pMgntInfo->TIEBuff; pMgntInfo->TIE.Length = 0; pMgntInfo->bInBIPMFPMode = FALSE; @@ -1067,7 +1067,7 @@ ResetMgntVariables( // // Description: // 1. Initialize management related S/W resource. -// 2. Initialize default value of management related attributes, RegXXX, and +// 2. Initialize default value of management related attributes, RegXXX, and // reset 802.11 management related variables to initial state. // // Assumption: @@ -1088,39 +1088,39 @@ InitializeMgntVariables( // 09/08/17 MH From Clevo 830/840 test, we need to forbid DM when we try to enter S3/S4. // The function os not enabled now!!!!! pMgntInfo->bPwrSaveState = FALSE; - Adapter->bDriverIsGoingToPnpSetPowerSleep = FALSE; + Adapter->bDriverIsGoingToPnpSetPowerSleep = FALSE; Adapter->bHWSecurityInWoL = FALSE; Adapter->bEnterPnpSleep = FALSE; Adapter->bWakeFromPnpSleep = FALSE; Adapter->bDriverShutdown = FALSE; Adapter->bInWoWLANPowerState = FALSE; Adapter->CPWMTimeoutCount = 0; - + pMgntInfo->DelayLPSLastTimeStamp = 0; pMgntInfo->bReceiveSystemPSOID = FALSE; - + // Initialize timer and workitems. MgntInitializeAllTimer(Adapter); MgntInitializeAllWorkItem(Adapter); // Init watchdog timer InitializeWatchDogTimer(Adapter); - + // // Initialize default setting, which might be overrided as user desired ones. - // For example, registry in Windows case.. + // For example, registry in Windows case.. // FillOctetString( pMgntInfo->Ssid, pMgntInfo->SsidBuf, 0 ); -#if 1 +#if 1 if(GetFirstClientPort(Adapter) || GetFirstGOPort(Adapter)) { //Set SSID as dummy to stop the current join process. SET_SSID_DUMMY(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length); } #endif - + MgntInitRateSet(Adapter); pMgntInfo->FragThreshold=2347; @@ -1161,8 +1161,8 @@ InitializeMgntVariables( // Initialize offset for querying cloud key pMgntInfo->cloud_key_offset = 0; pMgntInfo->StaCount = 0; - - + + // SW RF state. 2006.12.18, by shien chang. if(pMgntInfo->RegRfOff == TRUE) pMgntInfo->eSwRfPowerState = eRfOff; @@ -1172,12 +1172,12 @@ InitializeMgntVariables( pMgntInfo->LinkDetectInfo.NumRxUnicastTxOkThresh = 8; pMgntInfo->LinkDetectInfo.NumRxUnicastThresh = 2; pMgntInfo->LinkDetectInfo.NumRxOkThresh = 0xff; - + // For inactive power save mode, 2007.07.16, by shien chang. pMgntInfo->PowerSaveControl.bInactivePs = FALSE; pMgntInfo->PowerSaveControl.bIPSModeBackup = FALSE; // Default AC mode, wait for pnp notify to change it. - pMgntInfo->PowerSaveControl.PowerProfile = 1; + pMgntInfo->PowerSaveControl.PowerProfile = 1; // Default No power saving level, wait for oid notify to change it. pMgntInfo->PowerSaveControl.PowerSaveLevel = POWER_SAVING_NO_POWER_SAVING; pMgntInfo->PowerSaveControl.PowerMode = POWER_SAVING_NO_POWER_SAVING; @@ -1186,10 +1186,10 @@ InitializeMgntVariables( pMgntInfo->PowerSaveControl.bDisableLPSByOID = FALSE; pMgntInfo->PowerSaveControl.bEnterLPSDuringSuspend = FALSE; pMgntInfo->PowerSaveControl.bFindWakePacket = TRUE; // default set to TRUE - + // For network monitor mode, 2007.08.06, by shien chang. pMgntInfo->bNetMonitorMode = FALSE; - + pMgntInfo->ClientConfigPwrInDbm = UNSPECIFIED_PWR_DBM; pMgntInfo->RegCapAKMSuite = DEFAULT_SUPPORT_AKM_SUITE; @@ -1200,9 +1200,9 @@ InitializeMgntVariables( // Clear the rejected association AP, 2006.12.07, by shien chang. // MgntClearRejectedAsocAP(Adapter); - + Dot11d_Reset(Adapter); // 070315, by rcnjko. - + RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_INIT, NULL, NULL); // Initialize AP Mode Info @@ -1225,23 +1225,23 @@ InitializeMgntVariables( // // 2010/12/28 MH We need to move the init start position. - // + // // ===================================== WPS_Init(Adapter); // 2011/01/12 MH Revice for WAPI. WAPI_SecFuncHandler(WAPI_ENABLEWAPISUPPORT, Adapter, WAPI_END); - + // 2011/12/07 hpfan Add for Tcp Reorder TcpReorder_Init(Adapter); - // ===================================== + // ===================================== Adapter->bReceiveCpwmInt = FALSE; #if (USB_TX_THREAD_ENABLE) Adapter->bUseUsbTxThread = FALSE; -#endif +#endif + - GET_POWER_SAVE_CONTROL(pMgntInfo)->bOSSupportProtocolOffload = TRUE; if(Adapter == GetDefaultAdapter(Adapter)) @@ -1334,7 +1334,7 @@ MgntGetBuffer( return TRUE; } else - { + { ReturnLocalBuffer(pDefaultAdapter, *ppBuf); } } @@ -1396,7 +1396,7 @@ MgntSendPacket( NicIFSendPacket(Adapter, pTcb); } -BOOLEAN +BOOLEAN MgntRetryPacket( PADAPTER pAdapter, OCTET_STRING pduOS, @@ -1413,7 +1413,7 @@ MgntRetryPacket( //DbgPrint("CurrentSeqNum = %d\n", CurrentSeqNum, CurrentSeqNum); if(!MacAddr_isMulticast(pDaddr)) - { + { if(Frame_Retry(pduOS)) { switch(packettype) @@ -1457,14 +1457,14 @@ MgntRetryPacket( break; case Type_Disasoc: pMgntInfo->last_Disassoc_seq = CurrentSeqNum; - break; + break; case Type_Deauth: pMgntInfo->last_Deauth_seq = CurrentSeqNum; - break; + break; default: break; } - } + } } return retryPkt; @@ -1481,7 +1481,7 @@ MgntDuplicatePacketDetection( pu1Byte pTaddr, pRaddr; u1Byte CurrentFragNum; // 4 bits. u2Byte CurrentSeqNum; // 12 bits. - + pduOS.Octet = pRfd->Buffer.VirtualAddress; pduOS.Length = pRfd->PacketLength; @@ -1492,12 +1492,12 @@ MgntDuplicatePacketDetection( return TRUE; // by Owen on 05/01/10 for filtering duplicated data frames and dropping these packets - // Only consider unicast and retry packet. 2005.06.21, by rcnjko. + // Only consider unicast and retry packet. 2005.06.21, by rcnjko. // To keep the SeqNum, FragNum, SrcAddr for every packets and filter the retry packet which already received. // For WMM, these information should be keep for each AC // For 802.11e, these information shold be keep for each TID. Joseph, 2005-12-16 // Here we just handle the duplicate retry packet which is received immediately after last packets. - // For the condition that receiving duplicate packets with Block Ack, we just handle it in RxReorder process. + // For the condition that receiving duplicate packets with Block Ack, we just handle it in RxReorder process. // Joseph, 2007-09-27 #if 0 // Sequence Number & Duplicate Packet Indication Debug @@ -1513,17 +1513,17 @@ MgntDuplicatePacketDetection( CurrentFragNum = (u1Byte)Frame_FragNum(pduOS); CurrentSeqNum = (u2Byte)Frame_SeqNum(pduOS); - + if(ACTING_AS_AP(Adapter)) { PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pTaddr); - + if(pEntry != NULL) { if(pRfd->Status.pRxTS==NULL) { - if( Frame_Retry(pduOS) && - (CurrentFragNum == pEntry->LastRxUniFragNum) && + if( Frame_Retry(pduOS) && + (CurrentFragNum == pEntry->LastRxUniFragNum) && (CurrentSeqNum == pEntry->LastRxUniSeqNum) ) { return FALSE; @@ -1532,12 +1532,12 @@ MgntDuplicatePacketDetection( { pEntry->LastRxUniFragNum = CurrentFragNum; pEntry->LastRxUniSeqNum = CurrentSeqNum; - } + } } else { - if( Frame_Retry(pduOS) && - (CurrentFragNum == pRfd->Status.pRxTS->RxLastFragNum) && + if( Frame_Retry(pduOS) && + (CurrentFragNum == pRfd->Status.pRxTS->RxLastFragNum) && (CurrentSeqNum == pRfd->Status.pRxTS->RxLastSeqNum) ) { return FALSE; @@ -1552,7 +1552,7 @@ MgntDuplicatePacketDetection( else { //not retrun false,as 92d dual mac smart concurrent need. - //example:mac1 soft ap reset,but have no right time to disconnect all sta, so client still connect,need to send deauth fram as below process . + //example:mac1 soft ap reset,but have no right time to disconnect all sta, so client still connect,need to send deauth fram as below process . // zhiyuan 2011/11/18 RT_TRACE(COMP_RECV,DBG_LOUD,("pEntry is null ,don't return false as 92d easy smart concurrent need\n")); // return FALSE; @@ -1562,9 +1562,9 @@ MgntDuplicatePacketDetection( { if(pRfd->Status.pRxTS==NULL) { - if( Frame_Retry(pduOS) && + if( Frame_Retry(pduOS) && PlatformCompareMemory(pMgntInfo->LastRxUniSrcAddr, pTaddr, 6)== 0 && - (CurrentFragNum == pMgntInfo->LastRxUniFragNum) && + (CurrentFragNum == pMgntInfo->LastRxUniFragNum) && (CurrentSeqNum == pMgntInfo->LastRxUniSeqNum) ) { //RT_TRACE(COMP_RECV, DBG_LOUD, ("[SNDBG] STA MgntFilterReceivedPacket(): filtering duplicated data frames and dropping these packets\n")); @@ -1576,12 +1576,12 @@ MgntDuplicatePacketDetection( pMgntInfo->LastRxUniSeqNum = CurrentSeqNum; PlatformMoveMemory( pMgntInfo->LastRxUniSrcAddr, pTaddr, 6 ); //RT_TRACE(COMP_RECV, DBG_LOUD, ("[SNDBG] STA MgntFilterReceivedPacket(): Record it.\n" )); - } + } } else { - if( Frame_Retry(pduOS) && - (CurrentFragNum == pRfd->Status.pRxTS->RxLastFragNum) && + if( Frame_Retry(pduOS) && + (CurrentFragNum == pRfd->Status.pRxTS->RxLastFragNum) && (CurrentSeqNum == pRfd->Status.pRxTS->RxLastSeqNum) ) { return FALSE; @@ -1593,7 +1593,7 @@ MgntDuplicatePacketDetection( } } } - + return TRUE; } @@ -1635,7 +1635,7 @@ MgntWMMPSPacket( { // Temp solution for P2P Test Plan 6.1.13 and 7.1.5. By Bruce, 2010-06-30. pMgntInfo->pStaQos->bWmmMoreData = Frame_MoreData(pduOS) ? TRUE : FALSE; - + if( GET_QOS_CTRL_WMM_EOSP(pdu) ) { RT_TRACE(COMP_POWER, DBG_TRACE, ("MgntFilterReceivedPacket(): <<<<<<<<<< Leave APSD service period <<<<<<<<<<\n")); @@ -1649,7 +1649,7 @@ MgntWMMPSPacket( if(pMgntInfo->dot11PowerSaveMode != eActive && (!ACTING_AS_AP(Adapter))) { if((Frame_MoreData(pduOS)==TRUE)) - { + { OnMoreData(Adapter); } } @@ -1669,8 +1669,8 @@ MgntFilterReceivedPacket( PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; OCTET_STRING pduOS; u1Byte WAIPkt = 0; - AUTH_STATUS_T state_auth; - ASOC_STATUS_T state_asoc; + AUTH_STATUS_T state_auth; + ASOC_STATUS_T state_asoc; BOOLEAN bAcceptable = TRUE; BOOLEAN bValidAddr4; BOOLEAN bToOtherSTA = FALSE; @@ -1698,13 +1698,13 @@ MgntFilterReceivedPacket( // // Filter out unicast frames to other STA. - // Note that, it is to prevent unicast mgnt frame change our mgnt state machine, + // Note that, it is to prevent unicast mgnt frame change our mgnt state machine, // for example, deauth frame to other STA should cause us become deauthenitacted. // 2006.01.11, by rcnjko. // if( !MacAddr_isMulticast(pRaddr) && !eqMacAddr(pRaddr, Adapter->CurrentAddress) ) { // Unicast frame to other STA. - + if(pMgntInfo->bPSPXlinkMode == TRUE) { bToOtherSTA = TRUE; @@ -1716,15 +1716,15 @@ MgntFilterReceivedPacket( bToOtherSTA = TRUE; pRfd->Status.bForward = TRUE; } - } - else + } + else return FALSE; } // Filter out data packet that is not AMSDU but length >= 2k if (Frame_ContainQc(pduOS) && (GET_QOS_CTRL_HC_CFP_USRSVD(pduOS.Octet) != 1) && (pRfd->PacketLength>= 2048)) { - RT_TRACE(COMP_RECV, DBG_LOUD, + RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): Not AMSDU, but packet lenght > 2k, Dropped!!!===\n")); return FALSE; } @@ -1738,12 +1738,12 @@ MgntFilterReceivedPacket( //---------------------------------------------- // <1>Reject frames before connection established. // <2>Reject Encrypted Management frame except 3rd auth frame. - // <3>Management frame filter - // <4>Control frame filter + // <3>Management frame filter + // <4>Control frame filter // <5>filter frames from different BSS - // <6>Data frame filter + // <6>Data frame filter //------- - // return + // return // FALSE to free received frame // TRUE to Defrag Packet //---------------------------------------------- @@ -1778,7 +1778,7 @@ MgntFilterReceivedPacket( MgntSsInquiry( Adapter, pTaddr, &state_auth, &state_asoc ); // ---------------------------------------------------- - // <3>Management frame filter + // <3>Management frame filter // ---------------------------------------------------- if( IsMgntFrame(pdu) ){ if (bToOtherSTA ) @@ -1816,7 +1816,7 @@ MgntFilterReceivedPacket( } // ---------------------------------------------------- - // <4>Control frame filter + // <4>Control frame filter // ---------------------------------------------------- if( IsCtrlFrame(pdu) ) { @@ -1831,7 +1831,7 @@ MgntFilterReceivedPacket( else { if( state_auth == not_auth ) - Mgnt_Indicate(Adapter, pRfd, class2); + Mgnt_Indicate(Adapter, pRfd, class2); else Mgnt_Indicate(Adapter, pRfd, class3); } @@ -1857,21 +1857,21 @@ MgntFilterReceivedPacket( // ---------------------------------------------------- // <5>filter frames from different BSS // ---------------------------------------------------- - if( !bValidAddr4 && + if( !bValidAddr4 && !eqMacAddr(pMgntInfo->Bssid, Frame_pBssid(pduOS)) ) { RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): filter frames from different BSS.\n")); - RT_TRACE(COMP_RECV, DBG_LOUD, - ("bValidAddr4 =%d BSSID=[%02x-%02x-%02x-%02x-%02x-%02x]\n", - bValidAddr4, pMgntInfo->Bssid[0], pMgntInfo->Bssid[1], pMgntInfo->Bssid[2], + RT_TRACE(COMP_RECV, DBG_LOUD, + ("bValidAddr4 =%d BSSID=[%02x-%02x-%02x-%02x-%02x-%02x]\n", + bValidAddr4, pMgntInfo->Bssid[0], pMgntInfo->Bssid[1], pMgntInfo->Bssid[2], pMgntInfo->Bssid[3], pMgntInfo->Bssid[4], pMgntInfo->Bssid[5])); return FALSE; } // - // Note : - // This is to fix the issue that if we failed to receive AssocRsp and + // Note : + // This is to fix the issue that if we failed to receive AssocRsp and // the AP starts 4-way, indicating the EAPOL-KEY may crash the supplicant. // Not sure if this has any impact on BT // @@ -1884,24 +1884,24 @@ MgntFilterReceivedPacket( RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): Media is Disconnect.\n")); return FALSE; } - + } } - // When WPS Enable We save the Packet then Drop the packet we won't pass to OS + // When WPS Enable We save the Packet then Drop the packet we won't pass to OS if(GET_SIMPLE_CONFIG_ENABLED(pDefaultMgntInfo) && SecIsEAPOLPacket( Adapter, &pduOS )) { WPS_CopyRxEAPPacket(Adapter, pRfd); return FALSE; } - + WAPI_SecFuncHandler(WAPI_SECISWAIPACKET,Adapter,(PVOID)&pduOS,(PVOID)&WAIPkt,WAPI_END); - if(WAIPkt != 0)//WAI Pkt + if(WAIPkt != 0)//WAI Pkt { RT_TRACE(COMP_SEC,DBG_LOUD,("MgntFilterReceivedPacket WAIPkt = %d\n",WAIPkt)); return TRUE; } - + if( ACTING_AS_AP(Adapter) ) { // AP mode @@ -1912,8 +1912,8 @@ MgntFilterReceivedPacket( // AP mode: parse the EAPOL packets. Added by Annie, 2005-07-10. // Our authenticator don't handle EAPOL on WDS, 2006.06.14, by rcnjko. // - if( !bValidAddr4 && SecIsEAPOLPacket( Adapter, &pduOS ) && - MgntActQuery_ApType(Adapter) != RT_AP_TYPE_VWIFI_AP + if( !bValidAddr4 && SecIsEAPOLPacket( Adapter, &pduOS ) && + MgntActQuery_ApType(Adapter) != RT_AP_TYPE_VWIFI_AP && MgntActQuery_ApType(Adapter) != RT_AP_TYPE_LINUX ) { AP_OnEAPOL( Adapter, pRfd ); @@ -1921,13 +1921,13 @@ MgntFilterReceivedPacket( } } else - { // STA mode + { // STA mode if(pMgntInfo->PowerSaveControl.WoWLANS5Support && SecIsEAPOLPacket(Adapter, &pduOS)) { SecStaGetANoseForS5(Adapter, &pduOS); } - + if(IS_TDL_EXIST(pMgntInfo)) TDLS_PS_UpdatePeerPSState(Adapter, &pduOS, FALSE); } @@ -1946,19 +1946,19 @@ MgntFilterReceivedPacket( if( Frame_WEP(pduOS) == FALSE && !bValidAddr4 ) { BOOLEAN bMoreFrag = (BOOLEAN)Frame_MoreFrag(pduOS); - u1Byte FragNum = (u1Byte)Frame_FragNum(pduOS); + u1Byte FragNum = (u1Byte)Frame_FragNum(pduOS); BOOLEAN bWPSEnable = FALSE; bWPSEnable = Adapter->pNdis62Common->bWPSEnable; // EAPOL Request may be fragments. 2004.10.05, by rcnjko. - if( (!bMoreFrag && FragNum == 0) && // Non-fragment + if( (!bMoreFrag && FragNum == 0) && // Non-fragment !SecIsEAPOLPacket(Adapter,&pduOS) ) { RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): station with Encryption Algrithm. Only EAPOL packets allowed.\n")); //for WLK1.5 softap_wps_ext - if (pMgntInfo->bExcludeUnencrypted &&(!bWPSEnable || !Adapter->bInHctTest)) + if (pMgntInfo->bExcludeUnencrypted &&(!bWPSEnable || !Adapter->bInHctTest)) { bAcceptable = FALSE; @@ -1968,20 +1968,20 @@ MgntFilterReceivedPacket( if(pMgntInfo->IOTPeer == HT_IOT_PEER_MERU) { - - // + + // // For Meru AP issue. by Neo and Emily, 20101019 // Meru AP send first packet of eapol key right after association // which may cause corruption of WZC stack. The root cause is - // driver should ignore all EAPOL packet until WZC is ready, but + // driver should ignore all EAPOL packet until WZC is ready, but // here, driver just drop the first two 1st eapol packet - if(SecIsEAPOLPacket(Adapter,&pduOS) && + if(SecIsEAPOLPacket(Adapter,&pduOS) && pMgntInfo->AcceptFirstEAPOLPacket < 2 && (pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPAPSK || pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeWPA2PSK)) - { + { bAcceptable = FALSE; pMgntInfo->AcceptFirstEAPOLPacket++; - } + } } } @@ -1992,7 +1992,7 @@ MgntFilterReceivedPacket( return FALSE; } - // 2011.09.22 - Use pRaddr to verify if this packet is unicast or broadcast since in the AP mode, the client will unicast a brocast packet to AP. + // 2011.09.22 - Use pRaddr to verify if this packet is unicast or broadcast since in the AP mode, the client will unicast a brocast packet to AP. // Indicate Rx Traffic Stream related information. if( eqMacAddr(pRaddr, Adapter->CurrentAddress) && !MacAddr_isMulticast(pRaddr) && @@ -2006,7 +2006,7 @@ MgntFilterReceivedPacket( pRfd->Status.pRxTS = NULL; } - + #if WLAN_ETW_SUPPORT pRfd->RfdFrameUniqueueID = RT_INC_RX_FRAME_UNIQUE_ID(Adapter); @@ -2029,14 +2029,14 @@ MgntFilterReceivedPacket( 0, // CustomData2 0); // CustomData3 #endif - - // 2011.09.22 - Use pRaddr to verify if this packet is unicast or broadcast since in the AP mode, the client will unicast a brocast packet to AP. + + // 2011.09.22 - Use pRaddr to verify if this packet is unicast or broadcast since in the AP mode, the client will unicast a brocast packet to AP. if(MgntDuplicatePacketDetection(Adapter, pRfd) == FALSE) return FALSE; // ---------------------------------------------------- - // <6>Data frame filter + // <6>Data frame filter // ---------------------------------------------------- if( IsDataFrame(pdu) ) { @@ -2049,19 +2049,19 @@ MgntFilterReceivedPacket( RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): Filter broadcast frame from this station.\n")); return FALSE; } - + // Our NIC send multicast to AP (ToDS), then AP reply to its clients (FromDS). if( eqMacAddr(Adapter->CurrentAddress, Frame_pSaddr(pduOS)) ) { - /* In network bridge case: - // To avoid 802.1 Bridge Spanning Tree packet infinite loop. + /* In network bridge case: + // To avoid 802.1 Bridge Spanning Tree packet infinite loop. // We send Spanning Tree packet to AP, then AP forward our packet to its clients. - // 2009-04-16, Isaiah - */ + // 2009-04-16, Isaiah + */ RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): Filter Multicast from this station.\n")); return FALSE; } - + if(!GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS) // by tynli { //Isaiah for APSD TestPlan 2006-07-31 @@ -2072,7 +2072,7 @@ MgntFilterReceivedPacket( { OnMoreData(Adapter); } - + } } }//Data @@ -2081,7 +2081,7 @@ MgntFilterReceivedPacket( else if( IsMgntNullFrame(pdu) ){ //if( state_auth == not_auth ){ Mgnt_Indicate(Adapter, pRfd, class2); return FALSE; } } - else if( IsMgntDataAck(pdu) || IsMgntDataPoll(pdu) || IsMgntDataPoll_Ack(pdu) || + else if( IsMgntDataAck(pdu) || IsMgntDataPoll(pdu) || IsMgntDataPoll_Ack(pdu) || IsMgntCfack(pdu) || IsMgntCfpoll(pdu) || IsMgntCfpollAck(pdu) ) { //TODO: } @@ -2101,26 +2101,26 @@ MgntFilterReceivedPacket( RT_TRACE(COMP_RECV, DBG_LOUD, ("MgntFilterReceivedPacket(): return FALSE if station is not associated.\n")); return FALSE; } - } + } else { // Filter out invalid WDS packets here. if(!ACTING_AS_AP(Adapter)) { - return FALSE; + return FALSE; } if(pMgntInfo->WdsMode == WDS_DISABLED) { - return FALSE; + return FALSE; } if(!eqMacAddr(pTaddr, pMgntInfo->WdsApAddr)) { - return FALSE; + return FALSE; } } - } - + } + //Here, ONLY data frame from peer station exists!! //==================================== return TRUE; @@ -2129,11 +2129,11 @@ MgntFilterReceivedPacket( // // Description: // Return FALSE if this packet should not be indicated(only forward). -// If this packet have will be used in more than one purpose, +// If this packet have will be used in more than one purpose, // we will copy it into local buffer. // // -// Revise AP_ForwardPacketWithFromDS(), AP_FromBssToWds(), +// Revise AP_ForwardPacketWithFromDS(), AP_FromBssToWds(), // and AP_FromWdsToBss() if QAP is implemented. // // 070214, by rcnjko. @@ -2169,15 +2169,15 @@ MgntCheckForwarding( { // If destination address is not AP. if(MacAddr_isMulticast(pDstAddr)) - { // If destination address is bcst/mcst address, + { // If destination address is bcst/mcst address, // Forward the packe to WDS AP if required. if(pMgntInfo->WdsMode != WDS_DISABLED) { AP_FromBssToWds(Adapter, pRfd, TRUE); } - + } -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) else if(P2P_ENABLED(GET_P2P_INFO(Adapter)) && !((GET_P2P_INFO(Adapter))->GroupCapability & gcIntraBSSDistribution)) {// intra bss (forwarding) capability is disabled @@ -2185,9 +2185,9 @@ MgntCheckForwarding( ReturnRFDList(Adapter, pRfd); bNeedToIndicate = FALSE; } -#endif +#endif else if(AsocEntry_IsStationAssociated(pMgntInfo, pDstAddr)) - { // If destination is a STA associated. + { // If destination is a STA associated. // Forward the packet. bNeedToIndicate = TRUE; } @@ -2209,14 +2209,14 @@ MgntCheckForwarding( } else { // WDS frame received: Forward it to current BSS if required. - // Note that, if we fall into this case, pMgntInfo->bWdsMode should not be WDS_DISABLED and + // Note that, if we fall into this case, pMgntInfo->bWdsMode should not be WDS_DISABLED and // TA is a valid WDS AP, see also MgntFilterReceivedPacket(). - + if(!eqMacAddr(pDstAddr, Adapter->CurrentAddress)) { // If destination address is not AP. if(MacAddr_isMulticast(pDstAddr)) - { // If destination address is bcst/mcst address, we forard it to BSS and also indicate up. - + { // If destination address is bcst/mcst address, we forard it to BSS and also indicate up. + // Forward the packet to BSS. AP_FromWdsToBss(Adapter, pRfd, TRUE); @@ -2224,14 +2224,14 @@ MgntCheckForwarding( } else if(AsocEntry_IsStationAssociated(pMgntInfo, pDstAddr)) { // If destination is a STA associated. - + // Forward the packet to BSS. if(AP_FromWdsToBss(Adapter, pRfd, TRUE) == FALSE) { // If we failed to forward it, so just return the RFD here. RT_TRACE(COMP_AP, DBG_WARNING, ("MgntCheckForwarding(): Failed to forward packet from WDS to BSS!\n")); } - + // Don't indicate it up. ReturnRFDList(Adapter, pRfd); bNeedToIndicate = FALSE; @@ -2280,7 +2280,7 @@ MgntFilterTransmitPacket( pu1Byte pRaddr = NULL; BOOLEAN bDataFrame = FALSE; BOOLEAN bWithAddr4 = FALSE; - + // // Get destination address and frame type. // @@ -2295,10 +2295,10 @@ MgntFilterTransmitPacket( { pu1Byte pHeader = pTcb->BufferList[0].VirtualAddress; RT_ASSERT(pHeader !=NULL, ("MgntFilterTransmitPacket(): 802.11 pHeader==NULL\n")); - + pRaddr = pHeader + 4; RT_ASSERT(pRaddr!=NULL, ("MgntFilterTransmitPacket(): 802.11 pRaddr==NULL\n")); - + if( IsFrameTypeData(pHeader) ) bDataFrame = TRUE; @@ -2308,12 +2308,12 @@ MgntFilterTransmitPacket( // // Reject data frame dest STA is not associated. - // + // if(pRaddr != NULL && !MacAddr_isMulticast(pRaddr) && bDataFrame) { // Data frame with unicast destination. if(!bWithAddr4) { - if( pMgntInfo->WdsMode == WDS_DISABLED && + if( pMgntInfo->WdsMode == WDS_DISABLED && !AsocEntry_IsStationAssociated(pMgntInfo, pRaddr) ) { // Destination STA is not associated. RT_TRACE( COMP_AP, DBG_LOUD, @@ -2340,7 +2340,7 @@ MgntFilterTransmitPacket( } } } - + return TRUE; } @@ -2353,10 +2353,10 @@ MgntAllocateBeaconBuf( RT_STATUS status; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - status = PlatformAllocateSharedMemory( - Adapter, - &pMgntInfo->BcnSharedMemory, - BEACON_FRAME_LEN + status = PlatformAllocateSharedMemory( + Adapter, + &pMgntInfo->BcnSharedMemory, + BEACON_FRAME_LEN ); if( status == RT_STATUS_SUCCESS ){ @@ -2378,9 +2378,9 @@ MgntFreeBeaconBuf( } -BOOLEAN -MgntIsMacAddrGroup( - pu1Byte addr +BOOLEAN +MgntIsMacAddrGroup( + pu1Byte addr ) { if( (addr[0]&0x01) && (MacAddr_isBcst(addr)==FALSE) ) @@ -2391,11 +2391,11 @@ MgntIsMacAddrGroup( VOID -MgntSsInquiry( +MgntSsInquiry( PADAPTER Adapter, - pu1Byte pSaddr, - PAUTH_STATUS_T state_auth, - PASOC_STATUS_T state_asoc + pu1Byte pSaddr, + PAUTH_STATUS_T state_auth, + PASOC_STATUS_T state_asoc ) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; @@ -2417,7 +2417,7 @@ MgntSsInquiry( *state_auth = ft_auth; } } - + if( pMgntInfo->mAssoc || pMgntInfo->mIbss ){ *state_asoc = assoc; } @@ -2428,19 +2428,19 @@ MgntSsInquiry( if(pEntry != NULL) { - if(pEntry->AuthAlg == OPEN_SYSTEM && pEntry->AuthPassSeq == 2) + if(pEntry->AuthAlg == OPEN_SYSTEM && pEntry->AuthPassSeq == 2) { *state_auth = opensystem_auth; } - else if(pEntry->AuthAlg == SHARED_KEY && pEntry->AuthPassSeq == 4) + else if(pEntry->AuthAlg == SHARED_KEY && pEntry->AuthPassSeq == 4) { *state_auth = sharedkey_auth; } - + if(*state_auth != not_auth) { - *state_asoc = (pEntry->bAssociated) ? assoc : disassoc; - } + *state_asoc = (pEntry->bAssociated) ? assoc : disassoc; + } } } } @@ -2457,9 +2457,9 @@ MgntGetEncryptionInfo( IN BOOLEAN bIncHead ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; pu1Byte pDestaddr = NULL; - pu1Byte pheader = pTcb->BufferList[0].VirtualAddress; + pu1Byte pheader = pTcb->BufferList[0].VirtualAddress; if(pMgntInfo->bScanWithMagicPacket) { // We don't want ot encrypt magic packet, so any frames sending in this period won't be encrypted. 2005.06.27, by rcnjok. @@ -2477,7 +2477,7 @@ MgntGetEncryptionInfo( GetTcbDestaddr(Adapter, pTcb, &pDestaddr); - if( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm!= RT_ENC_ALG_NO_CIPHER ) + if( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm!= RT_ENC_ALG_NO_CIPHER ) { if( !IsDataFrame(pheader) ) { @@ -2508,7 +2508,7 @@ MgntGetEncryptionInfo( return FALSE; } } - else + else { OCTET_STRING pTxFrame; @@ -2518,7 +2518,7 @@ MgntGetEncryptionInfo( pEncInfo->IsEncByHW = FALSE; return FALSE; } - + if( IsNoDataFrame(pheader)) { // We SHOULD NOT encrypted such packet. @@ -2531,12 +2531,12 @@ MgntGetEncryptionInfo( { return FALSE; } - + pEncInfo->IsEncByHW = TRUE; FillOctetString(pTxFrame, pheader, (u2Byte)pTcb->BufferList[0].Length); - // Only send EAP packet in open when AP do WPS Message exchange - + // Only send EAP packet in open when AP do WPS Message exchange + if(GET_SIMPLE_CONFIG_ENABLED(GetDefaultMgntInfo(Adapter)) && SecIsEAPOLPacket( Adapter, &pTxFrame )) { RT_TRACE(COMP_WPS,DBG_LOUD,("In WPS mode, IsEncByHW = false!\n")); @@ -2572,16 +2572,16 @@ MgntGetEncryptionInfo( BOOLEAN bCCX8021xenable = FALSE; CCX_QueryCCKMSupport(Adapter, &bCCX8021xenable, &bAPSuportCCKM); - - if( ( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || - pMgntInfo->SecurityInfo.PairwiseEncAlgorithm ==RT_ENC_ALG_WEP104 ) && // WEP mode + + if( ( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || + pMgntInfo->SecurityInfo.PairwiseEncAlgorithm ==RT_ENC_ALG_WEP104 ) && // WEP mode pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeOpen && // Open mode !( bCCX8021xenable && bAPSuportCCKM ) // Not in CCKM mode ) { - + if( IsSecProtEapol(pEncInfo->SecProtInfo) ) - { + { RT_TRACE(COMP_SEC, DBG_LOUD, ("====> WEP EAPOL Packet No Encode ....\n")); pEncInfo->IsEncByHW = FALSE; return FALSE; @@ -2595,7 +2595,7 @@ MgntGetEncryptionInfo( // 2008.04.01 if(Adapter->HalFunc.GetNmodeSupportBySWSecHandler(Adapter)) { - pEncInfo->IsEncByHW = FALSE; + pEncInfo->IsEncByHW = FALSE; } else if( MacAddr_isBcst(pDestaddr) ) {//broadcast frame @@ -2607,15 +2607,15 @@ MgntGetEncryptionInfo( } else if( MacAddr_isMulticast(pDestaddr) ) {//multicast frame - + if( pMgntInfo->NdisVersion >= RT_NDIS_VERSION_6_20 || pMgntInfo->bConcurrentMode || pMgntInfo->bBTMode) - pEncInfo->IsEncByHW = FALSE; + pEncInfo->IsEncByHW = FALSE; } else {//Unicast frame - + // // In Win7 WEP and AD mdoe always used SW encrypt !! // @@ -2623,7 +2623,7 @@ MgntGetEncryptionInfo( pMgntInfo->bConcurrentMode || pMgntInfo->bBTMode) { - + if ( (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm== RT_ENC_ALG_WEP40) || (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm== RT_ENC_ALG_WEP104)|| pMgntInfo->bRSNAPSKMode ) @@ -2637,15 +2637,15 @@ MgntGetEncryptionInfo( } } } - + //just for FPGA Verification: Adhoc throughput tset //multicast, broadcast, unicast data frames all use HW encrypt if(pMgntInfo->bRegAdhocUseHWSec && pMgntInfo->OpMode == RT_OP_MODE_IBSS) { pEncInfo->IsEncByHW = TRUE; } - - pEncInfo->EncAlg = pMgntInfo->SecurityInfo.PairwiseEncAlgorithm; + + pEncInfo->EncAlg = pMgntInfo->SecurityInfo.PairwiseEncAlgorithm; pEncInfo->keyId = pMgntInfo->SecurityInfo.DefaultTransmitKeyIdx; pEncInfo->keylen = pMgntInfo->SecurityInfo.KeyLen[pEncInfo->keyId]; pEncInfo->keybuf = pMgntInfo->SecurityInfo.KeyBuf[pEncInfo->keyId]; @@ -2674,7 +2674,7 @@ MgntQuery_MgntFrameTxRate( } else rate = pMgntInfo->CurrentBasicRate & 0x7f; - + if(rate == 0){ // 2005.01.26, by rcnjko. if( IS_WIRELESS_MODE_5G(Adapter) || @@ -2722,8 +2722,8 @@ MgntQuery_DataFrameTxRate( } else { - rate = CURRENT_RATE( pMgntInfo->dot11CurrentWirelessMode, - pMgntInfo->CurrentOperaRate, + rate = CURRENT_RATE( pMgntInfo->dot11CurrentWirelessMode, + pMgntInfo->CurrentOperaRate, pMgntInfo->HTHighestOperaRate); if(pEntry != NULL) @@ -2749,13 +2749,13 @@ MgntQuery_DataFrameTxRate( } else { - RT_PRINT_ADDR(COMP_SEND, DBG_WARNING, + RT_PRINT_ADDR(COMP_SEND, DBG_WARNING, "MgntQuery_DataFrameTxRate(): nonassociated STA:\n", dstaddr); rate = pMgntInfo->LowestBasicRate & 0x7f; } } - } + } } else {//STA mode. @@ -2767,15 +2767,15 @@ MgntQuery_DataFrameTxRate( } else { - rate = CURRENT_RATE(pMgntInfo->dot11CurrentWirelessMode, - pMgntInfo->CurrentOperaRate, - pMgntInfo->HTHighestOperaRate); + rate = CURRENT_RATE(pMgntInfo->dot11CurrentWirelessMode, + pMgntInfo->CurrentOperaRate, + pMgntInfo->HTHighestOperaRate); } } if(rate == 0) - { + { // 2005.01.13, by rcnjko. if( IS_WIRELESS_MODE_5G(Adapter) || (IS_WIRELESS_MODE_HT_24G(Adapter) && !pMgntInfo->pHTInfo->bCurSuppCCK)) @@ -2802,7 +2802,7 @@ MgntQuery_FrameTxRate( if( IsFrameTypeData( pTcb->BufferList[0].VirtualAddress ) ) { - if( (Adapter->MgntInfo.NdisVersion>=RT_NDIS_VERSION_6_20) + if( (Adapter->MgntInfo.NdisVersion>=RT_NDIS_VERSION_6_20) && Adapter->bInHctTest && ACTING_AS_AP(Adapter)) { if(!MacAddr_isMulticast(pRa)) @@ -2827,7 +2827,7 @@ MgntQuery_FrameTxRate( rate = pTcb->DataRate; } else{ - + if( pTcb->DataRate == UNSPECIFIED_DATA_RATE ) { if( IS_WIRELESS_MODE_5G(Adapter) || @@ -2835,7 +2835,7 @@ MgntQuery_FrameTxRate( rate = MGN_6M; else rate = MGN_1M; - } + } else rate = pTcb->DataRate; } @@ -2850,19 +2850,19 @@ MgntQuery_NssTxRate( ) { u1Byte NssNum = RF_TX_NUM_NONIMPLEMENT; - - if ( ( Rate >= MGN_MCS8 && Rate <= MGN_MCS15 ) || + + if ( ( Rate >= MGN_MCS8 && Rate <= MGN_MCS15 ) || ( Rate >= MGN_VHT2SS_MCS0 && Rate <= MGN_VHT2SS_MCS9 ) ) NssNum = RF_2TX; - else if ( ( Rate >= MGN_MCS16 && Rate <= MGN_MCS23 ) || + else if ( ( Rate >= MGN_MCS16 && Rate <= MGN_MCS23 ) || ( Rate >= MGN_VHT3SS_MCS0 && Rate <= MGN_VHT3SS_MCS9 ) ) NssNum = RF_3TX; - else if ( ( Rate >= MGN_MCS24 && Rate <= MGN_MCS31 ) || + else if ( ( Rate >= MGN_MCS24 && Rate <= MGN_MCS31 ) || ( Rate >= MGN_VHT4SS_MCS0 && Rate <= MGN_VHT4SS_MCS9 ) ) NssNum = RF_4TX; else NssNum = RF_1TX; - + return NssNum; } @@ -2888,7 +2888,7 @@ MgntQuery_SequenceNumber( pMgntInfo->SoundingSequence++; } else if( bBTTxPacket || - IsFrameTypeMgnt(pFrame)|| IsLegacyDataFrame(pFrame) || + IsFrameTypeMgnt(pFrame)|| IsLegacyDataFrame(pFrame) || MacAddr_isBcst(pDestAddr) ||MacAddr_isMulticast(pDestAddr) ) { // Management and Legacy Data SeqNum = pMgntInfo->SequenceNumber; @@ -2897,21 +2897,21 @@ MgntQuery_SequenceNumber( else pMgntInfo->SequenceNumber++; - //RT_DISP(FQoS, QoS_INIT, ("MGNT_LEGACY SEQ=%d \r\n", pMgntInfo->SequenceNumber)); + //RT_DISP(FQoS, QoS_INIT, ("MGNT_LEGACY SEQ=%d \r\n", pMgntInfo->SequenceNumber)); } - else + else { // QoS Data PTX_TS_RECORD pTS; if(GetTs(Adapter, ((PTS_COMMON_INFO *)&pTS), pDestAddr, TID, TX_DIR, TRUE)) { - SeqNum = pTS->TxCurSeq; - //RT_DISP(FQoS, QoS_INIT, ("pTS->TxCurSeq=%04d\r\n", pTS->TxCurSeq)); + SeqNum = pTS->TxCurSeq; + //RT_DISP(FQoS, QoS_INIT, ("pTS->TxCurSeq=%04d\r\n", pTS->TxCurSeq)); pTS->TxCurSeq = (SeqNum + 1) % 4096; RT_DISP(FQoS, QoS_INIT, ("Qos data SEQ=%04d TID = %d\r\n", SeqNum, TID)); }else SeqNum = 0; } - + return SeqNum; } @@ -2934,7 +2934,7 @@ MgntIsShortPreambleMode( else { // 2005.01.06, by rcnjko. - if( pMgntInfo->dot11CurrentPreambleMode == PREAMBLE_SHORT ) + if( pMgntInfo->dot11CurrentPreambleMode == PREAMBLE_SHORT ) { IsShortPreamble = TRUE; } @@ -3003,9 +3003,9 @@ MgntIsDataOnlyFrame( if(pTcb->bInsert8BytesForEarlyMode) pHeader += 8; - - if(IsDataFrame(pHeader) && - (!IsMgntQosNull(pHeader)) && + + if(IsDataFrame(pHeader) && + (!IsMgntQosNull(pHeader)) && (!IsMgntNullFrame(pHeader))) { return TRUE; @@ -3017,7 +3017,7 @@ MgntIsDataOnlyFrame( BOOLEAN MgntIsRateValidForWirelessMode( - u1Byte rate, + u1Byte rate, u1Byte wirelessmode ) { @@ -3032,7 +3032,7 @@ MgntIsRateValidForWirelessMode( case WIRELESS_MODE_B: if((rate <= MGN_11M) && (rate != MGN_6M) && (rate != MGN_9M)) - bReturn = TRUE; + bReturn = TRUE; break; case WIRELESS_MODE_G: @@ -3041,21 +3041,21 @@ MgntIsRateValidForWirelessMode( break; case WIRELESS_MODE_N_24G: - if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) + if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) bReturn = TRUE; else if((rate >= MGN_1M) && (rate <= MGN_54M)) bReturn = TRUE; break; case WIRELESS_MODE_N_5G: - if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) + if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) bReturn = TRUE; else if((rate >= MGN_6M) && (rate <= MGN_54M) && (rate != MGN_11M)) bReturn = TRUE; break; case WIRELESS_MODE_AC_5G: - if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) + if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) bReturn = TRUE; else if((rate >= MGN_6M) && (rate <= MGN_54M) && (rate != MGN_11M)) bReturn = TRUE; @@ -3063,8 +3063,8 @@ MgntIsRateValidForWirelessMode( bReturn = TRUE; break; - case WIRELESS_MODE_AC_24G: - if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) + case WIRELESS_MODE_AC_24G: + if((rate >= MGN_MCS0) && (rate <= MGN_MCS31)) bReturn = TRUE; else if((rate >= MGN_VHT1SS_MCS0) && (rate <= MGN_VHT4SS_MCS9)) bReturn = TRUE; @@ -3121,7 +3121,7 @@ MgntUpdateAsocInfo( ContentLength= ASOC_INFO_IE_SIZE; } - + switch (Action) { case UpdateAuthSeq1: @@ -3143,14 +3143,14 @@ MgntUpdateAsocInfo( RT_TRACE_F(COMP_MLME, DBG_SERIOUS, ("Incorrect ContentLength = %d by UpdateAuthSeq2\n", ContentLength)); break; } - + PlatformMoveMemory( pAsocInfo->AuthSeq2, Content, ContentLength); pAsocInfo->AuthSeq2Length = ContentLength; break; - + case UpdateAsocReq: PlatformMoveMemory( pAsocInfo->AsocReq, @@ -3189,12 +3189,12 @@ MgntUpdateAsocInfo( case UpdateFlagReAsocResp: pAsocInfo->FlagReAsocResp = *((PBOOLEAN)Content); break; - + case UpdateDeauthAddr: - cpMacAddr(pAsocInfo->DeauthAddr, (pu1Byte)Content); + cpMacAddr(pAsocInfo->DeauthAddr, (pu1Byte)Content); pAsocInfo->bDeauthAddrValid = TRUE; break; - + default: break; } @@ -3255,7 +3255,7 @@ MgntAddSsidsToScan( RT_TRACE(COMP_SCAN, DBG_LOUD, ("MgntAddSsidsToScan SSid length zero!\n")); return FALSE; } - + // Check if the SSID is already in. for (i=0; iNumSsid; i++) { @@ -3265,12 +3265,12 @@ MgntAddSsidsToScan( return TRUE; } } - + if (pSsidsToScan->NumSsid < MAX_SSID_TO_SCAN) { CopySsidOS(pSsidsToScan->Ssid[pSsidsToScan->NumSsid], Ssid); RT_PRINT_STR(COMP_MLME, DBG_LOUD, "===> MgntAddSsidsToScan(): dest", pSsidsToScan->Ssid[pSsidsToScan->NumSsid].Octet, pSsidsToScan->Ssid[pSsidsToScan->NumSsid].Length); - + pSsidsToScan->NumSsid++; return TRUE; } @@ -3289,7 +3289,7 @@ MgntRemoveSsidsToScan( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_SSIDS_TO_SCAN pSsidsToScan = &(pMgntInfo->SsidsToScan); u1Byte i, j; - + for (i=0; iNumSsid; i++) { if ( CompareSSID(pSsidsToScan->Ssid[i].Octet, pSsidsToScan->Ssid[i].Length, @@ -3302,7 +3302,7 @@ MgntRemoveSsidsToScan( pSsidsToScan->NumSsid--; return TRUE; } - } + } return FALSE; } @@ -3323,7 +3323,7 @@ MgntClearSsidsToScan( // Poll MAC's TSF register to simulate TBTT notification. // // Assumption: -// 1. Timer may be fired a little eariler or later than expected. +// 1. Timer may be fired a little eariler or later than expected. // 2. Overhead of Timer and wokritem is less than one Beacon Period. // // 070124, by rcnjko. @@ -3350,15 +3350,15 @@ TbttPollingWorkItemCallback( if(RT_DRIVER_STOP(pAdapter)) { - RT_TRACE(COMP_BEACON, DBG_WARNING, - ("TbttPollingWorkItemCallback(): bDriverStopped = %d, bSurpriseRemoved = %d, bDriverIsGoingToUnload = %d; return this workitem!!!\n", + RT_TRACE(COMP_BEACON, DBG_WARNING, + ("TbttPollingWorkItemCallback(): bDriverStopped = %d, bSurpriseRemoved = %d, bDriverIsGoingToUnload = %d; return this workitem!!!\n", pAdapter->bDriverStopped, pAdapter->bSurpriseRemoved, pAdapter->bDriverIsGoingToUnload)); - return; + return; } - + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); - + if(rfState != eRfOn) { RT_TRACE(COMP_BEACON, DBG_WARNING, ("rfState = %d; return this workitem!!!\n", rfState)); @@ -3377,7 +3377,7 @@ TbttPollingWorkItemCallback( if(pMgntInfo->BeaconState == BEACON_STOP) { RT_TRACE(COMP_BEACON, DBG_WARNING, ("BeaconState = BEACON_STOP; return this workitem!!!\n")); - return; + return; } pAdapter->HalFunc.GetHalDefVarHandler(pAdapter, HAL_DEF_HW_BEACON_SUPPORT, (pu1Byte)&SwBeaconType); @@ -3392,20 +3392,20 @@ TbttPollingWorkItemCallback( // Only apply to the manual sending beacon beacuse in other cases the HW can fair the Beacon. nMultiplier = (u1Byte)GetRandomNumber(0, 2); } - + // // Poll TSFR to determine the time to send S/W Beacon via ep2. // pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_TSF_TIMER, (pu1Byte)&Now); - // + // // The Beacon sending by SW timer is very complex, so we seperate the beacon intrval into // several parts A-B, B-C, and C-D as the following. // TBTT Next TBTT // || <------------------ Beacon Period --------------------- > || // A B C D // || <- 16 ms -> | <- Beacon Intval - (16*2) -> | <- 16 ms -> || - // || Send Mcast | Do Nothing | Update Becon || + // || Send Mcast | Do Nothing | Update Becon || // || -------------------------------------------------------- || // AP mode // a. The HW can send the Beacon in TBTT automatically (BEACON_SEND_AUTO_SW) @@ -3442,28 +3442,28 @@ TbttPollingWorkItemCallback( } // Wake up at point C before TBTT to update Beacon buffer TimeToSleepInUs = (u4Byte)(BcnPeriodUs - TBTT_POLLING_TIMER_DELAY_US - timeSlotUs); - } - else if(SwBeaconType == BEACON_SEND_MANUAL) - { + } + else if(SwBeaconType == BEACON_SEND_MANUAL) + { // We need to update Beacon content and send the Beacon ConstructBeaconFrame(pAdapter); - + // Set Timestamp according to current value of our TSFR. - // Beacuse we shall send this Beacon by ourself in normal queue and the HW won't fill the + // Beacuse we shall send this Beacon by ourself in normal queue and the HW won't fill the // timestamp for this Beacon, we need to fill the timestamp by ourself. SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(pBeaconHeader, ((u4Byte)(Now & 0xFFFFFFFF))); SET_BEACON_PROBE_RSP_TIME_STAMP_HIGH(pBeaconHeader, ((u4Byte)(Now >> 32))); // Note: In this case, this beacon packet may not be sent by HW Beacon Queue but any other normal queue. - SendBeaconFrame(pAdapter, BeaconQueueID); + SendBeaconFrame(pAdapter, BeaconQueueID); - if(pMgntInfo->bDisSwDmaBcn) + if(pMgntInfo->bDisSwDmaBcn) { pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_DIS_SW_BCN, (pu1Byte)(&pAdapter)); pMgntInfo->bDisSwDmaBcn = FALSE; } - + if(ACTING_AS_AP(pAdapter) && (pMgntInfo->mDtimCount == 0)) { // Note: The Beacon Queue ID shall not be the HW Beacon Queue, or they shall be lost. @@ -3475,7 +3475,7 @@ TbttPollingWorkItemCallback( TimeToSleepInUs = (u4Byte)(BcnPeriodUs - timeSlotUs + (nMultiplier * BcnPeriodUs)); } else - { + { RT_TRACE(COMP_AP, DBG_WARNING, ("TbttPollingWorkItemCallback(): Wrong SwBeaconType(%d)! Return!\n", SwBeaconType)); return; } @@ -3483,21 +3483,21 @@ TbttPollingWorkItemCallback( //3 // 2nd Case C-D: Prepare beacon content and send bacon else if(timeSlotUs >= (BcnPeriodUs - TBTT_POLLING_TIMER_DELAY_US - sTU)) { - if(SwBeaconType == BEACON_SEND_AUTO_SW) + if(SwBeaconType == BEACON_SEND_AUTO_SW) { ConstructBeaconFrame(pAdapter); // Note: We don't need to update timestamp because the HW will fill that. - SendBeaconFrame(pAdapter, BeaconQueueID); + SendBeaconFrame(pAdapter, BeaconQueueID); - if(pMgntInfo->bDisSwDmaBcn) + if(pMgntInfo->bDisSwDmaBcn) { pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_DIS_SW_BCN, (pu1Byte)(&pAdapter)); pMgntInfo->bDisSwDmaBcn = FALSE; } PreGroupTimSet = (BOOLEAN)pMgntInfo->TimBuf[2]; - + if(ACTING_AS_AP(pAdapter) && PreGroupTimSet) // If the Group Tim bit in AP mode was set, we need to send the multicast packets after TBTT. { // Wake up at point D if we have group traffic to send @@ -3508,7 +3508,7 @@ TbttPollingWorkItemCallback( // Wake up at next point C before next TBTT. TimeToSleepInUs = (u4Byte)((BcnPeriodUs - timeSlotUs) + (BcnPeriodUs - TBTT_POLLING_TIMER_DELAY_US)); } - } + } else if(SwBeaconType == BEACON_SEND_MANUAL) { // Wake up at point D at TBTT to update/send the next Beacon @@ -3518,7 +3518,7 @@ TbttPollingWorkItemCallback( { RT_TRACE(COMP_AP, DBG_WARNING, ("TbttPollingWorkItemCallback(): Wrong SwBeaconType(%d)! Return!\n", SwBeaconType)); return; - } + } } //3 // 3rd case B-C: Do Nothing and reschedule the next timer. else @@ -3537,14 +3537,14 @@ TbttPollingWorkItemCallback( { RT_TRACE(COMP_AP, DBG_WARNING, ("TbttPollingWorkItemCallback(): Wrong SwBeaconType(%d)! Return!\n", SwBeaconType)); return; - } + } } if(!(RT_DRIVER_HALT(pAdapter))) { PlatformSetTimer( - pAdapter, - &(pMgntInfo->SwBeaconTimer), + pAdapter, + &(pMgntInfo->SwBeaconTimer), (TimeToSleepInUs/1000)); RT_TRACE(COMP_BEACON, DBG_LOUD, ("TbttPollingWorkItemCallback(): SetTimer(%d ms)! Return!\n", TimeToSleepInUs/sTU)); @@ -3593,7 +3593,7 @@ MgntDisableNetMonitorMode( if(Adapter->bHWInitReady) Adapter->HalFunc.AllowAllDestAddrHandler(Adapter, FALSE, !bInitState); - + IPSReturn(Adapter, IPS_DISABLE_PROXIMITY); PlatformDisableNetworkMonitorMode(Adapter); } @@ -3604,24 +3604,24 @@ MgntDisableNetMonitorMode( // Allocate hash tables. // By Bruce, 2008-02-25. // -BOOLEAN +BOOLEAN MgntAllocHashTables( IN PADAPTER pAdapter ) { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; RT_HASH_TABLE_HANDLE hTmp; // Qos TStream - hTmp = RtAllocateHashTable( - pAdapter, + hTmp = RtAllocateHashTable( + pAdapter, MAX_AP_TS_COUNT, // Capacity sizeof(QOS_TSTREAM), // ValueSize QOS_TSTREAM_KEY_SIZE, // KeySize QosTsHash); // pfHash - pStaQos->hApTsTable = hTmp; + pStaQos->hApTsTable = hTmp; if(hTmp == NULL) return FALSE; @@ -3634,12 +3634,12 @@ MgntAllocHashTables( // Description: // Free hash tables allocated in MgntAllocHashTables(). // -VOID +VOID MgntFreeHashTables( IN PADAPTER pAdapter ) { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; if(NULL != pStaQos) @@ -3658,10 +3658,10 @@ MgntQuery_TxRateExcludeCCKRates( // // Find the lowest rate in the BSSBasicRateSet except CCK rates. // - + for( i = 0; i < BSSBasicRateSet.Length; i++) { - BasicRate = BSSBasicRateSet.Octet[i] & 0x7F; + BasicRate = BSSBasicRateSet.Octet[i] & 0x7F; RT_DISP(FDM, WA_IOT, ("MgntQuery_TxRateExcludeCCKRates(), BasicRate = 0x%x\n", BasicRate)); if(!IS_CCK_RATE(BasicRate)) { @@ -3678,7 +3678,7 @@ MgntQuery_TxRateExcludeCCKRates( RT_DISP(FDM, WA_IOT, ("Find small BasicRate = 0x%x\n", QueryRate)); } } - } + } } if(QueryRate == 0) @@ -3708,7 +3708,7 @@ MgntAllocatePacketParser( GPParserGateVoWlanSIP, GPParserActionVoWlanSIP, TRUE); - + return bReturn; } @@ -3744,7 +3744,7 @@ MgntGetPwrMgntInfo( // ======================================================== // Set PwrMgnt bit according to the following condition (arrange by priority): - // (1) Not associate to AP: False + // (1) Not associate to AP: False // (2) IBSS or AP mode: False (We do not enter PS in IBSS now) // (3) PS-Poll frame: True // (4) Management Frame: False @@ -3757,11 +3757,11 @@ MgntGetPwrMgntInfo( // By Bruce, 2007-11-09. // ======================================================= - // (1) Not associate to AP + // (1) Not associate to AP // (2) IBSS or AP mode if(!pMgntInfo->mAssoc || pMgntInfo->mIbss || ACTING_AS_AP(Adapter)) return FALSE; - + // (3) PS-Poll: True if(IsCtrlPSpoll(pheader)) return TRUE; @@ -3776,7 +3776,7 @@ MgntGetPwrMgntInfo( { return (GET_80211_HDR_PWR_MGNT(pheader))? TRUE : FALSE; } - + // (7) Security Handshake process if(pMgntInfo->SecurityInfo.SecLvl > RT_SEC_LVL_NONE && !SecIsTxKeyInstalled(Adapter, pMgntInfo->Bssid)) return FALSE; @@ -3785,7 +3785,7 @@ MgntGetPwrMgntInfo( // Always return false becuase Fw will fill this bit by itself during PS mode after 8723A. if(IS_FW_POWER_SAVE(pMgntInfo)) return FALSE; - + // (8) WMM Test Plan(dot11PowerSaveMode & APSD) Data frame: True if(IS_WIFI_POWER_SAVE(pMgntInfo) ) { @@ -3798,7 +3798,7 @@ MgntGetPwrMgntInfo( pTcb->bSleepPkt = TRUE; return TRUE; } - + // (10) Normal data frame, don't care PS mode: False return FALSE; } @@ -3891,12 +3891,12 @@ PortCommonInfoAllocateMemoryWithCriticalInitialization( PlatformZeroMemory(pDefaultAdapter->pPortCommonInfo, sizeof(PORT_COMMON_INFO)); pDefaultAdapter->pPortCommonInfo->pDefaultAdapter = pDefaultAdapter; - + // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) RT_TRACE(COMP_INIT, DBG_LOUD, ("%s: Allocate PortCommonInfo Memory: Size: %d\n", __FUNCTION__, sizeof(PORT_COMMON_INFO))); } - + rtStatus = ChnlCommAllocateMemory(pDefaultAdapter); if(rtStatus != RT_STATUS_SUCCESS) { @@ -3904,14 +3904,14 @@ PortCommonInfoAllocateMemoryWithCriticalInitialization( PortCommonInfoFreeMemory(pDefaultAdapter); return RT_STATUS_FAILURE; - } + } // Initialize MultiPort Feature ------------- MultiPortInitializeContext(pDefaultAdapter); // ----------------------------------- - return RT_STATUS_SUCCESS; + return RT_STATUS_SUCCESS; } @@ -3938,13 +3938,13 @@ BOOLEAN MgntIsWoWLANCapabilityEnable( PADAPTER pAdapter ) -{ +{ PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); BOOLEAN bResult; - + // - // 2009.09.02. Modified by tynli. + // 2009.09.02. Modified by tynli. // Add condition "Adapter->bUnloadDriverwhenS3S4" and "pPSC->WoWLANMode". // if(pAdapter->bUnloadDriverwhenS3S4) @@ -3958,7 +3958,7 @@ MgntIsWoWLANCapabilityEnable( else //WoWLANMode=0 bResult = FALSE; } - + // RT_TRACE(COMP_INIT, DBG_TRACE, ("MgntIsWoWLANCapabilityEnable(): bUnloadDriverwhenS3S4 = %d, WoWLANMode = %d\n", // pAdapter->bUnloadDriverwhenS3S4, pPSC->WoWLANMode)); @@ -3977,7 +3977,7 @@ MgntIsSupportRemoteWakeUp( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); BOOLEAN bResult; - + if(pPSC->bFakeWoWLAN || !(MgntIsWoWLANCapabilityEnable(pAdapter)) || !pPSC->bSupportWakeUp) bResult = FALSE; else @@ -3988,7 +3988,7 @@ MgntIsSupportRemoteWakeUp( #if(AUTO_CHNL_SEL_NHM == 1) // -// Description: +// Description: // NHM measurement for Auto channel selection mechanism. // // 2014.05.15, created by Roger. @@ -3999,12 +3999,12 @@ MgntAutoChnlSelWorkitemCallback( ) { - PADAPTER Adapter = (PADAPTER)Context; + PADAPTER Adapter = (PADAPTER)Context; PMGNT_INFO pMgntInfo = &(GetDefaultAdapter(Adapter)->MgntInfo); u1Byte AutoChnlSelOp = 1; if(!IS_AUTO_CHNL_SUPPORT(Adapter)){ - RT_TRACE(COMP_P2P, DBG_TRACE, ("[ACS] MgntAutoChnlSelWorkitemCallback(): Do not support ACS function, so return!!\n")); + RT_TRACE(COMP_P2P, DBG_TRACE, ("[ACS] MgntAutoChnlSelWorkitemCallback(): Do not support ACS function, so return!!\n")); return; } @@ -4012,7 +4012,7 @@ MgntAutoChnlSelWorkitemCallback( // To check another sync control flag which has already been assigned, 2014.07.31. // while(TRUE){ - + PlatformAcquireSpinLock(Adapter, RT_ACS_SPINLOCK); if(!IS_AUTO_CHNL_IN_PROGRESS(Adapter)){ RT_TRACE(COMP_P2P, DBG_WARNING, ("[ACS] MgntAutoChnlSelWorkitemCallback(): Waiting for the control flag which has already been assigned in another thread!!\n")); @@ -4024,14 +4024,14 @@ MgntAutoChnlSelWorkitemCallback( break; } } - - RT_TRACE(COMP_P2P, DBG_LOUD, ("---> [ACS] MgntAutoChnlSelWorkitemCallback(): OperationChnl(%d)\n", RT_GetChannelNumber(GetDefaultAdapter(Adapter)))); + + RT_TRACE(COMP_P2P, DBG_LOUD, ("---> [ACS] MgntAutoChnlSelWorkitemCallback(): OperationChnl(%d)\n", RT_GetChannelNumber(GetDefaultAdapter(Adapter)))); Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AUTO_CHNL_SEL, (pu1Byte)&AutoChnlSelOp); - SET_AUTO_CHNL_STATE(Adapter, ACS_AFTER_NHM);// Calculation is done + SET_AUTO_CHNL_STATE(Adapter, ACS_AFTER_NHM);// Calculation is done SET_AUTO_CHNL_PROGRESS(Adapter, FALSE); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("<--- [ACS] MgntAutoChnlSelWorkitemCallback(): AutoChnlSelCalInProgress(%d)\n", pMgntInfo->AutoChnlSel.AutoChnlSelCalInProgress)); } #endif diff --git a/network/wlan/WDI/COMMON/MgntGen.h b/network/wlan/WDI/COMMON/MgntGen.h index ae469efb4..7cb8bd679 100644 --- a/network/wlan/WDI/COMMON/MgntGen.h +++ b/network/wlan/WDI/COMMON/MgntGen.h @@ -2,7 +2,7 @@ #define __INC_MGNTGEN_H -/*--------------------------Define -------------------------------------------*/ +/*--------------------------Define -------------------------------------------*/ typedef enum _MGN_RATE_{ MGN_1M = 0x02, @@ -226,7 +226,7 @@ VOID MgntReleaseAllTimer( PADAPTER Adapter ); - + BOOLEAN MgntGetFWBuffer( @@ -280,17 +280,17 @@ MgntFreeBeaconBuf( PADAPTER Adapter ); -BOOLEAN -MgntIsMacAddrGroup( - pu1Byte addr +BOOLEAN +MgntIsMacAddrGroup( + pu1Byte addr ); VOID -MgntSsInquiry( +MgntSsInquiry( PADAPTER Adapter, - pu1Byte pSaddr, - PAUTH_STATUS_T state_auth, - PASOC_STATUS_T state_asoc + pu1Byte pSaddr, + PAUTH_STATUS_T state_auth, + PASOC_STATUS_T state_asoc ); BOOLEAN @@ -356,7 +356,7 @@ MgntIsDataOnlyFrame( BOOLEAN MgntIsRateValidForWirelessMode( - u1Byte rate, + u1Byte rate, u1Byte wirelessmode ); @@ -414,12 +414,12 @@ MgntDisableNetMonitorMode( BOOLEAN bInitState ); -BOOLEAN +BOOLEAN MgntAllocHashTables( IN PADAPTER pAdapter ); -VOID +VOID MgntFreeHashTables( IN PADAPTER pAdapter ); diff --git a/network/wlan/WDI/COMMON/MgntLink.c b/network/wlan/WDI/COMMON/MgntLink.c index d58faf286..2d0041934 100644 --- a/network/wlan/WDI/COMMON/MgntLink.c +++ b/network/wlan/WDI/COMMON/MgntLink.c @@ -88,7 +88,7 @@ u4Byte RangePerLevel = 0; VOID RecognizePeer( PADAPTER Adapter, - POCTET_STRING pInmmpdu, + POCTET_STRING pInmmpdu, PRT_WLAN_BSS bssDesc); @@ -103,7 +103,7 @@ RT_WLAN_BSS *BssDescDupSource( u2Byte i; OCTET_STRING bssIdBeacon,SsidBeacon; OCTET_STRING mmpdu; - + mmpdu.Octet = pRfd->Buffer.VirtualAddress; mmpdu.Length = pRfd->PacketLength; @@ -145,7 +145,7 @@ RT_WLAN_BSS *BssDescDupSource( // Or return NULL. // By Bruce, 2008-05-26. // -PRT_WLAN_BSS +PRT_WLAN_BSS BssDescDupByDesc( IN PADAPTER Adapter, IN PRT_WLAN_BSS pRtBSS @@ -153,7 +153,7 @@ BssDescDupByDesc( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; u2Byte i; - + for(i = 0; i < pMgntInfo->NumBssDesc; i ++) { if( PlatformCompareMemory(pRtBSS->bdBssIdBuf, pMgntInfo->bssDesc[i].bdBssIdBuf, ETHERNET_ADDRESS_LENGTH) == 0 ) @@ -174,8 +174,8 @@ BssDescDupByDesc( // 2. Check SSID !! // Note : - // 1. one of BssDes is hidden - // 2. security is the same + // 1. one of BssDes is hidden + // 2. security is the same // 3. BSSID is the same // Then they are the same AP !! if( !BeHiddenSsid( pRtBSS->bdSsIdBuf , pRtBSS->bdSsIdLen ) && !BeHiddenSsid( pMgntInfo->bssDesc[i].bdSsIdBuf , pMgntInfo->bssDesc[i].bdSsIdLen )) @@ -186,7 +186,7 @@ BssDescDupByDesc( continue; } } - + return &pMgntInfo->bssDesc[i]; } } @@ -206,7 +206,7 @@ BssDescDupByDesc( // Or return NULL. // By Bruce, 2008-05-26. // -PRT_WLAN_BSS +PRT_WLAN_BSS BssDescDupByBssid( IN PADAPTER Adapter, IN pu1Byte pBssid @@ -214,7 +214,7 @@ BssDescDupByBssid( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; u2Byte i; - + for(i = 0; i < pMgntInfo->NumBssDesc; i ++) { if( PlatformCompareMemory(pBssid, pMgntInfo->bssDesc[i].bdBssIdBuf, ETHERNET_ADDRESS_LENGTH) == 0 ) @@ -233,7 +233,7 @@ BssDescDupByBssid4Rssi( { u2Byte i; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + for(i = 0; i < pMgntInfo->NumBssDesc4Rssi; i ++) { if( PlatformCompareMemory(pBssid, pMgntInfo->bssDesc4Rssi[i].bdBssIdBuf, ETHERNET_ADDRESS_LENGTH) == 0 ) @@ -241,13 +241,13 @@ BssDescDupByBssid4Rssi( return &pMgntInfo->bssDesc4Rssi[i]; } } - + return NULL; } // // Description: -// Check QBss Load of the BSS setting if it is sufficient to join especially for +// Check QBss Load of the BSS setting if it is sufficient to join especially for // CCX CAC roaming. // Argument: // Adapter - @@ -266,7 +266,7 @@ CheckQBssLoad( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PQOS_TSTREAM pTs = NULL; - + // // Determine the insufficient AAC in QBSS Load. // @@ -284,7 +284,7 @@ CheckQBssLoad( if ( aac < mtime ) { RT_TRACE(COMP_QOS, DBG_LOUD, ("CheckQBssLoad(): insufficient bandwith, skip this bss\n ")); - return FALSE; + return FALSE; } } } @@ -315,7 +315,7 @@ CheckBSSSetting( PRT_SECURITY_T pSecurityInfo = &(Adapter->MgntInfo.SecurityInfo); RT_ENC_ALG PairwiseEncAlgo = pSecurityInfo->PairwiseEncAlgorithm; BOOLEAN bPassCheck = TRUE; -#if (WPS_SUPPORT == 1) +#if (WPS_SUPPORT == 1) PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(pMgntInfo); @@ -326,9 +326,9 @@ CheckBSSSetting( RT_TRACE(COMP_MLME, DBG_TRACE, ("CheckBSSSetting(): skip security check when wps in progress.\n")); return bPassCheck; } -#endif +#endif do - { + { if( (pRtBss->bdCap & cPrivacy) ) { if(PairwiseEncAlgo == RT_ENC_ALG_NO_CIPHER ) @@ -337,7 +337,7 @@ CheckBSSSetting( bPassCheck = FALSE; break; } -#if (WPS_SUPPORT == 1) +#if (WPS_SUPPORT == 1) else if ( (pSecurityInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) && (pRtBss->PairwiseChiper > NONE_WPA) && (pSimpleConfig->bEnabled == FALSE)) @@ -348,7 +348,7 @@ CheckBSSSetting( } else { -#if (WPS_SUPPORT == 1) +#if (WPS_SUPPORT == 1) if ( (pSecurityInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40) && (pRtBss->PairwiseChiper == NONE_WPA) ) { @@ -358,14 +358,14 @@ CheckBSSSetting( if( PairwiseEncAlgo != RT_ENC_ALG_NO_CIPHER ) { // - // Note that this is for Win7 NDISTest ExcludeUnencrypted_ext preview 3, + // Note that this is for Win7 NDISTest ExcludeUnencrypted_ext preview 3, // 2008.11.24, haich. // if(Adapter->MgntInfo.bExcludeUnencrypted) { RT_TRACE(COMP_MLME, DBG_LOUD, ("CheckBSSSetting(): BSS Cap shows no privacy, but PairwiseEncAlgo is %d\n", PairwiseEncAlgo)); bPassCheck = FALSE; - break; + break; } } } @@ -452,7 +452,7 @@ CheckBSSSetting( RT_PRINT_STR(COMP_MLME | COMP_SEC, DBG_LOUD, " PairwiseEnc = WPA_AES but this BSS doesn't has AES for SSID = ", pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen); bPassCheck = FALSE; break; - } + } } break; case RT_SEC_LVL_WPA2 : @@ -474,11 +474,11 @@ CheckBSSSetting( RT_PRINT_STR(COMP_MLME | COMP_SEC, DBG_LOUD, " PairwiseEnc = WPA2_AES but this BSS doesn't has AES for SSID = ", pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen); bPassCheck = FALSE; break; - } + } } break; default : - RT_TRACE(COMP_MLME, DBG_LOUD , ("SelectNetworkBySSID() : secLvl = %x , Pairwise chiper = %x\n",pSecurityInfo->SecLvl, pSecurityInfo->PairwiseEncAlgorithm) ); + RT_TRACE(COMP_MLME, DBG_LOUD , ("SelectNetworkBySSID() : secLvl = %x , Pairwise chiper = %x\n",pSecurityInfo->SecLvl, pSecurityInfo->PairwiseEncAlgorithm) ); } } } @@ -546,7 +546,7 @@ mgntScanTxFeedbackCallback( { PADAPTER pTargetAdapter = pTxFeedbackInfo->pAdapter; PMGNT_INFO pTargetMgntInfo=&pTargetAdapter->MgntInfo; - + PMGNT_INFO pMgntInfo=&pAdapter->MgntInfo; if(NULL == pTxFeedbackInfo) @@ -567,7 +567,7 @@ mgntScanTxFeedbackCallback( RT_TRACE(COMP_MLME, DBG_WARNING, ("Scan callback immediately!\n")); //Using target adapter to make sure set the same scan process. - PlatformSetTimer(pTargetAdapter, &pTargetMgntInfo->ScanTimer, 0); + PlatformSetTimer(pTargetAdapter, &pTargetMgntInfo->ScanTimer, 0); } @@ -597,7 +597,7 @@ scanGetScanTimer( RTInitializeListHead(&nullPktList); PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); - + // check each adapter if it is associated to the AP. do { @@ -615,7 +615,7 @@ scanGetScanTimer( break; ConstructNullFunctionData( - ptmpAdapter, + ptmpAdapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, ptmpMgntInfo->Bssid, @@ -640,10 +640,10 @@ scanGetScanTimer( if(TxFeedbackInstallTxFeedbackInfoForTcb(pAdapter, pTcb)) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - RT_TX_FEEDBACK_ID_SCAN_TX_NULL, - pAdapter, - mgntScanTxFeedbackCallback, + pTcb, + RT_TX_FEEDBACK_ID_SCAN_TX_NULL, + pAdapter, + mgntScanTxFeedbackCallback, (PVOID)(pTcb->pAdapter) ); scanTimer = SCAN_DELAY_TIME_MS_LONG; @@ -662,7 +662,7 @@ scanGetScanTimer( return scanTimer; } - + // @@ -673,7 +673,7 @@ scanGetScanTimer( // The location of target adapter. // [in] pRfd - // The packet container including the information of packet. -// [in] posMpdu - +// [in] posMpdu - // The poniter of the current packet to the 802.11 header. // [in] bReassociate - // TRUE if this packet is Reassociation response packet. FALSE if this packet is association response packet. @@ -699,7 +699,7 @@ MlmeOnAssocOK( OCTET_STRING ExtSuppRateSet; BOOLEAN bFilterOutNonAssociatedBSSID = FALSE; u1Byte RetryLimit = HAL_RETRY_LIMIT_INFRA; - BOOLEAN bTypeIbss = FALSE; + BOOLEAN bTypeIbss = FALSE; PADAPTER pExtAdapter = GetFirstAPAdapter(Adapter) ? GetFirstAPAdapter(Adapter) : GetDefaultAdapter(Adapter); BOOLEAN bUseRAMask = FALSE; BOOLEAN bConnected =TRUE; @@ -710,7 +710,7 @@ MlmeOnAssocOK( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return RT_STATUS_FAILURE; + return RT_STATUS_FAILURE; } if(MgntResetOrPnPInProgress(Adapter)) @@ -720,7 +720,7 @@ MlmeOnAssocOK( } // Join a BSS !!!! - RT_TRACE(COMP_MLME, DBG_LOUD, ("Join a BSS succeeded!\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("Join a BSS succeeded!\n")); pMgntInfo->mAssoc = TRUE; pMgntInfo->mIbss = FALSE; pMgntInfo->mDisable = FALSE; @@ -736,7 +736,7 @@ MlmeOnAssocOK( //pMgntInfo->mMacId = (u1Byte)MacIdRegisterMacIdForInfraClient(Adapter); //pMgntInfo->mcastMacId = (u1Byte)MacIdRegisterMacIdForMCastClient(Adapter); // ------------------------------------------- - + // // Add Assoc OK counter !! // @@ -787,27 +787,27 @@ MlmeOnAssocOK( if( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_TKIP || pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_AESCCMP ) { - PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); + PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); u1Byte i = 0; - + for(i = 0; i < KEY_BUF_SIZE; i++) { PlatformZeroMemory( pSecInfo->KeyBuf[i], MAX_KEY_LEN ); pSecInfo->KeyLen[i] = 0; - } + } } } // //Set HW Register // - pMgntInfo->dot11CurrentPreambleMode = PREAMBLE_AUTO; + pMgntInfo->dot11CurrentPreambleMode = PREAMBLE_AUTO; // 2. BSSID Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BSSID, pMgntInfo->Bssid ); // 3. MSR Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_MEDIA_STATUS, (pu1Byte)(&pMgntInfo->OpMode) ); Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_RETRY_LIMIT, (pu1Byte)(&RetryLimit)); - // 4. BcnIntv + // 4. BcnIntv // //We only need to update beacon interval when IBSS, or it will fail when in WLK 1.4 test (VwifiInfraSoft_ext). //It will cause update tsf too long so it will loss packet. By Maddest 06052009 @@ -816,8 +816,8 @@ MlmeOnAssocOK( // We should set beacon interval register for client mode otherwise it will cause TBTT does not sync with AP. Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BEACON_INTERVAL, (pu1Byte)(&pMgntInfo->dot11BeaconPeriod) ); // 5. Slot time - // To solve Win98 IRQL==PASIVE_LEVEL in timer callback function, - // we call ActUpdate_mCapInfo() here to make sure related IOs are perfomed in correct IRQL, + // To solve Win98 IRQL==PASIVE_LEVEL in timer callback function, + // we call ActUpdate_mCapInfo() here to make sure related IOs are perfomed in correct IRQL, // that is, DISPATCH_LEVEL=>Asyn IO for this case. 2005.03.15, by rcnjko. ActUpdate_mCapInfo(Adapter, Frame_AssocCap(*posMpdu)); @@ -845,16 +845,16 @@ MlmeOnAssocOK( HTOnAssocRsp(Adapter, *posMpdu); if(pMgntInfo->pVHTInfo->bCurrentVHTSupport) - VHTOnAssocRsp(Adapter, *posMpdu); + VHTOnAssocRsp(Adapter, *posMpdu); CHNL_SetBwChnlFromPeer(Adapter); } else - { + { PlatformZeroMemory(pMgntInfo->dot11HTOperationalRateSet, 16); - CHNL_SetBwChnl( Adapter, + CHNL_SetBwChnl( Adapter, pMgntInfo->dot11CurrentChannelNumber, - CHANNEL_WIDTH_20, + CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT ); } @@ -882,13 +882,13 @@ MlmeOnAssocOK( else { Adapter->HalFunc.UpdateHalRATRTableHandler( - Adapter, + Adapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet,NULL); } // - // 2015/04/16 MH According to ODM input parameters, we need to send default port HAL datastructure's ODM + // 2015/04/16 MH According to ODM input parameters, we need to send default port HAL datastructure's ODM // Otherwise, ext port will send null HAL pointer and cause BSOD. // GetDefaultAdapter(Adapter)->HalFunc.RAPostActionHandler(&(((PHAL_DATA_TYPE)GetDefaultAdapter(Adapter)->HalData)->DM_OutSrc)); @@ -913,10 +913,10 @@ MlmeOnAssocOK( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return RT_STATUS_FAILURE; - } - + } + if (Adapter->ResetProgress == RESET_TYPE_NORESET) - { + { pMgntInfo->uConnectedTime = PlatformGetCurrentTime(); MgntIndicateMediaStatus( Adapter, RT_MEDIA_CONNECT, FORCE_INDICATE ); } @@ -954,7 +954,7 @@ MlmeOnAssocOK( ((MgntActQuery_ApType(pExtAdapter) == RT_AP_TYPE_VWIFI_AP) || (MgntActQuery_ApType(pExtAdapter) == RT_AP_TYPE_EXT_AP))) { - + // 2009.05.22 hpfan modify for fill A2 entry by AP's bssid Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_FILL_A2ENTRY, pExtAdapter->MgntInfo.Bssid); } @@ -962,13 +962,13 @@ MlmeOnAssocOK( */ { // 2007/10/16 MH MAC Will update TSF according to all received beacon, so we have - // To set CBSSID bit when link with any AP. + // To set CBSSID bit when link with any AP. if(!IsAPModeExist(Adapter)) { bFilterOutNonAssociatedBSSID = TRUE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_CHECK_BSSID, (pu1Byte)(&bFilterOutNonAssociatedBSSID)); } - + //Correct TSF value. Suggest by Scott. Added by tynli. 2009.12.01. bTypeIbss = FALSE; @@ -979,20 +979,20 @@ MlmeOnAssocOK( } // ACM parameter update timer, by Bruce, 2008-03-21. - if (pStaQos->CurrentQosMode > QOS_DISABLE) + if (pStaQos->CurrentQosMode > QOS_DISABLE) { PlatformSetTimer(Adapter, &pStaQos->ACMTimer, ACM_TIMEOUT); } // Clear all rejected AP record, 2006.11.21, by shien chang. MgntClearRejectedAsocAP(Adapter); - + if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); return RT_STATUS_FAILURE; - } - + } + // 2006.11.15, by shien chang. DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_SUCCESS); @@ -1022,7 +1022,7 @@ MlmeOnAssocOK( } #endif - //2013.11.18 Sinda BK set the same settings with BK. + //2013.11.18 Sinda BK set the same settings with BK. //Otherwise BK have a lower priority and have more packet loss. if( Adapter->bInHctTest == TRUE ) { @@ -1042,10 +1042,10 @@ MlmeOnAssocOK( // Return: // TRUE if an BSS had been selected to perform join or roam, or FALSE. // Note: -// (1) Because "JoinTimeout(), MlmeAuthenticateRequest_Confirm(), -// and MlmeAssociateConfirm()" perform the same process, I merged +// (1) Because "JoinTimeout(), MlmeAuthenticateRequest_Confirm(), +// and MlmeAssociateConfirm()" perform the same process, I merged // them into this function. -// (2) Before calling this function, be sure that we have not indicated +// (2) Before calling this function, be sure that we have not indicated // "AssocitionStart" event, or have indicated "AssocitionComplete" // event to OS. Calling it will restart a complete association procedure. // (3) This function won't indicate one of the events of "RoamingStart", @@ -1064,24 +1064,24 @@ MgntConnectOtherBss( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); return FALSE; } - if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) + if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) return FALSE; - + if(MgntIsTimeOutForIndication(pMgntInfo)) { PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); return FALSE; } - + if(MgntRoamingInProgress(pMgntInfo)) { // Roaming. // Roaming retry @@ -1093,10 +1093,10 @@ MgntConnectOtherBss( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - + return FALSE; } - + if(SelectNetworkBySSID(Adapter, &(pMgntInfo->Ssid), FALSE, pRtBss) == RT_JOIN_INFRA) { if(!MgntIsInRejectedAPList(Adapter, pRtBss->bdBssIdBuf)) @@ -1105,7 +1105,7 @@ MgntConnectOtherBss( JoinRequest(Adapter, pMgntInfo->JoinAction, pRtBss); bConnect = TRUE; } - } + } } RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntConnectOtherBss(): Roam Retry = %d!\n", bConnect)); } @@ -1194,7 +1194,7 @@ BOOLEAN IsPeer11G( rate = bssDesc->bdSupportRateEXBuf[i] & 0x7f; if( !MgntIsRateValidForWirelessMode(rate, WIRELESS_MODE_B) && MgntIsRateValidForWirelessMode(rate, WIRELESS_MODE_G) ) - { + { return TRUE; } } @@ -1203,20 +1203,20 @@ BOOLEAN IsPeer11G( } -BOOLEAN +BOOLEAN IsPeer11B( RT_WLAN_BSS *bssDesc ) { u2Byte i; u1Byte rate; - + // Check if it contains OFDM rates. for(i = 0; i < bssDesc->bdSupportRateEXLen; i++) { rate = bssDesc->bdSupportRateEXBuf[i] & 0x7f; if(MgntIsRateValidForWirelessMode(rate, WIRELESS_MODE_B)) - { + { return TRUE; } } @@ -1224,14 +1224,14 @@ IsPeer11B( return FALSE; } -BOOLEAN +BOOLEAN Is11bBasicRate( RT_WLAN_BSS *bssDesc ) { u2Byte i; u1Byte rate; - + // Check if it contains OFDM rates. for(i = 0; i < bssDesc->bdSupportRateEXLen; i++) { @@ -1240,7 +1240,7 @@ Is11bBasicRate( { rate = bssDesc->bdSupportRateEXBuf[i] & 0x7f; if(!MgntIsRateValidForWirelessMode(rate, WIRELESS_MODE_B)) - { + { return FALSE; } } @@ -1272,7 +1272,7 @@ GetRealtekIEContentForTurboMode( // Input data Check. if( !pBssDesc || !pRealtekIE->Octet ) - { + { return; } @@ -1316,12 +1316,12 @@ GetRealtekIEContentForTurboMode( }while(TRUE); } -u2Byte +u2Byte RemoveWcnIeFromMmpdu( IN OUT POCTET_STRING posMmpdu ) /* - If Reatelk UI WPS is enabled, we shall not remove WCN IE except Win7 + If Reatelk UI WPS is enabled, we shall not remove WCN IE except Win7 otherwise we would fail to get the IE for WPS. */ { @@ -1346,7 +1346,7 @@ RemoveWcnIeFromMmpdu( RmvIeLen += (osWcnIe.Length+2); } - //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, + //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, // "RemoveWcnIeFromMmpdu(): before", posMmpdu->Octet, posMmpdu->Length); // @@ -1364,18 +1364,18 @@ RemoveWcnIeFromMmpdu( len = (u4Byte)(posMmpdu->Length - (u2Byte)(osWcnIe.Octet - posMmpdu->Octet) - osWcnIe.Length); for(i = 0; i < len; i++) { - PlatformMoveMemory(osWcnIe.Octet + i, - osWcnIe.Octet + osWcnIe.Length + i, + PlatformMoveMemory(osWcnIe.Octet + i, + osWcnIe.Octet + osWcnIe.Length + i, 1); } posMmpdu->Length -= osWcnIe.Length; } while(TRUE); - //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, + //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, // "RemoveWcnIeFromMmpdu(): after", posMmpdu->Octet, posMmpdu->Length); - + return RmvIeLen; - + } VOID @@ -1392,23 +1392,23 @@ UpdateBssWcnIe( POCTET_STRING posWcnIe; OCTET_STRING osNewWcnIe; - RT_ASSERT((pBssDesc->BeaconWcnIeBuf), + RT_ASSERT((pBssDesc->BeaconWcnIeBuf), ("UpdateBssWcnIe(): pBssDesc->BeaconWcnIeBuf shuld not be null\n")); - RT_ASSERT((pBssDesc->ProbeRspWcnIeBuf), + RT_ASSERT((pBssDesc->ProbeRspWcnIeBuf), ("UpdateBssWcnIe(): pBssDesc->ProbeRspWcnIeBuf shuld not be null\n")); - - //RT_TRACE(COMP_SCAN, DBG_LOUD, + + //RT_TRACE(COMP_SCAN, DBG_LOUD, // ("UpdateBssWcnIe(): packet type: %X\n", PacketGetType(*posMmpdu))); pBssDesc->osBeaconWcnIe.Octet = pBssDesc->BeaconWcnIeBuf; pBssDesc->osProbeRspWcnIe.Octet = pBssDesc->ProbeRspWcnIeBuf; - posWcnIe = (PacketGetType(*posMmpdu) == Type_Beacon ? + posWcnIe = (PacketGetType(*posMmpdu) == Type_Beacon ? (&pBssDesc->osBeaconWcnIe) : (&pBssDesc->osProbeRspWcnIe)); osNewWcnIe = PacketGetElement(*posMmpdu, EID_Vendor, OUI_SUB_SimpleConfig, OUI_SUBTYPE_DONT_CARE); if(osNewWcnIe.Length + 2 < WCN_IE_BUF_LEN) // 2 = 1 (element id )+ 1 (oui). - { + { // // Store the Wcn IE from the frame. // @@ -1419,13 +1419,13 @@ UpdateBssWcnIe( } else { - //RT_TRACE(COMP_SCAN, DBG_WARNING, + //RT_TRACE(COMP_SCAN, DBG_WARNING, //("No WCN IE.\n")); } } else { - RT_TRACE(COMP_SCAN, DBG_WARNING, + RT_TRACE(COMP_SCAN, DBG_WARNING, ("UpdateBssWcnIe(): length of the recvd Wcn IE (%u) greater than the maximum length (%u) we can deal with.\n", osNewWcnIe.Length + 2, WCN_IE_BUF_LEN)); } @@ -1434,9 +1434,9 @@ UpdateBssWcnIe( static u1Byte temp[]={0x00,0x12,0x0e,0x6c,0x13,0xc9}; if(eqMacAddr(temp, Frame_pBssid((*posMmpdu)))) { - RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, + RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "UpdateBssWcnIe(): mmpdu:", posMmpdu->Octet, posMmpdu->Length); - RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, + RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "UpdateBssWcnIe(): Wcn IE:", posWcnIe->Octet, posWcnIe->Length); } } @@ -1462,7 +1462,7 @@ AssembleFragmentWcnIeFromMmpdu( // Check the IE Fragment IENum = PacketGetElementNum(*posMmpdu, EID_Vendor, OUI_SUB_SimpleConfig, OUI_SUBTYPE_DONT_CARE); - + // Get the fragment ie if(IENum > 1) { @@ -1496,8 +1496,8 @@ AssembleFragmentWcnIeFromMmpdu( // The later IE , we copy it from TLV skip OUI PlatformMoveMemory((pSimpleConfig->AssembleIEBuf+pSimpleConfig->AssembleIELen), (osWcnIe.Octet+4), (osWcnIe.Length-4)); pSimpleConfig->AssembleIELen += (osWcnIe.Length - 4); - - } + + } // // To make osWcnIe include EID and OUI. @@ -1515,12 +1515,12 @@ AssembleFragmentWcnIeFromMmpdu( for(j = 0; j < len; j++) { - PlatformMoveMemory(osWcnIe.Octet + j, - osWcnIe.Octet + osWcnIe.Length + j, + PlatformMoveMemory(osWcnIe.Octet + j, + osWcnIe.Octet + osWcnIe.Length + j, 1); } - posMmpdu->Length -= osWcnIe.Length; - + posMmpdu->Length -= osWcnIe.Length; + } pSimpleConfig->AssembleIEBuf[1] = (pSimpleConfig->AssembleIELen -2); @@ -1530,8 +1530,8 @@ AssembleFragmentWcnIeFromMmpdu( RemoveWcnIeFromMmpdu(posMmpdu); //return osWcnIe; - PlatformMoveMemory((posMmpdu->Octet + posMmpdu->Length), - pSimpleConfig->AssembleIEBuf, + PlatformMoveMemory((posMmpdu->Octet + posMmpdu->Length), + pSimpleConfig->AssembleIEBuf, pSimpleConfig->AssembleIELen); posMmpdu->Length +=pSimpleConfig->AssembleIELen; @@ -1548,17 +1548,17 @@ RemoveWCNIE( IN PRT_WLAN_BSS bssDesc, IN PSIMPLE_CONFIG_T pSimpleConfig, IN POCTET_STRING mmpdu -) +) { u2Byte ret = 0; if(!pSimpleConfig->bEnabled || Adapter->bInHctTest) {// If we remove WCN IE from mmpdu, simple config will not get the IE. Basically, simple config and WCN shall be exclusive. - UpdateBssWcnIe(bssDesc, mmpdu); + UpdateBssWcnIe(bssDesc, mmpdu); ret = RemoveWcnIeFromMmpdu(mmpdu); } - + return ret; } @@ -1569,7 +1569,7 @@ RemoveWCNIE( // Adapter - The NIC adapter context // pRfd - The current packet to be parsed // bssDesc - The container of BSS information -// bUpdate - +// bUpdate - // TRUE: The input bssDesc has been filled with the previous packet information. The bssDesc should not // be cleaned but just update the IE/capabilities information. // FALSE: The bssDesc will be cleaned before put into any information into the bssDesc. @@ -1599,13 +1599,13 @@ GetValueFromBeaconOrProbeRsp( pu1Byte pPeerHTInfo; u1Byte LastRSSI; OCTET_STRING RealtekElement; // Added by Roger, 2006.12.07. - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); BOOLEAN bEDCAParms = FALSE; OCTET_STRING Country; static u1Byte sMFPBIPOui[] = {0x00, 0x0f, 0xac, 0x06}; static u1Byte WPATag[] = {0x00, 0x50, 0xf2, 0x01}; static u1Byte sRSNOui[] = {0x00, 0x0f, 0xac}; - + s4Byte preCumRecvSignalPower = bssDesc->CumRecvSignalPower; mmpdu.Octet = pRfd->Buffer.VirtualAddress; @@ -1641,13 +1641,13 @@ GetValueFromBeaconOrProbeRsp( bssDesc->RecvTsfLow = pRfd->Status.TimeStampLow; bssDesc->RecvTsfHigh = pRfd->Status.TimeStampHigh; - // Check WPS IE format and defragment + // Check WPS IE format and defragment #if (WPS_SUPPORT == 1) { BOOLEAN bIeFrag = FALSE; u2Byte lengthBeforeAssemble = pRfd->PacketLength; PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(pMgntInfo); - + bIeFrag = AssembleFragmentWcnIeFromMmpdu(Adapter,pSimpleConfig,&mmpdu); if(TRUE == bIeFrag) @@ -1658,7 +1658,7 @@ GetValueFromBeaconOrProbeRsp( } #endif // - // 061124, rcnjko: keep frame body to get IE in later use and + // 061124, rcnjko: keep frame body to get IE in later use and // NDIS5 BSS list report. // // 2010/04/16 MH For DTM WNCIE_Ex.cmn test. We can not indicate too much. @@ -1671,8 +1671,8 @@ GetValueFromBeaconOrProbeRsp( { if(!bUpdate || (bssDesc->BssPacketType == BSS_PKT_BEACON) || (PacketGetType(mmpdu) == Type_Probe_Rsp) ) { - CopyRtWlanBssIE(bssDesc, - mmpdu.Octet + sMacHdrLng, + CopyRtWlanBssIE(bssDesc, + mmpdu.Octet + sMacHdrLng, mmpdu.Length - sMacHdrLng); } else @@ -1685,18 +1685,18 @@ GetValueFromBeaconOrProbeRsp( } else if(pRfd->ValidPacketLength != 0) { - CopyRtWlanBssIE(bssDesc, - mmpdu.Octet + sMacHdrLng, + CopyRtWlanBssIE(bssDesc, + mmpdu.Octet + sMacHdrLng, pRfd->ValidPacketLength - sMacHdrLng); } // Determine the receiving packet type for BSS weighting. - bssDesc->BssPacketType |= + bssDesc->BssPacketType |= (PacketGetType(mmpdu) == Type_Probe_Rsp) ? BSS_PKT_PROBE_RSP : BSS_PKT_BEACON; //bssid CopyMem(bssDesc->bdBssIdBuf, Frame_Addr3(mmpdu), 6); - + //Src address CopyMem(bssDesc->bdMacAddressBuf, Frame_Addr2(mmpdu), 6); @@ -1735,7 +1735,7 @@ GetValueFromBeaconOrProbeRsp( // 4.SSID ssidBeacon = PacketGetElement(mmpdu, EID_SsId, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); - // + // // Update SSID as the 2 conditions: // (1) !bUpdate - This bssDesc is a new one, copy the ssid by all means. // (2) !IsHiddenSsid(ssidBeacon) - This packet includes a non-Hidden SSID. The current bssDesc may conatin a hidden SSID by @@ -1772,7 +1772,7 @@ GetValueFromBeaconOrProbeRsp( else { u1Byte halCurChnl=GET_HAL_DATA(Adapter)->CurrentChannel; - + if(bssDesc->LastChnlUpdatecount != pMgntInfo->Scancount) { if(halCurChnl >= 36) @@ -1796,12 +1796,12 @@ GetValueFromBeaconOrProbeRsp( bssDesc->ChannelNumber = GET_HAL_DATA(Adapter)->CurrentChannel; } bssDesc->LastChnlUpdatecount = pMgntInfo->Scancount; - + if(IsHiddenSsid(ssidBeacon) ) { pMgntInfo->hiddenChannel = bssDesc->ChannelNumber; } -#if (DFS_SUPPORT == 1) +#if (DFS_SUPPORT == 1) if(pMgntInfo->DFSMgnt.staMode.bMonitorAfterSwitchIsDone) { if(pMgntInfo->DFSMgnt.staMode.dfsOldConnectedChannel == bssDesc->ChannelNumber) @@ -1881,7 +1881,7 @@ GetValueFromBeaconOrProbeRsp( bssDesc->SecLvl = RT_SEC_LVL_WPA2; bssDesc->RsnIe.Length = RSNIE.Length+2; PlatformMoveMemory (bssDesc->RsnIeBuf, RSNIE.Octet-2, RSNIE.Length+2); - + } else { @@ -1904,15 +1904,15 @@ GetValueFromBeaconOrProbeRsp( bssDesc->WpaIe.Octet = bssDesc->WpaIeBuf; } } - + if(RSNIE.Length != 0) { u1Byte *pCurr; u2Byte count; u4Byte Readlength =0; - + pCurr = RSNIE.Octet; - + //2004/09/15, kcwu, parse WPA2 packet if(bssDesc->SecLvl == RT_SEC_LVL_WPA) { @@ -1979,14 +1979,14 @@ GetValueFromBeaconOrProbeRsp( bssDesc->bMFPR= (u1Byte)GET_RSN_CAP_MFP_REQUIRED(pCurr); pCurr += 2; Readlength += 2; - + // Check BIP support !! // SKIP PMKIDs pCurr += 2; Readlength += 2; if( Readlength < RSNIE.Length ) { - if( !PlatformCompareMemory( pCurr, sRSNOui , 3) && + if( !PlatformCompareMemory( pCurr, sRSNOui , 3) && (DOT11_AuthKeyType_1X_SHA256 == pCurr[3] || DOT11_AuthKeyType_PSK_SHA256 == pCurr[3])) bssDesc->bMFPBIP = TRUE; else @@ -1998,32 +1998,32 @@ GetValueFromBeaconOrProbeRsp( bssDesc->PairwiseChiper = NONE_WPA; bssDesc->GroupChiper = 0; CLEAR_FLAGS(bssDesc->AKMsuit); - - // 1. Get WPA2 chiper + + // 1. Get WPA2 chiper RSNIE = PacketGetElement(mmpdu, EID_WPA2, OUI_SUB_DONT_CARE , OUI_SUBTYPE_DONT_CARE); if( RSNIE.Length != 0 ) { u1Byte *pCurr; u4Byte count,i; u4Byte Readlength =0; - + //RT_PRINT_DATA( COMP_TEST, DBG_LOUD, " WPA2 IE : ", RSNIE.Octet , RSNIE.Length ); pCurr = RSNIE.Octet; - - // 1. Skip Version + + // 1. Skip Version pCurr += 2; Readlength +=2; - + // 2. Get Group Chiper bssDesc->GroupChiper = pCurr[3] ; pCurr += 4; Readlength +=4; - - // 3. Get Pairwise chiper count + + // 3. Get Pairwise chiper count count = pCurr[0]; //+ (pCurr[1]>>8); pCurr += 2; Readlength +=2; - + // 4. Get Pairwise chiper type for( i = 0 ; i < count ; i++ ) { @@ -2031,20 +2031,20 @@ GetValueFromBeaconOrProbeRsp( bssDesc->PairwiseChiper += WPA2_TKIP; else if( pCurr[3] == 0x04 ) bssDesc->PairwiseChiper += WPA2_AES; - + pCurr += 4; Readlength +=4; } - + // 5. Get AKM Suit count count = pCurr[0];// + (pCurr[1]>>8); pCurr += 2; Readlength +=2; - - // 6. Get AKM suit + + // 6. Get AKM suit for( i = 0 ; i < count ; i++ ) { - + if( !PlatformCompareMemory(sRSNOui , pCurr , 3)) { if( pCurr[3] == 0x01 ) @@ -2058,7 +2058,7 @@ GetValueFromBeaconOrProbeRsp( else if( pCurr[3] == 0x05 ) SET_FLAG(bssDesc->AKMsuit, AKM_RSNA_1X_SHA256); else if( pCurr[3] == 0x06 ) - SET_FLAG(bssDesc->AKMsuit, AKM_RSNA_PSK_SHA256); + SET_FLAG(bssDesc->AKMsuit, AKM_RSNA_PSK_SHA256); } else { @@ -2067,14 +2067,14 @@ GetValueFromBeaconOrProbeRsp( pCurr += 4; Readlength +=4; } - - // 7. Get RSN Cap + + // 7. Get RSN Cap bssDesc->bMFPC = GET_RSN_CAP_MFP_CAPABLE(pCurr); bssDesc->bMFPR = GET_RSN_CAP_MFP_REQUIRED(pCurr); pCurr += 2; Readlength +=2; - - // 8. Get BIP + + // 8. Get BIP if( (Readlength + 5 ) < RSNIE.Length ) { // Skip PMKID @@ -2093,24 +2093,24 @@ GetValueFromBeaconOrProbeRsp( u1Byte *pCurr; u4Byte count,i; u4Byte Readlength =0; - + //RT_PRINT_DATA( COMP_TEST, DBG_LOUD, " WPA IE : ", RSNIE.Octet , RSNIE.Length ); pCurr = RSNIE.Octet; - + // 1. SKIP WPA OUI , Version pCurr += 6; Readlength += 6; - + // 2. Get Group chiper bssDesc->GroupChiper = pCurr[3] ; pCurr += 4; Readlength +=4; - - // 3. Get Pairwise chiper count + + // 3. Get Pairwise chiper count count = pCurr[0]; //+ (pCurr[1]>>8); pCurr += 2; Readlength +=2; - + // 4. Get Pairwise chiper type for( i = 0 ; i < count ; i++ ) { @@ -2118,17 +2118,17 @@ GetValueFromBeaconOrProbeRsp( bssDesc->PairwiseChiper += WPA_TKIP; else if( pCurr[3] == 0x04 ) bssDesc->PairwiseChiper += WPA_AES; - + pCurr += 4; Readlength +=4; } - + // 5. Get AKM Suit count count = pCurr[0] ;//+ (pCurr[1]>>8); pCurr += 2; Readlength +=2; - - // 6. Get AKM suit + + // 6. Get AKM suit for( i = 0 ; i < count ; i++ ) { if( !PlatformCompareMemory(WPATag , pCurr , 3)) @@ -2153,7 +2153,7 @@ GetValueFromBeaconOrProbeRsp( // 15. WMM Parameter Element. Added by Annie, 2005-11-08. // Initialize BSS_QOS QosInitializeBssDesc( &bssDesc->BssQos ); - + // Get WMM PARAM element: DD-18-00-50-F2-02. WMMElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_WMM, OUI_SUBTYPE_WMM_PARAM); @@ -2163,7 +2163,7 @@ GetValueFromBeaconOrProbeRsp( WMMElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_WMM, OUI_SUBTYPE_WMM_INFO); else if(WMMElement.Length == WMM_PARAM_ELEMENT_SIZE) CopyMemOS(&bssDesc->osWmmAcParaIE, WMMElement, WMMElement.Length ); - + if(WMMElement.Length == 0) { bEDCAParms = TRUE; @@ -2211,7 +2211,7 @@ GetValueFromBeaconOrProbeRsp( CopyMem(pMgntInfo->SupportRatesfromBCN.Octet, bssDesc->bdSupportRateEXBuf, bssDesc->bdSupportRateEXLen); pMgntInfo->SupportRatesfromBCN.Length = bssDesc->bdSupportRateEXLen; } - + // 20.ERP Information ERPInfo = PacketGetElement(mmpdu, EID_ERPInfo, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE ); if( ERPInfo.Length != 0 ) @@ -2236,8 +2236,8 @@ GetValueFromBeaconOrProbeRsp( bssDesc->bRealtekCapType1Exist = FALSE; // Initialize. RealtekElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_REALTEK_TURBO, OUI_SUBTYPE_DONT_CARE); GetRealtekIEContentForTurboMode( Adapter, bssDesc, &RealtekElement ); - -//------------------------------------------------------------------------ + +//------------------------------------------------------------------------ // 22.Supported Regulatory Classes Information RegulatoryElement = PacketGetElement(mmpdu, EID_SupRegulatory, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE ); @@ -2246,7 +2246,7 @@ GetValueFromBeaconOrProbeRsp( else bssDesc->RegulatoryClass = 0; - DFS_StaGetValueFromBeacon(Adapter, mmpdu, bssDesc); + DFS_StaGetValueFromBeacon(Adapter, mmpdu, bssDesc); #if (WPS_SUPPORT == 1) @@ -2258,7 +2258,7 @@ GetValueFromBeaconOrProbeRsp( SimpleConfigInfo = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_SimpleConfig, OUI_SUBTYPE_DONT_CARE); bssDesc->bdSimpleConfIE.Octet = bssDesc->bdSimpleConfIEBuf; - bssDesc->bdSimpleConfIE.Length = (SimpleConfigInfo.Length > MAX_SIMPLE_CONFIG_IE_LEN_V2) ? MAX_SIMPLE_CONFIG_IE_LEN_V2 : SimpleConfigInfo.Length; + bssDesc->bdSimpleConfIE.Length = (SimpleConfigInfo.Length > MAX_SIMPLE_CONFIG_IE_LEN_V2) ? MAX_SIMPLE_CONFIG_IE_LEN_V2 : SimpleConfigInfo.Length; CopyMem( bssDesc->bdSimpleConfIE.Octet, SimpleConfigInfo.Octet, bssDesc->bdSimpleConfIE.Length); } } @@ -2296,21 +2296,21 @@ GetValueFromBeaconOrProbeRsp( RT_DISP(FBEACON, BCN_PEER, ("GetValueFromBeaconOrProbeRsp Not HT N mode\r\n")); TDLS_GetValueFromBeaconOrProbeRsp(Adapter, &mmpdu, bssDesc); - + // // IOT Action - // + // bssDesc->Vender = HT_IOT_PEER_UNKNOWN; bssDesc->bRealtekAggCapExist = FALSE; RecognizePeer( Adapter,&mmpdu, bssDesc); - + return TRUE; } VOID RecognizePeer( - PADAPTER Adapter, + PADAPTER Adapter, POCTET_STRING pInmmpdu, PRT_WLAN_BSS bssDesc ) @@ -2318,7 +2318,7 @@ RecognizePeer( OCTET_STRING IElement; OCTET_STRING mmpdu; u4Byte Length = 0; - + FillOctetString(mmpdu, pInmmpdu->Octet, pInmmpdu->Length) // 2011/11/03 MH Add peer recognize for WNDAP3200 bad TP in HT40 auto channel mode. It will send @@ -2346,29 +2346,29 @@ RecognizePeer( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; bssDesc->Vender = HT_IOT_PEER_BROADCOM; - bssDesc->SubTypeOfVender = HT_IOT_PEER_BROADCOM_NETGEAR_WNDAP4500; + bssDesc->SubTypeOfVender = HT_IOT_PEER_BROADCOM_NETGEAR_WNDAP4500; pMgntInfo->IOTAction |= HT_IOT_ACT_DISABLE_AC_TXOP; //return; } - + if (PlatformCompareMemory(bssDesc->bdBssIdBuf, CMW500, 6)==0) { bssDesc->Vender = HT_IOT_PEER_CMW500; return; } - + //3 Atheros OUI IElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_ATHEROS_IE_1, OUI_SUBTYPE_DONT_CARE); if(IElement.Length == 0) IElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_ATHEROS_IE_2, OUI_SUBTYPE_DONT_CARE); - if(IElement.Length != 0) + if(IElement.Length != 0) { bssDesc->Vender = HT_IOT_PEER_ATHEROS; if(PlatformCompareMemory(bssDesc->bdBssIdBuf, DLINK_ATHEROS_DIR655_4, 3)==0) - bssDesc->SubTypeOfVender = HT_IOT_PEER_ATHEROS_DIR655; + bssDesc->SubTypeOfVender = HT_IOT_PEER_ATHEROS_DIR655; else if(PlatformCompareMemory(bssDesc->bdBssIdBuf, TPLINK_AC1750, 3)==0) bssDesc->SubTypeOfVender = HT_IOT_PEER_TPLINK_AC1750; - + return; } @@ -2407,7 +2407,7 @@ RecognizePeer( IElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_MERU_IE, OUI_SUBTYPE_DONT_CARE); if(IElement.Length != 0) { - bssDesc->Vender = HT_IOT_PEER_MERU; + bssDesc->Vender = HT_IOT_PEER_MERU; return; } @@ -2423,7 +2423,7 @@ RecognizePeer( if(Length > 0) { bssDesc->Vender = HT_IOT_PEER_BROADCOM; - Length = 0; + Length = 0; IElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_BROADCOM_LINKSYSE4200_IE_1, OUI_SUBTYPE_DONT_CARE); Length += IElement.Length; IElement = PacketGetElement( mmpdu, EID_Vendor, OUI_SUB_BROADCOM_LINKSYSE4200_IE_1, OUI_SUBTYPE_DONT_CARE); @@ -2432,7 +2432,7 @@ RecognizePeer( Length += IElement.Length; if(Length > 0) bssDesc->SubTypeOfVender = HT_IOT_PEER_LINKSYS_E4200_V1; - + return; } @@ -2464,7 +2464,7 @@ RecognizePeer( if(bssDesc->BssHT.bdSupportHT) { bssDesc->BssHT.RT2RT_HT_Mode |= RT_HT_CAP_USE_TURBO_AGGR; - + if(IElement.Octet[4]==1) { if(IElement.Octet[5] & RT_HT_CAP_USE_LONG_PREAMBLE) @@ -2477,7 +2477,7 @@ RecognizePeer( } } } - + if(IElement.Octet[5] & RT_HT_CAP_USE_SOFTAP) bssDesc->Vender = HT_IOT_PEER_REALTEK_SOFTAP; @@ -2488,7 +2488,7 @@ RecognizePeer( else if(IElement.Octet[6] & RT_HT_CAP_USE_JAGUAR_CCUT) bssDesc->Vender = HT_IOT_PEER_REALTEK_JAGUAR_CCUTAP; } - + } return; } @@ -2500,20 +2500,20 @@ RecognizePeer( BOOLEAN -bActiveScan( +bActiveScan( PMGNT_INFO pMgntInfo, PRT_CHNL_LIST_ENTRY pChnlListEntry ) { - BOOLEAN ret = FALSE; + BOOLEAN ret = FALSE; PRT_SSIDS_TO_SCAN pSsidsToScan = &(pMgntInfo->SsidsToScan); u2Byte i; - + if(pChnlListEntry->ScanType == SCAN_MIX) { if(IS_DOT11D_ENABLE(pMgntInfo) && (!IS_COUNTRY_IE_VALID(pMgntInfo))) ret = FALSE; - else if(pMgntInfo->bScanOnly == FALSE || pSsidsToScan->NumSsid > 0) + else if(pMgntInfo->bScanOnly == FALSE || pSsidsToScan->NumSsid > 0) { u1Byte j; PRT_CHANNEL_LIST pChannelList = GET_RT_CHANNEL_LIST(pMgntInfo); @@ -2523,15 +2523,15 @@ bActiveScan( { break; } - } + } if(j == pChannelList->ChannelLen) ret = FALSE; else if( pChannelList->EachChannelSTAs[j] > 0) ret = TRUE; - else + else ret = FALSE; } - else + else ret = FALSE; } else if(pChnlListEntry->ScanType == SCAN_PASSIVE) @@ -2543,7 +2543,7 @@ bActiveScan( #if (DFS_SUPPORT == 1) if(pMgntInfo->DFSMgnt.staMode.dfsOldConnectedChannel == pChnlListEntry->ChannelNum) ret = FALSE; -#endif +#endif if( (pMgntInfo->bssDesc4Query[i].HistoryCount == History_Count_Limit) && (pMgntInfo->bssDesc4Query[i].ChannelNumber == pChnlListEntry->ChannelNum)) ret = TRUE; @@ -2558,25 +2558,25 @@ bActiveScan( else if(pChnlListEntry->ScanType == SCAN_ACTIVE) { ret = TRUE; - } + } //2 Carrier Sense Test - // <20140414, Kordan> Under a carrier sense test (Adaptvity=1 && CarrierSense=1), we do not + // <20140414, Kordan> Under a carrier sense test (Adaptvity=1 && CarrierSense=1), we do not // send the probe request on all sub-channels of current center frequency. (Asked by Yu Chen) - if (pMgntInfo->RegEnableAdaptivity && pMgntInfo->RegEnableCarrierSense && pMgntInfo->bMediaConnect == FALSE) + if (pMgntInfo->RegEnableAdaptivity && pMgntInfo->RegEnableCarrierSense && pMgntInfo->bMediaConnect == FALSE) { int channel = pChnlListEntry->ChannelNum; DbgPrint("[kordan] (pChnlListEntry->ChannelNum, LastConnectedBandwidth, LastConnectedCenterFrequency) = (%d, %d, %d)\n", channel, pMgntInfo->LinkDetectInfo.LastConnectedBandwidth, pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency); - switch (pMgntInfo->LinkDetectInfo.LastConnectedBandwidth) + switch (pMgntInfo->LinkDetectInfo.LastConnectedBandwidth) { case CHANNEL_WIDTH_40: - if (channel-4 <= pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency && + if (channel-4 <= pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency && pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency <= channel+4) ret = FALSE; break; case CHANNEL_WIDTH_80: - if (channel-8 <= pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency && + if (channel-8 <= pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency && pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency <= channel+8) ret = FALSE; break; @@ -2587,7 +2587,7 @@ bActiveScan( } return ret; -} +} BOOLEAN @@ -2603,12 +2603,12 @@ SelectChnlListEntry( BOOLEAN ret = FALSE; if(IS_DUAL_BAND_SUPPORT(Adapter)) - { + { for(i = 0; i < DualBandArrayLen; i++) { if(ChnlListDualBandArray[i].ChannelNum != ChannelNumber) continue; - else + else break; } @@ -2618,11 +2618,11 @@ SelectChnlListEntry( { ret = TRUE; *pChnlListEntry = ChnlListDualBandArray+i; - } + } } else { - RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL, &ChannelNumber, pChnlListEntry); + RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL, &ChannelNumber, pChnlListEntry); if(*pChnlListEntry == NULL) ret = FALSE; else @@ -2638,7 +2638,7 @@ CheckSupportRate( IN RT_WLAN_BSS *bssdesc ) { - + //3 // 802.11g only and 802.11a/g can not connect to 802.11b only AP if(IS_WIRELESS_MODE_WITHOUT_B(pAdapter->RegOrigWirelessMode) && (bssdesc->wirelessmode & WIRELESS_MODE_B)) { @@ -2682,10 +2682,10 @@ GetScanInfo( //if(Adapter->bInHctTest) // - // FilterHiddenAP is set by MgntLinkRequest , + // FilterHiddenAP is set by MgntLinkRequest , // Now MgntLinkRetry , FilterHiddenAP will same as bHiddenSSIDEnable // normal case : - // In XP we always "NO" filter hidden + // In XP we always "NO" filter hidden // In Vista/Win7 , we will filter hidden when OS set bHiddenSSIDEnable. if(pMgntInfo->FilterHiddenAP && pMgntInfo->bHiddenSSIDEnable) { @@ -2693,17 +2693,17 @@ GetScanInfo( RT_TRACE(COMP_SCAN, DBG_LOUD,("HCT:GetScanInfo(): discard for null ssid\n")); return; } - } + } - // Customer special requirement, it should supportby demand. + // Customer special requirement, it should supportby demand. if (Adapter->RegWirelessMode == WIRELESS_MODE_AC_ONLY) - { + { if (VHTModeSupport(Adapter, &mmpdu) == FALSE) { return; } } - + bssdesc = BssDescDupSource( Adapter, pRfd ); if( bssdesc == NULL ) { @@ -2735,12 +2735,12 @@ GetScanInfo( // if( (PacketGetType(mmpdu) == Type_Probe_Rsp) && (bActiveScan(pMgntInfo,pChnlListEntry) == FALSE)) { - RT_TRACE(COMP_SCAN, DBG_TRACE, ("GetScanInfo(): Filter probe response at passive scaning channel(%d).\n", + RT_TRACE(COMP_SCAN, DBG_TRACE, ("GetScanInfo(): Filter probe response at passive scaning channel(%d).\n", bssdesc->ChannelNumber)); return; } - + RT_TRACE(COMP_SCAN, DBG_TRACE, ("GetScanInfo(): create new BssDesc at ch %d, bss index:%d\n", bssdesc->ChannelNumber, pMgntInfo->NumBssDesc)); RT_TRACE(COMP_MLME, DBG_LOUD, ("GetScanInfo(): New SSID: %s \n",bssdesc->bdSsIdBuf)); @@ -2749,7 +2749,7 @@ GetScanInfo( RT_TRACE(COMP_SCAN, DBG_TRACE, ("GetScanInfo(): new BssDesc is %d HT mode\n", bssdesc->BssHT.bdSupportHT)); pMgntInfo->NumBssDesc += 1; - if( pMgntInfo->bNeedSkipScan + if( pMgntInfo->bNeedSkipScan && CompareSSID(pMgntInfo->Ssid.Octet,pMgntInfo->Ssid.Length,bssdesc->bdSsIdBuf,bssdesc->bdSsIdLen) ) { //pMgntInfo->bNeedSkipScan = FALSE; @@ -2767,16 +2767,16 @@ GetScanInfo( GetValueFromBeaconOrProbeRsp(Adapter, pRfd, bssdesc, TRUE); // Update the exist BSS. - if(pRfd->Status.SignalStrength < RSSI) + if(pRfd->Status.SignalStrength < RSSI) { //3 Update signal information to a better packet HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); if(pHalData->CurrentChannel != bssdesc->ChannelNumber) { bssdesc->RSSI = RSSI; - bssdesc->RecvSignalPower = RecvSignalPower; - bssdesc->SignalQuality = SignalQuality; + bssdesc->RecvSignalPower = RecvSignalPower; + bssdesc->SignalQuality = SignalQuality; } - } + } if(!GET_SIMPLE_CONFIG_ENABLED(pMgntInfo) || Adapter->bInHctTest) @@ -2784,17 +2784,17 @@ GetScanInfo( UpdateBssWcnIe(bssdesc, &mmpdu); } RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL, &(bssdesc->ChannelNumber), &pChnlListEntry); - + if(!pChnlListEntry) return; - + // // In theory, we cannot receive the probe responses at this channel with passive scan, so filter this probe response to // prevent from joining the Hidden AP at passive scaning channel. By Bruce, 2008-09-08. // if((PacketGetType(mmpdu) == Type_Probe_Rsp) && (pChnlListEntry->ScanType == SCAN_PASSIVE)) { - RT_TRACE(COMP_SCAN, DBG_TRACE, ("GetScanInfo(): Filter probe response at passive scaning channel(%d).\n", + RT_TRACE(COMP_SCAN, DBG_TRACE, ("GetScanInfo(): Filter probe response at passive scaning channel(%d).\n", bssdesc->ChannelNumber)); return; } @@ -2806,17 +2806,17 @@ GetScanInfo( // Check SSIDL for CCX S53. Slpit the beacon and insert into the list. // Move it to scan complete - // CCXGetSSIDLToBssList(Adapter, bssdesc); + // CCXGetSSIDLToBssList(Adapter, bssdesc); // // Moved from GetValueBeaconOrProbeRsp to here. We should check the channel is valid first and then update the country IE. // By Bruce, 2008-11-12. - // + // if(IS_DOT11D_ENABLE(pMgntInfo)) { if(bssdesc->bdCountryIE.Length != 0) { - RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "GetScanInfo(): Country IE:", + RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "GetScanInfo(): Country IE:", bssdesc->bdCountryIE.Octet, bssdesc->bdCountryIE.Length); if(!IS_COUNTRY_IE_VALID(pMgntInfo)) { @@ -2824,7 +2824,7 @@ GetScanInfo( } else if( IS_EQUAL_CIE_SRC(pMgntInfo, bssdesc->bdMacAddressBuf) ) { - RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "GetScanInfo(): Dot11dCountry IE:", + RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, "GetScanInfo(): Dot11dCountry IE:", GET_DOT11D_INFO(pMgntInfo)->CountryIeBuf, GET_DOT11D_INFO(pMgntInfo)->CountryIeLen); // Check if this country IE is changed. if(!IS_COUNTRY_IE_CHANGED(pMgntInfo, bssdesc->bdCountryIE)) @@ -2835,7 +2835,7 @@ GetScanInfo( } } - + } } @@ -2856,7 +2856,7 @@ InPrefferedBssidList( else return FALSE; } - + return TRUE; } @@ -2871,11 +2871,11 @@ InPrefferedBssidList( // ssid2match - // The SSID to be met. // bRoaming - -// Roaming operation indicates to select a different BSSID with the current one. +// Roaming operation indicates to select a different BSSID with the current one. // pRtBss - // BSS descriptor object returned if it meets the selection conditions. I rewrote this variable // definition by "copying all info into this desc" instead of pointer, because the Bss we selected -// in the scan list is probably chnaged from everywhere, and we need this desc's info for a long +// in the scan list is probably chnaged from everywhere, and we need this desc's info for a long // time. Therefore, it's safer copy this Bss to the local buffer. // Return: // RT_JOIN_ACTION. @@ -2895,7 +2895,7 @@ SelectNetworkBySSID( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; RT_JOIN_ACTION join_action = RT_NO_ACTION; - RT_JOIN_NETWORKTYPE CurrBSSType; + RT_JOIN_NETWORKTYPE CurrBSSType; u4Byte i, MaxWeight = 0, CurrWeight = 0; BOOLEAN bSameSSIDIbss = FALSE; PRT_CHNL_LIST_ENTRY pChnlListEntry = NULL; @@ -2904,7 +2904,7 @@ SelectNetworkBySSID( u1Byte DualBandArrayLen = 0; RT_CHNL_LIST_ENTRY pChnlListDualBandArray[MAX_CHANNEL_NUM] = {0}; - + if(pRtBss == NULL) { RT_TRACE(COMP_MLME, DBG_WARNING, ("SelectNetworkBySSID(): pRtBss = NULL, return RT_NO_ACTION!!\n")); @@ -2954,7 +2954,7 @@ SelectNetworkBySSID( { continue; } - + } else if(!CompareSSID(pRtTmpBss->bdSsIdBuf, pRtTmpBss->bdSsIdLen, ssid2match->Octet, ssid2match->Length)) { @@ -2966,10 +2966,10 @@ SelectNetworkBySSID( } else { - // 2007-11-30 Isaiah : Because SecurityInfo.PairwiseEncAlgorithm & SecLvl initial value is WPA2-PSK AES, - // We have a chance to connect OPEN-WEP AP and MacOS UI shows "connect" and "security field" = WAP2-PSK AES. + // 2007-11-30 Isaiah : Because SecurityInfo.PairwiseEncAlgorithm & SecLvl initial value is WPA2-PSK AES, + // We have a chance to connect OPEN-WEP AP and MacOS UI shows "connect" and "security field" = WAP2-PSK AES. // Connection State would last few minutes, it looks strange said by QC.CCW solved it. - + if(pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeShared || pMgntInfo->SecurityInfo.PairwiseEncAlgorithm > RT_ENC_ALG_NO_CIPHER) { @@ -2989,7 +2989,7 @@ SelectNetworkBySSID( //3 // Do not join the IBSS in this channel. // 2011/04/28 MH For 92D BSOD case prevention, pChnlListEntry might be NULL for VS. Need better revise later. - if(pChnlListEntry) + if(pChnlListEntry) { if((pRtTmpBss->bdCap & cIBSS) && (pChnlListEntry->ExInfo & CHANNEL_EXINFO_NO_IBSS_JOIN)) { @@ -3008,7 +3008,7 @@ SelectNetworkBySSID( RT_TRACE(COMP_MLME, DBG_LOUD, ("SelectNetworkBySSID(): BSSID is not in the preffered bssid list\n")); continue; } - + //3 // Check if this BSSID is in the desired list // It is always true except under Ndis6. By Bruce, 2008-05-27. // In roaming case, we don't need to care about the desired BSSID list. @@ -3064,7 +3064,7 @@ SelectNetworkBySSID( #if 0//(WPS_SUPPORT == 1) { PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(pMgntInfo); - + RT_TRACE(COMP_WPS, DBG_LOUD,( "Simple Config WPS IS bEnabled %d \n",pSimpleConfig->bEnabled)); if(pSimpleConfig->bEnabled && CompareSSID(pRtTmpBss->bdSsIdBuf, pRtTmpBss->bdSsIdLen, ssid2match->Octet, ssid2match->Length)) @@ -3073,7 +3073,7 @@ SelectNetworkBySSID( if(pRtTmpBss->bdCap & cPrivacy) { RT_TRACE(COMP_WPS, DBG_LOUD, ("==>WPS changr security mode to open for connect\n")); -#ifdef NDIS60_MINIPORT +#ifdef NDIS60_MINIPORT pRtTmpBss->bdCap = pRtTmpBss->bdCap & 0xffef; #else if(pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_NO_CIPHER @@ -3085,8 +3085,8 @@ SelectNetworkBySSID( #endif } } - - + + } #endif @@ -3095,11 +3095,11 @@ SelectNetworkBySSID( { RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "SelectNetworkBySSID(): BSS has incompatiable parameters, bssid -> ", pRtTmpBss->bdBssIdBuf); if(Adapter->bInHctTest) - pMgntInfo->state_Synchronization_Sta = STATE_Pas_Listen; + pMgntInfo->state_Synchronization_Sta = STATE_Pas_Listen; if(CurrBSSType == RT_JOIN_NETWORKTYPE_ADHOC) bSameSSIDIbss = TRUE; - + continue; } @@ -3116,7 +3116,7 @@ SelectNetworkBySSID( RT_TRACE(COMP_MLME, DBG_LOUD, ("SelectNetworkBySSID(): Antenna testing...\n")); } } - + //3 // Security Deny List // Deny to link to the AP if TKIP MIC error occured twice in 60 sec. // 2004.10.06, by rcnjko. @@ -3150,14 +3150,14 @@ SelectNetworkBySSID( RT_TRACE(COMP_MLME, DBG_LOUD, ("SelectNetworkBySSID(): Weight the prefer band\n")); CurrWeight += WEIGHTING_PREFER_BAND; } - + //3 // Caculate the weight of BSS to determine which BSS is the Best. CurrWeight += pRtTmpBss->RSSI; //3 // Weight the probe response packet. CurrWeight += (pRtTmpBss->BssPacketType & BSS_PKT_PROBE_RSP) ? WEIGHTING_PROBE_RSP : 0; - //3 // Weight channel load. + //3 // Weight channel load. // 1. For CCX test plan v4.59 6.2.1.1 and 6.2.1.2, 070625, by rcnjko. // 2. Assume the channel utilization of BSS without channel load is 50%. if(pRtTmpBss->BssQos.bQBssLoadValid) @@ -3172,8 +3172,8 @@ SelectNetworkBySSID( CurrWeight += WEIGHTING_DEFAULT_QBSS_LOAD; } - //3 // Connect back to the origianl associated AP after S3/S4. - // Add bRoamingbySleep for DTM 1.0c test ,070823 + //3 // Connect back to the origianl associated AP after S3/S4. + // Add bRoamingbySleep for DTM 1.0c test ,070823 // In this case, we should connect back to the original AP by weighting the case of the same BSSID. // By Bruce, 2008-05-23. if( pMgntInfo->RoamingType == RT_ROAMING_BY_SLEEP || @@ -3212,7 +3212,7 @@ SelectNetworkBySSID( } }//end for( i=0; iNumBssDesc; i++) - + if(pRtMatchedBss) { // An BSS has been selected. if(pRtMatchedBss->bdCap & cESS) @@ -3235,7 +3235,7 @@ SelectNetworkBySSID( else { //match not found RT_TRACE(COMP_MLME, DBG_LOUD, ("SelectNetworkBySSID(): no BSS matched, Regdot11networktype = %d\n", pMgntInfo->Regdot11networktype)); - + join_action = RT_NO_ACTION; do @@ -3260,11 +3260,11 @@ SelectNetworkBySSID( } //Will start a adhoc at channel:pMgntInfo->Regdot11ChannelNumber -#if 0 +#if 0 if(IS_DUAL_BAND_SUPPORT(Adapter)) { WIRELESS_MODE wirelessmode; - + if(IS_WIRELESS_MODE_5G(Adapter)) { if(pMgntInfo->Regdot11ChannelNumber <= 14) @@ -3286,7 +3286,7 @@ SelectNetworkBySSID( RT_TRACE(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); HalChangeWirelessMode(Adapter, pMgntInfo->Regdot11ChannelNumber); #endif - + RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL, &(pMgntInfo->Regdot11ChannelNumber), &pChnlListEntry); if(!pChnlListEntry) // Invalid channel @@ -3315,7 +3315,7 @@ SelectNetworkBySSID( // // Description: -// Assign default preferance to each channel. +// Assign default preferance to each channel. // 2005.12.27, by rcnjko // VOID @@ -3345,7 +3345,7 @@ InitChannelWeight( case 10: nWeight = -5; break; - + default: nWeight = 0; break; @@ -3392,7 +3392,7 @@ FindBestChannel( case CH_START_MAX: InitIndex = nNumChnlFound-1; break; - + case CH_START_MIDDLE: InitIndex = nNumChnlFound/2; break; @@ -3417,7 +3417,7 @@ FindBestChannel( } RT_TRACE( COMP_SCAN, DBG_LOUD, ("FindBestChannel(): ChnlWeightList[%d]: Ch=%d, Weight=%d\n", nCurIdx, ChnlWeightList[nCurIdx].ChannelNumber, ChnlWeightList[nCurIdx].Weight) ); - pChnl = &(ChnlWeightList[nCurIdx]); + pChnl = &(ChnlWeightList[nCurIdx]); if(pChnl->Weight > nBestChnlWeight) { nBestChnlWeight = pChnl->Weight; @@ -3438,7 +3438,7 @@ FindBestChannel( // u1Byte AutoSelectChannel( - PADAPTER Adapter, + PADAPTER Adapter, PRT_WLAN_BSS pBssList, int nNumBss ) @@ -3469,13 +3469,13 @@ AutoSelectChannel( pGenBufChnlWeightList = GetGenTempBuffer (Adapter, sizeof(CHANNEL_INFO)*MAX_NUM_CHANNEL_TO_SELECT); ChnlWeightList = (CHANNEL_INFO *)pGenBufChnlWeightList->Buffer.Ptr; - + listLen = pChannelList->ChannelLen; RT_TRACE(COMP_MLME,DBG_LOUD,("AutoSelectChannel: listLen %d \n",listLen)); - if(listLen > MAX_NUM_CHANNEL_TO_SELECT) - listLen = MAX_NUM_CHANNEL_TO_SELECT; + if(listLen > MAX_NUM_CHANNEL_TO_SELECT) + listLen = MAX_NUM_CHANNEL_TO_SELECT; for(nChnlIdx = 0; nChnlIdx < listLen; nChnlIdx++) { InitChannelWeight( &(ChnlWeightList[nChnlIdx]), pChannelList->ChnlListEntry[nChnlIdx].ChannelNum); @@ -3494,7 +3494,7 @@ AutoSelectChannel( // Find channel of the BSS. for(nChnlIdx = 0; nChnlIdx < nNumChnlFound; nChnlIdx++) { - pChnl = &(ChnlWeightList[nChnlIdx]); + pChnl = &(ChnlWeightList[nChnlIdx]); if(pChnl->ChannelNumber == pBss->ChannelNumber) { break; @@ -3539,7 +3539,7 @@ AutoSelectChannel( } } - // Find best channel; + // Find best channel; if(nNumChnlFound > 0) { RT_TRACE( COMP_SCAN, DBG_LOUD, ("AutoSelectChannel(): ChnlWeightMode=%d\n", pMgntInfo->ChnlWeightMode ) ); @@ -3615,22 +3615,22 @@ FilterSupportRate( /** * Function: SelectRateSet -* -* Overview: Decide <1>dot11OperationalRateSet, <2>mBrates, <3>HighestBasicRate, -* <4>LowestBasicRate, <5>HighestOperaRate.<6>CurrentBasicRate, +* +* Overview: Decide <1>dot11OperationalRateSet, <2>mBrates, <3>HighestBasicRate, +* <4>LowestBasicRate, <5>HighestOperaRate.<6>CurrentBasicRate, * <7>CurrentOperaRate <8> SupportedRates -* -* Input: +* +* Input: * PADAPTER Adapter -* OCTET_STRING SuppRateSet // Rate sets copied from descriptor(Infrustructure -* STA more, IBSS join) or refereced from self setting(Infrastructure AP +* OCTET_STRING SuppRateSet // Rate sets copied from descriptor(Infrustructure +* STA more, IBSS join) or refereced from self setting(Infrastructure AP * mode or IBSS Creator) -* -* Output: +* +* Output: * PRT_TCB pTcb * (Frame in the Buffer of pTcb will be modified) -* -* Return: +* +* Return: * None */ @@ -3648,21 +3648,21 @@ SelectRateSet( BOOLEAN bFilterOutCCKRate = FALSE; RT_TRACE(COMP_MLME, DBG_TRACE, ("====> SelectRateSet()\n")); - + // <1> dot11OperationalRateSet CopyMemOS( &pMgntInfo->dot11OperationalRateSet, SuppRateSet, SuppRateSet.Length ); // HT capability info indicate that whether the peer support CCK rate in 20/40 Mode. 2007.01.15 by Emily - bFilterOutCCKRate = (IS_WIRELESS_MODE_HT_24G(Adapter) && pMgntInfo->pHTInfo->bCurSuppCCK == FALSE); + bFilterOutCCKRate = (IS_WIRELESS_MODE_HT_24G(Adapter) && pMgntInfo->pHTInfo->bCurSuppCCK == FALSE); - FilterSupportRate( pMgntInfo->Regdot11OperationalRateSet, + FilterSupportRate( pMgntInfo->Regdot11OperationalRateSet, &pMgntInfo->dot11OperationalRateSet, bFilterOutCCKRate); idx = (pMgntInfo->dot11OperationalRateSet.Length<64) ? pMgntInfo->dot11OperationalRateSet.Length : 64; - + // <2> mBrates, <3> HighestBasicRate, <4> LowestBasicRate, <5> HighestOperaRate hBsRate = hOpRate = 0x00; // Assign an impossible value first. Annie, 2005-03-31. - lBsRate = 0x7f; + lBsRate = 0x7f; for(i=0; idot11OperationalRateSet.Octet[i] & 0x7f; if( hOpRate < curRate ) hOpRate = curRate; - + if(pMgntInfo->dot11OperationalRateSet.Octet[i] & 0x80) { pMgntInfo->mBrates.Octet[bi] = pMgntInfo->dot11OperationalRateSet.Octet[i]; @@ -3682,11 +3682,11 @@ SelectRateSet( } else { - // - // We shall unite {dot11OperationalRateSet} with {6M,12M,24M} to extend basic rate. + // + // We shall unite {dot11OperationalRateSet} with {6M,12M,24M} to extend basic rate. // See 802.11g/D8.2 section 9.6 (p17) and section 19.1.1 (p20). 2005.12.22, by rcnjko. // - if( (pMgntInfo->dot11OperationalRateSet.Octet[i] == MGN_6M) || // 6M + if( (pMgntInfo->dot11OperationalRateSet.Octet[i] == MGN_6M) || // 6M (pMgntInfo->dot11OperationalRateSet.Octet[i] == MGN_12M) || // 12M (pMgntInfo->dot11OperationalRateSet.Octet[i] == MGN_24M) ) // 24M { @@ -3705,22 +3705,22 @@ SelectRateSet( { // If support rates in association response does not include basic rate, apply 0x02 as basic rate. pMgntInfo->mBrates.Length = 1; - + // Apply the basic data rate by wireless mode. Annie, 2005-04-01 if( IS_WIRELESS_MODE_5G(Adapter) || (IS_WIRELESS_MODE_HT_24G(Adapter) && !pMgntInfo->pHTInfo->bCurSuppCCK)) { pMgntInfo->mBrates.Octet[0] = 0x8c; // 6M hBsRate = MGN_6M; - lBsRate = MGN_6M; + lBsRate = MGN_6M; } else { pMgntInfo->mBrates.Octet[0] = 0x82; // 1M hBsRate = MGN_1M; - lBsRate = MGN_1M; + lBsRate = MGN_1M; } - + } if( hOpRate == 0x00 ) // i.e. not been updated. Annie, 2005-04-01. @@ -3738,12 +3738,12 @@ SelectRateSet( // <7> CurrentOperaRate pMgntInfo->CurrentOperaRate = pMgntInfo->HighestOperaRate; - // <8> SupportedRates, 2005.11.25, by rcnjko. + // <8> SupportedRates, 2005.11.25, by rcnjko. CopyMemOS( &(pMgntInfo->SupportedRates), pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11OperationalRateSet.Length); IOTActForcedDataRate(Adapter); - // <9> 2009/04/13 MH Before any link sequence, we must change to correct rate setting. + // <9> 2009/04/13 MH Before any link sequence, we must change to correct rate setting. // Otherwise, auth may fail if peer AP or STA do not accept our ACK rate. Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BASIC_RATE, (pu1Byte)(&pMgntInfo->mBrates) ); @@ -3785,7 +3785,7 @@ IncludedInSupportedRates( // // Description: Update bUseProtection accoding to the rule = (default | Ext. port). -// The protection status of default port need to follow extension port and the +// The protection status of default port need to follow extension port and the // extension port also need to follow default port when they are co-exist. // 2010.11.02. Added by tynli. // @@ -3803,9 +3803,9 @@ ActUpdate_ProtectionMode( pExtAdapter = GetFirstExtAdapter(Adapter); if(pExtAdapter == NULL) pExtAdapter = pDefaultAdapter; - + pExtMgntInfo = &(pExtAdapter->MgntInfo); - + GetTwoPortSharedResource(Adapter,TWO_PORT_SHARED_OBJECT__STATUS,NULL,&TwoPortStatus); if(IsDefaultAdapter(Adapter)) //Default adapter @@ -3821,7 +3821,7 @@ ActUpdate_ProtectionMode( pDefaultMgntInfo->bUseProtection = bProtection; } } - else + else { pExtMgntInfo->bProtection = bProtection; if( (TWO_PORT_STATUS)TwoPortStatus == TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT @@ -3846,13 +3846,13 @@ ActUpdate_mCapInfo( PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; pMgntInfo->mCap = updateCap; - + // Check preamble mode, 2005.01.06, by rcnjko. // Mark to update preamble value forever, 2008.03.18 by lanhsin // if( pMgntInfo->RegPreambleMode == PREAMBLE_AUTO ) { BOOLEAN ShortPreamble; - + if(pMgntInfo->mCap & cShortPreamble) { // Short Preamble if(pMgntInfo->dot11CurrentPreambleMode != PREAMBLE_SHORT) // PREAMBLE_LONG or PREAMBLE_AUTO @@ -3872,16 +3872,16 @@ ActUpdate_mCapInfo( } } } - + // STA's shall set MAC variable aSlotTime to short slot value upon transmission or - // reception of Beacon, ProbeRsp, AssocRsp, and ReAssocRsp from the BSS that the + // reception of Beacon, ProbeRsp, AssocRsp, and ReAssocRsp from the BSS that the // STA has joined or started... (ref 802.11g/D8.2, sec. 7.3.1, p12.). if( IS_WIRELESS_MODE_G(Adapter)) { u1Byte slot_time_val; u1Byte CurSlotTime; - Adapter->HalFunc.GetHwRegHandler( Adapter, HW_VAR_SLOT_TIME, &(CurSlotTime) ); - + Adapter->HalFunc.GetHwRegHandler( Adapter, HW_VAR_SLOT_TIME, &(CurSlotTime) ); + if( (updateCap & cShortSlotTime) && (!(pMgntInfo->pHTInfo->RT2RT_HT_Mode & RT_HT_CAP_USE_LONG_PREAMBLE))) { // Short Slot Time if(CurSlotTime != SHORT_SLOT_TIME) @@ -3911,7 +3911,7 @@ ActUpdate_ERPInfo( { // [Win7] pChnlAccessSetting use the common part for both adapters. 2009.07.02, by Bohn Adapter = GetDefaultAdapter(Adapter); - + if( ERPInfo & ERP_UseProtection ) { ActUpdate_ProtectionMode(Adapter, TRUE); @@ -3921,9 +3921,9 @@ ActUpdate_ERPInfo( ActUpdate_ProtectionMode(Adapter, FALSE); } - - // 2005.01.06, by rcnjko. + + // 2005.01.06, by rcnjko. if( Adapter->MgntInfo.RegPreambleMode == PREAMBLE_AUTO ) { if( ERPInfo & ERP_BarkerPreambleMode ) @@ -3934,7 +3934,7 @@ ActUpdate_ERPInfo( } -VOID +VOID EnableSingleAmpduorNot( PADAPTER Adapter, PRT_WLAN_BSS pBssDesc @@ -3942,7 +3942,7 @@ EnableSingleAmpduorNot( { u1Byte value = 0; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - + if (!ENABLE_SINGLE_AMPDU(Adapter)) // Confirm in the future. return; @@ -3962,12 +3962,12 @@ EnableSingleAmpduorNot( //When connected with Cisco AP ,we disable earlymode. But if connected with other AP, we should restore it.by wl2012-01-12 pHalData->AMPDUBurstMode = pHalData->AMPDUBurstModebackup; if(pHalData->AMPDUBurstMode) - { + { if(ENABLE_SINGLE_AMPDU(Adapter)) PlatformEFIOWrite4Byte(Adapter,0x4d0,0x8104001f); } } - + if(!pHalData->AMPDUBurstMode) return; if((pBssDesc->Vender==HT_IOT_PEER_UNKNOWN)|| @@ -3977,19 +3977,19 @@ EnableSingleAmpduorNot( value = 0; //Left at least two packets in TX FIFO(Totoal 12 packets, first AMPDU 10 packets) to trigger early mode but avoid Single AMPDU. //By YJ,120210 if(ENABLE_SINGLE_AMPDU(Adapter)) - PlatformEFIOWrite1Byte(Adapter, 0x04CA, 0x0A); + PlatformEFIOWrite1Byte(Adapter, 0x04CA, 0x0A); } else { value = 0x80; if(ENABLE_SINGLE_AMPDU(Adapter)) - PlatformEFIOWrite1Byte(Adapter, 0x04CA, 0x0B); + PlatformEFIOWrite1Byte(Adapter, 0x04CA, 0x0B); } if(ENABLE_SINGLE_AMPDU(Adapter)) value |= BIT0; - - PlatformEFIOWrite1Byte(Adapter,0x4d3,value); + + PlatformEFIOWrite1Byte(Adapter,0x4d3,value); } @@ -4010,7 +4010,7 @@ SetupJoinWirelessMode( if(Adapter->RegWirelessMode < bssWirelessMode) // Why use the judgement? { JoinWirelessMode = Adapter->RegWirelessMode; - + if (bssWirelessMode == WIRELESS_MODE_AC_24G) { JoinWirelessMode = WIRELESS_MODE_AC_24G; @@ -4098,9 +4098,9 @@ SetupStarWirelessMode( { // 2013/10/04 MH Add registry for 2.4G wireless mode VHT enabled. if(pMgntInfo->bRegVht24g && (SupportedWirelessMode & (WIRELESS_MODE_AC_24G))) - { + { WirelessMode = WIRELESS_MODE_AC_24G; - } + } else if(SupportedWirelessMode & (WIRELESS_MODE_G|WIRELESS_MODE_N_24G)) { if( (SupportedWirelessMode & WIRELESS_MODE_N_24G) && bSupportNmode) @@ -4121,7 +4121,7 @@ SetupStarWirelessMode( WirelessMode = WIRELESS_MODE_A; } } - else + else { if( IS_5G_WIRELESS_MODE(Adapter->RegWirelessMode)) { @@ -4145,7 +4145,7 @@ SetupStarWirelessMode( WirelessMode = Adapter->RegWirelessMode; else WirelessMode = WIRELESS_MODE_G; - } + } else WirelessMode = Adapter->RegWirelessMode; } @@ -4159,8 +4159,8 @@ SetupIOTAction( PADAPTER Adapter, RT_WLAN_BSS *bssDesc ) -{ - BOOLEAN bIOTAction = 0; +{ + BOOLEAN bIOTAction = 0; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; bIOTAction = IOTActWAIOTBroadcom(Adapter, bssDesc); // only broadcom @@ -4184,7 +4184,7 @@ SetupIOTAction( bIOTAction = IOTActIsEnableBETxOPLimit(Adapter, bssDesc); if(bIOTAction) pMgntInfo->IOTAction |= HT_IOT_ACT_FORCED_ENABLE_BE_TXOP; - + bIOTAction = IOTActIsForcedRTSCTS(Adapter, bssDesc); if(bIOTAction) pMgntInfo->IOTAction |= HT_IOT_ACT_FORCED_RTS; @@ -4244,7 +4244,7 @@ SetupJoinInfraInfo( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -4258,13 +4258,13 @@ SetupJoinInfraInfo( // Return to previous IPS mode. 2007.08. if (!pMgntInfo->bSetPnpPwrInProgress) IPSReturn(Adapter, IPS_DISABLE_DEF_OPMODE); - + //Emily. 20051005. In WPA/WPA2 mixed mode, group key cipher will not be set from WZC/UI, - // we have to get it from parsing of beacon. + // we have to get it from parsing of beacon. if(pSecInfo->AuthMode > RT_802_11AuthModeAutoSwitch) { pSecInfo->bGroupKeyFixed = TRUE; - + if (pSecInfo->AuthMode != RT_802_11AuthModeWAPI && pSecInfo->AuthMode != RT_802_11AuthModeCertificateWAPI) SecGetGroupCipherFromBeacon(Adapter, bssDesc); } @@ -4276,7 +4276,7 @@ SetupJoinInfraInfo( BoostInitGainValue = (u1Byte)(bssDesc->RecvSignalPower+110); McDynamicMachanismSet(Adapter, MC_DM_INIT_GAIN_BOOST_START, &BoostInitGainValue, sizeof(u1Byte)); - RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] JoinRequest, need to pause DIG and increase initial GAIN; SignalStrength(%#x)\n", bssDesc->RecvSignalPower)); + RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] JoinRequest, need to pause DIG and increase initial GAIN; SignalStrength(%#x)\n", bssDesc->RecvSignalPower)); } //WIRELESS MODE @@ -4285,10 +4285,10 @@ SetupJoinInfraInfo( // Set wireless mode to B/G mode if using WEP/TKIP encryption // 2008.06.12 // 2010/06/25 hpfan: determine IOT Peer before checking GetNmodeSupportBySecCfgHandler - ResetIOTSetting(pMgntInfo); + ResetIOTSetting(pMgntInfo); IOTPeerDetermine(Adapter, bssDesc); bSupportNmode = Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter); - + if(!bSupportNmode) { bSupportNmode = FALSE; @@ -4302,7 +4302,7 @@ SetupJoinInfraInfo( if(pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_TKIP || (pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) || (pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40)) bSupportNmode = FALSE; } - + HTInitializeHTInfo(Adapter); VHTInitializeVHTInfo(Adapter); @@ -4334,7 +4334,7 @@ SetupJoinInfraInfo( // DTIM period pMgntInfo->dot11DtimPeriod = bssDesc->bdDtimPer; - pMgntInfo->ChannelOffset = (EXTCHNL_OFFSET)GET_HT_INFO_ELE_EXT_CHL_OFFSET(bssDesc->BssHT.bdHTInfoBuf); + pMgntInfo->ChannelOffset = (EXTCHNL_OFFSET)GET_HT_INFO_ELE_EXT_CHL_OFFSET(bssDesc->BssHT.bdHTInfoBuf); // Channel number pMgntInfo->dot11CurrentChannelNumber = bssDesc->ChannelNumber; @@ -4343,7 +4343,7 @@ SetupJoinInfraInfo( { EXT_AP_NOTIFY_STA_LINK_CHANGE(pMgntInfo); } - + // Capability, 2005.04.14, by rcnjko. pMgntInfo->mCap = bssDesc->bdCap; if( pMgntInfo->RegPreambleMode == PREAMBLE_AUTO ) @@ -4362,7 +4362,7 @@ SetupJoinInfraInfo( pMgntInfo->mAssoc = FALSE; //Set TRUE while receiving association response pMgntInfo->mIbss = FALSE; // pMgntInfo->mDisable = TRUE; - + pMgntInfo->AsocTimestamp = 0; pMgntInfo->AuthRetryCount = 0; PlatformCancelTimer(Adapter, &pMgntInfo->AuthTimer); @@ -4372,7 +4372,7 @@ SetupJoinInfraInfo( pMgntInfo->mMacId = (u1Byte)MacIdRegisterMacIdForInfraClient(Adapter); pMgntInfo->mcastMacId = (u1Byte)MacIdRegisterMacIdForMCastClient(Adapter); // ------------------------------------------- - + //stop BE Queue and VI Queue when another port is connectiong to network with another channel //by sherry 20130117 { @@ -4393,7 +4393,7 @@ SetupJoinInfraInfo( { TxPauseCommand = 0x2; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_TX_PAUSE, (pu1Byte)(&TxPauseCommand)); - RT_TRACE(COMP_MLME, DBG_LOUD, ("Tx pause queue (%x)\n", TxPauseCommand)); + RT_TRACE(COMP_MLME, DBG_LOUD, ("Tx pause queue (%x)\n", TxPauseCommand)); } } } @@ -4410,7 +4410,7 @@ SetupJoinInfraInfo( SendNullFunctionData(pDefAdapter,pDefMgntInfo->Bssid,TRUE); PlatformStallExecution(10000); Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_TX_PAUSE, (pu1Byte)(&TxPauseCommand)); - RT_TRACE(COMP_MLME, DBG_LOUD, ("Tx pause queue (%x)\n", TxPauseCommand)); + RT_TRACE(COMP_MLME, DBG_LOUD, ("Tx pause queue (%x)\n", TxPauseCommand)); } } } @@ -4419,24 +4419,24 @@ SetupJoinInfraInfo( // 2008.06.12, by Lanhsin. Support half n wireless for ralink ap if((pMgntInfo->dot11CurrentWirelessMode == WIRELESS_MODE_N_24G) && (bHalfSupportNmode == TRUE)) pMgntInfo->bHalfWiirelessN24GMode = TRUE; - else + else pMgntInfo->bHalfWiirelessN24GMode = FALSE; // Set QoS mode. Added by Annie, 2005-11-09. Isaiah for WMM_APSD if( pMgntInfo->pStaQos->QosCapability & QOS_WMM ) { - pMgntInfo->pStaQos->CurrentQosMode= (bssDesc->BssQos.bdQoSMode) & + pMgntInfo->pStaQos->CurrentQosMode= (bssDesc->BssQos.bdQoSMode) & (pMgntInfo->pStaQos->QosCapability); if(pMgntInfo->pStaQos->CurrentQosMode & QOS_WMM_UAPSD) { u1Byte qosinfo; - + pMgntInfo->pStaQos->Curr4acUapsd = pMgntInfo->pStaQos->b4ac_Uapsd & 0x0F; SET_WMM_QOS_INFO_FIELD(&qosinfo, (pMgntInfo->pStaQos->Curr4acUapsd) & 0x0F); SET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(&qosinfo, (pMgntInfo->pStaQos->MaxSPLength) & 0x03); SET_WMM_INFO_ELE_QOS_INFO_FIELD(pMgntInfo->pStaQos->pWMMInfoEle, qosinfo); - + }else //legacy AP or WMM AP { SET_WMM_INFO_ELE_QOS_INFO_FIELD(pMgntInfo->pStaQos->pWMMInfoEle, 0); @@ -4451,7 +4451,7 @@ SetupJoinInfraInfo( pMgntInfo->pStaQos->QBssWirelessMode = WIRELESS_MODE_UNKNOWN; } - Adapter->HalFunc.SetWirelessModeHandler( Adapter, + Adapter->HalFunc.SetWirelessModeHandler( Adapter, SetupJoinWirelessMode(Adapter, bSupportNmode, bssDesc->wirelessmode)); // @@ -4461,7 +4461,7 @@ SetupJoinInfraInfo( (pMgntInfo->pHTInfo->bEnableHT && bssDesc->BssHT.bdSupportHT)) { HTResetSelfAndSavePeerSetting(Adapter, bssDesc); - + if(pMgntInfo->pVHTInfo->bEnableVHT && bssDesc->BssVHT.bdSupportVHT) VHTResetSelfAndSavePeerSetting(Adapter, bssDesc); else @@ -4476,12 +4476,12 @@ SetupJoinInfraInfo( if((GetDefaultMgntInfo(Adapter))->RegMultiChannelFcsMode == MULTICHANNEL_FCS_SUPPORT_GO) { u2Byte OpCode = FCS_CHNL_OPMODE_JOINBSS; - + FCS_Notify(Adapter, FCS_NOTIFY_TYPE_CHANNEL, (pu1Byte)&OpCode, sizeof(OpCode)); - } + } RT_TRACE(COMP_MLME, DBG_TRACE, ("Wireless mode %#x \n", pMgntInfo->dot11CurrentWirelessMode)); - + // Change bandwidth before join process because the AP may send the Auth and Assoc Rsp frame with // fixed rate in 40MHz/80Mhz. CHNL_SetBwChnlFromPeer(Adapter); @@ -4489,14 +4489,14 @@ SetupJoinInfraInfo( HTSetCCKSupport(Adapter, FALSE, NULL); SelectRateSet( Adapter, supprateEX ); - + SetupIOTAction(Adapter, bssDesc); // Reset TStream related, 070614, by rcnjko. // If we are in calling session under CCX4, not to remove TSs. // 2007.07.29, by shien chang. CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); - + if ( ((pMgntInfo->pStaQos->CurrentQosMode & QOS_WMM) || (pMgntInfo->pStaQos->CurrentQosMode & QOS_WMMSA)) && ( CurrCcxVerNumber >= 4 ) ) @@ -4513,13 +4513,13 @@ SetupJoinInfraInfo( } else { - QosResetAllTs(Adapter); + QosResetAllTs(Adapter); } - + // Reset Hw sequence number. 2012.11.30. by tynli. pMgntInfo->SequenceNumber = 0; - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_NQOS_SEQ_NUM, (pu1Byte)&pMgntInfo->SequenceNumber); - + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_NQOS_SEQ_NUM, (pu1Byte)&pMgntInfo->SequenceNumber); + // For debugging ONLY. Annie, 2005-11-12. QosParsingDebug_BssDesc( bssDesc ); @@ -4528,17 +4528,17 @@ SetupJoinInfraInfo( // For Turbo Mode resetting. Added by Roger, 2006.12.15. pMgntInfo->TurboChannelAccess.bEnabled=FALSE; - MgntActSet_EnterTurboMode( Adapter, FALSE); + MgntActSet_EnterTurboMode( Adapter, FALSE); pMgntInfo->targetAKMSuite = bssDesc->AKMsuit; // - // Initialize 802.11 MFP + // Initialize 802.11 MFP // PlatformZeroMemory( pSecInfo->BIPKeyBuffer, MAX_KEY_LEN ); - if( bssDesc->bMFPC && IS_AKM_SUPPORT_SHA_256(pMgntInfo->RegCapAKMSuite)) + if( bssDesc->bMFPC && IS_AKM_SUPPORT_SHA_256(pMgntInfo->RegCapAKMSuite)) { - pMgntInfo->bInBIPMFPMode = TRUE; + pMgntInfo->bInBIPMFPMode = TRUE; } else { @@ -4561,7 +4561,7 @@ SetupJoinInfraInfo( //vivi, dir655 can not receive single ampdu; so we have to turn off single ampdu when peer ap is dlink 655, 20101125 //as we can not recongize dir655, atheros or ap which doesnot carry vender information will be treated as no single ampdu received EnableSingleAmpduorNot(Adapter, bssDesc); - + nDataRate = ( IS_WIRELESS_MODE_5G(Adapter) || (IS_WIRELESS_MODE_HT_24G(Adapter) && !pMgntInfo->pHTInfo->bCurSuppCCK)) ? MGN_6M: MGN_1M; @@ -4572,8 +4572,8 @@ SetupJoinInfraInfo( SendProbeReq(Adapter, FALSE, nDataRate, TRUE); } - pSecInfo->TxIV = 0; - + pSecInfo->TxIV = 0; + RT_TRACE(COMP_MLME, DBG_TRACE, ("SetupJoinInfraInfo(): bJoinInProgress = %d\n", pMgntInfo->bJoinInProgress)); RT_TRACE(COMP_MLME, DBG_LOUD, ("SetupJoinInfraInfo() <====\n")); } @@ -4597,7 +4597,7 @@ SetupJoinIBSSInfo( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -4613,7 +4613,7 @@ SetupJoinIBSSInfo( pMgntInfo->mIbss = TRUE; pMgntInfo->mDisable = TRUE; pMgntInfo->bStartApDueToWakeup=FALSE; - + // WIRELESS MODE // Set wireless mode to B/G mode if using WEP/TKIP encryption //bSupportNmode = Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter); @@ -4622,10 +4622,10 @@ SetupJoinIBSSInfo( HTInitializeHTInfo(Adapter); VHTInitializeVHTInfo(Adapter); - + pMgntInfo->CurrentBssWirelessMode = bssDesc->wirelessmode; // Keep wireless mode of IBSS to join. 2005.02.17, by rcnjko. pMgntInfo->SettingBeforeScan.WirelessMode = pMgntInfo->dot11CurrentWirelessMode;//For N solution won't be change the wireless mode in scan - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_ANT_SWITCH, (pu1Byte)(&pMgntInfo->dot11CurrentWirelessMode)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_ANT_SWITCH, (pu1Byte)(&pMgntInfo->dot11CurrentWirelessMode)); // BSSID CopyMem( pMgntInfo->Bssid, bssDesc->bdBssIdBuf, 6 ); @@ -4656,7 +4656,7 @@ SetupJoinIBSSInfo( // // Disable Short slot time. Added by Annie, 2005-11-17. - // + // // Ref: 802.11g/D8.2, sec. 7.3.1.4, p13. First line... // "For IBSS, the Short Slot Time subfield shall be set to 0." // @@ -4694,18 +4694,18 @@ SetupJoinIBSSInfo( // Set QoS mode. Added by Annie, 2005-11-09. if( (pMgntInfo->pStaQos->QosCapability & QOS_WMM) && (bssDesc->BssQos.bdQoSMode & QOS_WMM)) { - RT_TRACE(COMP_QOS, DBG_LOUD, + RT_TRACE(COMP_QOS, DBG_LOUD, ("SetupJoinIBSSInfo Set a CurrentQosMode = QOS_WMM\r\n")); pMgntInfo->pStaQos->CurrentQosMode = QOS_WMM; pMgntInfo->pStaQos->QBssWirelessMode = pMgntInfo->CurrentBssWirelessMode; pMgntInfo->mCap |= cQos; - + // Use default EDCA parameters SET_WMM_PARAM_ELE_AC_PARAMS(pMgntInfo->pStaQos->WMMParamEle, Adapter->STA_EDCA_PARAM); } else { - RT_TRACE(COMP_QOS, DBG_LOUD, + RT_TRACE(COMP_QOS, DBG_LOUD, ("SetupJoinIBSSInfo Set a CurrentQosMode = QOS_DISABLE\r\n")); pMgntInfo->pStaQos->CurrentQosMode = QOS_DISABLE; pMgntInfo->pStaQos->QBssWirelessMode = WIRELESS_MODE_UNKNOWN; @@ -4732,10 +4732,10 @@ SetupJoinIBSSInfo( pMgntInfo->pHTInfo->bCurrentHTSupport = FALSE; pMgntInfo->pVHTInfo->bCurrentVHTSupport = FALSE; } - + Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_AP_IBSS_INTERRUPT, (pu1Byte)&intMode); - Adapter->HalFunc.SetWirelessModeHandler( Adapter, + Adapter->HalFunc.SetWirelessModeHandler( Adapter, SetupJoinWirelessMode(Adapter, bSupportNmode, bssDesc->wirelessmode)); // Change bandwidth before join process because the AP may send the Auth and Assoc Rsp frame with @@ -4743,27 +4743,27 @@ SetupJoinIBSSInfo( CHNL_SetBwChnlFromPeer(Adapter); HTSetCCKSupport(Adapter, FALSE, NULL); - + SelectRateSet( Adapter, supprateEX ); IOTPeerDetermine(Adapter,bssDesc); // Reset TStream related, 070614, by rcnjko. - QosResetAllTs(Adapter); - + QosResetAllTs(Adapter); + // Reset CCX related setting. CCX_OnBssReset(Adapter); // For Turbo Mode resetting. Added by Roger, 2006.12.15. pMgntInfo->TurboChannelAccess.bEnabled=FALSE; - MgntActSet_EnterTurboMode( Adapter, FALSE); + MgntActSet_EnterTurboMode( Adapter, FALSE); // Reset all association entry. AsocEntry_ResetAll(Adapter); // Preprocessing for starting a connection. 2006.10.17, by shien chang. MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, bssDesc->bdMacAddressBuf, 6); - + RT_TRACE(COMP_INIT, DBG_TRACE,("SetupJoinIBSSInfo(): \n")); if(MgntResetOrPnPInProgress(Adapter)) @@ -4771,7 +4771,7 @@ SetupJoinIBSSInfo( RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return; } - + // //Porting from 8xb to avoid IBSS could't reconnected issue after s3/s4, by Maddest. // @@ -4804,7 +4804,7 @@ SetupStartIBSSInfo( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -4815,13 +4815,13 @@ SetupStartIBSSInfo( // Disable IPS, 2007.08.17, by shien chang. IPSDisable(Adapter,FALSE, IPS_DISABLE_DEF_OPMODE); - + if(!pMgntInfo->bIbssStarter) { - // <1>BSSID + // <1>BSSID u1Byte rbssid[6]; u4Byte sed= (u4Byte)(PlatformGetCurrentTime() & 0xffffffff); - + rbssid[0] = 0x0; rbssid[1] = 0xe0; rbssid[2] = (u1Byte)((sed & 0xff000000)>>24); @@ -4856,7 +4856,7 @@ SetupStartIBSSInfo( // // Disable Short slot time. Added by Annie, 2005-11-17. - // + // // Ref: 802.11g/D8.2, sec. 7.3.1.4, p13. First line... // "For IBSS, the Short Slot Time subfield shall be set to 0." // @@ -4877,7 +4877,7 @@ SetupStartIBSSInfo( if(pMgntInfo->bReg11nAdhoc || pMgntInfo->bRegVht24g) bSupportNmode = TRUE; - + //Set dot11currentchannelnumber-------------- pMgntInfo->dot11CurrentChannelNumber = pMgntInfo->Regdot11ChannelNumber; Adapter->HalFunc.SetWirelessModeHandler(Adapter, SetupStarWirelessMode(Adapter, bSupportNmode)); @@ -4885,7 +4885,7 @@ SetupStartIBSSInfo( // // 060207, rcnjko: // For 11d case, we are here only if we had acquired valid country IE - // (see also JoinRequest() for details), + // (see also JoinRequest() for details), // pMgntInfo->dot11CurrentChannelNumber = ToLegalChannel(Adapter, pMgntInfo->dot11CurrentChannelNumber); @@ -4896,7 +4896,7 @@ SetupStartIBSSInfo( pMgntInfo->CurrentBssWirelessMode = pMgntInfo->dot11CurrentWirelessMode; // Keep wireless mode of IBSS to start. 2005.02.17, by rcnjko. - // 2008.06.12, by Lanhsin. + // 2008.06.12, by Lanhsin. pMgntInfo->bHalfWiirelessN24GMode = FALSE; RT_TRACE(COMP_SEC , DBG_LOUD , ("====>SWRxDecryptFlag = %d \n",pMgntInfo->SecurityInfo.SWRxDecryptFlag) ); @@ -4917,7 +4917,7 @@ SetupStartIBSSInfo( pMgntInfo->pStaQos->CurrentQosMode = QOS_WMM; pMgntInfo->pStaQos->QBssWirelessMode = pMgntInfo->dot11CurrentWirelessMode; pMgntInfo->mCap |= cQos; - + // Use default EDCA parameters SET_WMM_PARAM_ELE_AC_PARAMS(pMgntInfo->pStaQos->WMMParamEle, Adapter->STA_EDCA_PARAM); } @@ -4946,7 +4946,7 @@ SetupStartIBSSInfo( SelectRateSet( Adapter, SuppRateSets ); - if( IS_WIRELESS_MODE_G(Adapter) || + if( IS_WIRELESS_MODE_G(Adapter) || (IS_WIRELESS_MODE_HT_24G(Adapter) && pMgntInfo->pHTInfo->bCurSuppCCK) ) { ActUpdate_ERPInfo(Adapter, 0); @@ -4960,13 +4960,13 @@ SetupStartIBSSInfo( // Reset TStream related, 070614, by rcnjko. QosResetAllTs(Adapter); - + // Reset CCX related setting. CCX_OnBssReset(Adapter); // For Turbo Mode resetting. Added by Roger, 2006.12.15. pMgntInfo->TurboChannelAccess.bEnabled=FALSE; - MgntActSet_EnterTurboMode( Adapter, FALSE); + MgntActSet_EnterTurboMode( Adapter, FALSE); // Reset all association entry. AsocEntry_ResetAll(Adapter); @@ -4974,16 +4974,16 @@ SetupStartIBSSInfo( pMgntInfo->bJoinInProgress = FALSE; RT_TRACE(COMP_MLME, DBG_TRACE, ("SetupStartIBSSInfo(): bJoinInProgress = %d\n", pMgntInfo->bJoinInProgress)); RT_TRACE(COMP_MLME, DBG_LOUD, ("SetupStartIBSSInfo() <====\n")); -} +} // -// For 8187, we have to do the IOs with read operation in sync IO manner. +// For 8187, we have to do the IOs with read operation in sync IO manner. // 2005.01.06, by rcnjko. // void -IbssStartRequest( +IbssStartRequest( PADAPTER Adapter ) { @@ -5025,7 +5025,7 @@ IbssStartRequestCallback( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -5052,12 +5052,12 @@ IbssStartRequestCallback( // // Update Capability field related setting. // - // To solve Win98 IRQL==PASIVE_LEVEL in timer callback function, - // we call ActUpdate_mCapInfo() here to make sure related IOs are perfomed in correct IRQL, + // To solve Win98 IRQL==PASIVE_LEVEL in timer callback function, + // we call ActUpdate_mCapInfo() here to make sure related IOs are perfomed in correct IRQL, // that is, PASSIVE_LEVEL=>Syn IO for this case. 2005.03.15, by rcnjko. // ActUpdate_mCapInfo( Adapter, pMgntInfo->mCap ); - + // // Set BSSID. // @@ -5066,7 +5066,7 @@ IbssStartRequestCallback( // // Set Beacon related registers - // We shall update AtimWindow specified in Beacon of the IBSS if "every thing is ready." + // We shall update AtimWindow specified in Beacon of the IBSS if "every thing is ready." // pMgntInfo->dot11AtimWindow = 2; // ATIM Window (in unit of TU). Adapter->HalFunc.SetBeaconRelatedRegistersHandler(Adapter, (PVOID)(&pMgntInfo->OpMode), \ @@ -5079,8 +5079,8 @@ IbssStartRequestCallback( // Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_MEDIA_STATUS, (pu1Byte)(&pMgntInfo->OpMode) ); Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_RETRY_LIMIT, (pu1Byte)(&RetryLimit)); - - if(!pMgntInfo->bIbssStarter) + + if(!pMgntInfo->bIbssStarter) { //Correct TSF value. Suggest by Scott. Added by tynli. 2009.12.01. bTypeIbss = TRUE; @@ -5092,12 +5092,12 @@ IbssStartRequestCallback( // if(!ACTING_AS_AP(Adapter)) //For RT_AP_TYPE_IBSS_EMULATED CCK Hang,sherry sync with 92C_92D, 20110701 { - if(SwBeaconType >= BEACON_SEND_AUTO_SW) // Using SW Beacon Timer + if(SwBeaconType >= BEACON_SEND_AUTO_SW) // Using SW Beacon Timer { // S/W Beacon. PlatformSetTimer( Adapter, &pMgntInfo->SwBeaconTimer, 0 ); } else - { // H/W Beacon. + { // H/W Beacon. ConstructBeaconFrame( Adapter ); SendBeaconFrame(Adapter, BEACON_QUEUE); } @@ -5106,7 +5106,7 @@ IbssStartRequestCallback( // If connected, set RCR CBSSID bit to prevent wrong TSF for 819x series.. bFilterOutNonAssociatedBSSID = pMgntInfo->bMediaConnect; // Set to FALSE for our NIC is ibss starter by tynli. if(!pMgntInfo->bIbssStarter) - bFilterOutNonAssociatedBSSID = TRUE; + bFilterOutNonAssociatedBSSID = TRUE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_CHECK_BSSID, (pu1Byte)(&bFilterOutNonAssociatedBSSID)); // @@ -5115,7 +5115,7 @@ IbssStartRequestCallback( if(pMgntInfo->pStaQos->CurrentQosMode != QOS_DISABLE) { // Update AC parameters to HW. - u1Byte eACI = 0; + u1Byte eACI = 0; for(eACI = 0; eACI < AC_MAX; eACI++) Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AC_PARAM, GET_WMM_PARAM_ELE_SINGLE_AC_PARAM(pMgntInfo->pStaQos->WMMParamEle, eACI) ); } @@ -5131,7 +5131,7 @@ IbssStartRequestCallback( //-------------------------------------------------------------------------------- // IBSS SW Configuration. //-------------------------------------------------------------------------------- - + MgntResetLinkStatusWatchdogState(Adapter); @@ -5145,9 +5145,9 @@ IbssStartRequestCallback( // // Reset bIbssCorordinator. // - // 1. It will be update TRUE if we are winner of latest Beacon, FALSE otherwise. - // See also OnProbeReq() and NicIFHandleInterrupt() for details. - // 2. On 8187, we don't have interrupt mechanism to check if the we are winner of Beacon, + // 1. It will be update TRUE if we are winner of latest Beacon, FALSE otherwise. + // See also OnProbeReq() and NicIFHandleInterrupt() for details. + // 2. On 8187, we don't have interrupt mechanism to check if the we are winner of Beacon, // so, bIbssCoordinator must be initialize to TRUE and no other place will change it. // 2005.12.14, by rcnjko. // @@ -5158,7 +5158,7 @@ IbssStartRequestCallback( // 2005.12.13, by rcnjko. // pMgntInfo->mDisable = FALSE; - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_START_TO_LINK); + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_START_TO_LINK); RT_TRACE(COMP_MLME, DBG_TRACE, ("IbssStartRequestCallback() <====\n")); } @@ -5182,7 +5182,7 @@ IbssAgeFunction( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -5202,7 +5202,7 @@ IbssAgeFunction( if(TimeDifference > 20000) { RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "IbssAgeFunction(): timeout\n", AsocEntry[idx].MacAddr); - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, AsocEntry[idx].MacAddr, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, AsocEntry[idx].MacAddr, 6); DrvIFIndicateDisassociation(Adapter, unspec_reason, AsocEntry[idx].MacAddr); // In Win7 NDISTest AdhocInterop, it verifies that we indicate dissassoc for @@ -5212,7 +5212,7 @@ IbssAgeFunction( // 2008.08.05, haich. // //if(Adapter->bInHctTest == TRUE) -#if 0 +#if 0 { static u1Byte DummySta[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; @@ -5239,7 +5239,7 @@ IbssAgeFunction( { if(AsocEntry[idx].WirelessMode == WIRELESS_MODE_B) nBModeStaCnt++; - if(AsocEntry[idx].WirelessMode < WIRELESS_MODE_N_24G) + if(AsocEntry[idx].WirelessMode < WIRELESS_MODE_N_24G) nLegacyStaCnt++; else if(AsocEntry[idx].BandWidth == CHANNEL_WIDTH_20) n20MHzStaCnt++; @@ -5314,9 +5314,9 @@ void MgntDisconnectAP( PADAPTER Adapter, u1Byte asRsn -) +) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; BOOLEAN bFilterOutNonAssociatedBSSID = FALSE; BOOLEAN bConnected =FALSE; @@ -5326,7 +5326,7 @@ MgntDisconnectAP( } Adapter->HalFunc.AllowErrorPacketHandler(Adapter, FALSE, TRUE); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_ENABLE_TXOK_INTERRUPT, (pu1Byte)&bConnected); - + MultiChannelDisconnectClient(Adapter, TRUE); // 2004.10.11, by rcnjko. @@ -5340,7 +5340,7 @@ MgntDisconnectAP( BOOLEAN bCCX8021xenable = FALSE; CCX_QueryCCKMSupport(Adapter, &bCCX8021xenable, &bAPSuportCCKM); - + if( pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch || (bAPSuportCCKM && bCCX8021xenable) ) // In CCKM mode will Clear key { @@ -5360,7 +5360,7 @@ BOOLEAN MgntDisconnect( PADAPTER Adapter, u1Byte asRsn -) +) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; @@ -5373,9 +5373,9 @@ MgntDisconnect( // if(pMgntInfo->mPss != eAwake) { - // + // // Using AwkaeTimer to prevent mismatch ps state. - // In the timer the state will be changed according to the RF is being awoke or not. By Bruce, 2007-10-31. + // In the timer the state will be changed according to the RF is being awoke or not. By Bruce, 2007-10-31. // // PlatformScheduleWorkItem( &(pMgntInfo->AwakeWorkItem) ); PlatformSetTimer( Adapter, &(pMgntInfo->AwakeTimer), 0 ); @@ -5387,7 +5387,7 @@ MgntDisconnect( RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntDisconnect() ===> AP_DisassociateAllStation\n")); AP_DisassociateAllStation(Adapter, unspec_reason); return TRUE; - } + } //stop beacon when ibssstarter and no station joins @@ -5407,7 +5407,7 @@ MgntDisconnect( if( pMgntInfo->bMediaConnect ) { BOOLEAN bConnected =FALSE; - + if( pMgntInfo->mAssoc ) { // We should leave LPS mode first. 2011.03.23. by tynli. @@ -5415,27 +5415,27 @@ MgntDisconnect( { LeisurePSLeave(Adapter, LPS_DISABLE_MGNT_DISCONNECT); } - - // We clear key here instead of MgntDisconnectAP() because that - // MgntActSet_802_11_DISASSOCIATE() is an interface called by OS, - // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is + + // We clear key here instead of MgntDisconnectAP() because that + // MgntActSet_802_11_DISASSOCIATE() is an interface called by OS, + // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is // used to handle disassociation related things to AP, e.g. send Disassoc // frame to AP. 2005.01.27, by rcnjko. WAPI_SecFuncHandler(WAPI_RETURNALLCAMENTRY,Adapter, WAPI_END); - SecClearAllKeys(Adapter); + SecClearAllKeys(Adapter); RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntDisconnect() ===> MgntDisconnectAP\n")); MgntDisconnectAP(Adapter, asRsn); } - + Adapter->HalFunc.AllowErrorPacketHandler(Adapter, FALSE, TRUE); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_ENABLE_TXOK_INTERRUPT, (pu1Byte)&bConnected); - + // Inidicate Disconnect, 2005.02.23, by rcnjko. - MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); + MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); } pMgntInfo->bDisconnectInProgress = FALSE; @@ -5448,7 +5448,7 @@ MgntDisconnect( void MgntDisconnectIBSS( PADAPTER Adapter -) +) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; u1Byte i; @@ -5482,7 +5482,7 @@ MgntDisconnectIBSS( SendDeauthentication(Adapter, AsocEntry[i].MacAddr, deauth_lv_ss); AsocEntry[i].bAssociated = FALSE; - MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, AsocEntry[i].MacAddr, 6); + MgntUpdateAsocInfo(Adapter, UpdateDeauthAddr, AsocEntry[i].MacAddr, 6); DrvIFIndicateDisassociation(Adapter, unspec_reason, AsocEntry[i].MacAddr); RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "Sending Deauth to:", AsocEntry[i].MacAddr); @@ -5511,7 +5511,7 @@ MgntIndicateMediaDisconnectStatus( { BOOLEAN bSW20BW = FALSE; PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); pMgntInfo->LinkDetectInfo.IndicateDisconnectCnt++;//cosa add for debug pMgntInfo->bMediaConnect = FALSE; @@ -5524,17 +5524,17 @@ MgntIndicateMediaDisconnectStatus( { if(IsDefaultAdapter(Adapter)) { - RT_TRACE(COMP_MLME,DBG_LOUD,("Now is Default Adapter.\n")); + RT_TRACE(COMP_MLME,DBG_LOUD,("Now is Default Adapter.\n")); //Fix can not ping wapi ap with defaultport when stop hostednetwork, move it to here from below by ylb 20110915 WAPI_SecFuncHandler(WAPI_RETURNALLSTAINFO,pDefaultAdapter, WAPI_END); WAPI_SecFuncHandler(WAPI_RETURNALLCAMENTRY,pDefaultAdapter, WAPI_END); - + } else { RT_TRACE(COMP_MLME,DBG_LOUD,("Now is Extension Adapter.\n")); - + if(pDefaultAdapter->MgntInfo.bMediaConnect== FALSE) { RT_TRACE(COMP_MLME,DBG_LOUD,("Has no Def started.->20MHz\n")); @@ -5545,9 +5545,9 @@ MgntIndicateMediaDisconnectStatus( if(bSW20BW && !MgntScanInProgress(pMgntInfo)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); - + HalChangeWirelessMode(Adapter,pMgntInfo->dot11CurrentChannelNumber); - CHNL_SetBwChnl( Adapter, + CHNL_SetBwChnl( Adapter, pMgntInfo->dot11CurrentChannelNumber, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT @@ -5561,16 +5561,16 @@ MgntIndicateMediaDisconnectStatus( // Do this to reset TS data structure. RemoveAllTS(Adapter); } - + // - // We disable FW DIG while medium is disconnected. + // We disable FW DIG while medium is disconnected. // We currently do NOT update OpMode to allow roaming case in watchdog. // 2008.11.27. // Currently we do NOT need to enable DIG(i.e., it will reference MSR automatically). // if(!pMgntInfo->bIbssStarter) { - RT_OP_MODE OpStatus = RT_OP_MODE_NO_LINK; // update HW operation mode here. + RT_OP_MODE OpStatus = RT_OP_MODE_NO_LINK; // update HW operation mode here. Adapter->HalFunc.SetHwRegHandler( pDefaultAdapter, HW_VAR_MEDIA_STATUS, (pu1Byte)&OpStatus); } Dot11d_Reset(Adapter); @@ -5578,7 +5578,7 @@ MgntIndicateMediaDisconnectStatus( } -void +void MgntIndicateMediaStatus( PADAPTER Adapter, RT_MEDIA_STATUS mstatus, @@ -5587,26 +5587,26 @@ MgntIndicateMediaStatus( { PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); BOOLEAN bIndicate = FALSE; - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); BOOLEAN bFilterOutNonAssociatedBSSID = FALSE; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc; - + // For the first time indicating MEDIA_CONNECT. if(mstatus==RT_MEDIA_CONNECT && pDefaultAdapter->ResetProgress==RESET_TYPE_NORESET)//?? { MgntResetLinkStatusWatchdogState(Adapter); } - // We don't know when this case will be triggered and it SHOULD NOT happend. - // So, we just skip AP mode's disconnected event indication here as a workaround and + // We don't know when this case will be triggered and it SHOULD NOT happend. + // So, we just skip AP mode's disconnected event indication here as a workaround and // add assertion for debug purpose. 2005.08.16, by rcnjko. if( ACTING_AS_AP(pDefaultAdapter) && mstatus==RT_MEDIA_DISCONNECT && !(pMgntInfo->RfOffReason & (RF_CHANGE_BY_SW|RF_CHANGE_BY_HW)) ) { RT_ASSERT(TRUE, ("MgntIndicateMediaStatus(): AP mode should not indicate disconnected event!!!\n")); return; - } + } if( mstatus == RT_MEDIA_CONNECT ) { @@ -5620,16 +5620,16 @@ MgntIndicateMediaStatus( // All IC need to do this?? or only 92C need to do?? if(pMgntInfo->bIbssStarter) { - bFilterOutNonAssociatedBSSID = TRUE; + bFilterOutNonAssociatedBSSID = TRUE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_CHECK_BSSID, (pu1Byte)(&bFilterOutNonAssociatedBSSID)); } // H2C cmd for BT information. 2011.02.10. by tynli. if(pMgntInfo->mIbss) { - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_H2C_WLAN_INFO, (pu1Byte)(&mstatus)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_H2C_WLAN_INFO, (pu1Byte)(&mstatus)); } - + RT_TRACE(COMP_MLME, DBG_WARNING, ("MEDIA_STATUS_CONNECT !!\n")); } else @@ -5645,26 +5645,26 @@ MgntIndicateMediaStatus( bIndicate = TRUE; MgntIndicateMediaDisconnectStatus(Adapter); RT_TRACE(COMP_MLME, DBG_WARNING, ("MEDIA_STATUS_DISCONNECT !!\n")); - + if(pMgntInfo->mAssoc && pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE) { u2Byte JaguarPatch = (pMgntInfo->IOTPeer << 8) | mstatus; - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_JAGUAR_PATCH, (pu1Byte)(&JaguarPatch)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_JAGUAR_PATCH, (pu1Byte)(&JaguarPatch)); if(GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS) { LeisurePSLeave(Adapter, LPS_DISABLE_MGNT_INDI_DISCONNECT); Hal_ClearRsvdCtrl(Adapter, RSVDPAGE_TYPE_LPS); - Adapter->HalFunc.SetHwRegHandler(pDefaultAdapter, HW_VAR_H2C_FW_JOINBSSRPT, (pu1Byte)(&mstatus)); + Adapter->HalFunc.SetHwRegHandler(pDefaultAdapter, HW_VAR_H2C_FW_JOINBSSRPT, (pu1Byte)(&mstatus)); } - + // Deregister all MacIDs created by this adpater ------------ MacIdDeregisterMacIdForInfraClient(Adapter, pMgntInfo->mMacId); MacIdDeregisterSpecificMacId(Adapter, pMgntInfo->mcastMacId); // -------------------------------------------------- } - Adapter->HalFunc.SetHwRegHandler(pDefaultAdapter, HW_VAR_H2C_WLAN_INFO, (pu1Byte)(&mstatus)); + Adapter->HalFunc.SetHwRegHandler(pDefaultAdapter, HW_VAR_H2C_WLAN_INFO, (pu1Byte)(&mstatus)); } else { @@ -5672,9 +5672,9 @@ MgntIndicateMediaStatus( } //Reset BCN related function. Suggested by TimChen. Added by tynli. 2009.12.03. - //This check only apply to two port, consider port 2 ap mode. + //This check only apply to two port, consider port 2 ap mode. //CHECK_ADAPTER_SENDS_BEACON return zero in one port design and just reset tsf. - // + // if(IsAPModeExist(Adapter)) // IS_ADAPTER_SENDS_BEACON(Adapter) { Adapter->HalFunc.SetHwRegHandler(pDefaultAdapter, HW_VAR_DUAL_TSF_RST, 0); @@ -5690,7 +5690,7 @@ MgntIndicateMediaStatus( { RT_TRACE(COMP_MLME, DBG_WARNING, ("Warning: Unknown link status !!\n")); } - + if((bIndicate && Indicatemode != FORCE_NO_INDICATE) || (Indicatemode==FORCE_INDICATE)) { if(mstatus==RT_MEDIA_CONNECT) @@ -5727,9 +5727,9 @@ AsocTimeout( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } - + if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); @@ -5743,9 +5743,9 @@ AsocTimeout( RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] AsocTimeout...resume DIG\n")); } #endif - - //ShuChen TODO: Retry association request - + + //ShuChen TODO: Retry association request + switch( pMgntInfo->State_AsocService ) { case STATE_Wait_Asoc_Response: @@ -5772,24 +5772,24 @@ MlmeAssociateRequest( u4Byte asocTmot, u2Byte asCap, u2Byte asListenInterval, - BOOLEAN Reassociate + BOOLEAN Reassociate ) { - PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; + RT_TRACE(COMP_MLME, DBG_LOUD, ("====> MlmeAssociateRequest()\n")); if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return FALSE; - } + } DrvIFIndicateAssociationStart(Adapter); @@ -5827,7 +5827,7 @@ MlmeAssociateRequest( // [in] pRfd - // The packet container including the information of packet. // If this function is not triggered by rx packet, this field is assigned as NULL. -// [in] posMpdu - +// [in] posMpdu - // The poniter of the current packet to the 802.11 header. // If this function is not triggered by rx packet, this field is assigned as NULL. // [in] bReassociate - @@ -5865,21 +5865,21 @@ MlmeAssociateConfirm( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return RT_STATUS_FAILURE; + return RT_STATUS_FAILURE; } if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return RT_STATUS_FAILURE; - } + } // - // To simplify handling association fail, I use ErrorPoint to indicate how to + // To simplify handling association fail, I use ErrorPoint to indicate how to // handle the assocaition failed process later. By Bruce, 2008-05-28. // ErrorPoint = AssocUnspecFail; - + if(result == MlmeStatus_success) { if(posMpdu->Length > 0) @@ -5896,12 +5896,12 @@ MlmeAssociateConfirm( if(P2P_ADAPTER_OS_SUPPORT_P2P(Adapter) && P2P_ACTING_IS_CLIENT(Adapter)) { u2Byte boostDelaySec = ASSOC_HANDSHAKE_DHCP_DELAY_SEC; - + McDynamicMachanismSet(Adapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] Asoc SUCCESS! resume DIG\n")); } #endif - + if(GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS) { //For FW LPS. by tynli. To tell firmware we have connected to an AP. For 92SE/CE power save v2. Hal_SetRsvdCtrl(Adapter, RSVDPAGE_TYPE_LPS); @@ -5909,12 +5909,12 @@ MlmeAssociateConfirm( Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_H2C_WLAN_INFO, (pu1Byte)(&mstatus)); JaguarPatch = (pMgntInfo->IOTPeer << 8) | mstatus; - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_JAGUAR_PATCH, (pu1Byte)(&JaguarPatch)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_JAGUAR_PATCH, (pu1Byte)(&JaguarPatch)); // New Connection is comming, we need to confirm new channel connect and start // to judge if we need to start multi channel switch. MultiChannelAssociateConfirm(Adapter, TRUE); - + // If return Fail , try to complete State On Reset Request by bJoinInProgress flag !! if( !(bMlmeOkState == RT_STATUS_FAILURE && MgntResetOrPnPInProgress(Adapter)) ) { @@ -5923,7 +5923,7 @@ MlmeAssociateConfirm( // Download rsvd page after all required bitmap is set Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_H2C_FW_JOINBSSRPT, (pu1Byte)(&mstatus)); - + RT_TRACE(COMP_MLME, DBG_TRACE, ("MlmeAssociateConfrim(): - success, bJoinInProgress = %d\n", pMgntInfo->bJoinInProgress)); RT_TRACE(COMP_MLME, DBG_LOUD, ("return TRUE. <====\n")); @@ -5945,7 +5945,7 @@ MlmeAssociateConfirm( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return RT_STATUS_FAILURE; - } + } switch(ErrorPoint) { @@ -5971,7 +5971,7 @@ MlmeAssociateConfirm( // Postprocessing for completion of a association request, 2006,10.17, by shien chang. DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK); + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK); if(!MgntConnectOtherBss(Adapter)) { // Connect to the Other BSS failed. @@ -5980,11 +5980,11 @@ MlmeAssociateConfirm( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 4\n")); return RT_STATUS_FAILURE; - } - + } + DrvIFIndicateAssociationStart(Adapter); DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); - + if(MgntRoamingInProgress(pMgntInfo)) // Roaming. MgntRoamComplete(Adapter, MlmeStatus_invalid); else // First connection. @@ -5993,13 +5993,13 @@ MlmeAssociateConfirm( pMgntInfo->bJoinInProgress = FALSE; MultiChannelAssociateConfirm(Adapter, FALSE); } - + // pMgntInfo->bJoinInProgress = FALSE; RT_TRACE(COMP_MLME, DBG_TRACE, ("MlmeAssociateConfirm(): -fail 0, bJoinInProgress = %d\n", pMgntInfo->bJoinInProgress)); } break; - + default: break; } @@ -6022,20 +6022,20 @@ AuthTimeout( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return; - } - + } + switch( Adapter->MgntInfo.State_AuthReqService ) { case STATE_Wait_Auth_Seq_2: case STATE_Wait_Auth_Seq_4: - + // StaState(Adapter, auSta, StationState_not_auth); Adapter->MgntInfo.State_AuthReqService = STATE_Auth_Req_Idle; MlmeAuthenticateRequest_Confirm(Adapter, MlmeStatus_timeout); @@ -6068,14 +6068,14 @@ MlmeAuthenticateRequest( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return FALSE; - } + } AuthSeq = 1; AuthStatusCode = StatusCode_success; @@ -6108,7 +6108,7 @@ MlmeAuthenticateRequest_Confirm( u2Byte asListenInterval = pMgntInfo->ListenInterval; u1Byte auAlg; BOOLEAN bReassociation = FALSE; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("====> MlmeAuthenticateRequest_Confirm(): result: %d., opMode: %u\n", result, pMgntInfo->OpMode)); // Cancel AuthTimer @@ -6117,7 +6117,7 @@ MlmeAuthenticateRequest_Confirm( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) @@ -6137,8 +6137,8 @@ MlmeAuthenticateRequest_Confirm( // Auto switch authentication mode if we are in WEP encryption. 2005.03.08, by rcnjko. if( pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeAutoSwitch && - (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || - pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) ) + (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || + pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) ) { // Change auth alg. RT_TRACE(COMP_MLME, DBG_LOUD, ("MlmeAuthenticateRequest_Confirm(): Change auth alg\n")); @@ -6160,18 +6160,18 @@ MlmeAuthenticateRequest_Confirm( pMgntInfo->AuthStatus = AUTH_STATUS_IN_PROGRESS; } else - { + { RT_TRACE(COMP_MLME, DBG_LOUD, ("MlmeAuthenticateRequest_Confirm(): No more Auth retry for AuthRetryCount(%d) >= RT_AUTH_RETRY_LIMIT(%d)\n", pMgntInfo->AuthRetryCount, RT_AUTH_RETRY_LIMIT)); RT_TRACE(COMP_MLME, DBG_LOUD, ("MlmeAuthenticateRequest_Confirm(): Reset roaming and AuthStatus!\n")); #if (P2P_SUPPORT == 1) if(P2P_ADAPTER_OS_SUPPORT_P2P(Adapter) && P2P_ACTING_IS_CLIENT(Adapter)) - { + { McDynamicMachanismSet(Adapter, MC_DM_INIT_GAIN_BOOST_END, NULL, 0); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] Auth Timeout...resume DIG\n")); } #endif - + // Remember the rejected AP, if another AP in the same ESS is better, // pick the better one in further connection. 2006.11.21, by shien chang. MgntAddRejectedAsocAP(Adapter, pMgntInfo->Bssid); @@ -6190,11 +6190,11 @@ MlmeAuthenticateRequest_Confirm( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 4\n")); return FALSE; - } - + } + DrvIFIndicateAssociationStart(Adapter); DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); - + if(MgntRoamingInProgress(pMgntInfo)) // Roaming. MgntRoamComplete(Adapter, MlmeStatus_invalid); else // First connection. @@ -6202,7 +6202,7 @@ MlmeAuthenticateRequest_Confirm( pMgntInfo->bJoinInProgress = FALSE; MultiChannelAssociateConfirm(Adapter, FALSE); - } + } } return FALSE; } @@ -6228,15 +6228,15 @@ MlmeAuthenticateRequest_Confirm( // cShortPreamble, 2005.01.06, by rcnjko. if( (pMgntInfo->mCap & cShortPreamble) ) { // AP supports short and long preamble mode. - myCap |= cShortPreamble; + myCap |= cShortPreamble; } - + // cQoS if (pMgntInfo->pStaQos->CurrentQosMode) { myCap |= cQos; } - + // cShortSlotTime if(pMgntInfo->dot11CurrentWirelessMode != WIRELESS_MODE_B) { @@ -6258,11 +6258,11 @@ MlmeAuthenticateRequest_Confirm( // cDelayedBA & cImmediateBA // This part shall be add later. // - + //For 11h,Spectrum Management. if( (pMgntInfo->mCap & cSpectrumMgnt) ) { // AP supports short and long preamble mode. - myCap |= cSpectrumMgnt; + myCap |= cSpectrumMgnt; } MlmeAssociateRequest( Adapter, asocStaAddr, ASSOC_REQ_TIMEOUT, myCap, asListenInterval, bReassociation); @@ -6307,7 +6307,7 @@ JoinTimeout( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -6321,12 +6321,12 @@ JoinTimeout( RT_TRACE(COMP_MLME, DBG_TRACE, ("JoinTimeout(): bJoinInProgress = %d\n", pMgntInfo->bJoinInProgress)); - PlatformCancelTimer(Adapter, &pMgntInfo->JoinProbeReqTimer ); - + PlatformCancelTimer(Adapter, &pMgntInfo->JoinProbeReqTimer ); + // Remember the rejected AP, if another AP in the same ESS is better, // pick the better one in further connection. 2006.11.21, by shien chang. MgntAddRejectedAsocAP(Adapter, pMgntInfo->Bssid); - + if(MgntLinkRetry(Adapter, FALSE)) { RT_TRACE(COMP_MLME, DBG_LOUD,("JoinTimeout(): try to link again\n")); @@ -6335,7 +6335,7 @@ JoinTimeout( else { RT_TRACE(COMP_MLME, DBG_LOUD,("JoinTimeout(): can't perform link retry any more => reset roaming and Synchronization_Sta_State!\n")); - + if(MgntRoamingInProgress(pMgntInfo)) { // Roaming retry @@ -6345,15 +6345,15 @@ JoinTimeout( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return; - } - + } + MgntRoamComplete(Adapter, MlmeStatus_timeout); } } else - { + { // Remember the rejected AP, if another AP in the same ESS is better, // pick the better one in further connection. 2006.11.21, by shien chang. MgntAddRejectedAsocAP(Adapter, pMgntInfo->Bssid); @@ -6364,13 +6364,13 @@ JoinTimeout( if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); return; - } - + } + DrvIFIndicateAssociationStart(Adapter); DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); - + if(MgntRoamingInProgress(pMgntInfo)) // Roaming. MgntRoamComplete(Adapter, MlmeStatus_timeout); else // First connection. @@ -6379,7 +6379,7 @@ JoinTimeout( pMgntInfo->bJoinInProgress = FALSE; } } - + // pMgntInfo->state_Synchronization_Sta = STATE_No_Bss; // Disable current QoS and HT setting since Join BSS process is failed. @@ -6406,19 +6406,19 @@ JoinTimeout( // Proting by tynli from 92E svn revision 7396. 2010.09.07. DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_SUCCESS); } - + // Check the IBSS starting channel is valid. if(!CHNL_IsLegalChannel(Adapter, pMgntInfo->Regdot11ChannelNumber)) return; - + // Start an IBSS network if Join infra or adhoc network fails! RT_TRACE(COMP_MLME, DBG_LOUD,("JoinTimeout(): Start an IBSS\n")); pMgntInfo->OpMode = RT_OP_MODE_IBSS; - if (pMgntInfo->JoinAction == RT_JOIN_IBSS) + if (pMgntInfo->JoinAction == RT_JOIN_IBSS) { - pMgntInfo->JoinAction = RT_START_IBSS; + pMgntInfo->JoinAction = RT_START_IBSS; } pMgntInfo->bIbssStarter = TRUE; @@ -6431,7 +6431,7 @@ JoinTimeout( else { RT_TRACE(COMP_MLME, DBG_LOUD,("JoinTimeout(): indicate disconnect\n")); - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK); + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK); MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE ); } @@ -6449,10 +6449,10 @@ JoinTimeout( /* - * JoinRequestReschedule: + * JoinRequestReschedule: * Check wheter reschedule of JoinRequest is required if RF is in OFF state * Check whether reschedule is required - * If reschedule is required, Turn on RF, Save required parameter and + * If reschedule is required, Turn on RF, Save required parameter and * reschedule for JoinRequest * 2008/01/03 Emily */ @@ -6467,10 +6467,10 @@ JoinRequestReschedule( PMGNT_INFO pDefaultMgntInfo = &GetDefaultAdapter(Adapter)->MgntInfo; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pDefaultMgntInfo); RT_RF_POWER_STATE rtState; - + //2//<1> Check whether reschedule is required - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); if (rtState == eRfOff) { // @@ -6481,12 +6481,12 @@ JoinRequestReschedule( { RT_TRACE(COMP_SCAN, DBG_LOUD, ("RescheduleJoinRequest(): RF is OFF. Reject JoinRequest\n")); return; - + } else if (!pMgntInfo->bSetPnpPwrInProgress) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("RescheduleJoinRequest(): Under inactive ps mode, turn on RF and continue.\n")); - + pPSC->tmpJoinAction = JoinAction; if (bssDesc == NULL) { @@ -6502,10 +6502,10 @@ JoinRequestReschedule( pPSC->ptmpAdapter = Adapter; IPSLeave(Adapter,FALSE); PlatformSetTimer(Adapter, &pPSC->InactivePsTimer, SWRF_TIMEOUT); - + return; } - + } } @@ -6525,7 +6525,7 @@ JoinRequest( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } // Scan is currently performed, and mark bScanOnly to be FASLE to start join after scanning. @@ -6537,12 +6537,12 @@ JoinRequest( } // - // When RF is off, we should not accept join request. + // When RF is off, we should not accept join request. // 2007.02.07, by Roger. // - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); if (rtState == eRfOff) - { + { JoinRequestReschedule(Adapter, JoinAction, bssDesc); RT_TRACE(COMP_MLME, DBG_LOUD, ("JoinRequest() <====\n")); return; @@ -6555,7 +6555,7 @@ JoinRequest( } //sherry added for adhoc connection - //2010.02.03 + //2010.02.03 WAPI_SecFuncHandler(WAPI_RETURNALLSTAINFO,Adapter, WAPI_END); if(IS_DUAL_BAND_SUPPORT(Adapter) && (IsExtAPModeExist(Adapter))) @@ -6571,11 +6571,11 @@ JoinRequest( } } } - + // - // After discussion with CCW, we should remove all TS here to avoid incorrect TS maintenance from - // any roaming process or re-connection process after resuming from system hibernation or sleep, media status changed + // After discussion with CCW, we should remove all TS here to avoid incorrect TS maintenance from + // any roaming process or re-connection process after resuming from system hibernation or sleep, media status changed // or AP re-connection. Re-correction would reset all TS in AP site but we do NOT reset them identically. // // 2012.08.13. @@ -6589,23 +6589,23 @@ JoinRequest( pMgntInfo->last_Disassoc_seq = 0xffff; pMgntInfo->last_Deauth_seq = 0xffff; } - + switch(JoinAction) { case RT_JOIN_INFRA: RT_TRACE(COMP_MLME, DBG_LOUD, ("JoinRequest(): RT_JOIN_INFRA.......\n")); - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_START_TO_LINK); + Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_START_TO_LINK); pMgntInfo->OpMode = RT_OP_MODE_INFRASTRUCTURE; - - if((GET_POWER_SAVE_CONTROL(pMgntInfo)->bLeisurePs) && + + if((GET_POWER_SAVE_CONTROL(pMgntInfo)->bLeisurePs) && (GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS)) { LeisurePSLeave(Adapter, LPS_DISABLE_JOIN_REQ); } - + // Setup infrastructure variables SetupJoinInfraInfo( Adapter, bssDesc ); - + // Start a join timer PlatformSetTimer( Adapter, &pMgntInfo->JoinTimer, JOIN_TIMEOUT ); @@ -6633,7 +6633,7 @@ JoinRequest( // State: Wait beacon pMgntInfo->state_Synchronization_Sta = STATE_Join_Wait_Beacon; - + break; case RT_START_IBSS: @@ -6641,14 +6641,14 @@ JoinRequest( PRT_CHNL_LIST_ENTRY pChnlListEntry = NULL; u1Byte Channel = pMgntInfo->Regdot11ChannelNumber; BOOLEAN bStart = FALSE; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("JoinRequest(): RT_START_IBSS.......\n")); do - { + { RT_TRACE(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); HalChangeWirelessMode(Adapter, Channel); - + // // Get channel info. // @@ -6656,7 +6656,7 @@ JoinRequest( if(!pChnlListEntry) // This channel is invlid. break; - + if(pChnlListEntry->ExInfo & CHANNEL_EXINFO_NO_IBSS_START) // Do not start IBSS at this channel. { // @@ -6672,7 +6672,7 @@ JoinRequest( GET_HAL_DATA(Adapter)->DM_OutSrc.RFCalibrateInfo.bNeedIQK = TRUE; // - //In some situation, we will send beacon in the wrong channel, such as send beacon on channel 10, + //In some situation, we will send beacon in the wrong channel, such as send beacon on channel 10, //but the beacon IE channel is 1. So that no one can connect to it. By Maddest 05132009 // @@ -6696,7 +6696,7 @@ JoinRequest( RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress RT_START_IBSS\n")); return; } - + // //Porting from 8xb to avoid IBSS can not relink after s3/s4 on Vista, by Maddest // @@ -6706,7 +6706,7 @@ JoinRequest( DrvIFIndicateConnectionStart(Adapter); else if(MgntRoamingInProgress(pMgntInfo)) DrvIFIndicateRoamingStart( Adapter); - + IbssStartRequest( Adapter ); RT_TRACE(COMP_MLME, DBG_TRACE,("JoinRequest(): \n")); @@ -6714,7 +6714,7 @@ JoinRequest( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 4\n")); return; - } + } // //Porting from 8xb to avoid IBSS can not relink after s3/s4 on Vista, by Maddest // @@ -6731,9 +6731,9 @@ JoinRequest( pMgntInfo->bInToSleep = FALSE; // State: Active Ibss pMgntInfo->state_Synchronization_Sta = STATE_Ibss_Active; - + bStart = TRUE; - + }while(FALSE); if(!bStart) @@ -6785,7 +6785,7 @@ JoinProbeReq( SendProbeReq(Adapter, FALSE, nDataRate, FALSE); SendProbeReqEx(Adapter, nDataRate, FALSE); - + PlatformSetTimer(Adapter,&pMgntInfo->JoinProbeReqTimer,200); } @@ -6808,13 +6808,13 @@ JoinConfirm( u1Byte auStaAddr[6]; u1Byte auAlg = OPEN_SYSTEM; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("====> JoinConfirm()\n")); if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -6830,7 +6830,7 @@ JoinConfirm( PlatformSetTimer(Adapter,&pMgntInfo->JoinConfirmTimer,50); return; } - + if( OpMode == RT_OP_MODE_INFRASTRUCTURE ){ //(1)Infrastructure mode: Send auth to AP //Send authentication request if received beacon during join period @@ -6849,16 +6849,16 @@ JoinConfirm( RT_TRACE(COMP_INIT, DBG_TRACE,("JoinConfirm(): Unknown OP mode\n")); } - if( needauthreq ){ + if( needauthreq ){ CopyMem( auStaAddr, pMgntInfo->Bssid, 6 ); - // If we are in auto switch mode, start with shared key authentication first. 2005.03.08, by rcnjko. + // If we are in auto switch mode, start with shared key authentication first. 2005.03.08, by rcnjko. if(pMgntInfo->SecurityInfo.AuthMode == RT_802_11AuthModeAutoSwitch) { pMgntInfo->AuthReq_auAlg = SHARED_KEY; } - - if(FtIsFtAuthReady(Adapter, pMgntInfo->Bssid)) + + if(FtIsFtAuthReady(Adapter, pMgntInfo->Bssid)) { RT_PRINT_ADDR(COMP_SEC, DBG_LOUD, "Change auth alg to FT for BSSID = ", pMgntInfo->Bssid); pMgntInfo->AuthReq_auAlg = AUTH_ALG_FT; @@ -6870,7 +6870,7 @@ JoinConfirm( pMgntInfo->RoamingState = ROAMINGSTATE_AUTHENTICATION; } PlatformCancelTimer(Adapter, &pMgntInfo->AuthTimer); - pMgntInfo->AuthRetryCount = 0; + pMgntInfo->AuthRetryCount = 0; MlmeAuthenticateRequest( Adapter, auStaAddr, auAlg, AUTH_REQ_TIMEOUT ); } @@ -6881,9 +6881,9 @@ JoinConfirm( HAL_HW_TIMER_TYPE TimerType = HAL_TIMER_EARLYMODE; u4Byte val = TimerType<<16; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_HW_REG_TIMER_INIT, (pu1Byte)(&val)); - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_HW_REG_TIMER_RESTART, (pu1Byte)(&TimerType)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_HW_REG_TIMER_RESTART, (pu1Byte)(&TimerType)); } - + RT_TRACE(COMP_MLME, DBG_LOUD, ("JoinConfirm() <====\n")); } @@ -6896,8 +6896,8 @@ JoinConfirm( // Result - // The input roaming status indicating that roaming is success or fail. // Note: -// We use "MlmeStatus" to indicate the roaming status for input, because the -// status is now enough and satisfied for the current roaming procedure. +// We use "MlmeStatus" to indicate the roaming status for input, because the +// status is now enough and satisfied for the current roaming procedure. // By Bruce, 2008-05-16. // VOID @@ -6907,9 +6907,9 @@ MgntRoamComplete( ) { PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; - + FunctionIn(COMP_MLME); - + if( (Result != MlmeStatus_success) ) { // Roaming Failed. if(!OS_SUPPORT_WDI(pAdapter)) @@ -6938,7 +6938,7 @@ MgntRoamComplete( else DrvIFIndicateRoamingComplete(pAdapter, RT_STATUS_FAILURE); } - + // Reset all mgnt variables. ResetMgntVariables(pAdapter); } @@ -6961,7 +6961,7 @@ MgntRoamComplete( DrvIFIndicateRoamingComplete(pAdapter, RT_STATUS_SUCCESS); // Reset all variables about roaming. MgntResetRoamingState(pMgntInfo); - MgntResetJoinCounter(pMgntInfo); + MgntResetJoinCounter(pMgntInfo); //to avoid no linkquality indication pAdapter->RxStats.LastLinkQuality = 0xFF; @@ -7007,12 +7007,12 @@ ScanSendProbeReq( if( (IsSSIDAny( pMgntInfo->Ssid )) || (IsSSIDDummy( pMgntInfo->Ssid )) || // This SSID is not regular. By Bruce, 2008-12-30. - (Idx%2!=0)) // Asked by owen, 2005.03.24. + (Idx%2!=0)) // Asked by owen, 2005.03.24. { //3 Any probe if(!MgntRoamingInProgress(pMgntInfo)) bAnySsid=TRUE; - else + else return FALSE; } else @@ -7029,10 +7029,10 @@ ScanSendProbeReq( // won't respond to us. 2004.12.06, by rcnjko. // We set PwrMgt bit of ProbeReq of original channel in prevent of ping packet loss. 2004.12.10, by rcnjko. // - // We cannot send ProbeReq with PwrMgt bit, o.w. some hidden AP, e.g. WGR615v, will not + // We cannot send ProbeReq with PwrMgt bit, o.w. some hidden AP, e.g. WGR615v, will not // response our ProbeRsp. 2005.03.23, by rcnjko. // - if( pMgntInfo->mAssoc && + if( pMgntInfo->mAssoc && pChnlListEntry->ChannelNum == pMgntInfo->SettingBeforeScan.ChannelNumber&& bAnySsid == TRUE && pMgntInfo->RoamingType != RT_ROAMING_NORMAL && pMgntInfo->bMediaConnect) @@ -7040,7 +7040,7 @@ ScanSendProbeReq( if(!pMgntInfo->bScanWithMagicPacket) { SendProbeReq(Adapter, bAnySsid, nDataRate, TRUE); - + if(!pMgntInfo->bHiddenSSIDEnable) SendProbeReqEx(Adapter, nDataRate, TRUE); @@ -7059,9 +7059,9 @@ ScanSendProbeReq( { if(!pMgntInfo->bScanWithMagicPacket) { - if(!pMgntInfo->bScanOnly && !Adapter->bInHctTest) + if(!pMgntInfo->bScanOnly && !Adapter->bInHctTest) bAnySsid = FALSE; - + SendProbeReq(Adapter, bAnySsid, nDataRate, FALSE); SendProbeReqEx(Adapter, nDataRate, FALSE); if(Adapter->bInHctTest || CustomScan_InProgress(GET_CUSTOM_SCAN_INFO(Adapter))) @@ -7094,23 +7094,23 @@ ScanSwitchChannel( return; } - RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanSwitchChannel():Switch to channel(%d) period (%d)\n", pChnlListEntry->ChannelNum, pChnlListEntry->ScanPeriod)); + RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanSwitchChannel():Switch to channel(%d) period (%d)\n", pChnlListEntry->ChannelNum, pChnlListEntry->ScanPeriod)); if(IS_DUAL_BAND_SUPPORT(Adapter)) WirelessModeInScan = pMgntInfo->SettingBeforeScan.WirelessModeScanInProgress; if(WirelessModeInScan != pMgntInfo->dot11CurrentWirelessMode) { - RT_TRACE(COMP_SCAN, DBG_WARNING, ("ScanSwitchChannel():Befor scan wirelessmode(%d) dot11wirelessmode (%d)\n", + RT_TRACE(COMP_SCAN, DBG_WARNING, ("ScanSwitchChannel():Befor scan wirelessmode(%d) dot11wirelessmode (%d)\n", WirelessModeInScan, pMgntInfo->dot11CurrentWirelessMode)); Adapter->HalFunc.SetWirelessModeHandler(Adapter, (u1Byte)(WirelessModeInScan)); } - + Mgnt_SwChnl(Adapter, pChnlListEntry->ChannelNum, 1); // Go to next step. pMgntInfo->ScanStep++; - + //Sinda 20150915, we use workitem to switch channel and os execute workitem after 15 ms. //So we should set timer with 15 ms to avoid timer break off workitem. MgntSetScanTimer(Adapter, 15); @@ -7123,13 +7123,13 @@ ScanSwitchComplete( ) { BOOLEAN bDoWMMFix; - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("===> ScanSwitchComplete(),scan complete restore.\n")); if(IS_DUAL_BAND_SUPPORT(Adapter)) { if(pMgntInfo->bDualModeScanStep == 1 && !pMgntInfo->bCompleteScan) - goto GOTO_NEXT_BAND_SCAN; + goto GOTO_NEXT_BAND_SCAN; if(pMgntInfo->bCompleteScan) { @@ -7139,7 +7139,7 @@ ScanSwitchComplete( } CustomScan_PreScanCompleteCb(GET_CUSTOM_SCAN_INFO(Adapter)); - + // Scan completed. Restore original setting. if( pMgntInfo->SettingBeforeScan.WirelessMode != pMgntInfo->dot11CurrentWirelessMode) { @@ -7152,13 +7152,13 @@ ScanSwitchComplete( PlatformMoveMemory(Adapter->MgntInfo.pStaQos->WMMParamEle, pMgntInfo->SettingBeforeScan.WMMParamEle,WMM_PARAM_ELEMENT_SIZE); } } - + Adapter->HalFunc.SetWirelessModeHandler(Adapter, (u1Byte)(pMgntInfo->SettingBeforeScan.WirelessMode)); } HAL_ChannelAndBandWidthRecoveryAfterScan(Adapter); - GOTO_NEXT_BAND_SCAN: + GOTO_NEXT_BAND_SCAN: // Wait for original status pMgntInfo->ScanStep = 2; // PlatformSetTimer(Adapter, &pMgntInfo->ScanTimer, 1); @@ -7202,7 +7202,7 @@ ScanMergeResult( bFoundBss[CountQueryBss] = TRUE; } } - + if(pMgntInfo->NumBssDesc4Query > pMgntInfo->NumBssDesc) { @@ -7213,23 +7213,23 @@ ScanMergeResult( { bNeedToMove = FALSE; StartToMoveBackAddr = CountToMoveToBack = pMgntInfo->NumBssDesc; - } + } // If the bss is not in the lastest scan list, then decrease its history count, check its live time. // Remove the bss, if history count is reach to zero. - // Remove the bss, if its live time out of 2 seconds. + // Remove the bss, if its live time out of 2 seconds. for(CountQueryBss=0; CountQueryBss < NumBssDesc4Query && CountToMoveToBack < MAX_BSS_DESC; CountQueryBss++) { if(bFoundBss[CountQueryBss] == FALSE) { - // If scan is reset because of reset, don't decrease the count otherwise the folowing - // SelectNetworkBySSID of connect request would return no action and force an - // unnecessary scan. + // If scan is reset because of reset, don't decrease the count otherwise the folowing + // SelectNetworkBySSID of connect request would return no action and force an + // unnecessary scan. if(pMgntInfo->bssDesc4Query[CountQueryBss].HistoryCount > 0 && !pMgntInfo->bResetInProgress ) pMgntInfo->bssDesc4Query[CountQueryBss].HistoryCount --; - + if( (pMgntInfo->bssDesc4Query[CountQueryBss].HistoryCount != 0) ) { if(CurrentTime > pMgntInfo->bssDesc4Query[CountQueryBss].HistoryTime) @@ -7237,7 +7237,7 @@ ScanMergeResult( else DiffTime = PlatformDivision64(pMgntInfo->bssDesc4Query[CountQueryBss].HistoryTime - CurrentTime, 1000000); - if(DiffTime < DiffTimeThreshold) + if(DiffTime < DiffTimeThreshold) bMoveToBack = TRUE; // Keep it if keepalive else bMoveToBack = FALSE; // Remove it when timeout @@ -7246,10 +7246,10 @@ ScanMergeResult( bMoveToBack = FALSE; // Remove it when count zero } else - bMoveToBack = FALSE; //Keep it - + bMoveToBack = FALSE; //Keep it + if(bMoveToBack) - { + { CopyWlanBss(pMgntInfo->bssDesc4Query+CountToMoveToBack, pMgntInfo->bssDesc4Query+CountQueryBss); CountToMoveToBack++; } @@ -7257,13 +7257,13 @@ ScanMergeResult( { //RT_TRACE(COMP_SCAN, DBG_TRACE, ("History %d DiffTime %"i64fmt"d channel %d\n",pMgntInfo->bssDesc4Query[CountQueryBss].HistoryCount, DiffTime, pMgntInfo->bssDesc4Query[CountQueryBss].ChannelNumber)); RT_PRINT_STR(COMP_SCAN, DBG_TRACE,"Ssid", pMgntInfo->bssDesc4Query[CountQueryBss].bdSsIdBuf, pMgntInfo->bssDesc4Query[CountQueryBss].bdSsIdLen); - RT_PRINT_STR(COMP_SCAN, DBG_TRACE,"Bssid", pMgntInfo->bssDesc4Query[CountQueryBss].bdBssIdBuf, 6); + RT_PRINT_STR(COMP_SCAN, DBG_TRACE,"Bssid", pMgntInfo->bssDesc4Query[CountQueryBss].bdBssIdBuf, 6); } } - + pMgntInfo->NumBssDesc4Query = pMgntInfo->NumBssDesc; // Move the lost Bss to the tail of Bss List - for( CountBss = pMgntInfo->NumBssDesc, CountQueryBss = StartToMoveBackAddr; + for( CountBss = pMgntInfo->NumBssDesc, CountQueryBss = StartToMoveBackAddr; CountQueryBss < CountToMoveToBack; CountQueryBss++, CountBss++) { if(bNeedToMove) @@ -7271,7 +7271,7 @@ ScanMergeResult( pMgntInfo->NumBssDesc4Query++; } - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: ScanMergeResult(), NumBssDesc4Query=%d\n", pMgntInfo->NumBssDesc4Query)); for(CountBss = 0; CountBss < pMgntInfo->NumBssDesc; CountBss++) { @@ -7279,13 +7279,13 @@ ScanMergeResult( pMgntInfo->bssDesc4Query[CountBss].HistoryCount = History_Count_Limit; pMgntInfo->bssDesc4Query[CountBss].HistoryTime = CurrentTime; } - + for(CountQueryBss = 0;CountQueryBss < pMgntInfo->NumBssDesc4Query;CountQueryBss++) { //RT_TRACE(COMP_SCAN, DBG_TRACE, ("# %d HistoryCount %d HistoryTime %"i64fmt"d\n",CountQueryBss, pMgntInfo->bssDesc4Query[CountQueryBss].HistoryCount, pMgntInfo->bssDesc4Query[CountQueryBss].HistoryTime)); RT_PRINT_STR(COMP_SCAN, DBG_TRACE,"Ssid", pMgntInfo->bssDesc4Query[CountQueryBss].bdSsIdBuf, pMgntInfo->bssDesc4Query[CountQueryBss].bdSsIdLen); - } - + } + RxDesc_BackupScanList(Adapter); } @@ -7311,16 +7311,16 @@ ScanByTimer( RT_TRACE(COMP_SCAN, DBG_LOUD, ("<=== ScanByTimer(): bDriverStopped.\n")); { PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); - + while(pLoopAdapter) { pLoopAdapter->MgntInfo.bScanInProgress = FALSE; pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } - return; + return; } - + if(MgntScanInProgress(pMgntInfo) || (pMgntInfo->bDualModeScanStep==2) ) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("<=== ScanByTimer(): scan in progress. MgntScanInProgress(pMgntInfo) %d bDualModeScanStep %d\n", MgntScanInProgress(pMgntInfo), pMgntInfo->bDualModeScanStep)); @@ -7328,7 +7328,7 @@ ScanByTimer( // An dirty workaround for scan process. If the scan is in progress, and it is called // before connect. Then we set the scan flag again to let the last scan complete event // be indicated. 2007.01.04, by shien chang. - if (pMgntInfo->bIndicateConnectEvent) + if (pMgntInfo->bIndicateConnectEvent) { DrvIFIndicateScanStart(Adapter); } @@ -7338,7 +7338,7 @@ ScanByTimer( { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress\n")); return; - } + } // For 40Mhz mode pMgntInfo->bScan_20MHz = FALSE; @@ -7352,13 +7352,13 @@ ScanByTimer( pLoopAdapter->MgntInfo.bScanInProgress = TRUE; if(pLoopAdapter->MgntInfo.Scancount==0xFF) pLoopAdapter->MgntInfo.Scancount = 0; - else + else pLoopAdapter->MgntInfo.Scancount++; pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } // ----------------------------------------------------------- - + CustomScan_ScanByTimerCb(GET_CUSTOM_SCAN_INFO(Adapter)); //Sherry Sync with 92C_92D 20110701. To Avoid CCK Hang with 2.4G Send Beacon on CCK Rate @@ -7441,7 +7441,7 @@ ScanByTimer( // Tell AP we are in Power-Save mode. Hal_PauseTx(Adapter, HW_DISABLE_TX_DATA); - + // In prevent of lossing ping packet during scanning. 2004.12.06, by rcnjko. scanTimer = scanGetScanTimer(Adapter); @@ -7463,11 +7463,11 @@ MgntConstructAnotherBandScanList( wirelessmode = WIRELESS_MODE_G; else wirelessmode = WIRELESS_MODE_A; - + Adapter->HalFunc.SetWirelessModeHandler(Adapter, (u1Byte)(wirelessmode)); pMgntInfo->SettingBeforeScan.WirelessModeScanInProgress = wirelessmode; RT_TRACE(COMP_SCAN,DBG_LOUD,("Reconstruct scan list wireless mode 0x%x \n", wirelessmode)); - + // Reset scan state pMgntInfo->ScanStep=0; RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_LIST, NULL, NULL); @@ -7485,15 +7485,15 @@ ScanSelectAntenna( PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); // Note for CustomizedScanRequest - // If the scaning process is initiated by the CustomizedScanRequest, simply do the scan + // If the scaning process is initiated by the CustomizedScanRequest, simply do the scan // specified in the CustomizedScanRequest context. - + // The following codes conduct the normal scanning process again due to the antenna diversity. - + // 20100514 Joseph: Interrupt scan operation here. // For SW antenna diversity before link, it needs to switch to another antenna and scan again. // It compares the scan result and select beter one to do connection. - + if(CustomScan_InProgress(GET_CUSTOM_SCAN_INFO(Adapter))) ret = FALSE; else if ((&pHalData->DM_OutSrc)->Adapter != NULL) @@ -7516,7 +7516,7 @@ ScanComplete( u2Byte i; u4Byte OrgBssMunber = 0; BOOLEAN bStopScan = FALSE; - + PLATFORM_WRITE_EVENT_LOG(Adapter, RT_SCAN_COMPLETE, 0); RT_TRACE(COMP_SCAN, DBG_LOUD, ("MAC %d ===> ScanComplete() port number %d CustomizedScanRequest.bEnabled %d bCompleteScan %d bScanOnly %d\n",Adapter->interfaceIndex, Adapter->pNdis62Common->PortNumber, CustomScan_InProgress(GET_CUSTOM_SCAN_INFO(Adapter)), pMgntInfo->bCompleteScan, pMgntInfo->bScanOnly)); @@ -7524,7 +7524,7 @@ ScanComplete( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(MgntResetOrPnPInProgress(Adapter)) @@ -7532,7 +7532,7 @@ ScanComplete( RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return; } - + PlatformAcquireSpinLock(Adapter, RT_SCAN_SPINLOCK); bStopScan = pMgntInfo->bCompleteScan; @@ -7557,7 +7557,7 @@ ScanComplete( if( pMgntInfo->bCheckScanTime == TRUE ) pMgntInfo->bCheckScanTime = FALSE; - // Clear the CustomizedScanRequest + // Clear the CustomizedScanRequest // Prefast warning C6011: Dereferencing NULL pointer '((Adapter))->pPortCommonInfo->pDefaultAdapter'. if(GetDefaultMgntInfo(Adapter) != NULL && CustomScan_InProgress(GET_CUSTOM_SCAN_INFO(Adapter))) @@ -7573,7 +7573,7 @@ ScanComplete( } // ----------------------------------------------------------------------------------- - // Start P2P Mgnt Timer ----------------------------------------------------------------- + // Start P2P Mgnt Timer ----------------------------------------------------------------- { PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); if(P2P_ENABLED(pP2PInfo)) @@ -7600,11 +7600,11 @@ ScanComplete( { pLoopAdapter->MgntInfo.bScanInProgress = FALSE; pLoopAdapter->MgntInfo.bDualModeScanStep = 0; - + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } - + //sherry added for wlk1.6 VWifiInfraSoftAP_ext //20110927 if(!Adapter->bInHctTest) @@ -7614,7 +7614,7 @@ ScanComplete( // In order to prevent to call MgntLinkRetry immediately. Annie, 2005-04-25. // Do not change these counters if we are in romaing state. 2005.05.27, by rcnjko. - if(!MgntRoamingInProgress(pMgntInfo) && + if(!MgntRoamingInProgress(pMgntInfo) && (pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod==0 || pMgntInfo->LinkDetectInfo.NumRecvDataInPeriod==0 ) ) { pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod = 1; @@ -7633,14 +7633,14 @@ ScanComplete( bFilterOutNonAssociatedBSSID = TRUE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_CHECK_BSSID, (pu1Byte)(&bFilterOutNonAssociatedBSSID)); } - } + } } } // Joseph 20090703: Finish sniffing the packets in the channel. if(Adapter->RxStats.CurRxSniffMediaPktCnt != 0) Adapter->RxStats.LastRxSniffMediaPktCnt = Adapter->RxStats.CurRxSniffMediaPktCnt; - + // In prevent of lossing ping packet during scanning. // 2004.12.06, by rcnjko. // @@ -7654,24 +7654,24 @@ ScanComplete( !MgntRoamingInProgress(ptmpMgntInfo) && ptmpMgntInfo->bMediaConnect && !ACTING_AS_AP(ptmpAdapter)) { - SendNullFunctionData(ptmpAdapter, ptmpMgntInfo->Bssid, IS_WIFI_POWER_SAVE(ptmpMgntInfo) ? TRUE : FALSE); // 1st + SendNullFunctionData(ptmpAdapter, ptmpMgntInfo->Bssid, IS_WIFI_POWER_SAVE(ptmpMgntInfo) ? TRUE : FALSE); // 1st } ptmpAdapter = GetNextExtAdapter(ptmpAdapter); } } - + Hal_PauseTx(Adapter, HW_ENABLE_TX_ALL); // // CCX SSIDL to construct NEW BssDesc // OrgBssMunber = pMgntInfo->NumBssDesc; - + if(!Adapter->bInHctTest) { ScanMergeResult(Adapter, pMgntInfo); //3 Construct Scan Period - RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_PERIOD, NULL, NULL); + RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_CONSTRUCT_SCAN_PERIOD, NULL, NULL); } else { @@ -7683,7 +7683,7 @@ ScanComplete( CopyWlanBss(pMgntInfo->bssDesc4Query+i, pMgntInfo->bssDesc+i); } } - + // Restore state_Synchronization_Sta parameters -------------------------------------------------------------------------- { PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); @@ -7709,18 +7709,18 @@ ScanComplete( // Save the current time as the last scan complete time. MultiportRecordLastScanTime(Adapter); - //restore for hidden AP scan with 92d dual band. + //restore for hidden AP scan with 92d dual band. // if(pMgntInfo->bCompleteScan && IS_DUAL_BAND_SUPPORT(Adapter)) { - pMgntInfo->bNeedSkipScan = FALSE; - pMgntInfo->bCompleteScan = FALSE; + pMgntInfo->bNeedSkipScan = FALSE; + pMgntInfo->bCompleteScan = FALSE; pMgntInfo->bScanTimeExceed = FALSE; } - + // Handle the packet queued during scanning. #if (MULTICHANNEL_SUPPORT == 1) //multichannel mechnism sending packets after scan -//by sherry 20130117 +//by sherry 20130117 // Prefast warning C6011 : Dereferencing NULL pointer '((Adapter))->pPortCommonInfo->pDefaultAdapter' if(GetDefaultAdapter(Adapter) != NULL && GetDefaultAdapter(Adapter)->bInHctTest) @@ -7737,9 +7737,9 @@ ScanComplete( { // Post process for scan operation. 2006.10.16, by shien chang. - DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); + DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); } - + if(pMgntInfo->bScanOnly == FALSE && bStopScan == FALSE) { // @@ -7754,15 +7754,15 @@ ScanComplete( RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress bScanOnly FALSE\n")); return; } - + PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)); if(pRtBss != NULL) { join_action = SelectNetworkBySSID( Adapter, &pMgntInfo->Ssid, bRoaming, pRtBss); RT_TRACE(COMP_MLME, DBG_LOUD, ("ScanComplete(): join_action(%d) bIbssStarter(%d)\n", join_action, pMgntInfo->bIbssStarter)); } - - RT_TRACE(COMP_MLME, DBG_LOUD, ("RoamgingType %d, and JoinAction %d\n", pMgntInfo->RoamingType, join_action)); + + RT_TRACE(COMP_MLME, DBG_LOUD, ("RoamgingType %d, and JoinAction %d\n", pMgntInfo->RoamingType, join_action)); // By Bruce, 2008-06-02. if (MgntRoamingInProgress(pMgntInfo) && join_action == RT_NO_ACTION) { @@ -7771,12 +7771,12 @@ ScanComplete( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); if(pRtBss != NULL) PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - + return ; - } + } MgntRoamComplete(Adapter, MlmeStatus_timeout); // Roam failed. } } @@ -7786,13 +7786,13 @@ ScanComplete( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 3\n")); if(pRtBss != NULL) PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - + return ; } - + // // Indicate connection complete event if the first connection. // @@ -7800,7 +7800,7 @@ ScanComplete( { // Roam failed. MgntRoamComplete(Adapter, MlmeStatus_timeout); - } + } else if(pMgntInfo->bIndicateConnectEvent) { RT_OP_MODE rtOpMode = pMgntInfo->OpMode; @@ -7831,7 +7831,7 @@ ScanComplete( { // scan only. { CCX_OnScanComplete(Adapter); - + BSS_OnScanComplete(Adapter); // Check PreAuth state @@ -7850,7 +7850,7 @@ ScanComplete( } } - + CHNL_ReleaseOpLock(Adapter); PlatformHandleNLOnScanComplete(Adapter); @@ -7885,7 +7885,7 @@ ScanCallback( RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanCallback: bDriverStopped return \n")); { PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); - + while(pLoopAdapter) { pLoopAdapter->MgntInfo.bScanInProgress = FALSE; @@ -7912,7 +7912,7 @@ ScanCallback( if(IS_AUTO_CHNL_IN_PROGRESS(Adapter)) { PlatformReleaseSpinLock(Adapter, RT_ACS_SPINLOCK); - RT_TRACE(COMP_SCAN, DBG_LOUD, ("[ACS] ScanCallback: AutoChnlSelCalInProgress...return and wait for a while\n")); + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[ACS] ScanCallback: AutoChnlSelCalInProgress...return and wait for a while\n")); PlatformSetTimer(Adapter, &pMgntInfo->ScanTimer, 2); return; } @@ -7941,7 +7941,7 @@ ScanCallback( if( deltatime >= 2800 ) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanCallback: scan time is over 2800 mini-seconds and indicate scan complete to avoid scan time is too long\n")); - + pMgntInfo->bCompleteScan = TRUE; pMgntInfo->bScanTimeExceed = TRUE; ScanComplete(Adapter); @@ -7952,30 +7952,30 @@ ScanCallback( } HAL_ChannelAndBandWidthRecoveryAfterScan(Adapter); - + return; } } - } + } // Set this to make sure that scan process and bandwidth switching would not run at the same time. if(pMgntInfo->pChannelInfo->ChnlOp != CHNLOP_SCAN) - { + { if(!CHNL_AcquireOpLock(Adapter, CHNLOP_SCAN)) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanCallback: CHNLOP_SCAN acquire fail \n")); - + PlatformSetTimer(Adapter, &pMgntInfo->ScanTimer, 1); return; } - } + } // Wait for previous channel switching complete before starting scan. if(RT_IsSwChnlAndBwInProgress(Adapter) || CHNL_SwChnlAndSetBwInProgress(Adapter)) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanCallback():Wait for previous channel switching\n")); PlatformSetTimer(Adapter, &pMgntInfo->ScanTimer, 1); - return; + return; } // Make sure that bandwidth is switching to 20MHz mode @@ -7984,7 +7984,7 @@ ScanCallback( if(HAL_SwitchTo20MHzBeforeScan(Adapter)) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("ScanCallback: HAL_SwitchTo20MHzBeforeScan \n")); - + PlatformSetTimer(Adapter, &pMgntInfo->ScanTimer, 1); return; } @@ -7993,10 +7993,10 @@ ScanCallback( switch(pMgntInfo->ScanStep) { case 0: - // 2012.11.15 Lansin Need consider more. + // 2012.11.15 Lansin Need consider more. // 1. Shall Send null data after send data to AP - // 2. Shall not send null data on other channel. -#if (MULTICHANNEL_SUPPORT ==1 && P2P_SUPPORT == 1) + // 2. Shall not send null data on other channel. +#if (MULTICHANNEL_SUPPORT ==1 && P2P_SUPPORT == 1) // Disable Tx Data --------------------------------------------------------------------- if(Adapter->bInHctTest == TRUE ) { @@ -8006,7 +8006,7 @@ ScanCallback( //multichannel disable BE Queue and VI Queue by sherry 20130117 MultichannelHandlePacketDuringScan(Adapter,TRUE); } - // ---------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------- #endif { BOOLEAN bComplete = !RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_SCAN_CHANNEL, NULL, &pChnlListEntry); @@ -8017,14 +8017,14 @@ ScanCallback( if(ScanSelectAntenna(Adapter)) return; } - + if(IS_DUAL_BAND_SUPPORT(Adapter)) bComplete |= (pMgntInfo->bCompleteScan || Adapter->bDriverIsGoingToUnload || Adapter->bSurpriseRemoved); if(bComplete) { - RT_TRACE(COMP_SCAN, DBG_LOUD, ("bCompleteScan %d bDriverIsGoingToUnload %d bSurpriseRemoved %d\n", pMgntInfo->bCompleteScan, Adapter->bDriverIsGoingToUnload, Adapter->bSurpriseRemoved)); - ScanSwitchComplete(Adapter, pMgntInfo); // Scan completed. + RT_TRACE(COMP_SCAN, DBG_LOUD, ("bCompleteScan %d bDriverIsGoingToUnload %d bSurpriseRemoved %d\n", pMgntInfo->bCompleteScan, Adapter->bDriverIsGoingToUnload, Adapter->bSurpriseRemoved)); + ScanSwitchComplete(Adapter, pMgntInfo); // Scan completed. } else // Switch channel. { @@ -8042,8 +8042,8 @@ ScanCallback( RT_TRACE(COMP_SCAN, DBG_LOUD, ("[ACS] ScanCallback(): (1) RT_GetChannelNumber(%d), AUTO_CHNL_STATE(%d)\n", RT_GetChannelNumber(pDefAdapter),GET_AUTO_CHNL_STATE(Adapter))); PlatformAcquireSpinLock(Adapter, RT_ACS_SPINLOCK); - if((MgntLinkStatusQuery(pDefAdapter) == RT_MEDIA_DISCONNECT) && - P2PIsSocialChannel(RT_GetChannelNumber(pDefAdapter)) && + if((MgntLinkStatusQuery(pDefAdapter) == RT_MEDIA_DISCONNECT) && + P2PIsSocialChannel(RT_GetChannelNumber(pDefAdapter)) && (GET_AUTO_CHNL_STATE(pDefAdapter) == ACS_BEFORE_NHM)) { PlatformReleaseSpinLock(Adapter, RT_ACS_SPINLOCK); @@ -8052,19 +8052,19 @@ ScanCallback( if( PlatformScheduleWorkItem( &(pMgntInfo->AutoChnlSel.AutoChnlSelWorkitem))) { SET_AUTO_CHNL_PROGRESS(Adapter, TRUE); - SET_AUTO_CHNL_STATE(Adapter, ACS_IN_NHM);// ACS is Calculating now by NHM measurement - + SET_AUTO_CHNL_STATE(Adapter, ACS_IN_NHM);// ACS is Calculating now by NHM measurement + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[ACS] ScanCallback: Defer for NHM measurement in another WI Callback...\n")); PlatformSetTimer(Adapter, &pMgntInfo->ScanTimer, 5); return; - } + } } else{ PlatformReleaseSpinLock(Adapter, RT_ACS_SPINLOCK); - } + } } -#endif - ScanSwitchChannel(Adapter, pMgntInfo, pChnlListEntry); +#endif + ScanSwitchChannel(Adapter, pMgntInfo, pChnlListEntry); } } break; @@ -8098,8 +8098,8 @@ ScanCallback( { RT_TRACE(COMP_SCAN, DBG_LOUD, ("pNextChnlListEntry->ChannelNum: %d\n", pNextChnlListEntry->ChannelNum)); } - -#if P2P_SUPPORT == 1 + +#if P2P_SUPPORT == 1 if(pNextChnlListEntry == NULL || pChnlListEntry->ChannelNum != pNextChnlListEntry->ChannelNum) pDevicePortP2PInfo->TimeStartToStopSendingProbeResponse = PlatformGetCurrentTime() + pChnlListEntry->ScanPeriod * 1000 - P2P_RESERVED_TIME_FOR_ACTION_FRAME_MS * 1000; else @@ -8129,9 +8129,9 @@ ScanCallback( // In prevent of lossing ping packet during scanning. // Since we've send notification to AP, it is not necessary to // switch back to original channel. 2004.12.06, by rcnjko. - pMgntInfo->ScanStep = 0; + pMgntInfo->ScanStep = 0; //--------------------------------------------------------------------------- - + { #if( MULTICHANNEL_SUPPORT ==1 && P2P_SUPPORT == 1) //add by ylb 201201029 ,WIN8 WHCK WFD Invitaion After Before Test: DUT will connect to AP after WFD connected, it will Send Disassotiate to SUT, SUT will roaming and do scan, but it still connect to AP, that scan process result in Packet loss or long Lantency between SUT and AP, So we send Packet in each scan step if(Adapter->bInHctTest == TRUE ) @@ -8146,10 +8146,10 @@ ScanCallback( #if(AUTO_CHNL_SEL_NHM == 1) if(IS_AUTO_CHNL_SUPPORT(Adapter)) - { + { SET_AUTO_CHNL_SCAN_PERIOD(Adapter, pChnlListEntry->ScanPeriod); - - RT_TRACE(COMP_SCAN, DBG_WARNING, ("[ACS] ScanCallback(): Current channel(%d) ScanPeriod(%d)!!!\n", + + RT_TRACE(COMP_SCAN, DBG_WARNING, ("[ACS] ScanCallback(): Current channel(%d) ScanPeriod(%d)!!!\n", pChnlListEntry->ChannelNum, Adapter->MgntInfo.AutoChnlSel.AutoChnlSelPeriod)); } #endif @@ -8164,7 +8164,7 @@ ScanCallback( case 2: ScanComplete(Adapter); break; - + default: RT_TRACE(COMP_SCAN, DBG_WARNING, ("ScanCallback(): Unexpected ScanStep(%d)!!!\n", pMgntInfo->ScanStep)); break; @@ -8187,7 +8187,7 @@ SendDataFrameQueued( u1Byte QueueID; s1Byte Counter = 14; RT_STATUS rtStatus; - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); for(QueueID = 0; QueueID < MAX_TX_QUEUE; QueueID++) @@ -8207,7 +8207,7 @@ SendDataFrameQueued( RTInsertHeadListWithCnt(Get_WAIT_QUEUE(Adapter,QueueID), &pTcb->List,GET_WAIT_QUEUE_CNT(Adapter,QueueID)); break; } - } + } } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); @@ -8232,7 +8232,7 @@ MgntResetScanProcess( { RT_TRACE(COMP_SCAN, DBG_LOUD, ("MgntResetScanProcess(): padapter port number %d \n", pAdapter->pNdis62Common->PortNumber)); } - + #if (MULTICHANNEL_SUPPORT == 1) MultiChannelUpdateSettingBeforeScanOnResetRequest(pAdapter); @@ -8257,25 +8257,25 @@ MgntResetScanProcess( if( pMgntInfo->bCheckScanTime == TRUE ) pMgntInfo->bCheckScanTime = FALSE; - - if(!pMgntInfo->bScanInProgress && pMgntInfo->bDualModeScanStep ==0) + + if(!pMgntInfo->bScanInProgress && pMgntInfo->bDualModeScanStep ==0) { if( (IsAPModeExist(Adapter) == FALSE) && (MgntLinkStatusQuery(Adapter) == RT_MEDIA_CONNECT || MgntLinkStatusQuery(GetFirstClientPort(pAdapter)) == RT_MEDIA_CONNECT) ) { RT_TRACE(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); - + HalChangeWirelessMode(Adapter, pMgntInfo->SettingBeforeScan.ChannelNumber); - + MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - Adapter, - pMgntInfo->SettingBeforeScan.ChannelNumber, - pMgntInfo->SettingBeforeScan.ChannelBandwidth, - pMgntInfo->SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz, - pMgntInfo->SettingBeforeScan.Ext40MHzChnlOffsetOf80MHz, + Adapter, + pMgntInfo->SettingBeforeScan.ChannelNumber, + pMgntInfo->SettingBeforeScan.ChannelBandwidth, + pMgntInfo->SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz, + pMgntInfo->SettingBeforeScan.Ext40MHzChnlOffsetOf80MHz, 0 ); - } + } DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); } else @@ -8292,12 +8292,12 @@ MgntResetScanProcess( pChnlInfo = pMgntInfo->pChannelInfo; if(pChnlInfo->ChnlOp == CHNLOP_SCAN) break; - else + else pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } if(pLoopAdapter == NULL || ((pLoopAdapter == Adapter) && (pLoopAdapter->MgntInfo.pChannelInfo->ChnlOp == CHNLOP_NONE))) - { + { // RT_ASSERT(FALSE, ("pLoopAdapter is NULL\n")); bAdapterIsNull = TRUE; pLoopAdapter = Adapter; @@ -8314,29 +8314,29 @@ MgntResetScanProcess( if(!PlatformCancelTimer(pLoopAdapter, &(pMgntInfo->ScanTimer))) { pLoopAdapter->MgntInfo.bResetScan = TRUE; - RT_TRACE(COMP_SCAN, DBG_LOUD, ("MgntResetScanProcess cancel scantimer FAIL!!!\n")); + RT_TRACE(COMP_SCAN, DBG_LOUD, ("MgntResetScanProcess cancel scantimer FAIL!!!\n")); } else { - pLoopAdapter->MgntInfo.bResetScan = FALSE; + pLoopAdapter->MgntInfo.bResetScan = FALSE; } - + PlatformHandleNLOnScanCancel(pLoopAdapter); - Hal_PauseTx(pLoopAdapter, HW_ENABLE_TX_ALL); + Hal_PauseTx(pLoopAdapter, HW_ENABLE_TX_ALL); CHNL_ReleaseOpLock(pLoopAdapter); } // - // Update latest BSS list for query immediately if scan process is broken by OID_DOT11_RESET_REQUEST. - // The reason why we need to do this is because WLAN AutoCfg would try to prepare connection request after radio status + // Update latest BSS list for query immediately if scan process is broken by OID_DOT11_RESET_REQUEST. + // The reason why we need to do this is because WLAN AutoCfg would try to prepare connection request after radio status // was changed from off to on. At the same time, OID_DOT11_RESET_REQUEST would be scheduled to break this scan process. // 2014.03.06. // if(!Adapter->bInHctTest) - ScanMergeResult(Adapter, pMgntInfo);// ScanComplete shall be called in this function instead, so fix me!! - + ScanMergeResult(Adapter, pMgntInfo);// ScanComplete shall be called in this function instead, so fix me!! + // - // We should indicate failure status for current scan requirement when driver is going to suspend, + // We should indicate failure status for current scan requirement when driver is going to suspend, // otherwise wireless icon will be red X in resumption flow. // 2013.12.26. // @@ -8344,7 +8344,7 @@ MgntResetScanProcess( DrvIFIndicateScanComplete(pLoopAdapter, RT_STATUS_FAILURE); else DrvIFIndicateScanComplete(pLoopAdapter, RT_STATUS_SUCCESS); - + { // Reset ScanProcess -------------------------------------------------- pLoopAdapter = GetDefaultAdapter(Adapter); @@ -8357,7 +8357,7 @@ MgntResetScanProcess( pLoopAdapter->MgntInfo.ScanStep = 0; // pLoopAdapter->MgntInfo.RequestFromUplayer = FALSE; pLoopAdapter->MgntInfo.bDualModeScanStep = 0; - pLoopAdapter->MgntInfo.bScanOnly = TRUE; + pLoopAdapter->MgntInfo.bScanOnly = TRUE; //pLoopAdapter->MgntInfo.bCompleteScan = TRUE; pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } @@ -8368,7 +8368,7 @@ MgntResetScanProcess( CustomScan_ScanResetCb(GET_CUSTOM_SCAN_INFO(pAdapter)); FunctionOut(COMP_SCAN); - + } @@ -8392,7 +8392,7 @@ MgntResetLinkProcess( pMgntInfo->bMlmeStartReqRsn = MLMESTARTREQ_NONE; pMgntInfo->bJoinInProgress = FALSE; pMgntInfo->bScanOnly = TRUE; -// MgntResetRoamingState(pMgntInfo); +// MgntResetRoamingState(pMgntInfo); pMgntInfo->state_Synchronization_Sta = STATE_No_Bss; MgntResetJoinCounter(pMgntInfo); @@ -8401,7 +8401,7 @@ MgntResetLinkProcess( for( i=0; iLinkDetectInfo.RxBcnNum[i] = 0; } - + // Half the time required to determine if we are disconneted. 2005.03.10, by rcnjko. //Adapter->MgntInfo.LinkDetectInfo.SlotNum = 5; pMgntInfo->LinkDetectInfo.SlotNum = 2; @@ -8422,13 +8422,13 @@ MgntResetJoinProcess( if (pMgntInfo->state_Synchronization_Sta == STATE_Join_Wait_Beacon) { - PlatformCancelTimer(Adapter, &pMgntInfo->JoinTimer); + PlatformCancelTimer(Adapter, &pMgntInfo->JoinTimer); PlatformCancelTimer(Adapter, &pMgntInfo->JoinConfirmTimer ); PlatformCancelTimer(Adapter, &pMgntInfo->JoinProbeReqTimer ); pMgntInfo->state_Synchronization_Sta = STATE_No_Bss; pMgntInfo->JoinRetryCount = 0; } - + if (pMgntInfo->State_AuthReqService != STATE_Auth_Req_Idle) { PlatformCancelTimer( Adapter, &pMgntInfo->AuthTimer ); @@ -8459,7 +8459,7 @@ MgntLinkRetry( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(pMgntInfo->bSetPnpPwrInProgress) @@ -8474,17 +8474,17 @@ MgntLinkRetry( #if P2P_SUPPORT == 1 // Only scan in the idle device port ---------------------------- pDevicePort = GetFirstDevicePort(Adapter); - + if(pDevicePort != NULL) { pP2PInfo = GET_P2P_INFO(pDevicePort); - + if((pP2PInfo->State != P2P_STATE_INITIALIZED) || pP2PInfo->bDeviceDiscoveryInProgress) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("%s: NDIS_STATUS_DOT11_MEDIA_IN_USE\n", __FUNCTION__)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("%s: pP2PInfo->State: %d bDeviceDiscoveryInProgress %d\n", __FUNCTION__, pP2PInfo->State, pP2PInfo->bDeviceDiscoveryInProgress)); return FALSE; - } + } } #endif @@ -8492,7 +8492,7 @@ MgntLinkRetry( if(DefAdapter->MgntInfo.RegMultiChannelFcsMode == 0) { if(P2P_ENABLED(GET_P2P_INFO(Adapter))) - + { PP2P_INFO pP2PInfoTmp = (PP2P_INFO)pMgntInfo->pP2PInfo; if(pP2PInfoTmp->Role == P2P_CLIENT &&MgntLinkStatusQuery(DefAdapter) == RT_MEDIA_CONNECT ) @@ -8516,7 +8516,7 @@ MgntLinkRetry( if( bForceRetry || ((pMgntInfo->Regdot11networktype != RT_JOIN_NETWORKTYPE_ADHOC||Adapter->bInHctTest) && pMgntInfo->JoinRetryCount < MAX_JOIN_RETRY_COUNT && - !MgntIsTimeOutForIndication(pMgntInfo)) + !MgntIsTimeOutForIndication(pMgntInfo)) ) { if(bForceRetry) @@ -8561,12 +8561,12 @@ MgntLinkRetry( RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkRetry(): scan is in progress.\n")); pMgntInfo->bScanOnly = FALSE; } - - + + return TRUE; } - + RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkRetry(): return FALSE for JoinRetryCount(%d) >= MAX_JOIN_RETRY_COUNT(%d)\n", pMgntInfo->JoinRetryCount, MAX_JOIN_RETRY_COUNT)); return FALSE; @@ -8587,7 +8587,7 @@ MgntLinkRetry( // No retry roaming. // Note: // This function named "MgntRoamRetry" does not only mean 802.11 roaming but also -// includes link retry using the "roaming event under Ndis6 or later" to meet DTM or +// includes link retry using the "roaming event under Ndis6 or later" to meet DTM or // customized request. // So when calling this function, the driver whould not be sure to send reassociation packets. // By Bruce, 2009-02-12. @@ -8610,10 +8610,10 @@ MgntRoamRetry( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } - RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntRoamRetry(): Roaming Type = %d, RoamingFailCount = %d (Limit = %d)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntRoamRetry(): Roaming Type = %d, RoamingFailCount = %d (Limit = %d)\n", pMgntInfo->RoamingType, pMgntInfo->RoamingFailCount, pMgntInfo->RegRoamingLimitCount)); #if 0 @@ -8621,11 +8621,11 @@ MgntRoamRetry( (MgntScanInProgress(pMgntInfo)&& pMgntInfo->bScanOnly == FALSE)) // Case 2 : we in link after scan , so we do no thing !! { RT_TRACE(COMP_MLME, DBG_LOUD, ("RETURN!! bScanInProgress %d bScanOnly %d JoinTimer.Status 0x%x JoinConfirmTimer.Status 0x%x JoinProbeReqTimer.Status 0x%x AuthTimer.Status 0x%x AsocTimer.Status 0x%x bJoinInProgress %d\n", pMgntInfo->bScanInProgress, pMgntInfo->bScanOnly, pMgntInfo->JoinTimer.Status, pMgntInfo->JoinConfirmTimer.Status, pMgntInfo->JoinProbeReqTimer.Status, pMgntInfo->AuthTimer.Status, pMgntInfo->AsocTimer.Status, pMgntInfo->bJoinInProgress )); - + return TRUE; } #endif - + if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("bResetInProgress\n")); @@ -8634,32 +8634,32 @@ MgntRoamRetry( if(MgntIsTimeOutForIndication(pMgntInfo)) return FALSE; - - pMgntInfo->RequestFromUplayer = FALSE; - if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) + pMgntInfo->RequestFromUplayer = FALSE; + + if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) return FALSE; - - if((pMgntInfo->RoamingFailCount > pMgntInfo->RegRoamingLimitCount + + + if((pMgntInfo->RoamingFailCount > pMgntInfo->RegRoamingLimitCount + ((pMgntInfo->RoamingType == RT_ROAMING_BY_SLEEP) ? 1 : 0)) // Wake up from sleep, more time to raom. && !bForceRetry) { // Exceeds Roaming Limit, do not try. if(pMgntInfo->RoamingType != RT_ROAMING_NONE) { while(GetDesiredSSIDList(Adapter)) - { + { join_action = SelectNetworkBySSID(Adapter, &(pMgntInfo->Ssid), TRUE, pRtBss); // // Select a different AP to roam. // if(join_action == RT_JOIN_INFRA) { // An BSS has been selected. - RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "MgntRoamRetry(): BSS to roam", pRtBss->bdBssIdBuf); + RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "MgntRoamRetry(): BSS to roam", pRtBss->bdBssIdBuf); pMgntInfo->RoamingState = ROAMINGSTATE_SCANNING; JoinRequest(Adapter, RT_JOIN_INFRA, pRtBss); bRetry = TRUE; break; - } + } } if(join_action == RT_NO_ACTION) @@ -8691,7 +8691,7 @@ MgntRoamRetry( // if(join_action == RT_JOIN_INFRA) { // An BSS has been selected. - RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "MgntRoamRetry(): BSS to roam", pRtBss->bdBssIdBuf); + RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "MgntRoamRetry(): BSS to roam", pRtBss->bdBssIdBuf); pMgntInfo->RoamingState = ROAMINGSTATE_SCANNING; JoinRequest(Adapter, RT_JOIN_INFRA, pRtBss); bRetry = TRUE; @@ -8704,7 +8704,7 @@ MgntRoamRetry( bRetry = FALSE; } } - + if(pRtBss != NULL) PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); @@ -8715,10 +8715,10 @@ MgntRoamRetry( /* - * MgntLinkRequestReschedule: + * MgntLinkRequestReschedule: * Check wheter reschedule of JoinRequest is required if RF is in OFF state * Check whether reschedule is required - * If reschedule is required, Turn on RF, Save required parameter and + * If reschedule is required, Turn on RF, Save required parameter and * reschedule for MgntLinkRequestReschedule * 2008/01/03 Emily */ @@ -8747,10 +8747,10 @@ MgntLinkRequestReschedule( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return TRUE; + return TRUE; } - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); if (rtState == eRfOff/* || rtState ==eRfSleep*/) { // @@ -8762,29 +8762,29 @@ MgntLinkRequestReschedule( RT_TRACE(COMP_SCAN, DBG_LOUD, ("MgntLinkRequestReschedule(): Dont scan beacuse RF is OFF.\n")); if(bScanOnly) { - if(MgntScanInProgress(pMgntInfo)) + if(MgntScanInProgress(pMgntInfo)) MgntResetScanProcess( Adapter ); } else - { + { DrvIFIndicateScanStart( Adapter); DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); - + if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return TRUE; } - + if(MgntRoamingInProgress(pMgntInfo)) { MgntRoamComplete(Adapter, MlmeStatus_invalid) ; - } + } else if (pMgntInfo->RequestFromUplayer) { DrvIFIndicateConnectionStart( Adapter); DrvIFIndicateConnectionComplete( Adapter,RT_STATUS_FAILURE); - } + } MgntResetLinkProcess(Adapter); } return TRUE; @@ -8804,8 +8804,8 @@ MgntLinkRequestReschedule( else { pPSC->bTmpSsid2Scan = TRUE; - FillOctetString(pPSC->tmpSsid2Scan, - pPSC->tmpSsidBuf, + FillOctetString(pPSC->tmpSsid2Scan, + pPSC->tmpSsidBuf, sizeof(pPSC->tmpSsidBuf) ); CopyMemOS(&(pPSC->tmpSsid2Scan), *pSsid2scan, pSsid2scan->Length); @@ -8822,8 +8822,8 @@ MgntLinkRequestReschedule( else { pPSC->bTmpSuppRate = TRUE; - FillOctetString(pPSC->tmpSuppRateSet, - pPSC->tmpSuppRateBuf, + FillOctetString(pPSC->tmpSuppRateSet, + pPSC->tmpSuppRateBuf, sizeof(pPSC->tmpSuppRateBuf) ); CopyMemOS(&(pPSC->tmpSuppRateSet), *pSuppRateSet, pSuppRateSet->Length); @@ -8892,23 +8892,23 @@ MgntLinkRequest( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return FALSE; + return FALSE; } if(MgntResetOrPnPInProgress(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress \n")); return FALSE; - } + } //2008.12.31 Added by tynli - if (pPSC->bSwRfProcessing) + if (pPSC->bSwRfProcessing) { RT_TRACE(COMP_RF, DBG_LOUD, ("<=== MgntLinkRequest(): Rf is in switching state.\n")); //2009.01.01 Added by tynli to fix the race condision problem when IPS is truning RF to off. //1.Store the Link information Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); - + if ((rtState == eRfOff) && (pPSC->BufConnectinfoBefore == FALSE)) { pPSC->bTmpScanOnly = bScanOnly; @@ -8924,8 +8924,8 @@ MgntLinkRequest( else { pPSC->bTmpSsid2Scan = TRUE; - FillOctetString(pPSC->tmpSsid2Scan, - pPSC->tmpSsidBuf, + FillOctetString(pPSC->tmpSsid2Scan, + pPSC->tmpSsidBuf, sizeof(pPSC->tmpSsidBuf) ); CopyMemOS(&(pPSC->tmpSsid2Scan), *pSsid2scan, pSsid2scan->Length); @@ -8942,8 +8942,8 @@ MgntLinkRequest( else { pPSC->bTmpSuppRate = TRUE; - FillOctetString(pPSC->tmpSuppRateSet, - pPSC->tmpSuppRateBuf, + FillOctetString(pPSC->tmpSuppRateSet, + pPSC->tmpSuppRateBuf, sizeof(pPSC->tmpSuppRateBuf) ); CopyMemOS(&(pPSC->tmpSuppRateSet), *pSuppRateSet, pSuppRateSet->Length); @@ -8961,11 +8961,11 @@ MgntLinkRequest( // and do the link action when IPS RF off progress is finished. (e.g. Associstion) pPSC->LinkReqInIPSRFOffPgs = TRUE; } - + // 2010/05/10 MH For the timing test. We need to indicate a scan complete event // to prevent OS stop to send scan request OID for 1~2 minutes. If driver is trying to // enter or exit IPS when we execute scan request. - + // // We should perform above scan operation under IPS mode to prevent NULL scan list before @@ -8978,7 +8978,7 @@ MgntLinkRequest( } } - + // When scan only condition, we save the scan start time and prevent // the scan time from exceeding 4 minutes. if(!pMgntInfo->bPendScanOID) @@ -8990,31 +8990,31 @@ MgntLinkRequest( } } else - pMgntInfo->bPendScanOID = FALSE; + pMgntInfo->bPendScanOID = FALSE; // // 1. Checking RF state for entering C3/C4 issue. - // 2. When RF is off, we should not accept link request. + // 2. When RF is off, we should not accept link request. // 3. 2007.02.09, by Roger. // - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); if (rtState == eRfOff) - { + { MgntLinkRequestReschedule(Adapter, bScanOnly, bActiveScan, bFilterHiddenAP, \ bUpdateParms, pSsid2scan, NetworkType, ChannelNumber, BcnPeriod, \ DtimPeriod, mCap, pSuppRateSet, pIbpm); RT_TRACE(COMP_SCAN, DBG_LOUD, ("<=== MgntLinkRequest(): RF is OFF.\n")); - // We should not indicate scan complete here or it will cause acting the flow "IPS-> enter S3/S4 + // We should not indicate scan complete here or it will cause acting the flow "IPS-> enter S3/S4 // -> resume from S3/S4 -> IPS -> manually scan once" then OS WLAN icon shows "Red X" because - // we indicate a null scan list here. The scan complete should have been indicated after + // we indicate a null scan list here. The scan complete should have been indicated after // IPS re-scan flow. 2013.03.05, noted by tynli. //DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); return TRUE; - } + } if( (pMgntInfo->mAssoc) && ( pMgntInfo->bMediaConnect) && - !(pMgntInfo->bScanInProgress) && + !(pMgntInfo->bScanInProgress) && !(pMgntInfo->bDualModeScanStep==2)) { LeisurePSLeave(Adapter, LPS_DISABLE_LINK_REQ); @@ -9022,7 +9022,7 @@ MgntLinkRequest( PlatformAcquireSpinLock(Adapter, RT_SCAN_SPINLOCK); - if (Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_IQK_STATUS, (PBOOLEAN)&bIQKInProgress)) + if (Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_IQK_STATUS, (PBOOLEAN)&bIQKInProgress)) { if(bIQKInProgress) { @@ -9034,7 +9034,7 @@ MgntLinkRequest( return TRUE; } } - + if(pMgntInfo->bScanInProgress || (pMgntInfo->bDualModeScanStep==2) ) { RT_TRACE(COMP_SCAN, DBG_LOUD, ("<=== MgntLinkRequest(): scan in progress.\n")); @@ -9042,11 +9042,11 @@ MgntLinkRequest( PlatformReleaseSpinLock(Adapter, RT_SCAN_SPINLOCK); RT_TRACE(COMP_MP, DBG_LOUD, ("== Scan Release Mutex of RF Protection ==\n")); - + // An dirty workaround for scan process. If the scan is in progress, and it is called // before connect. Then we set the scan flag again to let the last scan complete event // be indicated. 2007.01.04, by shien chang. - if (pMgntInfo->bIndicateConnectEvent) + if (pMgntInfo->bIndicateConnectEvent) { DrvIFIndicateScanStart(Adapter); // to connect after scan, see also scancomplete 2008 06 20 Neo @@ -9057,18 +9057,18 @@ MgntLinkRequest( pMgntInfo->bScanOnly = FALSE; return TRUE; } - + pMgntInfo->bScanOnly = bScanOnly; pMgntInfo->FilterHiddenAP = bFilterHiddenAP; pMgntInfo->bActiveScan = bActiveScan; if(IS_DOT11D_ENABLE(pMgntInfo) ) - { + { // - // Check if we still get the same country IE in this scan, + // Check if we still get the same country IE in this scan, // if not, we shall reset it. // - RESET_CIE_WATCHDOG(pMgntInfo); + RESET_CIE_WATCHDOG(pMgntInfo); } RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkRequest(): %s....\n", (pMgntInfo->bActiveScan ? "Active Scan": "Passive Scan"))); @@ -9081,7 +9081,7 @@ MgntLinkRequest( if( pSsid2scan->Length ) { CopySsidOS(pMgntInfo->Ssid, *pSsid2scan); - } + } pMgntInfo->dot11CurrentChannelNumber = ChannelNumber; pMgntInfo->dot11BeaconPeriod = BcnPeriod; pMgntInfo->dot11DtimPeriod = DtimPeriod; @@ -9094,15 +9094,15 @@ MgntLinkRequest( else { // Use Regdot11OperationalRateSet as default, 2004.11.16, by rcnjko. - CopyMemOS( &pMgntInfo->SupportedRates, - pMgntInfo->Regdot11OperationalRateSet, + CopyMemOS( &pMgntInfo->SupportedRates, + pMgntInfo->Regdot11OperationalRateSet, pMgntInfo->Regdot11OperationalRateSet.Length ); } SelectRateSet( Adapter, pMgntInfo->SupportedRates ); pMgntInfo->mIbssParms.atimWin = pIbpm->atimWin; pPSC->BufConnectinfoBefore = FALSE; } - + } HAL_HiddenSSIDHandleBeforeScan(Adapter); @@ -9115,10 +9115,10 @@ MgntLinkRequest( if(!GET_SIMPLE_CONFIG_ENABLED(pMgntInfo)) //suggested by hpfan, added by page, 20120921 pMgntInfo->NumBssDesc = 0; } - pMgntInfo->bFlushScanList = FALSE; // We have flushed scan list. + pMgntInfo->bFlushScanList = FALSE; // We have flushed scan list. // Get supported wireless mode. - SupportedWirelessMode = Adapter->HalFunc.GetSupportedWirelessModeHandler(Adapter); + SupportedWirelessMode = Adapter->HalFunc.GetSupportedWirelessModeHandler(Adapter); //2 //Backup wireless setting before scan(restore in ScanComplete) //The restore setting should be the default adapter setting when multiports. by Wl,2011.07.18 @@ -9136,7 +9136,7 @@ MgntLinkRequest( pMgntInfo->SettingBeforeScan.WirelessModeScanInProgress = pMgntInfo->dot11CurrentWirelessMode; if(pDfMgntInfo->bMediaConnect) // If default Adapter not connected, we need not to restore to it's channel after scancomplete pMgntInfo->SettingBeforeScan.WirelessMode = pDfMgntInfo->dot11CurrentWirelessMode; - else + else pMgntInfo->SettingBeforeScan.WirelessMode = pMgntInfo->dot11CurrentWirelessMode; RT_TRACE(COMP_MLME, DBG_LOUD, ("pDfMgntInfo->bMediaConnect %d pMgntInfo->SettingBeforeScan.WirelessMode 0x%x\n", pDfMgntInfo->bMediaConnect, pMgntInfo->SettingBeforeScan.WirelessMode)); @@ -9155,7 +9155,7 @@ MgntLinkRequest( //use P2P client connected channel when default port is disconnected //by sherry 20130117 #if (MULTICHANNEL_SUPPORT == 1) - PMULTICHANNEL_PORT_CONTEXT pClientPortContext; + PMULTICHANNEL_PORT_CONTEXT pClientPortContext; if(GetFirstClientPort(Adapter) != NULL) { pClientPortContext = (PMULTICHANNEL_PORT_CONTEXT)(GetFirstClientPort(Adapter))->MultiChannel; @@ -9164,14 +9164,14 @@ MgntLinkRequest( else pMgntInfo->SettingBeforeScan.ChannelNumber = pMgntInfo->dot11CurrentChannelNumber; } - // Comment the following code because pGoPortContext->ConnectedPrimary20MhzChannel may be 0 when the + // Comment the following code because pGoPortContext->ConnectedPrimary20MhzChannel may be 0 when the // FCS mode is not enabled. By Bruce, 2014-12-15. else if(GetFirstGOPort(Adapter) != NULL) { - PMULTICHANNEL_PORT_CONTEXT pGoPortContext; - + PMULTICHANNEL_PORT_CONTEXT pGoPortContext; + pGoPortContext = (PMULTICHANNEL_PORT_CONTEXT)(GetFirstGOPort(Adapter))->MultiChannel; - + if(MgntLinkStatusQuery(GetFirstGOPort(Adapter)) == RT_MEDIA_CONNECT) { pMgntInfo->SettingBeforeScan.ChannelNumber = pGoPortContext->ConnectedPrimary20MhzChannel; @@ -9180,25 +9180,25 @@ MgntLinkRequest( else { RT_TRACE(COMP_MLME,DBG_LOUD,("MgntLinkRequest: pMgntInfo->dot11CurrentChannelNumber: %d \n",pMgntInfo->dot11CurrentChannelNumber)); - + pMgntInfo->SettingBeforeScan.ChannelNumber = pMgntInfo->dot11CurrentChannelNumber; - + } #else pMgntInfo->SettingBeforeScan.ChannelNumber = pMgntInfo->dot11CurrentChannelNumber; -#endif - +#endif + } - + pMgntInfo->SettingBeforeScan.ChannelBandwidth = bw; pMgntInfo->SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz = extchnl20MHz; pMgntInfo->SettingBeforeScan.Ext40MHzChnlOffsetOf80MHz = extchnl40MHz; pMgntInfo->SettingBeforeScan.CenterFrequencyIndex1 = CHNL_GetCenterFrequency(pMgntInfo->SettingBeforeScan.ChannelNumber, bw, extchnl20MHz); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("MgntLinkRequest(): chnl: %u, bw: %u, Offset: %u\n", - pMgntInfo->SettingBeforeScan.ChannelNumber, - pMgntInfo->SettingBeforeScan.ChannelBandwidth, + pMgntInfo->SettingBeforeScan.ChannelNumber, + pMgntInfo->SettingBeforeScan.ChannelBandwidth, pMgntInfo->SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz)); } @@ -9220,7 +9220,7 @@ MgntLinkRequest( PlatformReleaseSpinLock(Adapter, RT_SCAN_SPINLOCK); - RT_TRACE(COMP_MP, DBG_LOUD, ("== Scan Release Mutex of RF Protection ==\n")); + RT_TRACE(COMP_MP, DBG_LOUD, ("== Scan Release Mutex of RF Protection ==\n")); RT_TRACE(COMP_SCAN, DBG_LOUD, ("<=== MgntLinkRequest(): return TRUE.\n")); return TRUE; } @@ -9230,7 +9230,7 @@ MgntLinkStatusUpdateRxCounts( PADAPTER Adapter, pu4Byte TotalRxBcnNum, pu4Byte TotalRxDataNum -) +) { PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; u2Byte SlotIndex; @@ -9246,10 +9246,10 @@ MgntLinkStatusUpdateRxCounts( if(Adapter->bInHctTest) { *TotalRxBcnNum = pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod; - *TotalRxDataNum = pMgntInfo->LinkDetectInfo.NumRecvDataInPeriod; + *TotalRxDataNum = pMgntInfo->LinkDetectInfo.NumRecvDataInPeriod; } else - { + { SlotIndex = (pMgntInfo->LinkDetectInfo.SlotIndex++)%pMgntInfo->LinkDetectInfo.SlotNum; pMgntInfo->LinkDetectInfo.RxBcnNum[SlotIndex] = pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod; pMgntInfo->LinkDetectInfo.RxDataNum[SlotIndex] = pMgntInfo->LinkDetectInfo.NumRecvDataInPeriod; @@ -9259,15 +9259,15 @@ MgntLinkStatusUpdateRxCounts( *TotalRxBcnNum += pMgntInfo->LinkDetectInfo.RxBcnNum[i]; *TotalRxDataNum += pMgntInfo->LinkDetectInfo.RxDataNum[i]; } - } + } //cosa add for debug 09/26/2007. Report to DbgCmd utility if(pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod == 0) pMgntInfo->LinkDetectInfo.ConnectButNoBcnInPeriodCnt++; if(pMgntInfo->LinkDetectInfo.NumRecvDataInPeriod == 0) pMgntInfo->LinkDetectInfo.ConnectButNoDataInPeriodCnt++; - - if( (*TotalRxBcnNum+*TotalRxDataNum) == 0 ) + + if( (*TotalRxBcnNum+*TotalRxDataNum) == 0 ) { pMgntInfo->LinkDetectInfo.BecomeDisconnectedCnt++; //cosa add for debug pMgntInfo->LinkDetectInfo.BecomeDisconnectedTime[pMgntInfo->LinkDetectInfo.BecomeDisconnectedIndex++] = PlatformGetCurrentTime();//cosa add for debug @@ -9294,43 +9294,43 @@ MgntLinkStatusProcWhenRFIsOff( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } - + switch(ConnectedState) { case RT_MEDIA_CONNECT: // When Received number of Beacon and Data packet is zero because - // RF is in OFF state, do not start roaming, and we start indicating + // RF is in OFF state, do not start roaming, and we start indicating // disconnected. By Bruce, 2007-10-03. RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusProcWhenRFIsOff(): RF OFF => inidcate disconnect and no more roaming\n")); if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return ; } if(MgntRoamingInProgress(pMgntInfo)) MgntRoamComplete(Adapter, MlmeStatus_invalid); - + DrvIFIndicateDisassociation(Adapter, unspec_reason, pMgntInfo->Bssid); // We only do roaming in infra-structure mode, asked by Netgear, 2003.03.10, by rcnjko. // MgntResetRoamingState(pMgntInfo); - + MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, FORCE_INDICATE ); // Reset all association entry. AsocEntry_ResetAll(Adapter); break; - + case RT_MEDIA_DISCONNECT: // If driver is in disconneted state because RF is Off, do not do MgntLinkRetry // By Emily, 2008-01-02 RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusProcWhenRFIsOff(): ------- Keep DISCONNECTED ------- DisconnectedSlotCount(%d)\n", pMgntInfo->DisconnectedSlotCount)); - RT_TRACE(COMP_MLME, DBG_LOUD, - ("MgntLinkStatusProcWhenRFIsOff(): RF is OFF, mAssoc(%d), mIbss(%d), OpMode(%d), Regdot11networktype(%d)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("MgntLinkStatusProcWhenRFIsOff(): RF is OFF, mAssoc(%d), mIbss(%d), OpMode(%d), Regdot11networktype(%d)\n", pMgntInfo->mAssoc, pMgntInfo->mIbss, pMgntInfo->OpMode, pMgntInfo->Regdot11networktype)); //2009.01.01 Added by tynli. if(pPSC->LinkReqInIPSRFOffPgs == TRUE) @@ -9350,7 +9350,7 @@ MgntLinkStatusProcWhenRFIsOff( pPSC->tmpmCap, (pPSC->bTmpSuppRate ? &(pPSC->tmpSuppRateSet) : NULL), (pPSC->bTmpIbpm ? &(pPSC->tmpIbpm) : NULL) ); - + //clean the link request info pPSC->bTmpScanOnly = FALSE; pPSC->bTmpActiveScan = FALSE; @@ -9368,11 +9368,11 @@ MgntLinkStatusProcWhenRFIsOff( pPSC->tmpSuppRateSet.Octet = 0; pPSC->tmpSuppRateSet.Length = 0; pPSC->bTmpIbpm = FALSE; - pPSC->tmpIbpm.atimWin = 0; + pPSC->tmpIbpm.atimWin = 0; } break; - + } } @@ -9383,17 +9383,17 @@ SwitchCheckBSSID( { static u4Byte count = 0; BOOLEAN Value; - + // In 92C, we do not switch BSSID anymore because Hw has fixed the bug. // Suggested by Bruce. Added by tynli. 2009.11.26. return; - + if(count%2 == 0) { Value = FALSE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_CHECK_BSSID, (pu1Byte)&Value); - + }else { Value = TRUE; @@ -9401,7 +9401,7 @@ SwitchCheckBSSID( } count++; - + } @@ -9416,12 +9416,12 @@ MgntLinkIotRelinkCheck( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(pMgntInfo->IOTAction & HT_IOT_ACT_BCM_AP_RX_FAIL_RELINK) - { - if(pMgntInfo->bMediaConnect && + { + if(pMgntInfo->bMediaConnect && (pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE) && !MgntRoamingInProgress(pMgntInfo) && (Adapter->RxStats.CurRxDataRate.RawValue != 0xffff ) && @@ -9437,9 +9437,9 @@ MgntLinkIotRelinkCheck( if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return ; - } + } RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkIotRelinkCheck(): Infra. client => start roaming...\n")); MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_DEAUTH, ROAMINGSTATE_SCANNING); PlatformMoveMemory( pMgntInfo->APaddrbeforeRoaming, pMgntInfo->Bssid, 6); @@ -9462,8 +9462,8 @@ MgntCheckScanListEmpty( Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); - if((pMgntInfo->NumBssDesc4Query == 0) && - (rfState==eRfOn || (rfState==eRfOff && RT_IN_PS_LEVEL(Adapter, RT_RF_OFF_LEVEL_FW_IPS_32K) && + if((pMgntInfo->NumBssDesc4Query == 0) && + (rfState==eRfOn || (rfState==eRfOff && RT_IN_PS_LEVEL(Adapter, RT_RF_OFF_LEVEL_FW_IPS_32K) && !(pMgntInfo->RfOffReason & (RF_CHANGE_BY_SW|RF_CHANGE_BY_HW))))) { if((pMgntInfo->DumpDbgRegCnt < RT_SCAN_EMPTY_DUMP_REG_CNT) && !MgntScanInProgress(pMgntInfo)) @@ -9489,9 +9489,9 @@ MgntLinkHandleIPS( PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); PADAPTER pAdapter = pDefaultAdapter; PMGNT_INFO pDefMgntInfo = GetDefaultMgntInfo(Adapter); - PMGNT_INFO pMgntInfo = pDefMgntInfo; + PMGNT_INFO pMgntInfo = pDefMgntInfo; RT_RF_POWER_STATE rfState; - + RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS() ====>\n")); if(pDefaultAdapter->bInHctTest) { @@ -9504,20 +9504,20 @@ MgntLinkHandleIPS( RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(): return for p2p!!\n")); return; } - + if(IsActiveAPModeExist(Adapter)) { RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(): return for active Ap!!\n")); - return; + return; } - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); if(rfState != eRfOn) { RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(): return for RF off!!\n")); return; } - + while(pAdapter != NULL) { if(MgntScanInProgress(pMgntInfo) ||MgntIsLinkInProgress(pMgntInfo) ||pMgntInfo->SnifferTurnOnFlag ) @@ -9525,19 +9525,19 @@ MgntLinkHandleIPS( RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(): return for scan or link progress!!\n")); return; } - - if ( (MgntLinkStatusQuery(pAdapter)==RT_MEDIA_CONNECT) || ACTING_AS_IBSS(pAdapter) || MgntRoamingInProgress(pMgntInfo)) + + if ( (MgntLinkStatusQuery(pAdapter)==RT_MEDIA_CONNECT) || ACTING_AS_IBSS(pAdapter) || MgntRoamingInProgress(pMgntInfo)) return; - + pAdapter = GetNextExtAdapter(pAdapter); if(pAdapter == NULL) break; - + pMgntInfo = &pAdapter->MgntInfo; } // - // We should not enter IPS mode when the OID_DOT11_CURRENT_PHY_ID request for the value of the Extensible Station (ExtSTA) + // We should not enter IPS mode when the OID_DOT11_CURRENT_PHY_ID request for the value of the Extensible Station (ExtSTA) // msDot11CurrentPhyID management are still under configuration on Win8 or later OS version. // 2013.08.27. // @@ -9546,32 +9546,32 @@ MgntLinkHandleIPS( RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(): Value for the current PHY IDs are not ready!!\n")); return; } - - RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): RF is ON ,ReturnPoint(%d), bSetPnpPwrInProgress(%d), bDriverIsGoingToPnpSetPowerSleep(%d)\n", + + RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): RF is ON ,ReturnPoint(%d), bSetPnpPwrInProgress(%d), bDriverIsGoingToPnpSetPowerSleep(%d)\n", pDefMgntInfo->PowerSaveControl.ReturnPoint, pDefMgntInfo->bSetPnpPwrInProgress, pDefaultAdapter->bDriverIsGoingToPnpSetPowerSleep)); - - if((pDefMgntInfo->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE) - && (pDefMgntInfo->bSetPnpPwrInProgress == FALSE ) && (!pDefaultAdapter->bDriverIsGoingToPnpSetPowerSleep) //tynli_Test add Adapter->bDriverIsGoingToUnload)) -#if (P2P_SUPPORT == 1) - && !P2P_DOING_DEVICE_DISCOVERY(GET_P2P_INFO(pDefaultAdapter))) // #if (P2P_SUPPORT == 1) + + if((pDefMgntInfo->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE) + && (pDefMgntInfo->bSetPnpPwrInProgress == FALSE ) && (!pDefaultAdapter->bDriverIsGoingToPnpSetPowerSleep) //tynli_Test add Adapter->bDriverIsGoingToUnload)) +#if (P2P_SUPPORT == 1) + && !P2P_DOING_DEVICE_DISCOVERY(GET_P2P_INFO(pDefaultAdapter))) // #if (P2P_SUPPORT == 1) #else - ) + ) #endif { // Enter IPS only when no InactivePsTimerCallback is scheduled, by Bruce, 2007-10-03. // For inactive power save mode. 2007.07.16, by shien chang. RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS() call IPSEnter()\n")); - IPSEnter(pDefaultAdapter); - } + IPSEnter(pDefaultAdapter); + } else { - RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(), ReturnPoint=%d/ bSetPnpPwrInProgress=%d\n", + RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS(), ReturnPoint=%d/ bSetPnpPwrInProgress=%d\n", pDefMgntInfo->PowerSaveControl.ReturnPoint, pDefMgntInfo->bSetPnpPwrInProgress)); } RT_TRACE(COMP_RF, DBG_LOUD, ("MgntLinkHandleIPS() <====\n")); } - + VOID MgntLinkHandleLPS( PADAPTER Adapter @@ -9584,30 +9584,30 @@ MgntLinkHandleLPS( BOOLEAN bEnterLPS = FALSE; //TRUE //Fix cannot enter LPS after start/stop Hostednetwork. By YJ,120405 BOOLEAN bFwCurrentInPSMode=FALSE; BOOLEAN bFwPSAwake=TRUE; -#if (USB_TX_THREAD_ENABLE) +#if (USB_TX_THREAD_ENABLE) BOOLEAN bSupportUsbTxThread; #endif PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); if(IsDevicePortDiscoverable(Adapter) || GetFirstGOPort(Adapter) || GetFirstClientPort(Adapter)) return; - + if(IsActiveAPModeExist(Adapter)) - return; - + return; + while(pAdapter != NULL) - { + { if(MgntScanInProgress(pMgntInfo) ||MgntIsLinkInProgress(pMgntInfo)||pMgntInfo->SnifferTurnOnFlag ) return; - + if(pMgntInfo->bMediaConnect && !MgntInitAdapterInProgress(pMgntInfo)) { // Check busy traffic condition // Always enter LPS mode during WHQL DPC ISR test for SDIO interface. - if( (!pMgntInfo->bSdioDpcIsr) && (((pMgntInfo->LinkDetectInfo.NumRxUnicastOkInPeriod + pMgntInfo->LinkDetectInfo.NumTxOkInPeriod) > - pMgntInfo->LinkDetectInfo.NumRxUnicastTxOkThresh) || + if( (!pMgntInfo->bSdioDpcIsr) && (((pMgntInfo->LinkDetectInfo.NumRxUnicastOkInPeriod + pMgntInfo->LinkDetectInfo.NumTxOkInPeriod) > + pMgntInfo->LinkDetectInfo.NumRxUnicastTxOkThresh) || (pMgntInfo->LinkDetectInfo.NumRxUnicastOkInPeriod > pMgntInfo->LinkDetectInfo.NumRxUnicastThresh) || - (pMgntInfo->LinkDetectInfo.NumRxOkInPeriod > pMgntInfo->LinkDetectInfo.NumRxOkThresh)) ) + (pMgntInfo->LinkDetectInfo.NumRxOkInPeriod > pMgntInfo->LinkDetectInfo.NumRxOkThresh)) ) { if(pPSC->RegAdvancedLPs) { @@ -9630,23 +9630,23 @@ MgntLinkHandleLPS( break; } - if( pMgntInfo->SecurityInfo.SecLvl > RT_SEC_LVL_NONE && + if( pMgntInfo->SecurityInfo.SecLvl > RT_SEC_LVL_NONE && pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE) { - //WPA and Infra mode , need check key is install + //WPA and Infra mode , need check key is install if(!SecIsTxKeyInstalled( Adapter, pMgntInfo->Bssid )) { bEnterLPS = FALSE; RT_TRACE( COMP_MLME , DBG_LOUD , (" Now key is not ready !! \n") ); break; } - } + } } - + pAdapter = GetNextExtAdapter(pAdapter); if(pAdapter == NULL) break; - + pMgntInfo = &pAdapter->MgntInfo; } @@ -9654,7 +9654,7 @@ MgntLinkHandleLPS( #if (USB_TX_THREAD_ENABLE) pDefaultAdapter->HalFunc.GetHalDefVarHandler(pDefaultAdapter, HAL_DEF_USB_TX_THREAD, (PBOOLEAN)&bSupportUsbTxThread); - + if(bSupportUsbTxThread && pPSC->bLowPowerEnable && pPSC->bLeisurePs) { if(bEnterLPS) @@ -9667,7 +9667,7 @@ MgntLinkHandleLPS( { LeisurePSLeave(pDefaultAdapter, LPS_DISABLE_WATCH_DOG_BUSY_TRAFFIC); - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PSMODE_STATUS, (pu1Byte)(&bFwCurrentInPSMode)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PSMODE_STATUS, (pu1Byte)(&bFwCurrentInPSMode)); pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FWLPS_RF_ON, (pu1Byte)(&bFwPSAwake)); // Set bUseUsbTxThread to FALSE after we really leave LPS mode by checking Hw regsiters. 2012.08.23. by tynli. if((!bFwCurrentInPSMode) && bFwPSAwake) @@ -9677,16 +9677,16 @@ MgntLinkHandleLPS( } } else -#endif +#endif { if(bEnterLPS) - { + { LeisurePSEnter(pDefaultAdapter); } else { LeisurePSLeave(pDefaultAdapter, LPS_DISABLE_WATCH_DOG_BUSY_TRAFFIC); - } + } } } @@ -9727,10 +9727,10 @@ MgntLinkStatusWatchdogForSystemWide( pAdapter->MgntInfo.LinkDetectInfo.NumRxUnicastOkInPeriod = 0; pAdapter = GetNextExtAdapter(pAdapter); - } + } CustomScan_WatchDogCb(GET_CUSTOM_SCAN_INFO(pDefaultAdapter)); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("OnBeacon(BSS) for def port = %d\n", pDefMgntInfo->LinkDetectInfo.OnBeaconBssCnt_OnBeacon_Bss)); RT_TRACE(COMP_RECV, DBG_LOUD, ("NumIdleRfd (%x) , NumBusyRfd(%x) \n",pDefaultAdapter->NumIdleRfd,pDefaultAdapter->NumBusyRfd[0])); RT_TRACE(COMP_RECV, DBG_LOUD, ("NextRxDescToFill (%x) , NextRxDescToCheck(%x) \n",pDefaultAdapter->NextRxDescToFill[0],pDefaultAdapter->NextRxDescToCheck[0])); @@ -9752,7 +9752,7 @@ MgntLinkMultiPortStatusWatchdog( } //Move IPS/LPS here for multiport MgntLinkStatusWatchdogForSystemWide(pDefaultAdapter); - + // wpp trace for debug monitor EXdbgmon_AutoCollectStatisticsInfo(pDefaultAdapter); } @@ -9850,7 +9850,7 @@ CheckInHighTPState( HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); u4Byte TxThroughput=0; // Tx throughput in KBps. - u4Byte RxThroughput=0; // Rx throughput in KBps. + u4Byte RxThroughput=0; // Rx throughput in KBps. u4Byte TotalThroughput=0; // Total throughput in last interval in KBps. //Reset the static variable, avoid set the bBusyTrafficAccordingTP =true after wake up from S3 in the wrong state. It will causing ping loss. @@ -9861,7 +9861,7 @@ CheckInHighTPState( } // Figure out throughput in last interval. - if( MgntLinkStatusQuery(pAdapter)==RT_MEDIA_CONNECT) + if( MgntLinkStatusQuery(pAdapter)==RT_MEDIA_CONNECT) { TxThroughput = ( (u4Byte)(pAdapter->TxStats.NumTxOkBytesTotal - pAdapter->TxStats.LastNumTxOkBytesTotal) )*8/2/1024 ; RxThroughput = ( (u4Byte)(pAdapter->RxStats.NumRxOkBytesTotal - pAdapter->RxStats.LastNumRxOkBytesTotal) )*8/2/1024 ; @@ -9889,17 +9889,17 @@ CheckInHighTPState( pMgntInfo->LinkDetectInfo.bBusyTrafficAccordingTP = TRUE; else pMgntInfo->LinkDetectInfo.bBusyTrafficAccordingTP = FALSE; - + RT_TRACE(COMP_MLME,DBG_LOUD,("Tx: %d Mbps (%d Kbps) :Rx: %d Mbps (%d Kbps), ------> In HighTP %d\n", pAdapter->TxStats.CurrentTxTP, TxThroughput, pAdapter->RxStats.CurrentRxTP, RxThroughput, - pMgntInfo->LinkDetectInfo.bBusyTrafficAccordingTP)); + pMgntInfo->LinkDetectInfo.bBusyTrafficAccordingTP)); } - - + + } @@ -9922,7 +9922,7 @@ MgntLinkStatusWatchdogForEachPortSpecific( BOOLEAN bWiFiConfig = pMgntInfo->bWiFiConfg; #if MULTIPORT_SUPPORT == 1 -{ +{ FunctionIn(COMP_MLME); MultiPortDumpPortStatus(Adapter); } @@ -9931,7 +9931,7 @@ MgntLinkStatusWatchdogForEachPortSpecific( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return; + return; } if(Adapter->bSurpriseRemoved) @@ -9942,9 +9942,9 @@ MgntLinkStatusWatchdogForEachPortSpecific( RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress bScanOnly FALSE\n")); return; } - + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); - + // Caculate the roaming fail count to decide if the roaming procedure should be canceled. By Bruce, 2008-05-22. if(MgntRoamingInProgress(pMgntInfo)) pMgntInfo->RoamingFailCount ++; @@ -9966,21 +9966,21 @@ MgntLinkStatusWatchdogForEachPortSpecific( DrvIFIndicateFWStalled(Adapter); #endif - if( (MgntLinkStatusQuery(Adapter)==RT_MEDIA_CONNECT) + if( (MgntLinkStatusQuery(Adapter)==RT_MEDIA_CONNECT) || MgntRoamingInProgress(pMgntInfo)) { // TODO: Add data packets observation. u4Byte TotalRxBcnNum = 0; - u4Byte TotalRxDataNum = 0; + u4Byte TotalRxDataNum = 0; PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); CheckInHighTPState(Adapter); MgntLinkStatusUpdateRxCounts(Adapter, &TotalRxBcnNum, &TotalRxDataNum); - + // Switch RxReorder by Tx/Rx TP when RegRxReorder is 2. Add by Emerson 2015/01/29. if( pMgntInfo->RegRxReorder == 2 ) pHTInfo->bCurRxReorderEnable = ( Adapter->TxStats.CurrentTxTP > 20 || Adapter->RxStats.CurrentRxTP > 20 ) ? TRUE : FALSE ; - + // // Age-out idle STA for Ad hoc mode. // @@ -9999,29 +9999,29 @@ MgntLinkStatusWatchdogForEachPortSpecific( if(!pMgntInfo->bIbssStarter) //for joiner only { Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_TSF_TIMER, (pu1Byte)&u8TSFtmp); - - u8TSF = u8TSFtmp - PlatformModular64(u8TSFtmp, pMgntInfo->dot11BeaconPeriod*sTU) -sTU; //us, nextbeacon - //RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog before read back TSF 0x%"i64fmt"x \n", u8TSFtmp)); - RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x418 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x418))); - //RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog before pMgntInfo->NextBCN 0x%"i64fmt"x\n", pMgntInfo->NextBeacon)); + u8TSF = u8TSFtmp - PlatformModular64(u8TSFtmp, pMgntInfo->dot11BeaconPeriod*sTU) -sTU; //us, nextbeacon + + //RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog before read back TSF 0x%"i64fmt"x \n", u8TSFtmp)); + RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x418 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x418))); + //RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog before pMgntInfo->NextBCN 0x%"i64fmt"x\n", pMgntInfo->NextBeacon)); if(pMgntInfo->NextBeacon > u8TSFtmp || ((u8TSFtmp - pMgntInfo->NowTSF) > (beacondelay * pMgntInfo->dot11BeaconPeriod * sTU))) { Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_TSF_TIMER, (pu1Byte)&u8TSF); - //RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog UPDATE TSF to 0x%"i64fmt"x !!!!!!\n", u8TSF)); + //RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog UPDATE TSF to 0x%"i64fmt"x !!!!!!\n", u8TSF)); } pMgntInfo->NextBeacon = u8TSF; - pMgntInfo->NowTSF = u8TSFtmp; - + pMgntInfo->NowTSF = u8TSFtmp; + } - + } #if RX_AGGREGATION // 2011/02/22 MH According to AP team's NAS test, we may meet a problem in WIN XP, - // when Fizela copy file throughput network disk, it may occupy ndis packet for a period + // when Fizela copy file throughput network disk, it may occupy ndis packet for a period // of time. At the same time, driver RFD list will be empty. But if USB aggregation is enabled // The rx bcn & data num will be zero and report incorrect disconnect information. PlatformAcquireSpinLock(Adapter, RT_RFD_SPINLOCK); @@ -10034,11 +10034,11 @@ MgntLinkStatusWatchdogForEachPortSpecific( PlatformReleaseSpinLock(Adapter, RT_RFD_SPINLOCK); #endif pMgntInfo->LinkDetectInfo.LastConnectedCenterFrequency = pMgntInfo->pChannelInfo->CurrentChannelCenterFrequency; - pMgntInfo->LinkDetectInfo.LastConnectedBandwidth = pMgntInfo->dot11CurrentChannelBandWidth; + pMgntInfo->LinkDetectInfo.LastConnectedBandwidth = pMgntInfo->dot11CurrentChannelBandWidth; //1 Total Number of Received Beacon and Data packets is Zero RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): --- Become DISCONNECTED --- TotalRxBcnNum(%d) TotalRxDataNum(%d)\n", TotalRxBcnNum, TotalRxDataNum)); - + if(rfState == eRfOff) { // When RF OFF, do not start roaming, and we start indicating disconnected. By Bruce, 2007-10-03. @@ -10061,18 +10061,18 @@ MgntLinkStatusWatchdogForEachPortSpecific( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case POOR_LINK\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case POOR_LINK\n")); return ; - } + } pMgntInfo->LinkDetectInfo.InfraDisconnectRoamingStartCnt++; //cosa add for debug. RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): Infra. client => start roaming...\n")); PlatformMoveMemory( pMgntInfo->APaddrbeforeRoaming, pMgntInfo->Bssid, 6); Dot11d_Reset(Adapter); // Do this to reset TS data structure. RemoveAllTS(Adapter); - + // Stop multichannel switch - MultiChannelDisconnectClient(Adapter, FALSE); + MultiChannelDisconnectClient(Adapter, FALSE); if(GET_TDLS_ENABLED(pMgntInfo)) TDLS_Stop(Adapter); @@ -10081,17 +10081,17 @@ MgntLinkStatusWatchdogForEachPortSpecific( DrvIFIndicateLinkStateChanged(Adapter, TRUE, 5); DrvIFIndicateRoamingNeeded(Adapter, RT_PREPARE_ROAM_NORMAL_ROAM_POOR_LINK); - } + } } - else + else { if(!MgntRoamingInProgress(pMgntInfo) && !pMgntInfo->bDisconnectRequest) { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case POOR_LINK\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case POOR_LINK\n")); return ; - } + } pMgntInfo->LinkDetectInfo.InfraDisconnectRoamingStartCnt++; //cosa add for debug. RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): Infra. client => start roaming...\n")); MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_DISCONNECT_POOR_LINK, ROAMINGSTATE_SCANNING); @@ -10099,9 +10099,9 @@ MgntLinkStatusWatchdogForEachPortSpecific( Dot11d_Reset(Adapter); // Do this to reset TS data structure. RemoveAllTS(Adapter); - + // Stop multichannel switch - MultiChannelDisconnectClient(Adapter, FALSE); + MultiChannelDisconnectClient(Adapter, FALSE); if(GET_TDLS_ENABLED(pMgntInfo)) TDLS_Stop(Adapter); @@ -10126,17 +10126,17 @@ MgntLinkStatusWatchdogForEachPortSpecific( { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); return; - } - + } + MgntRoamComplete(Adapter, MlmeStatus_timeout); } - } + } } } } - else + else { pMgntInfo->LinkDetectInfo.AdhocDisconnectCnt++; //cosa add for debug. RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): AdHoc mode => inidcate disconnect and no more roaming\n")); @@ -10154,8 +10154,8 @@ MgntLinkStatusWatchdogForEachPortSpecific( MgntResetJoinProcess(Adapter); MgntResetRoamingState(pMgntInfo); - - if( (pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_ADHOC) || + + if( (pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_ADHOC) || (pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_AUTO) ) { pMgntInfo->bIbssStarter = TRUE; // For we are the last one in this IBSS, 2005.07.11, by rcnjko. @@ -10175,7 +10175,7 @@ MgntLinkStatusWatchdogForEachPortSpecific( #endif //1 Total Number of Received Beacon and Data packets is not Zero - //Suggested by SD1 Isaac, add received beacon number message for FW debug, by hana 2015/08/05 + //Suggested by SD1 Isaac, add received beacon number message for FW debug, by hana 2015/08/05 RT_TRACE(COMP_AP,DBG_LOUD,("[FW debug] Number of recv beacon in 2 sec = %d \n",pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod)); @@ -10201,7 +10201,7 @@ MgntLinkStatusWatchdogForEachPortSpecific( pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod = 0; pMgntInfo->LinkDetectInfo.NumRecvDataInPeriod = 0; - + if( OS_SUPPORT_WDI(Adapter) ) { if(pMgntInfo->bPrepareRoaming == TRUE) @@ -10243,8 +10243,8 @@ MgntLinkStatusWatchdogForEachPortSpecific( case eRfOn: pMgntInfo->DisconnectedSlotCount++; RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntLinkStatusWatchdog(): ------- Keep DISCONNECTED ------- DisconnectedSlotCount(%d)\n", pMgntInfo->DisconnectedSlotCount)); - RT_TRACE(COMP_MLME, DBG_LOUD, - ("MgntLinkStatusWatchdog(): RF is ON ,mAssoc(%d), mIbss(%d), bMediaConnect(%d), OpMode(%d), Regdot11networktype(%d)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("MgntLinkStatusWatchdog(): RF is ON ,mAssoc(%d), mIbss(%d), bMediaConnect(%d), OpMode(%d), Regdot11networktype(%d)\n", pMgntInfo->mAssoc, pMgntInfo->mIbss, pMgntInfo->bMediaConnect, pMgntInfo->OpMode, pMgntInfo->Regdot11networktype)); if( pMgntInfo->mIbss ) @@ -10252,14 +10252,14 @@ MgntLinkStatusWatchdogForEachPortSpecific( // NOTE! For HCT WPA_AdHoc test, we should not link retry here. 2005.07.11, by rcnjko. if(!Adapter->bInHctTest) SwitchCheckBSSID(Adapter); - } + } break; - + case eRfOff: default: MgntLinkStatusProcWhenRFIsOff(Adapter, RT_MEDIA_DISCONNECT); break; - + } } @@ -10281,9 +10281,9 @@ MgntLinkStatusWatchdogForEachPortSpecific( else { u4Byte busyThreshold=BUSY_TRAFFIC_THREADHOLD; - - - + + + if( pMgntInfo->LinkDetectInfo.NumRxOkInPeriod > busyThreshold || pMgntInfo->LinkDetectInfo.NumTxOkInPeriod > busyThreshold ) { @@ -10324,14 +10324,14 @@ MgntLinkStatusWatchdogForEachPortSpecific( if (Adapter->RxStats.CurrentRxTP > BUSY_TRAFFIC_VERY_HIGH_TP) { bVeryHigherBusyTraffic = TRUE; - bVeryHigherBusyRxTraffic = TRUE; + bVeryHigherBusyRxTraffic = TRUE; } else bVeryHigherBusyRxTraffic = FALSE; } - - RT_TRACE(COMP_SEND, DBG_LOUD, ("MgntLinkStatusWatchdog(): RxUnicastOk(%d) TxOk(%d) RxOk(%d)\n", - pMgntInfo->LinkDetectInfo.NumRxUnicastOkInPeriod, + + RT_TRACE(COMP_SEND, DBG_LOUD, ("MgntLinkStatusWatchdog(): RxUnicastOk(%d) TxOk(%d) RxOk(%d)\n", + pMgntInfo->LinkDetectInfo.NumRxUnicastOkInPeriod, pMgntInfo->LinkDetectInfo.NumTxOkInPeriod, pMgntInfo->LinkDetectInfo.NumRxOkInPeriod)); } @@ -10349,50 +10349,50 @@ MgntLinkStatusWatchdogForEachPortSpecific( { PADAPTER pExtAdapter = GetFirstExtAdapter(Adapter); PMGNT_INFO pExtMgntInfo = NULL; - + pExtMgntInfo = &(pExtAdapter->MgntInfo); Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_TSF_TIMER, (pu1Byte)&u8TSFtmp); - - u8TSF = u8TSFtmp - PlatformModular64(u8TSFtmp , (pMgntInfo->dot11BeaconPeriod*sTU)) -sTU; //us, nextbeacon + + u8TSF = u8TSFtmp - PlatformModular64(u8TSFtmp , (pMgntInfo->dot11BeaconPeriod*sTU)) -sTU; //us, nextbeacon #if (WPP_SOFTWARE_TRACE == 0) - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back TSF %"i64fmt"d nextbeacon %"i64fmt"d\n", u8TSFtmp, u8TSF)); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before pMgntInfo->NextBCN %"i64fmt"d ; NowTSF %"i64fmt"d\n", pExtMgntInfo->NextBeacon, pExtMgntInfo->NowTSF)); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back TSF %"i64fmt"d nextbeacon %"i64fmt"d\n", u8TSFtmp, u8TSF)); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before pMgntInfo->NextBCN %"i64fmt"d ; NowTSF %"i64fmt"d\n", pExtMgntInfo->NextBeacon, pExtMgntInfo->NowTSF)); #endif - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x120 0x%x \n", PlatformEFIORead4Byte(Adapter, REG_HIMR))); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x418 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x418))); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x510 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x510))); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x520 0x%x\n", PlatformEFIORead4Byte(Adapter, REG_TX_PTCL_CTRL))); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x540 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x540))); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x550 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x550))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x120 0x%x \n", PlatformEFIORead4Byte(Adapter, REG_HIMR))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x418 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x418))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x510 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x510))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x520 0x%x\n", PlatformEFIORead4Byte(Adapter, REG_TX_PTCL_CTRL))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x540 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x540))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x550 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x550))); RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x554 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x554))); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x55d 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x55d))); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog before read back 0x55d 0x%x \n", PlatformEFIORead4Byte(Adapter, 0x55d))); if((pExtMgntInfo->NowTSF == 0 && !MultiChannelSwitchNeeded(Adapter)) || pExtMgntInfo->NextBeacon > u8TSFtmp || ((u8TSFtmp - pExtMgntInfo->NowTSF) > (beacondelay * pMgntInfo->dot11BeaconPeriod * sTU))) { Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_TSF_TIMER, (pu1Byte)&u8TSF); #if (WPP_SOFTWARE_TRACE == 0) - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog UPDATE TSF to %"i64fmt"d !!!!!!!\n", u8TSF)); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog UPDATE TSF to %"i64fmt"d !!!!!!!\n", u8TSF)); #endif } pExtMgntInfo->NextBeacon = u8TSF; - pExtMgntInfo->NowTSF = u8TSFtmp; + pExtMgntInfo->NowTSF = u8TSFtmp; if(Adapter->bInHctTest) { u1tmp = PlatformEFIORead1Byte(Adapter, rOFDM0_XAAGCCore1); - RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog 0xc50 0x%x\n", u1tmp)); + RT_TRACE(COMP_BEACON, DBG_LOUD, ("MgntLinkStatusWatchdog 0xc50 0x%x\n", u1tmp)); if(u1tmp != 0x30) PlatformEFIOWrite1Byte(Adapter, rOFDM0_XAAGCCore1, 0x30); } - + //if(ACTING_AS_AP(Adapter)) //{ // AsocEntry_AgeFunction(Adapter); //} - } + } PlatformHandleNLOnScanRequest( (PVOID) Adapter); @@ -10403,7 +10403,7 @@ MgntLinkStatusWatchdogForEachPortSpecific( if(Adapter != GetDefaultAdapter(Adapter) && pMgntInfo->bWaitBeforeGoSkipScan != 0) { u1Byte RxNullDataNumThreshold = 3 ; - u1Byte WaitTimeThreshold = pMgntInfo->bWaitBeforeGoSkipScan; // Wait 2 * WaitTimeThreshold seconds before GO skip scanning + u1Byte WaitTimeThreshold = pMgntInfo->bWaitBeforeGoSkipScan; // Wait 2 * WaitTimeThreshold seconds before GO skip scanning if(pMgntInfo->LinkDetectInfo.RxNullDataNum > RxNullDataNumThreshold) { @@ -10418,14 +10418,14 @@ MgntLinkStatusWatchdogForEachPortSpecific( pMgntInfo->LinkDetectInfo.ClientAskForFCSNum = 0; } } - else + else { pMgntInfo->LinkDetectInfo.bClientAskForFCS = FALSE ; RT_TRACE(COMP_MLME, DBG_TRACE,("Client is not switching channel : %d [%d]\n", pMgntInfo->LinkDetectInfo.RxNullDataNum, pMgntInfo->LinkDetectInfo.ClientAskForFCSNum)); } - + pMgntInfo->LinkDetectInfo.RxNullDataNum=0; } @@ -10442,7 +10442,7 @@ MgntLinkStatusWatchdogForEachPortSpecific( // // Determine if action frame is allowed // - // If we need to delay action frame, then pMgntInfo->bStartDelayActionFrame should be set + // If we need to delay action frame, then pMgntInfo->bStartDelayActionFrame should be set // to TRUE and reset pMgntInfo->CntAfterLink to zero. if(pMgntInfo->bStartDelayActionFrame && (pMgntInfo->CntAfterLink < RT_ACTION_FRAME_DELAY_CNT)) { @@ -10453,11 +10453,11 @@ MgntLinkStatusWatchdogForEachPortSpecific( pMgntInfo->CntAfterLink = RT_ACTION_FRAME_DELAY_CNT+ 1; pMgntInfo->bStartDelayActionFrame = FALSE; } - + if(!ACTING_AS_AP(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, - ("MgntLinkStatusWatchdog(): RxUnicastOk: %d TxOk: %d => bBusyTraffic: %d bStableHigherBusyTraffic:%d\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("MgntLinkStatusWatchdog(): RxUnicastOk: %d TxOk: %d => bBusyTraffic: %d bStableHigherBusyTraffic:%d\n", pMgntInfo->LinkDetectInfo.NumRxUnicastOkInPeriod, pMgntInfo->LinkDetectInfo.NumTxOkInPeriod, bBusyTraffic,pMgntInfo->LinkDetectInfo.bStableHigherBusyTraffic)); pMgntInfo->LinkDetectInfo.bBusyTraffic = bBusyTraffic; @@ -10484,7 +10484,7 @@ MgntResetLinkStatusWatchdogState( ) { //1 Reset disconnect state machine - + PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; pMgntInfo->LinkDetectInfo.NumRecvBcnInPeriod = 1; @@ -10497,7 +10497,7 @@ MgntLinkStatusQuery( { PMGNT_INFO pMgntInfo = NULL; RT_MEDIA_STATUS mStatus = RT_MEDIA_DISCONNECT; - + if(Adapter == NULL) return RT_MEDIA_DISCONNECT; @@ -10521,13 +10521,13 @@ SwBeaconCallback( { PADAPTER Adapter = (PADAPTER)pTimer->Adapter; PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); - + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + if(RT_CANNOT_IO(Adapter)) return; - //We need use default bDriverIsGoingToUnload to check driver is unload or not, or it will BSOD when in + //We need use default bDriverIsGoingToUnload to check driver is unload or not, or it will BSOD when in //WLK 1.4 test (SoftAP_notification), by Maddest 06052009. // if(pDefaultAdapter->bDriverIsGoingToUnload) @@ -10586,7 +10586,7 @@ GetRandomNumber( } GetRandomBuffer(Hashed); - + iRdm = *( (int *)Hashed ); // usd first 4 bytes only (int: 32 bits.) if( iRdm < 0 ) iRdm = 0-iRdm; // make positive iRdm = iRdm % interval; // Now iRdm is in [0, interval) @@ -10619,7 +10619,7 @@ GetRandomU2ByteNumber( } GetRandomBuffer(Hashed); - + iRdm = *( (u2Byte *)Hashed ); // usd first 2 bytes only (short: 16 bits.) //if( iRdm < 0 ) iRdm = 0-iRdm; // make positive iRdm = iRdm % interval; // Now iRdm is in [0, interval) @@ -10657,10 +10657,10 @@ GetRandomBuffer( { // byte 8~15 Buffer[8+i] = ~pTime[i]; - + // byte 16~23 Buffer[16+i] = pTime[7-i]; - + // byte 24~31 Buffer[24+i] = ~pTime[7-i]; } @@ -10686,12 +10686,12 @@ MgntAddRejectedAsocAP( u1Byte i; RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "MgntAddRejectedAsocAP()", AddrOfAP); - + if ( MgntIsInRejectedAPList(Adapter, AddrOfAP) ) { return; } - + if (pMgntInfo->NumRejectedAsocAP == MAX_REJECTED_ACCESS_AP) { for (i=1; ibssDesc4Query[i].bdBssIdBuf) ) { return &(pMgntInfo->bssDesc4Query[i]); - } + } } } @@ -10799,7 +10799,7 @@ MgntTryToRoam( u4Byte i; BOOLEAN bNetworkToRoam = FALSE; PRT_WLAN_BSS pRtBss = NULL; - + for (i=0; iNumBssDesc4Query; i++) { pRtBss = &(pMgntInfo->bssDesc4Query[i]); @@ -10833,7 +10833,7 @@ MgntTryToRoam( // // Description: -// Set up default configuration and allocate resource for Turbo Channel Access. +// Set up default configuration and allocate resource for Turbo Channel Access. // VOID InitTurboChannelAccess( @@ -10869,7 +10869,7 @@ DeInitTurboChannelAccess( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + PlatformCancelTimer(Adapter, &pMgntInfo->TurboChannelAccess.TcaCheckTimer ); PlatformReleaseTimer(Adapter, &pMgntInfo->TurboChannelAccess.TcaCheckTimer ); @@ -10880,7 +10880,7 @@ DeInitTurboChannelAccess( // // Description: // Periodical timer for Turbo Channel Access checking. -// 2006.08.15, by rcnjko. +// 2006.08.15, by rcnjko. // VOID TcaCheckTimerCallback( @@ -10891,16 +10891,16 @@ TcaCheckTimerCallback( PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_TURBO_CA pTurboCa = &(pMgntInfo->TurboChannelAccess); -#if RTL8192SU_ASIC_VERIFICATION +#if RTL8192SU_ASIC_VERIFICATION return; #endif //if(Adapter->bDriverStopped) return; - + do{ u4Byte TxThroughput; // Tx throughput in KBps. - u4Byte RxThroughput; // Rx throughput in KBps. + u4Byte RxThroughput; // Rx throughput in KBps. u4Byte TotalThroughput; // Total throughput in last interval in KBps. u4Byte HighestOperaRateInMbps = (pMgntInfo->HighestOperaRate >= 2 ? (pMgntInfo->HighestOperaRate/2) : 1); // In Mbps @@ -10910,7 +10910,7 @@ TcaCheckTimerCallback( TotalThroughput = TxThroughput + RxThroughput; pTurboCa->TotalThroughput = TotalThroughput/1024; - // Keep information about throughput of last interval. + // Keep information about throughput of last interval. pTurboCa->TxThroughput = TxThroughput; pTurboCa->RxThroughput = RxThroughput; PlatformMoveMemory(&(pTurboCa->LastTxStats), &(Adapter->TxStats), sizeof(RT_TX_STATISTICS)); @@ -10939,15 +10939,15 @@ TcaCheckTimerCallback( // If total throughput is smaller than 1/8 of highest operation rate, turn off TCA. // For example, in G mode, if total throughput < 6.75 Mbps, we turn off TCA. - + if( ((TotalThroughput*8)/1000) < (HighestOperaRateInMbps/8) ) { if(pTurboCa->bEnabled) { - RT_TRACE(COMP_MLME, DBG_LOUD, - ("----- Turn off TCA for TotalThroughput: %d KBps is not large enough, HighestOperaRate(%d).\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("----- Turn off TCA for TotalThroughput: %d KBps is not large enough, HighestOperaRate(%d).\n", TotalThroughput, pMgntInfo->HighestOperaRate)); - MgntActSet_EnterTurboMode( Adapter, FALSE); + MgntActSet_EnterTurboMode( Adapter, FALSE); } pTurboCa->CheckCnt = 1; @@ -10965,7 +10965,7 @@ TcaCheckTimerCallback( if(!pTurboCa->bEnabled) { // TCA is OFF. u4Byte NormalTxThroughput; // Tx throughput in KBps. - u4Byte NormalRxThroughput; // Rx throughput in KBps. + u4Byte NormalRxThroughput; // Rx throughput in KBps. // Figure out Total throughput in Non-TCA mode. RT_ASSERT(pTurboCa->CheckInterval > 0, ("TcaCheckTimerCallback(): CheckInterval(%d) should > 0\n", pTurboCa->CheckInterval)); @@ -10974,23 +10974,23 @@ TcaCheckTimerCallback( pTurboCa->NormalTotalThroughput = NormalTxThroughput + NormalRxThroughput; // Turn on TCA. - RT_TRACE(COMP_MLME, DBG_LOUD, - ("+++++ Turn on TCA, CheckCnt(%d), CheckInterval(%d), NormalTotalThroughput: %d KBps.\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("+++++ Turn on TCA, CheckCnt(%d), CheckInterval(%d), NormalTotalThroughput: %d KBps.\n", pTurboCa->CheckCnt, pTurboCa->CheckInterval, pTurboCa->NormalTotalThroughput)); // Modified by Roger, 2006.12.07. MgntActSet_EnterTurboMode( Adapter, TRUE); - // Reset CheckInterval to default setting for TCA on. + // Reset CheckInterval to default setting for TCA on. pTurboCa->CheckInterval = TCA_DEF_CHECK_INTERVAL; } else { // TCA is ON. - s4Byte DeltaTotalThroughput; // Delta of Total throughput in KBps. - + s4Byte DeltaTotalThroughput; // Delta of Total throughput in KBps. + //2 Figure out Delta of Total throughput. DeltaTotalThroughput = (s4Byte)TotalThroughput - (s4Byte)(pTurboCa->NormalTotalThroughput); - + if(DeltaTotalThroughput < 0) //&& //(u4Byte)(-1 * (DeltaTotalThroughput*200 / 125)) > HighestOperaRateInMbps ) { @@ -10999,7 +10999,7 @@ TcaCheckTimerCallback( u4Byte LossInMbps = (u4Byte)(-1 * (DeltaTotalThroughput / 125)); // in Mbps: (-1 * DeltaTotalThroughput * 8) / 1000 u4Byte PenalityFactor = 200; // 1 / 0.005. - if( (LossInMbps * PenalityFactor) > HighestOperaRateInMbps ) + if( (LossInMbps * PenalityFactor) > HighestOperaRateInMbps ) { pTurboCa->CheckInterval = (((LossInMbps * PenalityFactor) + HighestOperaRateInMbps) / HighestOperaRateInMbps) - 1; RT_TRACE(COMP_MLME, DBG_LOUD, ("DeltaTotalThroughput(%d) < 0 => 1. Update CheckInterval(%d)\n", DeltaTotalThroughput, pTurboCa->CheckInterval)); @@ -11013,13 +11013,13 @@ TcaCheckTimerCallback( pTurboCa->CheckInterval += TCA_NG_EXTRA_CHECK_INTERVAL; // Turn off TCA. - RT_TRACE(COMP_MLME, DBG_LOUD, - ("----- Turn off TCA for DeltaTotalThroughput(%d) < 0, NormalTotalThroughput(%d)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("----- Turn off TCA for DeltaTotalThroughput(%d) < 0, NormalTotalThroughput(%d)\n", DeltaTotalThroughput, pTurboCa->NormalTotalThroughput)); - + // Modified by Roger, 2006.12.07. MgntActSet_EnterTurboMode( Adapter, FALSE); - + PlatformMoveMemory(&(pTurboCa->LastNormalTxStats), &(Adapter->TxStats), sizeof(RT_TX_STATISTICS)); PlatformMoveMemory(&(pTurboCa->LastNormalRxStats), &(Adapter->RxStats), sizeof(RT_RX_STATISTICS)); } @@ -11030,7 +11030,7 @@ TcaCheckTimerCallback( } } - // Reset CheckCnt to 1. + // Reset CheckCnt to 1. pTurboCa->CheckCnt = 1; } else @@ -11068,11 +11068,11 @@ PnPWakeUpJoinTimerCallback( PlatformStallExecution(20); } } -*/ - +*/ + MgntActSet_802_11_SSID(pAdapter, pAdapter->MgntInfo.Ssid.Octet, pAdapter->MgntInfo.Ssid.Length, TRUE ); -// pMgntInfo->bRoamingbySleep = FALSE; - +// pMgntInfo->bRoamingbySleep = FALSE; + RT_TRACE(COMP_POWER, DBG_LOUD, ("<===PnPWakeUpJoinTimerCallback\n")); } @@ -11117,7 +11117,7 @@ WaitingKeyTimerCallback( //delay_ms(1000); //MgntIndicateMediaStatus( Adapter, RT_MEDIA_CONNECT, FORCE_INDICATE ); return; - + } // @@ -11168,7 +11168,7 @@ MgntResumeBeacon( // Mark the Beacon state first to prevent the timer still going. pMgntInfo->BeaconState = BEACON_STARTED; - if(SwBeaconType >= BEACON_SEND_AUTO_SW) // Using SW Beacon Timer + if(SwBeaconType >= BEACON_SEND_AUTO_SW) // Using SW Beacon Timer PlatformSetTimer( pAdapter, &pMgntInfo->SwBeaconTimer, 0); // We need to stop HW beacon related configuration. @@ -11179,7 +11179,7 @@ MgntResumeBeacon( } } -BOOLEAN +BOOLEAN MgntScanInProgress( PMGNT_INFO pMgntInfo ) @@ -11198,37 +11198,37 @@ MgntScanInProgress( } -BOOLEAN +BOOLEAN MgntIsLinkInProgress( PMGNT_INFO pMgntInfo ) -{ +{ PADAPTER pAdapter = (PADAPTER)CONTAINING_RECORD(pMgntInfo, ADAPTER, MgntInfo); BOOLEAN bResult = FALSE; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - bResult = (pMgntInfo->bScanInProgress && !pMgntInfo->bScanOnly) || - ((pMgntInfo->JoinTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->JoinTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || - ((pMgntInfo->JoinConfirmTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->JoinConfirmTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || - ((pMgntInfo->JoinProbeReqTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->JoinProbeReqTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || - ((pMgntInfo->AuthTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->AuthTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || - ((pMgntInfo->AsocTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->AsocTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || + bResult = (pMgntInfo->bScanInProgress && !pMgntInfo->bScanOnly) || + ((pMgntInfo->JoinTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->JoinTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || + ((pMgntInfo->JoinConfirmTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->JoinConfirmTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || + ((pMgntInfo->JoinProbeReqTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->JoinProbeReqTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || + ((pMgntInfo->AuthTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->AuthTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || + ((pMgntInfo->AsocTimer.Status&RT_TIMER_STATUS_SET) && !(pMgntInfo->AsocTimer.Status&RT_TIMER_STATUS_CANCEL_NG)) || (pMgntInfo->bJoinInProgress); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); - + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + RT_TRACE(COMP_MLME, DBG_TRACE, ("MgntIsLinkInProgress %d\n", bResult)); - return bResult; + return bResult; } -BOOLEAN +BOOLEAN MgntIsTimeOutForIndication( PMGNT_INFO pMgntInfo ) -{ +{ BOOLEAN bResult = FALSE; PADAPTER pAdapter = (PADAPTER)CONTAINING_RECORD(pMgntInfo, ADAPTER, MgntInfo); @@ -11237,14 +11237,14 @@ MgntIsTimeOutForIndication( nowTime = PlatformGetCurrentTime(); RT_TRACE(COMP_MLME, DBG_LOUD, ("RoamingType 0x%x\n", pMgntInfo->RoamingType)); - + if(MgntRoamingInProgress(pMgntInfo)) deltatime = (ULONG)( (nowTime - pAdapter->LastRoamingStartIndicationTime) / 100000 ); // in 0.1 second. else - deltatime = (ULONG)( (nowTime - pAdapter->LastConnectStartIndicationTime) / 100000 ); // in 0.1 second. + deltatime = (ULONG)( (nowTime - pAdapter->LastConnectStartIndicationTime) / 100000 ); // in 0.1 second. - if(deltatime > RT_CONNECT_ROAM_INDICATE_TIME_LIMIT) - { + if(deltatime > RT_CONNECT_ROAM_INDICATE_TIME_LIMIT) + { if(MgntRoamingInProgress(pMgntInfo)) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("LastRoamingStartIndicationTime %d\n", (u4Byte)pAdapter->LastRoamingStartIndicationTime)); @@ -11258,9 +11258,9 @@ MgntIsTimeOutForIndication( bResult = TRUE; } - return bResult; + return bResult; } - + BOOLEAN IsSendingBeacon( @@ -11275,7 +11275,7 @@ IsSendingBeacon( /*********************************************************************** Function: Mgnt_SwChnl() Merge all switch channel operation in 1 function -Parameter: +Parameter: Channel: the channel number to switch SwitchChannelMethod: 1: calling SwChnlByTimerHandler 2: calling SwChnlByDelayHandler @@ -11346,11 +11346,11 @@ Mgnt_BackupVarBeforeScan( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + pMgntInfo->SettingBeforeScan.WirelessMode = (WIRELESS_MODE)wirelessMode; RT_TRACE(COMP_MLME, DBG_LOUD, ("pMgntInfo->SettingBeforeScan.WirelessMode 0x%x\n", pMgntInfo->SettingBeforeScan.WirelessMode)); - + pMgntInfo->SettingBeforeScan.ChannelNumber = chnl; pMgntInfo->SettingBeforeScan.ChannelBandwidth = bw; pMgntInfo->SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz = chExt; @@ -11387,7 +11387,7 @@ MgntRecoverFWOffloadMechanism( Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_USE_RA_MASK, &bUseRAMask); RT_TRACE_F(COMP_INIT, DBG_LOUD, ("[DBG] bUseRAMask(%u)\n", bUseRAMask)); - + if(bUseRAMask) { RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] 1\n")); @@ -11397,7 +11397,7 @@ MgntRecoverFWOffloadMechanism( } // - // 2015/04/16 MH According to ODM input parameters, we need to send default port HAL datastructure's ODM + // 2015/04/16 MH According to ODM input parameters, we need to send default port HAL datastructure's ODM // Otherwise, ext port will send null HAL pointer and cause BSOD. // GetDefaultAdapter(Adapter)->HalFunc.RAPostActionHandler(&(((PHAL_DATA_TYPE)GetDefaultAdapter(Adapter)->HalData)->DM_OutSrc)); @@ -11444,7 +11444,7 @@ FtResetEntryList( // // Description: -// Return a new FT entry. +// Return a new FT entry. // Arguments: // [in] pAdapter - // The NIC adapter context. @@ -11533,7 +11533,7 @@ FtUpdateEntryInfo( IN FT_ENTRY_ACTION action, IN pu1Byte pTargetAddr, IN PVOID pInfoBuffer, - IN u4Byte BufLen + IN u4Byte BufLen ) { PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); @@ -11596,14 +11596,14 @@ FtUpdateEntryInfo( case FT_ENTRY_ACTION_UPDATE_FTE: { - if(BufLen > 0 && + if(BufLen > 0 && (BufLen > (MAX_FT_IE_LEN + SIZE_EID_AND_LEN) || BufLen < (MIN_FT_IE_LEN + SIZE_EID_AND_LEN))) { RT_TRACE_F(COMP_MLME, DBG_WARNING, ("FT_ENTRY_ACTION_UPDATE_FTE: Input BufLen(%d) is invalid\n", BufLen)); rtStatus = RT_STATUS_INVALID_LENGTH; break; - } - + } + if(pInfoBuffer && BufLen > 0) { PlatformMoveMemory(pEntry->FTE, pInfoBuffer, BufLen); @@ -11619,8 +11619,8 @@ FtUpdateEntryInfo( RT_TRACE_F(COMP_MLME, DBG_WARNING, ("FT_ENTRY_ACTION_UPDATE_PMKR0_NAME: Input BufLen(%d) is invalid\n", BufLen)); rtStatus = RT_STATUS_INVALID_LENGTH; break; - } - + } + if(pInfoBuffer && BufLen > 0) { PlatformMoveMemory(pEntry->PMKR0Name, pInfoBuffer, BufLen); @@ -11630,7 +11630,7 @@ FtUpdateEntryInfo( break; case FT_ENTRY_ACTION_UPDATE_RSNE: - { + { if(pInfoBuffer && BufLen > 0) { PlatformMoveMemory(pEntry->RSNE, pInfoBuffer, BufLen); @@ -11665,7 +11665,7 @@ FtUpdateEntryInfo( } break; } - + FunctionOut(COMP_MLME); return rtStatus; @@ -11702,7 +11702,7 @@ FtIsFtAuthReady( { return TRUE; } - } + } } return FALSE; @@ -11740,7 +11740,7 @@ FtIsFtAssocReqReady( { return TRUE; } - } + } } return FALSE; diff --git a/network/wlan/WDI/COMMON/MgntLink.h b/network/wlan/WDI/COMMON/MgntLink.h index 951693eac..f5086ba68 100644 --- a/network/wlan/WDI/COMMON/MgntLink.h +++ b/network/wlan/WDI/COMMON/MgntLink.h @@ -48,10 +48,10 @@ #define ROAM_RETRY_LIMIT 2 // -// 061207, Roger: +// 061207, Roger: // Turbo mode related parameter. // -#define TCA_CHECK_PERIOD 1000 // in ms. +#define TCA_CHECK_PERIOD 1000 // in ms. #define TCA_DEF_CHECK_INTERVAL 2 // in # of TCA_CHECK_PERIOD. #define TCA_NG_EXTRA_CHECK_INTERVAL 2 // in# of TCA_CHECK_PERIOD, extra penalty when TCA is NG. #define TCA_OK_CHECK_INTERVAL 1 // in# of TCA_CHECK_PERIOD. @@ -67,8 +67,8 @@ #define BUSY_TRAFFIC_HIGH_TP 80 // Tx/Rx packets in a certain period, Justin: make this value smaller, so can adjust the USB aggregation faster // 2014/09/25 MH Add for very high speed -#define BUSY_TRAFFIC_VERY_HIGH_THREADHOLD 10000 -#define BUSY_TRAFFIC_VERY_HIGH_TP 250 +#define BUSY_TRAFFIC_VERY_HIGH_THREADHOLD 10000 +#define BUSY_TRAFFIC_VERY_HIGH_TP 250 #define SCAN_DELAY_TIME_MS_LONG 1000 #define SCAN_DELAY_TIME_MS_SHORT 50 @@ -86,7 +86,7 @@ ((_pMgntInfo)->AsocTimer.Status&RT_TIMER_STATUS_SET) || \ ((_pMgntInfo)->bJoinInProgress) \ ) -#endif +#endif #define MgntLinkStatusUpdateRxBeacon(_Adapter) \ _Adapter->MgntInfo.LinkDetectInfo.NumRecvBcnInPeriod ++; @@ -209,7 +209,7 @@ enum StatusCode StatusCode_security_disabled = 5, StatusCode_unacceptable_lifetime = 6, StatusCode_notsame_BSS = 7, - + StatusCode_notsupport_cap = 10, StatusCode_reassoc_denied = 11, StatusCode_assoc_denied = 12, @@ -241,11 +241,11 @@ enum StatusCode enum _ReasonCode{ unspec_reason = 0x1, auth_not_valid = 0x2, - deauth_lv_ss = 0x3, + deauth_lv_ss = 0x3, inactivity = 0x4, - ap_overload = 0x5, + ap_overload = 0x5, class2_err = 0x6, - class3_err = 0x7, + class3_err = 0x7, disas_lv_ss = 0x8, asoc_not_auth = 0x9, @@ -302,20 +302,20 @@ extern u4Byte DSSS_Freq_Channel[]; extern BOOLEAN bDebugFixBssid; extern u1Byte debug_fixed_bssid[]; -BOOLEAN +BOOLEAN AssembleFragmentWcnIeFromMmpdu( IN PADAPTER Adapter, IN PSIMPLE_CONFIG_T pSimpleConfig, IN OUT POCTET_STRING posMmpdu ); -PRT_WLAN_BSS +PRT_WLAN_BSS BssDescDupByDesc( IN PADAPTER Adapter, IN PRT_WLAN_BSS pRtBSS ); -PRT_WLAN_BSS +PRT_WLAN_BSS BssDescDupByBssid( IN PADAPTER Adapter, IN pu1Byte pBssid @@ -419,7 +419,7 @@ MlmeAssociateRequest( u4Byte asocTmot, u2Byte asCap, u2Byte asListenInterval, - BOOLEAN Reassociate + BOOLEAN Reassociate ); RT_STATUS @@ -485,7 +485,7 @@ MgntDisconnectIBSS( #define FORCE_NO_INDICATE 0x02 -void +void MgntIndicateMediaStatus( PADAPTER Adapter, RT_MEDIA_STATUS mstatus, @@ -539,7 +539,7 @@ WatchDogTimerCallback( VOID SendDataFrameQueued( PADAPTER Adapter - ); + ); // ------------------------------------------- VOID MgntResetScanProcess( @@ -718,7 +718,7 @@ BOOLEAN MgntDisconnect( IN PADAPTER Adapter, IN u1Byte asRsn -); +); VOID @@ -771,19 +771,19 @@ MgntScanInProgress( PMGNT_INFO pMgntInfo ); -BOOLEAN +BOOLEAN MgntIsLinkInProgress( PMGNT_INFO pMgntInfo ); -BOOLEAN +BOOLEAN MgntIsTimeOutForIndication( PMGNT_INFO pMgntInfo ); u1Byte AutoSelectChannel( - PADAPTER Adapter, + PADAPTER Adapter, PRT_WLAN_BSS pBssList, int nNumBss ); @@ -848,7 +848,7 @@ FtUpdateEntryInfo( IN FT_ENTRY_ACTION action, IN pu1Byte pTargetAddr, IN PVOID pInfoBuffer, - IN u4Byte BufLen + IN u4Byte BufLen ); BOOLEAN diff --git a/network/wlan/WDI/COMMON/MgntSendPacket.c b/network/wlan/WDI/COMMON/MgntSendPacket.c index 6fc5b560a..4c3e40a00 100644 --- a/network/wlan/WDI/COMMON/MgntSendPacket.c +++ b/network/wlan/WDI/COMMON/MgntSendPacket.c @@ -5,14 +5,14 @@ #endif // -// Description: +// Description: // Send SW Beacon: // 1. SW auto beacon whose TBTT maintained by HW and beacon update timing maintained by driver (-> TbttPollingWorkItemCallback() ) -// ex. USB & SDIO Beacon (SwBeaconType == BEACON_SEND_AUTO_SW, send to Beacon Queue) +// ex. USB & SDIO Beacon (SwBeaconType == BEACON_SEND_AUTO_SW, send to Beacon Queue) // // 2. Manual Beacon whose TBTT and beacon update timing maintained by driver (-> TbttPollingWorkItemCallback() ) // ex. Driver SW Beacon (SwBeaconType == BEACON_SEND_MANUAL, send to AC/Mgnt/High Queue) -// +// // Arguments: // [in] pAdapter - // The adapter context. @@ -22,7 +22,7 @@ // Beacon Length // [in] TxRate - // Beacon Tx Rate -// Remark: +// Remark: // Please do not use this function outside of this module // by Hana, 2015-08-05 // @@ -49,11 +49,11 @@ SendSWBeacon( PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); // Set up beacon content. - PlatformMoveMemory(pBuf->Buffer.VirtualAddress, virtualaddr, bcnlen); + PlatformMoveMemory(pBuf->Buffer.VirtualAddress, virtualaddr, bcnlen); // Set up TCB pTcb->BufferList[0] = pBuf->Buffer; - pTcb->BufferList[0].Length = bcnlen; + pTcb->BufferList[0].Length = bcnlen; pTcb->BufferCount = 1; pTcb->PacketLength = pMgntInfo->beaconframe.Length; pTcb->Tailer.Length = 0; @@ -61,7 +61,7 @@ SendSWBeacon( pTcb->ProtocolType = RT_PROTOCOL_802_11; pTcb->BufferType = RT_TCB_BUFFER_TYPE_LOCAL; pTcb->SpecifiedQueueID = QueueIndex; - pTcb->DataRate = TxRate; + pTcb->DataRate = TxRate; pTcb->bFromUpperLayer = FALSE; pTcb->Reserved = pBuf; pTcb->FragCount = 1; @@ -89,7 +89,7 @@ SendSWBeacon( RT_TRACE(COMP_SEND, DBG_TRACE, ("SendBeaconFrame(): Insert to wait queue of QueueIndex: %d\n", QueueIndex)); RTInsertTailListWithCnt(Get_WAIT_QUEUE(pAdapter, pTcb->SpecifiedQueueID), &pTcb->List, GET_WAIT_QUEUE_CNT(pAdapter,pTcb->SpecifiedQueueID)); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } else @@ -101,9 +101,9 @@ SendSWBeacon( } // -// Description: +// Description: // Send HW Beacon whose TBTT maintained by HW and beacon update timing are handled by Beacon Early interrupt. -// ex. PCIE Beacon (SwBeaconType == BEACON_SEND_AUTO_HW, send to Beacon Queue) +// ex. PCIE Beacon (SwBeaconType == BEACON_SEND_AUTO_HW, send to Beacon Queue) // // Arguments: // [in] pAdapter - @@ -114,7 +114,7 @@ SendSWBeacon( // Beacon Length // [in] TxRate - // Beacon Tx Rate -// Remark: +// Remark: // Please do not use this function outside of this module // by Hana, 2015-08-05 // @@ -176,7 +176,7 @@ SendHWBeacon( // A-MPDU Aggregation pTcb->bAMPDUEnable = FALSE; - + pTcb->FragBufCount[0] = 1; pTcb->FragLength[0] = (u2Byte)bcnlen; pTcb->BufferList[0].Length = bcnlen; @@ -190,7 +190,7 @@ SendHWBeacon( PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); - + } @@ -222,11 +222,11 @@ SendBeaconFrame( bcnlen = pMgntInfo->beaconframe.Length; bcnlen += Adapter->TXPacketShiftBytes; - + if(bcnlen > pMgntInfo->MaxBeaconSize) pMgntInfo->MaxBeaconSize = bcnlen; - if( IS_WIRELESS_MODE_5G(Adapter) || + if( IS_WIRELESS_MODE_5G(Adapter) || (IS_WIRELESS_MODE_HT_24G(Adapter) && !pMgntInfo->pHTInfo->bCurSuppCCK)) { TxRate = MGN_6M; // 6M @@ -243,7 +243,7 @@ SendBeaconFrame( TxRate = MGN_6M; } -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) if(P2P_ENABLED(GET_P2P_INFO(Adapter))) { PP2P_INFO pP2PInfo = (GET_P2P_INFO(Adapter)); @@ -265,7 +265,7 @@ SendProbeReq( PADAPTER Adapter, BOOLEAN bAnySsid, u2Byte DataRate, - BOOLEAN bForcePowerSave + BOOLEAN bForcePowerSave ) { PRT_TCB pTcb; @@ -274,14 +274,14 @@ SendProbeReq( #if DBG_CMD if (DBG_Var.DBG_ProbeReq_Send == 0) return; -#endif +#endif PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructProbeRequest( - Adapter, - pBuf->Buffer.VirtualAddress, + Adapter, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, TRUE, bAnySsid, @@ -291,12 +291,12 @@ SendProbeReq( MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } // // Description: -// Advanced version of SendProbeReq. Calling this function will send dedicate +// Advanced version of SendProbeReq. Calling this function will send dedicate // probe request with SSID in pMgntInfo->SsidsToScan one by one, and send // an probe request with broadcast SSID at the last. // 2006.12.20, by shien chang. @@ -317,7 +317,7 @@ SendProbeReqEx( #if DBG_CMD if (DBG_Var.DBG_ProbeReq_Send == 0) return; -#endif +#endif PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); // Send probe request with SSID in pMgntInfo.SsidsToScan. @@ -326,8 +326,8 @@ SendProbeReqEx( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructProbeRequestEx( - Adapter, - pBuf->Buffer.VirtualAddress, + Adapter, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pSsidsToScan->Ssid[index], bForcePowerSave); @@ -337,7 +337,7 @@ SendProbeReqEx( } } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } VOID @@ -357,7 +357,7 @@ SendAuthenticatePacket( u2Byte DataRate; RT_TRACE(COMP_MLME, DBG_LOUD, ("===> SendAuthenticatePacket()\n")); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) @@ -383,7 +383,7 @@ SendAuthenticatePacket( MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== SendAuthenticatePacket()\n")); } @@ -406,7 +406,7 @@ SendAssociateReq( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); RT_TRACE(COMP_MLME, DBG_LOUD, ("===> SendAssociateReq()\n")); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) @@ -425,12 +425,12 @@ SendAssociateReq( MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, pMgntInfo->Bssid, 6); MgntUpdateAsocInfo(Adapter, UpdateAsocReq, pBuf->Buffer.VirtualAddress, pTcb->PacketLength); MgntUpdateAsocInfo(Adapter, UpdateFlagReAsocReq, (UCHAR*)&FlagReAsoc, sizeof(BOOLEAN)); - + DataRate = (u2Byte)MgntQuery_MgntFrameTxRate( Adapter, asocStaAddr ); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== SendAssociateReq()\n")); } @@ -442,7 +442,7 @@ SendReassociateReq( PADAPTER Adapter, pu1Byte ReasocStaAddr, u2Byte ReasocCap, - u2Byte asocListenInterval, + u2Byte asocListenInterval, pu1Byte CurrentasocStaAddr ) { @@ -453,7 +453,7 @@ SendReassociateReq( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); RT_TRACE(COMP_MLME, DBG_LOUD, ("===> SendReassociateReq()\n")); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) @@ -474,12 +474,12 @@ SendReassociateReq( MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, pMgntInfo->Bssid, 6); MgntUpdateAsocInfo(Adapter, UpdateAsocReq, pBuf->Buffer.VirtualAddress, pTcb->PacketLength); MgntUpdateAsocInfo(Adapter, UpdateFlagReAsocReq, (UCHAR*)&FlagReAsoc, sizeof(BOOLEAN)); - + DataRate = (u2Byte)MgntQuery_MgntFrameTxRate( Adapter, ReasocStaAddr ); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== SendReassociateReq()\n")); } @@ -518,17 +518,17 @@ SendAssociateRsp( ); DataRate = (u2Byte)MgntQuery_MgntFrameTxRate( Adapter, asocStaAddr ); - - AsocEntry_UpdateAsocInfo(Adapter, - asocStaAddr, - NULL, - pTcb->PacketLength, + + AsocEntry_UpdateAsocInfo(Adapter, + asocStaAddr, + NULL, + pTcb->PacketLength, ALLOCATE_ASOC_RSP); //vivi add this for vitrual ap.as pcie add 8 byte before mac header as early mode, 20101130 if(pTcb->bInsert8BytesForEarlyMode) - { - AsocEntry_UpdateAsocInfo(Adapter, + { + AsocEntry_UpdateAsocInfo(Adapter, asocStaAddr, pBuf->Buffer.VirtualAddress+8, pTcb->PacketLength-8, @@ -536,16 +536,16 @@ SendAssociateRsp( } else { - AsocEntry_UpdateAsocInfo(Adapter, + AsocEntry_UpdateAsocInfo(Adapter, asocStaAddr, pBuf->Buffer.VirtualAddress, pTcb->PacketLength, - UPDATE_ASOC_RSP); + UPDATE_ASOC_RSP); } MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== SendAssociateRsp()\n")); } @@ -568,30 +568,30 @@ SendDeauthentication( if(Adapter == GetFirstClientPort(Adapter) && MultiChannelGetPortConnected20MhzChannel(Adapter) != 0) { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); - + HalChangeWirelessMode(Adapter, MultiChannelGetPortConnected20MhzChannel(Adapter)); - + MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - Adapter, - MultiChannelGetPortConnected20MhzChannel(Adapter), - CHANNEL_WIDTH_20, - EXTCHNL_OFFSET_NO_EXT, - EXTCHNL_OFFSET_NO_EXT, + Adapter, + MultiChannelGetPortConnected20MhzChannel(Adapter), + CHANNEL_WIDTH_20, + EXTCHNL_OFFSET_NO_EXT, + EXTCHNL_OFFSET_NO_EXT, 0 - ); + ); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Channel %d\n", MultiChannelGetPortConnected20MhzChannel(Adapter))); } #endif PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); - + if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { - ConstructDeauthenticatePacket( - Adapter, - pBuf->Buffer.VirtualAddress, + ConstructDeauthenticatePacket( + Adapter, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, - auSta, + auSta, asRsn ); DataRate = (u2Byte)MgntQuery_MgntFrameTxRate( Adapter, auSta ); @@ -608,12 +608,12 @@ SendDeauthentication( } } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); // Win8: For sending packets in the correct channel ---- delay_ms(50); // ---------------------------------------------- - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== SendDeauthentication()\n")); } @@ -638,31 +638,31 @@ SendDisassociation( #if (MULTICHANNEL_SUPPORT == 1) if(GetDefaultMgntInfo(Adapter)->RegMultiChannelFcsMode == 0) { - if(Adapter == GetFirstClientPort(Adapter) && MultiChannelGetPortConnected20MhzChannel(Adapter) !=0 - && (GET_HAL_DATA(Adapter)->CurrentChannel != MultiChannelGetPortConnected20MhzChannel(Adapter))) //ylb 20121029 add "&& (GET_HAL_DATA(Adapter)->CurrentChannel != MultiChannelGetPortConnected20MhzChannel(Adapter))" + if(Adapter == GetFirstClientPort(Adapter) && MultiChannelGetPortConnected20MhzChannel(Adapter) !=0 + && (GET_HAL_DATA(Adapter)->CurrentChannel != MultiChannelGetPortConnected20MhzChannel(Adapter))) //ylb 20121029 add "&& (GET_HAL_DATA(Adapter)->CurrentChannel != MultiChannelGetPortConnected20MhzChannel(Adapter))" { RT_TRACE_F(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); - - HalChangeWirelessMode(Adapter, MultiChannelGetPortConnected20MhzChannel(Adapter)); + + HalChangeWirelessMode(Adapter, MultiChannelGetPortConnected20MhzChannel(Adapter)); MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - Adapter, - MultiChannelGetPortConnected20MhzChannel(Adapter), - CHANNEL_WIDTH_20, - EXTCHNL_OFFSET_NO_EXT, - EXTCHNL_OFFSET_NO_EXT, + Adapter, + MultiChannelGetPortConnected20MhzChannel(Adapter), + CHANNEL_WIDTH_20, + EXTCHNL_OFFSET_NO_EXT, + EXTCHNL_OFFSET_NO_EXT, 0 ); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Channel %d\n", MultiChannelGetPortConnected20MhzChannel(Adapter))); - { + { int i = 0; for( i = 0; i < 100; i++) //add by ylb 20121029: Win8 WFD Test: Fix GO Cannot Receive Disassociation send by Client, Because Client send it at Wrong Channel - { + { if((GET_HAL_DATA(Adapter)->SwChnlInProgress == FALSE) &&(GET_HAL_DATA(Adapter)->CurrentChannel == MultiChannelGetPortConnected20MhzChannel(Adapter))) break; - RT_TRACE(COMP_P2P, DBG_LOUD, ("SendDisassociation: Delay 100 us, Waiting for Switch Channel Complete(%d vs %d)!\n", - GET_HAL_DATA(Adapter)->CurrentChannel, MultiChannelGetPortConnected20MhzChannel(Adapter))); + RT_TRACE(COMP_P2P, DBG_LOUD, ("SendDisassociation: Delay 100 us, Waiting for Switch Channel Complete(%d vs %d)!\n", + GET_HAL_DATA(Adapter)->CurrentChannel, MultiChannelGetPortConnected20MhzChannel(Adapter))); delay_us(100); } } @@ -676,7 +676,7 @@ SendDisassociation( //by sherry 20130117 { int i; - + if((Adapter == GetFirstGOPort(Adapter))) { for(i=0;i<20;i++) @@ -686,21 +686,21 @@ SendDisassociation( RT_TRACE(COMP_MLME,DBG_TRACE,("STA is active send immediately \n")); break; } - else + else { - RT_TRACE(COMP_MLME,DBG_LOUD,("STA is active send wait for sta in active: i= %d \n",i)); + RT_TRACE(COMP_MLME,DBG_LOUD,("STA is active send wait for sta in active: i= %d \n",i)); PlatformStallExecution(10000); } - } + } } } //Enable BE Queue and VI Queue //by sherry 20130117 if(GetDefaultMgntInfo(Adapter)->RegMultiChannelFcsMode == 0) - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_TX_PAUSE, (pu1Byte)(&TxPauseCommand)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_TX_PAUSE, (pu1Byte)(&TxPauseCommand)); else Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_MACID_PKT_SLEEP, (pu1Byte)(&MacIdPause)); @@ -709,24 +709,24 @@ SendDisassociation( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructDisassociatePacket( - Adapter, - pBuf->Buffer.VirtualAddress, + Adapter, + pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, - asSta, + asSta, asRsn ); DataRate = (u2Byte)MgntQuery_MgntFrameTxRate( Adapter, asSta ); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); Adapter->LastConnectionActionTime = PlatformGetCurrentTime(); RT_TRACE(COMP_MLME, DBG_LOUD, ("<=== SendDisassociation()\n")); } // -// Description: +// Description: // Send ProbeRsp. // Arguments: // [in] Adapter - @@ -761,7 +761,7 @@ SendProbeRsp( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructProbeRsp( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, StaAddr, @@ -770,33 +770,33 @@ SendProbeRsp( posProbeReq); if( !(ACTING_AS_AP(Adapter)) ) - { + { // For IBSS mode, we want to use the lowest basic rate. if( IS_WIRELESS_MODE_5G(Adapter) || - (IS_WIRELESS_MODE_HT_24G(Adapter) &&!pMgntInfo->pHTInfo->bCurSuppCCK)) + (IS_WIRELESS_MODE_HT_24G(Adapter) &&!pMgntInfo->pHTInfo->bCurSuppCCK)) DataRate = MGN_6M; else DataRate = pMgntInfo->LowestBasicRate; - + } else { DataRate = (u2Byte)MgntQuery_MgntFrameTxRate(Adapter, StaAddr); -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) if(P2P_ENABLED(GET_P2P_INFO(Adapter))) { PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); if(pP2PInfo->Role == P2P_GO) DataRate = P2P_LOWEST_RATE; } -#endif +#endif } - + RT_TRACE(COMP_SEND, DBG_TRACE, ("==SendProbeRsp(): Tx rate = %d\n", DataRate)); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } // @@ -820,33 +820,33 @@ SendCustomizedData( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructCustomizedData( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pktLength ); - // by Owen on 05/01/10 to fix the following issue: - // The AP Netgear WGT634U do not respond to RTL8187 hereafter after scanning. + // by Owen on 05/01/10 to fix the following issue: + // The AP Netgear WGT634U do not respond to RTL8187 hereafter after scanning. // ps: WGT634U only acks to RTL8187. /* // If payload is zero-legth, some AP may not handle the packet // with WEP correctly, Netgear 11b/g WGT634U. // 2004.12.05, by rcnjko. - pTcb->PacketLength += 50; + pTcb->PacketLength += 50; */ //((pu1Byte)pBuf->Buffer.VirtualAddress)[pTcb->PacketLength] = 0xaa; //((pu1Byte)pBuf->Buffer.VirtualAddress)[pTcb->PacketLength+1] = 0xaa; //pTcb->PacketLength += 2; // - //DataRate = pMgntInfo->CurrentOperaRate; + //DataRate = pMgntInfo->CurrentOperaRate; pTcb->bTxUseDriverAssingedRate = TRUE; DataRate = txRate; MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, BE_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } @@ -873,7 +873,7 @@ SendNullFunctionData( //Add bQoS parameter for QoS Null by Isaiah 2006-07-31 ConstructNullFunctionData( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, StaAddr, @@ -882,7 +882,7 @@ SendNullFunctionData( 0, bForcePowerSave); - DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 + DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 pTcb->bTxUseDriverAssingedRate = TRUE; MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } @@ -911,11 +911,11 @@ SendPSPoll( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructPSPoll( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength); - DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 + DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 pTcb->bTxCalculatedSwDur = TRUE; pTcb->bTxEnableSwCalcDur = TRUE; @@ -924,7 +924,7 @@ SendPSPoll( MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, MGNT_QUEUE, DataRate); } - PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } // @@ -942,7 +942,7 @@ SendMagicPacket( PRT_TX_LOCAL_BUFFER pBuf; u2Byte DataRate; - RT_TRACE(COMP_SEND, DBG_LOUD, ("SendMagicPacket(): StaAddr: %02X-%02X-%02X-%02X-%02X-%02X\n", + RT_TRACE(COMP_SEND, DBG_LOUD, ("SendMagicPacket(): StaAddr: %02X-%02X-%02X-%02X-%02X-%02X\n", StaAddr[0], StaAddr[1], StaAddr[2], StaAddr[3], StaAddr[4], StaAddr[5] )); PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); @@ -950,7 +950,7 @@ SendMagicPacket( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructMagicPacket( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, StaAddr); @@ -978,16 +978,16 @@ SendEapolKeyPacket( KeyType eKeyType, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. BOOLEAN bInstall, // EAPOL-Key Information field: Install Flag. BOOLEAN bKeyAck, // EAPOL-Key Information field: Key Ack bit. - BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. BOOLEAN bSecure, // EAPOL-Key Information field: Secure bit. BOOLEAN bError, // EAPOL-Key Information field: Error bit. True for MIC failure report. BOOLEAN bRequest, // EAPOL-Key Information field: Requst bit. - + u8Byte u8bKeyReplayCounter, // EAPOL-KEY Replay Counter field. pu1Byte pKeyNonce, // EAPOL-Key Key Nonce field (32-byte). u8Byte u8bKeyRSC, // EAPOL-Key Key RSC field (8-byte). - POCTET_STRING posRSNIE, // Key Data field: Pointer to RSN IE, NULL if + POCTET_STRING posRSNIE, // Key Data field: Pointer to RSN IE, NULL if pu1Byte pGTK // Key Data field: Pointer to GTK, NULL if Key Data Length = 0. ) { @@ -1008,7 +1008,7 @@ SendEapolKeyPacket( if(pEntry == NULL) return; - + if(pEntry->perSTAKeyInfo.TxMICKey != NULL) bEncrypt = TRUE; @@ -1046,14 +1046,14 @@ SendEapolKeyPacket( eKeyType, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. bInstall, // EAPOL-Key Information field: Install Flag. bKeyAck, // EAPOL-Key Information field: Key Ack bit. - bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. bSecure, // EAPOL-Key Information field: Secure bit. bError, // EAPOL-Key Information field: Error bit. True for MIC failure report. bRequest, // EAPOL-Key Information field: Requst bit. u8bKeyReplayCounter, // EAPOL-KEY Replay Counter field. pKeyNonce, // EAPOL-Key Key Nonce field (32-byte). u8bKeyRSC, // EAPOL-Key Key RSC field (8-byte). - posRSNIE, // Key Data field: Pointer to RSN IE, NULL if + posRSNIE, // Key Data field: Pointer to RSN IE, NULL if pGTK, // Key Data field: Pointer to GTK, NULL if Key Data Length = 0. bEncrypt // encrypt the packet or not. ); @@ -1071,7 +1071,7 @@ SendEapolKeyPacket( // Check if this is a MIC failure report packet. 2005.09.06, by rcnjko. if(bRequest && bError) { - pTcb->EncInfo.SecProtInfo |= RT_SEC_MIC_FAILURE_REPORT; + pTcb->EncInfo.SecProtInfo |= RT_SEC_MIC_FAILURE_REPORT; } DataRate = pMgntInfo->LowestBasicRate; @@ -1108,16 +1108,16 @@ MgntSendRawPacket( IN u1Byte u1bTxRate ) { - BOOLEAN bResult = FALSE; + BOOLEAN bResult = FALSE; PRT_TCB pTcb; PRT_TX_LOCAL_BUFFER pBuf; u2Byte DataRate; u4Byte Crc32 = 0; pu1Byte pHeader = NULL; - - if( pocPacketToSend == NULL || + + if( pocPacketToSend == NULL || pocPacketToSend->Length > 1600 ) - { + { return bResult; } @@ -1128,9 +1128,9 @@ MgntSendRawPacket( if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { pHeader = pBuf->Buffer.VirtualAddress; - - PlatformMoveMemory(pHeader, pocPacketToSend->Octet, pocPacketToSend->Length); - pTcb->PacketLength = pocPacketToSend->Length; + + PlatformMoveMemory(pHeader, pocPacketToSend->Octet, pocPacketToSend->Length); + pTcb->PacketLength = pocPacketToSend->Length; // Caculate CRC // The 8192C HW would not append the CRC for this packet when the RAW Packet bit is set in the Tx Desc. @@ -1170,16 +1170,16 @@ MgntSendSpecificPacket( PRT_TCB pTcb; PRT_TX_LOCAL_BUFFER pBuf; u2Byte DataRate; - BOOLEAN bResult = FALSE; + BOOLEAN bResult = FALSE; PRT_SECURITY_T pSecInfo = NULL; PADAPTER pSendAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pDefaultMgntInfo = GetDefaultMgntInfo(Adapter); //RT_TRACE(COMP_P2P, DBG_LOUD, ("MgntSendSpecificPacket(): send pkt with rate: %u\n", u1bTxRate)); - if( pocPacketToSend == NULL || + if( pocPacketToSend == NULL || pocPacketToSend->Length > 1600 ) - { + { return bResult; } @@ -1194,7 +1194,7 @@ MgntSendSpecificPacket( // If no adapter matches this packet, use default adapter. if(pSendAdapter == NULL) pSendAdapter = GetDefaultAdapter(Adapter); - + // Adopt the variables from sender adapter. pMgntInfo = &(pSendAdapter->MgntInfo); pStaQos = pMgntInfo->pStaQos; @@ -1211,7 +1211,7 @@ MgntSendSpecificPacket( offset = sMacHdrLng; pTcb->PacketLength = 0; - + PlatformMoveMemory(pBuf->Buffer.VirtualAddress, pocPacketToSend->Octet, offset); pTcb->PacketLength += sMacHdrLng; @@ -1265,7 +1265,7 @@ MgntSendSpecificPacket( VOID SendEAPOLStarPacket( IN PADAPTER Adapter, - IN BOOLEAN bEncrypt + IN BOOLEAN bEncrypt ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); @@ -1297,7 +1297,7 @@ SendEAPOLStarPacket( } RT_PRINT_DATA(COMP_SEC , DBG_LOUD , "==> Send EAPOL Start \n" , pBuf->Buffer.VirtualAddress , pTcb->PacketLength); - + DataRate = pMgntInfo->LowestBasicRate; pTcb->bTxUseDriverAssingedRate = TRUE; MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, LOW_QUEUE, DataRate); @@ -1409,7 +1409,7 @@ SendQosAddTs( u2Byte DataRate; RT_TRACE(COMP_QOS, DBG_LOUD, ("===> SendQosAddTs()\n")); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) @@ -1450,7 +1450,7 @@ SendQosDelTs( u2Byte DataRate; RT_TRACE(COMP_QOS, DBG_LOUD, ("===> SendQosDelTs()\n")); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) @@ -1505,14 +1505,14 @@ ApSendNullPacket( u2Byte DataRate; RT_TRACE(COMP_AP, DBG_TRACE, ("===> ApSendNullPacket()\n")); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { //Add bQoS parameter for QoS Null by Isaiah 2006-07-31 ConstructNullFunctionData( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, StaAddr, @@ -1521,7 +1521,7 @@ ApSendNullPacket( bEosp, FALSE); - DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 + DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 pTcb->bTxUseDriverAssingedRate = TRUE; pTcb->priority = AC; MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); @@ -1557,19 +1557,19 @@ SendSAQueryReq( PRT_TCB pTcb; PRT_TX_LOCAL_BUFFER pBuf; u2Byte DataRate; - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructSAQeuryReq( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pTargetSta, Identifier); - DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 + DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 pTcb->bTxUseDriverAssingedRate = TRUE; RT_PRINT_DATA(COMP_SEC, DBG_TRACE, "SendSAQueryReq(): Content:\n", pBuf, pTcb->PacketLength); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); @@ -1604,19 +1604,19 @@ SendSAQueryRsp( PRT_TCB pTcb; PRT_TX_LOCAL_BUFFER pBuf; u2Byte DataRate; - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); if(MgntGetBuffer(Adapter, &pTcb, &pBuf)) { ConstructSAQeuryRsp( - Adapter, + Adapter, pBuf->Buffer.VirtualAddress, &pTcb->PacketLength, pTargetSta, Identifier); - DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 + DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 pTcb->bTxUseDriverAssingedRate = TRUE; RT_PRINT_DATA(COMP_SEC, DBG_TRACE, "SendSAQueryRsp(): Content:\n", pBuf, pTcb->PacketLength); MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); diff --git a/network/wlan/WDI/COMMON/MgntSendPacket.h b/network/wlan/WDI/COMMON/MgntSendPacket.h index f09d83bb0..86d498d28 100644 --- a/network/wlan/WDI/COMMON/MgntSendPacket.h +++ b/network/wlan/WDI/COMMON/MgntSendPacket.h @@ -5,7 +5,7 @@ VOID SendBeaconFrame( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte QueueIndex ); @@ -48,7 +48,7 @@ SendReassociateReq( PADAPTER Adapter, pu1Byte ReasocStaAddr, u2Byte ReasocCap, - u2Byte asocListenInterval, + u2Byte asocListenInterval, pu1Byte CurrentasocStaAddr ); @@ -126,11 +126,11 @@ SendEapolKeyPacket( KeyType eKeyType, // EAPOL-Key Information field: Key Type bit: type_Group or type_Pairwise. BOOLEAN bInstall, // EAPOL-Key Information field: Install Flag. BOOLEAN bKeyAck, // EAPOL-Key Information field: Key Ack bit. - BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. + BOOLEAN bKeyMIC, // EAPOL-Key Information field: Key MIC bit. If true, we will calculate EAPOL MIC and fill it into Key MIC field. BOOLEAN bSecure, // EAPOL-Key Information field: Secure bit. BOOLEAN bError, // EAPOL-Key Information field: Error bit. True for MIC failure report. BOOLEAN bRequest, // EAPOL-Key Information field: Requst bit. - + u8Byte u8bKeyReplayCounter, // EAPOL-KEY Replay Counter field. pu1Byte pKeyNonce, // EAPOL-Key Key Nonce field (32-byte). u8Byte u8bKeyRSC, // EAPOL-Key Key RSC field (8-byte). @@ -214,7 +214,7 @@ ApSendNullPacket( VOID SendEAPOLStarPacket( IN PADAPTER Adapter, - IN BOOLEAN bEncrypt + IN BOOLEAN bEncrypt ); VOID diff --git a/network/wlan/WDI/COMMON/MimoPs.c b/network/wlan/WDI/COMMON/MimoPs.c index 1d7a115ab..357125bd0 100644 --- a/network/wlan/WDI/COMMON/MimoPs.c +++ b/network/wlan/WDI/COMMON/MimoPs.c @@ -6,7 +6,7 @@ VOID SetSelfMimoPsMode( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN u1Byte NewMimoPsMode ) { @@ -59,13 +59,13 @@ OnMimoPs( RT_TRACE_F(COMP_HT, DBG_WARNING, ("[WARNING] Cannot get HT Capability IE from (Re-)Assoc Packet!\n")); return RT_STATUS_INVALID_DATA; } - MimoPs = GET_HT_CAPABILITY_ELE_MIMO_PWRSAVE(HTCapIe.Octet); + MimoPs = GET_HT_CAPABILITY_ELE_MIMO_PWRSAVE(HTCapIe.Octet); } break; } Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_USE_RA_MASK, &bUseRAMask); - + if(ACTING_AS_AP(Adapter) || pMgntInfo->mIbss) { pEntry = AsocEntry_GetEntry(pMgntInfo, pSrcAddr); @@ -79,7 +79,7 @@ OnMimoPs( pMcsFilter = MCS_FILTER_1SS; else pMcsFilter = MCS_FILTER_ALL; - + pEntry->HTInfo.HTHighestOperaRate = HTGetHighestMCSRate( Adapter, pEntry->HTInfo.McsRateSet, @@ -94,7 +94,7 @@ OnMimoPs( else { Adapter->HalFunc.UpdateHalRATRTableHandler( - Adapter, + Adapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet,pEntry); } @@ -114,7 +114,7 @@ OnMimoPs( pMcsFilter = MCS_FILTER_1SS; else pMcsFilter = MCS_FILTER_ALL; - + pMgntInfo->HTHighestOperaRate = HTGetHighestMCSRate( Adapter, pMgntInfo->dot11HTOperationalRateSet, @@ -128,7 +128,7 @@ OnMimoPs( else { Adapter->HalFunc.UpdateHalRATRTableHandler( - Adapter, + Adapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet, NULL); @@ -159,7 +159,7 @@ ConstructMimoPsFrame( Content = 1; else if(NewMimoPsMode==1) Content = 3; - else + else return; ConstructMaFrameHdr(Adapter, pAddr, ACT_CAT_HT, ACT_MIMO_PWR_SAVE, &osMimoPsFrame); @@ -192,6 +192,6 @@ SendMimoPsFrame( if(pTcb->PacketLength != 0) MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } diff --git a/network/wlan/WDI/COMMON/MimoPs.h b/network/wlan/WDI/COMMON/MimoPs.h index e75b6e94e..905b4be2a 100644 --- a/network/wlan/WDI/COMMON/MimoPs.h +++ b/network/wlan/WDI/COMMON/MimoPs.h @@ -3,7 +3,7 @@ VOID SetSelfMimoPsMode( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN u1Byte NewMimoPsMode ); diff --git a/network/wlan/WDI/COMMON/MultiChannels.h b/network/wlan/WDI/COMMON/MultiChannels.h index d00df943d..9e492c726 100644 --- a/network/wlan/WDI/COMMON/MultiChannels.h +++ b/network/wlan/WDI/COMMON/MultiChannels.h @@ -34,7 +34,7 @@ typedef enum _MULTICHANNEL_FCS_COMMON_INFO{ MULTICHANNEL_FCS_PORT_RFETYPE = 9, MULTICHANNEL_FCS_PORT_CHANNEL_TX_NULL = 10, MULTICHANNEL_FCS_PORT_C2H_REPORT = 11, - MULTICHANNEL_FCS_PORT_CHANNEL_SCAN = 12, + MULTICHANNEL_FCS_PORT_CHANNEL_SCAN = 12, MULTICHANNEL_FCS_PORT_ROLE = 13, MULTICHANNEL_FCS_COMMON_NOA_DURATION = 14, MULTICHANNEL_FCS_COMMON_NOA_STARTTIME = 15, @@ -85,7 +85,7 @@ typedef enum _FCS_FW_STATE{ FCS_FW_STOPPED = 2, }FCS_FW_STATE, *PFCS_FW_STATE; -// Represent channel switch operation mode +// Represent channel switch operation mode typedef enum _FCS_CHNL_OPMODE{ FCS_CHNL_OPMODE_NONE = 0, FCS_CHNL_OPMODE_RESET = 1, @@ -105,7 +105,7 @@ typedef enum _FCS_QPKT_LEVEL{ //============================================================================ -// Multiple Channel Supported +// Multiple Channel Supported //============================================================================ // Context for Each Port Specific @@ -114,7 +114,7 @@ typedef struct _MULTICHANNEL_PORT_CONTEXT { //================================================== // Client-Related Elements //================================================== - + // This controls the offset for this port to the HW TSF counter -- BOOLEAN bBssLocalTsfValid; s8Byte BssLocalTsfOffset; @@ -142,7 +142,7 @@ typedef struct _MULTICHANNEL_PORT_CONTEXT { u1Byte FcsDuration; u1Byte Role; u2Byte MacIdBitmap; - + } MULTICHANNEL_PORT_CONTEXT, *PMULTICHANNEL_PORT_CONTEXT; #define MULTICHANNEL_SIZE_OF_PORT_CONTEXT sizeof(MULTICHANNEL_PORT_CONTEXT) @@ -158,9 +158,9 @@ typedef struct _MULTICHANNEL_COMMON_CONTEXT { // ------------------------------------------------------- - + // HW / SW Timer Switch -------------------------------- - BOOLEAN bUseHardwareTimer; + BOOLEAN bUseHardwareTimer; // ---------------------------------------------------- @@ -172,7 +172,7 @@ typedef struct _MULTICHANNEL_COMMON_CONTEXT { PADAPTER pAdapterBeforeSwitch; // ------------------------------------------------ - // Used for HwTsf Synchronization ----------------- + // Used for HwTsf Synchronization ----------------- u1Byte TargetApBssid[6]; BOOLEAN bSyncHwTsfBeaconUpdateReceived; RT_WORK_ITEM MultiChannelSyncHwTsfWorkItem; @@ -257,7 +257,7 @@ MultiChannelSwitchChannelWorkItemCallback( VOID MultiChannelHandleChannelSwitchToCurrentPort( - PADAPTER pAdapterBeforeSwitch, + PADAPTER pAdapterBeforeSwitch, PADAPTER pCurrentPort ); @@ -290,7 +290,7 @@ MultiChannelDisableEnableExactHwQueue( VOID MultiChannelStopChannelSwitchScheduler( - PADAPTER pAdapter, + PADAPTER pAdapter, BOOLEAN bEnableSwitchOperation ); diff --git a/network/wlan/WDI/COMMON/MultiPorts.c b/network/wlan/WDI/COMMON/MultiPorts.c index dba3d6c48..42ff239d8 100644 --- a/network/wlan/WDI/COMMON/MultiPorts.c +++ b/network/wlan/WDI/COMMON/MultiPorts.c @@ -5,7 +5,7 @@ #endif //============================================================================ -// All Type Port Supported +// All Type Port Supported //============================================================================ @@ -16,7 +16,7 @@ MultiPortSetAllPortsHWReadyStatus( ) { PADAPTER pLoopAdapter = GetDefaultAdapter(pAdapter); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("MultiPortSetAllPortsHWReadyStatus(), set pAdapter->bHWInitReady=%d\n", (u4Byte)bReady)); while(pLoopAdapter != NULL) { @@ -29,7 +29,7 @@ MultiPortSetAllPortsHWReadyStatus( #if (MULTIPORT_SUPPORT == 1) //============================================================================ -// Multiple Port Supported +// Multiple Port Supported //============================================================================ // Please do not use this function outside of this module @@ -55,7 +55,7 @@ MultiPortGetPortContext( ) { if(pAdapter == NULL) return NULL; - + RT_ASSERT( sizeof(pAdapter->MultiPort) == sizeof(MULTIPORT_PORT_CONTEXT), ("MultiPort Port Context Memory Allocation Size Mismatch !") @@ -69,7 +69,7 @@ GetAdapterByListEntry( PRT_LIST_ENTRY pListEntry ) { - + u4Byte offset1 = FIELD_OFFSET(ADAPTER, MultiPort); u4Byte offset2 = FIELD_OFFSET(MULTIPORT_PORT_CONTEXT, MultiList); @@ -91,7 +91,7 @@ GetAdapterByListEntry( PADAPTER GetNextExtAdapter( PADAPTER pAdapter -) +) { // Active Extension Adapter Only ---------------------------------------------- PMULTIPORT_PORT_CONTEXT pMultiPort = MultiPortGetPortContext(pAdapter); @@ -106,11 +106,11 @@ GetNextExtAdapter( while(pExtAdapter != NULL) { pMultiPort = MultiPortGetPortContext(pExtAdapter); - + if (IsDefaultAdapter(pExtAdapter)) break; - if(pMultiPort->bActiveAdapter == TRUE) + if(pMultiPort->bActiveAdapter == TRUE) { return pExtAdapter; } @@ -118,15 +118,15 @@ GetNextExtAdapter( pListEntry = RTNextEntryList(&pMultiPort->MultiList); pExtAdapter = GetAdapterByListEntry(pListEntry); } - + return NULL; } - + PADAPTER GetFirstAPAdapter( PADAPTER pAdapter -) +) { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pAPAdapter = pDefaultAdapter; @@ -135,7 +135,7 @@ GetFirstAPAdapter( { if(ACTING_AS_AP(pAPAdapter)) break; - pAPAdapter = GetNextExtAdapter(pAPAdapter); + pAPAdapter = GetNextExtAdapter(pAPAdapter); } return pAPAdapter; @@ -148,9 +148,9 @@ GetFirstDevicePort( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pDevicePort = NULL; - + pDevicePort = pDefaultAdapter; - + while(pDevicePort != NULL) { @@ -161,7 +161,7 @@ GetFirstDevicePort( break; } #endif - + pDevicePort = GetNextExtAdapter(pDevicePort); } @@ -175,9 +175,9 @@ GetFirstGOPort( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pGOPort = NULL; - + pGOPort = pDefaultAdapter; - + while(pGOPort != NULL) { @@ -194,7 +194,7 @@ GetFirstGOPort( } } #endif - + pGOPort = GetNextExtAdapter(pGOPort); } @@ -208,9 +208,9 @@ GetFirstClientPort( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pClientPort = NULL; - + pClientPort = pDefaultAdapter; - + while(pClientPort != NULL) { @@ -221,7 +221,7 @@ GetFirstClientPort( break; } #endif - + pClientPort = GetNextExtAdapter(pClientPort); } @@ -241,7 +241,7 @@ MultiPortGetIdleExtAdapter( while(!IsDefaultAdapter(pExtAdapter)) { pMultiPort = MultiPortGetPortContext(pExtAdapter); - + if(pMultiPort->bActiveAdapter == FALSE) { return pExtAdapter; @@ -263,13 +263,13 @@ MultiPortRemoveExtAdapter( PMULTIPORT_PORT_CONTEXT pMultiPortDefault = MultiPortGetPortContext(pDefaultAdapter); PADAPTER pExtAdapter = NULL; PRT_LIST_ENTRY pListEntry = NULL; - + if(!RTIsListEmpty(&pMultiPortDefault->MultiList)) { pListEntry = RTRemoveHeadList(&pMultiPortDefault->MultiList); pExtAdapter = GetAdapterByListEntry(pListEntry); } - + return pExtAdapter; } @@ -277,7 +277,7 @@ MultiPortRemoveExtAdapter( BOOLEAN MultiPortInsertIntoTargetAdapterList( - IN PADAPTER TargetAdapter, + IN PADAPTER TargetAdapter, OUT PADAPTER TargetList[], OUT pu4Byte puCurrentTarget, IN u4Byte uMaxTarget @@ -285,7 +285,7 @@ MultiPortInsertIntoTargetAdapterList( { u4Byte i = 0; BOOLEAN bExist = FALSE; - + for(i = 0; i < *puCurrentTarget; i++) { if(TargetList[i] == TargetAdapter) @@ -311,7 +311,7 @@ MultiPortInsertIntoTargetAdapterList( } // TargetAdapter will be in TargetList[] - + return TRUE; } @@ -358,7 +358,7 @@ MultiPortGetTargetAdapterList( if(PacketGetActionFrameType(&osFrame) == ACT_PKT_GAS_INT_REQ) - {// Service Discovery Request: Only Send to Device Port + {// Service Discovery Request: Only Send to Device Port // Here should have more consideration. @@ -373,7 +373,7 @@ MultiPortGetTargetAdapterList( } } - // Win8 + // Win8 pExtAdapter = GetFirstDevicePort(pAdapter); if(pExtAdapter != NULL) @@ -385,9 +385,9 @@ MultiPortGetTargetAdapterList( } #endif - // Probe Request Filter + // Probe Request Filter if(PacketGetType(osFrame) == Type_Probe_Req) - { + { // Normal AP pExtAdapter = GetDefaultAdapter(pAdapter); while(pExtAdapter != NULL) @@ -400,7 +400,7 @@ MultiPortGetTargetAdapterList( // Workaround for NdisTest-v8150 WFD_Group_ext test due to the SUT's not cleaning the resources ---------------- // The WFD_Performance_ext test will therefore have two device ports, which is not valid. // We let it can be discovered for passing the test. - #if (P2P_SUPPORT == 1) + #if (P2P_SUPPORT == 1) if(P2P_ENABLED(GET_P2P_INFO(pExtAdapter))) { if(GET_P2P_INFO(pExtAdapter)->Role == P2P_DEVICE) @@ -415,35 +415,35 @@ MultiPortGetTargetAdapterList( } return uTargetAdapter; - } + } + + // Probe Response Filter + RT_TRACE(COMP_P2P, DBG_TRACE, ("MultiPortGetTargetAdapterList: check probrsp\n")); - // Probe Response Filter - RT_TRACE(COMP_P2P, DBG_TRACE, ("MultiPortGetTargetAdapterList: check probrsp\n")); - if(PacketGetType(osFrame) == Type_Probe_Rsp) { pExtAdapter = GetDefaultAdapter(pAdapter); - + while(pExtAdapter != NULL) { pExtMgntInfo = &(pExtAdapter->MgntInfo); if( ((pExtMgntInfo->state_Synchronization_Sta >= STATE_Act_Receive) || (pExtMgntInfo->state_Synchronization_Sta <= STATE_Act_Listen)) && - eqMacAddr(Frame_pRaddr(osFrame), pExtAdapter->CurrentAddress) + eqMacAddr(Frame_pRaddr(osFrame), pExtAdapter->CurrentAddress) ) { RT_TRACE(COMP_P2P, DBG_TRACE, ("MultiPortGetTargetAdapterList listen state: port number %d\n", pExtAdapter->pNdis62Common->PortNumber)); MultiPortInsertIntoTargetAdapterList(pExtAdapter, TargetList, &uTargetAdapter, uMaxTarget); bMatch = TRUE; - } + } pExtAdapter = GetNextExtAdapter(pExtAdapter); } - + } if(bMatch) - return uTargetAdapter; + return uTargetAdapter; if(PacketGetType(osFrame) == Type_Beacon) { @@ -457,7 +457,7 @@ MultiPortGetTargetAdapterList( (pExtMgntInfo->state_Synchronization_Sta <= STATE_Act_Listen) ) MultiPortInsertIntoTargetAdapterList(pExtAdapter, TargetList, &uTargetAdapter, uMaxTarget); - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } return uTargetAdapter; @@ -465,7 +465,7 @@ MultiPortGetTargetAdapterList( bMatch = FALSE; // BSSID Filter - RT_PRINT_ADDR(COMP_P2P, DBG_TRACE, "MultiPortGetTargetAdapterList(): receive Bss BSSID:", Frame_pBssid(osFrame)); + RT_PRINT_ADDR(COMP_P2P, DBG_TRACE, "MultiPortGetTargetAdapterList(): receive Bss BSSID:", Frame_pBssid(osFrame)); pExtAdapter = GetDefaultAdapter(pAdapter); while(pExtAdapter != NULL) { @@ -473,19 +473,19 @@ MultiPortGetTargetAdapterList( RT_TRACE(COMP_P2P, DBG_TRACE, ("MultiPortGetTargetAdapterList: port number %d\n", pExtAdapter->pNdis62Common->PortNumber)); if(eqMacAddr(Frame_pBssid(osFrame), pExtAdapter->MgntInfo.Bssid)) - { - RT_TRACE(COMP_P2P, DBG_TRACE, ("MultiPortGetTargetAdapterList eqMacAddr: port number %d\n", pExtAdapter->pNdis62Common->PortNumber)); + { + RT_TRACE(COMP_P2P, DBG_TRACE, ("MultiPortGetTargetAdapterList eqMacAddr: port number %d\n", pExtAdapter->pNdis62Common->PortNumber)); MultiPortInsertIntoTargetAdapterList(pExtAdapter, TargetList, &uTargetAdapter, uMaxTarget); bMatch = TRUE; } - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } if(bMatch) return uTargetAdapter; - // Broadcast Packet Filter + // Broadcast Packet Filter pExtAdapter = GetDefaultAdapter(pAdapter); while(pExtAdapter != NULL) { @@ -512,11 +512,11 @@ MultiPortFeedPacketToMultipleAdapter( PRT_RFD pExtRfd = NULL; u4Byte i = 0; RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + // Assertion Check Variable u4Byte uCurrentCloneRFDs; - - // Target List + + // Target List u4Byte uTargetAdapter = 0; PADAPTER TargetList[10]; @@ -548,7 +548,7 @@ MultiPortFeedPacketToMultipleAdapter( // Get the target adapter list ----------------------------------------------------------------------------- uTargetAdapter = MultiPortGetTargetAdapterList(pAdapter, pRfd, frame, TargetList, sizeof(TargetList) / sizeof(PADAPTER)); //RT_TRACE(COMP_INIT, DBG_TRACE, ("%s: uTargetAdapter: %d \n", __FUNCTION__, uTargetAdapter)); - + if(uTargetAdapter == 0) { // Free the original RFD since the RFD is not necessary @@ -571,7 +571,7 @@ MultiPortFeedPacketToMultipleAdapter( PlatformAcquireSpinLock(pDefaultAdapter, RT_RFD_SPINLOCK); if(RTIsListEmpty(&pMultiPortCommon->CloneRfdIdleQueue)) - { + { PlatformReleaseSpinLock(pDefaultAdapter, RT_RFD_SPINLOCK); RT_TRACE(COMP_INIT, DBG_SERIOUS, ("%s: No enough Clone RFD!\n", __FUNCTION__)); break; @@ -579,26 +579,26 @@ MultiPortFeedPacketToMultipleAdapter( // Acquire an idle Clone RFD and initialize the Clone RFD ----------------------------------------- pExtRfd = (PRT_RFD) RTRemoveHeadListWithCnt( - &pMultiPortCommon->CloneRfdIdleQueue, + &pMultiPortCommon->CloneRfdIdleQueue, &pMultiPortCommon->uCloneRfdIdleQueueSize ); // + Clone the original information PlatformZeroMemory(pExtRfd, sizeof(RT_RFD)); - PlatformMoveMemory(pExtRfd, pRfd, sizeof(RT_RFD)); + PlatformMoveMemory(pExtRfd, pRfd, sizeof(RT_RFD)); - // + Record the needed memory length + // + Record the needed memory length pExtRfd->mbCloneRfdDataBuffer.Length = pRfd->Buffer.Length; // + Allocate the memory based on the needed memory length above rtStatus = DrvIFAssociateRFD(pDefaultAdapter, pExtRfd); - + if(rtStatus != RT_STATUS_SUCCESS) { // Return the CloneRFD resource RTInsertTailListWithCnt( - &pMultiPortCommon->CloneRfdIdleQueue, - &pExtRfd->List, + &pMultiPortCommon->CloneRfdIdleQueue, + &pExtRfd->List, &pMultiPortCommon->uCloneRfdIdleQueueSize ); PlatformReleaseSpinLock(pDefaultAdapter, RT_RFD_SPINLOCK); @@ -632,7 +632,7 @@ MultiPortFeedPacketToMultipleAdapter( // + Move data PlatformMoveMemory( pExtRfd->Buffer.VirtualAddress, - pRfd->Buffer.VirtualAddress - pAdapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd), + pRfd->Buffer.VirtualAddress - pAdapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd), (pRfd->PacketLength + pAdapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd))>pAdapter->MAX_RECEIVE_BUFFER_SIZE? pAdapter->MAX_RECEIVE_BUFFER_SIZE:(pRfd->PacketLength + pAdapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd)) ); @@ -642,8 +642,8 @@ MultiPortFeedPacketToMultipleAdapter( // Insert into busy Clone RFD queue RTInsertHeadListWithCnt( - &pMultiPortCommon->CloneRfdBusyQueue, - &pExtRfd->List, + &pMultiPortCommon->CloneRfdBusyQueue, + &pExtRfd->List, &pMultiPortCommon->uCloneRfdBusyQueueSize ); @@ -668,11 +668,11 @@ MultiPortReturnCloneRFD( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pDefaultAdapter); - + if(IsCloneRFD(pDefaultAdapter, pRfd)) { RT_ASSERT(pRfd->bFeedPacketToSingleAdapter == TRUE, ("Error: Clone RFD may be returned again!\n")); - + // Return the Multiport Clone RFDs ------------------------------------------- if(pRfd->bFeedPacketToSingleAdapter) { @@ -682,18 +682,18 @@ MultiPortReturnCloneRFD( // Return the data buffer RT_ASSERT(pRfd->mbCloneRfdDataBuffer.Buffer != NULL, ("Multiport Clone RFD should have a data buffer!\n")); DrvIFDisassociateRFD(pDefaultAdapter, pRfd); - + PlatformAcquireSpinLock(pDefaultAdapter, RT_RFD_SPINLOCK); // Remove the RFD from Busy Queue RTRemoveEntryListWithCnt( - &pRfd->List, + &pRfd->List, &pMultiPortCommon->uCloneRfdBusyQueueSize ); // Return the RFD to the Idle Queue RTInsertTailListWithCnt( - &pMultiPortCommon->CloneRfdIdleQueue, - &pRfd->List, + &pMultiPortCommon->CloneRfdIdleQueue, + &pRfd->List, &pMultiPortCommon->uCloneRfdIdleQueueSize ); PlatformReleaseSpinLock(pDefaultAdapter, RT_RFD_SPINLOCK); @@ -713,7 +713,7 @@ IsMultiPortAllowDisableHWSecurity( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo);; while(pAdapter != NULL) - { + { if(!pMgntInfo->SecurityInfo.SWTxEncryptFlag || !pMgntInfo->SecurityInfo.SWRxDecryptFlag) return FALSE; @@ -756,7 +756,7 @@ IsAPModeExist( pAdapter = GetNextExtAdapter(pAdapter); } - + return FALSE; } @@ -766,14 +766,14 @@ IsExtAPModeExist( ) { PADAPTER pAdapter = GetFirstExtAdapter(Adapter); - + while(pAdapter != NULL) { if(ACTING_AS_AP(pAdapter)) return TRUE; pAdapter = GetNextExtAdapter(pAdapter); } - + return FALSE; } @@ -786,7 +786,7 @@ IsDevicePortDiscoverable( PADAPTER pDevicePort = GetFirstDevicePort(pAdapter); PP2P_INFO pDeviceP2PInfo = NULL; - + if(pDevicePort) { pDeviceP2PInfo = GET_P2P_INFO(pDevicePort); @@ -808,7 +808,7 @@ IsCloneRFD( PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pAdapter); PRT_RFD pRfdStart = (PRT_RFD) pMultiPortCommon->CloneRfdMemoryBuffer.Buffer; u4Byte IndexMax = pMultiPortCommon->uNumberOfCloneRfds; - + if(pRfd >= pRfdStart && pRfd <= pRfdStart + IndexMax - 1) { return TRUE; @@ -831,7 +831,7 @@ MultiPortDumpPortStatus( RT_TRACE(COMP_MLME, DBG_LOUD, ("PORT_NUMBER: %d\n", portNumber)); RT_TRACE(COMP_MLME, DBG_LOUD, ("pAdapter: %p\n", pAdapter)); - RT_TRACE(COMP_MLME, DBG_LOUD, (", MP_PORT_TYPE: %s\n", + RT_TRACE(COMP_MLME, DBG_LOUD, (", MP_PORT_TYPE: %s\n", (portType == HELPER_PORT) ? "HELPER_PORT" : (portType == EXTSTA_PORT) ? "EXTSTA_PORT" : (portType == EXTAP_PORT) ? "EXTAP_PORT" : @@ -844,27 +844,27 @@ MultiPortDumpPortStatus( if(pMgntInfo->pP2PInfo) { PP2P_INFO pP2PInfo = (PP2P_INFO)(pMgntInfo->pP2PInfo); - + RT_TRACE(COMP_P2P, DBG_LOUD, (", P2PSupport Type: %d\n", pTargetAdapter->P2PSupport)); - - RT_TRACE(COMP_P2P, DBG_LOUD, (", P2P_ROLE: %s\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, (", P2P_ROLE: %s\n", (pP2PInfo->Role == P2P_NONE) ? "P2P_NONE" : (pP2PInfo->Role == P2P_DEVICE) ? "P2P_DEVICE" : (pP2PInfo->Role == P2P_CLIENT) ? "P2P_CLIENT" : - (pP2PInfo->Role == P2P_GO) ? "P2P_GO" : + (pP2PInfo->Role == P2P_GO) ? "P2P_GO" : "ERROR" )); - RT_TRACE(COMP_P2P, DBG_LOUD, (", P2P_STATE: %d\n", + RT_TRACE(COMP_P2P, DBG_LOUD, (", P2P_STATE: %d\n", pP2PInfo->State )); - + P2PSvc_Dump(pTargetAdapter); } #endif - RT_TRACE(COMP_MLME, DBG_LOUD, (", MP_PORT_OP_STATE: %s \n", + RT_TRACE(COMP_MLME, DBG_LOUD, (", MP_PORT_OP_STATE: %s \n", (portState == INIT_STATE) ? "INIT_STATE" : - (portState == OP_STATE) ? "OP_STATE" : + (portState == OP_STATE) ? "OP_STATE" : "ERROR" )); @@ -879,18 +879,18 @@ MultiPortAllocateCloneRfdBuffer( { RT_STATUS rtStatus = RT_STATUS_FAILURE; u4Byte MaxLen=pRfd->mbCloneRfdDataBuffer.Length; - + // Correctness Checking -------------------------------------- RT_ASSERT( - pRfd->mbCloneRfdDataBuffer.Length != 0 && - pRfd->mbCloneRfdDataBuffer.Buffer == NULL, + pRfd->mbCloneRfdDataBuffer.Length != 0 && + pRfd->mbCloneRfdDataBuffer.Buffer == NULL, ("DrvIFAssociateRFD: Wrong Parameters Observed!\n") ); // Get the non-shared memory --------------------------------- rtStatus = PlatformAllocateMemory( - pAdapter, - (PVOID*)&(pRfd->mbCloneRfdDataBuffer.Buffer), + pAdapter, + (PVOID*)&(pRfd->mbCloneRfdDataBuffer.Buffer), MaxLen ); @@ -906,19 +906,19 @@ MultiPortReleaseCloneRfdBuffer( // Correctness Checking -------------------------------------- RT_ASSERT( - pRfd->mbCloneRfdDataBuffer.Length != 0 && - pRfd->mbCloneRfdDataBuffer.Buffer != NULL, + pRfd->mbCloneRfdDataBuffer.Length != 0 && + pRfd->mbCloneRfdDataBuffer.Buffer != NULL, ("DrvIFDisassociateRFD: Wrong Parameters Observed!\n") ); RT_ASSERT( - pRfd->bFeedPacketToSingleAdapter == FALSE, + pRfd->bFeedPacketToSingleAdapter == FALSE, ("Error: Clone RFD in use should not be returned!\n") ); // Free the non-shared memory -------------------------------- PlatformFreeMemory( - pRfd->mbCloneRfdDataBuffer.Buffer, + pRfd->mbCloneRfdDataBuffer.Buffer, pRfd->mbCloneRfdDataBuffer.Length ); } @@ -929,11 +929,11 @@ MultiPortInitializeCloneRfdQueue( ) { PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pAdapter); - + PlatformAcquireSpinLock(pAdapter, RT_RFD_SPINLOCK); pMultiPortCommon->uCloneRfdIdleQueueSize = 0; RTInitializeListHead(&pMultiPortCommon->CloneRfdIdleQueue); - + pMultiPortCommon->uCloneRfdBusyQueueSize = 0; RTInitializeListHead(&pMultiPortCommon->CloneRfdBusyQueue); PlatformReleaseSpinLock(pAdapter, RT_RFD_SPINLOCK); @@ -948,7 +948,7 @@ MultiPortPrepareCloneRfd( PRT_RFD pRfd = NULL; u4Byte i = 0; PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pAdapter); - + const u4Byte SIZE_OF_CLONE_RFD_QUEUE = 256; do @@ -956,7 +956,7 @@ MultiPortPrepareCloneRfd( // Allocate memory for the Multiport Clone RFD ------------------------------------------------- pMultiPortCommon->CloneRfdMemoryBuffer.Length = SIZE_OF_CLONE_RFD_QUEUE * sizeof(RT_RFD); - rtStatus = PlatformAllocateMemory(pAdapter, + rtStatus = PlatformAllocateMemory(pAdapter, &pMultiPortCommon->CloneRfdMemoryBuffer.Buffer, pMultiPortCommon->CloneRfdMemoryBuffer.Length ); @@ -972,17 +972,17 @@ MultiPortPrepareCloneRfd( pMultiPortCommon->uNumberOfCloneRfds = SIZE_OF_CLONE_RFD_QUEUE; PlatformZeroMemory( - pMultiPortCommon->CloneRfdMemoryBuffer.Buffer, + pMultiPortCommon->CloneRfdMemoryBuffer.Buffer, pMultiPortCommon->CloneRfdMemoryBuffer.Length ); PlatformAcquireSpinLock(pAdapter,RT_RFD_SPINLOCK); pRfd = (PRT_RFD) pMultiPortCommon->CloneRfdMemoryBuffer.Buffer; - + for(i = 0; i < pMultiPortCommon->uNumberOfCloneRfds; i++) { RTInsertTailListWithCnt( - &pMultiPortCommon->CloneRfdIdleQueue, - &pRfd[i].List, + &pMultiPortCommon->CloneRfdIdleQueue, + &pRfd[i].List, &pMultiPortCommon->uCloneRfdIdleQueueSize ); } @@ -1007,7 +1007,7 @@ MultiPortFreeCloneRfd( RT_TRACE(COMP_INIT, DBG_LOUD, ("Clone RFD Allocated: %d\n", pMultiPortCommon->uNumberOfCloneRfds)); RT_TRACE(COMP_INIT, DBG_LOUD, ("Clone RFD Freed: %d\n", pMultiPortCommon->uCloneRfdIdleQueueSize)); RT_ASSERT(pMultiPortCommon->uCloneRfdBusyQueueSize == 0, ("No Busy Clone RFD when in free status !!")); - RT_ASSERT(pMultiPortCommon->uNumberOfCloneRfds ==pMultiPortCommon->uCloneRfdIdleQueueSize, ("Freed RFD less than allocated!!\n")); + RT_ASSERT(pMultiPortCommon->uNumberOfCloneRfds ==pMultiPortCommon->uCloneRfdIdleQueueSize, ("Freed RFD less than allocated!!\n")); RT_TRACE(COMP_INIT, DBG_LOUD, ("====================================\n\n")); @@ -1019,7 +1019,7 @@ MultiPortFreeCloneRfd( PlatformReleaseSpinLock(pAdapter, RT_RFD_SPINLOCK); PlatformFreeMemory( - pMultiPortCommon->CloneRfdMemoryBuffer.Buffer, + pMultiPortCommon->CloneRfdMemoryBuffer.Buffer, pMultiPortCommon->CloneRfdMemoryBuffer.Length ); } @@ -1033,7 +1033,7 @@ MultiPortInitializeContext( PMULTIPORT_PORT_CONTEXT pMultiPortDefault = MultiPortGetPortContext(pDefaultAdapter); pMultiPortCommon->uNumberOfActiveExtAdapters = 0; - + RTInitializeListHead(&pMultiPortDefault->MultiList); pMultiPortDefault->bActiveAdapter = TRUE; pMultiPortDefault->pAdapter = pDefaultAdapter; @@ -1082,7 +1082,7 @@ MultiPortCanCheckCheckBssid( { break; } - + if(GetFirstClientPort(pAdapter)) { bCanCheckBssid = FALSE; @@ -1102,7 +1102,7 @@ MultiPortCanCheckCheckBssid( break; } }while(FALSE); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bCanCheckBssid: %d\n", bCanCheckBssid)); @@ -1125,7 +1125,7 @@ MultiPortInsertIdleExtAdapter( // + MultiPort Insert the Adapter into the Adapter Queue RTInsertTailList( - &pMultiPortDefault->MultiList, + &pMultiPortDefault->MultiList, &pMultiPort->MultiList ); } @@ -1138,8 +1138,8 @@ MultiPortChangeExtAdapterActiveState( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pDefaultAdapter); - PMULTIPORT_PORT_CONTEXT pMultiPort = MultiPortGetPortContext(pAdapter); - + PMULTIPORT_PORT_CONTEXT pMultiPort = MultiPortGetPortContext(pAdapter); + RT_ASSERT(pMultiPort->bActiveAdapter != bActive, ("Same state changing is illegal !")); pMultiPort->bActiveAdapter = bActive; @@ -1159,7 +1159,7 @@ MultiPortGetNumberOfActiveExtAdapters( PADAPTER pAdapter ) { - PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pAdapter); + PMULTIPORT_COMMON_CONTEXT pMultiPortCommon = MultiPortGetCommonContext(pAdapter); return pMultiPortCommon->uNumberOfActiveExtAdapters; } @@ -1170,7 +1170,7 @@ MultiPortIsPreallocatedExtAdapterExist( ) { PMULTIPORT_PORT_CONTEXT pMultiPortDefault = MultiPortGetPortContext(pDefaultAdapter); - + return (!RTIsListEmpty(&pMultiPortDefault->MultiList)); } @@ -1208,16 +1208,16 @@ MultiportGetLastConnectionActionTime( { if(pLoopAdapter->LastConnectionActionTime > tmpConnectionActionTime) tmpConnectionActionTime = pLoopAdapter->LastConnectionActionTime; - + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } return tmpConnectionActionTime; } -#else +#else //============================================================================ -// Single Port Supported +// Single Port Supported //============================================================================ VOID diff --git a/network/wlan/WDI/COMMON/MultiPorts.h b/network/wlan/WDI/COMMON/MultiPorts.h index c249bf338..c9c0a34c3 100644 --- a/network/wlan/WDI/COMMON/MultiPorts.h +++ b/network/wlan/WDI/COMMON/MultiPorts.h @@ -4,7 +4,7 @@ //============================================================================ -// All Type Port Supported +// All Type Port Supported //============================================================================ #define GetDefaultAdapter(_Adapter) ((_Adapter)->pPortCommonInfo->pDefaultAdapter) @@ -22,12 +22,12 @@ MultiPortSetAllPortsHWReadyStatus( #if (MULTIPORT_SUPPORT == 1) //============================================================================ -// Multiple Port Supported +// Multiple Port Supported //============================================================================ #define GetFirstExtAdapter(_Adapter) GetNextExtAdapter(GetDefaultAdapter(_Adapter)) #define IsFirstGoAdapter(_Adapter) (_Adapter==GetFirstGOPort(_Adapter)) - + typedef struct _MULTIPORT_COMMON_CONTEXT { // Only for active extension adapters @@ -36,10 +36,10 @@ typedef struct _MULTIPORT_COMMON_CONTEXT { // For default port only: The RFDs will be used to clone the input RFDs (no physical shared memory allocated). MEMORY_BUFFER CloneRfdMemoryBuffer; // The memory for the allocated RFD structures u4Byte uNumberOfCloneRfds; // The total number of Clone RFDs - + RT_LIST_ENTRY CloneRfdIdleQueue; u4Byte uCloneRfdIdleQueueSize; - + RT_LIST_ENTRY CloneRfdBusyQueue; u4Byte uCloneRfdBusyQueueSize; @@ -123,7 +123,7 @@ MultiPortRemoveExtAdapter( BOOLEAN MultiPortInsertIntoTargetAdapterList( - IN PADAPTER TargetAdapter, + IN PADAPTER TargetAdapter, OUT PADAPTER TargetList[], OUT pu4Byte puCurrentTarget, IN u4Byte uMaxTarget @@ -228,10 +228,10 @@ MultiportGetLastConnectionActionTime( IN PADAPTER pAdapter ); -#else +#else //============================================================================ -// Single Port Supported +// Single Port Supported //============================================================================ #define IsActiveAPModeExist(_Adapter) AP_DetermineAlive(_Adapter) @@ -252,7 +252,7 @@ MultiportGetLastConnectionActionTime( #define MultiPortReleaseCloneRfdBuffer(_pRfd) #define MultiPortReturnCloneRFD(_pAdapter, _pRfd) #define MultiPortRemoveExtAdapter(_pAdapter) NULL -#define MultiPortInitializeContext(_pAdapter) +#define MultiPortInitializeContext(_pAdapter) #define MultiPortCanCheckCheckBssid(_pAdapter) TRUE #define MultiPortIsPreallocatedExtAdapterExist(_Adapter) FALSE #define MultiPortInsertIdleExtAdapter(_pDefaultAdapter, _pAdapter) diff --git a/network/wlan/WDI/COMMON/OffChnlTx.h b/network/wlan/WDI/COMMON/OffChnlTx.h index bb673183d..495e23bd3 100644 --- a/network/wlan/WDI/COMMON/OffChnlTx.h +++ b/network/wlan/WDI/COMMON/OffChnlTx.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_OFF_CHNL_TX_H diff --git a/network/wlan/WDI/COMMON/P2P.c b/network/wlan/WDI/COMMON/P2P.c index 02e5b01ed..5379844bd 100644 --- a/network/wlan/WDI/COMMON/P2P.c +++ b/network/wlan/WDI/COMMON/P2P.c @@ -19,7 +19,7 @@ u8Byte RTL_P2P_FreeMemory_Len; static u1Byte BroadcastAddress[6]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; -static u1Byte P2PSocialChannels[] = +static u1Byte P2PSocialChannels[] = { 1, 6, @@ -38,7 +38,7 @@ P2PAdapterAcceptActionFrame( PADAPTER pAdapter, OCTET_STRING osPacket ) -{ +{ BOOLEAN bReturnValue = FALSE; ACT_PKT_TYPE pktType = PacketGetActionFrameType(&osPacket); @@ -70,7 +70,7 @@ P2PAdapterAcceptMgntFrame( ) { // Accept all management frames - + BOOLEAN bStatus = FALSE; switch(P2P_FRAME_GET_TYPE(osPacket.Octet)) @@ -99,7 +99,7 @@ P2PAdapterAcceptFrame( { BOOLEAN bStatus = FALSE; - if(IsMgntAction(osPacket.Octet)) + if(IsMgntAction(osPacket.Octet)) { bStatus = P2PAdapterAcceptActionFrame(pAdapter, osPacket); } @@ -124,7 +124,7 @@ P2PMemoryBufferFree( RTL_P2P_FreeMemory_count++; RTL_P2P_FreeMemory_Len += pMemoryBuffer->Length; } - + PlatformZeroMemory(pMemoryBuffer, sizeof(MEMORY_BUFFER)); pMemoryBuffer->Length = 0; } @@ -158,7 +158,7 @@ P2PMemoryBufferClone( else { rtStatus = PlatformAllocateMemory( - pP2PInfo->pAdapter, + pP2PInfo->pAdapter, &pDestination->Buffer, pSource->Length ); @@ -166,19 +166,19 @@ P2PMemoryBufferClone( if(rtStatus == RT_STATUS_SUCCESS) { pDestination->Length = pSource->Length; - + PlatformMoveMemory( - pDestination->Buffer, - pSource->Buffer, + pDestination->Buffer, + pSource->Buffer, pDestination->Length ); - + bStatus = TRUE; RTL_P2P_AllocateMemory_count ++; RTL_P2P_AllocateMemory_Len += pSource->Length; } - else + else { PlatformZeroMemory(pDestination, sizeof(MEMORY_BUFFER)); pDestination->Length = 0; @@ -211,7 +211,7 @@ P2PMemoryBufferCopy( CopyMem(pDestination->Buffer, pSource->Buffer, pSource->Length); bStatus = TRUE; } - } + } return bStatus; } @@ -231,7 +231,7 @@ P2PDeviceListDump( RT_TRACE(COMP_P2P, DBG_LOUD, ("=======================================================\n")); RT_TRACE(COMP_P2P, DBG_LOUD, ("DeviceList: Entry(%u)\n", i)); RT_TRACE(COMP_P2P, DBG_LOUD, ("=======================================================\n")); - + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "MacAddress: ", pDeviceList->DeviceEntry[i].MacAddress); if(pDeviceList->DeviceEntry[i].DeviceAddress != NULL) RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "DeviceAddress: ", pDeviceList->DeviceEntry[i].DeviceAddress); @@ -239,13 +239,13 @@ P2PDeviceListDump( RT_TRACE(COMP_P2P, DBG_LOUD, ("RecvSignalPower: %d\n", pDeviceList->DeviceEntry[i].RecvSignalPower)); RT_TRACE(COMP_P2P, DBG_LOUD, ("SignalStrength: %d\n", pDeviceList->DeviceEntry[i].SignalStrength)); - RT_TRACE(COMP_P2P, DBG_LOUD, ("ProbeResponseHostTimestamp: 0x%08X%08X\n", - (u4Byte)(pDeviceList->DeviceEntry[i].ProbeResponseHostTimestamp >> 32), + RT_TRACE(COMP_P2P, DBG_LOUD, ("ProbeResponseHostTimestamp: 0x%08X%08X\n", + (u4Byte)(pDeviceList->DeviceEntry[i].ProbeResponseHostTimestamp >> 32), (u4Byte) pDeviceList->DeviceEntry[i].ProbeResponseHostTimestamp) ); - RT_TRACE(COMP_P2P, DBG_LOUD, ("BeaconHostTimestamp: 0x%08X%08X\n", - (u4Byte)(pDeviceList->DeviceEntry[i].BeaconHostTimestamp >> 32), + RT_TRACE(COMP_P2P, DBG_LOUD, ("BeaconHostTimestamp: 0x%08X%08X\n", + (u4Byte)(pDeviceList->DeviceEntry[i].BeaconHostTimestamp >> 32), (u4Byte) pDeviceList->DeviceEntry[i].BeaconHostTimestamp) ); } @@ -274,7 +274,7 @@ P2PIndicateFakeInvitRsp( { return FALSE; } - + if(NULL == (pGenBuf = GetGenTempBuffer(pAdapter, GEN_TEMP_BUFFER_SIZE))) { RT_TRACE_F(COMP_WFD, DBG_SERIOUS, ("[ERROR] Memory allocation failed!\n")); @@ -301,10 +301,10 @@ P2PIndicateFakeInvitRsp( PacketMakeElement(&fbuf.os, EID_Vendor, osWFDIE); } - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_INVITATION_RESPONSE, - RT_STATUS_SUCCESS, - fbuf.os.Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_INVITATION_RESPONSE, + RT_STATUS_SUCCESS, + fbuf.os.Octet, fbuf.os.Length); ReturnGenTempBuffer(pAdapter, pGenBuf); @@ -335,7 +335,7 @@ P2PDeviceListFind( ) { u4Byte i = 0; - + for(i = 0; i < pDeviceList->uNumberOfDevices; i++) { if(eqMacAddr(pDeviceList->DeviceEntry[i].MacAddress, pMacAddress)) @@ -343,7 +343,7 @@ P2PDeviceListFind( return &pDeviceList->DeviceEntry[i]; } } - + return NULL; } @@ -361,15 +361,15 @@ P2PDeviceListInsertTail( BOOLEAN bStatus = FALSE; u1Byte index = pDeviceList->uNumberOfDevices; pu1Byte header = (pu1Byte) mbPacket.Buffer; - + if(index < P2P_MAX_DEVICE_LIST) { cpMacAddr(pDeviceList->DeviceEntry[index].MacAddress, pMacAddress); - + if(pDeviceAddress) cpMacAddr(pDeviceList->DeviceEntry[index].DeviceAddress, pDeviceAddress); - + pDeviceList->DeviceEntry[index].ChannelNumber= P2PGetChannel(pP2PInfo); - + pDeviceList->DeviceEntry[index].RecvSignalPower = pRfd->Status.RecvSignalPower; pDeviceList->DeviceEntry[index].SignalStrength= pRfd->Status.SignalStrength; @@ -389,17 +389,17 @@ P2PDeviceListInsertTail( RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Wrong Mgnt Packet Type \n", __FUNCTION__)); return FALSE; } - + if(bStatus) { pDeviceList->uNumberOfDevices++; } - else + else { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Memory Clone Failure!\n", __FUNCTION__)); } } - else + else { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Size Limit Reached!\n", __FUNCTION__)); } @@ -407,7 +407,7 @@ P2PDeviceListInsertTail( return bStatus; } -static BOOLEAN +static BOOLEAN P2PGetWpsSelectedRegistrar( OCTET_STRING osWpsIE ) @@ -415,7 +415,7 @@ P2PGetWpsSelectedRegistrar( u1Byte WPS_OUI[] = {0x00, 0x50, 0xF2, 0x04}; u4Byte offset = 0; u1Byte SelectedRegistrarID[] = {0x10, 0x41}; - + if(!eqNByte(osWpsIE.Octet, WPS_OUI, sizeof(WPS_OUI))) { RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "Not a valid good WPS IE!\n", osWpsIE.Octet, osWpsIE.Length); @@ -432,7 +432,7 @@ P2PGetWpsSelectedRegistrar( RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Found: WpsSelectedRegistrar: %d\n", __FUNCTION__, osWpsIE.Octet[offset + 4])); return (BOOLEAN)(osWpsIE.Octet[offset + 4]); } - + // Length 2 Bytes and ID 2 Bytes offset += 4 + P2P_WPS_ATTR_READ_EF_2_BYTE(osWpsIE.Octet + offset + 2); } @@ -444,7 +444,7 @@ static VOID P2PDeviceListUpdate ( IN PP2P_INFO pP2PInfo, OUT PP2P_DEVICE_LIST pDeviceList, - IN PRT_RFD pRfd, + IN PRT_RFD pRfd, IN pu1Byte pMacAddress, IN pu1Byte pDeviceAddress, IN MEMORY_BUFFER mbPacket @@ -455,11 +455,11 @@ P2PDeviceListUpdate ( MEMORY_BUFFER mbObject = {NULL, 0}; pu1Byte header = (pu1Byte) mbPacket.Buffer; - + #if 0 // Debug MAC Address Filter { #define MAX_MAX_FILTER 10 - + u1Byte Macfilter[MAX_MAX_FILTER][6] = { {0x00, 0xe0, 0x4c, 0x78, 0x01, 0x1c}, {0x00, 0xe0, 0x4c, 0x78, 0x00, 0x02}, @@ -469,7 +469,7 @@ P2PDeviceListUpdate ( BOOLEAN update = TRUE; u1Byte i = 0; - + for(i = 0; i < MAX_MAX_FILTER; i++) { if(eqMacAddr(pMacAddress, Macfilter[i])) @@ -487,7 +487,7 @@ P2PDeviceListUpdate ( OCTET_STRING osPacket = {mbPacket.Buffer, (u2Byte) mbPacket.Length}; OCTET_STRING osSsid = {NULL, 0}; OCTET_STRING osWpsIE = {NULL, 0}; - + osSsid = PacketGetElement(osPacket, EID_SsId, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(CompareSSID(pP2PInfo->GroupTargetSSID, (u2Byte) pP2PInfo->uGroupTargetSSIDLength, osSsid.Octet, osSsid.Length)) @@ -515,7 +515,7 @@ P2PDeviceListUpdate ( if(pListEntry == NULL) { bStatus = P2PDeviceListInsertTail(pP2PInfo, pDeviceList, pRfd, pMacAddress, pDeviceAddress, mbPacket); - + if(bStatus == FALSE) { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Insert Tail Failure!\n", __FUNCTION__)); @@ -525,7 +525,7 @@ P2PDeviceListUpdate ( { // Fill the list entry structure if(pDeviceAddress) cpMacAddr(pListEntry->DeviceAddress, pDeviceAddress); - + {// Query for the Correct Channel Information OCTET_STRING osPacket = {mbPacket.Buffer, (u2Byte) mbPacket.Length}; @@ -542,7 +542,7 @@ P2PDeviceListUpdate ( } } - + pListEntry->RecvSignalPower = pRfd->Status.RecvSignalPower; pListEntry->SignalStrength= pRfd->Status.SignalStrength; @@ -561,7 +561,7 @@ P2PDeviceListUpdate ( P2PMemoryBufferFree(&pListEntry->ProbeResponsePacket); pListEntry->ProbeResponsePacket = mbObject; } - else + else { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Memory Clone Failure!\n", __FUNCTION__)); } @@ -582,7 +582,7 @@ P2PDeviceListUpdate ( P2PMemoryBufferFree(&pListEntry->BeaconPacket); pListEntry->BeaconPacket= mbObject; } - else + else { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Memory Clone Failure!\n", __FUNCTION__)); } @@ -602,43 +602,43 @@ P2PDeviceListCopyWithTimeStamp( IN PP2P_DEVICE_LIST pSource ) { - u4Byte i = 0; //source + u4Byte i = 0; //source u4Byte j = 0; //destination u4Byte usTimeoutLimit = 3 * 60 * 1000 * 1000; // 3 minutes - + BOOLEAN bBeaconStatus = FALSE; BOOLEAN bProbeResponseStatus = FALSE; - + MEMORY_BUFFER mbBeacon = {NULL, 0}; MEMORY_BUFFER mbProbeResponse = {NULL, 0}; - + u8Byte usCurrentTime = PlatformGetCurrentTime(); u8Byte usMaxHostTimestamp = 0; - + P2PDeviceListClear(pDestination); pDestination->uNumberOfDevices = 0; for(i = 0; i < pSource->uNumberOfDevices; i++) - { + { // Remove the stale device item ---------------------------------------------------------- // + Find MAX usMaxHostTimestamp = MAX( - pSource->DeviceEntry[i].BeaconHostTimestamp, + pSource->DeviceEntry[i].BeaconHostTimestamp, pSource->DeviceEntry[i].ProbeResponseHostTimestamp ); // + Check the timestamp - if(usCurrentTime - usMaxHostTimestamp > usTimeoutLimit) + if(usCurrentTime - usMaxHostTimestamp > usTimeoutLimit) { //RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: usCurrentTime: %lld\n", __FUNCTION__, usCurrentTime)); //RT_TRACE(COMP_P2P, DBG_LOUD, ("usMaxHostTimestamp: %lld\n", usMaxHostTimestamp)); - //RT_TRACE(COMP_P2P, DBG_LOUD, ("usCurrentTime - usMaxHostTimestamp: %lld, usTimeoutLimit: %d\n", + //RT_TRACE(COMP_P2P, DBG_LOUD, ("usCurrentTime - usMaxHostTimestamp: %lld, usTimeoutLimit: %d\n", // usCurrentTime - usMaxHostTimestamp, usTimeoutLimit) // ); - + continue; } // ----------------------------------------------------------------------------------- @@ -650,7 +650,7 @@ P2PDeviceListCopyWithTimeStamp( // Beacon Packet PlatformZeroMemory( - &pDestination->DeviceEntry[j].BeaconPacket, + &pDestination->DeviceEntry[j].BeaconPacket, sizeof(MEMORY_BUFFER) ); @@ -660,13 +660,13 @@ P2PDeviceListCopyWithTimeStamp( // Probe Response Packet PlatformZeroMemory( - &pDestination->DeviceEntry[j].ProbeResponsePacket, + &pDestination->DeviceEntry[j].ProbeResponsePacket, sizeof(MEMORY_BUFFER) ); PlatformZeroMemory(&mbProbeResponse , sizeof(MEMORY_BUFFER)); bProbeResponseStatus = P2PMemoryBufferClone(pP2PInfo, &mbProbeResponse, &pSource->DeviceEntry[i].ProbeResponsePacket); - + // Successful if(bBeaconStatus && bProbeResponseStatus) @@ -722,11 +722,11 @@ P2PIsN24GSupported( { PADAPTER pDefAdapter = pP2PInfo->pAdapter; u2Byte SupportedWirelessMode = pDefAdapter->HalFunc.GetSupportedWirelessModeHandler(pDefAdapter); - - //RT_TRACE(COMP_P2P, DBG_LOUD, - // ("P2PIsN24GSupported(): SupportedWirelessMode: %u\n", + + //RT_TRACE(COMP_P2P, DBG_LOUD, + // ("P2PIsN24GSupported(): SupportedWirelessMode: %u\n", // SupportedWirelessMode)); - + if(IS_24G_WIRELESS_MODE(SupportedWirelessMode)) { return TRUE; @@ -744,28 +744,28 @@ P2PGOSetBeaconInterval( ) { // Note that if under Win7, ext port is used and if not, - // ADJUST_TO_ADAPTIVE_ADAPTER(pAdapter, FALSE) + // ADJUST_TO_ADAPTIVE_ADAPTER(pAdapter, FALSE) // always return the only one adapter. PADAPTER pAdapter = P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) ? pP2PInfo->pAdapter : GetFirstGOPort(pP2PInfo->pAdapter); PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); // - // Note that if beacon interval is changed, + // Note that if beacon interval is changed, // it is not recovered by only re-enabled P2P mode. // if(u2BeaconPeriod != pMgntInfo->dot11BeaconPeriod) { - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PGOSetBeaconInterval(): set beacon interval from (%u) to (%u)\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PGOSetBeaconInterval(): set beacon interval from (%u) to (%u)\n", pMgntInfo->dot11BeaconPeriod, u2BeaconPeriod)); - + pMgntInfo->Regdot11BeaconPeriod = u2BeaconPeriod; pMgntInfo->dot11BeaconPeriod = pMgntInfo->Regdot11BeaconPeriod; - - pAdapter->HalFunc.SetHwRegHandler(pAdapter, - HW_VAR_BEACON_INTERVAL, + + pAdapter->HalFunc.SetHwRegHandler(pAdapter, + HW_VAR_BEACON_INTERVAL, (pu1Byte)(&pMgntInfo->dot11BeaconPeriod)); } } @@ -776,7 +776,7 @@ P2PProvisioning( ) { #if (WPS_SUPPORT == 1) - PADAPTER pDefAdapter = GetDefaultAdapter(pP2PInfo->pAdapter); + PADAPTER pDefAdapter = GetDefaultAdapter(pP2PInfo->pAdapter); return GET_SIMPLE_CONFIG_ENABLED(&pDefAdapter->MgntInfo); #endif @@ -798,7 +798,7 @@ P2PIsSocialChannel( ) { u1Byte i; - + for(i = 0; i < sizeof(P2PSocialChannels); i++) { if(P2PSocialChannels[i] == Channel) @@ -817,7 +817,7 @@ P2PTestU2SingleBitSet( u2Byte i = sizeof(u2Byte) * 8; u2Byte j; BOOLEAN bHasBitSet = 0; - + for(j = 0; j < i; j++) { if(u2Val & 1) @@ -852,7 +852,7 @@ P2PSetChannel( ) { PADAPTER pAdapter = pP2PInfo->pAdapter; - pAdapter->HalFunc.SwChnlByTimerHandler(pAdapter, Channel); + pAdapter->HalFunc.SwChnlByTimerHandler(pAdapter, Channel); } VOID @@ -894,10 +894,10 @@ P2PStopResumeGOBeaconning( { // // Sometimes beacon cant' resume immediately, - // so we don't do beacon stop/resume now or WPS + // so we don't do beacon stop/resume now or WPS // is hare to get succeed. // - return; + return; } VOID P2PGetRandomSeries( @@ -919,7 +919,7 @@ P2PGetRandomSeries( return; } - if(nRandomSeriesToGen > 20) + if(nRandomSeriesToGen > 20) { RT_ASSERT( FALSE, ("P2PGetRandomSeries(): nRandomSeriesToGen shall be less than 20!\n") ); return; @@ -927,7 +927,7 @@ P2PGetRandomSeries( GetRandomBuffer(Hashed); - for(i = 0; i < nRandomSeriesToGen; i++) + for(i = 0; i < nRandomSeriesToGen; i++) { iRdm = *( (pu1Byte)Hashed + i); // usd first 1 bytes only iRdm = iRdm % interval; // Now iRdm is in [0, interval) @@ -948,16 +948,16 @@ P2PGetRandomChars( // Get random num from upper case letters, lower case letters and numbers. // Total possibility: 26+26+10 = 62 => index from 0 to 61 // - + //int i = GetRandomNumber(0, 26 + 26 + 10); u1Byte u1RandomArray[20]; u1Byte i, j; - if(nRandomCharToGen > 20) + if(nRandomCharToGen > 20) { return FALSE; } - + // // i to random char mapping: // i = 0 to 9 => number @@ -966,11 +966,11 @@ P2PGetRandomChars( // P2PGetRandomSeries(0, 26 + 26 + 10, nRandomCharToGen, u1RandomArray); for(j = 0; j < nRandomCharToGen; j++) - { + { char temp; - + i = u1RandomArray[j]; - + if(i >= 0 && i <= 9) {// number temp = '0' + (i); @@ -983,7 +983,7 @@ P2PGetRandomChars( {// upper case temp = 'A' + (i - 36); } - else + else { return FALSE; } @@ -1003,18 +1003,18 @@ P2PDetermineGOSsid( { // // Clause 3.2.1: - // Each SSID shall begin with the ASCII characters "TBD-", - // where TBD is a short version of the technology name to - // be determined by the Marketing TG. This SSID requirement - // may enable users of Legacy Clients to differentiate between - // a P2P Group and an infrastructure network. - // - // Following "TBD-" the SSID shall contain two ASCII characters - // randomly selected with a unified distribution from the following character set: - // upper case letters, lower case letters and numbers. - // - // This SSID requirement makes the probability low that a Legacy Client - // encounters two P2P Groups with the same SSID and mistakenly + // Each SSID shall begin with the ASCII characters "TBD-", + // where TBD is a short version of the technology name to + // be determined by the Marketing TG. This SSID requirement + // may enable users of Legacy Clients to differentiate between + // a P2P Group and an infrastructure network. + // + // Following "TBD-" the SSID shall contain two ASCII characters + // randomly selected with a unified distribution from the following character set: + // upper case letters, lower case letters and numbers. + // + // This SSID requirement makes the probability low that a Legacy Client + // encounters two P2P Groups with the same SSID and mistakenly // attempt to roam between them. // static u1Byte P2PTechName[] = {'D', 'I', 'R','E', 'C', 'T', '-'}; @@ -1061,9 +1061,9 @@ P2PDetermineGOSsid( index += pP2PInfo->SSIDPostfixLen; RT_PRINT_STR(COMP_P2P, DBG_LOUD, "P2PDetermineGOSsid(): Random SSID:\n", SsidBuf, *pSsidLen); - + return TRUE; - + } BOOLEAN @@ -1072,13 +1072,13 @@ P2PIsWildcardSsid( ) { u1Byte i; - if(osSsid.Length != sizeof(P2PWildcardSsid)) + if(osSsid.Length != sizeof(P2PWildcardSsid)) { return FALSE; } for(i = 0; i < sizeof(P2PWildcardSsid); i++) { - if(osSsid.Octet[i] != P2PWildcardSsid[i]) + if(osSsid.Octet[i] != P2PWildcardSsid[i]) { return FALSE; } @@ -1112,7 +1112,7 @@ P2PIsChnlInChnlEntryList( ) { u1Byte i = 0, j = 0; - + for(i = 0; i < pChannelEntryList->regClasses; i++) { if(pChannelEntryList->regClass[i].channels> 0) @@ -1126,7 +1126,7 @@ P2PIsChnlInChnlEntryList( } } } - + return FALSE; } @@ -1135,10 +1135,10 @@ P2PIsDoingGroupFormation( IN PP2P_INFO pP2PInfo ) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIsDoingGroupFormation(): state: %u, bPreGroupFormation: %u\n", pP2PInfo->State, pP2PInfo->bPreGroupFormation)); - + if((pP2PInfo->State >= P2P_STATE_GO_NEGO_REQ_SEND && pP2PInfo->State <= P2P_STATE_GO_NEGO_COMPLETE) || pP2PInfo->bPreGroupFormation) @@ -1148,7 +1148,7 @@ P2PIsDoingGroupFormation( return FALSE; } -OCTET_STRING +OCTET_STRING P2PWpsIEGetAttribute( IN OCTET_STRING osWpsIEAttributes, IN BOOLEAN bWpsAttributesInBE, @@ -1198,14 +1198,14 @@ P2PWpsIEGetAttribute( CurrentLen = ReadEF2Byte((pu2Byte)(osWpsIEAttributes.Octet + offset)); offset += sizeof(CurrentLen); } - + if(CurrentTag == Tag) { bTagMatched = TRUE; } if(bTagMatched && (length >= offset + CurrentLen)) - { + { FillOctetString(ret, osWpsIEAttributes.Octet + offset, CurrentLen); break; } @@ -1236,7 +1236,7 @@ P2PDeviceTypeMatches( {// no Requested Device Type to check return TRUE; } - + do { #if P2P_WPS_ATTR_TRANSMITTED_USING_BE @@ -1285,7 +1285,7 @@ P2PDeviceTypeMatches( {// no Requested Device Type to check return TRUE; } - + } BOOLEAN @@ -1302,7 +1302,7 @@ P2PDeviceIDMatches( } else { - RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "P2PDeviceIDMatches(): DeviceID specified not match:\n", msg->devIdDevAddr); return FALSE; } @@ -1358,19 +1358,19 @@ P2P_SetWpsIe( pP2PInfo->WpsDevPasswdId = msg.wpsDevPasswordId; w->DevicePasswdId = msg.wpsDevPasswordId; - + // // Notify UI the current device password ID so that it can determine whether provisioning info is available // Note that UI determines which peer config method we shall use for doing WPS // - P2PIndicateCurrentDevPasswdId(pP2PInfo, pP2PInfo->WpsDevPasswdId); + P2PIndicateCurrentDevPasswdId(pP2PInfo, pP2PInfo->WpsDevPasswdId); } if(msg._wpsPrimaryDevType) { u2Byte cat = ReadN2H2BYTE(msg._wpsPrimaryDevType + 0); u2Byte subCat = ReadN2H2BYTE(msg._wpsPrimaryDevType + 6); - + // We do this check because the WPS module set us a WPS IE with this attribute all 0 if(0 != cat && 0 != subCat) { @@ -1408,7 +1408,7 @@ P2P_SetWpsIe( // Sub IE handlers //====================================================================== -BOOLEAN +BOOLEAN P2POnP2PNoticeOfAbsence( IN PP2P_INFO pP2PInfo, IN OCTET_STRING osPacket, @@ -1423,9 +1423,9 @@ P2POnP2PNoticeOfAbsence( PMGNT_INFO pMgntInfo = &(pP2PInfo->pAdapter->MgntInfo); // Win8: NdisTest Trick for WFD_Concurrent_ext: ------------------------------ - // + SUT-Client -> DUT-GO and DUT-Client -> SUT-GO are in the same channel + // + SUT-Client -> DUT-GO and DUT-Client -> SUT-GO are in the same channel // + Use TxPause in AP_PS_UpdateStationPSState() instead - if(pP2PInfo->pAdapter->bInHctTest) + if(pP2PInfo->pAdapter->bInHctTest) return TRUE; // ---------------------------------------------------------------------- @@ -1444,7 +1444,7 @@ P2POnP2PNoticeOfAbsence( // if((msg->noaLen - 2) % 13 != 0) // Len of a NoA Desc is 13 { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2POnP2PNoticeOfAbsence(): invalid length: %u\n", msg->noaLen)); return FALSE; } @@ -1453,7 +1453,7 @@ P2POnP2PNoticeOfAbsence( nNoADesc = (msg->noaLen - 2) / 13; } - // The index hasn't changed. + // The index hasn't changed. if(pP2PInfo->bUpdateFromBeacon && msg->noaIndex == pP2PInfo->NoAIEIndex) return TRUE; @@ -1466,13 +1466,13 @@ P2POnP2PNoticeOfAbsence( p2pPsSet.CTWindow = msg->noaCtWindowAndOppPsParam & (~BIT7); Index = 2; - + // NoA Descriptors for(i = 0; i < nNoADesc; i++) { // This NoA is valid. p2pPsSet.NoASet[i].bNoAEn = TRUE; - + // Count/Type p2pPsSet.NoASet[i].NoACnt = ReadEF1Byte(msg->_noa + Index); Index += 1; @@ -1502,13 +1502,13 @@ P2POnP2PNoticeOfAbsence( //====================================================================== // Dump Routine //====================================================================== -VOID +VOID P2PDumpWpsAttributes( IN PP2P_WPS_ATTRIBUTES pP2PWpsAttributes ) { u1Byte i; - + RT_TRACE(COMP_P2P, DBG_LOUD, ("WPS Attributes:\n")); RT_TRACE(COMP_P2P, DBG_LOUD, ("Config Method: 0x%X\n", pP2PWpsAttributes->ConfigMethod)); RT_TRACE(COMP_P2P, DBG_LOUD, ("Device Passwd ID: 0x%X\n", pP2PWpsAttributes->DevicePasswdId)); @@ -1522,9 +1522,9 @@ P2PDumpWpsAttributes( RT_TRACE(COMP_P2P, DBG_LOUD, ("%u\n", pP2PWpsAttributes->SecondaryDeviceTypeList[i].SubCategoryId)); } } - if(pP2PWpsAttributes->DeviceNameLength > 0) + if(pP2PWpsAttributes->DeviceNameLength > 0) { - RT_PRINT_STR(COMP_P2P, DBG_LOUD, "DeviceName: ", pP2PWpsAttributes->DeviceName, pP2PWpsAttributes->DeviceNameLength); + RT_PRINT_STR(COMP_P2P, DBG_LOUD, "DeviceName: ", pP2PWpsAttributes->DeviceName, pP2PWpsAttributes->DeviceNameLength); } else { @@ -1532,13 +1532,13 @@ P2PDumpWpsAttributes( } } -VOID +VOID P2PDumpDeviceCapability( IN u1Byte DeviceCapability ) { RT_TRACE(COMP_P2P, DBG_LOUD, ("=== Device Capability ===\n")); - + if(DeviceCapability & dcServiceDiscovery) { RT_TRACE(COMP_P2P, DBG_LOUD, ("dcServiceDiscovery\n")); @@ -1563,16 +1563,16 @@ P2PDumpDeviceCapability( { RT_TRACE(COMP_P2P, DBG_LOUD, ("dcP2PInvitationProcedure\n")); } - + } -VOID +VOID P2PDumpGroupCapability( IN u1Byte GroupCapability ) { RT_TRACE(COMP_P2P, DBG_LOUD, ("=== Group Capability ===\n")); - + if(GroupCapability & gcP2PGroupOwner) { RT_TRACE(COMP_P2P, DBG_LOUD, ("gcP2PGroupOwner\n")); @@ -1603,7 +1603,7 @@ P2PDumpGroupCapability( } } -VOID +VOID P2PDumpClientInfoDescList( IN PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoDescList, IN u1Byte P2PClientInfoDescListSize @@ -1622,7 +1622,7 @@ P2PDumpClientInfoDescList( RT_TRACE(COMP_P2P, DBG_LOUD, ("Totally %d Clients dumped\n", i)); } -VOID +VOID P2PDumpScanList( IN PP2P_DEVICE_DISCRIPTOR pDevDescriptors, IN u4Byte nDevDescriptors @@ -1690,7 +1690,7 @@ P2PDumpPacketType( u1Byte OUISubType ) { - switch(TypeSubType) + switch(TypeSubType) { case Type_Beacon: RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PDumpPacketType(): Type_Beacon\n")); @@ -1787,7 +1787,7 @@ P2PClientInfoGetCount( { return 0; } - + for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { pEntry = &(pExtMgntInfo->AsocEntry[i]); @@ -1802,7 +1802,7 @@ P2PClientInfoGetCount( return nP2PClients; } -PP2P_CLIENT_INFO_DISCRIPTOR +PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoFindByInterfaceAddress( IN PP2P_INFO pP2PInfo, IN pu1Byte InterfaceAddress @@ -1820,7 +1820,7 @@ P2PClientInfoFindByInterfaceAddress( { return 0; } - + for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { pEntry = &(pExtMgntInfo->AsocEntry[i]); @@ -1839,7 +1839,7 @@ P2PClientInfoFindByInterfaceAddress( return NULL; } -PP2P_CLIENT_INFO_DISCRIPTOR +PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoFindByDeviceAddress( IN PP2P_INFO pP2PInfo, IN pu1Byte DeviceAddress @@ -1857,7 +1857,7 @@ P2PClientInfoFindByDeviceAddress( { return 0; } - + for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { pEntry = &(pExtMgntInfo->AsocEntry[i]); @@ -1876,7 +1876,7 @@ P2PClientInfoFindByDeviceAddress( return NULL; } -PP2P_CLIENT_INFO_DISCRIPTOR +PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoEnumClients( IN PP2P_INFO pP2PInfo, IN u1Byte StartIndex, @@ -1884,7 +1884,7 @@ P2PClientInfoEnumClients( ) { BOOLEAN bFound = FALSE; - + PADAPTER pExtAdapter = P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) ? pP2PInfo->pAdapter : GetFirstGOPort(pP2PInfo->pAdapter); @@ -1901,7 +1901,7 @@ P2PClientInfoEnumClients( { return 0; } - + for(i = StartIndex; i < ASSOCIATE_ENTRY_NUM; i++) { pEntry = &(pExtMgntInfo->AsocEntry[i]); @@ -1917,7 +1917,7 @@ P2PClientInfoEnumClients( } exit_P2PClientInfoEnumClients: - + if(pIndex) *pIndex = (u1Byte)(-1); return NULL; } @@ -1925,12 +1925,12 @@ P2PClientInfoEnumClients( //====================================================================== // Scan List Hander //====================================================================== -PP2P_DEVICE_DISCRIPTOR +PP2P_DEVICE_DISCRIPTOR P2PScanListFind( IN PP2P_DEVICE_DISCRIPTOR pScanList, IN u4Byte ScanListSize, - IN pu1Byte DeviceAddress, - IN pu1Byte InterfaceAddress, + IN pu1Byte DeviceAddress, + IN pu1Byte InterfaceAddress, OUT pu4Byte pScanListIndex ) { @@ -1944,10 +1944,10 @@ P2PScanListFind( return NULL; } - for(i = 0; i < ScanListSize; i++) + for(i = 0; i < ScanListSize; i++) { - pu1Byte AddrToCompare = (bDevAddressAsKey) ? - ((pScanList[i]).DeviceAddress) : + pu1Byte AddrToCompare = (bDevAddressAsKey) ? + ((pScanList[i]).DeviceAddress) : ((pScanList[i]).IntendedP2PInterfaceAddress); if(eqMacAddr(AddrToCompare, KeyAddr)) { @@ -1959,7 +1959,7 @@ P2PScanListFind( return &(pScanList[i]); } } - + return NULL; } @@ -1974,14 +1974,14 @@ P2PScanListAllFound( if(pP2PInfo->ScanDeviceIDs.uNumOfDeviceIDs == 0 ||pP2PInfo->DeviceListForQuery.uNumberOfDevices ==0) return FALSE; - + for(i=0;i<(pP2PInfo->ScanDeviceIDs.uNumOfDeviceIDs);i++)// { for(j = 0; j < (pP2PInfo->DeviceListForQuery.uNumberOfDevices); j++) { if(pP2PInfo->DeviceListForQuery.DeviceEntry[j].DeviceAddress != NULL) { - if(eqMacAddr(pP2PInfo->ScanDeviceIDs.DeviceIDs[i], pP2PInfo->DeviceListForQuery.DeviceEntry[j].DeviceAddress) + if(eqMacAddr(pP2PInfo->ScanDeviceIDs.DeviceIDs[i], pP2PInfo->DeviceListForQuery.DeviceEntry[j].DeviceAddress) &&pP2PInfo->DeviceListForQuery.DeviceEntry[j].ProbeResponseHostTimestamp != 0) { uNumOfDevicesFound ++; @@ -1991,19 +1991,19 @@ P2PScanListAllFound( } if(uNumOfDevicesFound == pP2PInfo->ScanDeviceIDs.uNumOfDeviceIDs) - { + { bAllFound =TRUE; - RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: All of DeviceID Found : Terminate Device Discovery!! !\n", __FUNCTION__)); + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: All of DeviceID Found : Terminate Device Discovery!! !\n", __FUNCTION__)); } - + return bAllFound; } -BOOLEAN +BOOLEAN P2PScanListFindClient( IN PP2P_DEVICE_DISCRIPTOR pScanList, IN u4Byte ScanListSize, - IN pu1Byte DeviceAddress, + IN pu1Byte DeviceAddress, IN pu1Byte InterfaceAddress, OUT PP2P_DEVICE_DISCRIPTOR *ppGODeviceDesc, OUT PP2P_CLIENT_INFO_DISCRIPTOR *ppClientInfoDesc @@ -2018,15 +2018,15 @@ P2PScanListFindClient( *ppGODeviceDesc = NULL; *ppClientInfoDesc = NULL; - for(i = 0; i < ScanListSize; i++) + for(i = 0; i < ScanListSize; i++) { PP2P_CLIENT_INFO_DISCRIPTOR pClientInfo = pScanList[i].P2PClientDescriptorList; u1Byte P2PClientDescriptorListLength = pScanList[i].P2PClientDescriptorListLength; for(j = 0; j < P2PClientDescriptorListLength; j++) { - pu1Byte AddrToCompare = (bDevAddressAsKey) ? - ((pClientInfo[j]).DeviceAddress) : + pu1Byte AddrToCompare = (bDevAddressAsKey) ? + ((pClientInfo[j]).DeviceAddress) : ((pClientInfo[j]).InterfaceAddress); if(KeyAddr != NULL && eqMacAddr(AddrToCompare, KeyAddr)) { @@ -2036,14 +2036,14 @@ P2PScanListFindClient( goto exit_P2PScanListFindClient; } } - + } -exit_P2PScanListFindClient: +exit_P2PScanListFindClient: return bFound; } -PP2P_DEVICE_DISCRIPTOR +PP2P_DEVICE_DISCRIPTOR P2PScanListAdd( IN OUT PP2P_DEVICE_DISCRIPTOR pScanList, IN OUT pu4Byte pScanListSize @@ -2051,21 +2051,21 @@ P2PScanListAdd( { PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; - - if(*pScanListSize == P2P_MAX_SCAN_LIST) + + if(*pScanListSize == P2P_MAX_SCAN_LIST) {// no more space => return the last one pP2PDeviceDesc = &(pScanList[*pScanListSize - 1]); } - else + else { pP2PDeviceDesc = &(pScanList[*pScanListSize]); (*pScanListSize)++; } - + return pP2PDeviceDesc; } -VOID +VOID P2PScanListClear( IN P2P_INFO *pP2PInfo ) @@ -2081,7 +2081,7 @@ P2PScanListClear( return; } -VOID +VOID P2PScanListCopy( IN OUT PP2P_DEVICE_DISCRIPTOR pScanListDest, IN OUT pu4Byte pScanListDestSize, @@ -2090,8 +2090,8 @@ P2PScanListCopy( ) { *pScanListDestSize = ScanListSrcSize; - PlatformMoveMemory(pScanListDest, - pScanListSrc, + PlatformMoveMemory(pScanListDest, + pScanListSrc, (ScanListSrcSize * sizeof(P2P_DEVICE_DISCRIPTOR))); } @@ -2105,13 +2105,13 @@ P2PScanListDumplicate( // // Test if pDevDesc is a duplicate item in pScanList. // - + PP2P_DEVICE_DISCRIPTOR pTmpDevDesc = NULL; pTmpDevDesc = P2PScanListFind(pScanList, ScanListSize, pDevDesc->DeviceAddress, NULL, NULL); if(pTmpDevDesc) { - if(PlatformCompareMemory(pTmpDevDesc, + if(PlatformCompareMemory(pTmpDevDesc, pDevDesc, sizeof(P2P_DEVICE_DISCRIPTOR)) == 0) {// desc the same return TRUE; @@ -2139,7 +2139,7 @@ P2PScanListEqual( { u4Byte i; - //RT_TRACE(COMP_P2P, DBG_LOUD, + //RT_TRACE(COMP_P2P, DBG_LOUD, // ("P2PScanListEqual(): nlist1(%u), nlist2(%u)\n", ScanList1Size, ScanList2Size)); if(ScanList1Size != ScanList2Size) @@ -2151,7 +2151,7 @@ P2PScanListEqual( // For each entry in scan list 1, check if the entry is duplicate in scan list 2, // if all entries are duplicate, return TRUE; // - for(i = 0; i < ScanList1Size; i++) + for(i = 0; i < ScanList1Size; i++) { if(!P2PScanListDumplicate(pScanList2, ScanList2Size, &(pScanList1[i]))) { @@ -2203,7 +2203,7 @@ P2PScanListEnterScanCompleteImmediately( pChnlInfo = pMgntInfo->pChannelInfo; if(pChnlInfo->ChnlOp == CHNLOP_SCAN) break; - else + else pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } @@ -2218,7 +2218,7 @@ P2PScanListEnterScanCompleteImmediately( { pMgntInfo->ScanStep = 0; } - + PlatformCancelTimer(pLoopAdapter, &(pMgntInfo->ScanTimer)); PlatformSetTimer(pLoopAdapter, &(pMgntInfo->ScanTimer), 0); } @@ -2239,7 +2239,7 @@ P2PScanListCeaseScan( EXTCHNL_OFFSET hwBW40MOffset = EXTCHNL_OFFSET_NO_EXT; EXTCHNL_OFFSET hwBW80MOffset = EXTCHNL_OFFSET_NO_EXT; - // Get current channel. We want to know on what channel we cease the scan. + // Get current channel. We want to know on what channel we cease the scan. CurrentChnl = P2PGetChannel(pP2PInfo); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_BW40MHZ_EXTCHNL, (pu1Byte)(&hwBW40MOffset)); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_BW80MHZ_EXTCHNL, (pu1Byte)(&hwBW80MOffset)); @@ -2275,10 +2275,10 @@ P2PScanListCeaseScan( { pLoopAdapter->MgntInfo.SettingBeforeScan.ChannelBandwidth = CHANNEL_WIDTH_20; } - + pLoopAdapter->MgntInfo.SettingBeforeScan.ChannelNumber = CurrentChnl; pLoopAdapter->MgntInfo.SettingBeforeScan.CenterFrequencyIndex1 = CurrentChnl; - + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } @@ -2286,7 +2286,7 @@ P2PScanListCeaseScan( { CustomScan_TermReq(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), FALSE); } - + //Cancel current scan timer, which may be triggered after a long time // and set it again with no delay so that it will enter ScanComplete soon. //P2PScanListEnterScanCompleteImmediately(pP2PInfo); @@ -2337,7 +2337,7 @@ P2PConstructScanList( scanType = SCAN_PASSIVE; if( - pP2PInfo->bPreGroupFormation || + pP2PInfo->bPreGroupFormation || pP2PInfo->ProvisionDiscoveryContext.bDoingProvisionDiscovery || pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe || pP2PInfo->SDContext.bDoingServiceDiscovery @@ -2356,7 +2356,7 @@ P2PConstructScanList( { scanType = SCAN_ACTIVE; } - else + else { scanType = SCAN_PASSIVE; } @@ -2433,14 +2433,14 @@ P2PConstructScanList( // Instert the Listen Channel (Listen channel first due to fast discovery of NdisTest-WFD_discover_ext) CustomScan_AddScanChnl(req, pP2PInfo->ListenChannel, 1, scanType, duration, rate, probeReqBuf); - + for(i = 0; i < pChList->ChannelLen; i++) { if(pChList->ChnlListEntry[i].ChannelNum != pP2PInfo->ListenChannel) { CustomScan_AddScanChnl(req, pChList->ChnlListEntry[i].ChannelNum, 1, scanType, duration, rate, probeReqBuf); } - } + } } else if(pP2PInfo->State == P2P_STATE_INVITATION_REQ_SEND) { @@ -2494,7 +2494,7 @@ P2PConstructScanList( { CustomScan_AddScanChnl(req, pP2PInfo->ProvisionDiscoveryContext.Channel, 5, scanType, duration, rate, probeReqBuf); } - else if(pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe && + else if(pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe && pP2PInfo->InvitationContext.InvitedDevice.ListenChannel != 0) { CustomScan_AddScanChnl(req, pP2PInfo->InvitationContext.InvitedDevice.ListenChannel, 5, scanType, duration, rate, probeReqBuf); @@ -2512,7 +2512,7 @@ P2PConstructScanList( if( GetDefaultMgntInfo(pP2PInfo->pAdapter)->WFDPeerOpChannel > 0 ) { CustomScan_AddScanChnl(req, GetDefaultMgntInfo(pP2PInfo->pAdapter)->WFDPeerOpChannel, 2, scanType, duration, rate, probeReqBuf); - } + } } } @@ -2544,12 +2544,12 @@ P2PProcessSubElements( ) { P2P_DEVICE_DISCRIPTOR *pDesc = NULL; - - if(NULL == (pDesc = P2PScanListFind(pP2PInfo->ScanList, pP2PInfo->ScanListSize, DeviceAddress, NULL, NULL))) + + if(NULL == (pDesc = P2PScanListFind(pP2PInfo->ScanList, pP2PInfo->ScanListSize, DeviceAddress, NULL, NULL))) { if(!bCreateIfNotExist) return NULL; - + if(NULL == (pDesc = P2PScanListAdd(pP2PInfo->ScanList, &pP2PInfo->ScanListSize))) return NULL; @@ -2621,14 +2621,14 @@ P2P_OnBeacon( if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && pP2PInfo->bForceScanLegacyNetworks) { - ssidBeacon = PacketGetElement(*posMpdu, EID_SsId, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); + ssidBeacon = PacketGetElement(*posMpdu, EID_SsId, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); if(IsSSIDNdisTest(ssidBeacon) || !pAdapter->bInHctTest) - { + { MEMORY_BUFFER mbPacket = {NULL, 0}; mbPacket.Buffer = posMpdu->Octet; mbPacket.Length = posMpdu->Length; RT_PRINT_STR(COMP_P2P, DBG_LOUD, "P2P_OnBeacon IsSSIDNdisTest:", ssidBeacon.Octet, ssidBeacon.Length); - + P2PDeviceListUpdate(pP2PInfo, &pP2PInfo->DeviceList, pRfd, Frame_pBssid(*posMpdu), NULL, mbPacket); } } @@ -2637,8 +2637,8 @@ P2P_OnBeacon( do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_BEACON, pRfd, Frame_pBssid(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_BEACON, pRfd, Frame_pBssid(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { @@ -2650,7 +2650,7 @@ P2P_OnBeacon( mb.Buffer = (u1Byte *)pDev; mb.Length = sizeof(*pDev); PlatformIndicateP2PEvent(pP2PInfo, P2P_EVENT_DEV_FOUND, &mb); - + if(!p2p_validate_Beacon(msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; @@ -2664,7 +2664,7 @@ P2P_OnBeacon( pP2PDeviceDesc = P2PProcessSubElements(pP2PInfo, pRfd, msg->devAddr, msg, TRUE); if(pP2PDeviceDesc == NULL) { - RT_TRACE_F(COMP_P2P, DBG_TRACE, + RT_TRACE_F(COMP_P2P, DBG_TRACE, ("reject because of invalid P2P Sub IE or the corresponding entry is not in the scan list\n")); break; } @@ -2682,7 +2682,7 @@ P2P_OnBeacon( } // Wait for join - if(pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO && + if(pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO && pP2PInfo->State == P2P_STATE_DEVICE_DISCOVERABILITY_WAIT_BEACON && eqMacAddr(pP2PInfo->DeviceDiscoverabilityContext.GoBssid, msg->bssid)) { @@ -2691,10 +2691,10 @@ P2P_OnBeacon( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to send DeviceDiscoverabilityReq to the GO\n")); pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO = FALSE; - + pP2PInfo->State = P2P_STATE_DEVICE_DISCOVERABILITY_REQ_SEND; PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); } } }while(FALSE); @@ -2716,7 +2716,7 @@ P2PHasNon11BRateAsSupportingRate( // // Note: if no supported rate IE in osPacket, FALSE is returned. // - + // Check Supported rate BratesBeacon = PacketGetElement(osPacket, EID_SupRates, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE ); if( BratesBeacon.Length != 0) @@ -2747,7 +2747,7 @@ P2PHasNon11BRateAsSupportingRate( } } } - + return bHasNon11bRate; } @@ -2760,10 +2760,10 @@ P2PAcceptProbeReq( { BOOLEAN bRet = FALSE; //OCTET_STRING osSsid = PacketGetElement(osPacket, EID_SsId, OUI_SUB_DONT_CARE, OUI_SUB_DONT_CARE); - + // // Check if we shall respond to the ProbeReq. - // Note that when in Op mode acting as GO, + // Note that when in Op mode acting as GO, // ProbeReq is not dealt with here. // do @@ -2780,7 +2780,7 @@ P2PAcceptProbeReq( } } } - + if(pP2PInfo->State == P2P_STATE_OPERATING) { if(P2P_ACTING_AS_GO(pP2PInfo)) @@ -2791,20 +2791,20 @@ P2PAcceptProbeReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceTypeMatches\n")); break; } - + // check Device ID matched if(!P2PDeviceIDMatches(pP2PInfo, msg)) {//DbgPrint("j\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceIDMatches\n")); + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceIDMatches\n")); break; } } - else + else {// operating but not GO => client if(FALSE == P2PSvc_Enabled(pP2PInfo->pP2PSvcInfo)) {// client does not reply to a ProbeReq, unless P2PSvc is enabled RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: operating but not GO\n")); - break; + break; } } } @@ -2813,7 +2813,7 @@ P2PAcceptProbeReq( // don't reject } #if 0 - else if(pP2PInfo->State == P2P_STATE_INITIALIZED && + else if(pP2PInfo->State == P2P_STATE_INITIALIZED && pP2PInfo->bExtendedListening) {// doing extended listen // don't reject @@ -2825,21 +2825,21 @@ P2PAcceptProbeReq( // Comment out because we hope to reduce extended listen timing while not to degrade the responsiveness //break; } - + // // Clause 3.1.2.1.2 // - if(pP2PInfo->State == P2P_STATE_SCAN) + if(pP2PInfo->State == P2P_STATE_SCAN) {//DbgPrint("a\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_STATE_SCAN\n")); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_STATE_SCAN\n")); + break; } - if(pP2PInfo->Role == P2P_CLIENT) + if(pP2PInfo->Role == P2P_CLIENT) {//DbgPrint("b\n"); if(FALSE == P2PSvc_Enabled(pP2PInfo->pP2PSvcInfo)) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_CLIENT\n")); + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_CLIENT\n")); break; } } @@ -2852,49 +2852,49 @@ P2PAcceptProbeReq( // // Clause 3.1.2.1.3 // - if( pP2PInfo->State == P2P_STATE_SEARCH) + if( pP2PInfo->State == P2P_STATE_SEARCH) {//DbgPrint("d\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_STATE_SEARCH\n")); + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_STATE_SEARCH\n")); break; } // // Clause 3.1.2.1.1 // - if(pP2PInfo->State == P2P_STATE_LISTEN || pP2PInfo->State == P2P_STATE_INITIALIZED) + if(pP2PInfo->State == P2P_STATE_LISTEN || pP2PInfo->State == P2P_STATE_INITIALIZED) { // This has already been checked. - //if(osP2PIE.Length == 0) + //if(osP2PIE.Length == 0) //{// no P2P IE //DbgPrint("e\n"); // break; //} if(!P2P_WILDCARD_MAC_ADDR(msg->bssid)) {//DbgPrint("g\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_WILDCARD_MAC_ADDR pBssid\n")); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_WILDCARD_MAC_ADDR pBssid\n")); + break; } if(!(P2P_WILDCARD_MAC_ADDR(msg->da) || eqMacAddr(msg->da, pP2PInfo->DeviceAddress))) {//DbgPrint("h\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_WILDCARD_MAC_ADDR pDaddr\n")); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2P_WILDCARD_MAC_ADDR pDaddr\n")); + break; } // check requested device type of the WPS IE matched if(!P2PDeviceTypeMatches(pP2PInfo, msg->wpsAttributes.os)) {//DbgPrint("i\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceTypeMatches case 2\n")); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceTypeMatches case 2\n")); + break; } - + // check Device ID matched if(!P2PDeviceIDMatches(pP2PInfo, msg)) {//DbgPrint("j\n"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceIDMatches case 2\n")); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PDeviceIDMatches case 2\n")); + break; } } @@ -2904,8 +2904,8 @@ P2PAcceptProbeReq( // if(!P2PHasNon11BRateAsSupportingRate(*posMpdu)) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PHasNon11BRateAsSupportingRate \n")); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Reject Probe Request: P2PHasNon11BRateAsSupportingRate \n")); + break; } @@ -2926,7 +2926,7 @@ P2PToSendProvisionDiscoveryReq( // BOOLEAN bRet = FALSE; - + switch(ConfigMethod) { case P2P_WPS_CONFIG_METHODS_LABEL: @@ -2985,7 +2985,7 @@ P2PDetermineDevPasswdIdCompatible( { WPS_DEVICE_PASSWD_ID selfDpid = (WPS_DEVICE_PASSWD_ID)SelfDevicePasswdID; WPS_DEVICE_PASSWD_ID peerDpid = (WPS_DEVICE_PASSWD_ID)PeerDevicePasswdID; - + switch(selfDpid) { case P2P_WPS_DEV_PASSWD_ID_DEFAULT: @@ -3040,13 +3040,13 @@ P2PDetermineGONegoDevPasswdIdCompaible( // // Check Device Password ID compatibility // - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PDetermineGONegoDevPasswdIdCompaible(): recvd Dev Passwd ID (%u), mine (%u)\n", peerDpid, selfDpid)); - + if(!P2PDetermineDevPasswdIdCompatible(peerDpid, selfDpid)) {// dev passwd id incompatible - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PDetermineGONegoDevPasswdIdCompaible(): DevPasswdId Incompatible\n")); return FALSE; } @@ -3102,17 +3102,17 @@ P2P_OnProbeReq( if(P2P_DEVICE != pP2PInfo->Role) { - RT_TRACE(COMP_P2P, DBG_LOUD, ("Return because Not Device port!\n")); - return RT_STATUS_SUCCESS; + RT_TRACE(COMP_P2P, DBG_LOUD, ("Return because Not Device port!\n")); + return RT_STATUS_SUCCESS; } - + p2p_DevList_Lock(&pP2PInfo->devList); do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_PROBE_REQ, - pRfd, Frame_pSaddr(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_PROBE_REQ, + pRfd, Frame_pSaddr(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { @@ -3121,24 +3121,24 @@ P2P_OnProbeReq( } msg = pDev->rxFrames[P2P_FID_PROBE_REQ]->msg; - + if(!p2p_validate_ProbeReq(msg)) { RT_TRACE(COMP_P2P, DBG_LOUD, ("RT_STATUS_MALFORMED_PKT!\n")); rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + if(!P2PAcceptProbeReq(pP2PInfo, posMpdu, msg)) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("rejected by P2PAcceptProbeReq()\n")); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "Transmitter Address: ", Frame_pTaddr(*posMpdu)); - RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->State: %d\n", pP2PInfo->State)); + RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->State: %d\n", pP2PInfo->State)); break; } if(P2P_DEVICE == p2pRole - && pP2PInfo->State > P2P_STATE_GO_NEGO_COMPLETE + && pP2PInfo->State > P2P_STATE_GO_NEGO_COMPLETE && FALSE == P2PSvc_Enabled(pP2PInfo->pP2PSvcInfo) ) {// when operating, ProbeReq is handled in OnProbeReq(), not here. @@ -3181,13 +3181,13 @@ P2P_OnProbeReq( } else if((s8Byte)(PlatformGetCurrentTime()) - pP2PInfo->TimeStartToStopSendingProbeResponse > 2 * P2P_RESERVED_TIME_FOR_ACTION_FRAME_MS * 1000) { - RT_TRACE_F(COMP_P2P, DBG_TRACE, ("Reset pP2PInfo->TimeStartToStopSendingProbeResponse: from %d to 0\n", (u4Byte)pP2PInfo->TimeStartToStopSendingProbeResponse)); - pP2PInfo->TimeStartToStopSendingProbeResponse = 0; + RT_TRACE_F(COMP_P2P, DBG_TRACE, ("Reset pP2PInfo->TimeStartToStopSendingProbeResponse: from %d to 0\n", (u4Byte)pP2PInfo->TimeStartToStopSendingProbeResponse)); + pP2PInfo->TimeStartToStopSendingProbeResponse = 0; rtStatus = RT_STATUS_PKT_DROP; } else { - RT_TRACE_F(COMP_P2P, DBG_TRACE, ("No probe rsp\n")); + RT_TRACE_F(COMP_P2P, DBG_TRACE, ("No probe rsp\n")); } } @@ -3236,16 +3236,16 @@ P2P_OnProbeRsp( mbPacket.Buffer = posMpdu->Octet; mbPacket.Length = posMpdu->Length; P2PDeviceListUpdate(pP2PInfo, &pP2PInfo->DeviceList, pRfd, Frame_pBssid(*posMpdu), NULL, mbPacket); - } + } p2p_DevList_Lock(&pP2PInfo->devList); do { // RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "P2P_OnProbeRsp(): ", Frame_pSaddr(*posMpdu)); - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_PROBE_RSP, - pRfd, Frame_pBssid(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_PROBE_RSP, + pRfd, Frame_pBssid(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { @@ -3257,7 +3257,7 @@ P2P_OnProbeRsp( mb.Buffer = (u1Byte *)pDev; mb.Length = sizeof(*pDev); PlatformIndicateP2PEvent(pP2PInfo, P2P_EVENT_DEV_FOUND, &mb); - + if(!p2p_validate_ProbeRsp(msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; @@ -3275,7 +3275,7 @@ P2P_OnProbeRsp( if(msg->_noa) P2POnP2PNoticeOfAbsence(pP2PInfo, *posMpdu, msg); - + // Update the device lists -------------------------------------------------------------------------- if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) { @@ -3283,8 +3283,8 @@ P2P_OnProbeRsp( mbPacket.Buffer = posMpdu->Octet; mbPacket.Length = posMpdu->Length; P2PDeviceListUpdate(pP2PInfo, &pP2PInfo->DeviceList, pRfd, msg->bssid, msg->devAddr, mbPacket); - - + + if(pP2PInfo->ScanDeviceIDs.uNumOfDeviceIDs > 0) { // Finding some device now if(eqMacAddr(msg->devAddr, pP2PInfo->ScanDeviceIDs.DeviceIDs[0])) @@ -3307,7 +3307,7 @@ P2P_OnProbeRsp( //return; } - if(pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO && + if(pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO && pP2PInfo->State == P2P_STATE_DEVICE_DISCOVERABILITY_WAIT_BEACON && eqMacAddr(pP2PInfo->DeviceDiscoverabilityContext.GoBssid, msg->bssid)) { @@ -3316,10 +3316,10 @@ P2P_OnProbeRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to send DeviceDiscoverabilityReq to the GO\n")); pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO = FALSE; - + pP2PInfo->State = P2P_STATE_DEVICE_DISCOVERABILITY_REQ_SEND; PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); } } @@ -3376,7 +3376,7 @@ P2P_OnAssocReqAccept( rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + if(NULL == (pP2PDeviceDesc = P2PProcessSubElements(pP2PInfo, pRfd, msg.devAddr, &msg, TRUE))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] reject because of invalid P2P Sub IE\n")); @@ -3442,55 +3442,55 @@ P2P_ClientOnDeauth( rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + // TODO: we may check whether this is from an AP (either WLAN AP or P2P GO) that has manageability attribute if(msg._minorReasonCode) {// has valid minor reason code RT_TRACE_F(COMP_P2P, DBG_LOUD, ("minor rsn code: %u\n", msg.minorReasonCode)); - + switch(msg.minorReasonCode) { default: // Reserved break; - + case P2P_MINOR_RESON_CROSS_CONNECTION: pP2PInfo->bWlanApRejection_CrossConnection = TRUE; - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("disable cross connection\n")); pP2PInfo->GroupCapability &= ~gcCrossConnection; // disable cross connection // - // After disable cross connection, we shall reconnect to the wlan AP + // After disable cross connection, we shall reconnect to the wlan AP // without corss connection bit set. // - + break; - - case P2P_MINOR_RESON_MANAGED_BIT: + + case P2P_MINOR_RESON_MANAGED_BIT: if(!(pP2PInfo->DeviceCapability & dcP2PInfrastructureManaged)) { pP2PInfo->bWlanApRejection_Unmanaged = TRUE; - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("disable P2P mode because of minor reason code 2 => should not send any P2P IE in ProbeReq and (Re)AssocReq\n")); MgntActSet_P2PMode(pP2PInfo->pAdapter, FALSE, FALSE, 1, 1, 1); } else { - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Receive deauth with minor rsn code 2 when managed P2P is enabled => ignore it\n")); } break; - + case P2P_MINOR_RESON_CONCURRENT_COEXISTENCE: if(pP2PInfo->DeviceCapability & dcP2PInfrastructureManaged) { pu1Byte pBssid = Frame_pBssid(*posMpdu); PRT_WLAN_BSS pBssDesc = NULL; pP2PInfo->bWlanApRejection_IncompatibleCoexistenceParameters = TRUE; - + if(pP2PInfo->Role != P2P_GO) break; @@ -3503,25 +3503,25 @@ P2P_ClientOnDeauth( } PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_SCAN_SPINLOCK); - //RT_TRACE_F(COMP_P2P, DBG_LOUD, + //RT_TRACE_F(COMP_P2P, DBG_LOUD, // ("disable P2P mode because of minor reason code 3\n")); //P2PDisconnect(pP2PInfo); //MgntActSet_P2PMode(pP2PInfo->pAdapter, FALSE, FALSE, 1, 1, 1); } break; - - case P2P_MINOR_RESON_INFRASTRUCTURE_MANAGED_BIT: + + case P2P_MINOR_RESON_INFRASTRUCTURE_MANAGED_BIT: if(pP2PInfo->DeviceCapability & dcP2PInfrastructureManaged) { pP2PInfo->bWlanApRejection_IncompatibleP2POperation = TRUE; - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("disable P2P mode because of minor reason code 4 and I'm a managed P2P Device\n")); MgntActSet_P2PMode(pP2PInfo->pAdapter, FALSE, FALSE, 1, 1, 1); } else { - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("ignore the deauth with minor reason code 4 bceause I'm NOT a managed P2P Device\n")); } @@ -3579,14 +3579,14 @@ P2P_OnGONReq( { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; + PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; int go; P2P_STATE CurrentState = pP2PInfo->State; // For bakcup state when neg failed. P2P_DEV_LIST_ENTRY *pDev = NULL; P2P_MESSAGE *msg = NULL; - + if(!P2P_ENABLED(GET_P2P_INFO(pAdapter))) return RT_STATUS_SUCCESS; @@ -3599,17 +3599,17 @@ P2P_OnGONReq( do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_GO_NEG_REQ, - pRfd, Frame_pSaddr(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_GO_NEG_REQ, + pRfd, Frame_pSaddr(*posMpdu), pP2PInfo->ListenChannel, &pDev)) ) { break; } - + msg = pDev->rxFrames[P2P_FID_GO_NEG_REQ]->msg; - + if(!p2p_validate_GoNegReq(msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; @@ -3627,14 +3627,14 @@ P2P_OnGONReq( // // Check state // - + if(pP2PInfo->Role == P2P_CLIENT) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Receive GoReq when we are client\n")); P2PIndicateDeviceReqClientGoFormation(pP2PInfo, pP2PDeviceDesc); pP2PDeviceDesc->Status = P2P_STATUS_FAIL_REJECTED_BY_USER; pP2PInfo->ConnectionContext.Status = pP2PDeviceDesc->Status; - goto exit_P2POnGONReq; + goto exit_P2POnGONReq; } else if(!P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && pP2PInfo->State > P2P_STATE_DEV_DISC_COMPLETE) @@ -3646,21 +3646,21 @@ P2P_OnGONReq( // // v1.07: - // If a Status attribute is present in the received GO Negotiation Request frame, - // the request is being used to signal user rejection of an earlier GO Negotiation Request + // If a Status attribute is present in the received GO Negotiation Request frame, + // the request is being used to signal user rejection of an earlier GO Negotiation Request // sent by the receiving P2P Device and shall be discarded with no further action. // if(msg->_status) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] has Status attr in GONegoReq, Status: %u\n", pP2PInfo->State)); rtStatus = RT_STATUS_INVALID_DATA; break; } - + // Copy device descriptor - PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, - pP2PDeviceDesc, + PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, + pP2PDeviceDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); // Reject overllapped GONego Req @@ -3673,7 +3673,7 @@ P2P_OnGONReq( } pP2PInfo->State = P2P_STATE_GO_NEGO_REQ_RECVD; - + if( P2P_DOING_DEVICE_DISCOVERY(pP2PInfo) ) { p2p_DevList_Unlock(&pP2PInfo->devList); @@ -3684,20 +3684,20 @@ P2P_OnGONReq( // Determine GO go = p2p_go_det(pP2PInfo->GOIntent, pP2PDeviceDesc->GOIntent); - if(go) + if(go) { RT_TRACE(COMP_P2P, DBG_LOUD, ("I'm going to be the GO\n")); - + pP2PInfo->ConnectionContext.bGoingToBeGO = TRUE; // Determine GO SSID - P2PDetermineGOSsid(pP2PInfo, pP2PInfo->SSIDBuf, &pP2PInfo->SSIDLen); + P2PDetermineGOSsid(pP2PInfo, pP2PInfo->SSIDBuf, &pP2PInfo->SSIDLen); } else if(0 == go) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("the target device is going to be the GO\n")); pP2PInfo->ConnectionContext.bGoingToBeGO = FALSE; - } + } else {// shall update the state machine RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] P2P_STATUS_FAIL_BOTH_P2P_DEVICES_INDICATED_GO_INTENT_OF_15\n")); @@ -3707,7 +3707,7 @@ P2P_OnGONReq( } // Check Device Password ID compatibility - { + { if(P2P_ADAPTER_RTK_SUPPORT_P2P(pAdapter) && !P2PDetermineGONegoDevPasswdIdCompaible(pP2PInfo->WpsDevPasswdId, msg->wpsDevPasswordId)) { @@ -3718,7 +3718,7 @@ P2P_OnGONReq( // // Check if peer is waiting for our user input // - if(msg->wpsDevPasswordId == P2P_WPS_DEV_PASSWD_ID_PBC || + if(msg->wpsDevPasswordId == P2P_WPS_DEV_PASSWD_ID_PBC || msg->wpsDevPasswordId == P2P_WPS_DEV_PASSWD_ID_DEFAULT || msg->wpsDevPasswordId == P2P_WPS_DEV_PASSWD_ID_REG_SPEC) { @@ -3727,16 +3727,16 @@ P2P_OnGONReq( cpMacAddr(pP2PInfo->DevAddrToReConnect, msg->devAddr); pP2PInfo->TimeStartWaitingForReinitiate = PlatformGetCurrentTime(); } - + goto exit_P2POnGONReq; } } - + // Check if channel is compatible if(pP2PInfo->ConnectionContext.bGoingToBeGO) - { - p2p_Channel_Intersect(&pP2PInfo->ChannelEntryList, - &pDev->p2p->channels, + { + p2p_Channel_Intersect(&pP2PInfo->ChannelEntryList, + &pDev->p2p->channels, &pDev->p2p->commonChannels); if(pDev->p2p->commonChannels.regClasses) @@ -3744,12 +3744,12 @@ P2P_OnGONReq( // Check if our op channel is one of channels supported by peer if(!p2p_Channel_InChannelEntryList(pP2PInfo->OperatingChannel, &pDev->p2p->commonChannels)) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to be GO, change op ch from: %d to %d\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to be GO, change op ch from: %d to %d\n", pP2PInfo->OperatingChannel, pDev->p2p->commonChannels.regClass[0].channel[0])); pP2PInfo->OperatingChannel = pDev->p2p->commonChannels.regClass[0].channel[0]; // alwyas use the first one } - + } // Win8 Go Negotiation Trick ----------------------------------------------------------------------------------------------------------------------- else if(MgntLinkStatusQuery(GetDefaultAdapter(pP2PInfo->pAdapter)) == RT_MEDIA_CONNECT) @@ -3759,15 +3759,15 @@ P2P_OnGONReq( pP2PInfo->OperatingChannel = MultiChannelGetPortConnected20MhzChannel(GetDefaultAdapter(pP2PInfo->pAdapter)); #endif - - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("WHCK Test Trick: Going to be GO, change op ch to default port connected channel: %d\n", pP2PInfo->OperatingChannel)); + + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("WHCK Test Trick: Going to be GO, change op ch to default port connected channel: %d\n", pP2PInfo->OperatingChannel)); } // --------------------------------------------------------------------------------------------------------------------------------------------- else // No Common Channel { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no common channels\n")); - RT_PRINT_DATA(COMP_P2P, DBG_WARNING, "[WARNING] peer supported op chnl:\n", - pP2PDeviceDesc->ChannelPlanChannel, + RT_PRINT_DATA(COMP_P2P, DBG_WARNING, "[WARNING] peer supported op chnl:\n", + pP2PDeviceDesc->ChannelPlanChannel, pP2PDeviceDesc->ChannelPlanLength); pP2PDeviceDesc->Status = P2P_STATUS_FAIL_NO_COMMON_CHANNELS; @@ -3788,29 +3788,29 @@ P2P_OnGONReq( // ========== exit_P2POnGONReq ========== exit_P2POnGONReq: - + if(MgntRoamingInProgress(pMgntInfo)) { if(MgntResetOrPnPInProgress(pAdapter)) { - RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 1\n")); + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("reset in progress case 1\n")); return RT_STATUS_FAILURE; - } - + } + MgntRoamComplete(pAdapter, MlmeStatus_refused); } // < Note> If failed, we shall not modify the original state machine state. if(P2P_STATUS_SUCCESS == pP2PDeviceDesc->Status) WFD_OnP2PActionFrame(pAdapter, pRfd, posMpdu); - + // If failed, indicate as early as possible if(pP2PDeviceDesc->Status != P2P_STATUS_SUCCESS && FrameBuf_Length(&msg->wpsAttributes)) { pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); } else @@ -3832,8 +3832,8 @@ P2P_OnGONReq( pP2PInfo->Status = pP2PInfo->ConnectionContext.Status; p2p_Send_GoNegRsp(pP2PInfo, pP2PDeviceDesc->DeviceAddress,pP2PDeviceDesc->DialogToken); - - RT_TRACE_F(COMP_P2P, DBG_LOUD, + + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("send GORsp with status = %u, intent = %u, tie breaker: %u\n", pP2PInfo->ConnectionContext.Status, pP2PInfo->GOIntent >> 1, @@ -3867,10 +3867,10 @@ P2P_OnGONReq( if(RT_STATUS_SUCCESS == rtStatus) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_GO_NEGOTIATION_REQUEST, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_GO_NEGOTIATION_REQUEST, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } @@ -3898,7 +3898,7 @@ P2P_OnGONRsp( { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; + PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; int go; P2P_DEV_LIST_ENTRY *pDev = NULL; @@ -3908,16 +3908,16 @@ P2P_OnGONRsp( return RT_STATUS_SUCCESS; FunctionIn(COMP_P2P); - + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2P_OnGONRsp():\n", posMpdu->Octet, posMpdu->Length); p2p_DevList_Lock(&pP2PInfo->devList); do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_GO_NEG_RSP, - pRfd, Frame_pSaddr(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_GO_NEG_RSP, + pRfd, Frame_pSaddr(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { @@ -3925,23 +3925,23 @@ P2P_OnGONRsp( } msg = pDev->rxFrames[P2P_FID_GO_NEG_RSP]->msg; - + if(!p2p_validate_GoNegRsp(pP2PInfo, msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + // Store the info in the P2P IE into pP2PDeviceDesc if(!P2PScanListFind(pP2PInfo->ScanList, pP2PInfo->ScanListSize, msg->devAddr, NULL, NULL)) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("peer is not in our scan list\n")); P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); } - + pP2PDeviceDesc = P2PProcessSubElements(pP2PInfo, pRfd, msg->devAddr, msg, FALSE); if(pP2PDeviceDesc == NULL) - { + { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] reject because of invalid P2P Sub IE\n")); rtStatus = RT_STATUS_INVALID_DATA; break; @@ -3959,16 +3959,16 @@ P2P_OnGONRsp( // Update ConnectionContext.ConnectingDevice since after P2PProcessSubElements, // its ChannelList or other elements may be modified. // - PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, - pP2PDeviceDesc, + PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, + pP2PDeviceDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); // Compare DialogToken if(!P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && pP2PDeviceDesc->DialogToken != pP2PInfo->ConnectionContext.DialogToken) {// Dialog Token mismatch - RT_TRACE_F(COMP_P2P, DBG_WARNING, - ("[WARNING] dialog token mismatch, recvd: %u, self: %u\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, + ("[WARNING] dialog token mismatch, recvd: %u, self: %u\n", pP2PDeviceDesc->DialogToken, pP2PInfo->ConnectionContext.DialogToken)); rtStatus = RT_STATUS_INVALID_DATA; @@ -3983,7 +3983,7 @@ P2P_OnGONRsp( {// Group Formation ends on reception of a GONRsp with status other than success pP2PInfo->ConnectionContext.Status = pP2PDeviceDesc->Status; pP2PInfo->State = P2P_STATE_GO_NEGO_COMPLETE; - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] status (%u) of the GONRsp is not success\n", pP2PDeviceDesc->Status)); PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); @@ -3991,15 +3991,15 @@ P2P_OnGONRsp( if(RUNTIME_OS_WIN_FROM_WIN8(pP2PInfo->pAdapter)) { - break; // break with status success to indicate go neg rsp + break; // break with status success to indicate go neg rsp } - + pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); - + rtStatus = RT_STATUS_INVALID_STATE; break; } @@ -4017,22 +4017,22 @@ P2P_OnGONRsp( // Determine GO go = p2p_go_det(pP2PInfo->GOIntent, pP2PDeviceDesc->GOIntent); - if(go) + if(go) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("I'm going to be the GO\n")); - + pP2PInfo->ConnectionContext.bGoingToBeGO = TRUE; // Determine GO SSID - P2PDetermineGOSsid(pP2PInfo, pP2PInfo->SSIDBuf, &pP2PInfo->SSIDLen); + P2PDetermineGOSsid(pP2PInfo, pP2PInfo->SSIDBuf, &pP2PInfo->SSIDLen); } else if(0 == go) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("the target device is going to be the GO\n")); pP2PInfo->ConnectionContext.bGoingToBeGO = FALSE; - } + } else { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] P2P_STATUS_FAIL_BOTH_P2P_DEVICES_INDICATED_GO_INTENT_OF_15\n")); @@ -4051,10 +4051,10 @@ P2P_OnGONRsp( // Check if channel is compatible - p2p_Channel_Intersect(&pP2PInfo->ChannelEntryList, - &pDev->p2p->channels, + p2p_Channel_Intersect(&pP2PInfo->ChannelEntryList, + &pDev->p2p->channels, &pDev->p2p->commonChannels); - + if(pP2PInfo->ConnectionContext.bGoingToBeGO) { if(pDev->p2p->commonChannels.regClasses) // use P2PMakeP2PChannelEntryList to test if we have common channels @@ -4062,19 +4062,19 @@ P2P_OnGONRsp( // Check if our op channel is one of channels supported by peer if(!p2p_Channel_InChannelEntryList(pP2PInfo->OperatingChannel, &pDev->p2p->commonChannels)) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to be GO, change op ch from: %d to %d\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to be GO, change op ch from: %d to %d\n", pP2PInfo->OperatingChannel, pDev->p2p->commonChannels.regClass[0].channel[0])); // TODO: we may not support the 1st channel supported by peer pP2PInfo->OperatingChannel = pDev->p2p->commonChannels.regClass[0].channel[0]; // alwyas use the first one } - + } else // no common channel { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no common channels: %p\n", &pP2PInfo->ConnectionContext.ConnectingDevice)); - RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ChnlList Recvd:\n", - pP2PDeviceDesc->ChannelPlanChannel, + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ChnlList Recvd:\n", + pP2PDeviceDesc->ChannelPlanChannel, pP2PDeviceDesc->ChannelPlanLength); pP2PDeviceDesc->Status = P2P_STATUS_FAIL_NO_COMMON_CHANNELS; pP2PInfo->ConnectionContext.Status = pP2PDeviceDesc->Status; @@ -4103,7 +4103,7 @@ P2P_OnGONRsp( pP2PInfo->ConnectionContext.DialogToken = pP2PDeviceDesc->DialogToken; // no use pP2PInfo->ConnectionContext.FindPhaseLoopTimes = P2P_SCAN_FIND_PHASE_LOOP_TIMES; // no use - + exit_P2POnGONRsp: if(P2P_STATUS_SUCCESS == pP2PDeviceDesc->Status) @@ -4114,9 +4114,9 @@ P2P_OnGONRsp( if(pP2PDeviceDesc->Status != P2P_STATUS_SUCCESS) { pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); } @@ -4150,16 +4150,16 @@ P2P_OnGONRsp( } } } - }while(FALSE); + }while(FALSE); p2p_DevList_Unlock(&pP2PInfo->devList); if(RT_STATUS_SUCCESS == rtStatus) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_GO_NEGOTIATION_RESPONSE, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_GO_NEGOTIATION_RESPONSE, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } @@ -4197,24 +4197,24 @@ P2P_OnGONConfirm( return RT_STATUS_SUCCESS; FunctionIn(COMP_P2P); - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnGONConfirm():\n", posMpdu->Octet, posMpdu->Length); p2p_DevList_Lock(&pP2PInfo->devList); do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_GO_NEG_CONF, - pRfd, Frame_pSaddr(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_GO_NEG_CONF, + pRfd, Frame_pSaddr(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { break; } - + msg = pDev->rxFrames[P2P_FID_GO_NEG_CONF]->msg; - + if(!p2p_validate_GoNegConfirm(pP2PInfo->ConnectionContext.bGoingToBeGO, msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; @@ -4242,7 +4242,7 @@ P2P_OnGONConfirm( // Check DialogToken if(pP2PDeviceDesc->DialogToken != pP2PInfo->ConnectionContext.DialogToken) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] dialog token mismatch: mine(%u), peer(%u)\n", pP2PInfo->ConnectionContext.DialogToken, pP2PDeviceDesc->DialogToken)); @@ -4255,7 +4255,7 @@ P2P_OnGONConfirm( } if(pP2PDeviceDesc->Status != P2P_STATUS_SUCCESS) - { + { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WRNING] status of the GONConfirm is not success\n")); pP2PInfo->ConnectionContext.Status = pP2PDeviceDesc->Status; pP2PInfo->State = P2P_STATE_GO_NEGO_COMPLETE; @@ -4264,24 +4264,24 @@ P2P_OnGONConfirm( { break; // break with status success to indicate go neg conf } - + rtStatus = RT_STATUS_INVALID_DATA; break; } - PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, - pP2PDeviceDesc, + PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, + pP2PDeviceDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); - + // Check if channel is compatible if(pP2PInfo->ConnectionContext.bGoingToBeGO) { // Check if our op channel is one of channels supported by peer - if(!P2PIsChnlInChnlList(pP2PDeviceDesc->ChannelPlanChannel, - pP2PDeviceDesc->ChannelPlanLength, + if(!P2PIsChnlInChnlList(pP2PDeviceDesc->ChannelPlanChannel, + pP2PDeviceDesc->ChannelPlanLength, pP2PInfo->OperatingChannel)) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to be GO, change op ch from: %d to %d\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("going to be GO, change op ch from: %d to %d\n", pP2PInfo->OperatingChannel, pP2PDeviceDesc->ChannelPlanChannel[0])); // TODO: we may not support the 1st channel supported by peer @@ -4290,11 +4290,11 @@ P2P_OnGONConfirm( } else {// Client - if(!P2PIsChnlInChnlEntryList(&pP2PInfo->ChannelEntryList, + if(!P2PIsChnlInChnlEntryList(&pP2PInfo->ChannelEntryList, pP2PDeviceDesc->OperatingChannel)) {// the intended chnl of the GO is not supported - RT_TRACE_F(COMP_P2P, DBG_LOUD, - ("the intended channel (%u) of the GO is not supported\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, + ("the intended channel (%u) of the GO is not supported\n", pP2PDeviceDesc->OperatingChannel)); pP2PDeviceDesc->Status = P2P_STATUS_FAIL_NO_COMMON_CHANNELS; pP2PInfo->ConnectionContext.Status = pP2PDeviceDesc->Status; @@ -4302,10 +4302,10 @@ P2P_OnGONConfirm( } else {// use the intended op chnl of the GO - pP2PInfo->OperatingChannel = pP2PDeviceDesc->OperatingChannel; + pP2PInfo->OperatingChannel = pP2PDeviceDesc->OperatingChannel; RT_PRINT_STR(COMP_P2P, DBG_LOUD, "P2P_OnGONConfirm(): I'm client, the target SSID = ", pP2PInfo->ConnectionContext.ConnectingDevice.SsidBuf, pP2PInfo->ConnectionContext.ConnectingDevice.SsidLen); - } + } } pP2PDeviceDesc->Status = P2P_STATUS_SUCCESS; @@ -4313,15 +4313,15 @@ P2P_OnGONConfirm( exit_P2POnGONConfirm: if(P2P_STATUS_SUCCESS == pP2PDeviceDesc->Status) - { + { WFD_OnP2PActionFrame(pAdapter, pRfd, posMpdu); - } + } else { pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); } @@ -4338,13 +4338,13 @@ P2P_OnGONConfirm( if(RT_STATUS_SUCCESS == rtStatus) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_GO_NEGOTIATION_CONFIRM, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_GO_NEGOTIATION_CONFIRM, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("status: %u\n", pP2PInfo->ConnectionContext.Status)); return rtStatus; } @@ -4369,7 +4369,7 @@ P2P_OnInvitationReq( RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; - PP2P_DEVICE_DISCRIPTOR pClientInvitationInfo = NULL; + PP2P_DEVICE_DISCRIPTOR pClientInvitationInfo = NULL; static u8Byte TimeStamp = 0; static u2Byte PreviousToken = 0xFFFF; u8Byte CurrentTime = 0; @@ -4394,8 +4394,8 @@ P2P_OnInvitationReq( if(CurrentTime - TimeStamp < 2000000 && TimeStamp != 0 && (0xFFFF != PreviousToken && (u1Byte)PreviousToken == *((pu1Byte)posMpdu->Octet + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN))) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, - ("[WARNING] recv InvitationReq too often => reject, time diff: %d, token = %d\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, + ("[WARNING] recv InvitationReq too often => reject, time diff: %d, token = %d\n", (u4Byte)(CurrentTime - TimeStamp), *((pu1Byte)posMpdu->Octet + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN))); return RT_STATUS_MEDIA_BUSY; } @@ -4403,16 +4403,16 @@ P2P_OnInvitationReq( // we get here at the first time (since TimeStamp is 0), and we get the correct TimeStamp TimeStamp = CurrentTime; PreviousToken = *((pu1Byte)posMpdu->Octet + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnInvitationReq():\n", posMpdu->Octet, posMpdu->Length); p2p_DevList_Lock(&pP2PInfo->devList); do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_INV_REQ, - pRfd, Frame_pSaddr(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_INV_REQ, + pRfd, Frame_pSaddr(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { @@ -4420,13 +4420,13 @@ P2P_OnInvitationReq( } msg = pDev->rxFrames[P2P_FID_INV_REQ]->msg; - + if(!p2p_validate_InvitationReq(msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + pGenBufClientInvitationInfo = GetGenTempBuffer (pAdapter, sizeof(P2P_DEVICE_DISCRIPTOR)); pClientInvitationInfo = (P2P_DEVICE_DISCRIPTOR *)pGenBufClientInvitationInfo->Buffer.Ptr; @@ -4435,7 +4435,7 @@ P2P_OnInvitationReq( { bBackwardInvite = TRUE; } - + if(!bBackwardInvite) PlatformZeroMemory(&(pP2PInfo->InvitationContext), sizeof(P2P_INVITATION_CONTEXT)); PlatformZeroMemory((pClientInvitationInfo), sizeof(P2P_DEVICE_DISCRIPTOR)); @@ -4444,8 +4444,8 @@ P2P_OnInvitationReq( // If we are not P2P Device, reject, since the invitor can communicate with us by join our group. if(!P2P_ACTING_AS_DEVICE(pP2PInfo)) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, - ("[WARNING] reject because current role is: %u, state is: %u\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, + ("[WARNING] reject because current role is: %u, state is: %u\n", pP2PInfo->Role, pP2PInfo->State)); pP2PInfo->InvitationContext.Status = P2P_STATUS_FAIL_INVALID_PARAMETERS; break; @@ -4458,7 +4458,7 @@ P2P_OnInvitationReq( pP2PInfo->InvitationContext.InvitorRole = eqMacAddr(msg->grpDevAddr, msg->devAddr) ? (P2P_GO) : (P2P_CLIENT); pP2PInfo->InvitationContext.bPersistentInvitation = TEST_FLAG(msg->invitationFlags, BIT0); cpMacAddr(pP2PInfo->InvitationContext.GODeviceAddress, msg->grpDevAddr); - CopySsid(pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen, msg->grpSsid, msg->grpSsidLen); + CopySsid(pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen, msg->grpSsid, msg->grpSsidLen); PeerRole = pP2PInfo->InvitationContext.InvitorRole; // Parse the subelements and store the info in P2PDeviceDesc @@ -4565,8 +4565,8 @@ P2P_OnInvitationReq( else // No Common Channel { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no common channels\n")); - RT_PRINT_DATA(COMP_P2P, DBG_WARNING, "[WARNING] peer supported op chnl:\n", - pClientInvitationInfo->ChannelPlanChannel, + RT_PRINT_DATA(COMP_P2P, DBG_WARNING, "[WARNING] peer supported op chnl:\n", + pClientInvitationInfo->ChannelPlanChannel, pClientInvitationInfo->ChannelPlanLength); pP2PInfo->InvitationContext.Status = P2P_STATUS_FAIL_NO_COMMON_CHANNELS; @@ -4576,7 +4576,7 @@ P2P_OnInvitationReq( if(MgntRoamingInProgress(pMgntInfo)) MgntRoamComplete(pAdapter, MlmeStatus_refused); - + // // Copy required info for constructing InvitationRsp @@ -4601,7 +4601,7 @@ P2P_OnInvitationReq( if(PeerRole == P2P_GO) { PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; - + pP2PDeviceDesc = P2PScanListFind(pP2PInfo->ScanList, pP2PInfo->ScanListSize, msg->devAddr, NULL, NULL); if(NULL != pP2PDeviceDesc) { @@ -4628,13 +4628,13 @@ P2P_OnInvitationReq( && FALSE == pP2PInfo->InvitationContext.bPersistentInvitation ) {// Invited by a P2P Group member to join the group - if(FALSE == P2PIsChnlInChnlEntryList(&pP2PInfo->ChannelEntryList, + if(FALSE == P2PIsChnlInChnlEntryList(&pP2PInfo->ChannelEntryList, pClientInvitationInfo->OperatingChannel)) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] peer GO op chnl (%u) not supported, reply no common channels\n", pClientInvitationInfo->OperatingChannel)); pP2PInfo->InvitationContext.Status = P2P_STATUS_FAIL_NO_COMMON_CHANNELS; - pP2PInfo->ConnectionContext.Status = pP2PInfo->InvitationContext.Status; + pP2PInfo->ConnectionContext.Status = pP2PInfo->InvitationContext.Status; break; } } @@ -4646,7 +4646,7 @@ P2P_OnInvitationReq( ) {// reinvoked as a GO BOOLEAN bToIndicDevDiscComp = FALSE; - + if(P2P_DOING_DEVICE_DISCOVERY(pP2PInfo)) {// Doing P2P Device Discovery RT_TRACE_F(COMP_MLME, DBG_LOUD, ("P2P_DOING_DEVICE_DISCOVERY: P2PScanListCeaseScan\n")); @@ -4665,7 +4665,7 @@ P2P_OnInvitationReq( // P2PScanListCeaseScan(pP2PInfo); // P2PExtendedListenComplete(pP2PInfo); } - else if(MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo)) + else if(MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo)) {// Doing normal scan RT_TRACE_F(COMP_MLME, DBG_LOUD, ("bScanInProgress: P2PScanListCeaseScan\n")); p2p_DevList_Unlock(&pP2PInfo->devList); @@ -4699,7 +4699,7 @@ P2P_OnInvitationReq( PlatformMoveMemory(LibInvitationReq.GroupBssid, pP2PInfo->InvitationContext.GroupBssid, 6); PlatformMoveMemory(LibInvitationReq.GroupDeviceAddress, pP2PInfo->InvitationContext.GODeviceAddress, 6); LibInvitationReq.GroupSsidLen = pP2PInfo->InvitationContext.SsidLen; - PlatformMoveMemory(LibInvitationReq.GroupSsidBuf, pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen); + PlatformMoveMemory(LibInvitationReq.GroupSsidBuf, pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen); // // Send Invitation Rsp @@ -4710,7 +4710,7 @@ P2P_OnInvitationReq( CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pAdapter), 100); p2p_Send_InvitationRsp(pP2PInfo, msg->devAddr, LibInvitationReq.DialogToken); - if(P2P_STATUS_SUCCESS == pP2PInfo->InvitationContext.Status + if(P2P_STATUS_SUCCESS == pP2PInfo->InvitationContext.Status || P2P_STATUS_FAIL_INFORMATION_IS_UNAVAILABLE == pP2PInfo->InvitationContext.Status || P2P_STATUS_FAIL_UNABLE_TO_ACCOMODATE_REQUEST == pP2PInfo->InvitationContext.Status ) @@ -4720,7 +4720,7 @@ P2P_OnInvitationReq( P2PIndicateOnInvitationReq(pP2PInfo, &LibInvitationReq); } - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, (" send InvitationRsp with status = %u\n", pP2PInfo->InvitationContext.Status)); @@ -4736,15 +4736,15 @@ P2P_OnInvitationReq( if(RT_STATUS_SUCCESS == rtStatus) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_INVITATION_REQUEST, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_INVITATION_REQUEST, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } - - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("<=== status: %u\n", pP2PInfo->InvitationContext.Status)); + + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("<=== status: %u\n", pP2PInfo->InvitationContext.Status)); return rtStatus; } @@ -4768,7 +4768,7 @@ P2P_OnInvitationRsp( { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; + PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; static u8Byte TimeStamp = 0; u4Byte ConfigurationTimeout = 0; // in ms, note that the configuration time out in the P2P IE is defined as units of 10ms @@ -4777,28 +4777,28 @@ P2P_OnInvitationRsp( if(!P2P_ENABLED(GET_P2P_INFO(pAdapter))) return RT_STATUS_SUCCESS; - + RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2POnInvitationRsp(): port number %d state %d\n", pP2PInfo->pAdapter->pNdis62Common->PortNumber, pP2PInfo->State)); FunctionIn(COMP_P2P); - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnInvitationRsp():\n", posMpdu->Octet, posMpdu->Length); p2p_DevList_Lock(&pP2PInfo->devList); do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_INV_RSP, - pRfd, Frame_pSaddr(*posMpdu), + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_INV_RSP, + pRfd, Frame_pSaddr(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { break; } - + msg = pDev->rxFrames[P2P_FID_INV_RSP]->msg; - + if(!p2p_validate_InvitationRsp(pP2PInfo->InvitationContext.InvitorRole, msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; @@ -4809,12 +4809,12 @@ P2P_OnInvitationRsp( if(!P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && pP2PInfo->State != P2P_STATE_INVITATION_RSP_WAIT) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] recv InvitationRsp in an invalid state: %u\n", pP2PInfo->State)); rtStatus = RT_STATUS_INVALID_STATE; break; } - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("dialog token: %u\n", msg->dialogToken)); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2P_OnInvitationRsp():\n", posMpdu->Octet, posMpdu->Length); @@ -4829,8 +4829,8 @@ P2P_OnInvitationRsp( // Update ConnectionContext.ConnectingDevice since after P2PProcessSubElements, // its ChannelList or other elements may be modified. - PlatformMoveMemory(&pP2PInfo->InvitationContext.InvitedDevice, - pP2PDeviceDesc, + PlatformMoveMemory(&pP2PInfo->InvitationContext.InvitedDevice, + pP2PDeviceDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); // If we'll be the client, we shall wait for AP configuration timeout @@ -4843,7 +4843,7 @@ P2P_OnInvitationRsp( {// I'm going to be the GO ConfigurationTimeout = 0; //(10 * MAX(pP2PInfo->GOConfigurationTimeout, pP2PInfo->InvitationContext.InvitedDevice.ClientConfigurationTimeout)); } - else + else {// I'm going to be the Client => wait for peer to be ready for connection ConfigurationTimeout = (10 * MAX(pP2PInfo->ClientConfigurationTimeout, pP2PInfo->InvitationContext.InvitedDevice.GOConfigurationTimeout)); } @@ -4870,7 +4870,7 @@ P2P_OnInvitationRsp( // ----------------------------------------------------------------------------- P2PScanListEnterScanCompleteImmediately(pP2PInfo); - + pP2PInfo->State = P2P_STATE_INVITATION_COMPLETE; PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, ConfigurationTimeout); @@ -4880,13 +4880,13 @@ P2P_OnInvitationRsp( if(RT_STATUS_SUCCESS == rtStatus) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_INVITATION_RESPONSE, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_INVITATION_RESPONSE, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } - + return rtStatus; } @@ -4908,7 +4908,7 @@ P2P_OnDeviceDiscoverabilityReq( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); + PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); pu1Byte StaInterfaceAddress = NULL; u1Byte i = 0; PRT_WLAN_STA pEntry = NULL; @@ -4928,7 +4928,7 @@ P2P_OnDeviceDiscoverabilityReq( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Not act as GO!\n")); return RT_STATUS_INVALID_STATE; } - + FunctionIn(COMP_P2P); RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnDeviceDiscoverabilityReq():\n", posMpdu->Octet, posMpdu->Length); @@ -4941,7 +4941,7 @@ P2P_OnDeviceDiscoverabilityReq( rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + // Find STA Interface Address for(i = 0;i < ASSOCIATE_ENTRY_NUM; i++) { @@ -4974,7 +4974,7 @@ P2P_OnDeviceDiscoverabilityReq( }while(FALSE); p2p_parse_FreeMessage(&msg); - + FunctionOut(COMP_P2P); return rtStatus; } @@ -4997,7 +4997,7 @@ P2P_OnDeviceDiscoverabilityRsp( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); + PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); PP2P_CLIENT_INFO_DISCRIPTOR pClient = NULL; PP2P_DEVICE_DISCRIPTOR pGO = NULL; @@ -5007,7 +5007,7 @@ P2P_OnDeviceDiscoverabilityRsp( return RT_STATUS_SUCCESS; FunctionIn(COMP_P2P); - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnDeviceDiscoverabilityRsp():\n", posMpdu->Octet, posMpdu->Length); do @@ -5018,7 +5018,7 @@ P2P_OnDeviceDiscoverabilityRsp( rtStatus =RT_STATUS_MALFORMED_PKT; break; } - + // Check state if(pP2PInfo->State != P2P_STATE_DEVICE_DISCOVERABILITY_RSP_WAIT) { @@ -5042,9 +5042,9 @@ P2P_OnDeviceDiscoverabilityRsp( pP2PInfo->DeviceDiscoverabilityContext.Status = (P2P_STATUS_CODE)msg.status; // Find the client and its GO - if(!P2PScanListFindClient(pP2PInfo->ScanList, pP2PInfo->ScanListSize, - pP2PInfo->DeviceDiscoverabilityContext.ClientDeviceAddress, - NULL, + if(!P2PScanListFindClient(pP2PInfo->ScanList, pP2PInfo->ScanListSize, + pP2PInfo->DeviceDiscoverabilityContext.ClientDeviceAddress, + NULL, &pGO, &pClient)) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("client not found\n")); @@ -5065,7 +5065,7 @@ P2P_OnDeviceDiscoverabilityRsp( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] dcP2PClientDiscoverability bit in client is not set!\n")); break; } - PlatformMoveMemory(&(pP2PInfo->ConnectionContext.ConnectingDevice.DeviceAddress), + PlatformMoveMemory(&(pP2PInfo->ConnectionContext.ConnectingDevice.DeviceAddress), pP2PInfo->DeviceDiscoverabilityContext.ClientDeviceAddress, 6); pP2PInfo->ConnectionContext.Status = P2P_STATUS_SUCCESS; pP2PInfo->ConnectionContext.DialogToken = IncreaseDialogToken(pP2PInfo->DialogToken); @@ -5080,7 +5080,7 @@ P2P_OnDeviceDiscoverabilityRsp( }while(FALSE); p2p_parse_FreeMessage(&msg); - + return rtStatus; } @@ -5107,7 +5107,7 @@ P2P_OnGODiscoverabilityReq( PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); FunctionIn(COMP_P2P); - RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2P_OnGODiscoverabilityReq():\n", + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2P_OnGODiscoverabilityReq():\n", posMpdu->Octet, posMpdu->Length); if(pPSC->bLeisurePs || pMgntInfo->dot11PowerSaveMode != eActive) { @@ -5136,7 +5136,7 @@ P2P_OnProvisionDiscoveryReq( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); + PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); u8Byte CurrentTime = PlatformGetCurrentTime(); static u8Byte LastTime = 0; PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; @@ -5145,13 +5145,13 @@ P2P_OnProvisionDiscoveryReq( P2P_DEV_LIST_ENTRY *pDev = NULL; P2P_MESSAGE *msg = NULL; - + if(!P2P_ENABLED(GET_P2P_INFO(pAdapter))) return RT_STATUS_SUCCESS; FunctionIn(COMP_P2P); - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnDeviceDiscoverabilityRsp():\n", posMpdu->Octet, posMpdu->Length); p2p_DevList_Lock(&pP2PInfo->devList); @@ -5163,24 +5163,24 @@ P2P_OnProvisionDiscoveryReq( bFirstSeen = (NULL == p2p_DevList_Find(&pP2PInfo->devList, Frame_pSaddr(*posMpdu), P2P_DEV_TYPE_DEV)); p2p_DevList_FlushActionFrames(&pP2PInfo->devList, Frame_pSaddr(*posMpdu), P2P_DEV_TYPE_DEV); - - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_PD_REQ, - pRfd, Frame_pSaddr(*posMpdu), + + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_PD_REQ, + pRfd, Frame_pSaddr(*posMpdu), RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { break; } - + msg = pDev->rxFrames[P2P_FID_PD_REQ]->msg; - + if(!p2p_validate_PDReq(msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + if(CurrentTime - LastTime < 1000000) {// this is to prevent the device from showing notifications to user too often rtStatus = RT_STATUS_PKT_DROP; @@ -5206,12 +5206,12 @@ P2P_OnProvisionDiscoveryReq( } else {// config method not compatible - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("[WARNING] recvd CM (%u) not compatible with my CM (%u)\n", msg->wpsConfigMethods, pP2PInfo->WpsAttributes.ConfigMethod)); rspConfigMethod = 0; // set to NULL to indicate failure } - + // Indicate OnPDReq before P2PSvc processes it if(bFirstSeen) { @@ -5228,9 +5228,9 @@ P2P_OnProvisionDiscoveryReq( if(msg->_listenChannel) pP2PDeviceDesc->ListenChannel = msg->listenChannel; } - + // Update the latest scan list to upper layer. - P2PScanListCopy(pP2PInfo->ScanList4Query, &pP2PInfo->ScanList4QuerySize, + P2PScanListCopy(pP2PInfo->ScanList4Query, &pP2PInfo->ScanList4QuerySize, pP2PInfo->ScanList, pP2PInfo->ScanListSize); P2PIndicateScanList(pP2PInfo); @@ -5241,7 +5241,7 @@ P2P_OnProvisionDiscoveryReq( if(bToSendPDRsp) { BOOLEAN bSupportTxReport = FALSE; - + // // Send ProvisionDiscoveryRsp // @@ -5263,10 +5263,10 @@ P2P_OnProvisionDiscoveryReq( if(rtStatus == RT_STATUS_SUCCESS) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_REQUEST, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_REQUEST, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } @@ -5293,7 +5293,7 @@ P2P_OnProvisionDiscoveryRsp( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); + PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); P2P_DEV_LIST_ENTRY *pDev = NULL; P2P_MESSAGE *msg = NULL; @@ -5302,39 +5302,39 @@ P2P_OnProvisionDiscoveryRsp( return RT_STATUS_SUCCESS; FunctionIn(COMP_P2P); - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnDeviceDiscoverabilityRsp():\n", posMpdu->Octet, posMpdu->Length); p2p_DevList_Lock(&pP2PInfo->devList); do { - if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, - P2P_FID_PD_RSP, - pRfd, - pP2PInfo->ProvisionDiscoveryContext.go - ? pP2PInfo->ProvisionDiscoveryContext.goBssid - : pP2PInfo->ProvisionDiscoveryContext.devAddr, + if(RT_STATUS_SUCCESS != (rtStatus = p2p_DevList_RxUpdate(&pP2PInfo->devList, + P2P_FID_PD_RSP, + pRfd, + pP2PInfo->ProvisionDiscoveryContext.go + ? pP2PInfo->ProvisionDiscoveryContext.goBssid + : pP2PInfo->ProvisionDiscoveryContext.devAddr, RT_GetChannelNumber(pP2PInfo->pAdapter), &pDev)) ) { break; } - + msg = pDev->rxFrames[P2P_FID_PD_RSP]->msg; - + if(!p2p_validate_PDRsp(msg)) { rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + // Check DialogToken if(!P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && msg->dialogToken != pDev->txFrames[P2P_FID_PD_REQ]->token ) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] dialog token mismatch: peer(%u), mine(%u)\n", msg->dialogToken, pDev->txFrames[P2P_FID_PD_REQ]->token)); rtStatus = RT_STATUS_INVALID_DATA; @@ -5343,8 +5343,8 @@ P2P_OnProvisionDiscoveryRsp( p2p_DevList_DialogTokenUpdate(pDev); - RT_TRACE_F(COMP_P2P, DBG_LOUD, - ("CM requested: %u, CM responded: %u\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, + ("CM requested: %u, CM responded: %u\n", pDev->p2p->pdConfigMethod, msg->wpsConfigMethods)); if(!P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) @@ -5363,28 +5363,28 @@ P2P_OnProvisionDiscoveryRsp( CustomScan_TermReq(GET_CUSTOM_SCAN_INFO(pAdapter), FALSE); p2p_DevList_Lock(&pP2PInfo->devList); - P2PSvc_OnPDRsp(pP2PInfo->pP2PSvcInfo, + P2PSvc_OnPDRsp(pP2PInfo->pP2PSvcInfo, pDev->mac, pDev->p2p->pdConfigMethod, - msg->wpsConfigMethods, + msg->wpsConfigMethods, &msg->p2pAttributes.os ); pP2PInfo->State = P2P_STATE_PROVISION_DISCOVERY_COMPLETE; PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 1); + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 1); }while(FALSE); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, (" %u\n", pP2PInfo->ConnectionContext.Status)); p2p_DevList_Unlock(&pP2PInfo->devList); if(rtStatus == RT_STATUS_SUCCESS) { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, - RT_STATUS_SUCCESS, - posMpdu->Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, + RT_STATUS_SUCCESS, + posMpdu->Octet, posMpdu->Length); } @@ -5440,14 +5440,14 @@ P2P_OnSDReq( // if(posMpdu->Length < FRAME_OFFSET_GAS_INIT_REQ_SERVICE_REQ_TLV) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] frame lengh (%u) < min SDReq lenght (%u)\n", posMpdu->Length, FRAME_OFFSET_GAS_INIT_REQ_SERVICE_REQ_TLV)); return RT_STATUS_MALFORMED_PKT; } - - //RT_PRINT_DATA(COMP_P2P, DBG_LOUD, - // "The ServiceDiscoveryReq Content : ", + + //RT_PRINT_DATA(COMP_P2P, DBG_LOUD, + // "The ServiceDiscoveryReq Content : ", // osPacket.Octet, osPacket.Length); // @@ -5471,10 +5471,10 @@ P2P_OnSDReq( // pSDReqRecvd = pP2PInfo->SDContext.ServiceReqRecvd; pSDReqRecvdSize = &pP2PInfo->SDContext.ServiceReqRecvdSize; - + PlatformZeroMemory(pSDReqRecvd, sizeof(P2P_SERVICE_REQ_TLV) * P2P_SD_MAX_SERVICES); *pSDReqRecvdSize = 0; - + // // Get ALL Service Req TLVs // @@ -5491,7 +5491,7 @@ P2P_OnSDReq( } // Validate the TLV length - if((pTLVCurrent + OFFSET_SERVICE_REQ_TLV_QUERY_DATA) > + if((pTLVCurrent + OFFSET_SERVICE_REQ_TLV_QUERY_DATA) > (posMpdu->Octet + posMpdu->Length)) { //pP2PInfo->SDContext.Status = P2P_SD_STATUS_BAD_REQUEST; @@ -5516,9 +5516,9 @@ P2P_OnSDReq( ( *((pu1Byte)(pTLVCurrent + OFFSET_SERVICE_REQ_TLV_SERVICE_PROT_TYPE)) ); // Read Service Transaction ID - pSDReqRecvd[*pSDReqRecvdSize].TransactionID = + pSDReqRecvd[*pSDReqRecvdSize].TransactionID = *((pu1Byte)(pTLVCurrent + OFFSET_SERVICE_REQ_TLV_SERVICE_TRANSACTION_ID)); - + // Get Query Data length QueryDataLen = TLVLenField - 2; // exclude ServiceProtType(1) and ServiceTransactionID(1) @@ -5530,8 +5530,8 @@ P2P_OnSDReq( } // Copy Query Data - PlatformMoveMemory(pSDReqRecvd[*pSDReqRecvdSize].ServiceDesc.Buffer, - pTLVCurrent + OFFSET_SERVICE_REQ_TLV_QUERY_DATA, + PlatformMoveMemory(pSDReqRecvd[*pSDReqRecvdSize].ServiceDesc.Buffer, + pTLVCurrent + OFFSET_SERVICE_REQ_TLV_QUERY_DATA, QueryDataLen); pSDReqRecvd[*pSDReqRecvdSize].ServiceDesc.BufferLength = QueryDataLen; @@ -5568,14 +5568,14 @@ P2P_OnSDReq( // for(i = 0; i < *pSDReqRecvdSize; i++) { - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Servicd Req TLV %u: Protocol: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Servicd Req TLV %u: Protocol: %u\n", i, pSDReqRecvd[i].ServiceDesc.ServiceType)); - RT_PRINT_DATA(COMP_P2P, DBG_LOUD, - "Query Data", + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, + "Query Data", pSDReqRecvd[i].ServiceDesc.Buffer, pSDReqRecvd[i].ServiceDesc.BufferLength); } - + Exit_P2POnSDReq: if(pP2PInfo->SDContext.Status == P2P_SD_STATUS_SUCCESS) @@ -5589,12 +5589,12 @@ P2P_OnSDReq( } Exit_P2POnSDReqNoRsp: - RT_TRACE_F(COMP_P2P, DBG_LOUD, - (" Status: %u, DialogToken: %u\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, + (" Status: %u, DialogToken: %u\n", pP2PInfo->SDContext.Status, DialogToken)); - return rtStatus; + return rtStatus; } // @@ -5638,7 +5638,7 @@ P2P_OnSDRsp( //} // Check if the SDRsp is from the intended peer - if(!eqMacAddr(pSDContext->TargetDeviceAddress, + if(!eqMacAddr(pSDContext->TargetDeviceAddress, Frame_pSaddr(*posMpdu))) { RT_PRINT_ADDR(COMP_P2P, DBG_WARNING, "P2P_OnSDRsp():[WARNING] mismatch addr = ", pSDContext->TargetDeviceAddress); @@ -5659,7 +5659,7 @@ P2P_OnSDRsp( if(*((pu1Byte)(posMpdu->Octet + FRAME_OFFSET_GAS_INIT_RSP_DIALOG_TOKEN)) != pSDContext->DialogToken) {// Dialog Token mismatch - RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] mismatch token target (%d) and mine (%d)!\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] mismatch token target (%d) and mine (%d)!\n", *((pu1Byte)(posMpdu->Octet + FRAME_OFFSET_GAS_INIT_RSP_DIALOG_TOKEN)), pSDContext->DialogToken)); return RT_STATUS_INVALID_DATA; } @@ -5676,7 +5676,7 @@ P2P_OnSDRsp( { // Status (11u) // Ignore - + // GAS Comeback Delay if(ReadEF2Byte(posMpdu->Octet + FRAME_OFFSET_GAS_INIT_RSP_COMEBACK_DELAY)) { @@ -5695,13 +5695,13 @@ P2P_OnSDRsp( // Service update indicator pSDContext->ServiceUpdateIndicator = ReadEF2Byte(posMpdu->Octet + FRAME_OFFSET_GAS_INIT_RSP_SERVICE_UPDATE_INDICATOR); // ignore - + // // Read the TLVs, a valid Rsp shall have at lease 1 TLV // { u1Byte index; - + pTLVCurrent = pTLVStart; PlatformZeroMemory(pP2PInfo->SDContext.ServiceRspRecvd, sizeof(P2P_SERVICE_RSP_TLV) * P2P_SD_MAX_SERVICES); @@ -5718,15 +5718,15 @@ P2P_OnSDRsp( { break; } - + // Make sure we can read until the end of Status Code filed, which is right before RSP_DATA - if((pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA) > + if((pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA) > (posMpdu->Octet + posMpdu->Length)) { pP2PInfo->SDContext.Status = P2P_SD_STATUS_BAD_RESPONSE_1; break; } - + // Length TLVLen = (ReadEF2Byte(pTLVCurrent + OFFSET_SERVICE_RSP_TLV_LEN)); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("TLVLen: %u\n", TLVLen)); @@ -5760,22 +5760,22 @@ P2P_OnSDRsp( ResponseDataLen = TLVLen - 3; if(ResponseDataLen > P2P_MAX_SERVICE_DESCRIPTOR_BUFFER_LEN) {// buffer overflow - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("Buffer size overflow: (%u) > (%u) \n", ResponseDataLen, P2P_MAX_SERVICE_DESCRIPTOR_BUFFER_LEN)); break; } - PlatformMoveMemory((pP2PInfo->SDContext.ServiceRspRecvd)[index].ServiceDesc.Buffer, - pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA, + PlatformMoveMemory((pP2PInfo->SDContext.ServiceRspRecvd)[index].ServiceDesc.Buffer, + pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA, ResponseDataLen); (pP2PInfo->SDContext.ServiceRspRecvd)[index].ServiceDesc.BufferLength = ResponseDataLen; - RT_PRINT_STR(COMP_P2P, DBG_LOUD, - "Recv TLV: ", - (pP2PInfo->SDContext.ServiceRspRecvd)[index].ServiceDesc.Buffer, + RT_PRINT_STR(COMP_P2P, DBG_LOUD, + "Recv TLV: ", + (pP2PInfo->SDContext.ServiceRspRecvd)[index].ServiceDesc.Buffer, (pP2PInfo->SDContext.ServiceRspRecvd)[index].ServiceDesc.BufferLength); } @@ -5807,7 +5807,7 @@ P2P_OnSDRsp( Exit_P2POnSDRsp: if(bFragment) - { + { // Update SDContext pSDContext->bDoingServiceDiscovery = TRUE; pSDContext->bFragment = TRUE; @@ -5821,7 +5821,7 @@ P2P_OnSDRsp( // Since P2PMgntTimerCallback() checks bScanInProgress before it enters the state machine, // we can't use the state machine to deal with the comeback procedure. // - p2p_Send_SDComebackReq(pP2PInfo, + p2p_Send_SDComebackReq(pP2PInfo, pP2PInfo->SDContext.TargetDeviceAddress, pP2PInfo->SDContext.DialogToken); @@ -5843,8 +5843,8 @@ P2P_OnSDRsp( PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 100); } - -Exit_P2POnSDRsp_SilentExit: + +Exit_P2POnSDRsp_SilentExit: RT_TRACE_F(COMP_P2P, DBG_LOUD, ("status: %u, bFragment: %u\n", pSDContext->Status, bFragment)); return rtStatus; @@ -5898,46 +5898,46 @@ P2P_OnSDComebackReq( { RT_PRINT_ADDR(COMP_P2P, DBG_WARNING, "P2P_OnSDComebackReq():[WARNING] mismatch addr = ", SrcAddr); return RT_STATUS_INVALID_DATA; - } - + } + // // Check Length // if(posMpdu->Length < FRAME_OFFSET_GAS_COMEBACK_REQ_DIALOG_TOKEN + 1) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] frame lengh (%u) < min SDReq lenght (%u)\n", posMpdu->Length, FRAME_OFFSET_GAS_COMEBACK_REQ_DIALOG_TOKEN + 1)); return RT_STATUS_MALFORMED_PKT; } - + // // Check DialogToken // DialogToken = *((pu1Byte)posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_REQ_DIALOG_TOKEN); if(DialogToken != pP2PInfo->SDContext.DialogToken) { - RT_TRACE_F(COMP_P2P, DBG_LOUD, + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("[WARNING] Target DialogToken (%d) and mine (%d) are mismatch\n", DialogToken, pP2PInfo->SDContext.DialogToken)); return RT_STATUS_INVALID_DATA; } - + // // Decide value of bMoreData // - if(pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset >= + if(pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset >= pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no more data to send\n")); return RT_STATUS_INVALID_STATE; } - else if(pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset< + else if(pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset< pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize) { u2Byte BytesSent = pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset; u2Byte TotalBytes = pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize; - + RemainingBytes = TotalBytes - BytesSent; if(RemainingBytes > pP2PInfo->SDRspFragmtntThreshold) @@ -5952,30 +5952,30 @@ P2P_OnSDComebackReq( } } - RT_TRACE_F(COMP_P2P, DBG_LOUD, - ("Remaining bytes(%u), Bytes to Copy(%u), bMoreData(%u)\n", - RemainingBytes, + RT_TRACE_F(COMP_P2P, DBG_LOUD, + ("Remaining bytes(%u), Bytes to Copy(%u), bMoreData(%u)\n", + RemainingBytes, BytesToCopy, bMoreData)); pP2PInfo->SDWaitForComebackReqSlotCount = 0; - - p2p_Send_SDComebackRsp(pP2PInfo, - SrcAddr, - DialogToken, - BytesToCopy, + + p2p_Send_SDComebackRsp(pP2PInfo, + SrcAddr, + DialogToken, + BytesToCopy, bMoreData); - + pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset += BytesToCopy; pP2PInfo->SDContext.FragmentID++; - + if(!bMoreData) { PlatformZeroMemory(&pP2PInfo->SDContext, sizeof(P2P_SD_CONTEXT)); CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pAdapter), P2P_SERVICE_DISCOVERY_COMEBACK_TIMEOUT); } - - RT_TRACE_F(COMP_P2P, DBG_LOUD, + + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bMoreData: %u\n", bMoreData)); return rtStatus; @@ -5996,7 +5996,7 @@ P2POnANQPQueryRspField( // // Note that we can store maximul P2P_SD_MAX_SERVICES TLVs // - + pu1Byte pTLVStart = ANQPQueryRspFieldBuf + 2 + 2 + 3 + 1 + 2; pu1Byte pTLVCurrent = pTLVStart; u2Byte TLVLen; @@ -6017,15 +6017,15 @@ P2POnANQPQueryRspField( { break; } - + // Validate the TLV length - if((pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA) > + if((pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA) > (ANQPQueryRspFieldBuf + ANQPQueryRspFieldSize)) { Ret = P2P_SD_STATUS_BAD_RESPONSE_1; break; } - + // Length TLVLen = (ReadEF2Byte(pTLVCurrent + OFFSET_SERVICE_RSP_TLV_LEN)); if(TLVLen < (u2Byte)(OFFSET_SERVICE_RSP_TLV_RSP_DATA - OFFSET_SERVICE_RSP_TLV_SERVICE_PROT_TYPE)) @@ -6041,11 +6041,11 @@ P2POnANQPQueryRspField( } // Service Protocol Type - (ServiceRspTLVList)[*pServiceRspTLVListSize].ServiceDesc.ServiceType = + (ServiceRspTLVList)[*pServiceRspTLVListSize].ServiceDesc.ServiceType = (P2P_SD_PROTOCOL) *((pu1Byte)(pTLVCurrent + OFFSET_SERVICE_RSP_TLV_SERVICE_PROT_TYPE)); // Status Code - (ServiceRspTLVList)[*pServiceRspTLVListSize].Status = + (ServiceRspTLVList)[*pServiceRspTLVListSize].Status = (P2P_SD_STATUS_CODE) *((pu1Byte)(pTLVCurrent + OFFSET_SERVICE_RSP_TLV_STATUS)); // For the last status (status of the entire SDComebackRsp), we currently get it from the last TLV Ret = (ServiceRspTLVList)[*pServiceRspTLVListSize].Status; @@ -6057,15 +6057,15 @@ P2POnANQPQueryRspField( ResponseDataLen = TLVLen - 3; if(ResponseDataLen > P2P_MAX_SERVICE_DESCRIPTOR_BUFFER_LEN) {// buffer overflow - RT_TRACE(COMP_P2P,DBG_LOUD, + RT_TRACE(COMP_P2P,DBG_LOUD, ("Buffer size overflow: (%u) > (%u) \n", ResponseDataLen, P2P_MAX_SERVICE_DESCRIPTOR_BUFFER_LEN)); break; } - PlatformMoveMemory((ServiceRspTLVList)[*pServiceRspTLVListSize].ServiceDesc.Buffer, - pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA, + PlatformMoveMemory((ServiceRspTLVList)[*pServiceRspTLVListSize].ServiceDesc.Buffer, + pTLVCurrent + OFFSET_SERVICE_RSP_TLV_RSP_DATA, ResponseDataLen); (ServiceRspTLVList)[*pServiceRspTLVListSize].ServiceDesc.BufferLength = ResponseDataLen; //DbgPrint("ResponseDataLen: %u\n", ResponseDataLen); @@ -6145,7 +6145,7 @@ P2P_OnSDComebackRsp( // // Check Dialog Token // - if(*((pu1Byte)posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_DIALOG_TOKEN) != + if(*((pu1Byte)posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_DIALOG_TOKEN) != pP2PInfo->SDContext.DialogToken) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Pkt DialogToken (%d) and mine (%d) are mismatch\n", @@ -6160,20 +6160,20 @@ P2P_OnSDComebackRsp( u1Byte GASQueryRspFragmentID = *((pu1Byte)posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_FRAG_ID); RT_TRACE(COMP_P2P, DBG_LOUD, ("GASQueryRspFragmentID: %u\n", GASQueryRspFragmentID)); - + if(GASQueryRspFragmentID & 0x80) { bMoreData = TRUE; } FragmentID = GASQueryRspFragmentID & (0x7F); } - + // // Check FragmentID // if(FragmentID != pP2PInfo->SDContext.FragmentID) { - RT_TRACE(COMP_P2P, DBG_WARNING, + RT_TRACE(COMP_P2P, DBG_WARNING, ("[WARNING] expected FragmentID mismatch: expected (%u), recvd (%u)\n", pP2PInfo->SDContext.FragmentID, FragmentID)); return RT_STATUS_INVALID_DATA; @@ -6182,7 +6182,7 @@ P2P_OnSDComebackRsp( { pP2PInfo->SDContext.FragmentID++; // indicates that we are expecting the next fragment } - + // // Get SDComebackRsp fields // @@ -6192,7 +6192,7 @@ P2P_OnSDComebackRsp( // GAS Rsp Fragment ID // Already processed - + // GAS Comeback Delay // Ignore @@ -6201,7 +6201,7 @@ P2P_OnSDComebackRsp( // Query Rsp Len QueryRspLen = ReadEF2Byte(posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_LEN); // ignore - + // // Defrag ANQP Query Rsp Field // @@ -6209,8 +6209,8 @@ P2P_OnSDComebackRsp( { if(pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize + QueryRspLen <= P2P_MAX_SERVICE_BUF_SIZE) { - PlatformMoveMemory(pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf + pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize, - posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_QUERY_RSP, + PlatformMoveMemory(pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf + pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize, + posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_QUERY_RSP, QueryRspLen); pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize += QueryRspLen; } @@ -6218,8 +6218,8 @@ P2P_OnSDComebackRsp( { // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_TRACE_F(COMP_P2P, DBG_SERIOUS, - ("[ERROR] no enough buf for the ComebackRsp: buflen(%u) + QueryRspLen(%u) > bufsize(%u)\n", + RT_TRACE_F(COMP_P2P, DBG_SERIOUS, + ("[ERROR] no enough buf for the ComebackRsp: buflen(%u) + QueryRspLen(%u) > bufsize(%u)\n", pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize, QueryRspLen, P2P_MAX_SERVICE_BUF_SIZE)); @@ -6230,10 +6230,10 @@ P2P_OnSDComebackRsp( // Service update indicator if(FragmentID == 0) { - pP2PInfo->SDContext.ServiceUpdateIndicator = + pP2PInfo->SDContext.ServiceUpdateIndicator = ReadEF2Byte(posMpdu->Octet + FRAME_OFFSET_GAS_COMEBACK_RSP_SERVICE_UPDATE_INDICATOR); } - + if(QueryRspLen == 0) { return rtStatus; @@ -6242,7 +6242,7 @@ P2P_OnSDComebackRsp( if(bMoreData) { - p2p_Send_SDComebackReq(pP2PInfo, + p2p_Send_SDComebackReq(pP2PInfo, pP2PInfo->SDContext.TargetDeviceAddress, pP2PInfo->SDContext.DialogToken); } @@ -6250,14 +6250,14 @@ P2P_OnSDComebackRsp( { if(!bBufferOut) { - RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ANQP Defrag result: ", - pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ANQP Defrag result: ", + pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize); - - pP2PInfo->SDContext.Status = P2POnANQPQueryRspField(pP2PInfo, - pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, - pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize, - pP2PInfo->SDContext.ServiceRspRecvd, + + pP2PInfo->SDContext.Status = P2POnANQPQueryRspField(pP2PInfo, + pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, + pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize, + pP2PInfo->SDContext.ServiceRspRecvd, &pP2PInfo->SDContext.ServiceRspRecvdSize); if(pP2PInfo->SDContext.Status == P2P_SD_STATUS_SUCCESS) @@ -6270,12 +6270,12 @@ P2P_OnSDComebackRsp( P2PScanListEnterScanCompleteImmediately(pP2PInfo); } - RT_TRACE_F(COMP_P2P, DBG_LOUD, - ("Status: %u, Recvd FragID: %u, nRspTLVs got from defragmented ANQP: %u\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, + ("Status: %u, Recvd FragID: %u, nRspTLVs got from defragmented ANQP: %u\n", pP2PInfo->SDContext.Status, FragmentID, pP2PInfo->SDContext.ServiceRspRecvdSize)); return rtStatus; -} +} BOOLEAN P2PCommonChannelArrived( @@ -6331,13 +6331,13 @@ P2PCommonChannelArrived( return FALSE; } } - + RT_TRACE_F(COMP_MLME, DBG_LOUD, ("P2PScanListCeaseScan\n")); p2p_DevList_Unlock(&pP2PInfo->devList); P2PScanListCeaseScan(pP2PInfo); p2p_DevList_Lock(&pP2PInfo->devList); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PCommonChannelArrived(): Recv ProbeRsp from the target device = > start Group Formation\n")); pP2PInfo->bPreGroupFormation = FALSE; @@ -6359,17 +6359,17 @@ P2PCommonChannelArrived( if(pP2PInfo->ProvisionDiscoveryContext.bDoingProvisionDiscovery) { u1Byte *pdTargetMac = NULL; - + if(pP2PInfo->ProvisionDiscoveryContext.go) pdTargetMac = pP2PInfo->ProvisionDiscoveryContext.goBssid; else pdTargetMac = pP2PInfo->ProvisionDiscoveryContext.devAddr; - + if(eqMacAddr(pDev->mac, pdTargetMac)) {// source is the device we are trying to invite - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PCommonChannelArrived(): Recv Probe from the provision discovery request target, state: %u\n", - pP2PInfo->State)); + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PCommonChannelArrived(): Recv Probe from the provision discovery request target, state: %u\n", + pP2PInfo->State)); // // Retrieve specific P2P device info. from Win8 Specific Device Information Pool to initiate boost initial gain @@ -6377,7 +6377,7 @@ P2PCommonChannelArrived( // pP2PDeviceListEntry = P2PDeviceListFind(&pP2PInfo->DeviceList, pDev->mac); if(pP2PDeviceListEntry) - { + { if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) { BoostInitGainValue = TRUE; @@ -6388,7 +6388,7 @@ P2PCommonChannelArrived( } pP2PInfo->State = P2P_STATE_PROVISION_DISCOVERY_REQ_SEND; - CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), + CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) ? P2P_PROVISION_DISCOVERY_SHORT_TIMEOUT : P2P_PROVISION_DISCOVERY_TIMEOUT ); @@ -6396,26 +6396,26 @@ P2PCommonChannelArrived( p2p_Send_PDReq(pP2PInfo, pDev->mac, P2P_DEV_TYPE_GO == pDev->type, pP2PInfo->DialogToken, pDev->p2p->pdConfigMethod); pP2PInfo->ProvisionDiscoveryContext.bDoingProvisionDiscovery = FALSE; - + NextState = P2P_STATE_PROVISION_DISCOVERY_RSP_WAIT; - + bCommonChannelArrived = TRUE; } } if(pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe) { - + if(eqMacAddr(pDev->mac, pP2PInfo->InvitationContext.InvitedDevice.DeviceAddress)) {// source is the device we are trying to invite - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PCommonChannelArrived(): Recv Probe from the invitee device = > to send invitation req, state: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PCommonChannelArrived(): Recv Probe from the invitee device = > to send invitation req, state: %u\n", pP2PInfo->State)); pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe = FALSE; //pP2PInfo->InvitationContext.Channel = P2PScanListCeaseScan(pP2PInfo); - pP2PInfo->State = P2P_STATE_INVITATION_REQ_SEND; + pP2PInfo->State = P2P_STATE_INVITATION_REQ_SEND; // // Retrieve specific P2P device info. from Win8 Specific Device Information Pool to initiate boost initial gain @@ -6423,7 +6423,7 @@ P2PCommonChannelArrived( // pP2PDeviceListEntry = P2PDeviceListFind(&pP2PInfo->DeviceList, pDev->mac); if(pP2PDeviceListEntry) - { + { if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) { BoostInitGainValue = TRUE; @@ -6432,7 +6432,7 @@ P2PCommonChannelArrived( RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] P2P_STATE_INVITATION_REQ_SEND: SignalStrength(%#x)\n", pP2PDeviceListEntry->RecvSignalPower)); } } - + CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), P2P_INVITATION_FRAME_TIMEOUT); p2p_Send_InvitationReq(pP2PInfo, pDev->mac); @@ -6446,21 +6446,21 @@ P2PCommonChannelArrived( if(pP2PInfo->SDContext.bDoingServiceDiscovery) { PP2P_SD_CONTEXT pServiceDiscvoery = &(pP2PInfo->SDContext); - + if(eqMacAddr(pServiceDiscvoery->TargetDeviceAddress, pDev->mac)) { - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PCommonChannelArrived(): Recv Probe from the service discovery request target, state: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PCommonChannelArrived(): Recv Probe from the service discovery request target, state: %u\n", pP2PInfo->State)); pP2PInfo->SDContext.bDoingServiceDiscovery = FALSE; //pP2PInfo->SDContext.Channel = P2PScanListCeaseScan(pP2PInfo); pP2PInfo->State = P2P_STATE_SERVICE_DISCOVERY_REQ_SEND; - + CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), P2P_SERVICE_DISCOVERY_TIMEOUT); p2p_Send_SDReq(pP2PInfo, pDev->mac); - + NextState = P2P_STATE_SERVICE_DISCOVERY_RSP_WAIT; bCommonChannelArrived = TRUE; @@ -6469,12 +6469,12 @@ P2PCommonChannelArrived( // // Go to the intended state immediately if common channel arrived. - // + // if(bCommonChannelArrived) { BOOLEAN bScanInProgress = MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo); u4Byte msDelayStart = 0; - + // Wait more time for the response packet. if(NextState == P2P_STATE_PROVISION_DISCOVERY_RSP_WAIT || NextState == P2P_STATE_INVITATION_RSP_WAIT || @@ -6482,7 +6482,7 @@ P2PCommonChannelArrived( { msDelayStart += 100; // Wait 100 ms for the rsp packet } - + if(P2P_DOING_DEVICE_DISCOVERY(pP2PInfo)) {// Doing P2P Device Discovery msDelayStart += 10; // if scan in progress, we have to wait until ScanComplete() finishes @@ -6494,7 +6494,7 @@ P2PCommonChannelArrived( //P2PScanListCeaseScan(pP2PInfo); P2PExtendedListenComplete(pP2PInfo); } - else if(bScanInProgress) + else if(bScanInProgress) {// Doing normal scan msDelayStart += 10; // if scan in progress, we have to wait until ScanComplete() finishes //P2PScanListCeaseScan(pP2PInfo); @@ -6502,7 +6502,7 @@ P2PCommonChannelArrived( pP2PInfo->State = NextState; - // PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); + // PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); // PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, msDelayStart); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Set P2PMgntTimer %d ms!\n", msDelayStart)); } @@ -6523,7 +6523,7 @@ P2PInitializeChannelEntryList( // Channel entry list. // Set to the channels we support by default. // - + PADAPTER pAdapter = pP2PInfo->pAdapter; u1Byte i; u2Byte SupportedWirelessMode = pAdapter->HalFunc.GetSupportedWirelessModeHandler(pAdapter); @@ -6541,11 +6541,11 @@ P2PInitializeChannelEntryList( // Init channel entry list // pAdapter->MgntInfo.ChannelPlan = GetDefaultAdapter(pAdapter)->MgntInfo.ChannelPlan; - + PlatformZeroMemory(&pP2PInfo->ChannelEntryList, sizeof(pP2PInfo->ChannelEntryList)); pChannelList = GET_RT_CHANNEL_LIST(&pAdapter->MgntInfo);//MgntActQuery_ChannelList(pP2PInfo->pAdapter); - + for(i = 0; i < pChannelList->ChannelLen; i++) { chList[nChList++] = pChannelList->ChnlListEntry[i].ChannelNum; @@ -6561,7 +6561,7 @@ P2PInitialize( IN u1Byte ListenChannel, IN u1Byte IntendedOpChannel, IN u1Byte GOIntent - ) + ) { BOOLEAN bBoostIgi = FALSE; BOOLEAN bSupportHwP2pPs = FALSE; @@ -6583,7 +6583,7 @@ P2PInitialize( } RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2P Support Type = %s\n", (P2P_SUPPORT_STATE_RTK_SUPPORT == pAdapter->P2PSupport) ? "RTK_SUPPORT" : "OS_SUPPORT")); // Win8: Point to self adapter - pP2PInfo->pAdapter = pAdapter; + pP2PInfo->pAdapter = pAdapter; RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2PInitialize(): port number %d\n", pP2PInfo->pAdapter->pNdis62Common->PortNumber)); @@ -6606,7 +6606,7 @@ P2PInitialize( // Win8: Let the interface address be the permanent address cpMacAddr(pP2PInfo->InterfaceAddress, pAdapter->PermanentAddress); } - else + else { // In Win7: pAdapter->CurrentAddress == pAdapter->PermanentAddress cpMacAddr(pP2PInfo->InterfaceAddress, pAdapter->CurrentAddress); @@ -6640,7 +6640,7 @@ P2PInitialize( { pP2PInfo->OperatingChannel = IntendedOpChannel; } - + pP2PInfo->ListenChannel = ListenChannel; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("GOIntent = %d, OP Chnl = %d, ListenChnl = %d\n", pP2PInfo->GOIntent, pP2PInfo->OperatingChannel, pP2PInfo->ListenChannel)); @@ -6649,7 +6649,7 @@ P2PInitialize( { MgntActSet_P2PListenChannel(pAdapter, ListenChannel); } - + pP2PInfo->CountryString[0] = 0x55; //US pP2PInfo->CountryString[1] = 0x53; pP2PInfo->CountryString[2] = 0x04; @@ -6667,12 +6667,12 @@ P2PInitialize( // // Not to clear the WPS IE because we should use the one set by normal UI, // The testing UI does not know the exact WPS IE. - // + // //pP2PInfo->WpsInfoLen = 0; - RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PInitialize(): primary dev type: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PInitialize(): primary dev type: %u\n", pP2PInfo->WpsAttributes.PrimaryDeviceType.CategoryId)); - RT_PRINT_STR(COMP_P2P, DBG_LOUD, "P2PInitialize(): Device Name:\n", + RT_PRINT_STR(COMP_P2P, DBG_LOUD, "P2PInitialize(): Device Name:\n", pP2PInfo->WpsAttributes.DeviceName, pP2PInfo->WpsAttributes.DeviceNameLength); } @@ -6701,7 +6701,7 @@ P2PInitialize( pP2PInfo->bReinitiateConnection= FALSE; pP2PInfo->TimeStartWaitingForReinitiate = 0; pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)0; - + PlatformZeroMemory(&pP2PInfo->InvitationContext, sizeof(P2P_INVITATION_CONTEXT)); pP2PInfo->bAcceptInvitation = FALSE; PlatformZeroMemory(pP2PInfo->AccpetInvitationDeviceAddress, 6); @@ -6718,7 +6718,7 @@ P2PInitialize( PlatformZeroMemory(&pP2PInfo->SDContext, sizeof(P2P_SD_CONTEXT)); pP2PInfo->SDRspFragmtntThreshold = P2P_SERVICE_MAX_RSP_FRAG_THRESHOLD; pP2PInfo->SDWaitForComebackReqSlotCount = 0; - + //PlatformZeroMemory(&pP2PInfo->PersistentProfile, sizeof(P2P_PERSISTENT_PROFILE)); // ICS @@ -6820,7 +6820,7 @@ P2PInitialize( PlatformZeroMemory(pP2PInfo->DiscoverForSpecificChannels, sizeof(pP2PInfo->DiscoverForSpecificChannels)); pP2PInfo->uNumberOfDiscoverForSpecificChannels = 0; pP2PInfo->uNumberOfDiscoverRounds = 0; - + // + Win8 Trick to Speed up GO Negotiation Procedure pP2PInfo->LastDeviceDiscoveryOidIssueTime = 0; pP2PInfo->LastDeviceDiscoveryIndicatedTime = 0; @@ -6830,8 +6830,8 @@ P2PInitialize( PlatformZeroMemory(&pP2PInfo->DeviceList, sizeof(P2P_DEVICE_LIST)); PlatformZeroMemory(&pP2PInfo->DeviceListForQuery, sizeof(P2P_DEVICE_LIST)); //----------------------------------------------------------------------------------- - - // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST -------------------------------------- + + // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST -------------------------------------- pP2PInfo->ProvisionRequestGroupCapability = 0; pP2PInfo->bProvisionRequestUseGroupID = FALSE; PlatformZeroMemory(pP2PInfo->ProvisionRequestGroupIDDeviceAddress, 6); @@ -6840,7 +6840,7 @@ P2PInitialize( // ------------------------------------------------------------------------------------------------- - // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE -------------------------------------- + // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE -------------------------------------- PlatformZeroMemory(pP2PInfo->ProvisionResponseReceiverDeviceAddress, 6); pP2PInfo->ProvisionResponseDialogToken = 0; // ------------------------------------------------------------------------------------------------- @@ -6921,7 +6921,7 @@ P2PInitialize( // Debug Device Discovery ------------------- pP2PInfo->ProbeRequestSequenceNum = 0; // ---------------------------------------- - + // Trick for knowing next channel switch time ----------- pP2PInfo->TimeStartToStopSendingProbeResponse = 0; // ----------------------------------------------- @@ -6960,7 +6960,7 @@ P2PResetCommonChannelArrivingProcess( pP2PInfo->SDContext.bDoingServiceDiscovery = FALSE; PlatformZeroMemory(&pP2PInfo->SDContext, sizeof(P2P_SD_CONTEXT)); - FunctionOut(COMP_P2P); + FunctionOut(COMP_P2P); } // @@ -6977,18 +6977,18 @@ P2PDeviceDiscovery( BOOLEAN bScanInProgress; u4Byte msDelayStart = 0; BOOLEAN bToIndicDevDiscComp = FALSE; - + if(!P2P_ENABLED(pP2PInfo)) { return FALSE; } - + // // Stop any existing scan // bScanInProgress = MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PDeviceDiscovery(): State: %u, bScanInProgres: %u port number %d\n", pP2PInfo->State, bScanInProgress, pP2PInfo->pAdapter->pNdis62Common->PortNumber)); @@ -7004,7 +7004,7 @@ P2PDeviceDiscovery( P2PScanListCeaseScan(pP2PInfo); P2PExtendedListenComplete(pP2PInfo); } - else if(bScanInProgress) + else if(bScanInProgress) {// Doing normal scan msDelayStart += 10; // if scan in progress, we have to wait until ScanComplete() finishes P2PScanListCeaseScan(pP2PInfo); @@ -7024,12 +7024,12 @@ P2PDeviceDiscovery( if(pP2PInfo->Role == P2P_GO) { - P2PStopResumeGOBeaconning(pP2PInfo, FALSE); + P2PStopResumeGOBeaconning(pP2PInfo, FALSE); } // // Clear scan list before scan. - // If we are a GO, we shall not clear our scan list since when a client associates, + // If we are a GO, we shall not clear our scan list since when a client associates, // it provides its info to us in AssocReq, and we record the info in our scan list. // If we clear this info, we will lost the info of the associated clients. // @@ -7038,22 +7038,22 @@ P2PDeviceDiscovery( { P2PScanListClear(pP2PInfo); } - + PlatformAcquireSpinLock(pP2PInfo->pAdapter, RT_P2P_SPIN_LOCK); P2P_INC_REF_CNT(pP2PInfo); PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_P2P_SPIN_LOCK); - + // pP2PInfo->StateBeforeScan = pP2PInfo->State; - + pP2PInfo->State = P2P_STATE_DEV_DISC_START; // pP2PInfo->bDeviceDiscoveryInProgress = TRUE; pP2PInfo->ConnectionContext.FindPhaseLoopTimes = FindPhaseLoopTimes; - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PDeviceDiscovery(): delay start after %d (ms), StateBeforeScan: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PDeviceDiscovery(): delay start after %d (ms), StateBeforeScan: %u\n", msDelayStart, pP2PInfo->StateBeforeScan)); - + //if(MgntActQuery_802_11_CHANNEL_NUMBER((GetDefaultAdapter(pP2PInfo->pAdapter))) != pP2PInfo->ListenChannel) //{ // // Reset Listen Channel to see if we have chance to switch current channel back to the Listen Channel. @@ -7097,9 +7097,9 @@ P2PDeviceDiscoverForSpecificChannels( CustomScan_SetupCbCtx(req, p2p_ScanStateCb, pP2PInfo->pAdapter); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "spec chnl disc"); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2PDeviceDiscoverForSpecificChannels issued\n")); + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2PDeviceDiscoverForSpecificChannels issued\n")); - return; + return; } VOID @@ -7107,11 +7107,11 @@ P2PDeviceDiscoveryComplete( IN PP2P_INFO pP2PInfo, IN BOOLEAN bRecoverState ) -{ - // +{ + // // We do some clean up task here. // - + // For Win8 P2P Indication ------------------------------------------------------------ if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && pP2PInfo->bDeviceDiscoveryIndicateToOS == TRUE) { @@ -7126,7 +7126,7 @@ P2PDeviceDiscoveryComplete( pP2PInfo->bDiscoverForSpecificChannels = FALSE; PlatformZeroMemory( - pP2PInfo->DiscoverForSpecificChannels, + pP2PInfo->DiscoverForSpecificChannels, sizeof(pP2PInfo->DiscoverForSpecificChannels) ); pP2PInfo->uNumberOfDiscoverForSpecificChannels = 0; @@ -7139,12 +7139,12 @@ P2PDeviceDiscoveryComplete( { P2PStopResumeGOBeaconning(pP2PInfo, TRUE); } - - + + if(bRecoverState) { // discovery complete, back to original state - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PDeviceDiscoveryComplete(): P2P_STATE_DEV_DISC_COMPLETE: back to state (%u) from (%u)\n", pP2PInfo->StateBeforeScan, pP2PInfo->State)); pP2PInfo->State = pP2PInfo->StateBeforeScan; @@ -7155,7 +7155,7 @@ P2PDeviceDiscoveryComplete( P2PSvc_OnDevDiscComplete(pP2PInfo->pP2PSvcInfo); } - + VOID P2PExtendedListenStart( @@ -7173,7 +7173,7 @@ P2PExtendedListenStart( { return; } - + RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2PExtendedListenStart()\n")); #if (MULTICHANNEL_SUPPORT == 1) @@ -7191,15 +7191,15 @@ P2PExtendedListenStart( if(GetFirstGOPort(pAdapter) || GetFirstClientPort(pAdapter)) { ADAPTER *cli = GetFirstClientPort(pAdapter); - + if(cli && GET_P2P_INFO(cli) && (P2P_CLIETN_JOIN_GROUP_WPS_STATE_SCANNING == (GET_P2P_INFO(cli))->ClientJoinGroupContext.WpsState || P2P_CLIENT_JOIN_GROUP_WPS_STATE_GO_READY == (GET_P2P_INFO(cli))->ClientJoinGroupContext.WpsState || P2P_CLIETN_JOIN_GROUP_WPS_STATE_ASSOCIATING == (GET_P2P_INFO(cli))->ClientJoinGroupContext.WpsState )) {// don't do scan in this case - RT_TRACE_F(COMP_P2P, DBG_LOUD, - ("do not use extended listen when cli port is doing WPS join group, state: %u\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, + ("do not use extended listen when cli port is doing WPS join group, state: %u\n", (GET_P2P_INFO(cli))->ClientJoinGroupContext.WpsState)); FunctionOut(COMP_P2P); return; @@ -7223,7 +7223,7 @@ P2PExtendedListenStart( } // -------------------------------------------------------------------------------------------------- - RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: listen channel: %d, Current Channel: %d\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: listen channel: %d, Current Channel: %d\n", __FUNCTION__, pP2PInfo->ListenChannel, RT_GetChannelNumber(pAdapter)) ); @@ -7245,15 +7245,15 @@ P2PExtendedListenStart( p2p_Construct_ProbeReq(probeReqBuf, pP2PInfo); - CustomScan_AddScanChnl(req, - pP2PInfo->ListenChannel, 1, - (pP2PInfo->bSendProbeReqInExtendedListen) ? SCAN_ACTIVE : SCAN_PASSIVE, + CustomScan_AddScanChnl(req, + pP2PInfo->ListenChannel, 1, + (pP2PInfo->bSendProbeReqInExtendedListen) ? SCAN_ACTIVE : SCAN_PASSIVE, pP2PInfo->ExtListenTimingDuration, P2P_LOWEST_RATE, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "ext listen"); - + FunctionOut(COMP_P2P); - + } VOID @@ -7273,7 +7273,7 @@ P2PExtendedListenComplete( RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PExtendedListenComplete()\n")); pP2PInfo->bExtendedListening = FALSE; - if(MgntActQuery_802_11_CHANNEL_NUMBER((GetDefaultAdapter(pP2PInfo->pAdapter))) != pP2PInfo->ListenChannel && + if(MgntActQuery_802_11_CHANNEL_NUMBER((GetDefaultAdapter(pP2PInfo->pAdapter))) != pP2PInfo->ListenChannel && !MgntIsLinkInProgress(GetDefaultMgntInfo(pP2PInfo->pAdapter))) { // Reset Listen Channel to see if we have chance to switch current channel back to the Listen Channel. @@ -7339,11 +7339,11 @@ P2PProvisionDiscovery( } } } - + p2p_DevList_TranslateDev(pDev, &desc); devAddr = desc.DeviceAddress; - + // // For Sigma // @@ -7359,12 +7359,12 @@ P2PProvisionDiscovery( { RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PProvisionDiscovery(): ConfigMethod is 0 and we don't know peer's DPID\n")); break; - } + } } if(!P2PTestU2SingleBitSet(ConfigMethod)) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PProvisionDiscovery(): ConfigMethod has multiple bit set: %u\n", ConfigMethod)); p2p_DevList_Unlock(&pP2PInfo->devList); return FALSE; @@ -7379,7 +7379,7 @@ P2PProvisionDiscovery( if(P2P_DEV_TYPE_GO == pDev->type) { cpMacAddr(pProvisionDiscContext->goBssid, pDev->mac); - CopySsid(pProvisionDiscContext->SsidBuf, pProvisionDiscContext->SsidLen, + CopySsid(pProvisionDiscContext->SsidBuf, pProvisionDiscContext->SsidLen, desc.SsidBuf, desc.SsidLen); } pProvisionDiscContext->bDoingProvisionDiscovery = TRUE; @@ -7390,7 +7390,7 @@ P2PProvisionDiscovery( if(0 != desc.OperatingChannel) pProvisionDiscContext->Channel = desc.OperatingChannel; else - pProvisionDiscContext->Channel = desc.ListenChannel; + pProvisionDiscContext->Channel = desc.ListenChannel; } else { @@ -7421,7 +7421,7 @@ P2PProvisionDiscovery( return TRUE; } -VOID +VOID P2PServiceDiscoveryReq( PP2P_INFO pP2PInfo, PP2P_SD_REQ_CONTEXT pServiceQueryContent @@ -7434,21 +7434,21 @@ P2PServiceDiscoveryReq( if(!P2P_ENABLED(pP2PInfo)) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq(): P2P NOT enabled\n")); return; } if(pP2PInfo->SDContext.bDoingServiceDiscovery) {// note that bDoingServiceDiscovery is cleared when common channel arrived - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq(): SD in progress\n")); return; } if(P2P_DOING_SERVICE_DISCOVERY_REQ(pP2PInfo)) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq(): SD in progress (frame exhange started)\n")); return; } @@ -7458,30 +7458,30 @@ P2PServiceDiscoveryReq( // if(pServiceQueryContent->ServiceReqTLVSize < 1) // must have at least 1 query TLV { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq(): error: must have at least 1 query TLV\n")); return; } if(pServiceQueryContent->ServiceReqTLVSize > P2P_SD_MAX_SERVICES) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq(): error: can have at most %u TLVs\n", P2P_SD_MAX_SERVICES)); return; } - RT_PRINT_ADDRS(COMP_P2P,DBG_LOUD, - ("P2PServiceDiscoveryReq(): target DevAddr: "), + RT_PRINT_ADDRS(COMP_P2P,DBG_LOUD, + ("P2PServiceDiscoveryReq(): target DevAddr: "), pServiceQueryContent->TargetDeviceAddress, 1); pDevDesc = P2PScanListFind(pP2PInfo->ScanList, pP2PInfo->ScanListSize, - pServiceQueryContent->TargetDeviceAddress, - NULL, + pServiceQueryContent->TargetDeviceAddress, + NULL, NULL); if(pDevDesc == NULL) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq(): target device not found in the scan list\n")); return; } @@ -7496,17 +7496,17 @@ P2PServiceDiscoveryReq( // cpMacAddr(pSDContext->UserSDReq.TargetDeviceAddress, pServiceQueryContent->TargetDeviceAddress); pSDContext->UserSDReq.ServiceReqTLVSize = pServiceQueryContent->ServiceReqTLVSize; - - PlatformMoveMemory(&pSDContext->UserSDReq.ServiceReqTLVList, - pServiceQueryContent->ServiceReqTLVList, + + PlatformMoveMemory(&pSDContext->UserSDReq.ServiceReqTLVList, + pServiceQueryContent->ServiceReqTLVList, sizeof(P2P_SERVICE_REQ_TLV) * pServiceQueryContent->ServiceReqTLVSize); - - // Store target listen channel, although we will store the channel when + + // Store target listen channel, although we will store the channel when // ProbeRsp is received, the target listen channel // can still be a hint for where to search for its ProbeRsp pSDContext->Channel = pDevDesc->ListenChannel; - // Set to Start Service Dicovery + // Set to Start Service Dicovery pSDContext->bDoingServiceDiscovery = TRUE; pSDContext->bRequester = TRUE; @@ -7525,12 +7525,12 @@ P2PServiceDiscoveryReq( // Do device discovery to find out when the target device is in Listen State. // P2PDeviceDiscovery(pP2PInfo, P2P_SCAN_FIND_PHASE_LOOP_TIMES); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PServiceDiscoveryReq()\n")); } -VOID +VOID P2PServiceDiscoveryRsp( PP2P_INFO pP2PInfo, PP2P_SD_RSP_CONTEXT pServiceRspContent @@ -7558,24 +7558,24 @@ P2PServiceDiscoveryRsp( } RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2PServiceDiscoveryRsp()\n")); - + // // Construct Rsp TLV list from pP2PInfo->SDRspContext // p2p_Construct_AnqpQueryRspField(pP2PInfo, pServiceRspContent, pSDContext); - RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PServiceDiscoveryRsp(): ANQPQueryRsp Size: %u, Frag Threshold: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PServiceDiscoveryRsp(): ANQPQueryRsp Size: %u, Frag Threshold: %u\n", pSDContext->ANQPQueryRspFieldToSendSize, pP2PInfo->SDRspFragmtntThreshold)); - //RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ANQPQueryRsp constructed: ", - // pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, + //RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ANQPQueryRsp constructed: ", + // pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, // pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize); // To send from offset 0 pSDContext->ANQPQueryRspFieldToSendOffset = 0; - + if(pSDContext->ANQPQueryRspFieldToSendSize > pP2PInfo->SDRspFragmtntThreshold) - { + { bFragmentSDRsp = TRUE; // @@ -7591,10 +7591,10 @@ P2PServiceDiscoveryRsp( cpMacAddr(pSDContext->TargetDeviceAddress, pServiceRspContent->SourceDeviceAddress); } - p2p_Send_SDRsp(pP2PInfo, - pSDContext->TargetDeviceAddress, - pSDContext->DialogToken, - pSDContext->Status, + p2p_Send_SDRsp(pP2PInfo, + pSDContext->TargetDeviceAddress, + pSDContext->DialogToken, + pSDContext->Status, bFragmentSDRsp); if(bFragmentSDRsp) @@ -7604,7 +7604,7 @@ P2PServiceDiscoveryRsp( else { PlatformZeroMemory(&pP2PInfo->SDContext, sizeof(P2P_SD_CONTEXT)); - CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), + CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pP2PInfo->pAdapter), P2P_SERVICE_DISCOVERY_COMEBACK_TIMEOUT); } @@ -7621,11 +7621,11 @@ P2PConnect( PADAPTER pAdapter = pP2PInfo->pAdapter; PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; - + // For the case when we are connecting to a P2P Client PP2P_DEVICE_DISCRIPTOR pGODeviceDesc = NULL; PP2P_CLIENT_INFO_DISCRIPTOR pClientInfoDesc = NULL; - + if(!P2P_ENABLED(pP2PInfo)) { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PConnect(): P2P Disabled\n")); @@ -7642,14 +7642,14 @@ P2PConnect( // if(pP2PDeviceDesc == NULL) { - if(!P2PScanListFindClient(pP2PInfo->ScanList, - pP2PInfo->ScanListSize, - DeviceAddress, - NULL, - &pGODeviceDesc, + if(!P2PScanListFindClient(pP2PInfo->ScanList, + pP2PInfo->ScanListSize, + DeviceAddress, + NULL, + &pGODeviceDesc, &pClientInfoDesc)) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PConnect(): can't find the device in either the scan list or the client info lists\n")); return FALSE; } @@ -7661,7 +7661,7 @@ P2PConnect( } // - // Before calling this function, the upper layer shall make sure that + // Before calling this function, the upper layer shall make sure that // 1. Device Name is included in WPS IE // 2. Device Password ID is included in WPS IE (Clause 3.1.2.4.1) // @@ -7685,8 +7685,8 @@ P2PConnect( { // Fill ConnectionContext P2PResetCommonChannelArrivingProcess(pP2PInfo); - PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, - pP2PDeviceDesc, + PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, + pP2PDeviceDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); pP2PInfo->ConnectionContext.Status = P2P_STATUS_SUCCESS; pP2PInfo->ConnectionContext.DialogToken = IncreaseDialogToken(pP2PInfo->DialogToken); @@ -7721,9 +7721,9 @@ P2PConnect( {// note that in this case, the mac addr is the interface addr of the GO if(pClientInfoDesc) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PConnect(): peer is a P2P Client\n")); - RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "GO DevAddr:\n", pP2PDeviceDesc->DeviceAddress); // @@ -7733,9 +7733,9 @@ P2PConnect( } else { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PConnect(): peer is a GO\n")); - + // // Now we shall have the dev addr and interface addr of the GO // @@ -7743,13 +7743,13 @@ P2PConnect( // UI send DevAddr as the MacAddress and we shall not use // it as the IntAddr. /* - pP2PDeviceDesc = P2PScanListFind(pP2PInfo->ScanList, - pP2PInfo->ScanListSize, - NULL, + pP2PDeviceDesc = P2PScanListFind(pP2PInfo->ScanList, + pP2PInfo->ScanListSize, + NULL, MacAddress, NULL); // we use intended addr here */ - + if(pP2PDeviceDesc && pP2PDeviceDesc->SsidLen) { //P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); @@ -7766,14 +7766,14 @@ P2PConnect( P2PScanListCeaseScan(pP2PInfo); P2PExtendedListenComplete(pP2PInfo); } - else if(bScanInProgress) + else if(bScanInProgress) {// Doing normal scan P2PScanListCeaseScan(pP2PInfo); } // Fill ConnectionContext - PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, - pP2PDeviceDesc, + PlatformMoveMemory(&pP2PInfo->ConnectionContext.ConnectingDevice, + pP2PDeviceDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); pP2PInfo->ConnectionContext.Status = P2P_STATUS_SUCCESS; pP2PInfo->ConnectionContext.DialogToken = 0; @@ -7788,54 +7788,54 @@ P2PConnect( } else {// failed to scan the GO - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PConnect(): the target is not in the scan list\n")); //P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); - + pP2PInfo->State = P2P_STATE_INITIALIZED; } } } else { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PConnect() peer role is incorrect: %u\n", pP2PDeviceDesc->Role)); //P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); return FALSE; } - + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PConnect()\n")); return TRUE; } -VOID +VOID P2PGOStartAutomously( IN PP2P_INFO pP2PInfo ) { P2P_PROFILE P2PProfile; - + RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2PGOStartAutomously()\n")); P2PProfile.OpChannel = pP2PInfo->OperatingChannel; - P2PDetermineGOSsid(pP2PInfo, P2PProfile.SsidBuf, &P2PProfile.SsidBufLen); + P2PDetermineGOSsid(pP2PInfo, P2PProfile.SsidBuf, &P2PProfile.SsidBufLen); CopySsid(pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen, P2PProfile.SsidBuf, P2PProfile.SsidBufLen); - + P2PSetRole(pP2PInfo, P2P_GO); P2PSetOperatingState(pP2PInfo); pP2PInfo->bGOStartedAutonomously = TRUE; pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)P2P_STATUS_MAX; - + P2PIndicateStartApRequest(pP2PInfo, &P2PProfile); // - // For PF #1, if we do this, legacy STA without WPS can't associate with us + // For PF #1, if we do this, legacy STA without WPS can't associate with us // (associated, but the STA keeps sending AssocReq) when we are an autonomous GO. // This may not be necessary to notify the UI that we are an GO now. // - /*P2PIndicateGOFormatedInfo(pP2PInfo, - P2P_STATUS_SUCCESS, - TRUE, + /*P2PIndicateGOFormatedInfo(pP2PInfo, + P2P_STATUS_SUCCESS, + TRUE, NULL); */ @@ -7850,25 +7850,25 @@ P2PDisconnect( ) { BOOLEAN bScanInProgress; - + if(!P2P_ENABLED(pP2PInfo)) { return; } RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2PDisconnect()\n")); - + // // Stop any existing scan // P2PResetCommonChannelArrivingProcess(pP2PInfo); - + bScanInProgress = MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PDisconnect(): State: %u, bScanInProgres: %u\n", pP2PInfo->State, bScanInProgress)); - + if(P2P_DOING_DEVICE_DISCOVERY(pP2PInfo)) {// Doing P2P Device Discovery P2PDeviceDiscoveryComplete(pP2PInfo, FALSE); @@ -7877,7 +7877,7 @@ P2PDisconnect( {// Doing extended listening P2PExtendedListenComplete(pP2PInfo); } - else if(bScanInProgress) + else if(bScanInProgress) {// Doing normal scan } @@ -7904,7 +7904,7 @@ P2PDisconnect( // Send the device discoverability request to ask the client in the group to be discoverable. // The receiver for this packet is the GO which the client belongs to. // Arguments: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // [in] DeviceAddress - // The target address of P2P client that this request sent to. @@ -7921,7 +7921,7 @@ P2PDeviceDiscoverabilityReq( ) { // - // This function is to send a DevDiscoverabilityReq to a P2P Client + // This function is to send a DevDiscoverabilityReq to a P2P Client // so that it will keep available for a duration of at least 100TU. // PP2P_CLIENT_INFO_DISCRIPTOR pClient = NULL; @@ -7931,28 +7931,28 @@ P2PDeviceDiscoverabilityReq( RT_TRACE(COMP_P2P, DBG_LOUD, ("===> P2PDeviceDiscoverabilityReqStart()\n")); PlatformZeroMemory(&pP2PInfo->DeviceDiscoverabilityContext, sizeof(P2P_DEVICE_DISCOVERABILITY_CONTEXT)); - + // // Find the client and its GO // - if(!P2PScanListFindClient(pP2PInfo->ScanList, pP2PInfo->ScanListSize, - DeviceAddress, - NULL, + if(!P2PScanListFindClient(pP2PInfo->ScanList, pP2PInfo->ScanListSize, + DeviceAddress, + NULL, &pGO, &pClient)) { RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PDeviceDiscoverabilityReqStart(): client not found\n")); return FALSE; } - RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, - "P2PDeviceDiscoverabilityReqStart(): to send DeviceDiscoverabilityReq to the GO:\n", + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, + "P2PDeviceDiscoverabilityReqStart(): to send DeviceDiscoverabilityReq to the GO:\n", pGO->DeviceAddress); // // Record GO info for constructing P2P GroupID Attribute // cpMacAddr(pP2PInfo->DeviceDiscoverabilityContext.GODeviceAddr, pGO->DeviceAddress); - CopySsid(pP2PInfo->DeviceDiscoverabilityContext.GOSsidBuf, pP2PInfo->DeviceDiscoverabilityContext.GOSsidLen, + CopySsid(pP2PInfo->DeviceDiscoverabilityContext.GOSsidBuf, pP2PInfo->DeviceDiscoverabilityContext.GOSsidLen, pGO->SsidBuf, pGO->SsidLen); // @@ -7977,7 +7977,7 @@ P2PDeviceDiscoverabilityReq( P2PScanListCeaseScan(pP2PInfo); P2PExtendedListenComplete(pP2PInfo); } - else if(bScanInProgress) + else if(bScanInProgress) {// Doing normal scan P2PScanListCeaseScan(pP2PInfo); } @@ -7994,12 +7994,12 @@ P2PDeviceDiscoverabilityReq( pP2PInfo->DeviceDiscoverabilityContext.OriginalState = pP2PInfo->State; pP2PInfo->DeviceDiscoverabilityContext.bWaitingBeaconFromGO = TRUE; pP2PInfo->DeviceDiscoverabilityContext.bGoConnect = bConnect; - + // // Send Device Discoverability to the GO of the client when beacon is received // P2PSetChannel(pP2PInfo, pGO->OperatingChannel); - + pP2PInfo->State = P2P_STATE_DEVICE_DISCOVERABILITY_WAIT_BEACON; PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, P2P_DEVICE_DISCOVERABILITY_BEACON_TIMEOUT); @@ -8008,22 +8008,22 @@ P2PDeviceDiscoverabilityReq( return TRUE; } -BOOLEAN +BOOLEAN P2PInvitePeerStart( IN PP2P_INFO pP2PInfo, IN PP2P_LIB_INVITATION_REQ_CONTEXT pLibInvittionContext ) -{ +{ // - // At current stage, + // At current stage, // 1. IntAddr - // 2. SSID + // 2. SSID // are valid only when bInvokePersistent is TRUE. // - + BOOLEAN bRet = FALSE; PP2P_DEVICE_DISCRIPTOR pDevDesc = NULL; - + // Win8: NdisTest -------------------------------------------------------------------------------- // + If the peer does not exist, still do the invitation procedure as device PRT_GEN_TEMP_BUFFER pRtBuffer = NULL; @@ -8045,7 +8045,7 @@ P2PInvitePeerStart( RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PInvitePeerStart(): P2P not enabled\n")); goto exit_P2PInvitePeerStart; } - + // // Clear invitation context // @@ -8081,17 +8081,17 @@ P2PInvitePeerStart( // Win8: Mark for passing the NdisTest: WFD_Group_ext-Invitation ------------------------------------------ -#if 0 +#if 0 // // Check peer device capability - // + // if(!(pDevDesc->DeviceCapability & dcP2PInvitationProcedure)) {// peer device does not support invitation procedure - RT_TRACE(COMP_P2P, DBG_LOUD, ("error: peer DeviceCapability is %u, does not support invitation\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("error: peer DeviceCapability is %u, does not support invitation\n", pDevDesc->DeviceCapability)); goto exit_P2PInvitePeerStart; } -#endif +#endif // ------------------------------------------------------------------------------------------------ @@ -8103,11 +8103,11 @@ P2PInvitePeerStart( /* group cap is valid only when the device is a GO if(!(pDevDesc->GroupCapability & gcPersistentP2PGroup)) {// peer device does not support persistent group - RT_TRACE(COMP_P2P, DBG_LOUD, ("error: peer GroupCapability is %u, does not support persistent\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("error: peer GroupCapability is %u, does not support persistent\n", pDevDesc->DeviceCapability)); goto exit_P2PInvitePeerStart; } - */ + */ } // @@ -8121,7 +8121,7 @@ P2PInvitePeerStart( pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe = FALSE; pP2PInfo->InvitationContext.bInvitor = TRUE; pP2PInfo->InvitationContext.OpChannel = pLibInvittionContext->OpChannel; - RT_TRACE(COMP_P2P, DBG_LOUD, ("DialogToken: %u, state: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("DialogToken: %u, state: %u\n", pP2PInfo->InvitationContext.DialogToken, pP2PInfo->State)); // @@ -8151,8 +8151,8 @@ P2PInvitePeerStart( // cpMacAddr(pP2PInfo->InvitationContext.GroupBssid, pLibInvittionContext->GroupBssid); cpMacAddr(pP2PInfo->InvitationContext.GODeviceAddress, pLibInvittionContext->GroupDeviceAddress); - CopySsid(pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen, - pLibInvittionContext->GroupSsidBuf, pLibInvittionContext->GroupSsidLen); + CopySsid(pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen, + pLibInvittionContext->GroupSsidBuf, pLibInvittionContext->GroupSsidLen); // // Decide when to send the InvitationReq @@ -8182,11 +8182,11 @@ P2PInvitePeerStart( PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); } - + exit_P2PInvitePeerStart: ReturnGenTempBuffer(GetDefaultAdapter(pP2PInfo->pAdapter), pRtBuffer); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("<=== P2PInvitePeerStart()\n")); return bRet; } @@ -8206,7 +8206,7 @@ P2PInvitePeerComplete( } else {// P2P Device - + } } @@ -8292,7 +8292,7 @@ P2PIndicateOnProvisionDiscoveryReq( PlatformMoveMemory(pBuf, &ConfigMethod, sizeof(u2Byte)); PlatformMoveMemory(pBuf + sizeof(u2Byte), DeviceAddress, 6); PlatformMoveMemory(pBuf + sizeof(u2Byte) + 6, pWpsAttributes, sizeof(P2P_WPS_ATTRIBUTES)); - RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2PIndicateOnProvisionDiscoveryReq", pBuf, BufSize); + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2PIndicateOnProvisionDiscoveryReq", pBuf, BufSize); PlatformIndicateCustomStatus( pP2PInfo->pAdapter, RT_CUSTOM_EVENT_P2P_INDICATE_ON_PROVISION_DISC_REQ, @@ -8316,14 +8316,14 @@ P2PIndicateStartApRequest( P2PProfile.OpChannel = pP2PProfile->OpChannel; P2PProfile.SsidBufLen = pP2PProfile->SsidBufLen; PlatformMoveMemory(P2PProfile.SsidBuf, pP2PProfile->SsidBuf, pP2PProfile->SsidBufLen); - - RT_TRACE(COMP_P2P, DBG_LOUD, + + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIndicateStartApRequest(): Indicate NDIS_STATUS_P2P_START_AP_REQ, OpChannel: %u\n", pP2PProfile->OpChannel)); - RT_PRINT_STR(COMP_P2P, DBG_LOUD, "SSID:\n", + RT_PRINT_STR(COMP_P2P, DBG_LOUD, "SSID:\n", pP2PProfile->SsidBuf, pP2PProfile->SsidBufLen); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIndicateStartApRequest(): bDefPortConnected: %u, bCrossConnectionEnabled: %u\n", bDefPortConnected, bCrossConnectionEnabled)); @@ -8338,14 +8338,14 @@ P2PIndicateStartApRequest( RT_CUSTOM_INDI_TARGET_IHV, &bToEnableICS, sizeof(BOOLEAN)); - + PlatformIndicateCustomStatus( pP2PInfo->pAdapter, RT_CUSTOM_EVENT_P2P_START_AP_REQ, RT_CUSTOM_INDI_TARGET_IHV, &P2PProfile, sizeof(P2P_PROFILE)); - + } VOID @@ -8391,12 +8391,12 @@ P2PIndicateGOFormatedInfo( pGenBufP2PGOFormatedInfo = GetGenTempBuffer (Adapter, sizeof(P2P_GO_FORMATED_INFO)); pP2PGOFormatedInfo = (P2P_GO_FORMATED_INFO *)pGenBufP2PGOFormatedInfo->Buffer.Ptr; - + pP2PGOFormatedInfo->p2pRole = (Status != P2P_STATUS_SUCCESS) ? (P2P_DEVICE) : ((bGoingToBeGO) ? (P2P_GO) : (P2P_CLIENT)); if(pDevDesc) { - PlatformMoveMemory(&(pP2PGOFormatedInfo->targetDesc), - pDevDesc, + PlatformMoveMemory(&(pP2PGOFormatedInfo->targetDesc), + pDevDesc, sizeof(P2P_DEVICE_DISCRIPTOR)); pP2PGOFormatedInfo->targetDesc.Status = Status; @@ -8406,7 +8406,7 @@ P2PIndicateGOFormatedInfo( PlatformMoveMemory(pP2PGOFormatedInfo->targetDesc.SsidBuf, pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen); pP2PGOFormatedInfo->targetDesc.OperatingChannel = pP2PInfo->OperatingChannel; } - + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIndicateGOFormatedInfo(): Status: %u, Role: %u\n", Status, pP2PGOFormatedInfo->p2pRole)); @@ -8416,7 +8416,7 @@ P2PIndicateGOFormatedInfo( { PlatformZeroMemory(&(pP2PGOFormatedInfo->targetDesc), sizeof(P2P_DEVICE_DISCRIPTOR)); } - + PlatformIndicateCustomStatus( pP2PInfo->pAdapter, RT_CUSTOM_EVENT_P2P_INDICATE_GO_FORMATED, @@ -8448,7 +8448,7 @@ P2PIndicateCurrentState( if(bToIndicate) { - RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIndicateCurrentState(): State: %u, Role: %u, nScanList: %u, nScanList4Q: %u, IntfIndex: %u portnumber %d\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIndicateCurrentState(): State: %u, Role: %u, nScanList: %u, nScanList4Q: %u, IntfIndex: %u portnumber %d\n", CurrentState, pP2PInfo->Role, pP2PInfo->ScanListSize, @@ -8501,7 +8501,7 @@ P2PIndicateCurrentDevPasswdId( // Description: // Indicate that one device wants to do GO formation when we are the P2P client. // Arguments: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // [in] pDevDesc - // The descriptor info for this request of device. @@ -8531,10 +8531,10 @@ P2PIndicateClientConnected( IN PP2P_INFO pP2PInfo, IN pu1Byte ClientInterfaceAddr ) -{ +{ if(ClientInterfaceAddr == NULL) return; - + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "P2PIndicateClientConnected(): ", ClientInterfaceAddr); PlatformIndicateCustomStatus( @@ -8555,7 +8555,7 @@ P2PIndicateClientDisconnected( return; RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "P2PIndicateClientDisconnected(): ", ClientInterfaceAddr); - + PlatformIndicateCustomStatus( pP2PInfo->pAdapter, RT_CUSTOM_EVENT_P2P_INDICATE_CLIENT_DISCONNECTED, @@ -8586,7 +8586,7 @@ P2PIndicateOnSDRsp( ) { u1Byte i = 0; - u4Byte BufSize = FIELD_OFFSET(P2P_SD_RSP_CONTEXT, ServiceRspTLVList) + + u4Byte BufSize = FIELD_OFFSET(P2P_SD_RSP_CONTEXT, ServiceRspTLVList) + pSDContext->ServiceRspRecvdSize * sizeof(P2P_SERVICE_RSP_TLV); PP2P_SD_RSP_CONTEXT pSDRspContext = NULL; @@ -8604,14 +8604,14 @@ P2PIndicateOnSDRsp( pSDRspContext->ServiceRspTLVSize = pSDContext->ServiceRspRecvdSize; for(i = 0; i < pSDContext->ServiceRspRecvdSize; i++) {// copy each Rsp TLV - RT_TRACE(COMP_P2P, DBG_LOUD, ("TLV %u, Protocol ID: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("TLV %u, Protocol ID: %u\n", i, pSDContext->ServiceRspRecvd[i].ServiceDesc.ServiceType)); - RT_PRINT_STR(COMP_P2P, DBG_LOUD, "Recv Service Rsp TLV:", - pSDContext->ServiceRspRecvd[i].ServiceDesc.Buffer, + RT_PRINT_STR(COMP_P2P, DBG_LOUD, "Recv Service Rsp TLV:", + pSDContext->ServiceRspRecvd[i].ServiceDesc.Buffer, pSDContext->ServiceRspRecvd[i].ServiceDesc.BufferLength); - - PlatformMoveMemory(&(pSDRspContext->ServiceRspTLVList[i]), - &(pSDContext->ServiceRspRecvd[i]), + + PlatformMoveMemory(&(pSDRspContext->ServiceRspTLVList[i]), + &(pSDContext->ServiceRspRecvd[i]), sizeof(P2P_SERVICE_RSP_TLV)); } @@ -8632,7 +8632,7 @@ P2PIndicateOnSDReq( ) { u1Byte i = 0; - u4Byte BufSize = FIELD_OFFSET(P2P_SD_REQ_CONTEXT, ServiceReqTLVList) + + u4Byte BufSize = FIELD_OFFSET(P2P_SD_REQ_CONTEXT, ServiceReqTLVList) + pSDContext->ServiceReqRecvdSize * sizeof(P2P_SERVICE_REQ_TLV); PP2P_SD_REQ_CONTEXT pSDReqContext = NULL; @@ -8649,14 +8649,14 @@ P2PIndicateOnSDReq( pSDReqContext->ServiceReqTLVSize = pSDContext->ServiceReqRecvdSize; for(i = 0; i < pSDContext->ServiceReqRecvdSize; i++) {// copy each Rsp TLV - RT_TRACE(COMP_P2P, DBG_LOUD, ("TLV %u, Protocol ID: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("TLV %u, Protocol ID: %u\n", i, pSDContext->ServiceRspRecvd[i].ServiceDesc.ServiceType)); - RT_PRINT_STR(COMP_P2P, DBG_LOUD, "Recv Service Req TLV:", - pSDContext->ServiceRspRecvd[i].ServiceDesc.Buffer, + RT_PRINT_STR(COMP_P2P, DBG_LOUD, "Recv Service Req TLV:", + pSDContext->ServiceRspRecvd[i].ServiceDesc.Buffer, pSDContext->ServiceRspRecvd[i].ServiceDesc.BufferLength); - - PlatformMoveMemory(&(pSDReqContext->ServiceReqTLVList[i]), - &(pSDContext->ServiceReqRecvd[i]), + + PlatformMoveMemory(&(pSDReqContext->ServiceReqTLVList[i]), + &(pSDContext->ServiceReqRecvd[i]), sizeof(P2P_SERVICE_REQ_TLV)); } @@ -8683,16 +8683,16 @@ P2PIndicateScanList( do { //p2p_DevList_Translate(&pP2PInfo->devList, P2P_MAX_SCAN_LIST, &pP2PInfo->ScanList4QuerySize, pP2PInfo->ScanList4Query); - + if(0 == pP2PInfo->ScanList4QuerySize) { break; } - + if(0x00000000 == pP2PInfo->P2PVersion) {// v0 PP2P_DEVICE_DESCRIPTOR_V0 pDesc = NULL; - + BufSize = sizeof(P2P_DEVICE_DESCRIPTOR_V0) * pP2PInfo->ScanList4QuerySize; if(0 == BufSize) break; PlatformAllocateMemory(pP2PInfo->pAdapter, &pBuf, BufSize); @@ -8708,7 +8708,7 @@ P2PIndicateScanList( else if(0x00000001 == pP2PInfo->P2PVersion) {// v1 PP2P_DEVICE_DESCRIPTOR_V1 pDesc = NULL; - + BufSize = sizeof(P2P_DEVICE_DESCRIPTOR_V1) * pP2PInfo->ScanList4QuerySize; if(0 == BufSize) break; PlatformAllocateMemory(pP2PInfo->pAdapter, &pBuf, BufSize); @@ -8719,7 +8719,7 @@ P2PIndicateScanList( for(idxScanList = 0; idxScanList < pP2PInfo->ScanList4QuerySize; idxScanList++) { memcpy(pDesc + idxScanList, &pP2PInfo->ScanList4Query[idxScanList], sizeof(P2P_DEVICE_DESCRIPTOR_V1)); - } + } } else {// v2/v3 @@ -8749,7 +8749,7 @@ P2PIndicateChangingApChnl( ) { u1Byte buf[2]; - + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PIndicateChangingApChnl(): %u -> %u\n", oldChnl, newChnl)); buf[0] = oldChnl; @@ -8785,7 +8785,7 @@ P2PMgntTimerCallback( VOID *customScanInfo = GET_CUSTOM_SCAN_INFO(pAdapter); VOID *req = NULL; FRAME_BUF *probeReqBuf = NULL; - + pP2PInfo->LastTimerFired = PlatformGetCurrentTime(); if(!P2P_ENABLED(pP2PInfo)) @@ -8817,7 +8817,7 @@ P2PMgntTimerCallback( PADAPTER pDefaultPort = GetDefaultAdapter(pP2PInfo->pAdapter); if(pClientPort == NULL) pClientPort = pDefaultPort; - + if(MgntIsLinkInProgress(&pDefaultPort->MgntInfo) || MgntIsLinkInProgress(&pClientPort->MgntInfo)) { RT_TRACE(COMP_P2P, DBG_LOUD, ("MgntIsLinkInProgress(): default/client port link in progress\n")); @@ -8844,7 +8844,7 @@ P2PMgntTimerCallback( // pP2PInfo->ForceScanListIndicateSlotCount++; if(pP2PInfo->ForceScanListIndicateSlotCount == P2P_FORCE_SCAN_LIST_INDICATE_PERIOD_SC) - { + { //RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Forced scan list indication\n")); pP2PInfo->ForceScanListIndicateSlotCount = 0; PlatformIndicateCustomStatus( @@ -8860,7 +8860,7 @@ P2PMgntTimerCallback( // Notify UI the current device password ID so that it can determine whether provisioning info is available // Note that UI determines which peer config method we shall use for doing WPS //// TODO: this may be too regular, but note that UI may counting on this indication for determine provision info timeout - //P2PIndicateCurrentDevPasswdId(pP2PInfo, pP2PInfo->WpsDevPasswdId); + //P2PIndicateCurrentDevPasswdId(pP2PInfo, pP2PInfo->WpsDevPasswdId); if(pP2PInfo->State == P2P_STATE_INITIALIZED) { @@ -8892,30 +8892,30 @@ P2PMgntTimerCallback( } } - /*RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PMgntTimerCallback(): dc: %u, gc: %u, ExtSlot: %u, bExtListen: %u, bPreGroupFormation: %u\n", - pP2PInfo->DeviceCapability, - pP2PInfo->GroupCapability, + /*RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PMgntTimerCallback(): dc: %u, gc: %u, ExtSlot: %u, bExtListen: %u, bPreGroupFormation: %u\n", + pP2PInfo->DeviceCapability, + pP2PInfo->GroupCapability, pP2PInfo->ExtListenTimingPeriodSlotCount, pP2PInfo->bExtendedListening, pP2PInfo->bPreGroupFormation)); */ - + // Add "pHalData->SwChnlInProgress" to protect the 92D IQK process. if(pHalData->SwChnlInProgress) { PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_SWITCH_CHNL_PERIOD); - goto exit_P2PMgntTimerCallback; - } - + goto exit_P2PMgntTimerCallback; + } + bScanInProgress = MgntScanInProgress(pMgntInfo); //RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): state: %u\n", pP2PInfo->State)); - - if(bScanInProgress) + + if(bScanInProgress) { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): scan in progress\n")); - + if(pP2PInfo->State == P2P_STATE_GO_NEGO_REQ_SEND || pP2PInfo->State == P2P_STATE_PROVISION_DISCOVERY_REQ_SEND || pP2PInfo->State == P2P_STATE_INVITATION_REQ_SEND || @@ -8924,7 +8924,7 @@ P2PMgntTimerCallback( // // For these state, we shall enter them ASAP so that when the packet is sent, // the peer is still on the listen channel. - // However, we can't arbitrarily change the timer because that will make extended listen + // However, we can't arbitrarily change the timer because that will make extended listen // timing incorrect. // PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_SWITCH_CHNL_PERIOD); @@ -8935,8 +8935,8 @@ P2PMgntTimerCallback( PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_SCAN_PERIOD_SCAN); goto exit_P2PMgntTimerCallback; } - - + + } else {// this is by referencing InactivePsTimerCallback() @@ -8947,7 +8947,7 @@ P2PMgntTimerCallback( // // If processing, we may have issued a customized scan and InactivePsWorkItemCallback // is still processing. In this case, bScanInProgress is false (but we expect it to be true). - // If we let it go down, the P2P state machine will go to next state immediately, + // If we let it go down, the P2P state machine will go to next state immediately, // and the action should be taken in the previous state will not be done. // if (pPSC->bSwRfProcessing) @@ -8958,23 +8958,23 @@ P2PMgntTimerCallback( } } - switch(pP2PInfo->State) + switch(pP2PInfo->State) { case P2P_STATE_INITIALIZED: { u8Byte curTime = PlatformGetCurrentTime(); - + if(!P2PIsN24GSupported(pP2PInfo)) {// don't do extended listening if 2.4G is not supported break; } - + if(pP2PInfo->bExtendedListening) { P2PExtendedListenComplete(pP2PInfo); } - + if(pP2PInfo->ExtListenTimingPeriodSlotCount >= (u4Byte)P2P_EXT_LISTEN_TIMING_PERIOD_SC && MultiportGetLastConnectionActionTime(pAdapter) + P2P_BLOCK_NORMAL_SCAN_PERIOD <= curTime ) @@ -8985,15 +8985,15 @@ P2PMgntTimerCallback( { P2PExtendedListenStart(pP2PInfo); - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PMgntTimerCallback(): Wait for ExtListen: P2P_EXT_LISTEN_TIMING_PERIOD_SC = %d\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PMgntTimerCallback(): Wait for ExtListen: P2P_EXT_LISTEN_TIMING_PERIOD_SC = %d\n", P2P_EXT_LISTEN_TIMING_PERIOD_SC)); - + // // Next time we get in P2P_STATE_INITIALIZED is when Extended Listen complete. // } - + break; } } @@ -9003,7 +9003,7 @@ P2PMgntTimerCallback( // Device Discovery //====================================================================== case P2P_STATE_DEV_DISC_START: - { + { if(!P2PIsN24GSupported(pP2PInfo)) {// don't do find and listen phase on 5G pP2PInfo->State = P2P_STATE_SCAN; @@ -9014,14 +9014,14 @@ P2PMgntTimerCallback( p2p_Construct_ProbeReq(probeReqBuf, pP2PInfo); P2PConstructScanList(pP2PInfo, req, P2P_LOWEST_RATE, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "dev disc start"); - + pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; break; } - - RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Start Device Discovery: loop times: %u\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Start Device Discovery: loop times: %u\n", pP2PInfo->ConnectionContext.FindPhaseLoopTimes)); - + pP2PInfo->State = P2P_STATE_SCAN; // enter Scan Phase if(pP2PInfo->bPreGroupFormation|| @@ -9029,9 +9029,9 @@ P2PMgntTimerCallback( pP2PInfo->ProvisionDiscoveryContext.bDoingProvisionDiscovery || pP2PInfo->SDContext.bDoingServiceDiscovery || pP2PInfo->ConnectionContext.FindPhaseLoopTimes == 0xFC) - {// this is a discovery issued by invitation procedure => + {// this is a discovery issued by invitation procedure => //don't need the scan phase, enter listen state directly - pP2PInfo->State = P2P_STATE_SEARCH; + pP2PInfo->State = P2P_STATE_SEARCH; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; @@ -9043,11 +9043,11 @@ P2PMgntTimerCallback( if(pP2PInfo->bDiscoverForSpecificChannels) { P2PDeviceDiscoverForSpecificChannels( - pP2PInfo, - pP2PInfo->DiscoverForSpecificChannels, + pP2PInfo, + pP2PInfo->DiscoverForSpecificChannels, pP2PInfo->uNumberOfDiscoverForSpecificChannels ); - + pP2PInfo->State = P2P_STATE_SPECIAL_PEER_SEARCH; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 50); bToFireTimer = FALSE; @@ -9062,17 +9062,17 @@ P2PMgntTimerCallback( { RT_TRACE(COMP_P2P,DBG_LOUD, ("DiscoverSequence & P2PDiscovery_scan_phase\n")); } - else + else { //Jump to the search state directly since the scan is not needed - pP2PInfo->State = P2P_STATE_SEARCH; + pP2PInfo->State = P2P_STATE_SEARCH; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; } // ------------------------------------------------------------------------------------ } -//Sinda: temporarily mark. Because OS does not care bForceScanLegacyNetworks and it is always 0. +//Sinda: temporarily mark. Because OS does not care bForceScanLegacyNetworks and it is always 0. //So at this condition, we do not check bForceScanLegacyNetworks and always do legacy scan. #if 0 if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) @@ -9082,13 +9082,13 @@ P2PMgntTimerCallback( RT_TRACE(COMP_P2P,DBG_LOUD, ("pP2PInfo->bForceScanLegacyNetworks is FALSE and goto search state to scan social channel\n")); //Jump to the search state directly since the scan is not needed - pP2PInfo->State = P2P_STATE_SEARCH; + pP2PInfo->State = P2P_STATE_SEARCH; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; } } -#endif +#endif } /*FALL THROUGH*/ case P2P_STATE_SCAN: @@ -9101,7 +9101,7 @@ P2PMgntTimerCallback( p2p_Construct_ProbeReq(probeReqBuf, pP2PInfo); P2PConstructScanList(pP2PInfo, req, MGN_1M, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "scan phase"); - + pP2PInfo->State = P2P_STATE_LISTEN; // enter Listen State } break; @@ -9111,12 +9111,12 @@ P2PMgntTimerCallback( { u1Byte i = 0; BOOLEAN bFound = FALSE; - + for(i = 0; i < pP2PInfo->DeviceListForQuery.uNumberOfDevices; i++) { if(pP2PInfo->DeviceListForQuery.DeviceEntry[i].DeviceAddress != NULL) { - if( // Make sure the probe response is received + if( // Make sure the probe response is received eqMacAddr(pP2PInfo->ScanDeviceIDs.DeviceIDs[0], pP2PInfo->DeviceListForQuery.DeviceEntry[i].DeviceAddress) && pP2PInfo->DeviceListForQuery.DeviceEntry[i].ProbeResponseHostTimestamp != 0 ) @@ -9129,7 +9129,7 @@ P2PMgntTimerCallback( if(bFound == TRUE) { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: DeviceID Found : Terminate Search State !\n", __FUNCTION__)); - pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; + pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; @@ -9139,19 +9139,19 @@ P2PMgntTimerCallback( // For Win 8: OID_DOT11_WFD_DISCOVER_REQUEST ------------------------------------------ if(!(pP2PInfo->DiscoverSequence & P2P_DISCOVERY_FIND_PHASE) && P2PScanListAllFound(pP2PInfo)) { - //Bypass the find phase + //Bypass the find phase RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Find device\n")); - pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; + pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; } // ------------------------------------------------------------------------------------ - - if(pP2PInfo->ConnectionContext.FindPhaseLoopTimes != 0) + + if(pP2PInfo->ConnectionContext.FindPhaseLoopTimes != 0) { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Listen State\n")); - + if(P2P_SKIP_SCAN_LOOP_CNT > 0) { @@ -9163,9 +9163,9 @@ P2PMgntTimerCallback( { if(pLoopAdapter->MgntInfo.mAssoc) { - portConnected = TRUE; + portConnected = TRUE; break; - } + } pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } if(portConnected && P2P_SKIP_SCAN_LOOP_CNT == pP2PInfo->findPhaseSkipCnt) @@ -9183,7 +9183,7 @@ P2PMgntTimerCallback( p2p_Construct_ProbeReq(probeReqBuf, pP2PInfo); P2PConstructScanList(pP2PInfo, req, P2P_LOWEST_RATE, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "listen state"); - + pP2PInfo->State = P2P_STATE_SEARCH; // enter Search State break; } @@ -9197,7 +9197,7 @@ P2PMgntTimerCallback( { P2P_STATE NextState = pP2PInfo->StateBeforeScan; BOOLEAN bFailedToArriveCommonChannel = FALSE; - + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Device Discovery Complete\n")); if(pP2PInfo->bPreGroupFormation) { @@ -9212,16 +9212,16 @@ P2PMgntTimerCallback( // GO Nego failed, indicate to UI // pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); - + PlatformZeroMemory(&pP2PInfo->ConnectionContext, sizeof(pP2PInfo->ConnectionContext)); - - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE, - RT_STATUS_FAILURE, + + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE, + RT_STATUS_FAILURE, NULL, 0); } else if(pP2PInfo->InvitationContext.bToSendInvitationReqOnProbe) @@ -9236,10 +9236,10 @@ P2PMgntTimerCallback( { MEMORY_BUFFER mbObject = {NULL, 0}; P2P_EVENT_DATA eventData; - + PlatformZeroMemory(&eventData, sizeof(P2P_EVENT_DATA)); eventData.rtStatus = RT_STATUS_FAILURE; - + mbObject.Buffer = (pu1Byte) &eventData; mbObject.Length = sizeof(P2P_EVENT_DATA); @@ -9261,21 +9261,21 @@ P2PMgntTimerCallback( else { if(NULL == (pDev = p2p_DevList_GetGo(&pP2PInfo->devList, pP2PInfo->ProvisionDiscoveryContext.devAddr))) - pDev = p2p_DevList_Get(&pP2PInfo->devList, pP2PInfo->ProvisionDiscoveryContext.devAddr, P2P_DEV_TYPE_DEV); + pDev = p2p_DevList_Get(&pP2PInfo->devList, pP2PInfo->ProvisionDiscoveryContext.devAddr, P2P_DEV_TYPE_DEV); } if(pDev){ pDev->p2p->pdStatus = P2P_SC_FAIL_COMMON_CHANNEL_NOT_ARRIVED; } - + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Failed to send ProvisionDiscReq to peer\n")); - + bFailedToArriveCommonChannel = TRUE; NextState = P2P_STATE_PROVISION_DISCOVERY_COMPLETE; - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, - RT_STATUS_FAILURE, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, + RT_STATUS_FAILURE, NULL, 0); } else if (pP2PInfo->SDContext.bDoingServiceDiscovery) @@ -9286,9 +9286,9 @@ P2PMgntTimerCallback( NextState = P2P_STATE_SERVICE_DISCOVERY_COMPLETE; } else - {// the loop between listen and find phase has been completed + {// the loop between listen and find phase has been completed //P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); - + } if(P2P_DOING_PURE_DEVICE_DISCOVERY(pP2PInfo)) @@ -9315,12 +9315,12 @@ P2PMgntTimerCallback( { u1Byte i = 0; BOOLEAN bFound = FALSE; - + for(i = 0; i < pP2PInfo->DeviceListForQuery.uNumberOfDevices; i++) { if(pP2PInfo->DeviceListForQuery.DeviceEntry[i].DeviceAddress != NULL) { - if( // Make sure the probe response is received + if( // Make sure the probe response is received eqMacAddr(pP2PInfo->ScanDeviceIDs.DeviceIDs[0], pP2PInfo->DeviceListForQuery.DeviceEntry[i].DeviceAddress) && pP2PInfo->DeviceListForQuery.DeviceEntry[i].ProbeResponseHostTimestamp != 0 ) @@ -9333,7 +9333,7 @@ P2PMgntTimerCallback( if(bFound == TRUE) { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: DeviceID Found : Terminate Search State !\n", __FUNCTION__)); - pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; + pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; @@ -9343,7 +9343,7 @@ P2PMgntTimerCallback( if(pP2PInfo->uNumberOfDiscoverRounds == 0) { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: pP2PInfo->uNumberOfDiscoverRounds == 0: Terminate Search State!\n", __FUNCTION__)); - + pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; @@ -9352,10 +9352,10 @@ P2PMgntTimerCallback( else { pP2PInfo->uNumberOfDiscoverRounds--; - + P2PDeviceDiscoverForSpecificChannels( - pP2PInfo, - pP2PInfo->DiscoverForSpecificChannels, + pP2PInfo, + pP2PInfo->DiscoverForSpecificChannels, pP2PInfo->uNumberOfDiscoverForSpecificChannels ); @@ -9369,14 +9369,14 @@ P2PMgntTimerCallback( case P2P_STATE_SEARCH: - { + { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Search State\n")); // For Win 8: OID_DOT11_WFD_DISCOVER_REQUEST ------------------------------------------ if(!(pP2PInfo->DiscoverSequence & P2P_DISCOVERY_FIND_PHASE)&& P2PScanListAllFound(pP2PInfo)) { //Bypass the find phase RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Find device\n")); - pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; + pP2PInfo->State = P2P_STATE_DEV_DISC_COMPLETE; PlatformSetTimer(pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; break; @@ -9389,10 +9389,10 @@ P2PMgntTimerCallback( p2p_Construct_ProbeReq(probeReqBuf, pP2PInfo); P2PConstructScanList(pP2PInfo, req, P2P_LOWEST_RATE, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "search state"); - + pP2PInfo->State = P2P_STATE_LISTEN; // enter Listen State - if(pP2PInfo->ConnectionContext.FindPhaseLoopTimes > 0) + if(pP2PInfo->ConnectionContext.FindPhaseLoopTimes > 0) { if(pP2PInfo->ConnectionContext.FindPhaseLoopTimes == 0xFF || pP2PInfo->ConnectionContext.FindPhaseLoopTimes == 0xFC) // i can't set it to 0xff in d.exe @@ -9413,20 +9413,20 @@ P2PMgntTimerCallback( { P2P_DEV_LIST_ENTRY *pDev = NULL; - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Sending Provision Discovery Req\n")); - pDev = p2p_DevList_Get(&pP2PInfo->devList, - pP2PInfo->ProvisionDiscoveryContext.go ? pP2PInfo->ProvisionDiscoveryContext.goBssid : pP2PInfo->ProvisionDiscoveryContext.devAddr, + pDev = p2p_DevList_Get(&pP2PInfo->devList, + pP2PInfo->ProvisionDiscoveryContext.go ? pP2PInfo->ProvisionDiscoveryContext.goBssid : pP2PInfo->ProvisionDiscoveryContext.devAddr, pP2PInfo->ProvisionDiscoveryContext.go ? P2P_DEV_TYPE_GO : P2P_DEV_TYPE_DEV); - + if(NULL == (req = CustomScan_AllocReq(customScanInfo, NULL, NULL))) break; probeReqBuf = CustomScan_GetProbeReqBuf(req); p2p_Construct_PDReq(pP2PInfo, probeReqBuf, pDev->mac, pDev->p2p->dialogToken, pDev->p2p->pdConfigMethod); P2PConstructScanList(pP2PInfo, req, P2P_LOWEST_RATE, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "to send pd req"); - + pP2PInfo->State = P2P_STATE_PROVISION_DISCOVERY_RSP_WAIT; PlatformSetTimer( pAdapter, @@ -9441,11 +9441,11 @@ P2PMgntTimerCallback( { P2P_DEV_LIST_ENTRY *pDev = NULL; - pDev = p2p_DevList_Get(&pP2PInfo->devList, - pP2PInfo->ProvisionDiscoveryContext.go ? pP2PInfo->ProvisionDiscoveryContext.goBssid : pP2PInfo->ProvisionDiscoveryContext.devAddr, + pDev = p2p_DevList_Get(&pP2PInfo->devList, + pP2PInfo->ProvisionDiscoveryContext.go ? pP2PInfo->ProvisionDiscoveryContext.goBssid : pP2PInfo->ProvisionDiscoveryContext.devAddr, pP2PInfo->ProvisionDiscoveryContext.go ? P2P_DEV_TYPE_GO : P2P_DEV_TYPE_DEV); - - RT_TRACE(COMP_P2P, DBG_LOUD, + + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Timeout waiting for Provision Discovery Rsp\n")); // Comment out because we use off chnl tx to do pd retry if OS support P2P natively @@ -9458,8 +9458,8 @@ P2PMgntTimerCallback( pP2PInfo->State = P2P_STATE_INITIALIZED; p2p_DevList_Unlock(&pP2PInfo->devList); if(P2PProvisionDiscovery( - pP2PInfo, - pP2PInfo->ProvisionDiscoveryContext.devAddr, + pP2PInfo, + pP2PInfo->ProvisionDiscoveryContext.devAddr, pDev->p2p->pdConfigMethod) ) { @@ -9471,7 +9471,7 @@ P2PMgntTimerCallback( p2p_DevList_Unlock(&pP2PInfo->devList); break; } - } + } } RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2P_STATUS_FAIL_TIMEOUT_WAITING_FOR_PROVISION_DISCOVERY_RSP!, retry = 0\n")); pP2PInfo->ProvisionReqRetryCnt = 0; @@ -9484,20 +9484,20 @@ P2PMgntTimerCallback( case P2P_STATE_PROVISION_DISCOVERY_COMPLETE: { BOOLEAN bExtLsn = FALSE; - + p2p_DevList_Lock(&pP2PInfo->devList); { BOOLEAN bSucceed = FALSE; P2P_DEV_LIST_ENTRY *pDev = NULL; - pDev = p2p_DevList_Get(&pP2PInfo->devList, - pP2PInfo->ProvisionDiscoveryContext.go ? pP2PInfo->ProvisionDiscoveryContext.goBssid : pP2PInfo->ProvisionDiscoveryContext.devAddr, + pDev = p2p_DevList_Get(&pP2PInfo->devList, + pP2PInfo->ProvisionDiscoveryContext.go ? pP2PInfo->ProvisionDiscoveryContext.goBssid : pP2PInfo->ProvisionDiscoveryContext.devAddr, pP2PInfo->ProvisionDiscoveryContext.go ? P2P_DEV_TYPE_GO : P2P_DEV_TYPE_DEV); if(NULL == pDev) { RT_TRACE_F(COMP_P2P, DBG_SERIOUS, ("pDev = NULL\n")); - RT_ASSERT(FALSE, ("pDev = NULL")); + RT_ASSERT(FALSE, ("pDev = NULL")); PlatformZeroMemory(&pP2PInfo->ProvisionDiscoveryContext, sizeof(pP2PInfo->ProvisionDiscoveryContext)); PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; @@ -9508,7 +9508,7 @@ P2PMgntTimerCallback( if(NULL == pDev->p2p) { RT_TRACE_F(COMP_P2P, DBG_SERIOUS, ("pDev->p2p = NULL\n")); - RT_ASSERT(FALSE, ("pDev->p2p = NULL")); + RT_ASSERT(FALSE, ("pDev->p2p = NULL")); PlatformZeroMemory(&pP2PInfo->ProvisionDiscoveryContext, sizeof(pP2PInfo->ProvisionDiscoveryContext)); PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; @@ -9526,18 +9526,18 @@ P2PMgntTimerCallback( if(P2P_ADAPTER_OS_SUPPORT_P2P(pAdapter)) { u2Byte boostDelaySec = WPS_HANDSHAKE_TIMEOUT_SEC; - + McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); - RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] P2P_STATE_PROVISION_DISCOVERY_COMPLETE:\n")); + RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] P2P_STATE_PROVISION_DISCOVERY_COMPLETE:\n")); } - + if(bSucceed) { - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PMgntTimerCallback(): Provision Discovery succeed: %u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PMgntTimerCallback(): Provision Discovery succeed: %u\n", pDev->p2p->pdStatus)); - P2PIndicateOnProvisionDiscoveryRsp(pP2PInfo, + P2PIndicateOnProvisionDiscoveryRsp(pP2PInfo, pDev->p2p->pdConfigMethod, pDev->mac); // Set the ConfigMethod parameter to FFFF to indicate timeout @@ -9570,7 +9570,7 @@ P2PMgntTimerCallback( 0 ); } - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Provision Discovery failed: %u\n", pDev->p2p->pdStatus)); if(pDev->p2p->pdStatus == P2P_SC_FAIL_COMMON_CHANNEL_NOT_ARRIVED) @@ -9581,13 +9581,13 @@ P2PMgntTimerCallback( { pDev->p2p->pdConfigMethod = 0xFF; } - - P2PSvc_OnSendPDReqFailure(pP2PInfo->pP2PSvcInfo, + + P2PSvc_OnSendPDReqFailure(pP2PInfo->pP2PSvcInfo, pDev->mac, pDev->p2p->pdStatus ); - - P2PIndicateOnProvisionDiscoveryRsp(pP2PInfo, + + P2PIndicateOnProvisionDiscoveryRsp(pP2PInfo, pDev->p2p->pdConfigMethod, pDev->mac); // Set the ConfigMethod parameter to FFFF to indicate timeout @@ -9612,7 +9612,7 @@ P2PMgntTimerCallback( P2PExtendedListenStart(pP2PInfo); } } - + break; //====================================================================== @@ -9623,10 +9623,10 @@ P2PMgntTimerCallback( { P2P_DEV_LIST_ENTRY *pDev = NULL; - pDev = p2p_DevList_Get(&pP2PInfo->devList, - pP2PInfo->ConnectionContext.ConnectingDevice.DeviceAddress, + pDev = p2p_DevList_Get(&pP2PInfo->devList, + pP2PInfo->ConnectionContext.ConnectingDevice.DeviceAddress, P2P_DEV_TYPE_DEV); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Group Formating\n")); // Pause default adapter's traffic if group formating MultichannelHandlePacketDuringScan(GetDefaultAdapter(pAdapter), TRUE); @@ -9636,10 +9636,10 @@ P2PMgntTimerCallback( // 2014.04.03. // pP2PDeviceListEntry = P2PDeviceListFind(&pP2PInfo->DeviceList, pDev->mac); - if(pP2PDeviceListEntry) - { + if(pP2PDeviceListEntry) + { if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) - { + { BoostInitGainValue = TRUE; BoostInitGainValue = (BoostInitGainValue | ((pP2PDeviceListEntry->RecvSignalPower+110) << 8)); pP2PInfo->pAdapter->HalFunc.SetHwRegHandler(pP2PInfo->pAdapter, HW_VAR_BOOST_INIT_GAIN_OS, (pu1Byte)&BoostInitGainValue); @@ -9649,7 +9649,7 @@ P2PMgntTimerCallback( if(FALSE == P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) pP2PInfo->GOIntent = ((pP2PInfo->GOIntent & 0xFE) | !(pP2PInfo->GOIntent & 0x01)); - + p2p_Send_GoNegReq(pP2PInfo, pDev->mac, TRUE); pP2PInfo->State = P2P_STATE_GO_NEGO_RSP_WAIT; @@ -9693,25 +9693,25 @@ P2PMgntTimerCallback( bToFireTimer = FALSE; pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); } break; case P2P_STATE_GO_NEGO_CONFIRM_WAIT: { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Timeout waiting for GO Nego Confirm\n")); - + pP2PInfo->State = P2P_STATE_GO_NEGO_COMPLETE; pP2PInfo->ConnectionContext.Status = P2P_STATUS_FAIL_TIMEOUT_WAITING_FOR_GON_CONFIRM; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); } break; @@ -9727,7 +9727,7 @@ P2PMgntTimerCallback( if(P2P_ADAPTER_OS_SUPPORT_P2P(pAdapter)) { u2Byte boostDelaySec = WPS_HANDSHAKE_TIMEOUT_SEC; - + McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] P2P_STATE_GO_NEGO_COMPLETE:\n")); } @@ -9739,7 +9739,7 @@ P2PMgntTimerCallback( } pP2PInfo->PreviousGONegoResult = (P2P_STATUS_CODE)pP2PInfo->ConnectionContext.Status; - + if(pP2PInfo->ConnectionContext.Status == P2P_STATUS_SUCCESS) { // @@ -9748,13 +9748,13 @@ P2PMgntTimerCallback( if(pP2PInfo->ConnectionContext.bGoingToBeGO) { // Only copy the infomration in GO from our P2P info because these info shall be from ours but not the target (client). pP2PInfo->ConnectionContext.ConnectingDevice.OperatingChannel = pP2PInfo->OperatingChannel; - CopySsid(pP2PInfo->ConnectionContext.ConnectingDevice.SsidBuf, pP2PInfo->ConnectionContext.ConnectingDevice.SsidLen, pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen); + CopySsid(pP2PInfo->ConnectionContext.ConnectingDevice.SsidBuf, pP2PInfo->ConnectionContext.ConnectingDevice.SsidLen, pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen); } //P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); P2PDumpGroupFormationResult(pP2PInfo); - P2PIndicateGOFormatedInfo(pP2PInfo, - pP2PInfo->ConnectionContext.Status, - pP2PInfo->ConnectionContext.bGoingToBeGO, + P2PIndicateGOFormatedInfo(pP2PInfo, + pP2PInfo->ConnectionContext.Status, + pP2PInfo->ConnectionContext.bGoingToBeGO, &pP2PInfo->ConnectionContext.ConnectingDevice); if(pP2PInfo->ConnectionContext.bGoingToBeGO) @@ -9767,7 +9767,7 @@ P2PMgntTimerCallback( // GO SSID is determined when GONegoReq or GONegoRsp is received // and it is stored in pP2PInfo->SSIDBuf // - CopySsid(P2PProfile.SsidBuf, P2PProfile.SsidBufLen, pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen); + CopySsid(P2PProfile.SsidBuf, P2PProfile.SsidBufLen, pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen); // // We use this to modify the SSID of the SoftAP @@ -9783,20 +9783,20 @@ P2PMgntTimerCallback( // GO Nego failed, indicate to UI // For the failure case, indicate earlier when we determine the negotiation is failed. // - //P2PIndicateGOFormatedInfo(pP2PInfo, - // pP2PInfo->ConnectionContext.Status, - // pP2PInfo->ConnectionContext.bGoingToBeGO, + //P2PIndicateGOFormatedInfo(pP2PInfo, + // pP2PInfo->ConnectionContext.Status, + // pP2PInfo->ConnectionContext.bGoingToBeGO, // &pP2PInfo->ConnectionContext.ConnectingDevice); - + PlatformZeroMemory(&pP2PInfo->ConnectionContext, sizeof(pP2PInfo->ConnectionContext)); pP2PInfo->State = P2P_STATE_INITIALIZED; } - + PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); - bToFireTimer = FALSE; + bToFireTimer = FALSE; } break; - + //====================================================================== // WPS //====================================================================== @@ -9809,13 +9809,13 @@ P2PMgntTimerCallback( // Reset WPS related flags pP2PInfo->ConnectionContext.bDoingProvisioning = FALSE; - // + // // Clause 3.1.4.3: - // Group Formation bit in the P2P Group Cap shall be set to 1 until Provisioning succeeds. + // Group Formation bit in the P2P Group Cap shall be set to 1 until Provisioning succeeds. // pP2PInfo->GroupCapability |= gcGroupFormation; // set the bit - if(pP2PInfo->ConnectionContext.bGoingToBeGO && + if(pP2PInfo->ConnectionContext.bGoingToBeGO && !P2P_ACTING_AS_GO(pP2PInfo)) // for the case that we invite a Dev to join our group, we shall not change SSID or restart AP {// start AP mode P2PSetRole(pP2PInfo, P2P_GO); @@ -9832,16 +9832,16 @@ P2PMgntTimerCallback( pP2PInfo->ConnectionContext.ProvisioningResult = P2P_PROVISIONING_RESULT_UNKNOWN; } - // + // // Clause 3.1.3.4: // To allow for P2P Device configuration, P2P Devices may delay starting the Provisioning phase // until the expiration of the max of the P2P GO's GO Config Time and the Client's Client Config Time. // if(pP2PInfo->ConnectionContext.bGoingToBeGO) - {// I'm going to be the GO => just enter provisioning state without waiting for configuration timeout + {// I'm going to be the GO => just enter provisioning state without waiting for configuration timeout ConfigurationTimeout = 0; //(10 * MAX(pP2PInfo->GOConfigurationTimeout, pP2PInfo->ConnectionContext.ConnectingDevice.ClientConfigurationTimeout)); } - else + else {// I'm going to be the Client ConfigurationTimeout = (10 * MAX(pP2PInfo->ClientConfigurationTimeout, pP2PInfo->ConnectionContext.ConnectingDevice.GOConfigurationTimeout)); } @@ -9854,7 +9854,7 @@ P2PMgntTimerCallback( pP2PInfo->Role = P2P_DEVICE; pP2PInfo->State = P2P_STATE_INITIALIZED; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); - bToFireTimer = FALSE; + bToFireTimer = FALSE; // ---------------------------------------------------------------------------------- } else @@ -9864,14 +9864,14 @@ P2PMgntTimerCallback( // pP2PInfo->State = P2P_STATE_PROVISIONING; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, ConfigurationTimeout); // wait for configuration - bToFireTimer = FALSE; + bToFireTimer = FALSE; } } break; case P2P_STATE_PROVISIONING: - { + { //RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_PROVISIONING\n")); - + //if(pP2PInfo->ConnectionContext.bDoingProvisioning) {// doing provisioning // @@ -9883,16 +9883,16 @@ P2PMgntTimerCallback( {// Provisioning succeed P2PSetOperatingState(pP2PInfo); if(pP2PInfo->ConnectionContext.bGoingToBeGO) - { + { } else {// set client role P2PSetRole(pP2PInfo, P2P_CLIENT); RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): provisioning succeed\n")); } - + PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); - bToFireTimer = FALSE; + bToFireTimer = FALSE; } else if(pP2PInfo->ConnectionContext.ProvisioningResult == P2P_PROVISIONING_RESULT_FAILED) {// Provisioning failed => indicate Group Formation failed @@ -9900,10 +9900,10 @@ P2PMgntTimerCallback( // Clause 3.1.4.3: End the P2P Group session as described in Clause 3.2.9 // SendDeauthentication(pP2PInfo->pAdapter, BroadcastAddress, deauth_lv_ss); - + pP2PInfo->State = P2P_STATE_INITIALIZED; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_DEFAULT_MGNT_PERIOD); - bToFireTimer = FALSE; + bToFireTimer = FALSE; RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): provisioning failed\n")); } @@ -9917,9 +9917,9 @@ P2PMgntTimerCallback( if(pP2PInfo->ConnectionContext.ProvisioningResult != P2P_PROVISIONING_RESULT_UNKNOWN) {// Provisioning has been done, either failed or succeed - // + // // Clause 3.1.4.3: - // Group Formation bit in the P2P Group Cap shall be set to 1 until Provisioning succeeds. + // Group Formation bit in the P2P Group Cap shall be set to 1 until Provisioning succeeds. // pP2PInfo->GroupCapability &= ~gcGroupFormation; // clear the bit RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): provisioning done\n")); @@ -9932,7 +9932,7 @@ P2PMgntTimerCallback( } } break; - + //====================================================================== // Group Operation //====================================================================== @@ -9949,31 +9949,31 @@ P2PMgntTimerCallback( if(P2P_ACTING_AS_GO(pP2PInfo)) { - if(P2PClientInfoGetCount(pP2PInfo) == 0 && + if(P2PClientInfoGetCount(pP2PInfo) == 0 && !pP2PInfo->bGOStartedAutonomously) // not to check this if GO started autonomously {// no client pP2PInfo->P2PGONoClientSlotCount++; - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PMgntTimerCallback(): no client slot count: %d\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PMgntTimerCallback(): no client slot count: %d\n", pP2PInfo->P2PGONoClientSlotCount)); } else { pP2PInfo->ExtListenTimingPeriodSlotCount = 0; } - + if(pP2PInfo->P2PGONoClientSlotCount == P2P_NO_CLIENT_PERIOD_SC) - { + { P2PDisconnect(pP2PInfo); // to stop the SoftAP and back to init state pP2PInfo->P2PGONoClientSlotCount = 0; // Comment out because these are handled in P2PDisconnect. //pP2PInfo->State = P2P_STATE_INITIALIZED; //pP2PInfo->Role = P2P_DEVICE; - + bToFireTimer = FALSE; - - RT_TRACE(COMP_P2P, DBG_LOUD, + + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Stop GO and back to P2P_STATE_INITIALIZED\n")); } } @@ -9982,31 +9982,31 @@ P2PMgntTimerCallback( if(!P2PDefaultPortConnected(pP2PInfo) && !P2PProvisioning(pP2PInfo)) { pP2PInfo->P2PClientDisconnectedSlotCount++; - RT_TRACE(COMP_P2P, DBG_LOUD, - ("P2PMgntTimerCallback(): P2P Client disconnected slot count: %d\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("P2PMgntTimerCallback(): P2P Client disconnected slot count: %d\n", pP2PInfo->P2PClientDisconnectedSlotCount)); } else {// def port connected or doing provisioning pP2PInfo->P2PClientDisconnectedSlotCount = 0; } - + if(pP2PInfo->P2PClientDisconnectedSlotCount == P2P_CLIENT_DISCONNECTED_PERIOD_SC) { P2PDisconnect(pP2PInfo); // will back to init state pP2PInfo->P2PClientDisconnectedSlotCount = 0; pP2PInfo->State = P2P_STATE_INITIALIZED; P2PSetRole(pP2PInfo, P2P_DEVICE); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): back to P2P_STATE_INITIALIZED because we are acting as Client but default port is disconnected\n")); } } } - + PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_DEFAULT_MGNT_PERIOD); - bToFireTimer = FALSE; + bToFireTimer = FALSE; } break; //====================================================================== @@ -10019,8 +10019,8 @@ P2PMgntTimerCallback( if(NULL == (req = CustomScan_AllocReq(customScanInfo, NULL, NULL))) break; probeReqBuf = CustomScan_GetProbeReqBuf(req); - p2p_Construct_InvitationReq(pP2PInfo, probeReqBuf, - pP2PInfo->InvitationContext.InvitedDevice.DeviceAddress, + p2p_Construct_InvitationReq(pP2PInfo, probeReqBuf, + pP2PInfo->InvitationContext.InvitedDevice.DeviceAddress, pP2PInfo->InvitationContext.DialogToken); P2PConstructScanList(pP2PInfo, req, P2P_LOWEST_RATE, probeReqBuf); CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "to send inv req"); @@ -10048,7 +10048,7 @@ P2PMgntTimerCallback( //break; case P2P_STATE_INVITATION_COMPLETE: { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_INVITATION_COMPLETE, status: %u, persistent: %u, ch: %u\n", pP2PInfo->InvitationContext.Status, pP2PInfo->InvitationContext.bPersistentInvitation, pP2PInfo->InvitationContext.OpChannel)); @@ -10059,7 +10059,7 @@ P2PMgntTimerCallback( if(P2P_ADAPTER_OS_SUPPORT_P2P(pAdapter)) { u2Byte boostDelaySec = ASSOC_HANDSHAKE_DHCP_DELAY_SEC; - + McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS] P2P_STATE_INVITATION_COMPLETE:\n")); } @@ -10068,7 +10068,7 @@ P2PMgntTimerCallback( // We use P2PDeviceDiscovery() to arrive common chnll before sendding InvitationReq, // In P2PDeviceDiscovery(), beacon is stopped, so we have to resume beaconning here. // - // If P2P_STATUS_FAIL_COMMON_CHANNEL_NOT_ARRIVED, + // If P2P_STATUS_FAIL_COMMON_CHANNEL_NOT_ARRIVED, // P2PDeviceDiscoveryComplete() is called in P2P_STATE_DEV_DISC_COMPLETE case, // so we don' t have to call it again // @@ -10080,22 +10080,22 @@ P2PMgntTimerCallback( { pP2PInfo->State = pP2PInfo->StateBeforeScan; } - + P2PInvitePeerComplete(pP2PInfo); - P2PIndicateOnInvitationRsp(pP2PInfo, - pP2PInfo->InvitationContext.Status, + P2PIndicateOnInvitationRsp(pP2PInfo, + pP2PInfo->InvitationContext.Status, pP2PInfo->InvitationContext.bPersistentInvitation, pP2PInfo->InvitationContext.OpChannel, - pP2PInfo->InvitationContext.InvitorRole, - pP2PInfo->InvitationContext.SsidLen, + pP2PInfo->InvitationContext.InvitorRole, + pP2PInfo->InvitationContext.SsidLen, pP2PInfo->InvitationContext.SsidBuf); // Indicating InvitationRsp may trigger a connect request which may further triger a reset request, // and reset request resets all timers including the P2P mgnt timer. // Indicate current state immediately so that upper layers will not show "inviting" for a long time. //P2PIndicateCurrentState(pP2PInfo, pP2PInfo->State); - + if(!pP2PInfo->InvitationContext.bWaitingBackwardInvite) { PlatformZeroMemory(&(pP2PInfo->InvitationContext), sizeof(P2P_INVITATION_CONTEXT)); @@ -10112,14 +10112,14 @@ P2PMgntTimerCallback( case P2P_STATE_DEVICE_DISCOVERABILITY_WAIT_BEACON: {// timeout waiting for beacon from the GO pP2PInfo->DeviceDiscoverabilityContext.Status = P2P_STATUS_FAIL_TIMEOUT_WAITING_FOR_GO_BEACON; - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_DEVICE_DISCOVERABILITY_WAIT_BEACON: Timeout waiting for GO Beacon\n")); pP2PInfo->State = P2P_STATE_DEVICE_DISCOVERABILITY_COMPLETE; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; } break; - + case P2P_STATE_DEVICE_DISCOVERABILITY_REQ_SEND: { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_INVITATION_REQ_SEND\n")); @@ -10127,25 +10127,25 @@ P2PMgntTimerCallback( p2p_Send_DevDiscReq(pP2PInfo, pP2PInfo->DeviceDiscoverabilityContext.GoBssid, pP2PInfo->DeviceDiscoverabilityContext.ClientDeviceAddress, pP2PInfo->DeviceDiscoverabilityContext.DialogToken); - + pP2PInfo->State = P2P_STATE_DEVICE_DISCOVERABILITY_RSP_WAIT; PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_DEVICE_DISCOVERABILITY_FRAME_TIMEOUT); bToFireTimer = FALSE; } break; - + case P2P_STATE_DEVICE_DISCOVERABILITY_RSP_WAIT: {// timeout waithing for DeviceDiscoverabilityRsp pP2PInfo->DeviceDiscoverabilityContext.Status = P2P_STATUS_FAIL_TIMEOUT_WAITING_FOR_DEVICE_DISCOVERABILITY_RSP; - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_DEVICE_DISCOVERABILITY_RSP_WAIT: Timeout waiting for DeviceDiscoverabilityRsp\n")); } /*FALL THROUGH*/ - + case P2P_STATE_DEVICE_DISCOVERABILITY_COMPLETE: { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_DEVICE_DISCOVERABILITY_COMPLETE: Status(%u)\n", pP2PInfo->DeviceDiscoverabilityContext.Status)); @@ -10170,14 +10170,14 @@ P2PMgntTimerCallback( //====================================================================== case P2P_STATE_SERVICE_DISCOVERY_REQ_SEND: { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): P2P_STATE_SERVICE_DISCOVERY_REQ_SEND\n")); /* we will never reach here, see P2PCommonChannelArrived */ } break; - - case P2P_STATE_SERVICE_DISCOVERY_COMEBACK_RSP_WAIT: + + case P2P_STATE_SERVICE_DISCOVERY_COMEBACK_RSP_WAIT: { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Timeout waiting for ComebackRsp\n")); @@ -10188,7 +10188,7 @@ P2PMgntTimerCallback( bToFireTimer = FALSE; } break; - + case P2P_STATE_SERVICE_DISCOVERY_RSP_WAIT: { RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): Timeout waiting for SDRsp\n")); @@ -10200,10 +10200,10 @@ P2PMgntTimerCallback( bToFireTimer = FALSE; } break; - + case P2P_STATE_SERVICE_DISCOVERY_COMPLETE: { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PMgntTimerCallback(): SD Complete: Status (%u)\n", pP2PInfo->SDContext.Status)); @@ -10224,7 +10224,7 @@ P2PMgntTimerCallback( // Clear SDContext PlatformZeroMemory(&pP2PInfo->SDContext, sizeof(P2P_SD_CONTEXT)); - + PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, 0); bToFireTimer = FALSE; } @@ -10243,10 +10243,10 @@ P2PMgntTimerCallback( { PlatformSetTimer( pAdapter, &pP2PInfo->P2PMgntTimer, P2P_DEFAULT_MGNT_PERIOD); } - + exit_P2PMgntTimerCallback: return; - + } VOID @@ -10256,12 +10256,12 @@ P2PMlmeAssociateRequest( u4Byte asocTmot, u2Byte asCap, u2Byte asListenInterval, - BOOLEAN Reassociate + BOOLEAN Reassociate ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); PRT_WLAN_BSS pBssDesc ; - + if(!P2P_ENABLED(GET_P2P_INFO(Adapter))) { return; @@ -10274,7 +10274,7 @@ P2PMlmeAssociateRequest( if(!(pBssDesc->P2PManagedInfo & maP2PCrossConnectionPermitted) && (pP2PInfo->GroupCapability & gcCrossConnection)) {// we support cross conn but the connecting ap does not allow that - RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "P2PMlmeAssociateRequest(): Cross connection is not allowed by the AP => disable cross connection\n", asocStaAddr); pP2PInfo->GroupCapability &= ~gcCrossConnection; } @@ -10293,7 +10293,7 @@ P2PMlmeAssociateRequest( // The packet container including the information of packet. // [in] posMpdu - // The location address of full 802.11 frame. -// +// // Return: // Return RT_STATUS_SUCCESS if the parsing succeeds. // Remark: @@ -10307,23 +10307,23 @@ P2P_OnAssocOK( IN POCTET_STRING posMpdu ) { - RT_STATUS rtStatus = RT_STATUS_SUCCESS; + RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); pu1Byte DeviceAddress = NULL; pu1Byte InterfaceAddress = Frame_pSaddr(*posMpdu); - PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; + PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; PADAPTER pLoopAdapter = NULL; PP2P_INFO pLoopP2PInfo = NULL; - P2P_MESSAGE msg; - - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("connected with Legacy AP\n")); + P2P_MESSAGE msg; + + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("connected with Legacy AP\n")); FunctionIn(COMP_P2P); PlatformZeroMemory(&msg, sizeof(P2P_MESSAGE)); - + do { BOOLEAN bGo = FALSE; @@ -10335,7 +10335,7 @@ P2P_OnAssocOK( { if(!P2P_ENABLED(pLoopP2PInfo)) continue; - + if(P2P_CLIENT != pLoopP2PInfo->Role && P2P_GO != pLoopP2PInfo->Role) { pLoopP2PInfo->OperatingChannel = pMgntInfo->dot11CurrentChannelNumber; @@ -10352,7 +10352,7 @@ P2P_OnAssocOK( rtStatus = RT_STATUS_SUCCESS; break; } - + if(RT_STATUS_SUCCESS == (rtStatus = p2p_parse_Ies(posMpdu, DBG_LOUD, &msg))) if(!p2p_validate_AssocRsp(&msg)) { @@ -10365,7 +10365,7 @@ P2P_OnAssocOK( // // osP2PIE = PacketGetElement(asocpdu, EID_Vendor, OUI_SUB_WIFI_DIRECT, OUI_SUB_DONT_CARE); bGo = (NULL != FrameBuf_Head(&msg.p2pAttributes)); - + // Update scan list for query so that upper layers can query the most up to date scan list to determine // whether the connecting AP is a GO. P2P_UpdateScanList(pAdapter); @@ -10393,7 +10393,7 @@ P2P_OnAssocOK( { pP2PInfo->OperatingChannel = MgntActQuery_802_11_CHANNEL_NUMBER(pP2PInfo->pAdapter); pP2PInfo->ListenChannel = MgntActQuery_802_11_CHANNEL_NUMBER(pP2PInfo->pAdapter); - + // Also adjust GO intent to 15 so that we won't become a P2P Client after negotiation. { pP2PInfo->GOIntent = ((15 << 1) | (pP2PInfo->GOIntent & 0x01)); @@ -10410,16 +10410,16 @@ P2P_OnAssocOK( PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); } - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2P listen chnl changed to %u\n", pMgntInfo->dot11CurrentChannelNumber)); - } + } } - - PlatformSetTimer(pAdapter, &(pP2PInfo->P2PMgntTimer), 0); + + PlatformSetTimer(pAdapter, &(pP2PInfo->P2PMgntTimer), 0); }while(FALSE); p2p_parse_FreeMessage(&msg); - + return rtStatus; } @@ -10427,7 +10427,7 @@ P2P_OnAssocOK( // Description: // Set P2P Power Save mode for GO. // Arguments: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // [in] pP2pPs - // The address of P2P power save setting. @@ -10467,9 +10467,9 @@ P2PSetPowerSaveMode( if((pP2PInfo->Role != P2P_GO) && (pP2PInfo->Role != P2P_CLIENT)) return RT_STATUS_FAILURE; - P2PSetPsState(pP2PInfo, P2P_PS_CANCEL_ALL_PS, P2P_PS_AWAKE, 0); + P2PSetPsState(pP2PInfo, P2P_PS_CANCEL_ALL_PS, P2P_PS_AWAKE, 0); - RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PSetPowerSaveMode(): Reason = %d\n", psReason)); + RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PSetPowerSaveMode(): Reason = %d\n", psReason)); PlatformMoveMemory(&pP2PInfo->P2pPsConfgSet, pP2pPs, sizeof(P2P_POWERSAVE_SET)); @@ -10498,7 +10498,7 @@ P2PSetPowerSaveMode( P2PPsTimeout(pAdapter); } else if(pP2PInfo->psExeType == RT_P2P_PS_EXE_BY_HW && pAdapter->MgntInfo.bWiFiConfg) - { // HW caculate + { // HW caculate P2PSetPsState(pP2PInfo, P2P_PS_CANCEL_ALL_PS, P2P_PS_AWAKE, 0); } else @@ -10514,7 +10514,7 @@ P2PSetPowerSaveMode( // Description: // Update the P2P power save setting from the configuration. // Arguments: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // Return: // If success, return RT_STATUS_SUCCESS; Otherwise, return an error code. @@ -10537,7 +10537,7 @@ P2PUpdatePowerSavePara( if(!pP2PInfo->bUpdatePsParameter) return RT_STATUS_FAILURE; - + usBeaconInterval = pP2PInfo->pAdapter->MgntInfo.dot11BeaconPeriod * sTU; pP2PInfo->bOppPS = pP2PInfo->P2pPsConfgSet.bOppPs; @@ -10570,24 +10570,24 @@ P2PUpdatePowerSavePara( for(i = 0; i < P2P_MAX_NUM_NOA_DESC; i ++) { pP2PInfo->NoADescriptors[i].bValid = pP2PInfo->P2pPsConfgSet.NoASet[i].bNoAEn; - + // If the interval is not long enough to get into awake state, mark it as no NoA. if((pP2PInfo->P2pPsConfgSet.NoASet[i].NoADur < 4 * P2P_PS_TIMEOUT_TOLERANCE) || ((pP2PInfo->P2pPsConfgSet.NoASet[i].NoADur + 10000) > pP2PInfo->P2pPsConfgSet.NoASet[i].NoAInt && pP2PInfo->P2pPsConfgSet.NoASet[i].NoACnt != 1 && pP2PInfo->NoADescriptors[i].bValid)) { pP2PInfo->NoADescriptors[i].bValid = FALSE; - RT_TRACE(COMP_P2P, DBG_WARNING, (" Setting Values are invalid: Duration (0x%08X), Interval (0x%08X) and count = %d\n", + RT_TRACE(COMP_P2P, DBG_WARNING, (" Setting Values are invalid: Duration (0x%08X), Interval (0x%08X) and count = %d\n", pP2PInfo->P2pPsConfgSet.NoASet[i].NoADur, pP2PInfo->P2pPsConfgSet.NoASet[i].NoAInt, pP2PInfo->P2pPsConfgSet.NoASet[i].NoACnt)); } - + pP2PInfo->NoADescriptors[i].CountOrType = (pP2PInfo->NoADescriptors[i].bValid) ? pP2PInfo->P2pPsConfgSet.NoASet[i].NoACnt : 0; pP2PInfo->NoADescriptors[i].Duration = (pP2PInfo->NoADescriptors[i].bValid) ? pP2PInfo->P2pPsConfgSet.NoASet[i].NoADur : 0; pP2PInfo->NoADescriptors[i].Interval = (pP2PInfo->NoADescriptors[i].bValid) ? pP2PInfo->P2pPsConfgSet.NoASet[i].NoAInt : 0; if(pP2PInfo->NoADescriptors[i].bValid) - { + { // Modify the start time to be the mod of beacon interval. // If the user didn't specify the shift time, using the defualt value 500 ms. - u8StartTime = (pP2PInfo->P2pPsConfgSet.NoASet[i].bUseStartTime) ? + u8StartTime = (pP2PInfo->P2pPsConfgSet.NoASet[i].bUseStartTime) ? ((curTsf & UINT64_C(0xFFFFFFFF00000000)) | pP2PInfo->P2pPsConfgSet.NoASet[i].u4StartTime) : PlatformDivision64(curTsf, usBeaconInterval) * usBeaconInterval + 5 * usBeaconInterval; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bUseStartTime = %d, u8StartTime = 0x%08X %08X, div = 0x%08X\n", pP2PInfo->P2pPsConfgSet.NoASet[i].bUseStartTime, (u4Byte)(u8StartTime >> 32), (u4Byte)u8StartTime, (u4Byte)PlatformDivision64(curTsf, usBeaconInterval))); @@ -10595,7 +10595,7 @@ P2PUpdatePowerSavePara( // Store the exact TSF timer for timeout reference. pP2PInfo->NoADescriptors[i].u8StartTime = u8StartTime; - // Extract the low 4 bytes. + // Extract the low 4 bytes. pP2PInfo->NoADescriptors[i].StartTime = (u4Byte)(u8StartTime & 0xFFFFFFFF); nextAdvancedTsf = (pP2PInfo->NoADescriptors[i].u8StartTime & UINT64_C(0xFFFFFFFF00000000)) + UINT64_C(0x0000000100000000); @@ -10610,8 +10610,8 @@ P2PUpdatePowerSavePara( } else { - pP2PInfo->NoADescriptors[i].u8EndTime = (u8Byte)(pP2PInfo->NoADescriptors[i].u8StartTime + - (pP2PInfo->NoADescriptors[i].CountOrType * pP2PInfo->NoADescriptors[i].Interval) - + pP2PInfo->NoADescriptors[i].u8EndTime = (u8Byte)(pP2PInfo->NoADescriptors[i].u8StartTime + + (pP2PInfo->NoADescriptors[i].CountOrType * pP2PInfo->NoADescriptors[i].Interval) - (pP2PInfo->NoADescriptors[i].Interval - pP2PInfo->NoADescriptors[i].Duration)); } @@ -10643,7 +10643,7 @@ P2PUpdatePowerSavePara( { RT_TRACE(COMP_P2P, DBG_LOUD, ("-----NoA[%d]-----\nbValid = %d, Count = %X, Duration = 0x%08X (Dec = %d), Interval = 0x%08X (Dec = %d)\nu8StartTime = 0x%08X %08X (Low Dec = %d), \nu8EndTime = 0x%08X %08X (Low Dec = %d)\n------------\n", i, - pP2PInfo->NoADescriptors[i].bValid, + pP2PInfo->NoADescriptors[i].bValid, pP2PInfo->NoADescriptors[i].CountOrType, pP2PInfo->NoADescriptors[i].Duration, pP2PInfo->NoADescriptors[i].Duration, @@ -10712,7 +10712,7 @@ P2PPsWorkItemCallback( { if(RT_CANNOT_IO(pP2PInfo->pAdapter)) break; - + pP2PInfo->usSleepTime = 0; if(pP2PInfo->bUpdatePsParameter) { @@ -10724,7 +10724,7 @@ P2PPsWorkItemCallback( P2PPsTimeout(pP2PInfo->pAdapter); } else if(pP2PInfo->psExeType == RT_P2P_PS_EXE_BY_HW) - { // HW caculate + { // HW caculate P2PSetPsState(pP2PInfo, 0, 0, 0); break; } @@ -10746,7 +10746,7 @@ P2PPsWorkItemCallback( // Description: // On receiving a P2P PS timeout event, review the TSF timer and check all the condition whether the state is going into. // Arguemtns: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // Return: // None. @@ -10756,7 +10756,7 @@ VOID P2PPsTimeout( IN PADAPTER pAdapter ) -{ +{ PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); // should be the default mgnt info PP2P_INFO pP2PInfo = pMgntInfo->pP2PInfo; PADAPTER pExtAdapter = P2P_ADAPTER_OS_SUPPORT_P2P(pAdapter) ? pAdapter : GetFirstExtAdapter(pAdapter); @@ -10773,14 +10773,14 @@ P2PPsTimeout( u4Byte psStateToSet = P2P_PS_AWAKE; u4Byte psSourceToSet = P2P_PS_CANCEL_ALL_PS; u8Byte psTimeoutToSet = 0; - + FunctionIn(COMP_P2P); // The role is incorrect if(pP2PInfo->Role != P2P_GO && pP2PInfo->Role != P2P_CLIENT) return; - + if(P2P_CLIENT == pP2PInfo->Role && !pMgntInfo->mAssoc) { @@ -10789,7 +10789,7 @@ P2PPsTimeout( } // No P2P PS mode and the power state is awake. - if(pP2PInfo->PsFlag == P2P_PS_CANCEL_ALL_PS && pP2PInfo->P2pPsState == P2P_PS_AWAKE && pP2PInfo->CTWindow == 0 && + if(pP2PInfo->PsFlag == P2P_PS_CANCEL_ALL_PS && pP2PInfo->P2pPsState == P2P_PS_AWAKE && pP2PInfo->CTWindow == 0 && pP2PInfo->NoADescriptors[0].u8StartTime == 0 && pP2PInfo->NoADescriptors[1].u8StartTime == 0) { return; @@ -10819,7 +10819,7 @@ P2PPsTimeout( // // Cleint is in the awake state, the CTWindow doen't apply now. - // if(pP2PInfo->Role == P2P_CLIENT && + // if(pP2PInfo->Role == P2P_CLIENT && // (pP2PInfo->pAdapter->MgntInfo.dot11PowerSaveMode == eActive)) //{ // usCTWindow = 0; @@ -10864,7 +10864,7 @@ P2PPsTimeout( P2pPsSet.NoASet[i].NoACnt = pP2PInfo->NoADescriptors[i].CountOrType; P2pPsSet.NoASet[i].bUseStartTime = TRUE; P2pPsSet.NoASet[i].u4StartTime = pP2PInfo->NoADescriptors[i].StartTime; - + if(pP2PInfo->NoADescriptors[i].bValid) { // Time 's up @@ -10899,13 +10899,13 @@ P2PPsTimeout( //3 //==============Evaluate the Current Time State===============// //4 // (1) NoA count == 1 - if(pP2PInfo->NoADescriptors[0].bValid && + if(pP2PInfo->NoADescriptors[0].bValid && (pP2PInfo->NoADescriptors[0].u8StartTime <= (curTsf + P2P_PS_TIMEOUT_TOLERANCE))) { bNoA0Valid = TRUE; } - if(pP2PInfo->NoADescriptors[1].bValid && + if(pP2PInfo->NoADescriptors[1].bValid && (pP2PInfo->NoADescriptors[1].u8StartTime <= (curTsf + P2P_PS_TIMEOUT_TOLERANCE))) { bNoA1Valid = TRUE; @@ -10952,13 +10952,13 @@ P2PPsTimeout( (PlatformModular64(curTsf, usBeaconInterval) > (usBeaconInterval - P2P_PS_TIMEOUT_TOLERANCE))) { P2pPsTimeState |= P2P_PS_TIME_STATE_IN_CTWIN; - } + } else { // We are out of CTWin P2pPsTimeState |= P2P_PS_TIME_STATE_OUT_CTWIN; - // We need to check if any client is in active mode (including ourself if we are client mode). + // We need to check if any client is in active mode (including ourself if we are client mode). if(pP2PInfo->Role == P2P_GO) { // Check if the GO shall keep awake. PRT_WLAN_STA pEntry = NULL; @@ -10978,7 +10978,7 @@ P2PPsTimeout( } } } - else if(pP2PInfo->Role == P2P_CLIENT && + else if(pP2PInfo->Role == P2P_CLIENT && (pP2PInfo->pAdapter->MgntInfo.dot11PowerSaveMode == eActive)) { // Cleint is in the awake state, the CTWindow doen't apply now. // If there exists periodic NoA, we shall follow the rule of NoA. @@ -10993,9 +10993,9 @@ P2PPsTimeout( tmpNoAStartTime = pP2PInfo->NoADescriptors[0].u8StartTime; tmpNoAIntvl = pP2PInfo->NoADescriptors[0].Interval; tmpNoADur = pP2PInfo->NoADescriptors[0].Duration; - + timeDiff = (curTsf < tmpNoAStartTime) ? 0: (curTsf - tmpNoAStartTime); - + if(PlatformModular64(timeDiff, tmpNoAIntvl) < (tmpNoADur - P2P_PS_TIMEOUT_TOLERANCE)) { P2pPsTimeState |= P2P_PS_TIME_STATE_IN_NOA0; @@ -11017,9 +11017,9 @@ P2PPsTimeout( tmpNoAStartTime = pP2PInfo->NoADescriptors[1].u8StartTime; tmpNoAIntvl = pP2PInfo->NoADescriptors[1].Interval; tmpNoADur = pP2PInfo->NoADescriptors[1].Duration; - + timeDiff = (curTsf < tmpNoAStartTime) ? 0: (curTsf - tmpNoAStartTime); - + if(PlatformModular64(timeDiff, tmpNoAIntvl) < (tmpNoADur - P2P_PS_TIMEOUT_TOLERANCE)) { P2pPsTimeState |= P2P_PS_TIME_STATE_IN_NOA1; @@ -11073,7 +11073,7 @@ P2PPsTimeout( else if(P2pPsTimeState & P2P_PS_TIME_STATE_OUT_CTWIN) { if(!(P2pPsTimeState & P2P_PS_TIME_STATE_OUT_CTWIN_CLIENT_AWAKE)) - { // Out of CTWin (the priority is higher than periodic NoA), Next TBTT must wake up. + { // Out of CTWin (the priority is higher than periodic NoA), Next TBTT must wake up. psTimeoutToSet = nextTbtt; psSourceToSet = P2P_PS_ENTER_PS_BY_CTWIN; psStateToSet = P2P_PS_DOZE; @@ -11133,14 +11133,14 @@ P2PPsTimeout( AC = 3; else if(GET_BK_UAPSD(pMgntInfo->pStaQos->Curr4acUapsd)) AC = 2; - + SendQoSNullFunctionData(pP2PInfo->pAdapter, pMgntInfo->Bssid, AC, TRUE); pMgntInfo->pStaQos->bInServicePeriod = TRUE; RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PPSTimeout(): Re-trigger the SP!\n")); } } pP2PInfo->bEospByNoA = FALSE; - + tmpNextDozeTime = nextNoA0Start; // Find the earliet NoA start time if(nextNoA1Start > 0 && tmpNextDozeTime > nextNoA1Start) @@ -11159,7 +11159,7 @@ P2PPsTimeout( { // No one Periodic NoA is valid, and this state shall be kept awake until next CTWin comes, or all clients enter dozed, or one NoA becomes valid. // If next CTWin exists, set the next doze time as next CTWin because we will keep awake cross the next TBTT until the end of CTWin. tmpNextDozeTime = (usCTWindow > 0 && pP2PInfo->bOppPS) ? (nextTbtt + usCTWindow) : 0; - + // Next NoA0 start time. if(pP2PInfo->NoADescriptors[0].bValid && pP2PInfo->NoADescriptors[0].u8StartTime > curTsf) { @@ -11249,7 +11249,7 @@ P2PPsTimeout( } } } - + P2PSetPsState(pP2PInfo, psSourceToSet, (P2P_PS_STATE)psStateToSet, psTimeoutToSet); RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PPsTimeout(): <=====\n")); return; @@ -11266,10 +11266,10 @@ P2PInitializeTimer( PlatformInitializeTimer(pAdapter, &(pP2PInfo->P2PMgntTimer), (RT_TIMER_CALL_BACK)P2PMgntTimerCallback, NULL, "P2PMgntTimer"); PlatformInitializeTimer(pAdapter, &(pP2PInfo->ClientJoinGroupContext.P2PWaitForWpsReadyTimer), (RT_TIMER_CALL_BACK)P2PWaitForWpsReadyTimerCallback, NULL, "P2PWaitForWpsReadyTimer"); - PlatformInitializeTimer(pAdapter, &(pP2PInfo->P2POidPostProcessTimer), (RT_TIMER_CALL_BACK)P2POidPostProcessTimerCallback, NULL, "P2POidPostProcessTimer"); + PlatformInitializeTimer(pAdapter, &(pP2PInfo->P2POidPostProcessTimer), (RT_TIMER_CALL_BACK)P2POidPostProcessTimerCallback, NULL, "P2POidPostProcessTimer"); pP2PInfo->P2PActionTimer = ActionTimerAllocate( - pAdapter, + pAdapter, "P2PActionTimer", HW_TSF_CLOCK, HW_TSF_CLOCK_PS_TIMER @@ -11284,10 +11284,10 @@ P2PCancelTimer( PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; PP2P_INFO pP2PInfo = (PP2P_INFO)pMgntInfo->pP2PInfo; - - PlatformCancelTimer(pAdapter, &(pP2PInfo->P2PMgntTimer)); + + PlatformCancelTimer(pAdapter, &(pP2PInfo->P2PMgntTimer)); PlatformCancelTimer(pAdapter, &(pP2PInfo->ClientJoinGroupContext.P2PWaitForWpsReadyTimer)); - PlatformCancelTimer(pAdapter, &(pP2PInfo->P2POidPostProcessTimer)); + PlatformCancelTimer(pAdapter, &(pP2PInfo->P2POidPostProcessTimer)); } VOID @@ -11298,7 +11298,7 @@ P2PReleaseTimer( PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; PP2P_INFO pP2PInfo = (PP2P_INFO)pMgntInfo->pP2PInfo; - + PlatformReleaseTimer(pAdapter, &(pP2PInfo->P2PMgntTimer)); PlatformReleaseTimer(pAdapter, &(pP2PInfo->ClientJoinGroupContext.P2PWaitForWpsReadyTimer)); PlatformReleaseTimer(pAdapter, &(pP2PInfo->P2POidPostProcessTimer)); @@ -11312,11 +11312,11 @@ P2PActionTimerCallback( ) { PADAPTER pAdapter = (PADAPTER) pOneShotActionItem->pContext; - + P2PPsTimeout(pAdapter); } -// +// // Description: // Save the P2P PS state and time value and configure the HW setting. // Arguments: @@ -11336,13 +11336,13 @@ P2PSetPsState( IN PP2P_INFO pP2PInfo, IN u4Byte Source, IN P2P_PS_STATE P2pState, - IN u8Byte Timeout + IN u8Byte Timeout ) { PADAPTER pAdapter = NULL; ACTION_TIMER_ITEM ActionItem; PMGNT_INFO pMgntInfo = NULL; - + if(!P2P_ENABLED(pP2PInfo)) return; @@ -11350,7 +11350,7 @@ P2PSetPsState( pMgntInfo = &pAdapter->MgntInfo; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Source = 0x%X, P2pState = 0x%X, Timeout = 0x%08X %08X (Low Dec = %d)\n", Source, P2pState, (u4Byte)(Timeout >> 32), (u4Byte)Timeout, (u4Byte)Timeout)); - + pP2PInfo->P2pPsState = P2pState; pP2PInfo->PsFlag = Source; pP2PInfo->NextTimeout = Timeout; @@ -11369,17 +11369,17 @@ P2PSetPsState( { // + Flush the previous Action Item ActionTimerFlushActionItem(pAdapter, pP2PInfo->P2PActionTimer, ACTION_TYPE_P2P_POWERSAVE); - + PlatformZeroMemory(&ActionItem, sizeof(ActionItem)); ActionItem.ActionType = ACTION_TYPE_P2P_POWERSAVE; ActionItem.CallbackFunc = P2PActionTimerCallback; ActionItem.pContext = pP2PInfo->pAdapter; ActionItem.usTimeout = pP2PInfo->NextTimeout; - + ActionTimerRegisterActionItem(pAdapter, &ActionItem, pP2PInfo->P2PActionTimer); } - + } // @@ -11404,7 +11404,7 @@ P2PPsTsf_Bit32_Toggle( if(!P2P_ENABLED(pP2PInfo)) return; - + if((P2P_GO != pP2PInfo->Role) && (P2P_CLIENT != pP2PInfo->Role)) return; @@ -11449,7 +11449,7 @@ P2PPsTsf_Bit32_Toggle( P2pPsSet.NoASet[i].u4StartTime = pP2PInfo->NoADescriptors[i].StartTime; } } - + if(pP2PInfo->NoADescriptors[i].bValid) { bUpdatePsMode = TRUE; @@ -11493,7 +11493,7 @@ P2PNotifyClientPSChange( pExtAdapter = P2P_ADAPTER_OS_SUPPORT_P2P(pAdapter) ? pP2PInfo->pAdapter : GetFirstExtAdapter(pP2PInfo->pAdapter); - + if(pP2PInfo->Role != P2P_GO) return; @@ -11559,18 +11559,18 @@ P2POnLinkStatusWatchdog( PP2P_INFO pP2PDevInfo = GET_P2P_INFO(pDevAadpter); bFirstDevicePortEnabled = (pP2PDevInfo->uListenStateDiscoverability == 0)?FALSE:TRUE; } - + if(P2P_ADAPTER_OS_SUPPORT_P2P(Adapter) && GetFirstGOPort(Adapter) == NULL && GetFirstClientPort(Adapter) == NULL && bFirstDevicePortEnabled == FALSE) { return; } - + if(pP2PInfo->Role == P2P_GO && pP2PInfo->pAdapter->MgntInfo.mAssoc) { //if(pP2PInfo->ManagedUpdateCnt == 0) { // Update the P2P managed info PRT_WLAN_BSS pBssDesc = NULL; - + PlatformAcquireSpinLock(pP2PInfo->pAdapter, RT_SCAN_SPINLOCK); pBssDesc = BssDescDupByBssid(pP2PInfo->pAdapter, pP2PInfo->pAdapter->MgntInfo.Bssid); @@ -11578,7 +11578,7 @@ P2POnLinkStatusWatchdog( { if(pBssDesc->P2PManagedInfo & maP2PDeviceManagement) P2PUpdateWlanApManagedInfo(pP2PInfo, pBssDesc); - } + } PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_SCAN_SPINLOCK); pP2PInfo->ManagedUpdateCnt = P2P_UPDATE_MANAGED_INFO_PERIOD; @@ -11588,7 +11588,7 @@ P2POnLinkStatusWatchdog( } CurrentTime = PlatformGetCurrentTime(); - + if(CurrentTime - pP2PInfo->LastTimerFired > 2000000) // 2sec {// the timer callback has not been executed for more than 2 sec RT_TRACE(COMP_P2P, DBG_LOUD, ("P2POnLinkStatusWatchdog(): re-fire timer\n")); @@ -11606,7 +11606,7 @@ P2POnLinkStatusWatchdog( // Description: // Issue a client's presence request to the AP for the specified NoA. // Arguments: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // [in] pP2pPs - // The address of P2P power save setting. @@ -11628,7 +11628,7 @@ P2PPresenceReq( return RT_STATUS_FAILURE; RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PPresenceReq()=====>\n")); - + p2p_Send_PresenceReq(pP2PInfo, pP2pPs, pP2PInfo->pAdapter->MgntInfo.Bssid, 1); return RT_STATUS_SUCCESS; } @@ -11652,7 +11652,7 @@ P2P_OnPresenceReq( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); + PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); P2P_POWERSAVE_SET tmpP2PPsSet; u1Byte Status = P2P_STATUS_SUCCESS; u1Byte NoADesc = 0, PreType, DiagToken, i; @@ -11672,7 +11672,7 @@ P2P_OnPresenceReq( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] The role is not Go!\n")); return RT_STATUS_INVALID_STATE; } - + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2P_OnDeviceDiscoverabilityRsp():\n", posMpdu->Octet, posMpdu->Length); do @@ -11683,7 +11683,7 @@ P2P_OnPresenceReq( rtStatus = RT_STATUS_MALFORMED_PKT; break; } - + // Check if this is our client's request. if(P2PClientInfoFindByInterfaceAddress(pP2PInfo, pSaAddr) == NULL) { @@ -11697,9 +11697,9 @@ P2P_OnPresenceReq( // Fill the CTWin. The Presence request does not apply in this field. tmpP2PPsSet.bOppPs = pP2PInfo->bOppPS; tmpP2PPsSet.CTWindow = pP2PInfo->CTWindow; - + NoADesc = (msg.noaLen == (13 + 2)) ? 1 : (msg.noaLen == (2 * 13 + 2)) ? 2 : 0; - + // Invalid Length if(msg.noaLen != 2 && NoADesc == 0) { @@ -11707,7 +11707,7 @@ P2P_OnPresenceReq( rtStatus = RT_STATUS_INVALID_DATA; break; } - + DiagToken = GET_P2P_VENDOR_ACT_FRAME_DIALOG_TOKEN(posMpdu->Octet); for(i = 0; i < NoADesc; i ++) @@ -11715,7 +11715,7 @@ P2P_OnPresenceReq( PreType = ReadEF1Byte(msg._noa + (13 * i) + 2); PreNoADuration = ReadEF4Byte(msg._noa + (13 * i) + 3); PreNoAInterval = ReadEF4Byte(msg._noa + (13 * i) + 7); - + if(PreType < 1 || PreType > 2) { // NoA Type is invalid. Status = P2P_STATUS_FAIL_INVALID_PARAMETERS; @@ -11746,7 +11746,7 @@ P2P_OnPresenceReq( }while(FALSE); p2p_parse_FreeMessage(&msg); - + return rtStatus; } @@ -11754,7 +11754,7 @@ P2P_OnPresenceReq( // Description: // Update the managed information from the AP which supports P2P managed device. // Arguments: -// [in] pP2PInfo - +// [in] pP2PInfo - // The P2P context. // [in] pBssDesc - // The BSS descriptor from the scan list. @@ -11769,7 +11769,7 @@ P2PUpdateWlanApManagedInfo( ) { PRT_AP_INFO pApInfo = NULL; - + // We need check if the BSS support P2P device management, but now the WLAN AP may not have this info in Beacon, // and it just disassociates us with the P2P deauth reason. Check this bit if the test plan has modified. By Bruce, 2010-05-14. // if(!(pBssDesc->P2PManagedInfo & maP2PDeviceManagement)) @@ -11789,9 +11789,9 @@ P2PUpdateWlanApManagedInfo( if(pAdapter == NULL) return; } - + pApInfo = (PRT_AP_INFO)(pAdapter->MgntInfo.pApModeInfo); - + if(pBssDesc->osWmmAcParaIE.Length == WMM_PARAM_ELEMENT_SIZE) { CopyMemOS(&pApInfo->osWmmAcParaIE, pBssDesc->osWmmAcParaIE, WMM_PARAM_ELEMENT_SIZE) @@ -11811,7 +11811,7 @@ P2PUpdateWlanApManagedInfo( RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2PUpdateWlanApManagedInfo() osCountryIe:\n", pApInfo->osPowerConstraintIe.Octet, pApInfo->osPowerConstraintIe.Length); } - + } // @@ -11831,7 +11831,7 @@ P2PDisable( PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); RT_TRACE(COMP_P2P, DBG_LOUD, ("======>P2PDisable()\n")); - P2PSetRole(pP2PInfo, P2P_NONE); + P2PSetRole(pP2PInfo, P2P_NONE); p2p_DevList_Free(&pP2PInfo->devList); PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); @@ -11876,7 +11876,7 @@ P2PDisable( bBoostIgi = FALSE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_BOOST_INIT_GAIN, &bBoostIgi); } - + RT_TRACE(COMP_P2P, DBG_LOUD, ("<======P2PDisable()\n")); } @@ -11889,7 +11889,7 @@ P2PTranslateP2PInfoToDevDescV0( u1Byte i = 0, j = 0; PlatformFillMemory(pDevDesc, sizeof(PP2P_DEVICE_DESCRIPTOR_V0), 0); - + pDevDesc->Role = pP2PInfo->Role; pDevDesc->DeviceCapability = pP2PInfo->DeviceCapability; pDevDesc->GroupCapability = pP2PInfo->GroupCapability; @@ -11910,17 +11910,17 @@ P2PTranslateP2PInfoToDevDescV0( PP2P_CLIENT_INFO_DISCRIPTOR pClientInfoDesc = NULL; pDevDesc->P2PClientDescriptorListLength = 0; - + while((pClientInfoDesc = P2PClientInfoEnumClients(pP2PInfo, StartIndex, &CurrentIndex)) != NULL) { - PlatformMoveMemory(&(pDevDesc->P2PClientDescriptorList[pDevDesc->P2PClientDescriptorListLength]), - pClientInfoDesc, + PlatformMoveMemory(&(pDevDesc->P2PClientDescriptorList[pDevDesc->P2PClientDescriptorListLength]), + pClientInfoDesc, sizeof(P2P_CLIENT_INFO_DISCRIPTOR)); pDevDesc->P2PClientDescriptorListLength++; StartIndex = CurrentIndex + 1; pClientInfoDesc = NULL; - } + } RT_TRACE(COMP_P2P, DBG_LOUD, ("P2PTranslateP2PInfoToDevDesc(): %u clients enumerated\n", pDevDesc->P2PClientDescriptorListLength)); } @@ -11956,7 +11956,7 @@ P2PTranslateP2PInfoToDevDesc( ) { u4Byte BytesWritten = 0; - + if(0x00000000 == pP2PInfo->P2PVersion) {// v0 P2PTranslateP2PInfoToDevDescV0(pP2PInfo, (PP2P_DEVICE_DESCRIPTOR_V0)pvDevDesc); @@ -12011,7 +12011,7 @@ P2P_APRemoveKey( VOID P2P_APSetkey( IN PADAPTER Adapter, - IN u1Byte *pucMacAddr, + IN u1Byte *pucMacAddr, IN u4Byte ulEncAlg ) { @@ -12045,7 +12045,7 @@ P2P_ConstructAssociateReqFilterCck( IN OCTET_STRING AsocReq, IN OUT BOOLEAN *pbFilterCck ) -{ +{ if(P2P_ENABLED(GET_P2P_INFO(Adapter))) { if(P2PScanListIsGo(GET_P2P_INFO(Adapter), Frame_pDaddr(AsocReq))) @@ -12057,7 +12057,7 @@ P2P_ConstructAssociateReqFilterCck( *pbFilterCck = FALSE; } } - + } // @@ -12071,7 +12071,7 @@ P2P_ConstructAssociateReqFilterCck( // [in] posSsidToScan - // The SSID in this probe request. // Return: -// Return TRUE if +// Return TRUE if // a. we shall send probe response for this probe reqeust in P2P GO mode, or // b. this action is ignored if P2P is not enabled. // Return FALSE if the P2P inforamtion in this packet is mismatch and we shall not send probe response. @@ -12089,9 +12089,9 @@ P2P_IsGoAcceptProbeReq( ) { BOOLEAN bAccept = TRUE; - if(P2P_ENABLED(GET_P2P_INFO(pAdapter))) + if(P2P_ENABLED(GET_P2P_INFO(pAdapter))) { - RT_STATUS rtStatus = RT_STATUS_SUCCESS; + RT_STATUS rtStatus = RT_STATUS_SUCCESS; P2P_MESSAGE msg; if((GetDefaultAdapter(pAdapter)->MgntInfo.RegMultiChannelFcsMode >= MULTICHANNEL_FCS_SUPPORT_GO) && @@ -12115,13 +12115,13 @@ P2P_IsGoAcceptProbeReq( {// Clause 3.2.2: P2P Wildcard SSID shall be treated the same as the Wildcard SSID posSsidToScan->Length = 0; // so that it does not return false when SSID is neither any nor our SSID } - + if(!P2PAcceptProbeReq(GET_P2P_INFO(pAdapter), posMpdu, &msg)) { bAccept = FALSE; } } - + p2p_parse_FreeMessage(&msg); } return bAccept; @@ -12141,38 +12141,38 @@ P2P_UpdateScanList( // Update the device list for the OS query ------------------ P2PDeviceListActionInterface( - pP2PInfo, + pP2PInfo, P2P_DEVICE_LIST_ACTION_COPY_TO_QUERY_LIST, NULL, NULL, NULL ); //P2PDeviceListActionInterface( - // pP2PInfo, + // pP2PInfo, // P2P_DEVICE_LIST_ACTION_DUMP, - // &pP2PInfo->DeviceList, + // &pP2PInfo->DeviceList, // NULL, NULL // ); - + P2PDeviceListActionInterface( - pP2PInfo, + pP2PInfo, P2P_DEVICE_LIST_ACTION_DUMP, - &pP2PInfo->DeviceListForQuery, + &pP2PInfo->DeviceListForQuery, NULL, NULL ); //---------------------------------------------------- } - if(P2PScanListEqual(pP2PInfo->ScanList, pP2PInfo->ScanListSize, + if(P2PScanListEqual(pP2PInfo->ScanList, pP2PInfo->ScanListSize, pP2PInfo->ScanList4Query, pP2PInfo->ScanList4QuerySize)) { - //RT_TRACE(COMP_P2P, DBG_LOUD, + //RT_TRACE(COMP_P2P, DBG_LOUD, // ("ScanComplete(): scan list the same, not to update ScanList4Query\n")); } else { - P2PScanListCopy(pP2PInfo->ScanList4Query, - &pP2PInfo->ScanList4QuerySize, - pP2PInfo->ScanList, + P2PScanListCopy(pP2PInfo->ScanList4Query, + &pP2PInfo->ScanList4QuerySize, + pP2PInfo->ScanList, pP2PInfo->ScanListSize); P2PIndicateScanList(pP2PInfo); @@ -12180,7 +12180,7 @@ P2P_UpdateScanList( P2PSvc_OnP2PScanComplete(pP2PInfo->pP2PSvcInfo); } - + } @@ -12195,8 +12195,8 @@ P2P_ScanCallback( // // Send 2 ProbeReq only when we are in Search State or Scan Phase. - // This is to prevent the case, for example, when we are using customized - // scan to send a ProvisionDiscReq to a P2P Device, we don't send two + // This is to prevent the case, for example, when we are using customized + // scan to send a ProvisionDiscReq to a P2P Device, we don't send two // ProvisionDiscReq. // if(pP2PInfo->State != P2P_STATE_SEARCH && @@ -12225,17 +12225,17 @@ P2P_InactivePsCallback( // PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - // TODO: Should not set timer in workitem + // TODO: Should not set timer in workitem if(!GetDefaultAdapter(pAdapter)->bDriverIsGoingToUnload) { //if(pPSC->eInactivePowerState == eRfOff) if(InactievPsState == eRfOff) - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); } - } + } } -// +// // Description: // Set the service response fragment threshold. // Arguments: @@ -12254,7 +12254,7 @@ P2PSetServiceFragThreshold( ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - + if(!pP2PInfo) return RT_STATUS_INVALID_CONTEXT; @@ -12276,7 +12276,7 @@ P2PSetProfileList( RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); u4Byte allocSize = FIELD_OFFSET(P2P_PROFILE_LIST, profileList) + pProfileList->nProfiles * sizeof(P2P_PROFILE_LIST_ENTRY); - + if(!pP2PInfo) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("RT_STATUS_INVALID_CONTEXT\n")); @@ -12294,25 +12294,25 @@ P2PSetProfileList( pP2PInfo->profileListLen = 0; pP2PInfo->pProfileList = NULL; } - + if(RT_STATUS_SUCCESS != (rtStatus = PlatformAllocateMemory(pAdapter, &pP2PInfo->pProfileList, allocSize))) { break; } - + pP2PInfo->profileListLen = allocSize; PlatformMoveMemory(pP2PInfo->pProfileList, pProfileList, allocSize); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Set profile list: %u profiles\n", pP2PInfo->pProfileList->nProfiles)); }while(FALSE); PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_P2P_SPIN_LOCK); - + return rtStatus; } -// +// // Description: // Get the service response fragment threshold. // Arguments: @@ -12331,7 +12331,7 @@ P2PGetServiceFragThreshold( ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - + if(!pP2PInfo || !pServiceThreshold) return RT_STATUS_INVALID_CONTEXT; @@ -12353,9 +12353,9 @@ P2POidPostProcessTimerCallback( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); u1Byte i = 0; - + // For IRQL Maintaince ------------------------------ -// BOOLEAN bIrqlRestoreRequired = FALSE; +// BOOLEAN bIrqlRestoreRequired = FALSE; // KIRQL BackupIrql = PASSIVE_LEVEL; // ----------------------------------------------- @@ -12375,10 +12375,10 @@ P2POidPostProcessTimerCallback( { case OID_OPERATION_INDICATE_DISCOVERY_COMPLETE: { -#if 0 +#if 0 RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Delay 10 ms to avoid too fast indication for WlanSvc!\n")); delay_ms(10); -#endif +#endif RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: P2P_EVENT_DEVICE_DISCOVERY_COMPLETE\n", __FUNCTION__)); PlatformIndicateP2PEvent(pP2PInfo, P2P_EVENT_DEVICE_DISCOVERY_COMPLETE, NULL); } break; @@ -12386,7 +12386,7 @@ P2POidPostProcessTimerCallback( case OID_OPERATION_SEND_PACKET: { p2p_DevList_Lock(&pP2PInfo->devList); - + if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_PROVISION_DISCOVERY_RSP) { // Start sending provision discovery response --------------------------------------------------- @@ -12399,32 +12399,32 @@ P2POidPostProcessTimerCallback( 0, // It is no use in Win8 since WPS IEs are generated by the OS NULL ); - + delay_ms(10); } else if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_INVITATION_RSP) { P2P_STATE StateBackup = pP2PInfo->State; - + pP2PInfo->State = P2P_STATE_INVITATION_REQ_RECVD; - + // Start sending invitation response ----------------------------------------------------------- //CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pAdapter), 100); // In order not to switch channel p2p_Send_InvitationRsp( - pP2PInfo, + pP2PInfo, pP2PInfo->InvitationResponseReceiverDeviceAddress, pP2PInfo->InvitationResponseDialogToken ); pP2PInfo->State = StateBackup; - + // Postpone the extended listening P2PExtendedListenResetCounter(pP2PInfo); - - // Update the state machine immediately + + // Update the state machine immediately PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); - + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + } else if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_GO_NEGO_RSP) { @@ -12438,7 +12438,7 @@ P2POidPostProcessTimerCallback( // Sync the status between Win8 and Win7 pP2PInfo->ConnectionContext.Status = pP2PInfo->NegotiationResponseStatus; - + // + Update the state machine if(pP2PInfo->ConnectionContext.Status == P2P_STATUS_SUCCESS) { @@ -12451,10 +12451,10 @@ P2POidPostProcessTimerCallback( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2P state 0x%x\n", pP2PInfo->State)); - // Update the state machine immediately + // Update the state machine immediately PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); - + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + } else if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_GO_NEGO_CONFIRM) { @@ -12470,8 +12470,8 @@ P2POidPostProcessTimerCallback( // + Update the state machine pP2PInfo->State = P2P_STATE_GO_NEGO_COMPLETE; - - // Update the state machine immediately + + // Update the state machine immediately PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 100); // In order not to switch channel @@ -12488,7 +12488,7 @@ P2POidPostProcessTimerCallback( p2p_DevList_Unlock(&pP2PInfo->devList); } break; - + default: RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Wrong Operation Mode in WorkItem!\n", __FUNCTION__)); break; @@ -12517,24 +12517,24 @@ P2POidPostProcessWorkItemCallback( u1Byte i = 0; // For IRQL Maintaince ------------------------------ - BOOLEAN bIrqlRestoreRequired = FALSE; + BOOLEAN bIrqlRestoreRequired = FALSE; KIRQL BackupIrql = PASSIVE_LEVEL; // ----------------------------------------------- FunctionIn(COMP_P2P); - + for(i = 0; i < 10; i++) { if(pP2PInfo->bPostoneP2POidPostProcessWorkItem) { - RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: delay_ms(5) for other PASSIVE_LEVEL thread running~\n", __FUNCTION__)); + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: delay_ms(5) for other PASSIVE_LEVEL thread running~\n", __FUNCTION__)); delay_ms(5); - } + } else break; } - + // Let this OID routine run faster than the P2POidPostProcessWorkItemCallback ------ if(KeGetCurrentIrql() == PASSIVE_LEVEL) { @@ -12552,7 +12552,7 @@ P2POidPostProcessWorkItemCallback( { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Delay 10 ms to avoid too fast indication for WlanSvc!\n")); delay_ms(10); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: P2P_EVENT_DEVICE_DISCOVERY_COMPLETE\n", __FUNCTION__)); if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) PlatformIndicateP2PEvent(pP2PInfo, P2P_EVENT_DEVICE_DISCOVERY_COMPLETE, NULL); @@ -12574,26 +12574,26 @@ P2POidPostProcessWorkItemCallback( else if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_INVITATION_RSP) { P2P_STATE StateBackup = pP2PInfo->State; - + pP2PInfo->State = P2P_STATE_INVITATION_REQ_RECVD; - + // Start sending invitation response ----------------------------------------------------------- //CustomScan_ExtendDwellTime(GET_CUSTOM_SCAN_INFO(pAdapter), 100); // In order not to switch channel p2p_Send_InvitationReq( - pP2PInfo, + pP2PInfo, pP2PInfo->InvitationResponseReceiverDeviceAddress, pP2PInfo->InvitationResponseDialogToken ); pP2PInfo->State = StateBackup; - + // Postpone the extended listening P2PExtendedListenResetCounter(pP2PInfo); - - // Update the state machine immediately + + // Update the state machine immediately PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); - + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + } else if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_GO_NEGO_RSP) { @@ -12607,7 +12607,7 @@ P2POidPostProcessWorkItemCallback( // Sync the status between Win8 and Win7 pP2PInfo->ConnectionContext.Status = pP2PInfo->NegotiationResponseStatus; - + // + Update the state machine if(pP2PInfo->ConnectionContext.Status == P2P_STATUS_SUCCESS) { @@ -12618,10 +12618,10 @@ P2POidPostProcessWorkItemCallback( pP2PInfo->State = P2P_STATE_GO_NEGO_COMPLETE; } - // Update the state machine immediately + // Update the state machine immediately PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); - + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + } else if(pP2PInfo->PacketSentInWorkItemCallback == P2P_PUB_ACT_GO_NEGO_CONFIRM) { @@ -12637,8 +12637,8 @@ P2POidPostProcessWorkItemCallback( // + Update the state machine pP2PInfo->State = P2P_STATE_GO_NEGO_COMPLETE; - - // Update the state machine immediately + + // Update the state machine immediately PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 100); // In order not to switch channel } @@ -12651,7 +12651,7 @@ P2POidPostProcessWorkItemCallback( pP2PInfo->PacketSentInWorkItemCallback = (P2P_PUBLIC_ACTION_TYPE) 0xFF; // -------------------------------------------------------------------- } break; - + default: RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Wrong Operation Mode in WorkItem!\n", __FUNCTION__)); break; @@ -12661,7 +12661,7 @@ P2POidPostProcessWorkItemCallback( // Restore the IRQL Back --------------------- if(bIrqlRestoreRequired) KeLowerIrql(BackupIrql); // ---------------------------------------- - + FunctionOut(COMP_P2P); } #endif @@ -12679,7 +12679,7 @@ P2PResetClientJoinGroupContext( pP2PInfo->ClientJoinGroupContext.uWaitForWpsSlotCount = 0; // 100 ms per slot PlatformCancelTimer( - pP2PInfo->pAdapter, + pP2PInfo->pAdapter, &pP2PInfo->ClientJoinGroupContext.P2PWaitForWpsReadyTimer ); } @@ -12687,7 +12687,7 @@ P2PResetClientJoinGroupContext( //------------------------------------------------------------------------------- // For delaying connection to wait for GO WPS ready //------------------------------------------------------------------------------- -static +static VOID p2pWaitForWpsReady_CustomScanCb( IN CUSTOM_SCAN_STATE state, @@ -12700,11 +12700,11 @@ p2pWaitForWpsReady_CustomScanCb( if(!P2P_ENABLED(info)) return; - + if(CUSTOM_SCAN_STATE_COMPLETED == state) { if(P2P_CLIETN_JOIN_GROUP_WPS_STATE_NONE != info->ClientJoinGroupContext.WpsState) - { + { PlatformSetTimer(info->pAdapter, &info->ClientJoinGroupContext.P2PWaitForWpsReadyTimer, 1); } @@ -12727,7 +12727,7 @@ P2PWaitForWpsReadyTimerCallback( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + VOID *customScanInfo = GET_CUSTOM_SCAN_INFO(pAdapter); VOID *req = NULL; FRAME_BUF *probeReqBuf = NULL; @@ -12749,7 +12749,7 @@ P2PWaitForWpsReadyTimerCallback( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Unknown wps state = %d\n", pP2PInfo->ClientJoinGroupContext.WpsState)); P2PResetClientJoinGroupContext(pP2PInfo); break; - + case P2P_CLIETN_JOIN_GROUP_WPS_STATE_SCANNING: { if(0 == pP2PInfo->ClientJoinGroupContext.uWaitForWpsSlotCount) @@ -12766,21 +12766,21 @@ P2PWaitForWpsReadyTimerCallback( if(NULL == (req = CustomScan_AllocReq(customScanInfo, NULL, NULL))) return; - // Call customized scan to scan the WPS group. + // Call customized scan to scan the WPS group. if(pP2PInfo->uGroupTargetSSIDLength > 0 && pP2PInfo->uGroupTargetSSIDLength <= 32) { u4Byte bufLen = 0; - + PlatformMoveMemory(pMgntInfo->Ssid.Octet, pP2PInfo->GroupTargetSSID, pP2PInfo->uGroupTargetSSIDLength); pMgntInfo->Ssid.Length = (u2Byte)(pP2PInfo->uGroupTargetSSIDLength); - + // Send probe req with the interface address as the SA and we shall append P2P IE in this case, // otherwise the ProbeRsp would be regarded as from a legacy device and would not be processed. probeReqBuf = CustomScan_GetProbeReqBuf(req); ConstructProbeRequest(pAdapter, FrameBuf_MHead(probeReqBuf), &bufLen, TRUE, FALSE, FALSE); FrameBuf_Add(probeReqBuf, (u2Byte)bufLen); } - + CustomScan_AddScanChnl(req, pP2PInfo->OperatingChannel, 1, SCAN_ACTIVE, P2P_SCAN_WPS_GROUP_PERIOD, MGN_6M, probeReqBuf); CustomScan_AddScanChnl(req, pP2PInfo->ListenChannel, 1, SCAN_ACTIVE, 100, MGN_6M, probeReqBuf); CustomScan_SetRepeatCount(req, 16); @@ -12788,7 +12788,7 @@ P2PWaitForWpsReadyTimerCallback( CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_P2P, "cli join grp wps scanning"); } break; - + case P2P_CLIENT_JOIN_GROUP_WPS_STATE_GO_READY: { OCTET_STRING ssidStr = {NULL, 0}; @@ -12796,12 +12796,12 @@ P2PWaitForWpsReadyTimerCallback( RT_JOIN_ACTION joinAction = RT_NO_ACTION; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2P_CLIENT_JOIN_GROUP_WPS_STATE_GO_READY\n")); -//Sinda: temporarily mark. If OS care bForceScanLegacyNetworks flag +//Sinda: temporarily mark. If OS care bForceScanLegacyNetworks flag //and un-mark the flag checking at case P2P_STATE_DEV_DISC_START of P2PMgntTimerCallback function. //We need to do legacy scan to update scan list to avoid to get out-of-date information of GO. #if 0 RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Target WPS info is ready but the BSS maybe out-of-date in the scan list, try to customized scan...\n")); - // Call customized scan to scan the WPS group. + // Call customized scan to scan the WPS group. if(pP2PInfo->uGroupTargetSSIDLength > 0 && pP2PInfo->uGroupTargetSSIDLength <= 32) { u4Byte bufLen = 0; @@ -12810,21 +12810,21 @@ P2PWaitForWpsReadyTimerCallback( ConstructProbeRequest(pAdapter, &(pScanReq->ProbeReqBuf[0]), (pu4Byte)&bufLen, TRUE, FALSE, FALSE); pScanReq->ProbeReqLen = (u2Byte)bufLen; - } + } RT_TRACE_F(COMP_MLME, DBG_LOUD, ("P2P_CLIENT_JOIN_GROUP_WPS_STATE_GO_READY: MgntActSet_802_11_CustomizedScanRequest\n")); - MgntActSet_802_11_CustomizedScanRequest(pAdapter, pScanReq); + MgntActSet_802_11_CustomizedScanRequest(pAdapter, pScanReq); #endif if(PlatformAllocateMemory(pAdapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) - return; + return; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("P2P_CLIENT_JOIN_GROUP_WPS_STATE_GO_READY: try to connect selected network by SSID(%s)\n", pP2PInfo->GroupTargetSSID)); - - FillOctetString(ssidStr, pP2PInfo->GroupTargetSSID, (u2Byte)(pP2PInfo->uGroupTargetSSIDLength)); + + FillOctetString(ssidStr, pP2PInfo->GroupTargetSSID, (u2Byte)(pP2PInfo->uGroupTargetSSIDLength)); joinAction = SelectNetworkBySSID(pAdapter, &ssidStr, FALSE, pRtBss); if(pRtBss) PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - + if(RT_JOIN_INFRA == joinAction) { // The target is in the scan list, try to join it. pP2PInfo->ClientJoinGroupContext.WpsState = P2P_CLIETN_JOIN_GROUP_WPS_STATE_ASSOCIATING; @@ -12836,7 +12836,7 @@ P2PWaitForWpsReadyTimerCallback( return; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Target WPS info is ready but the BSS is not in the scan list, try to customized scan...\n")); - // Call customized scan to scan the WPS group. + // Call customized scan to scan the WPS group. if(pP2PInfo->uGroupTargetSSIDLength > 0 && pP2PInfo->uGroupTargetSSIDLength <= 32) { u4Byte bufLen = 0; @@ -12846,9 +12846,9 @@ P2PWaitForWpsReadyTimerCallback( probeReqBuf = CustomScan_GetProbeReqBuf(req); ConstructProbeRequest(pAdapter, FrameBuf_MHead(probeReqBuf), &bufLen, TRUE, FALSE, FALSE); FrameBuf_Add(probeReqBuf, (u2Byte)bufLen); - } + } RT_TRACE_F(COMP_MLME, DBG_LOUD, ("P2P_CLIENT_JOIN_GROUP_WPS_STATE_GO_READY: CustomScan_IssueReq\n")); - + CustomScan_AddScanChnl(req, pP2PInfo->OperatingChannel, 2, SCAN_ACTIVE, P2P_SCAN_WPS_GROUP_PERIOD, MGN_6M, probeReqBuf); CustomScan_AddScanChnl(req, pP2PInfo->ListenChannel, 2, SCAN_ACTIVE, P2P_SCAN_WPS_GROUP_PERIOD, MGN_6M, probeReqBuf); CustomScan_SetupCbCtx(req, p2pWaitForWpsReady_CustomScanCb, pP2PInfo); @@ -12894,7 +12894,7 @@ P2PDeviceListActionInterface( ) { BOOLEAN bStatus = FALSE; - + switch(uAction) { case P2P_DEVICE_LIST_ACTION_COPY_TO_QUERY_LIST: @@ -12907,7 +12907,7 @@ P2PDeviceListActionInterface( ); PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_P2P_SPIN_LOCK); - + bStatus = TRUE; } break; @@ -12917,14 +12917,14 @@ P2PDeviceListActionInterface( P2PDeviceListClear(pDeviceList); PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_P2P_SPIN_LOCK); bStatus = TRUE; - } break; + } break; case P2P_DEVICE_LIST_ACTION_DUMP: { P2PDeviceListDump(pDeviceList); bStatus = TRUE; } break; - + default: { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: Illegal Action Failure!\n", __FUNCTION__)); @@ -12950,10 +12950,10 @@ P2PAddScanDeviceID( break; bDuplicate = FALSE; - + for(i = 0; i < pScanDeviceIDs->uNumOfDeviceIDs; i++) { - if(eqMacAddr(pDeviceID, pScanDeviceIDs->DeviceIDs[i])) + if(eqMacAddr(pDeviceID, pScanDeviceIDs->DeviceIDs[i])) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Found the MAC. Index: %d\n", i)); bDuplicate = TRUE; @@ -12973,7 +12973,7 @@ P2PAddScanDeviceID( } bStatus = TRUE; - + }while (FALSE); return bStatus; @@ -12996,7 +12996,7 @@ P2PFreeAllocatedMemory( ) { PP2P_INFO pP2PInfo = pAdapter->MgntInfo.pP2PInfo; - + P2P_AddIe_Free(&pP2PInfo->AdditionalIEs); // Free the allocated memory of the device list ----------------------------------------------------------------- @@ -13023,7 +13023,7 @@ P2P_FreeP2PInfo( PP2P_INFO pP2PInfo = NULL; FunctionIn(COMP_P2P); - + if(NULL == pMgntInfo->pP2PInfo) return; @@ -13078,14 +13078,14 @@ P2P_AllocP2PInfo( PlatformZeroMemory(pMgntInfo->pP2PInfo, sizeof(P2P_INFO)); pAdapter->P2PSupport = P2P_SUPPORT_STATE_UNINITIALIZED; pP2pInfo = (PP2P_INFO)(pMgntInfo->pP2PInfo); - // Pointer to the default adapter, then after OS/RTL initialized the info, the adapter pointer will be + // Pointer to the default adapter, then after OS/RTL initialized the info, the adapter pointer will be // asigned to the corresponding context. pP2pInfo->pAdapter = GetDefaultAdapter(pAdapter); pP2pInfo->pP2PSvcInfo = NULL; if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocP2PSvcInfo(pMgntInfo->pP2PInfo))) break; - + }while(FALSE); if(RT_STATUS_SUCCESS != rtStatus) @@ -13206,15 +13206,15 @@ IsP2PDeviceExisting( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pDevicePort = NULL; - + pDevicePort = pDefaultAdapter; - + while(pDevicePort != NULL) { if(P2P_ENABLED(GET_P2P_INFO(pDevicePort))) - { + { return TRUE; - } + } pDevicePort = GetNextExtAdapter(pDevicePort); } @@ -13238,14 +13238,14 @@ IsRTKP2PDeviceExisting( { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pDevicePort = NULL; - + pDevicePort = pDefaultAdapter; - + while(pDevicePort != NULL) { // If any RTK P2P exists, return FALSE. if(P2P_ENABLED(GET_P2P_INFO(pDevicePort)) && P2P_ADAPTER_RTK_SUPPORT_P2P(pDevicePort)) - { + { return TRUE; } @@ -13324,8 +13324,8 @@ P2P_CorrectDeviceCategory( WFD_DEV_TYPE devType = WFD_DEV_TYPE_SOURCE; const FRAME_BUF *pAddIeBuf = NULL; u4Byte wfdInfoLen = 0; - u2Byte priCategory = WPS_PRI_DEV_TYPE_CATEGORY_PC; - + u2Byte priCategory = WPS_PRI_DEV_TYPE_CATEGORY_PC; + if(!P2P_ENABLED(pP2PInfo)) return RT_STATUS_INVALID_STATE; @@ -13345,7 +13345,7 @@ P2P_CorrectDeviceCategory( if(NULL != (pAddIeBuf = P2P_AddIe_Get(&pP2PInfo->AdditionalIEs, P2P_ADD_IE_PROBE_RESPONSE))) { OCTET_STRING osTemp = pAddIeBuf->os; - + wfdInfoLen = sizeof(WFD_DEV_TYPE); if(RT_STATUS_SUCCESS == (rtStatus = WFD_GetInfoOnIEs(pAdapter, WFD_INFO_DEVICE_TYPE, &osTemp, (pu1Byte)&devType, &wfdInfoLen))) { diff --git a/network/wlan/WDI/COMMON/P2P.h b/network/wlan/WDI/COMMON/P2P.h index 5f2c4b326..c866c586d 100644 --- a/network/wlan/WDI/COMMON/P2P.h +++ b/network/wlan/WDI/COMMON/P2P.h @@ -28,7 +28,7 @@ #define IS_5G_CHANNEL(__channel) \ ((__channel) >= 36 && (__channel) <= 165) // TODO: this is a incorrect definition -#define P2P_UPDATE_MANAGED_INFO_PERIOD 3 // * watchdog +#define P2P_UPDATE_MANAGED_INFO_PERIOD 3 // * watchdog #define P2P_MAX_NUM_NOA_DESC 2 @@ -45,7 +45,7 @@ #define P2P_SCAN_PERIOD_SEARCH 100 - 20 //ms #define P2P_SWITCH_CHNL_PERIOD 5 //ms -#define P2P_SCAN_FIND_PHASE_LOOP_TIMES 32 // times of looping between listen and find phase before sending GONReq +#define P2P_SCAN_FIND_PHASE_LOOP_TIMES 32 // times of looping between listen and find phase before sending GONReq // Block the scan request from the default port to prevent channel switching which causes P2P handshake fail. #define P2P_BLOCK_NORMAL_SCAN_PERIOD 3000000 // us @@ -129,11 +129,11 @@ typedef enum _P2P_SUPPORT_STATE // // We can't send frame of CCK rate to a P2P Device. -// +// // #define P2P_LOWEST_RATE MGN_6M -#if ( P2P_SUPPORT == 1 ) +#if ( P2P_SUPPORT == 1 ) #define P2P_ENABLED(_pP2P_INFO) ( ((_pP2P_INFO)->Role) != P2P_NONE) #else #define P2P_ENABLED(_pP2P_INFO) 0 @@ -462,7 +462,7 @@ typedef enum _P2P_STATE typedef struct _P2P_DEVICE_DISCRIPTOR { u1Byte WPS_UUID[16]; P2P_ROLE Role; - + // From P2P Capability subelement u1Byte DeviceCapability; u1Byte GroupCapability; @@ -494,14 +494,14 @@ typedef struct _P2P_DEVICE_DISCRIPTOR { u1Byte ClientConfigurationTimeout; u1Byte DialogToken; - + u1Byte GroupBssid[6]; //1 used for invitation // // This is valid after AsocReq, AsocRsp, GONReq, GONRsp is recvd // u1Byte IntendedP2PInterfaceAddress[6]; - + u1Byte Status; u1Byte MinorReasonCode; @@ -520,7 +520,7 @@ typedef struct _P2P_DEVICE_DISCRIPTOR { typedef struct _P2P_DEVICE_DESCRIPTOR_V0 { u1Byte WPS_UUID[16]; P2P_ROLE Role; - + // From P2P Capability subelement u1Byte DeviceCapability; u1Byte GroupCapability; @@ -552,14 +552,14 @@ typedef struct _P2P_DEVICE_DESCRIPTOR_V0 { u1Byte ClientConfigurationTimeout; u1Byte DialogToken; - + u1Byte GroupBssid[6]; //1 used for invitation // // This is valid after AsocReq, AsocRsp, GONReq, GONRsp is recvd // u1Byte IntendedP2PInterfaceAddress[6]; - + u1Byte Status; u1Byte MinorReasonCode; @@ -691,7 +691,7 @@ typedef enum _P2P_SD_STATUS_CODE typedef struct _P2P_SERVICE_DESCRIPTOR { P2P_SD_PROTOCOL ServiceType; - u2Byte BufferLength; + u2Byte BufferLength; u1Byte Buffer[P2P_MAX_SERVICE_DESCRIPTOR_BUFFER_LEN]; // The ServiceInfo is for the serivice info we provide }P2P_SERVICE_DESCRIPTOR, *PP2P_SERVICE_DESCRIPTOR; @@ -757,7 +757,7 @@ typedef enum _P2P_STATUS_CODE { P2P_STATUS_FAIL_TIMEOUT_WAITING_FOR_INVITATION_RSP, P2P_STATUS_FAIL_PROVISION_DISCOVERY_FAILED, - + P2P_STATUS_FAIL_SERVICE_DISCOVERY_FAILED, P2P_STATUS_MAX = 255, @@ -797,7 +797,7 @@ typedef struct _P2P_INVITATION_CONTEXT { u1Byte OpChannel; // op channel in the invitation request BOOLEAN bWaitingBackwardInvite; - + }P2P_INVITATION_CONTEXT, *PP2P_INVITATION_CONTEXT; typedef struct _P2P_PROVISION_DISCOVERY_CONTEXT { @@ -806,10 +806,10 @@ typedef struct _P2P_PROVISION_DISCOVERY_CONTEXT { BOOLEAN go; u1Byte goBssid[6]; u1Byte Channel; - + u1Byte SsidBuf[32]; u1Byte SsidLen; - + }P2P_PROVISION_DISCOVERY_CONTEXT, *PP2P_PROVISION_DISCOVERY_CONTEXT; typedef struct _P2P_PERSISTENT_PROFILE { @@ -846,7 +846,7 @@ typedef enum _WPS_ATTRIBUTE_TAG { // network order P2P_WP2_ATTR_TAG_MANUFACTURER_NAME = 0x1021, } WPS_ATTRIBUTE_TAG, *PWPS_ATTRIBUTE_TAG; -typedef enum _WPS_CONFIG_METHODS +typedef enum _WPS_CONFIG_METHODS { P2P_WPS_CONFIG_METHODS_LABEL = 0x04, P2P_WPS_CONFIG_METHODS_DISPLAY = 0x08, @@ -855,14 +855,14 @@ typedef enum _WPS_CONFIG_METHODS P2P_WPS_CONFIG_METHODS_SVC_DEFAULT_PIN = 0x1000, }WPS_CONFIG_METHODS, *PWPS_CONFIG_METHODS; -typedef enum _WPS_DEVICE_PASSWD_ID +typedef enum _WPS_DEVICE_PASSWD_ID { - P2P_WPS_DEV_PASSWD_ID_DEFAULT =0x0000, - P2P_WPS_DEV_PASSWD_ID_USER_SPEC =0x0001, - P2P_WPS_DEV_PASSWD_ID_MACHINE_SPEC =0x0002, + P2P_WPS_DEV_PASSWD_ID_DEFAULT =0x0000, + P2P_WPS_DEV_PASSWD_ID_USER_SPEC =0x0001, + P2P_WPS_DEV_PASSWD_ID_MACHINE_SPEC =0x0002, P2P_WPS_DEV_PASSWD_ID_REKEY =0x0003, - P2P_WPS_DEV_PASSWD_ID_PBC =0x0004, - P2P_WPS_DEV_PASSWD_ID_REG_SPEC =0x0005, + P2P_WPS_DEV_PASSWD_ID_PBC =0x0004, + P2P_WPS_DEV_PASSWD_ID_REG_SPEC =0x0005, P2P_WPS_DEV_PASSWD_ID_RESERVED =0x0006, P2P_WPS_DEV_PASSWD_ID_WFDS_DEFAULT_PIN = 0x0008, }WPS_DEVICE_PASSWD_ID , *PWPS_DEVICE_PASSWD_ID; @@ -901,7 +901,7 @@ typedef struct _P2P_SD_CONTEXT u1Byte FragmentID; }P2P_SD_CONTEXT, *PP2P_SD_CONTEXT; -typedef struct _P2P_NOA_DESCRIPTOR +typedef struct _P2P_NOA_DESCRIPTOR { BOOLEAN bValid; u1Byte CountOrType; @@ -946,7 +946,7 @@ typedef struct _P2P_REG_CLASS_MAP { EXTCHNL_OFFSET chOffsest; }P2P_REG_CLASS_MAP, *PP2P_REG_CLASS_MAP; -static P2P_REG_CLASS_MAP P2PRegClass[] = +static P2P_REG_CLASS_MAP P2PRegClass[] = { /* {81, 1, 13, 1}, {82, 14, 14, 1}, @@ -961,20 +961,20 @@ static P2P_REG_CLASS_MAP P2PRegClass[] = */ {81, 1, 13, 1, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT}, {82, 14, 14, 1, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT}, - + //{83, 1, 6, 1, CHANNEL_WIDTH_40, EXTCHNL_OFFSET_UPPER}, //{84, 7, 13, 1, CHANNEL_WIDTH_40, EXTCHNL_OFFSET_NO_EXT}, {115, 36, 48, 4, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT}, - + {116, 36, 44, 8, CHANNEL_WIDTH_40, EXTCHNL_OFFSET_UPPER}, {117, 40, 48, 8, CHANNEL_WIDTH_40, EXTCHNL_OFFSET_NO_EXT}, - + {124, 149, 161, 4, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT}, - + {126, 149, 157, 8, CHANNEL_WIDTH_40, EXTCHNL_OFFSET_UPPER}, {127, 153, 161, 8, CHANNEL_WIDTH_40, EXTCHNL_OFFSET_NO_EXT}, - + {125, 165, 165, 1, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT}, //--------------------------------------------------------------------------------- { 0, 0, 0, 0, CHANNEL_WIDTH_20, EXTCHNL_OFFSET_NO_EXT} @@ -991,7 +991,7 @@ typedef ULONG P2P_DISCOVER_SEQUENCE; typedef struct _P2P_DEVICE_ID_TO_SCAN { ULONG uNumOfDeviceIDs; u1Byte DeviceIDs[P2P_MAX_DEVICE_ID_TO_SCAN][6]; -} P2P_DEVICE_ID_TO_SCAN, * PP2P_DEVICE_ID_TO_SCAN; +} P2P_DEVICE_ID_TO_SCAN, * PP2P_DEVICE_ID_TO_SCAN; //---------------------------------------------------------------------------- // Save the raw packets of the devices found in the channel ------------------------------- @@ -1003,7 +1003,7 @@ typedef struct _P2P_DEVICE_LIST_ENTRY { MEMORY_BUFFER BeaconPacket; u8Byte BeaconHostTimestamp; - + MEMORY_BUFFER ProbeResponsePacket; u8Byte ProbeResponseHostTimestamp; @@ -1066,7 +1066,7 @@ typedef struct _P2P_DEVICE_LIST { typedef union _P2P_EVENT_DATA { RT_STATUS rtStatus; - MEMORY_BUFFER Packet; + MEMORY_BUFFER Packet; } P2P_EVENT_DATA, *PP2P_EVENT_DATA; // --------------------------------------------------------------------------- @@ -1095,7 +1095,7 @@ typedef struct _P2P_CLIENT_JOIN_GROUP_CONTEXT{ u1Byte uWaitForWpsSlotCount; // 100 ms per slot RT_TIMER P2PWaitForWpsReadyTimer; - + } P2P_CLIENT_JOIN_GROUP_CONTEXT, *PP2P_CLIENT_JOIN_GROUP_CONTEXT; // ---------------------------------------------------------------------------------------------------- @@ -1112,7 +1112,7 @@ typedef struct _P2P_CLIENT_JOIN_GROUP_CONTEXT{ typedef struct _P2P_INFO { DECLARE_RT_OBJECT(P2P_INFO); - + //====================================================================== // Common //====================================================================== @@ -1122,10 +1122,10 @@ typedef struct _P2P_INFO { P2P_STATE State; P2P_STATE PreviouslyIndicatedState; u8Byte PreviouslyIndicateStateTime; - + u1Byte DeviceAddress[6]; u1Byte InterfaceAddress[6]; - + u1Byte DeviceCapability; u1Byte GroupCapability; @@ -1141,11 +1141,11 @@ typedef struct _P2P_INFO { //u1Byte ChannelPlanChannel[32]; // this is not to be modified but for reference only //u1Byte ChannelPlanLength; P2P_CHANNELS ChannelEntryList; - + //WPS P2P_WPS_ATTRIBUTES WpsAttributes; WPS_DEVICE_PASSWD_ID WpsDevPasswdId; // this is the source of our provisioning info - + // Configuration Timeout, in units of 10ms u1Byte GOConfigurationTimeout; u1Byte ClientConfigurationTimeout; @@ -1158,7 +1158,7 @@ typedef struct _P2P_INFO { P2P_STATE StateBeforeScan; u4Byte ForceScanListIndicateSlotCount; BOOLEAN bDeviceDiscoveryInProgress; - + // Connection P2P_CONNECTION_CONTEXT ConnectionContext; P2P_STATUS_CODE PreviousGONegoResult; // this is for Sigma query @@ -1172,7 +1172,7 @@ typedef struct _P2P_INFO { BOOLEAN bExtendedListening; u2Byte ExtListenTimingPeriod; u2Byte ExtListenTimingDuration; - + // Status u1Byte Status; u1Byte MinorReasonCode; @@ -1191,7 +1191,7 @@ typedef struct _P2P_INFO { // Provision Discovery P2P_PROVISION_DISCOVERY_CONTEXT ProvisionDiscoveryContext; u1Byte ProvisionReqRetryCnt; - + BOOLEAN bPreGroupFormation; BOOLEAN bSendProbeReqInExtendedListen; @@ -1243,7 +1243,7 @@ typedef struct _P2P_INFO { //====================================================================== // Other 802.11 Info, to be carried in ProbeRsp constructed by IHV Service //====================================================================== - + //====================================================================== // Temporary Fields //====================================================================== @@ -1255,12 +1255,12 @@ typedef struct _P2P_INFO { ACTION_TIMER_HANDLE P2PActionTimer; // ------------------------------------------------------- - + RT_TIMER P2PMgntTimer; u8Byte LastTimerFired; u1Byte ManagedUpdateCnt; // Update the managed info from Wlan AP. - // + // // If true, the SP is ended by the NoA, and the client must re-send the trigger frame to the P2P GO for a new SP. // In the P2P GO mode, it must automatically end all SPs for all clients no matter the final frame with the EOSP bit set, and shall // not send any WMM-PS packets to those clients without receiving the trigger frames. In P2P TestPlan 6.1.13 and 7.1.5. @@ -1303,7 +1303,7 @@ typedef struct _P2P_INFO { RT_SCAN_TYPE ScanType; // Determine the scan type in the scan phase P2P_DEVICE_ID_TO_SCAN ScanDeviceIDs; // The Device IDs for the scan process BOOLEAN bForceScanLegacyNetworks; // Scan the legacy networks - BOOLEAN bDeviceDiscoveryIndicateToOS; // Let the OID indicated only once + BOOLEAN bDeviceDiscoveryIndicateToOS; // Let the OID indicated only once // + Search for Specific Channel BOOLEAN bDiscoverForSpecificChannels; // Flag for enabling the search u1Byte DiscoverForSpecificChannels[10]; // Specific Channels @@ -1316,11 +1316,11 @@ typedef struct _P2P_INFO { // For saving the received raw packets ---------------------------------------------- // NOTE: These should be merged with the ScanList if the UI and IHV are all stable. - P2P_DEVICE_LIST DeviceList; + P2P_DEVICE_LIST DeviceList; P2P_DEVICE_LIST DeviceListForQuery; // ----------------------------------------------------------------------------- - - // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST -------------------------------------- + + // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST -------------------------------------- u1Byte ProvisionRequestGroupCapability; BOOLEAN bProvisionRequestUseGroupID; u1Byte ProvisionRequestGroupIDDeviceAddress[6]; @@ -1328,7 +1328,7 @@ typedef struct _P2P_INFO { u1Byte uProvisionRequestGroupIDSSIDLength; // ------------------------------------------------------------------------------------------------- - // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE -------------------------------------- + // For Win 8: OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE -------------------------------------- u1Byte ProvisionResponseReceiverDeviceAddress[6]; u1Byte ProvisionResponseDialogToken; u1Byte ProvisionResponseConfigMethod; @@ -1378,13 +1378,13 @@ typedef struct _P2P_INFO { u2Byte uInvitationRequestOperatingChannelNumber; BOOLEAN bInvitationRequestUseSpecifiedOperatingChannel; u1Byte InvitationRequestGroupIDDeviceAddress[6]; - u1Byte InvitationRequestPeerDeviceAddress[6]; + u1Byte InvitationRequestPeerDeviceAddress[6]; u1Byte InvitationRequestGroupIDSSID[MAX_SSID_LEN]; u1Byte uInvitationRequestGroupIDSSIDLength; BOOLEAN bInvitationRequestLocalGO; //--------------------------------------------------------------------------------- - + // For Win 8: OID_DOT11_WFD_SEND_INVITATION_RESPONSE ------------------------------ u1Byte InvitationResponseReceiverDeviceAddress[6]; u1Byte InvitationResponseDialogToken; @@ -1402,7 +1402,7 @@ typedef struct _P2P_INFO { // Debug Device Discovery ------------------- u2Byte ProbeRequestSequenceNum; // ---------------------------------------- - + // Trick for knowing next channel switch time ------- s8Byte TimeStartToStopSendingProbeResponse; @@ -1442,7 +1442,7 @@ P2PSetRole( IN PP2P_INFO pP2PInfo, IN P2P_ROLE Role ); - + VOID P2PGOSetBeaconInterval( IN PP2P_INFO pP2PInfo, @@ -1468,7 +1468,7 @@ P2PCommonChannelArrived( IN OCTET_STRING osPacket ); -OCTET_STRING +OCTET_STRING P2PWpsIEGetAttribute( IN OCTET_STRING osWpsIEAttributes, IN BOOLEAN bWpsAttributesInBE, @@ -1485,12 +1485,12 @@ P2PDeviceTypeMatches( // Dump Routine //====================================================================== -VOID +VOID P2PDumpDeviceCapability( IN u1Byte DeviceCapability ); -VOID +VOID P2PDumpGroupCapability( IN u1Byte GroupCapability ); @@ -1508,31 +1508,31 @@ P2PClientInfoGetCount( IN PP2P_INFO pP2PInfo ); -PP2P_CLIENT_INFO_DISCRIPTOR +PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoFindByInterfaceAddress( IN PP2P_INFO pP2PInfo, IN pu1Byte InterfaceAddress ); -PP2P_CLIENT_INFO_DISCRIPTOR +PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoFindByDeviceAddress( IN PP2P_INFO pP2PInfo, IN pu1Byte DeviceAddress ); -PP2P_CLIENT_INFO_DISCRIPTOR +PP2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoEnumClients( IN PP2P_INFO pP2PInfo, IN u1Byte StartIndex, OUT pu1Byte pIndex ); -PP2P_DEVICE_DISCRIPTOR +PP2P_DEVICE_DISCRIPTOR P2PScanListFind( IN PP2P_DEVICE_DISCRIPTOR pScanList, IN u4Byte ScanListSize, - IN pu1Byte DeviceAddress, - IN pu1Byte InterfaceAddress, + IN pu1Byte DeviceAddress, + IN pu1Byte InterfaceAddress, OUT pu4Byte pScanListIndex ); @@ -1541,7 +1541,7 @@ P2PScanListAllFound( IN PP2P_INFO pP2PInfo ); -PP2P_DEVICE_DISCRIPTOR +PP2P_DEVICE_DISCRIPTOR P2PScanListAdd( IN OUT PP2P_DEVICE_DISCRIPTOR pScanList, IN OUT pu4Byte pScanListSize @@ -1693,7 +1693,7 @@ VOID P2PExtendedListenStart( IN PP2P_INFO pP2PInfo ); - + VOID P2PExtendedListenResetCounter( IN PP2P_INFO pP2PInfo @@ -1724,7 +1724,7 @@ P2PDisconnect( IN PP2P_INFO pP2PInfo ); -BOOLEAN +BOOLEAN P2PInvitePeerStart( IN PP2P_INFO pP2PInfo, IN PP2P_LIB_INVITATION_REQ_CONTEXT pLibInvittionContext @@ -1782,7 +1782,7 @@ P2PSetPsState( IN PP2P_INFO pP2PInfo, IN u4Byte Source, IN P2P_PS_STATE P2pState, - IN u8Byte Timeout + IN u8Byte Timeout ); VOID @@ -1795,13 +1795,13 @@ P2PNotifyClientPSChange( IN PP2P_INFO pP2PInfo ); -VOID +VOID P2PServiceDiscoveryReq( PP2P_INFO pP2PInfo, PP2P_SD_REQ_CONTEXT pServiceQueryContent ); -VOID +VOID P2PServiceDiscoveryRsp( PP2P_INFO pP2PInfo, PP2P_SD_RSP_CONTEXT pServiceRspContent @@ -1926,7 +1926,7 @@ RT_STATUS P2P_OnBeacon( IN PADAPTER pAdapter, IN PRT_RFD pRfd, - IN POCTET_STRING posMpdu + IN POCTET_STRING posMpdu ); RT_STATUS @@ -2102,23 +2102,23 @@ P2P_SetWpsIe( IN u1Byte *pIePayload ); -VOID +VOID P2PDumpWpsAttributes( IN PP2P_WPS_ATTRIBUTES pP2PWpsAttributes ); -VOID +VOID P2PDumpScanList( IN PP2P_DEVICE_DISCRIPTOR pDevDescriptors, IN u4Byte nDevDescriptors ); -VOID +VOID P2PScanListClear( IN P2P_INFO *pP2PInfo ); -VOID +VOID P2PScanListCopy( IN OUT PP2P_DEVICE_DISCRIPTOR pScanListDest, IN OUT pu4Byte pScanListDestSize, @@ -2165,7 +2165,7 @@ P2PExtendedListenComplete( IN PP2P_INFO pP2PInfo ); -VOID +VOID P2PGOStartAutomously( IN PP2P_INFO pP2PInfo ); @@ -2207,7 +2207,7 @@ P2PMlmeAssociateRequest( u4Byte asocTmot, u2Byte asCap, u2Byte asListenInterval, - BOOLEAN Reassociate + BOOLEAN Reassociate ); VOID @@ -2250,7 +2250,7 @@ P2P_APRemoveKey( VOID P2P_APSetkey( IN PADAPTER Adapter, - IN u1Byte *pucMacAddr, + IN u1Byte *pucMacAddr, IN u4Byte ulEncAlg ); diff --git a/network/wlan/WDI/COMMON/P2PSvc.c b/network/wlan/WDI/COMMON/P2PSvc.c index d3f61a756..859a1d4ca 100644 --- a/network/wlan/WDI/COMMON/P2PSvc.c +++ b/network/wlan/WDI/COMMON/P2PSvc.c @@ -1,4 +1,4 @@ -// +// // Description: // Implement P2PSvc interface to other part of the driver. // @@ -48,7 +48,7 @@ p2psvc_Free_P2PSvcInfo( P2PSvc_Free_SeekReqList(&pP2PSvcInfo->seekReqList, &pP2PSvcInfo->seekReqListCnt, 0); P2PSvc_Free_SearchResultObjList(&pP2PSvcInfo->searchResultList, &pP2PSvcInfo->searchResultListCnt); P2PSvc_Free_PDSessionList(&pP2PSvcInfo->pdSessionList, &pP2PSvcInfo->pdSessionListCnt); - + pP2PSvcInfo->bEnabled = FALSE; } PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); @@ -72,7 +72,7 @@ p2psvc_Free_P2PSvcInfo( return; } -RT_STATUS +RT_STATUS p2psvc_Set_Enable( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -96,19 +96,19 @@ p2psvc_Set_Enable( PP2PSVC_OBJ_LIST pObjList = (PP2PSVC_OBJ_LIST)(((PRT_OBJECT_HEADER)infoBuf)->Value); PRT_OBJECT_HEADER pBEnableObj = P2PSvc_GetParam(pObjList, P2PSVC_OBJ_HDR_ID_DATA_BENABLE, 0); BOOLEAN bEnable = *(PBOOLEAN)pBEnableObj->Value; - + if(bEnable) {// To enable if(pP2PSvcInfo->bEnabled) - {// already enabled => free the old and re-init + {// already enabled => free the old and re-init p2psvc_Free_P2PSvcInfo(pP2PInfo); RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Already enable, the old one will be freed!\n")); } - + PlatformZeroMemory(pP2PSvcInfo, sizeof(P2PSVC_INFO)); - + PLATFORM_INIT_RT_SPINLOCK(pP2PSvcInfo->lock); - + PLATFORM_ACQUIRE_RT_SPINLOCK(pP2PSvcInfo->lock); { pP2PSvcInfo->bEnabled = TRUE; @@ -121,7 +121,7 @@ p2psvc_Set_Enable( pP2PSvcInfo->seekReqListCnt = 0; pP2PSvcInfo->searchResultListCnt = 0; pP2PSvcInfo->pdSessionListCnt = 0; - + pP2PSvcInfo->connCap = P2PSVC_CONN_CAP_BMP_NONE; pP2PSvcInfo->pAdapter = pAdapter; } @@ -134,7 +134,7 @@ p2psvc_Set_Enable( rtStatus = RT_STATUS_INVALID_STATE; break; } - + p2psvc_Free_P2PSvcInfo(pP2PInfo); } }while(FALSE); @@ -143,10 +143,10 @@ p2psvc_Set_Enable( P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - return rtStatus; + return rtStatus; } -RT_STATUS +RT_STATUS p2psvc_Query_Enable( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -164,7 +164,7 @@ p2psvc_Query_Enable( P2PSVC_CHECK_NULL(pAdapter); P2PSVC_FUNC_IN(DBG_LOUD); - + do { *pBytesNeeded = RT_OBJECT_HEADER_SIZE + sizeof(u1Byte); @@ -177,7 +177,7 @@ p2psvc_Query_Enable( } pObjHdr = (PRT_OBJECT_HEADER)(infoBuf); - + RT_ASSIGN_OBJECT_HEADER( pObjHdr, RT_OB_HDR_TYPE_QUERY, @@ -206,100 +206,100 @@ P2PSVC_REQUEST_ID_MAP lP2PSvcRequestIdMap[] = { // Set Enable/Disable { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_ENABLE, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - p2psvc_Set_Enable + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_ENABLE, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + p2psvc_Set_Enable }, - + // Query enabled { - RT_OB_HDR_TYPE_QUERY, - P2PSVC_OBJ_HDR_ID_ACT_ENABLE, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - p2psvc_Query_Enable + RT_OB_HDR_TYPE_QUERY, + P2PSVC_OBJ_HDR_ID_ACT_ENABLE, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + p2psvc_Query_Enable }, // Set seek { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_SEEK, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_SEEK, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, P2PSvc_Set_Seek }, // Set cancel seek { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_CANCEL_SEEK, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_CANCEL_SEEK, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, P2PSvc_Set_CancelSeek }, - // Set advertise + // Set advertise { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_ADVERTISE, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - P2PSvc_Set_AdvSvc + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_ADVERTISE, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + P2PSvc_Set_AdvSvc }, // Set cancel advertise { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_CANCEL_ADVERTISE, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - P2PSvc_Set_CancelAdvSvc + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_CANCEL_ADVERTISE, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + P2PSvc_Set_CancelAdvSvc }, // Set svc status { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_SVC_STATUS, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - P2PSvc_Set_SvcStatus - }, + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_SVC_STATUS, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + P2PSvc_Set_SvcStatus + }, // PD Req data { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_PD_REQ, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - P2PSvc_Set_PDReq + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_PD_REQ, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + P2PSvc_Set_PDReq }, // Conn cap { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_CONN_CAP, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - P2PSvc_Set_ConnCap + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_CONN_CAP, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + P2PSvc_Set_ConnCap }, // Follow on PD req { - RT_OB_HDR_TYPE_SET, - P2PSVC_OBJ_HDR_ID_ACT_FOPD_REQ, - P2PSVC_MIN_SUPPORT_VER, - P2PSVC_MAX_SUPPORT_VER, - P2PSvc_Set_RspdorFOPDReq + RT_OB_HDR_TYPE_SET, + P2PSVC_OBJ_HDR_ID_ACT_FOPD_REQ, + P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MAX_SUPPORT_VER, + P2PSvc_Set_RspdorFOPDReq }, - + // ===== Insert new map above this line ===== // { - RT_OB_HDR_TYPE_UNKNOWN, - P2PSVC_OBJ_HDR_ID_UNKNOWN, - P2PSVC_OBJECT_VERSION_INVLAID, - P2PSVC_OBJECT_VERSION_INVLAID, + RT_OB_HDR_TYPE_UNKNOWN, + P2PSVC_OBJ_HDR_ID_UNKNOWN, + P2PSVC_OBJECT_VERSION_INVLAID, + P2PSVC_OBJECT_VERSION_INVLAID, NULL } }; @@ -323,7 +323,7 @@ P2PSvc_Dump( ) { PP2PSVC_INFO pP2PSvcInfo = P2PSVC_GET_INFO(pAdapter); - + if(!P2PSVC_ENABLED(pP2PSvcInfo)) return; RT_TRACE(COMP_P2P, DBG_LOUD, ("\n")); @@ -367,7 +367,7 @@ P2PSvc_Request( *pBytesNeeded = RT_OBJECT_HEADER_SIZE; P2PSVC_FUNC_IN(DBG_LOUD); - + do { if(outBufLen < *pBytesNeeded) @@ -388,7 +388,7 @@ P2PSvc_Request( if(RT_OB_HDR_TYPE_SET == pObjHdr->Type) { - // The ObjList is right after an obj header. + // The ObjList is right after an obj header. // The obj header is used for oid. pObjList = (PP2PSVC_OBJ_LIST)(((PRT_OBJECT_HEADER)infoBuf)->Value); if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_ValidateActionParam(pObjHdr->Id, pObjList))) @@ -418,7 +418,7 @@ P2PSvc_Request( if(pObjHdr->Type == lP2PSvcRequestIdMap[idx].type && pObjHdr->Id == lP2PSvcRequestIdMap[idx].id) {// type and id matched // Check Version - if(pObjHdr->Version >= lP2PSvcRequestIdMap[idx].minVer + if(pObjHdr->Version >= lP2PSvcRequestIdMap[idx].minVer && pObjHdr->Version <= lP2PSvcRequestIdMap[idx].maxVer) { reqHdlr = lP2PSvcRequestIdMap[idx].reqHdlr; @@ -428,7 +428,7 @@ P2PSvc_Request( else { bMismatchVer = TRUE; - } + } } } @@ -479,7 +479,7 @@ P2PSvc_AllocP2PSvcInfo( } PlatformZeroMemory(pP2PInfo->pP2PSvcInfo, sizeof(P2PSVC_INFO)); - + }while(FALSE); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); @@ -504,7 +504,7 @@ P2PSvc_Free_P2PSvcInfo( P2PSVC_FUNC_IN(DBG_LOUD); do - { + { p2psvc_Free_P2PSvcInfo(pP2PInfo); PlatformFreeMemory(pP2PSvcInfo, sizeof(P2PSVC_INFO)); @@ -540,11 +540,11 @@ P2PSvc_OnP2PScanComplete( { PRT_LIST_ENTRY pListHead = &pP2PSvcInfo->searchResultList; PRT_LIST_ENTRY pEntry = NULL; - + for(pEntry = RTGetHeadList(pListHead); pEntry != pListHead; pEntry = RTNextEntryList(pEntry)) { PP2PSVC_SR_LIST_ENTRY pSREntry = (PP2PSVC_SR_LIST_ENTRY)pEntry; - + if(pSREntry->bDirty) { P2PSvc_Indicate(pP2PSvcInfo, P2PSVC_OBJ_LIST_LEN(&pSREntry->srObjList), &pSREntry->srObjList); @@ -553,7 +553,7 @@ P2PSvc_OnP2PScanComplete( } }while(FALSE); - PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); + PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); @@ -588,7 +588,7 @@ P2PSvc_OnDevDiscComplete( P2PSvc_Free_SearchResultObjList(&pP2PSvcInfo->searchResultList, &pP2PSvcInfo->searchResultListCnt); }while(FALSE); - PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); + PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); @@ -597,9 +597,9 @@ P2PSvc_OnDevDiscComplete( // // Description: -// On receiving P2PProbeRsp, -// - -//check for every seek req to see if it is done by +// On receiving P2PProbeRsp, +// - +//check for every seek req to see if it is done by // checking whether it has svc-info-req or svc-name is ended with * (i.e., whether SD is needed). // If it is done, indicate search result. // If it needs further SD req, indicate search result up when SD req is done. @@ -668,7 +668,7 @@ P2PSvc_OnProbeRsp( P2PSVC_CHECK_NULL(pSREntry); - // Update the search result list + // Update the search result list if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_UpdateSearchResult(pP2PSvcInfo, searchId, devAddr, pSREntry, &bDuplicatedEntry, &pSREntryInList))) { P2PSvc_FreeMem(pSREntry, P2PSVC_SR_LIST_LEN(pSREntry)); @@ -707,7 +707,7 @@ P2PSvc_OnProbeRsp( // Remove the seek entry since it is completed RTRemoveEntryListWithCnt(pEntry, &pP2PSvcInfo->seekReqListCnt); P2PSvc_FreeMem(pEntry, P2PSVC_REQ_INFO_LIST_LEN(pSeekInfoEntry)); - pEntry = pForeEntry; + pEntry = pForeEntry; } else {// search for all dev addr @@ -716,7 +716,7 @@ P2PSvc_OnProbeRsp( } }while(FALSE); - PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); + PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_TRACE, rtStatus); @@ -725,11 +725,11 @@ P2PSvc_OnProbeRsp( // // Description -// Make P2PIE for ProbeRsp. According to addendum v0.1, it shall contain +// Make P2PIE for ProbeRsp. According to addendum v0.1, it shall contain // the following attributes: // * adv-svc-info (id: 23) // -// If it is too big to fit into a single P2PIE, it will be splited into +// If it is too big to fit into a single P2PIE, it will be splited into // several. // RT_STATUS @@ -800,7 +800,7 @@ P2PSvc_MakeProbeReqIE( if(!P2PSVC_ENABLED(pP2PSvcInfo)) return RT_STATUS_SUCCESS; do - { + { if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_MakeSvcNameHash(pP2PSvcInfo, pBuf))) { break; @@ -823,14 +823,14 @@ P2PSvc_MakeProbeReqIE( // - Do exact svc-name matching if the query svc-name does not contain * // otherwise match substring. // - Add svc-info if svc-info-req len is not 0 -// The ANQP query rsp data is constructed +// The ANQP query rsp data is constructed // RT_STATUS P2PSvc_OnSDReq( IN PVOID pvP2PSvcInfo, IN pu1Byte devAddr, IN u1Byte dlgToken, - IN u1Byte SDReqRecvdSize, + IN u1Byte SDReqRecvdSize, IN PVOID pvSDReqRecvd, OUT PBOOLEAN pbToSendSDRsp ) @@ -847,7 +847,7 @@ P2PSvc_OnSDReq( P2PSVC_CHECK_NULL(pbToSendSDRsp); *pbToSendSDRsp = TRUE; - + if(!P2PSVC_ENABLED(pP2PSvcInfo)) return RT_STATUS_INVALID_STATE; if(P2P_SD_PROTOCOL_P2PSVC != pSvcReqTlv->ServiceDesc.ServiceType) return RT_STATUS_INVALID_DATA; @@ -856,7 +856,7 @@ P2PSvc_OnSDReq( PLATFORM_ACQUIRE_RT_SPINLOCK(pP2PSvcInfo->lock); do - { + { u1Byte svcNameLen = 0; pu1Byte svcNameBuf = NULL; u1Byte svcInfoReqLen = 0; @@ -888,17 +888,17 @@ P2PSvc_OnSDReq( // Match svc-name if(!P2PSvc_SDMatchSvcName(pAdvInfoEntry, svcNameLen, svcNameBuf)) continue; - // Attach svc info desc to + // Attach svc info desc to P2PSvc_MakeSvcInfoDesc(pP2PSvcInfo, pAdvInfoEntry, svcInfoReqLen, svcInfoReqBuf, &fbuf); nAddedAdvSvc++; } - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_SDRsp(pP2PSvcInfo, devAddr, dlgToken, pSvcReqTlv->TransactionID, nAddedAdvSvc, &fbuf))) { break; } - + }while(FALSE); PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); @@ -921,14 +921,14 @@ P2PSvc_OnSDReq( // // Description: // Handle SD rsp with P2PSvc protocol type. -// +// // RT_STATUS P2PSvc_OnSDRsp( IN PVOID pvP2PSvcInfo, IN pu1Byte devAddr, IN u1Byte transactionId, - IN PVOID pvSvcRspTlv, + IN PVOID pvSvcRspTlv, OUT PBOOLEAN pbNeedFurtherProcess ) { @@ -1008,7 +1008,7 @@ P2PSvc_OnSDRsp( PRT_LIST_ENTRY pForeEntry = RTForeEntryList(pEntry); RTRemoveEntryListWithCnt(pEntry, &pP2PSvcInfo->seekReqListCnt); P2PSvc_FreeMem(pEntry, P2PSVC_REQ_INFO_LIST_LEN(pSeekInfoEntry)); - pEntry = pForeEntry; + pEntry = pForeEntry; } else {// search for all dev addr @@ -1027,7 +1027,7 @@ P2PSvc_OnSDRsp( } P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } @@ -1096,13 +1096,13 @@ P2PSvc_OnPDRsp( PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } // // Description: -// This function handles PD req. +// This function handles PD req. // The P2P module is expected NOT to send PD rsp if this function returns error. // RT_STATUS @@ -1153,7 +1153,7 @@ P2PSvc_OnPDReq( else {// rspdor, currently involved in another session // Will attach status attr with code 2 when constructing PD rsp - } + } } else {// no session, we are the rspdor, create a PD session @@ -1172,7 +1172,7 @@ P2PSvc_OnPDReq( } P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } @@ -1201,7 +1201,7 @@ P2PSvc_OnPDRspSent( { break; } - + if(bSendOk) { if(pPDEntry->bInitor) @@ -1223,7 +1223,7 @@ P2PSvc_OnPDRspSent( PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } @@ -1337,7 +1337,7 @@ P2PSvc_MakePDRspIE( // // Description: // This function handles the case when the PD initor fails to send PD req. -// +// // RT_STATUS P2PSvc_OnSendPDReqFailure( @@ -1351,7 +1351,7 @@ P2PSvc_OnSendPDReqFailure( P2PSVC_CHECK_NULL(pvP2PSvcInfo); P2PSVC_CHECK_NULL(devAddr); - + if(!P2PSVC_ENABLED(pP2PSvcInfo)) return RT_STATUS_INVALID_STATE; P2PSVC_FUNC_IN(DBG_LOUD); @@ -1389,7 +1389,7 @@ P2PSvc_OnSendPDReqFailure( PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } @@ -1401,9 +1401,9 @@ P2PSvc_OnWatchdog( { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2PSVC_INFO pP2PSvcInfo = (PP2PSVC_INFO)pvP2PSvcInfo; - + P2PSVC_CHECK_NULL(pvP2PSvcInfo); - + if(!P2PSVC_ENABLED(pP2PSvcInfo)) return RT_STATUS_SUCCESS; P2PSVC_FUNC_IN(DBG_LOUD); @@ -1420,7 +1420,7 @@ P2PSvc_OnWatchdog( PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } @@ -1433,7 +1433,7 @@ P2PSvc_OnDisconnect( PP2PSVC_INFO pP2PSvcInfo = (PP2PSVC_INFO)pvP2PSvcInfo; P2PSVC_CHECK_NULL(pvP2PSvcInfo); - + if(!P2PSVC_ENABLED(pP2PSvcInfo)) return RT_STATUS_SUCCESS; P2PSVC_FUNC_IN(DBG_LOUD); @@ -1448,7 +1448,7 @@ P2PSvc_OnDisconnect( PLATFORM_RELEASE_RT_SPINLOCK(pP2PSvcInfo->lock); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return rtStatus; } diff --git a/network/wlan/WDI/COMMON/P2PSvc.h b/network/wlan/WDI/COMMON/P2PSvc.h index 3eb743882..ad201465b 100644 --- a/network/wlan/WDI/COMMON/P2PSvc.h +++ b/network/wlan/WDI/COMMON/P2PSvc.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2013 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: // P2P Service interface to other part of the driver @@ -101,7 +101,7 @@ P2PSvc_OnSDReq( IN PVOID pvP2PSvcInfo, IN pu1Byte devAddr, IN u1Byte dlgToken, - IN u1Byte SDReqRecvdSize, + IN u1Byte SDReqRecvdSize, IN PVOID pvSDReqRecvd, OUT PBOOLEAN pbToSendSDRsp ); @@ -111,7 +111,7 @@ P2PSvc_OnSDRsp( IN PVOID pvP2PSvcInfo, IN pu1Byte devAddr, IN u1Byte transactionId, - IN PVOID pvSvcRspTlv, + IN PVOID pvSvcRspTlv, OUT PBOOLEAN pbNeedFurtherProcess ); diff --git a/network/wlan/WDI/COMMON/P2PSvcType.h b/network/wlan/WDI/COMMON/P2PSvcType.h index 09e33d7ef..f6424c877 100644 --- a/network/wlan/WDI/COMMON/P2PSvcType.h +++ b/network/wlan/WDI/COMMON/P2PSvcType.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2013 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: // P2P Service interface for upper layers @@ -43,7 +43,7 @@ typedef u4Byte P2PSVC_REASON, *PP2PSVC_REASON; #define P2PSVC_DEFINE_REASON(__reasonStr) (#__reasonStr) -static char* P2PSVC_REASON_STR_TAB[] = +static char* P2PSVC_REASON_STR_TAB[] = { P2PSVC_DEFINE_REASON(P2PSVC_REASON_NONE), // 0x00000000 P2PSVC_DEFINE_REASON(P2PSVC_REASON_PEER_UNRECOGNIZED), // 0x00000001 @@ -168,10 +168,10 @@ typedef struct _P2PSVC_SVC_NAME_HASH_TAB UCHAR hash[6]; }P2PSVC_SVC_NAME_HASH_TAB, *PP2PSVC_SVC_NAME_HASH_TAB; -static P2PSVC_SVC_NAME_HASH_TAB gP2PSVC_NameHashTab[] = +static P2PSVC_SVC_NAME_HASH_TAB gP2PSVC_NameHashTab[] = { {L"org.wi-fi.wfds", {0x6d, 0xb8, 0x71, 0x03, 0x11, 0xf8}}, - + {L"org.wi-fi.wfds.send.rx", {0xeb, 0xac, 0xb9, 0x5f, 0x37, 0x4e}}, {L"org.wi-fi.wfds.send.tx", {0x28, 0x6d, 0xef, 0xe4, 0x6d, 0xd5}}, @@ -192,11 +192,11 @@ typedef struct _P2PSVC_OBJ_LIST { // Hdr RT_OBJECT_HEADER hdr; // len is form Value to the end of the structure including the var len field - + // Fixed u4Byte nObjs; u4Byte ObjTab[P2PSVC_MAX_OBJ_LIST_ENTRIES]; - + // Var u1Byte varStart[1]; }P2PSVC_OBJ_LIST, *PP2PSVC_OBJ_LIST; diff --git a/network/wlan/WDI/COMMON/P2PSvc_ActionInfo.c b/network/wlan/WDI/COMMON/P2PSvc_ActionInfo.c index 6b1167004..cc729be03 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_ActionInfo.c +++ b/network/wlan/WDI/COMMON/P2PSvc_ActionInfo.c @@ -10,12 +10,12 @@ // Local //----------------------------------------------------------------------------- -// +// // Description: // Add the req info (obj hdr + obj list) to the info list. // Assume the req info has been validated by P2PSvc_ValidateReqInfo // -RT_STATUS +RT_STATUS p2psvc_AddReqInfoToList( IN PADAPTER pAdapter, IN PP2PSVC_INFO pP2PSvcInfo, @@ -26,14 +26,14 @@ p2psvc_AddReqInfoToList( { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2PSVC_OBJ_LIST pObjList = NULL; - + P2PSVC_FUNC_IN(DBG_LOUD); if(!pP2PSvcInfo->bEnabled) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] P2PSvc not enabled!")); P2PSVC_FUNC_OUT(DBG_LOUD, RT_STATUS_INVALID_STATE); - + return RT_STATUS_INVALID_STATE; } @@ -84,7 +84,7 @@ P2PSvc_Free_AdvSvcList( PRT_LIST_ENTRY pEntry = NULL; BOOLEAN bFreeAll = (0 == advId) ? (TRUE) : (FALSE); BOOLEAN bFreed = FALSE; - + for(pEntry = RTGetHeadList(pListHead); pEntry != pListHead; pEntry = RTNextEntryList(pEntry)) { PP2PSVC_REQ_INFO_ENTRY pInfoEntry = (PP2PSVC_REQ_INFO_ENTRY)pEntry; @@ -113,7 +113,7 @@ P2PSvc_Free_AdvSvcList( if(bFree) { PRT_LIST_ENTRY pForeEntry = RTForeEntryList(pEntry); - + RTRemoveEntryListWithCnt(pEntry, pListCnt); P2PSvc_FreeMem(pEntry, FIELD_OFFSET(P2PSVC_REQ_INFO_ENTRY, objList) + P2PSVC_OBJ_LIST_LEN(pAdvSvcObjList)); @@ -140,7 +140,7 @@ P2PSvc_Free_SeekReqList( PRT_LIST_ENTRY pEntry = NULL; BOOLEAN bFreeAll = (0 == seekId) ? (TRUE) : (FALSE); BOOLEAN bFreed = FALSE; - + for(pEntry = RTGetHeadList(pListHead); pEntry != pListHead; pEntry = RTNextEntryList(pEntry)) { PP2PSVC_REQ_INFO_ENTRY pInfoEntry = (PP2PSVC_REQ_INFO_ENTRY)pEntry; @@ -188,7 +188,7 @@ P2PSvc_Free_SeekReqList( return bFreed; } -RT_STATUS +RT_STATUS P2PSvc_Set_AdvSvc( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -219,7 +219,7 @@ P2PSvc_Set_AdvSvc( return rtStatus; } -RT_STATUS +RT_STATUS P2PSvc_Set_CancelAdvSvc( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -239,7 +239,7 @@ P2PSvc_Set_CancelAdvSvc( { PRT_OBJECT_HEADER pObjHdr = (PRT_OBJECT_HEADER)(infoBuf); PP2PSVC_OBJ_LIST pObjList = (PP2PSVC_OBJ_LIST)(pObjHdr->Value); - + PRT_OBJECT_HEADER pAdvIdObj = NULL; u4Byte advIdToCancel = 0; @@ -258,7 +258,7 @@ P2PSvc_Set_CancelAdvSvc( return rtStatus; } -RT_STATUS +RT_STATUS P2PSvc_Set_SvcStatus( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -284,7 +284,7 @@ P2PSvc_Set_SvcStatus( u4Byte advIdToSet = 0; u1Byte svcStatusToSet = 0; - + PRT_LIST_ENTRY pEntry = NULL; // Get adv-id and svc-status to set @@ -293,7 +293,7 @@ P2PSvc_Set_SvcStatus( pSvcStatusObj = P2PSvc_GetParam(pObjList, P2PSVC_OBJ_HDR_ID_DATA_SVC_STATUS, 0); svcStatusToSet = *(pu1Byte)pSvcStatusObj->Value; - + for(pEntry = RTGetHeadList(&pP2PSvcInfo->advSvcList); pEntry != &pP2PSvcInfo->advSvcList; pEntry = RTNextEntryList(pEntry)) { PP2PSVC_REQ_INFO_ENTRY pInfoEntry = (PP2PSVC_REQ_INFO_ENTRY)pEntry; @@ -328,7 +328,7 @@ P2PSvc_Set_SvcStatus( return rtStatus; } -RT_STATUS +RT_STATUS P2PSvc_Set_Seek( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -360,7 +360,7 @@ P2PSvc_Set_Seek( } -RT_STATUS +RT_STATUS P2PSvc_Set_CancelSeek( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -380,7 +380,7 @@ P2PSvc_Set_CancelSeek( { PRT_OBJECT_HEADER pObjHdr = (PRT_OBJECT_HEADER)(infoBuf); PP2PSVC_OBJ_LIST pObjList = (PP2PSVC_OBJ_LIST)(pObjHdr->Value); - + PRT_OBJECT_HEADER pSearchIdObj = NULL; u1Byte searchIdToCancel = 0; @@ -400,7 +400,7 @@ P2PSvc_Set_CancelSeek( } -RT_STATUS +RT_STATUS P2PSvc_Set_ConnCap( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -440,9 +440,9 @@ P2PSvc_Set_ConnCap( return rtStatus; } -RT_STATUS +RT_STATUS P2PSvc_Set_PDReq( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN PVOID infoBuf, IN u4Byte inBufLen, IN u4Byte outBufLen, @@ -460,7 +460,7 @@ P2PSvc_Set_PDReq( if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AddPDInitorData(pAdapter, infoBuf, inBufLen, outBufLen))) { break; - } + } }while(FALSE); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); @@ -468,7 +468,7 @@ P2PSvc_Set_PDReq( return rtStatus; } -RT_STATUS +RT_STATUS P2PSvc_Set_RspdorFOPDReq( IN PADAPTER pAdapter, IN PVOID infoBuf, diff --git a/network/wlan/WDI/COMMON/P2PSvc_Construct.c b/network/wlan/WDI/COMMON/P2PSvc_Construct.c index 3a8428b30..7826c3edf 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_Construct.c +++ b/network/wlan/WDI/COMMON/P2PSvc_Construct.c @@ -27,7 +27,7 @@ p2psvc_MatchSvcNameHash_org_wi_fi_wfds( break; } } - + return bMatched; } @@ -36,7 +36,7 @@ p2psvc_MatchSvcNameHash( IN PP2PSVC_REQ_INFO_ENTRY pInfoEntry, IN POCTET_STRING posSvcNameHash ) -{ +{ BOOLEAN bMatch = FALSE; PRT_OBJECT_HEADER pSvcNameHashObj = NULL; u4Byte nHashes = posSvcNameHash->Length / 6; @@ -48,7 +48,7 @@ p2psvc_MatchSvcNameHash( } RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "adv svc hash:\n", pSvcNameHashObj->Value, pSvcNameHashObj->Length); - + for(iterReqHash = 0; iterReqHash < nHashes; iterReqHash++) { if(0 == PlatformCompareMemory(posSvcNameHash->Octet + (6 * iterReqHash), pSvcNameHashObj->Value, 6)) @@ -74,10 +74,10 @@ p2psvc_EvalSvcAdvInfoAttrLen( do { PRT_LIST_ENTRY pEntry = NULL; - + if(p2psvc_MatchSvcNameHash_org_wi_fi_wfds(posSvcNameHash)) {// Spec 3.4.3.2: if prefix search, send org.wi-fi.wfds service name - + reqLen += (u2Byte)( sizeof(u4Byte) // adv-id + 2 // config-method + sizeof(u1Byte) // svc-name len @@ -93,18 +93,18 @@ p2psvc_EvalSvcAdvInfoAttrLen( PP2PSVC_REQ_INFO_ENTRY pInfoEntry = (PP2PSVC_REQ_INFO_ENTRY)pEntry; PRT_OBJECT_HEADER pAdvIdObj = NULL; PRT_OBJECT_HEADER pSvcNameObj = NULL; - + if(!p2psvc_MatchSvcNameHash(pInfoEntry, posSvcNameHash)) continue; - + pAdvIdObj = P2PSvc_GetParam(&pInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_ADV_ID, 0); pSvcNameObj = P2PSvc_GetParam(&pInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME, 0); - + reqLen += (u2Byte)(pAdvIdObj->Length // adv-id + 2 // config-method + sizeof(u1Byte) // svc-name len + pSvcNameObj->Length // svc-name + 0); - + nSvcToAttach++; } } @@ -119,7 +119,7 @@ RT_STATUS p2psvc_MakePDSvcNameHash( IN PP2PSVC_INFO pP2PSvcInfo, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; pu1Byte pLen = NULL; @@ -172,7 +172,7 @@ RT_STATUS p2psvc_MakeSeekSvcNameHash( IN PP2PSVC_INFO pP2PSvcInfo, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; pu1Byte pLen = NULL; @@ -194,7 +194,7 @@ p2psvc_MakeSeekSvcNameHash( { PP2PSVC_REQ_INFO_ENTRY pInfoEntry = (PP2PSVC_REQ_INFO_ENTRY)pEntry; PRT_OBJECT_HEADER pSvcNameHashObj = NULL; - + pSvcNameHashObj = P2PSvc_GetParam(&pInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME_HASH, 0); FrameBuf_Add_Data(pBuf, pSvcNameHashObj->Value, 6); } @@ -216,10 +216,10 @@ p2psvc_MakeSeekSvcNameHash( // // Description: -// Make adv-svc-info attr. +// Make adv-svc-info attr. // The attr is carried in a independent P2P IE and if the IE is too big // to fit in a single P2P IE, it is splitted into several. -// If error occurs during the process, length of the posMsdu member +// If error occurs during the process, length of the posMsdu member // will not be updated therefore no change is made to the original // constructing frame. // @@ -253,11 +253,11 @@ P2PSvc_MakeAdvSvcInfo( if(0 == attrLen) break; if(NULL == (pLen = p2p_add_IEHdr(pBuf))) break; - + // Attr id and len FrameBuf_Add_u1(pBuf, P2P_ATTR_ADV_SVC_INFO); FrameBuf_Add_le_u2(pBuf, attrLen); - + // advertise-svc-desc if(p2psvc_MatchSvcNameHash_org_wi_fi_wfds(posSvcNameHash)) {// Spec 3.4.3.2: if prefix search, send org.wi-fi.wfds service name @@ -265,16 +265,16 @@ P2PSvc_MakeAdvSvcInfo( u4Byte AdvIdZero = 0; // Main spec v0.43: - // If ASP finds a match with the Service Hash value of - // "org.wi-fi.wfds" (i.e. advertises one of the Wi-Fi alliance - // defined services listed in 3.2), then the ConfigMethods value - // in Probe Response shall be ignored. - + // If ASP finds a match with the Service Hash value of + // "org.wi-fi.wfds" (i.e. advertises one of the Wi-Fi alliance + // defined services listed in 3.2), then the ConfigMethods value + // in Probe Response shall be ignored. + // Attach [adv-id, config-method, svc-name len, svc-name] FrameBuf_Add_le_u4(pBuf, AdvIdZero); FrameBuf_Add_le_u2(pBuf, 0); FrameBuf_Add_u1(pBuf, (u1Byte)(strlen(P2PSVC_WIFI_WFDS_SERVICE_NAME))); - FrameBuf_Add_Data(pBuf, P2PSVC_WIFI_WFDS_SERVICE_NAME, (u2Byte) strlen(P2PSVC_WIFI_WFDS_SERVICE_NAME)); + FrameBuf_Add_Data(pBuf, P2PSVC_WIFI_WFDS_SERVICE_NAME, (u2Byte) strlen(P2PSVC_WIFI_WFDS_SERVICE_NAME)); } else { @@ -327,7 +327,7 @@ RT_STATUS P2PSvc_MakeSvcNameHash( IN PP2PSVC_INFO pP2PSvcInfo, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; @@ -370,7 +370,7 @@ P2PSvc_MakeInitorPDReqIE( IN PP2PSVC_INFO pP2PSvcInfo, IN PP2PSVC_PD_ENTRY pPDEntry, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pP2PSvcInfo->pAdapter); @@ -405,7 +405,7 @@ P2PSvc_MakeInitorPDReqIE( FrameBuf_Add_Data(pBuf, pPDEntry->selfGrpInfo.grpDevAddr, 6); FrameBuf_Add_Data(pBuf, pPDEntry->selfGrpInfo.ssidBuf, pPDEntry->selfGrpInfo.ssidLen); } - + // Intended-intf-addr, contains NEW or GO if(TEST_FLAG(pPDEntry->selfConnCap, P2PSVC_CONN_CAP_BMP_NEW | P2PSVC_CONN_CAP_BMP_GO)) { @@ -455,7 +455,7 @@ P2PSvc_MakeInitorPDReqIE( // Config-timeout, contains NEW or GO if(TEST_FLAG(pPDEntry->selfConnCap, P2PSVC_CONN_CAP_BMP_NEW | P2PSVC_CONN_CAP_BMP_GO)) - { + { P2PAttr_Make_ConfigTimeout(pBuf, pP2PInfo->GOConfigurationTimeout, pP2PInfo->ClientConfigurationTimeout); } @@ -464,7 +464,7 @@ P2PSvc_MakeInitorPDReqIE( { P2PAttr_Make_ListenChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->ListenChannel); } - + // session-id (session-id, self dev-addr), always present selfDevAddr = pP2PInfo->DeviceAddress; pObj = P2PSvc_GetParam(&pInitorPDEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_SESSION_ID, 0); @@ -484,10 +484,10 @@ P2PSvc_MakeInitorPDReqIE( // TODO: //4 Indicate P2P attrs sent - P2PSvc_IndicateFrameSent(pP2PSvcInfo, - P2PSVC_OBJ_HDR_ID_INDIC_INITOR_PD_REQ_SENT, + P2PSvc_IndicateFrameSent(pP2PSvcInfo, + P2PSVC_OBJ_HDR_ID_INDIC_INITOR_PD_REQ_SENT, peerDevAddr, - (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), + (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), pLen + 1); p2p_update_IeHdrLen(pBuf, pLen); @@ -501,7 +501,7 @@ P2PSvc_MakeRspdorFOPDReqIE( IN PP2PSVC_INFO pP2PSvcInfo, IN PP2PSVC_PD_ENTRY pPDEntry, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pP2PSvcInfo->pAdapter); @@ -533,7 +533,7 @@ P2PSvc_MakeRspdorFOPDReqIE( FrameBuf_Add_Data(pBuf, pP2PInfo->DeviceAddress, 6); FrameBuf_Add_Data(pBuf, pPDEntry->selfGrpInfo.ssidBuf, pPDEntry->selfGrpInfo.ssidLen); } - + // Intended-intf-addr, contains NEW or GO if(TEST_FLAG(pRspdorPDEntry->fopdReqConnCap, P2PSVC_CONN_CAP_BMP_NEW | P2PSVC_CONN_CAP_BMP_GO)) { @@ -550,7 +550,7 @@ P2PSvc_MakeRspdorFOPDReqIE( // Op-channel, contains NEW or GO if(TEST_FLAG(pRspdorPDEntry->fopdReqConnCap, P2PSVC_CONN_CAP_BMP_NEW | P2PSVC_CONN_CAP_BMP_GO)) { - P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->OperatingChannel); + P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->OperatingChannel); } // Channel-list, contains NEW @@ -558,7 +558,7 @@ P2PSvc_MakeRspdorFOPDReqIE( { P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pP2PInfo->ChannelEntryList); } - + // Session-info-data-info, NONE // Conn-cap, present if accepted @@ -586,7 +586,7 @@ P2PSvc_MakeRspdorFOPDReqIE( { P2PAttr_Make_ListenChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->ListenChannel); } - + // Session-id-info, always present FrameBuf_Add_u1(pBuf, P2P_ATTR_SESSION_ID_INFO); FrameBuf_Add_le_u2(pBuf, 4 + 6); @@ -602,10 +602,10 @@ P2PSvc_MakeRspdorFOPDReqIE( // TODO: //4 Indicate P2P attrs sent - P2PSvc_IndicateFrameSent(pP2PSvcInfo, - P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_FOPD_REQ_SENT, - pRspdorPDEntry->super.peerDevAddr, - (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), + P2PSvc_IndicateFrameSent(pP2PSvcInfo, + P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_FOPD_REQ_SENT, + pRspdorPDEntry->super.peerDevAddr, + (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), pLen + 1); p2p_update_IeHdrLen(pBuf, pLen); @@ -622,7 +622,7 @@ P2PSvc_MakeInitorFOPDRspIE( IN PP2PSVC_PD_ENTRY pPDEntry, IN POCTET_STRING posP2PAttrs, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pP2PSvcInfo->pAdapter); @@ -638,28 +638,28 @@ P2PSvc_MakeInitorFOPDRspIE( pu1Byte peerDevAddr = NULL; u4Byte advId = 0; PP2P_WPS_ATTRIBUTES pWps = &pP2PInfo->WpsAttributes; - + if(!P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_CONN_CAP_INFO, 1, &osConnCap)) { rtStatus = RT_STATUS_INVALID_DATA; break; } - + if(NULL == (pLen = p2p_add_IEHdr(pBuf))) break; - + // P2P-cap, always present if(p2p_ActingAs_Go(pP2PInfo)) RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Invalid role\n")); - P2PAttr_Make_Capability(pBuf, + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq pP2PInfo->GroupCapability); // Dev-info, always present - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, - pWps->SecondaryDeviceTypeLength, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, + pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -672,7 +672,7 @@ P2PSvc_MakeInitorFOPDRspIE( FrameBuf_Add_Data(pBuf, pP2PInfo->DeviceAddress, 6); FrameBuf_Add_Data(pBuf, pPDEntry->selfGrpInfo.ssidBuf, pPDEntry->selfGrpInfo.ssidLen); } - + // Intended-intf-addr, connCap IS GO if(P2PSVC_CONN_CAP_BMP_GO == pInitorPDEntry->fopdRspConnCap) { @@ -689,17 +689,17 @@ P2PSvc_MakeInitorFOPDRspIE( // Op-channel, connCap IS GO if(P2PSVC_CONN_CAP_BMP_GO == pInitorPDEntry->fopdRspConnCap) { - P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->OperatingChannel); + P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->OperatingChannel); } // Channel-list, IS CLI or GO if(P2PSVC_CONN_CAP_BMP_GO == pInitorPDEntry->fopdRspConnCap - || P2PSVC_CONN_CAP_BMP_CLI == pInitorPDEntry->fopdRspConnCap + || P2PSVC_CONN_CAP_BMP_CLI == pInitorPDEntry->fopdRspConnCap ) { P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pP2PInfo->ChannelEntryList); } - + // Session-info-data-info, NONE // Conn-cap, always present? @@ -709,7 +709,7 @@ P2PSvc_MakeInitorFOPDRspIE( FrameBuf_Add_le_u2(pBuf, 1); FrameBuf_Add_u1(pBuf, pInitorPDEntry->fopdRspConnCap); } - + // Adv-id (adv-id, svc-mac), always present pObj = P2PSvc_GetParam(&pInitorPDEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_DEV_ADDR, 0); peerDevAddr = pObj->Value; @@ -724,14 +724,14 @@ P2PSvc_MakeInitorFOPDRspIE( // Config-timeout, IS GO or CLI // Always add config-time out since WFA is checking this even when PD is failed //if(P2PSVC_CONN_CAP_BMP_GO == pInitorPDEntry->fopdRspConnCap - // || P2PSVC_CONN_CAP_BMP_CLI == pInitorPDEntry->fopdRspConnCap + // || P2PSVC_CONN_CAP_BMP_CLI == pInitorPDEntry->fopdRspConnCap // ) { P2PAttr_Make_ConfigTimeout(pBuf, pP2PInfo->GOConfigurationTimeout, pP2PInfo->ClientConfigurationTimeout); } // Listen-channel, NONE - + // Session-id-info, always present FrameBuf_Add_u1(pBuf, P2P_ATTR_SESSION_ID_INFO); FrameBuf_Add_le_u2(pBuf, 4 + 6); @@ -746,10 +746,10 @@ P2PSvc_MakeInitorFOPDRspIE( // Persistent-grp-info, NONE //4 Indicate P2P attrs sent - P2PSvc_IndicateFrameSent(pP2PSvcInfo, - P2PSVC_OBJ_HDR_ID_INDIC_INITOR_FOPD_RSP_SENT, - peerDevAddr, - (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), + P2PSvc_IndicateFrameSent(pP2PSvcInfo, + P2PSVC_OBJ_HDR_ID_INDIC_INITOR_FOPD_RSP_SENT, + peerDevAddr, + (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), pLen + 1); p2p_update_IeHdrLen(pBuf, pLen); @@ -767,7 +767,7 @@ P2PSvc_MakeRspdorPDRspIE( IN PP2PSVC_PD_ENTRY pPDEntry, IN POCTET_STRING posP2PAttrs, OUT FRAME_BUF *pBuf - ) + ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pP2PSvcInfo->pAdapter); @@ -779,22 +779,22 @@ P2PSvc_MakeRspdorPDRspIE( do { PP2P_WPS_ATTRIBUTES pWps = &pP2PInfo->WpsAttributes; - + if(NULL == (pLen = p2p_add_IEHdr(pBuf))) break; // P2P-cap, always present if(p2p_ActingAs_Go(pP2PInfo)) RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Invalid role\n")); - P2PAttr_Make_Capability(pBuf, + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq pP2PInfo->GroupCapability); // P2P-dev-info, always present - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, - pWps->SecondaryDeviceTypeLength, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, + pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -807,7 +807,7 @@ P2PSvc_MakeRspdorPDRspIE( FrameBuf_Add_Data(pBuf, pPDEntry->selfGrpInfo.grpDevAddr, 6); FrameBuf_Add_Data(pBuf, pPDEntry->selfGrpInfo.ssidBuf, pPDEntry->selfGrpInfo.ssidLen); } - + // Intended-intf-addr, contains NEW or GO if(TEST_FLAG(pRspdorPDEntry->pdRspConnCap, P2PSVC_CONN_CAP_BMP_GO)) { @@ -828,8 +828,8 @@ P2PSvc_MakeRspdorPDRspIE( } // Channel-list, IS CLI or GO - if(P2PSVC_CONN_CAP_BMP_GO == pRspdorPDEntry->pdRspConnCap - || P2PSVC_CONN_CAP_BMP_CLI == pRspdorPDEntry->pdRspConnCap + if(P2PSVC_CONN_CAP_BMP_GO == pRspdorPDEntry->pdRspConnCap + || P2PSVC_CONN_CAP_BMP_CLI == pRspdorPDEntry->pdRspConnCap ) { P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pP2PInfo->ChannelEntryList); @@ -853,15 +853,15 @@ P2PSvc_MakeRspdorPDRspIE( // Config-timeout, IS GO or CLI // Always add config-timeout since WFA is checking this even status is failed - //if(P2PSVC_CONN_CAP_BMP_GO == pRspdorPDEntry->pdRspConnCap - // || P2PSVC_CONN_CAP_BMP_CLI == pRspdorPDEntry->pdRspConnCap + //if(P2PSVC_CONN_CAP_BMP_GO == pRspdorPDEntry->pdRspConnCap + // || P2PSVC_CONN_CAP_BMP_CLI == pRspdorPDEntry->pdRspConnCap // ) - { + { P2PAttr_Make_ConfigTimeout(pBuf, pP2PInfo->GOConfigurationTimeout, pP2PInfo->ClientConfigurationTimeout); } // Listen-channel, NONE - + // Session-id-info, always present FrameBuf_Add_u1(pBuf, P2P_ATTR_SESSION_ID_INFO); FrameBuf_Add_le_u2(pBuf, 4 + 6); @@ -877,12 +877,12 @@ P2PSvc_MakeRspdorPDRspIE( // TODO: //4 Indicate P2P attrs sent - P2PSvc_IndicateFrameSent(pP2PSvcInfo, - P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_PD_RSP_SENT, - pRspdorPDEntry->super.peerDevAddr, - (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), + P2PSvc_IndicateFrameSent(pP2PSvcInfo, + P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_PD_RSP_SENT, + pRspdorPDEntry->super.peerDevAddr, + (u2Byte)(FrameBuf_Tail(pBuf) - 1 - pLen), pLen + 1); - + p2p_update_IeHdrLen(pBuf, pLen); }while(FALSE); @@ -957,7 +957,7 @@ P2PSvc_MakeSvcInfoDesc( CLEAR_FLAG(svcConfigMethod, P2P_WPS_CONFIG_METHODS_SVC_DEFAULT_PIN); } FrameBuf_Add_be_u2(pBuf, svcConfigMethod); - + // svc-name-len FrameBuf_Add_u1(pBuf, (u1Byte)pSvcNameObj->Length); @@ -972,7 +972,7 @@ P2PSvc_MakeSvcInfoDesc( { // svc-info-len FrameBuf_Add_le_u2(pBuf, (u2Byte)pSvcInfoObj->Length); - + // svc-info FrameBuf_Add_Data(pBuf, pSvcInfoObj->Value, (u2Byte)pSvcInfoObj->Length); } diff --git a/network/wlan/WDI/COMMON/P2PSvc_Internal.h b/network/wlan/WDI/COMMON/P2PSvc_Internal.h index b8e671989..435bd82b5 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_Internal.h +++ b/network/wlan/WDI/COMMON/P2PSvc_Internal.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2013 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: // P2P Service interface for internal implementation @@ -19,8 +19,8 @@ // -------------------------------- // P2PSvc_Internal.h // -------------------------------- -// ActionInfo, Construct, Object, ParamSpec, PD, SD, SearchResult,... -// +// ActionInfo, Construct, Object, ParamSpec, PD, SD, SearchResult,... +// // P2PSvcType.h is visible to all P2PSvc modules. // @@ -53,27 +53,27 @@ typedef struct _P2PSVC_INFO BOOLEAN bEnabled; RT_SPIN_LOCK lock; - // A list of P2PSVC_REQ_INFO_ENTRY each + // A list of P2PSVC_REQ_INFO_ENTRY each // representing an advertised service RT_LIST_ENTRY advSvcList; u4Byte advSvcListCnt; - // A list of P2PSVC_REQ_INFO_ENTRY each + // A list of P2PSVC_REQ_INFO_ENTRY each // representing a seek request RT_LIST_ENTRY seekReqList; u4Byte seekReqListCnt; - // A list of P2PSVC_SEARCH_RESULT_LIST_ENTRY each + // A list of P2PSVC_SEARCH_RESULT_LIST_ENTRY each // representing the search result of a device RT_LIST_ENTRY searchResultList; u4Byte searchResultListCnt; - // A list of P2PSVC_PD_ENTRY each + // A list of P2PSVC_PD_ENTRY each // representing a provision discovery session RT_LIST_ENTRY pdSessionList; u4Byte pdSessionListCnt; - // The SSID that will be used for starting + // The SSID that will be used for starting // P2P Group u1Byte goSsidBuf[32]; u1Byte goSsidLen; @@ -174,7 +174,7 @@ typedef struct _P2PSVC_PD_ENTRY // // If bDone, we have status from the last PD rsp, // and if the status is success, we have the topology, - // which records how we are going to connect with the + // which records how we are going to connect with the // peer dev. // BOOLEAN bDone; @@ -242,7 +242,7 @@ typedef struct _P2PSVC_RSPDOR_PD_ENTRY // FOPD info, valid if bDeferred is true u8Byte fopdRspRxTime; // time the rspdor recvs the FOPD rsp - P2P_STATUS_CODE fopdReqStatus; + P2P_STATUS_CODE fopdReqStatus; // the status to be sent in FOPD req u1Byte fopdReqConnCap; // the conn cap to be sent in FOPD req, valid only whe FOPD req status is success @@ -296,7 +296,7 @@ P2PSvc_FreeMem( RT_STATUS P2PSvc_GetAdvSvcByAdvId( - IN PP2PSVC_INFO pP2PSvcInfo, + IN PP2PSVC_INFO pP2PSvcInfo, IN u4Byte advId, OUT PP2PSVC_REQ_INFO_ENTRY *ppAdvSvcEntry ); @@ -596,7 +596,7 @@ P2PSvc_GetParamSpec( IN u4Byte actId ); -RT_STATUS +RT_STATUS P2PSvc_ValidateReqInfo( IN PVOID infoBuf, IN u4Byte inBufLen, @@ -665,15 +665,15 @@ P2PSvc_PDSessionInProgress( OUT PP2PSVC_PD_ENTRY *ppPDEntry ); -RT_STATUS +RT_STATUS P2PSvc_AddPDInitorData( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN PVOID infoBuf, IN u4Byte inBufLen, IN u4Byte outBufLen ); -RT_STATUS +RT_STATUS P2PSvc_AddPDRspdorData( IN PP2PSVC_INFO pP2PSvcInfo, IN pu1Byte devAddr, @@ -846,7 +846,7 @@ P2PSvc_SeekReqNeedSD( RT_STATUS P2PSvc_UpdateSearchResult( IN PP2PSVC_INFO pP2PSvcInfo, - IN u1Byte searchId, + IN u1Byte searchId, IN pu1Byte devAddr, IN PP2PSVC_SR_LIST_ENTRY pSREntryToUpdate, OUT PBOOLEAN pbDuplicatedEntry, @@ -856,8 +856,8 @@ P2PSvc_UpdateSearchResult( RT_STATUS P2PSvc_MakeSearchResultDataFromProbeRsp( IN PP2PSVC_INFO pP2PSvcInfo, - IN PP2PSVC_REQ_INFO_ENTRY pSeekInfoEntry, - IN pu1Byte devAddr, + IN PP2PSVC_REQ_INFO_ENTRY pSeekInfoEntry, + IN pu1Byte devAddr, IN POCTET_STRING posP2PAttrs, IN OCTET_STRING osAdvSvcInfo, OUT PP2PSVC_SR_LIST_ENTRY *ppSREntryOut @@ -889,9 +889,9 @@ P2PSvc_Free_SeekReqList( IN u1Byte seekId ); -RT_STATUS +RT_STATUS P2PSvc_Set_AdvSvc( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN PVOID infoBuf, IN u4Byte inBufLen, IN u4Byte outBufLen, @@ -900,7 +900,7 @@ P2PSvc_Set_AdvSvc( OUT pu4Byte pBytesNeeded ); -RT_STATUS +RT_STATUS P2PSvc_Set_CancelAdvSvc( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -909,9 +909,9 @@ P2PSvc_Set_CancelAdvSvc( OUT pu4Byte pBytesWritten, OUT pu4Byte pBytesRead, OUT pu4Byte pBytesNeeded - ); + ); -RT_STATUS +RT_STATUS P2PSvc_Set_SvcStatus( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -922,7 +922,7 @@ P2PSvc_Set_SvcStatus( OUT pu4Byte pBytesNeeded ); -RT_STATUS +RT_STATUS P2PSvc_Set_Seek( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -933,7 +933,7 @@ P2PSvc_Set_Seek( OUT pu4Byte pBytesNeeded ); -RT_STATUS +RT_STATUS P2PSvc_Set_CancelSeek( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -944,7 +944,7 @@ P2PSvc_Set_CancelSeek( OUT pu4Byte pBytesNeeded ); -RT_STATUS +RT_STATUS P2PSvc_Set_ConnCap( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -955,7 +955,7 @@ P2PSvc_Set_ConnCap( OUT pu4Byte pBytesNeeded ); -RT_STATUS +RT_STATUS P2PSvc_Set_PDReq( IN PADAPTER pAdapter, IN PVOID infoBuf, @@ -966,7 +966,7 @@ P2PSvc_Set_PDReq( OUT pu4Byte pBytesNeeded ); -RT_STATUS +RT_STATUS P2PSvc_Set_RspdorFOPDReq( IN PADAPTER pAdapter, IN PVOID infoBuf, diff --git a/network/wlan/WDI/COMMON/P2PSvc_Object.c b/network/wlan/WDI/COMMON/P2PSvc_Object.c index cfa5dafd6..bbacb2344 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_Object.c +++ b/network/wlan/WDI/COMMON/P2PSvc_Object.c @@ -25,7 +25,7 @@ p2psvc_AttachObjToObjList( ULONG bytesWritten = 0; PRT_OBJECT_HEADER pObjToFill = NULL; - + if(0 == pObjList->nObjs) { pObjList->ObjTab[0] = 0; @@ -41,17 +41,17 @@ p2psvc_AttachObjToObjList( } // Fill the obj - RT_ASSIGN_OBJECT_HEADER(pObjToFill, - type, - id, - ver, + RT_ASSIGN_OBJECT_HEADER(pObjToFill, + type, + id, + ver, len); if(0 < len) { PlatformMoveMemory(pObjToFill->Value, buf, len); } - + bytesWritten = RT_OBJECT_HEADER_SIZE + len; // Update obj list header @@ -77,16 +77,16 @@ P2PSvc_MakeObj( u4Byte bytesWritten = 0; do - { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + { + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - id, - P2PSVC_MIN_SUPPORT_VER, - bufLEn, + id, + P2PSVC_MIN_SUPPORT_VER, + bufLEn, pBuf); }while(FALSE); - - return bytesWritten; + + return bytesWritten; } u4Byte @@ -97,22 +97,22 @@ P2PSvc_MakeSvcDescObjList( { u4Byte bytesWritten = 0; P2PSVC_OBJ_LIST objList; - + do { PlatformZeroMemory(&objList, sizeof(objList)); - P2PSVC_OBJ_LIST_INIT(&objList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_DESC_LIST, + P2PSVC_OBJ_LIST_INIT(&objList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_DATA_SVC_DESC_LIST, P2PSVC_MIN_SUPPORT_VER); // p2psvc_AttachObjToObjList will make obj hdr for us, // so we copy from the fild right after the obj hdr. - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_DESC_LIST, - P2PSVC_MIN_SUPPORT_VER, - FIELD_OFFSET(P2PSVC_OBJ_LIST, varStart) - FIELD_OFFSET(RT_OBJECT_HEADER, Value), + P2PSVC_OBJ_HDR_ID_DATA_SVC_DESC_LIST, + P2PSVC_MIN_SUPPORT_VER, + FIELD_OFFSET(P2PSVC_OBJ_LIST, varStart) - FIELD_OFFSET(RT_OBJECT_HEADER, Value), (pu1Byte)(&objList) + FIELD_OFFSET(RT_OBJECT_HEADER, Value)); if(ppSvcDescObjList) @@ -120,7 +120,7 @@ P2PSvc_MakeSvcDescObjList( *ppSvcDescObjList = (PP2PSVC_OBJ_LIST)(pObjList->varStart + pObjList->ObjTab[pObjList->nObjs - 1]); } }while(FALSE); - + return bytesWritten; } @@ -138,15 +138,15 @@ P2PSvc_MakeTimeObj( u4Byte bytesWritten = 0; do - { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + { + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - paramId, - P2PSVC_MIN_SUPPORT_VER, - sizeof(time), + paramId, + P2PSVC_MIN_SUPPORT_VER, + sizeof(time), &time); }while(FALSE); - + return bytesWritten; } @@ -174,15 +174,15 @@ P2PSvc_MakeSearchIdObj( } if(pSearchId) *pSearchId = *((pu1Byte)pSearchIdObj->Value); - - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SEARCH_ID, - P2PSVC_MIN_SUPPORT_VER, - pSearchIdObj->Length, + P2PSVC_OBJ_HDR_ID_DATA_SEARCH_ID, + P2PSVC_MIN_SUPPORT_VER, + pSearchIdObj->Length, pSearchIdObj->Value); }while(FALSE); - + return bytesWritten; } @@ -198,10 +198,10 @@ P2PSvc_MakeDevAddrObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_DEV_ADDR, - P2PSVC_MIN_SUPPORT_VER, - 6, + P2PSVC_MIN_SUPPORT_VER, + 6, (NULL == pDevAddr) ? (bcstAddr) : (pDevAddr)); - + return bytesWritten; } @@ -220,11 +220,11 @@ P2PSvc_MakeDevNameObj_FromP2PAttrs( { break; } - - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_DEV_NAME, - P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MIN_SUPPORT_VER, osDevName.Length, osDevName.Octet); @@ -243,11 +243,11 @@ P2PSvc_MakeDevNameObj_FromDevNameOctet( u4Byte bytesWritten = 0; do - { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + { + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_DEV_NAME, - P2PSVC_MIN_SUPPORT_VER, + P2PSVC_MIN_SUPPORT_VER, osDevName.Length, osDevName.Octet); }while(FALSE); @@ -267,10 +267,10 @@ P2PSvc_MakeAdvIdObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_ADV_ID, - P2PSVC_MIN_SUPPORT_VER, - sizeof(advId), + P2PSVC_MIN_SUPPORT_VER, + sizeof(advId), &advId); - + return bytesWritten; } @@ -285,10 +285,10 @@ P2PSvc_MakeSessionIdObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_SESSION_ID, - P2PSVC_MIN_SUPPORT_VER, - sizeof(sessionId), + P2PSVC_MIN_SUPPORT_VER, + sizeof(sessionId), &sessionId); - + return bytesWritten; } @@ -307,14 +307,14 @@ P2PSvc_MakeSvcNameObj( // it is upper's responsibility to translate // it to other format (e.g., UTF-16). - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME, - P2PSVC_MIN_SUPPORT_VER, - svcNameBufLen, + P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME, + P2PSVC_MIN_SUPPORT_VER, + svcNameBufLen, pSvcNameBuf); }while(FALSE); - + return bytesWritten; } @@ -329,14 +329,14 @@ P2PSvc_MakeSvcInfoObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_INFO, - P2PSVC_MIN_SUPPORT_VER, - svcInfoBufLen, + P2PSVC_OBJ_HDR_ID_DATA_SVC_INFO, + P2PSVC_MIN_SUPPORT_VER, + svcInfoBufLen, pSvcInfoBuf); }while(FALSE); - + return bytesWritten; } @@ -350,14 +350,14 @@ P2PSvc_MakeAutoAcceptObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_AUTO_ACCEPT, - P2PSVC_MIN_SUPPORT_VER, - sizeof(bAutoAccept), + P2PSVC_OBJ_HDR_ID_DATA_SVC_AUTO_ACCEPT, + P2PSVC_MIN_SUPPORT_VER, + sizeof(bAutoAccept), &bAutoAccept); }while(FALSE); - + return bytesWritten; } @@ -371,14 +371,14 @@ P2PSvc_MakeSvcStatusObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_STATUS, - P2PSVC_MIN_SUPPORT_VER, - 1, + P2PSVC_OBJ_HDR_ID_DATA_SVC_STATUS, + P2PSVC_MIN_SUPPORT_VER, + 1, &svcStatus); }while(FALSE); - + return bytesWritten; } @@ -392,14 +392,14 @@ P2PSvc_MakeUserAcceptedObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_USER_ACCEPTED, - P2PSVC_MIN_SUPPORT_VER, - sizeof(bUserAccepted), + P2PSVC_OBJ_HDR_ID_DATA_USER_ACCEPTED, + P2PSVC_MIN_SUPPORT_VER, + sizeof(bUserAccepted), &bUserAccepted); }while(FALSE); - + return bytesWritten; } @@ -413,14 +413,14 @@ P2PSvc_MakeSvcCountObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SVC_COUNT, - P2PSVC_MIN_SUPPORT_VER, - sizeof(svcCount), + P2PSVC_OBJ_HDR_ID_DATA_SVC_COUNT, + P2PSVC_MIN_SUPPORT_VER, + sizeof(svcCount), &svcCount); }while(FALSE); - + return bytesWritten; } @@ -434,14 +434,14 @@ P2PSvc_MakeP2PStatusObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_P2P_STATUS, - P2PSVC_MIN_SUPPORT_VER, - sizeof(P2PStatus), + P2PSVC_OBJ_HDR_ID_DATA_P2P_STATUS, + P2PSVC_MIN_SUPPORT_VER, + sizeof(P2PStatus), &P2PStatus); }while(FALSE); - + return bytesWritten; } @@ -456,14 +456,14 @@ P2PSvc_MakeSsidObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SSID, - P2PSVC_MIN_SUPPORT_VER, - ssidLen, + P2PSVC_OBJ_HDR_ID_DATA_SSID, + P2PSVC_MIN_SUPPORT_VER, + ssidLen, ssidBuf); }while(FALSE); - + return bytesWritten; } @@ -477,14 +477,14 @@ P2PSvc_MakeIntfAddrObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_INTF_ADDR, - P2PSVC_MIN_SUPPORT_VER, - 6, + P2PSVC_OBJ_HDR_ID_DATA_INTF_ADDR, + P2PSVC_MIN_SUPPORT_VER, + 6, intfAddr); }while(FALSE); - + return bytesWritten; } @@ -498,14 +498,14 @@ P2PSvc_MakeOpChannelObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_OP_CHNL, - P2PSVC_MIN_SUPPORT_VER, - sizeof(opChannel), + P2PSVC_OBJ_HDR_ID_DATA_OP_CHNL, + P2PSVC_MIN_SUPPORT_VER, + sizeof(opChannel), &opChannel); }while(FALSE); - + return bytesWritten; } @@ -519,14 +519,14 @@ P2PSvc_MakeConfigMethodObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_CONFIG_METHOD, - P2PSVC_MIN_SUPPORT_VER, - sizeof(configMethod), + P2PSVC_OBJ_HDR_ID_DATA_CONFIG_METHOD, + P2PSVC_MIN_SUPPORT_VER, + sizeof(configMethod), &configMethod); }while(FALSE); - + return bytesWritten; } @@ -541,14 +541,14 @@ P2PSvc_MakeP2PAttrsObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_P2P_ATTRIBUTES, - P2PSVC_MIN_SUPPORT_VER, - attrLen, + P2PSVC_OBJ_HDR_ID_DATA_P2P_ATTRIBUTES, + P2PSVC_MIN_SUPPORT_VER, + attrLen, pAttrs); }while(FALSE); - + return bytesWritten; } @@ -563,10 +563,10 @@ P2PSvc_MakeDeferredObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_DEFERRED, - P2PSVC_MIN_SUPPORT_VER, - sizeof(bDeferred), + P2PSVC_MIN_SUPPORT_VER, + sizeof(bDeferred), &bDeferred); - + return bytesWritten; } @@ -581,10 +581,10 @@ P2PSvc_MakeIsSDDoneObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_IS_SD_DONE, - P2PSVC_MIN_SUPPORT_VER, - sizeof(bSDDone), + P2PSVC_MIN_SUPPORT_VER, + sizeof(bSDDone), &bSDDone); - + return bytesWritten; } @@ -599,10 +599,10 @@ P2PSvc_MakeIsPersistentObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_IS_PERSISTENT, - P2PSVC_MIN_SUPPORT_VER, - sizeof(bPersistent), + P2PSVC_MIN_SUPPORT_VER, + sizeof(bPersistent), &bPersistent); - + return bytesWritten; } @@ -616,35 +616,35 @@ P2PSvc_MakeConnActionObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_CONN_ACTION, - P2PSVC_MIN_SUPPORT_VER, - sizeof(connAction), + P2PSVC_OBJ_HDR_ID_DATA_CONN_ACTION, + P2PSVC_MIN_SUPPORT_VER, + sizeof(connAction), &connAction); }while(FALSE); - + return bytesWritten; } u4Byte P2PSvc_MakeReasonObj( IN PP2PSVC_OBJ_LIST pObjList, - IN P2PSVC_REASON reason + IN P2PSVC_REASON reason ) { u4Byte bytesWritten = 0; do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_REASON, - P2PSVC_MIN_SUPPORT_VER, - sizeof(reason), + P2PSVC_OBJ_HDR_ID_DATA_REASON, + P2PSVC_MIN_SUPPORT_VER, + sizeof(reason), &reason); }while(FALSE); - + return bytesWritten; } @@ -658,14 +658,14 @@ P2PSvc_MakeSessionInfoDataInfoObj( do { - bytesWritten = p2psvc_AttachObjToObjList(pObjList, + bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_DATA_SESSION_INFO, - P2PSVC_MIN_SUPPORT_VER, - osSessionInfoDataInfo.Length, + P2PSVC_OBJ_HDR_ID_DATA_SESSION_INFO, + P2PSVC_MIN_SUPPORT_VER, + osSessionInfoDataInfo.Length, osSessionInfoDataInfo.Octet); }while(FALSE); - + return bytesWritten; } @@ -680,10 +680,10 @@ P2PSvc_MakeGrpDevAddrObj( bytesWritten = p2psvc_AttachObjToObjList(pObjList, RT_OB_HDR_TYPE_DATA, P2PSVC_OBJ_HDR_ID_DATA_GRP_DEV_ADDR, - P2PSVC_MIN_SUPPORT_VER, - 6, + P2PSVC_MIN_SUPPORT_VER, + 6, pGrpDevAddr); - + return bytesWritten; } diff --git a/network/wlan/WDI/COMMON/P2PSvc_PD.c b/network/wlan/WDI/COMMON/P2PSvc_PD.c index c47d9fe0f..607d6e750 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_PD.c +++ b/network/wlan/WDI/COMMON/P2PSvc_PD.c @@ -5,7 +5,7 @@ #if (P2P_SUPPORT == 1) #if (P2PSVC_SUPPORT == 1) -static P2PSVC_CONN_CAP_MAP_ENTRY P2PSvcConnCapMap[] = +static P2PSVC_CONN_CAP_MAP_ENTRY P2PSvcConnCapMap[] = { // requesting NEW { @@ -57,21 +57,21 @@ static P2PSVC_CONN_CAP_MAP_ENTRY P2PSvcConnCapMap[] = P2PSVC_CONN_CAP_BMP_NONE, // X "ERROR:Do not support Cli/Cli" }, - + { P2PSVC_CONN_CAP_BMP_CLI, P2PSVC_CONN_CAP_BMP_GO, // we have existing group P2PSVC_CONN_CAP_BMP_GO, // initor shall join the existing group "Peer shall join our existing group" }, - + { P2PSVC_CONN_CAP_BMP_CLI, // initor can be either GO or Cli P2PSVC_CONN_CAP_BMP_NEW | P2PSVC_CONN_CAP_BMP_GO, // we have existing grpup P2PSVC_CONN_CAP_BMP_GO, // initor shall join the existing group "Peer shall join our existing group" }, - + { P2PSVC_CONN_CAP_BMP_CLI, // initor can be either GO or Cli P2PSVC_CONN_CAP_BMP_CLI | P2PSVC_CONN_CAP_BMP_GO, // we have existing grpup and can join a group @@ -214,7 +214,7 @@ p2psvc_GetP2PStatusFromAttrs( { break; } - + if(osStatus.Octet != NULL) p2pStatus = (P2P_STATUS_CODE)(*(pu1Byte)osStatus.Octet); } @@ -237,7 +237,7 @@ p2psvc_GetConnCapFromAttrs( { break; } - + if(osConnCap.Octet != NULL) connCap = *(pu1Byte)osConnCap.Octet; }while(FALSE); @@ -289,7 +289,7 @@ p2psvc_GetGroupInfoFromP2PAttrs( // group id, [grpDevAddr(6), grpSsid(n)] if(!P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_GROUP_ID, 6 + 1, &osGrpId)) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no P2P GroupID attr (ID: %u) in PD req/rsp\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no P2P GroupID attr (ID: %u) in PD req/rsp\n", P2P_ATTR_GROUP_ID)); *pBadReason = P2PSVC_REASON_MISS_ATTR_GRP_ID; rtStatus = RT_STATUS_INVALID_DATA; @@ -299,7 +299,7 @@ p2psvc_GetGroupInfoFromP2PAttrs( // intended intf addr if(!P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_INTENDED_INTERFACE_ADDRESS, 6, &osIntfAddr)) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no P2P IntfAddr attr (ID: %u) in PD req/rsp\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no P2P IntfAddr attr (ID: %u) in PD req/rsp\n", P2P_ATTR_INTENDED_INTERFACE_ADDRESS)); *pBadReason = P2PSVC_REASON_MISS_ATTR_INTF_ADDR; rtStatus = RT_STATUS_INVALID_DATA; @@ -309,7 +309,7 @@ p2psvc_GetGroupInfoFromP2PAttrs( // op channel, [countryStr(3), regClass(1), chnl(1)] if(!P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_OP_CHANNEL, 3 + 1 + 1, &osOpChnl)) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no P2P OpChannel attr (ID: %u) in PD req/rsp\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] no P2P OpChannel attr (ID: %u) in PD req/rsp\n", P2P_ATTR_OP_CHANNEL)); *pBadReason = P2PSVC_REASON_MISS_ATTR_OP_CHNL; rtStatus = RT_STATUS_INVALID_DATA; @@ -326,7 +326,7 @@ p2psvc_GetGroupInfoFromP2PAttrs( *((pu1Byte)(osOpChnl.Octet + 3 + 1)), // opChnl pGrpInfo); } - + }while(FALSE); return rtStatus; @@ -345,7 +345,7 @@ p2psvc_Init_PDSessionInfo( ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(pP2PSvcInfo->pAdapter); - + PlatformZeroMemory(pPDEntry, sizeof(P2PSVC_PD_ENTRY)); RTInitializeListHead(&pPDEntry->List); @@ -369,17 +369,17 @@ p2psvc_Init_PDSessionInfo( { UCHAR ssidBuf[32] = {0}; UCHAR ssidLen = 0; - + P2PSvc_DeterminePDSessionGOSsid(pP2PSvcInfo, ssidBuf, &ssidLen); - - p2psvc_FillGroupInfo(pP2PInfo->DeviceAddress, - pP2PInfo->InterfaceAddress, - ssidLen, - ssidBuf, - pP2PInfo->OperatingChannel, + + p2psvc_FillGroupInfo(pP2PInfo->DeviceAddress, + pP2PInfo->InterfaceAddress, + ssidLen, + ssidBuf, + pP2PInfo->OperatingChannel, &pPDEntry->selfGrpInfo); } - + return; } @@ -415,7 +415,7 @@ p2psvc_New_InitorPDSessionInfo( do { PRT_OBJECT_HEADER pObj = NULL; - + u4Byte sessionId = 0; pu1Byte peerDevAddr = NULL; u4Byte advId = 0; @@ -445,11 +445,11 @@ p2psvc_New_InitorPDSessionInfo( //4 Init base class p2psvc_Init_PDSessionInfo(pP2PSvcInfo, - &pEntry->super, - TRUE, - sessionId, - peerDevAddr, - advId, + &pEntry->super, + TRUE, + sessionId, + peerDevAddr, + advId, pP2PSvcInfo->connCap, pP2PSvcInfo->connCap); @@ -481,7 +481,7 @@ p2psvc_Del_InitorPDSessionEntry( objListLen = P2PSVC_OBJ_LIST_LEN(&pInitorPDEntry->objList); totalLen = FIELD_OFFSET(P2PSVC_INITOR_PD_ENTRY, objList) + objListLen; - + P2PSvc_FreeMem(pInitorPDEntry, totalLen); } @@ -525,17 +525,17 @@ p2psvc_New_RspdorPDSessionInfo( pAutoAcceptObj = P2PSvc_GetParam(&pAdvSvcInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_SVC_AUTO_ACCEPT, 0); pSvcStatusObj = P2PSvc_GetParam(&pAdvSvcInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_SVC_STATUS, 0); pAdvIdObj = P2PSvc_GetParam(&pAdvSvcInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_ADV_ID, 0); - + if(NULL == pSvcNameObj || NULL == pAutoAcceptObj || NULL == pSvcStatusObj || NULL == pAdvIdObj ) { - rtStatus = RT_STATUS_INVALID_DATA; + rtStatus = RT_STATUS_INVALID_DATA; break; } - + //4 Get info form peer PD req // Get peer connCap @@ -578,7 +578,7 @@ p2psvc_New_RspdorPDSessionInfo( reqBufSize += (RT_OBJECT_HEADER_SIZE + 2); // peer config method reqBufSize += (RT_OBJECT_HEADER_SIZE + posPDReqP2PAttrs->Length); // P2P attrs in the PD req reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(BOOLEAN)); // bDeferred - + //4 Alloc mem if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pEntry, reqBufSize))) { @@ -631,9 +631,9 @@ p2psvc_New_RspdorPDSessionInfo( pEntry->fopdRspStatus = P2P_STATUS_MAX; pEntry->fopdRspConnCap = 0; - P2PSVC_OBJ_LIST_INIT(&pEntry->objList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_ON_PD_REQ, + P2PSVC_OBJ_LIST_INIT(&pEntry->objList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_ON_PD_REQ, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeUserAcceptedObj(&pEntry->objList, FALSE); @@ -669,11 +669,11 @@ p2psvc_Del_RspdorPDSessionEntry( objListLen = P2PSVC_OBJ_LIST_LEN(&pRspdorPDEntry->objList); totalLen = FIELD_OFFSET(P2PSVC_RSPDOR_PD_ENTRY, objList) + objListLen; - + P2PSvc_FreeMem(pRspdorPDEntry, totalLen); } -RT_STATUS +RT_STATUS p2psvc_GetPDRequestedSvc( IN PP2PSVC_INFO pP2PSvcInfo, IN POCTET_STRING posP2PAttrs, @@ -688,7 +688,7 @@ p2psvc_GetPDRequestedSvc( OCTET_STRING osAdvId = {NULL, 0}; u4Byte peerReqAdvId = 0; PP2PSVC_REQ_INFO_ENTRY pAdvSvcEntry = NULL; - + // Get peer requested adv-id if(!P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_ADV_ID_INFO, 4 + 6, &osAdvId)) { @@ -698,10 +698,10 @@ p2psvc_GetPDRequestedSvc( if(osAdvId.Octet != NULL) peerReqAdvId = *((pu4Byte)osAdvId.Octet); - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_GetAdvSvcByAdvId(pP2PSvcInfo, peerReqAdvId, &pAdvSvcEntry))) { - break; + break; } if(ppInfoEntry) *ppInfoEntry = pAdvSvcEntry; @@ -712,7 +712,7 @@ p2psvc_GetPDRequestedSvc( return rtStatus; } -BOOLEAN +BOOLEAN p2psvc_GetAdvSvcAvailability( IN PP2PSVC_INFO pP2PSvcInfo, IN PP2PSVC_REQ_INFO_ENTRY pInfoEntry @@ -740,7 +740,7 @@ p2psvc_GetAdvSvcAvailability( } break; - + }while(FALSE); return bAvailable; @@ -769,7 +769,7 @@ p2psvc_MatchAdvId( RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "posP2PAttrs:\n", posP2PAttrs->Octet, posP2PAttrs->Length); break; } - + if (osAdvId.Octet != NULL) { peerAdvId = *(pu4Byte)osAdvId.Octet; @@ -810,7 +810,7 @@ p2psvc_IndicateRxBadPD( { u4Byte indicId = 0; PP2PSVC_OBJ_LIST pObjList = NULL; - + if(bInitor) { indicId = (bReq) @@ -829,7 +829,7 @@ p2psvc_IndicateRxBadPD( reqBufSize += (RT_OBJECT_HEADER_SIZE + 6); // peer dev-addr reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(P2PSVC_REASON)); // PDRsp status code reqBufSize += (RT_OBJECT_HEADER_SIZE + posP2PAttrs->Length); // P2P attrs in PD rsp - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuf\n")); @@ -837,20 +837,20 @@ p2psvc_IndicateRxBadPD( } PlatformZeroMemory(pBuf, reqBufSize); - + pObjList = (PP2PSVC_OBJ_LIST)pBuf; // Fill obj list - P2PSVC_OBJ_LIST_INIT(pObjList, - RT_OB_HDR_TYPE_DATA, - indicId, + P2PSVC_OBJ_LIST_INIT(pObjList, + RT_OB_HDR_TYPE_DATA, + indicId, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeDevAddrObj(pObjList, pPeerDevAddr); P2PSvc_MakeReasonObj(pObjList, reason); P2PSvc_MakeP2PAttrsObj(pObjList, posP2PAttrs->Length, posP2PAttrs->Octet); - - P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); + + P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); }while(FALSE); if(pBuf) P2PSvc_FreeMem(pBuf, reqBufSize); @@ -900,7 +900,7 @@ p2psvc_IndicateInitorOnPDRsp( reqBufSize += (RT_OBJECT_HEADER_SIZE + posP2PAttrs->Length); // P2P attrs in PD rsp reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(u4Byte)); // session-id reqBufSize += (RT_OBJECT_HEADER_SIZE + osDevName.Length); // dev-name - + if(P2P_STATUS_SUCCESS == pInitorPDEntry->super.status) { reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(BOOLEAN)); // bPersistent @@ -910,7 +910,7 @@ p2psvc_IndicateInitorOnPDRsp( reqBufSize += (RT_OBJECT_HEADER_SIZE + pConnTopology->grpInfo.ssidLen); // SSID reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(u1Byte)); // opChnl } - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuf\n")); @@ -918,13 +918,13 @@ p2psvc_IndicateInitorOnPDRsp( } PlatformZeroMemory(pBuf, reqBufSize); - + pObjList = (PP2PSVC_OBJ_LIST)pBuf; // Fill obj list - P2PSVC_OBJ_LIST_INIT(pObjList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_INDIC_INITOR_ON_PD_RSP, + P2PSVC_OBJ_LIST_INIT(pObjList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_INDIC_INITOR_ON_PD_RSP, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeDevAddrObj(pObjList, pInitorPDEntry->super.peerDevAddr); @@ -934,7 +934,7 @@ p2psvc_IndicateInitorOnPDRsp( P2PSvc_MakeP2PAttrsObj(pObjList, posP2PAttrs->Length, posP2PAttrs->Octet); P2PSvc_MakeSessionIdObj(pObjList, pPDEntry->sessionId); P2PSvc_MakeDevNameObj_FromDevNameOctet(pObjList, osDevName); - + if(P2P_STATUS_SUCCESS == pInitorPDEntry->super.status) { P2PSvc_MakeIsPersistentObj(pObjList, pConnTopology->bPersistent); @@ -944,8 +944,8 @@ p2psvc_IndicateInitorOnPDRsp( P2PSvc_MakeSsidObj(pObjList, pConnTopology->grpInfo.ssidLen, pConnTopology->grpInfo.ssidBuf); P2PSvc_MakeOpChannelObj(pObjList, pConnTopology->grpInfo.opChnl); } - - P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); + + P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); }while(FALSE); if(pBuf) P2PSvc_FreeMem(pBuf, reqBufSize); @@ -994,7 +994,7 @@ p2psvc_IndicateInitorOnFOPDReq( reqBufSize += (RT_OBJECT_HEADER_SIZE + 2); // config method in PD req reqBufSize += (RT_OBJECT_HEADER_SIZE + posP2PAttrs->Length); // P2P attrs in FOPD req reqBufSize += (RT_OBJECT_HEADER_SIZE + osDevName.Length); // dev-name - + if(P2P_STATUS_SUCCESS == pInitorPDEntry->super.status) { reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(BOOLEAN)); // bPersistent @@ -1004,7 +1004,7 @@ p2psvc_IndicateInitorOnFOPDReq( reqBufSize += (RT_OBJECT_HEADER_SIZE + pConnTopology->grpInfo.ssidLen); // SSID reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(u1Byte)); // opChnl } - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuf\n")); @@ -1012,7 +1012,7 @@ p2psvc_IndicateInitorOnFOPDReq( } PlatformZeroMemory(pBuf, reqBufSize); - + pObjList = (PP2PSVC_OBJ_LIST)pBuf; // Prefast warning @@ -1020,9 +1020,9 @@ p2psvc_IndicateInitorOnFOPDReq( RT_ASSERT(pInitorPDEntry->super.bDeferred, ("%s(): initor recv PD req but bDeferred is not set\n")); // Fill obj list - P2PSVC_OBJ_LIST_INIT(pObjList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_INDIC_INITOR_ON_FOPD_REQ, + P2PSVC_OBJ_LIST_INIT(pObjList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_INDIC_INITOR_ON_FOPD_REQ, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeDevAddrObj(pObjList, pInitorPDEntry->super.peerDevAddr); @@ -1042,9 +1042,9 @@ p2psvc_IndicateInitorOnFOPDReq( P2PSvc_MakeSsidObj(pObjList, pConnTopology->grpInfo.ssidLen, pConnTopology->grpInfo.ssidBuf); P2PSvc_MakeOpChannelObj(pObjList, pConnTopology->grpInfo.opChnl); } - + P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); - + }while(FALSE); if(pBuf) P2PSvc_FreeMem(pBuf, reqBufSize); @@ -1085,7 +1085,7 @@ p2psvc_IndicateRspdorOnFOPDRsp( reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(BOOLEAN)); // bDeferred reqBufSize += (RT_OBJECT_HEADER_SIZE + 2); // config method from the intial PD req reqBufSize += (RT_OBJECT_HEADER_SIZE + posP2PAttrs->Length); // P2P attrs in FOPD rsp - + if(P2P_STATUS_SUCCESS == pRspdorPDEntry->super.status) { reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(BOOLEAN)); // bPersistent @@ -1095,7 +1095,7 @@ p2psvc_IndicateRspdorOnFOPDRsp( reqBufSize += (RT_OBJECT_HEADER_SIZE + pConnTopology->grpInfo.ssidLen); // SSID reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(u1Byte)); // opChnl } - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuf\n")); @@ -1105,15 +1105,15 @@ p2psvc_IndicateRspdorOnFOPDRsp( PlatformZeroMemory(pBuf, reqBufSize); pObjList = (PP2PSVC_OBJ_LIST)pBuf; - + // Prefast warning #pragma warning( disable:6063 ) RT_ASSERT(pRspdorPDEntry->super.bDeferred, ("%s(): rspdor recv PD rsp but bDeferred is not set\n")); // Fill obj list - P2PSVC_OBJ_LIST_INIT(pObjList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_ON_FOPD_RSP, + P2PSVC_OBJ_LIST_INIT(pObjList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_ON_FOPD_RSP, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeDevAddrObj(pObjList, pRspdorPDEntry->super.peerDevAddr); @@ -1121,7 +1121,7 @@ p2psvc_IndicateRspdorOnFOPDRsp( P2PSvc_MakeConfigMethodObj(pObjList, pRspdorPDEntry->configMethod); P2PSvc_MakeDeferredObj(pObjList, pRspdorPDEntry->super.bDeferred); P2PSvc_MakeP2PAttrsObj(pObjList, posP2PAttrs->Length, posP2PAttrs->Octet); - + if(P2P_STATUS_SUCCESS == pRspdorPDEntry->super.status) { P2PSvc_MakeIsPersistentObj(pObjList, pConnTopology->bPersistent); @@ -1131,7 +1131,7 @@ p2psvc_IndicateRspdorOnFOPDRsp( P2PSvc_MakeSsidObj(pObjList, pConnTopology->grpInfo.ssidLen, pConnTopology->grpInfo.ssidBuf); P2PSvc_MakeOpChannelObj(pObjList, pConnTopology->grpInfo.opChnl); } - + P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); }while(FALSE); @@ -1176,7 +1176,7 @@ p2psvc_IndicateRspdorOnPDReq( { FillOctetString(osDevName, NULL, 0); } - + // Eval size of buf required reqBufSize = 0; reqBufSize += P2PSVC_OBJ_LIST_LEN(&pRspdorPDEntry->objList); @@ -1187,7 +1187,7 @@ p2psvc_IndicateRspdorOnPDReq( reqBufSize += (RT_OBJECT_HEADER_SIZE + 6); // sessionMac reqBufSize += (RT_OBJECT_HEADER_SIZE + osSessionInfoDataInfo.Length); // session-info-data-info reqBufSize += (RT_OBJECT_HEADER_SIZE + osDevName.Length); // dev-name - + if(P2P_STATUS_SUCCESS == pRspdorPDEntry->super.status) { reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(BOOLEAN)); // bPersistent @@ -1197,7 +1197,7 @@ p2psvc_IndicateRspdorOnPDReq( reqBufSize += (RT_OBJECT_HEADER_SIZE + pConnTopology->grpInfo.ssidLen); // SSID reqBufSize += (RT_OBJECT_HEADER_SIZE + sizeof(u1Byte)); // opChnl } - + // Alloc mem if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { @@ -1221,7 +1221,7 @@ p2psvc_IndicateRspdorOnPDReq( P2PSvc_MakeDevAddrObj(pObjList, pRspdorPDEntry->super.peerDevAddr); P2PSvc_MakeSessionInfoDataInfoObj(pObjList, osSessionInfoDataInfo); P2PSvc_MakeDevNameObj_FromDevNameOctet(pObjList, osDevName); - + if(P2P_STATUS_SUCCESS == pRspdorPDEntry->super.status) { P2PSvc_MakeIsPersistentObj(pObjList, pConnTopology->bPersistent); @@ -1235,7 +1235,7 @@ p2psvc_IndicateRspdorOnPDReq( if(P2P_STATUS_SUCCESS != (rtStatus = P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pObjList))) { break; - + } }while(FALSE); @@ -1316,7 +1316,7 @@ p2psvc_ValidateConnCapComination( }while(FALSE); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("reqConnCap: %u, rspConnCap: %u, bValid: %u\n", + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("reqConnCap: %u, rspConnCap: %u, bValid: %u\n", reqConnCap, rspConnCap, bValid)); return bValid; @@ -1330,7 +1330,7 @@ p2psvc_IsWscPinCollector( BOOLEAN bWscPinCollector = FALSE; RT_ASSERT(pPDEntry->bDone, ("%s(): try to determine WSC PIN collector when PD is not yet done\n", __FUNCTION__)); - + do { if(pPDEntry->bInitor) @@ -1358,7 +1358,7 @@ p2psvc_IsWfdsDefaultPinUsed( BOOLEAN bWfdsDefaultPinUsed = FALSE; RT_ASSERT(pPDEntry->bDone, ("%s(): try to determine WSC PIN collector when PD is not yet done\n", __FUNCTION__)); - + do { if(pPDEntry->bInitor) @@ -1400,13 +1400,13 @@ p2psvc_AccessTopology_InitorImmediate( // pPDEntry->connTopology.bInitor = TRUE; - + switch(pPDEntry->connCap) { default: rtStatus = RT_STATUS_INVALID_DATA; break; - + case P2PSVC_CONN_CAP_BMP_NEW: // Peer agreed to form a new group pPDEntry->connTopology.bPersistent = FALSE; @@ -1421,7 +1421,7 @@ p2psvc_AccessTopology_InitorImmediate( { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_WAIT_NEGO; } - + break; case P2PSVC_CONN_CAP_BMP_CLI: @@ -1442,11 +1442,11 @@ p2psvc_AccessTopology_InitorImmediate( {// start auto GO pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_AUTO_GO; - p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, - pPDEntry->selfGrpInfo.grpIntfAddr, - pPDEntry->selfGrpInfo.ssidLen, - pPDEntry->selfGrpInfo.ssidBuf, - pPDEntry->selfGrpInfo.opChnl, + p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, + pPDEntry->selfGrpInfo.grpIntfAddr, + pPDEntry->selfGrpInfo.ssidLen, + pPDEntry->selfGrpInfo.ssidBuf, + pPDEntry->selfGrpInfo.opChnl, &pPDEntry->connTopology.grpInfo); } else @@ -1455,7 +1455,7 @@ p2psvc_AccessTopology_InitorImmediate( rtStatus = RT_STATUS_INVALID_DATA; break; } - + break; case P2PSVC_CONN_CAP_BMP_GO: @@ -1475,11 +1475,11 @@ p2psvc_AccessTopology_InitorImmediate( rtStatus = RT_STATUS_INVALID_DATA; break; } - + break; } - if(RT_STATUS_SUCCESS != rtStatus) + if(RT_STATUS_SUCCESS != rtStatus) { break; } @@ -1518,7 +1518,7 @@ p2psvc_AccessTopology_InitorDeferred( default: rtStatus = RT_STATUS_INVALID_DATA; break; - + case P2PSVC_CONN_CAP_BMP_NEW: // To form a new group pPDEntry->connTopology.bPersistent = FALSE; @@ -1530,11 +1530,11 @@ p2psvc_AccessTopology_InitorDeferred( { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_WAIT_NEGO; } - else + else { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_INIT_NEGO; } - + break; case P2PSVC_CONN_CAP_BMP_CLI: @@ -1560,17 +1560,17 @@ p2psvc_AccessTopology_InitorDeferred( pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_AUTO_GO; } - p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, - pPDEntry->selfGrpInfo.grpIntfAddr, - pPDEntry->selfGrpInfo.ssidLen, - pPDEntry->selfGrpInfo.ssidBuf, - pPDEntry->selfGrpInfo.opChnl, + p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, + pPDEntry->selfGrpInfo.grpIntfAddr, + pPDEntry->selfGrpInfo.ssidLen, + pPDEntry->selfGrpInfo.ssidBuf, + pPDEntry->selfGrpInfo.opChnl, &pPDEntry->connTopology.grpInfo); - + break; } - if(RT_STATUS_SUCCESS != rtStatus) + if(RT_STATUS_SUCCESS != rtStatus) { break; } @@ -1602,13 +1602,13 @@ p2psvc_AccessTopology_RspdorImmediate( // from self PD rsp, the P2P attrs are also from PD req. // RT_TRACE_F(COMP_P2P, DBG_LOUD, ("pdRspConnCap: %u\n", pRspdorPDEntry->pdRspConnCap)); - + switch(pRspdorPDEntry->pdRspConnCap) { default: rtStatus = RT_STATUS_INVALID_DATA; break; - + case P2PSVC_CONN_CAP_BMP_NEW: // To form a new group pPDEntry->connTopology.bPersistent = FALSE; @@ -1620,11 +1620,11 @@ p2psvc_AccessTopology_RspdorImmediate( { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_WAIT_NEGO; } - else + else { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_INIT_NEGO; } - + break; case P2PSVC_CONN_CAP_BMP_CLI: @@ -1649,17 +1649,17 @@ p2psvc_AccessTopology_RspdorImmediate( pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_AUTO_GO; } - p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, - pPDEntry->selfGrpInfo.grpIntfAddr, - pPDEntry->selfGrpInfo.ssidLen, - pPDEntry->selfGrpInfo.ssidBuf, - pPDEntry->selfGrpInfo.opChnl, + p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, + pPDEntry->selfGrpInfo.grpIntfAddr, + pPDEntry->selfGrpInfo.ssidLen, + pPDEntry->selfGrpInfo.ssidBuf, + pPDEntry->selfGrpInfo.opChnl, &pPDEntry->connTopology.grpInfo); - + break; } - if(RT_STATUS_SUCCESS != rtStatus) + if(RT_STATUS_SUCCESS != rtStatus) { break; } @@ -1698,7 +1698,7 @@ p2psvc_AccessTopology_RspdorDeferred( default: rtStatus = RT_STATUS_INVALID_DATA; break; - + case P2PSVC_CONN_CAP_BMP_NEW: // Peer agreed to form a new group pPDEntry->connTopology.bPersistent = FALSE; @@ -1710,11 +1710,11 @@ p2psvc_AccessTopology_RspdorDeferred( { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_INIT_NEGO; } - else + else { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_WAIT_NEGO; } - + break; case P2PSVC_CONN_CAP_BMP_CLI: @@ -1733,11 +1733,11 @@ p2psvc_AccessTopology_RspdorDeferred( { pPDEntry->connTopology.connAction = P2PSVC_CONN_METHOD_AUTO_GO; - p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, - pPDEntry->selfGrpInfo.grpIntfAddr, - pPDEntry->selfGrpInfo.ssidLen, - pPDEntry->selfGrpInfo.ssidBuf, - pPDEntry->selfGrpInfo.opChnl, + p2psvc_FillGroupInfo(pPDEntry->selfGrpInfo.grpDevAddr, + pPDEntry->selfGrpInfo.grpIntfAddr, + pPDEntry->selfGrpInfo.ssidLen, + pPDEntry->selfGrpInfo.ssidBuf, + pPDEntry->selfGrpInfo.opChnl, &pPDEntry->connTopology.grpInfo); } else @@ -1746,7 +1746,7 @@ p2psvc_AccessTopology_RspdorDeferred( rtStatus = RT_STATUS_INVALID_DATA; break; } - + break; case P2PSVC_CONN_CAP_BMP_GO: @@ -1760,7 +1760,7 @@ p2psvc_AccessTopology_RspdorDeferred( break; } - if(RT_STATUS_SUCCESS != rtStatus) + if(RT_STATUS_SUCCESS != rtStatus) { break; } @@ -1810,7 +1810,7 @@ p2psvc_AccessConnectability( { reqConnCap = pPDEntry->pdReqConnCap; } - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("req: %u, self: %u\n", reqConnCap, selfConnCap)); if(0 == reqConnCap) @@ -1818,8 +1818,8 @@ p2psvc_AccessConnectability( break; } - for(connCapMapIdx = 0, pConnCapEntry = NULL; - P2PSVC_CONN_CAP_BMP_NONE != P2PSvcConnCapMap[connCapMapIdx].reqConnCap; + for(connCapMapIdx = 0, pConnCapEntry = NULL; + P2PSVC_CONN_CAP_BMP_NONE != P2PSvcConnCapMap[connCapMapIdx].reqConnCap; connCapMapIdx++ ) { @@ -1828,7 +1828,7 @@ p2psvc_AccessConnectability( // Match conn cap entry if(P2PSvcConnCapMap[connCapMapIdx].reqConnCap != reqConnCap) continue; if(P2PSvcConnCapMap[connCapMapIdx].selfConnCap != selfConnCap) continue; - + pConnCapEntry = &(P2PSvcConnCapMap[connCapMapIdx]); break; } @@ -1850,9 +1850,9 @@ p2psvc_AccessConnectability( *pRspConnCap = pConnCapEntry->rspConnCap; *pPDRspStatus = P2P_STATUS_SUCCESS; bConnectable = TRUE; - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Connectable, msg: %s\n", pConnCapEntry->pDesc)); - + }while(FALSE); P2PSVC_FUNC_OUT(DBG_LOUD, bConnectable); @@ -1868,14 +1868,14 @@ p2psvc_GetCorrespondingConfigMethod( u2Byte cm = 0; P2PSVC_FUNC_IN(DBG_LOUD); - - if((u2Byte)P2P_WPS_CONFIG_METHODS_DISPLAY == cm) + + if((u2Byte)P2P_WPS_CONFIG_METHODS_DISPLAY == cm) cm = (u2Byte)P2P_WPS_CONFIG_METHODS_KEYPAD; - else if((u2Byte)P2P_WPS_CONFIG_METHODS_KEYPAD == cm) + else if((u2Byte)P2P_WPS_CONFIG_METHODS_KEYPAD == cm) cm = (u2Byte)P2P_WPS_CONFIG_METHODS_DISPLAY; - else if((u2Byte)P2P_WPS_CONFIG_METHODS_PUSHBUTTON == cm) + else if((u2Byte)P2P_WPS_CONFIG_METHODS_PUSHBUTTON == cm) cm = (u2Byte)P2P_WPS_CONFIG_METHODS_PUSHBUTTON; - else if((u2Byte)P2P_WPS_CONFIG_METHODS_SVC_DEFAULT_PIN == cm) + else if((u2Byte)P2P_WPS_CONFIG_METHODS_SVC_DEFAULT_PIN == cm) cm = (u2Byte)P2P_WPS_CONFIG_METHODS_SVC_DEFAULT_PIN; else { @@ -1908,7 +1908,7 @@ P2PSvc_DeterminePDSessionGOSsid( pu1Byte pRandField = NULL; PP2P_INFO pP2PInfo = GET_P2P_INFO(pP2PSvcInfo->pAdapter); - + *pSsidLen = 0; @@ -1919,19 +1919,19 @@ P2PSvc_DeterminePDSessionGOSsid( // Random chars PlatformMoveMemory(ssidBuf + (*pSsidLen), p2pRandomChars, sizeof(p2pRandomChars)); *pSsidLen += sizeof(p2pRandomChars); - + // SSID Postfix, optional if(pP2PInfo->SSIDPostfixLen) { PlatformMoveMemory(ssidBuf + (*pSsidLen), pP2PInfo->SSIDPostfixBuf, pP2PInfo->SSIDPostfixLen); *pSsidLen += (pP2PInfo->SSIDPostfixLen); } - + // Display result RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "P2PSvc_DeterminePDSessionGOSsid():\n", ssidBuf, *pSsidLen); - + return; - + } PP2PSVC_OBJ_LIST @@ -1960,9 +1960,9 @@ P2PSvc_Free_PDSessionListEntry( ) { P2PSVC_FUNC_IN(DBG_LOUD); - + RTRemoveEntryListWithCnt((PRT_LIST_ENTRY)pPDEntry, pListCnt); - + if(pPDEntry->bInitor) { p2psvc_Del_InitorPDSessionEntry((PP2PSVC_INITOR_PD_ENTRY)pPDEntry); @@ -1984,12 +1984,12 @@ P2PSvc_Free_PDSessionList( ) { P2PSVC_FUNC_IN(DBG_LOUD); - + while(RTIsListNotEmpty(pListHead)) { PVOID pEntry = NULL; PP2PSVC_PD_ENTRY pPDEntry = NULL; - + pEntry = RTGetHeadList(pListHead); pPDEntry = (PP2PSVC_PD_ENTRY)pEntry; @@ -2022,7 +2022,7 @@ P2PSvc_PDSessionInProgress( if(!RTIsListEmpty(&pP2PSvcInfo->pdSessionList)) { PP2PSVC_PD_ENTRY pPDEntry = NULL; - + pPDEntry = (PP2PSVC_PD_ENTRY)RTGetHeadList(&pP2PSvcInfo->pdSessionList); RT_TRACE_F(COMP_P2P, DBG_WARNING, ("There's an outstanding PD session\n")); @@ -2041,9 +2041,9 @@ P2PSvc_PDSessionInProgress( return bPDSessionInProgress; } -RT_STATUS +RT_STATUS P2PSvc_AddPDInitorData( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN PVOID infoBuf, IN u4Byte inBufLen, IN u4Byte outBufLen @@ -2057,7 +2057,7 @@ P2PSvc_AddPDInitorData( P2PSVC_CHECK_NULL(pAdapter); if(!pP2PSvcInfo->bEnabled) return RT_STATUS_INVALID_STATE; - + P2PSVC_FUNC_IN(DBG_LOUD); do @@ -2091,7 +2091,7 @@ P2PSvc_AddPDInitorData( } -RT_STATUS +RT_STATUS P2PSvc_AddPDRspdorData( IN PP2PSVC_INFO pP2PSvcInfo, IN pu1Byte devAddr, @@ -2105,19 +2105,19 @@ P2PSvc_AddPDRspdorData( if(!pP2PSvcInfo->bEnabled) return RT_STATUS_INVALID_STATE; - + P2PSVC_FUNC_IN(DBG_LOUD); do { PP2PSVC_REQ_INFO_ENTRY pAdvSvcInfoEntry = NULL; u4Byte peerReqAdvId = 0; - BOOLEAN bSvcAvailable = FALSE; + BOOLEAN bSvcAvailable = FALSE; //4 Get requested svc - rtStatus = p2psvc_GetPDRequestedSvc(pP2PSvcInfo, - posP2PAttrs, - &pAdvSvcInfoEntry, + rtStatus = p2psvc_GetPDRequestedSvc(pP2PSvcInfo, + posP2PAttrs, + &pAdvSvcInfoEntry, &peerReqAdvId); if(RT_STATUS_SUCCESS != rtStatus) { @@ -2143,11 +2143,11 @@ P2PSvc_AddPDRspdorData( } //4 New a rspdor PD session - rtStatus = p2psvc_New_RspdorPDSessionInfo(pP2PSvcInfo, - devAddr, - pAdvSvcInfoEntry, - posP2PAttrs, - configMethod, + rtStatus = p2psvc_New_RspdorPDSessionInfo(pP2PSvcInfo, + devAddr, + pAdvSvcInfoEntry, + posP2PAttrs, + configMethod, &badPDReqReason, &pPDRspdorEntry); if(RT_STATUS_SUCCESS != rtStatus) @@ -2171,12 +2171,12 @@ P2PSvc_AddPDRspdorData( else {// immediate rsp BOOLEAN bConnectable = FALSE; - - bConnectable = p2psvc_AccessConnectability(pP2PSvcInfo, - &pPDRspdorEntry->super, + + bConnectable = p2psvc_AccessConnectability(pP2PSvcInfo, + &pPDRspdorEntry->super, &pPDRspdorEntry->pdRspConnCap, // connCap to be used in responding PD rsp &pPDRspdorEntry->pdRspStatus); // status to be used in responding PD rsp - + p2psvc_Set_PDResult(&pPDRspdorEntry->super, pPDRspdorEntry->pdRspStatus, pPDRspdorEntry->pdRspConnCap); if(bConnectable) @@ -2190,12 +2190,12 @@ P2PSvc_AddPDRspdorData( } } - //4 Add record to the list. Note: If not deferred, the entry will be freed later after PD rsp is sent, + //4 Add record to the list. Note: If not deferred, the entry will be freed later after PD rsp is sent, //4 see P2PSvc_MakeRspdorPDRspIE() - RTInsertTailListWithCnt(&pP2PSvcInfo->pdSessionList, - &pPDRspdorEntry->super.List, + RTInsertTailListWithCnt(&pP2PSvcInfo->pdSessionList, + &pPDRspdorEntry->super.List, &pP2PSvcInfo->pdSessionListCnt); - + //4 Indicate (after status is updated) if(bSvcAvailable) {// if svc not available, don't bother user @@ -2218,7 +2218,7 @@ RT_STATUS P2PSvc_RspdorSetFOPDReq( IN PP2PSVC_INFO pP2PSvcInfo, IN PP2PSVC_PD_ENTRY pPDEntry, - IN BOOLEAN bAccepted + IN BOOLEAN bAccepted ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; @@ -2227,19 +2227,19 @@ P2PSvc_RspdorSetFOPDReq( do { PP2PSVC_RSPDOR_PD_ENTRY pRspdorPDEntry = (PP2PSVC_RSPDOR_PD_ENTRY)pPDEntry; - - P2PSvc_UpdateParam(&pRspdorPDEntry->objList, - P2PSVC_OBJ_HDR_ID_DATA_USER_ACCEPTED, + + P2PSvc_UpdateParam(&pRspdorPDEntry->objList, + P2PSVC_OBJ_HDR_ID_DATA_USER_ACCEPTED, 0, sizeof(bAccepted), &bAccepted); - pRspdorPDEntry->fopdReqStatus = (bAccepted) - ? (P2P_STATUS_SUCCESS_ACCEPTED_BY_USER) + pRspdorPDEntry->fopdReqStatus = (bAccepted) + ? (P2P_STATUS_SUCCESS_ACCEPTED_BY_USER) : (P2P_STATUS_FAIL_REJECTED_BY_USER); - - pRspdorPDEntry->fopdReqConnCap = (bAccepted) - ? (pP2PSvcInfo->connCap) + + pRspdorPDEntry->fopdReqConnCap = (bAccepted) + ? (pP2PSvcInfo->connCap) : (P2PSVC_CONN_CAP_BMP_NONE); - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bUserAccepted set to: %u\n", bAccepted)); }while(FALSE); @@ -2265,14 +2265,14 @@ P2PSvc_InitorOnPDRsp( PP2PSVC_INITOR_PD_ENTRY pInitorPDEntry = (PP2PSVC_INITOR_PD_ENTRY)pPDEntry; P2PSVC_FUNC_IN(DBG_LOUD); - + do { P2P_STATUS_CODE pdRspStatus = P2P_STATUS_MAX; u1Byte pdRspConnCap = 0; if(!eqMacAddr(devAddr, pInitorPDEntry->super.peerDevAddr)) - {// not from the peer + {// not from the peer // Don't set rtStatus so session won't be freed break; } @@ -2328,11 +2328,11 @@ P2PSvc_InitorOnPDRsp( pInitorPDEntry->pdRspRxTime = PlatformGetCurrentTime(); pInitorPDEntry->pdRspStatus = pdRspStatus; pInitorPDEntry->pdRspConnCap = pdRspConnCap; - + if(!pInitorPDEntry->super.bDeferred) {// immediate rsp, no further frame exchg p2psvc_Set_PDResult(&pInitorPDEntry->super, pdRspStatus, pdRspConnCap); - + if(P2P_STATUS_SUCCESS == pdRspStatus) {// immediate success rtStatus = p2psvc_AccessTopology_InitorImmediate(pP2PSvcInfo, pPDEntry, posP2PAttrs); @@ -2344,7 +2344,7 @@ P2PSvc_InitorOnPDRsp( else {// PD explicitly failed RT_TRACE_F(COMP_P2P, DBG_LOUD, ("PD rsp status: %u\n", pdRspStatus)); - } + } } //4 Indicate on PD rsp @@ -2395,14 +2395,14 @@ P2PSvc_InitorOnFOPDReq( BOOLEAN bToSendFOPDRsp = FALSE; P2PSVC_FUNC_IN(DBG_LOUD); - + do { P2P_STATUS_CODE fopdReqStatus = P2P_STATUS_MAX; u1Byte fopdReqConnCap = 0; if(!eqMacAddr(devAddr, pInitorPDEntry->super.peerDevAddr)) - {// not from the peer + {// not from the peer // Don't set rtStatus so session won't be freed break; } @@ -2455,15 +2455,15 @@ P2PSvc_InitorOnFOPDReq( pInitorPDEntry->fopdReqConnCap = fopdReqConnCap; //4 Check if rejected by peer user, if rejected, FOPD rsp shall not be sent - + if(P2P_STATUS_SUCCESS_ACCEPTED_BY_USER == fopdReqStatus) { BOOLEAN bConnectable = FALSE; - + bToSendFOPDRsp = TRUE; - bConnectable = p2psvc_AccessConnectability(pP2PSvcInfo, + bConnectable = p2psvc_AccessConnectability(pP2PSvcInfo, &pInitorPDEntry->super, - &pInitorPDEntry->fopdRspConnCap, + &pInitorPDEntry->fopdRspConnCap, &pInitorPDEntry->fopdRspStatus); p2psvc_Set_PDResult(&pInitorPDEntry->super, pInitorPDEntry->fopdRspStatus, pInitorPDEntry->fopdRspConnCap); @@ -2530,12 +2530,12 @@ P2PSvc_RspdorOnFOPDRsp( PP2PSVC_RSPDOR_PD_ENTRY pRspdorPDEntry = (PP2PSVC_RSPDOR_PD_ENTRY)pPDEntry; P2PSVC_FUNC_IN(DBG_LOUD); - + do { P2P_STATUS_CODE fopdRspStatus = P2P_STATUS_MAX; u1Byte fopdRspConnCap = 0; - + PP2PSVC_OBJ_LIST pObjList = NULL; if(!eqMacAddr(devAddr, pRspdorPDEntry->super.peerDevAddr)) @@ -2589,7 +2589,7 @@ P2PSvc_RspdorOnFOPDRsp( { fopdRspConnCap = P2PSVC_CONN_CAP_BMP_NONE; } - + pRspdorPDEntry->fopdRspRxTime = PlatformGetCurrentTime(); pRspdorPDEntry->fopdRspStatus = fopdRspStatus; pRspdorPDEntry->fopdRspConnCap = fopdRspConnCap; @@ -2604,10 +2604,10 @@ P2PSvc_RspdorOnFOPDRsp( break; } } - + // Indicate p2psvc_IndicateRspdorOnFOPDRsp(pP2PSvcInfo, &pRspdorPDEntry->super, fopdRspStatus, posP2PAttrs); - + if(P2P_STATUS_SUCCESS == fopdRspStatus) {// PD succeeded P2PSvc_PDSessionSucceeded(pP2PSvcInfo, pPDEntry); @@ -2635,7 +2635,7 @@ RT_STATUS P2PSvc_InitorOnSendPDReqFailure( IN PP2PSVC_INFO pP2PSvcInfo, IN PP2PSVC_PD_ENTRY pPDEntry, - IN u1Byte p2pStatus + IN u1Byte p2pStatus ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; @@ -2648,7 +2648,7 @@ P2PSvc_InitorOnSendPDReqFailure( reqBufSize = 0 + P2PSVC_OBJ_LIST_LEN(P2PSvc_Get_PDEntryObjList(pPDEntry)) // the whole objs in PD session + (RT_OBJECT_HEADER_SIZE + sizeof(P2P_STATUS_CODE)); // the status code - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuf\n")); @@ -2658,19 +2658,19 @@ P2PSvc_InitorOnSendPDReqFailure( pObjList = (PP2PSVC_OBJ_LIST)pBuf; PlatformMoveMemory(pBuf, P2PSvc_Get_PDEntryObjList(pPDEntry), P2PSVC_OBJ_LIST_LEN(P2PSvc_Get_PDEntryObjList(pPDEntry))); - + if(0 == P2PSvc_MakeP2PStatusObj(pObjList, p2pStatus)) { - rtStatus = RT_STATUS_INVALID_DATA; + rtStatus = RT_STATUS_INVALID_DATA; break; } pObjList->hdr.Id = P2PSVC_OBJ_HDR_ID_INDIC_INITOR_PD_REQ_SEND_FAILED; - + P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); - + P2PSvc_PDSessionFailed(pP2PSvcInfo, pPDEntry); - + }while(FALSE); if(pBuf) P2PSvc_FreeMem(pBuf, reqBufSize); @@ -2682,7 +2682,7 @@ RT_STATUS P2PSvc_RspdorOnSendFOPDReqFailure( IN PP2PSVC_INFO pP2PSvcInfo, IN PP2PSVC_PD_ENTRY pPDEntry, - IN u1Byte p2pStatus + IN u1Byte p2pStatus ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; @@ -2696,7 +2696,7 @@ P2PSvc_RspdorOnSendFOPDReqFailure( reqBufSize = 0 + P2PSVC_OBJ_LIST_LEN(P2PSvc_Get_PDEntryObjList(pPDEntry)) // the whole objs in PD session + (RT_OBJECT_HEADER_SIZE + sizeof(P2P_STATUS_CODE)); // the status code - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuf\n")); @@ -2712,15 +2712,15 @@ P2PSvc_RspdorOnSendFOPDReqFailure( // invalidate the prev status obj if exist pStatusObj->Id = P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN; } - + if(0 == P2PSvc_MakeP2PStatusObj(pObjList, p2pStatus)) { - rtStatus = RT_STATUS_INVALID_DATA; + rtStatus = RT_STATUS_INVALID_DATA; break; } pObjList->hdr.Id = P2PSVC_OBJ_HDR_ID_INDIC_RSPDOR_FOPD_REQ_SEND_FAILED; - + P2PSvc_Indicate(pP2PSvcInfo, reqBufSize, pBuf); // NOT to free the PD session because there may be a retry for sending FOPD req @@ -2729,7 +2729,7 @@ P2PSvc_RspdorOnSendFOPDReqFailure( // If sending FOPD req failed in the end, it shall be recycled in when P2PDisconnect or // P2PSvc_PDSessionAgeFunc is called. //P2PSvc_PDSessionFailed(pP2PSvcInfo, pPDEntry); - + }while(FALSE); if(pBuf) P2PSvc_FreeMem(pBuf, reqBufSize); @@ -2752,10 +2752,10 @@ P2PSvc_IsLegacyPD( do { OCTET_STRING osAdvId = {NULL, 0}; - + // If PD req does not contain adv-id attr, it should be from a legacy P2P Device - bLegacyPD = (P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_ADV_ID_INFO, 4 + 6, &osAdvId)) - ? (FALSE) + bLegacyPD = (P2PSvc_GetP2PAttr(posP2PAttrs, P2P_ATTR_ADV_ID_INFO, 4 + 6, &osAdvId)) + ? (FALSE) : (TRUE); if(bLegacyPD) @@ -2768,7 +2768,7 @@ P2PSvc_IsLegacyPD( }while(FALSE); P2PSVC_FUNC_OUT(DBG_LOUD, rtStatus); - + return bLegacyPD; } @@ -2799,12 +2799,12 @@ P2PSvc_PDSessionAgeFunc( { PRT_LIST_ENTRY pListHead = &pP2PSvcInfo->pdSessionList; PRT_LIST_ENTRY pEntry = RTGetHeadList(&pP2PSvcInfo->pdSessionList); - + while(pEntry != pListHead) { PP2PSVC_PD_ENTRY pPDEntry = (PP2PSVC_PD_ENTRY)pEntry; PRT_LIST_ENTRY pForeEntry = RTNextEntryList(pEntry); - + if(P2PSVC_TIMEOUT_PD_SESSION_TIMEOUT_uS < PlatformGetCurrentTime() - pPDEntry->createTime) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Timeout an old PD session\n")); diff --git a/network/wlan/WDI/COMMON/P2PSvc_ParamSpec.c b/network/wlan/WDI/COMMON/P2PSvc_ParamSpec.c index 4f13a420f..713659b77 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_ParamSpec.c +++ b/network/wlan/WDI/COMMON/P2PSvc_ParamSpec.c @@ -10,20 +10,20 @@ // This table defines the parameters of the supported actions. // The table is used for validating action request from upper layer. // -P2PSVC_ACTION_SPEC_ENTRY lP2PSvcActionSpecTab[] = +P2PSVC_ACTION_SPEC_ENTRY lP2PSvcActionSpecTab[] = { { P2PSVC_OBJ_HDR_ID_ACT_ENABLE, - { + { P2PSVC_OBJ_HDR_ID_DATA_BENABLE, //----------------------------------- P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN // sentinel } }, - + { P2PSVC_OBJ_HDR_ID_ACT_SEEK, - { + { P2PSVC_OBJ_HDR_ID_DATA_SEARCH_ID, P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME, P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME_HASH, @@ -36,7 +36,7 @@ P2PSVC_ACTION_SPEC_ENTRY lP2PSvcActionSpecTab[] = { P2PSVC_OBJ_HDR_ID_ACT_CANCEL_SEEK, - { + { P2PSVC_OBJ_HDR_ID_DATA_SEARCH_ID, //----------------------------------- P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN // sentinel @@ -84,7 +84,7 @@ P2PSVC_ACTION_SPEC_ENTRY lP2PSvcActionSpecTab[] = P2PSVC_OBJ_HDR_ID_DATA_DEV_ADDR, P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME_HASH, P2PSVC_OBJ_HDR_ID_DATA_ADV_ID, - P2PSVC_OBJ_HDR_ID_DATA_SESSION_INFO, + P2PSVC_OBJ_HDR_ID_DATA_SESSION_INFO, P2PSVC_OBJ_HDR_ID_DATA_NETWORK_ROLE, //----------------------------------- P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN // sentinel @@ -108,7 +108,7 @@ P2PSVC_ACTION_SPEC_ENTRY lP2PSvcActionSpecTab[] = P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN // sentinel } }, - + //---------------------------------------------- { P2PSVC_OBJ_HDR_ID_ACT_UNKNOWN, @@ -119,7 +119,7 @@ P2PSVC_ACTION_SPEC_ENTRY lP2PSvcActionSpecTab[] = }, }; -P2PSVC_PARAM_SPEC_ENTRY lP2PSvcParamSpecTab[] = +P2PSVC_PARAM_SPEC_ENTRY lP2PSvcParamSpecTab[] = { {P2PSVC_OBJ_HDR_ID_DATA_BENABLE, sizeof(BOOLEAN), sizeof(BOOLEAN)}, {P2PSVC_OBJ_HDR_ID_DATA_SVC_NAME, 1, 255}, @@ -160,7 +160,7 @@ P2PSvc_GetParamSpec( { u4Byte paramSpecIdx = 0; PP2PSVC_PARAM_SPEC_ENTRY pParamSpec = NULL; - + for(paramSpecIdx = 0; P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN != lP2PSvcParamSpecTab[paramSpecIdx].paramId; paramSpecIdx++) { if(actId == lP2PSvcParamSpecTab[paramSpecIdx].paramId) @@ -178,7 +178,7 @@ P2PSvc_GetParamSpec( // Description: // Validate if the input buffer contains an object with obj list as its payload // -RT_STATUS +RT_STATUS P2PSvc_ValidateReqInfo( IN PVOID infoBuf, IN u4Byte inBufLen, @@ -209,7 +209,7 @@ P2PSvc_ValidateReqInfo( // Check if the in buf is large enough to hold the data whose length is declared in the obj header pObjHdr = (PRT_OBJECT_HEADER)(infoBuf); - + if(inBufLen < bytesNeeded + pObjHdr->Length) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] in buf is not large enough to hold the value, value len: %u, inbuf len: %u!\n", pObjHdr->Length, inBufLen)); @@ -227,7 +227,7 @@ P2PSvc_ValidateReqInfo( break; } - // Validate the obj hdr of the info list + // Validate the obj hdr of the info list if(P2PSVC_OBJ_HDR_ID_DATA_OBJ_LIST != pObjList->hdr.Id) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] payload is not an obj list, its id is: %u\n", pObjList->hdr.Id)); @@ -237,9 +237,9 @@ P2PSvc_ValidateReqInfo( // Check if the objs in the obj list has valid length for(objIter = 0; objIter < pObjList->nObjs; objIter++) - { + { PRT_OBJECT_HEADER pCurObj = NULL; - + // Check we can read the obj hdr of the current obj if(inBufLen < bytesNeeded + pObjList->ObjTab[objIter] + RT_OBJECT_HEADER_SIZE) { @@ -299,13 +299,13 @@ P2PSvc_ValidateActionParam( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + int actSpecIdx = 0; int nParams = 0; int paramIdx = 0; PP2PSVC_ACTION_SPEC_ENTRY pActSpec = NULL; - + do { // Search table @@ -317,7 +317,7 @@ P2PSvc_ValidateActionParam( break; } } - + RT_ASSERT(pActSpec, ("p2psvc_AddSeekInfo(): Spec of P2PSVC_OBJ_HDR_ID_ACT_SEEK not specified in the action spec table\n")); // Count # of parameters @@ -332,7 +332,7 @@ P2PSvc_ValidateActionParam( u4Byte objIter = 0; PRT_OBJECT_HEADER pCurObj = NULL; u4Byte nOccurrence = 0; - + for(objIter = 0; objIter < pObjList->nObjs; objIter++) { pCurObj = P2PSVC_OBJ_LIST_GET_OBJ(pObjList, objIter); @@ -345,7 +345,7 @@ P2PSvc_ValidateActionParam( rtStatus = RT_STATUS_INVALID_PARAMETER; break; } - else if(1 < nOccurrence + else if(1 < nOccurrence && P2PSVC_OBJ_HDR_ID_DATA_UNKNOWN != pActSpec->paramList[paramIdx] ) { @@ -385,11 +385,11 @@ P2PSvc_ValidateParamContent( u4Byte objIter = 0; u4Byte paramSpecIdx = 0; PP2PSVC_PARAM_SPEC_ENTRY pParamSpec = NULL; - + do { u4Byte valLen = 0; - + for(objIter = 0, pParamSpec = NULL; NULL != (pCurObj = P2PSVC_OBJ_LIST_GET_OBJ(pObjList, objIter)); objIter++) { valLen = pCurObj->Length; @@ -409,7 +409,7 @@ P2PSvc_ValidateParamContent( break; } } - + if(RT_STATUS_SUCCESS != rtStatus) { break; @@ -489,9 +489,9 @@ P2PSvc_UpdateParam( rtStatus = RT_STATUS_INVALID_DATA; break; } - + PlatformMoveMemory(pObj->Value, pBuf, bufLen); - + }while(FALSE); return rtStatus; diff --git a/network/wlan/WDI/COMMON/P2PSvc_SD.c b/network/wlan/WDI/COMMON/P2PSvc_SD.c index 301ffb268..4445844a4 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_SD.c +++ b/network/wlan/WDI/COMMON/P2PSvc_SD.c @@ -36,7 +36,7 @@ P2PSvc_ParseAnqpQueryReq( do { u2Byte idx = 0; - + // svc-name-len if(anqpQueryReqLen < idx + 1) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} svcNameLen = *(pu1Byte)(anqpQueryReqBuf + idx); @@ -51,7 +51,7 @@ P2PSvc_ParseAnqpQueryReq( if(anqpQueryReqLen < idx + 1) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} svcInfoReqLen = *(pu1Byte)(anqpQueryReqBuf + idx); idx += 1; - + // svc-info-req if(anqpQueryReqLen < idx + svcInfoReqLen) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} svcInfoReqBuf = (pu1Byte)(anqpQueryReqBuf + idx); @@ -125,7 +125,7 @@ P2PSvc_ParseAnqpQueryRsp( if(anqpQueryRspLen < offset + 2) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} else {configMethod = *(pu2Byte)(anqpQueryRspBuf + offset);} offset += 2; - + // svc-name-len if(anqpQueryRspLen < offset + 1) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} else {svcNameLen = *(pu1Byte)(anqpQueryRspBuf + offset);} @@ -145,7 +145,7 @@ P2PSvc_ParseAnqpQueryRsp( if(anqpQueryRspLen < offset + 2) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} else {svcInfoLen = *(pu2Byte)(anqpQueryRspBuf + offset);} offset += 2; - + // svc-info-req if(anqpQueryRspLen < offset + svcInfoLen) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} else {svcInfoBuf = (pu1Byte)(anqpQueryRspBuf + offset);} @@ -154,11 +154,11 @@ P2PSvc_ParseAnqpQueryRsp( if(idxSvcInfoDesc == index) { break; - } + } } if(RT_STATUS_SUCCESS != rtStatus) - { + { DbgPrint("ng: 0x%08X, offset: %u\n", rtStatus, offset); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ANQP Query Rsp:\n", anqpQueryRspBuf, anqpQueryRspLen); break; @@ -192,10 +192,10 @@ P2PSvc_SDReq( u2Byte bytesWritten = 0; P2PSVC_FUNC_IN(DBG_LOUD); - + cpMacAddr(pSDContext->UserSDReq.TargetDeviceAddress, devAddr); cpMacAddr(pSDContext->TargetDeviceAddress, devAddr); - + pSDContext->UserSDReq.ServiceReqTLVSize = 1; pSDContext->UserSDReq.ServiceReqTLVList[0].TransactionID = searchId; @@ -206,8 +206,8 @@ P2PSvc_SDReq( bytesWritten += 1; // svc-name - PlatformMoveMemory(pSDContext->UserSDReq.ServiceReqTLVList[0].ServiceDesc.Buffer + bytesWritten, - pSvcNameObj->Value, + PlatformMoveMemory(pSDContext->UserSDReq.ServiceReqTLVList[0].ServiceDesc.Buffer + bytesWritten, + pSvcNameObj->Value, pSvcNameObj->Length); bytesWritten += (u2Byte)pSvcNameObj->Length; @@ -216,13 +216,13 @@ P2PSvc_SDReq( bytesWritten += 1; // svc-info-req - PlatformMoveMemory(pSDContext->UserSDReq.ServiceReqTLVList[0].ServiceDesc.Buffer + bytesWritten, - pSvcInfoReqObj->Value, + PlatformMoveMemory(pSDContext->UserSDReq.ServiceReqTLVList[0].ServiceDesc.Buffer + bytesWritten, + pSvcInfoReqObj->Value, pSvcInfoReqObj->Length); bytesWritten += (u2Byte)pSvcInfoReqObj->Length; pSDContext->UserSDReq.ServiceReqTLVList[0].ServiceDesc.BufferLength = bytesWritten; - + pSDContext->bRequester = TRUE; pSDContext->DialogToken = IncreaseDialogToken(pP2PInfo->DialogToken); //pSDContext->TransactionID = 0xAA; // seems this is for parsing recvd SDRsp diff --git a/network/wlan/WDI/COMMON/P2PSvc_SearchResult.c b/network/wlan/WDI/COMMON/P2PSvc_SearchResult.c index 0302e31b3..c3018c47e 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_SearchResult.c +++ b/network/wlan/WDI/COMMON/P2PSvc_SearchResult.c @@ -40,7 +40,7 @@ p2psvc_EvalSearchResultObjListLen( u1Byte curSvcNameLen = 0; // adv-id - idxAdvSvcInfoBuf += 4; + idxAdvSvcInfoBuf += 4; // config-method (addendm v0.43) idxAdvSvcInfoBuf += 2; @@ -48,26 +48,26 @@ p2psvc_EvalSearchResultObjListLen( // svc-name-len curSvcNameLen = (*(pu1Byte)(osAdvSvcInfo.Octet + idxAdvSvcInfoBuf)); totalSvcNameLen_2 += curSvcNameLen; - idxAdvSvcInfoBuf += 1; + idxAdvSvcInfoBuf += 1; // svc-name //RT_PRINT_STR(COMP_P2P, DBG_LOUD, "svc-name:\n", osAdvSvcInfo.Octet + i, curSvcNameLen); idxAdvSvcInfoBuf += curSvcNameLen; // TODO: shall check if the svc matches our req because hashes of other seek req may be carried in our ProbeReq so we may get more svc names then we actually want - + nAdvSvc++; } totalSvcNameLen_1 = osAdvSvcInfo.Length - (nAdvSvc * (4 + 2 + 1)); // minus adv-id(4), config-method(2) and svc-name-length(1) - if(totalSvcNameLen_1 != totalSvcNameLen_2) + if(totalSvcNameLen_1 != totalSvcNameLen_2) { //RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] totalSvcNameLen_1(%u) != totalSvcNameLen_2(%u)\n", totalSvcNameLen_1, totalSvcNameLen_2)); //RT_PRINT_DATA(COMP_P2P, DBG_WARNING, "osAdvSvcInfo:\n", osAdvSvcInfo.Octet, osAdvSvcInfo.Length); break; } - + reqBufSize = 0; reqBufSize += FIELD_OFFSET(P2PSVC_OBJ_LIST, varStart); reqBufSize += (RT_OBJECT_HEADER_SIZE + 1); // search-id @@ -81,8 +81,8 @@ p2psvc_EvalSearchResultObjListLen( reqBufSize += (nAdvSvc * (RT_OBJECT_HEADER_SIZE)) + totalSvcNameLen_1; // svc-name if(pnAdvSvc) *pnAdvSvc = nAdvSvc; - }while(FALSE); - + }while(FALSE); + return reqBufSize; } @@ -101,7 +101,7 @@ P2PSvc_Free_SearchResultObjList( { PVOID pEntry = NULL; PP2PSVC_SR_LIST_ENTRY pSREntry = NULL; - + pEntry = RTRemoveHeadListWithCnt(pListHead, pListCnt); pSREntry = (PP2PSVC_SR_LIST_ENTRY)pEntry; P2PSvc_FreeMem(pEntry, P2PSVC_SR_LIST_LEN(pSREntry)); @@ -153,7 +153,7 @@ P2PSvc_ToProcessProbeRsp( #pragma warning( disable:6328 ) RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Timeout waiting for SD rsp, try again by accept probe rsp, sdReqTxTime: %u\n", pSREntryInList->sdReqTxTime)); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "Target dev addr:\n", devAddr); - + pSREntryInList->sdReqTxTime = 0; bAccept = TRUE; break; @@ -200,9 +200,9 @@ P2PSvc_GetSearchResult( { RT_STATUS rtStatus = RT_STATUS_SUCCESS; PRT_LIST_ENTRY pEntry = NULL; - + if(ppSREntry) *ppSREntry = NULL; - + do { for(pEntry = RTGetHeadList(&pP2PSvcInfo->searchResultList); pEntry != &pP2PSvcInfo->searchResultList; pEntry = RTNextEntryList(pEntry)) @@ -210,19 +210,19 @@ P2PSvc_GetSearchResult( PP2PSVC_SR_LIST_ENTRY pSREntry = (PP2PSVC_SR_LIST_ENTRY)pEntry; PRT_OBJECT_HEADER pSearchIdObj = NULL; PRT_OBJECT_HEADER pDevAddrObj = NULL; - + // Match search id if(NULL == (pSearchIdObj = P2PSvc_GetParam(&pSREntry->srObjList, P2PSVC_OBJ_HDR_ID_DATA_SEARCH_ID, 0))) { rtStatus = RT_STATUS_INVALID_DATA; break; } - + if(searchId != *(pu1Byte)pSearchIdObj->Value) { continue;; } - + // Match dev addr if(NULL == (pDevAddrObj = P2PSvc_GetParam(&pSREntry->srObjList, P2PSVC_OBJ_HDR_ID_DATA_DEV_ADDR, 0))) { @@ -233,15 +233,15 @@ P2PSvc_GetSearchResult( { continue; } - + // Target found if(ppSREntry) *ppSREntry = pSREntry; break; } - + if(RT_STATUS_SUCCESS != rtStatus) break; }while(FALSE); - + return rtStatus; } @@ -265,7 +265,7 @@ P2PSvc_SeekReqNeedSD( {// shall not happen break; } - + if(0 == pSeekSvcInfoReqObj->Length) { PRT_OBJECT_HEADER pSeekSvcNameObj = NULL; @@ -273,7 +273,7 @@ P2PSvc_SeekReqNeedSD( {// shall not happen break; } - + if('*' == *((pu1Byte)pSeekSvcNameObj->Value + pSeekSvcNameObj->Length - 1)) {// ended with *, assume UTF-8 encode of * uses only a single byte bNeedSD = TRUE; @@ -282,14 +282,14 @@ P2PSvc_SeekReqNeedSD( break; } - + //4 Check if we've already done SD // Get a svc desc if(NULL == (pSvcDescObjList = P2PSvc_GetParam(&pSREntryInList->srObjList, P2PSVC_OBJ_HDR_ID_DATA_SVC_DESC_LIST, 0))) { break; } - + // Check if the svc desc has svc-info if(NULL == (pSvcInfoObj = P2PSvc_GetParam((PP2PSVC_OBJ_LIST)pSvcDescObjList, P2PSVC_OBJ_HDR_ID_DATA_SVC_INFO, 0))) { @@ -313,7 +313,7 @@ P2PSvc_SeekReqNeedSD( // // Description: -// Update search result list if +// Update search result list if // 1. the input entry can be found in the list and the content is different // 2. the input entry can't be found in the list // @@ -322,7 +322,7 @@ P2PSvc_SeekReqNeedSD( RT_STATUS P2PSvc_UpdateSearchResult( IN PP2PSVC_INFO pP2PSvcInfo, - IN u1Byte searchId, + IN u1Byte searchId, IN pu1Byte devAddr, IN PP2PSVC_SR_LIST_ENTRY pSREntryToUpdate, OUT PBOOLEAN pbDuplicatedEntry, @@ -342,7 +342,7 @@ P2PSvc_UpdateSearchResult( } if(pSREntryInList) - {// remove the old one and insert the new to the head + {// remove the old one and insert the new to the head if(P2PSVC_OBJ_LIST_LEN(&pSREntryToUpdate->srObjList) == P2PSVC_OBJ_LIST_LEN(&pSREntryInList->srObjList) && 0 == PlatformCompareMemory(&pSREntryToUpdate->srObjList, &pSREntryInList->srObjList, P2PSVC_OBJ_LIST_LEN(&pSREntryToUpdate->srObjList))) @@ -383,7 +383,7 @@ P2PSvc_UpdateSearchResult( // svc-info is empty. // // Fixed fields including: -// search-id, dev-addr, dev-name, +// search-id, dev-addr, dev-name, // // Var fields describing each services advertised by the dev are: // adv-id, svc-name, (no svc-info), svc-status @@ -400,13 +400,13 @@ P2PSvc_UpdateSearchResult( // 5. config-method (2) (addendum v0.43) // 6. svc-name (n, n <= 255) // 7. svc-info (n, n <= 65535) -// 8. svc-status (1) +// 8. svc-status (1) // RT_STATUS P2PSvc_MakeSearchResultDataFromProbeRsp( IN PP2PSVC_INFO pP2PSvcInfo, - IN PP2PSVC_REQ_INFO_ENTRY pSeekInfoEntry, - IN pu1Byte devAddr, + IN PP2PSVC_REQ_INFO_ENTRY pSeekInfoEntry, + IN pu1Byte devAddr, IN POCTET_STRING posP2PAttrs, IN OCTET_STRING osAdvSvcInfo, OUT PP2PSVC_SR_LIST_ENTRY *ppSREntryOut @@ -422,12 +422,12 @@ P2PSvc_MakeSearchResultDataFromProbeRsp( P2PSVC_FUNC_IN(DBG_TRACE); do - { - u4Byte idxAdvSvc = 0, idxAdvSvcInfoBuf = 0; - u1Byte nAdvSvc = 0; + { + u4Byte idxAdvSvc = 0, idxAdvSvcInfoBuf = 0; + u1Byte nAdvSvc = 0; *ppSREntryOut = NULL; - + if(0 == (reqBufSize = p2psvc_EvalSearchResultObjListLen(posP2PAttrs, osAdvSvcInfo, 0, &nAdvSvc))) { rtStatus = RT_STATUS_INVALID_DATA; @@ -441,7 +441,7 @@ P2PSvc_MakeSearchResultDataFromProbeRsp( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pSREntry\n")); break; } - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("alloc mem for size: %u\n", reqBufSize)); PlatformFillMemory(pSREntry, reqBufSize, 0xFE); @@ -452,9 +452,9 @@ P2PSvc_MakeSearchResultDataFromProbeRsp( pObjList = &pSREntry->srObjList; - P2PSVC_OBJ_LIST_INIT(pObjList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_INDIC_SEARCH_RESULT, + P2PSVC_OBJ_LIST_INIT(pObjList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_INDIC_SEARCH_RESULT, P2PSVC_MIN_SUPPORT_VER); //1 Note that because we have search id in the obj, the search result would belong to a specific seek req @@ -500,7 +500,7 @@ P2PSvc_MakeSearchResultDataFromProbeRsp( *ppSREntryOut = pSREntry; RT_PRINT_DATA(COMP_P2P, DBG_TRACE, "P2PSvc_MakeSearchResultDataFromProbeRsp():\n", pObjList, P2PSVC_OBJ_LIST_LEN(pObjList)); - + }while(FALSE); if(RT_STATUS_SUCCESS != rtStatus) @@ -590,7 +590,7 @@ P2PSvc_MakeSearchResultDataFromSDRsp( reqBufSize += nSvcInfoDesc * (RT_OBJECT_HEADER_SIZE + 4); // adv-id reqBufSize += (nSvcInfoDesc * (RT_OBJECT_HEADER_SIZE)) + totalSvcNameLen; // svc-name reqBufSize += (nSvcInfoDesc * (RT_OBJECT_HEADER_SIZE)) + totalSvcInfoLen; // svc-info - reqBufSize += nSvcInfoDesc * (RT_OBJECT_HEADER_SIZE + 1); // svc-status + reqBufSize += nSvcInfoDesc * (RT_OBJECT_HEADER_SIZE + 1); // svc-status if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pNewSREntry, reqBufSize))) { @@ -607,10 +607,10 @@ P2PSvc_MakeSearchResultDataFromSDRsp( pNewSREntry->bDirty = FALSE; pNewObjList = &pNewSREntry->srObjList; - - P2PSVC_OBJ_LIST_INIT(pNewObjList, - RT_OB_HDR_TYPE_DATA, - P2PSVC_OBJ_HDR_ID_INDIC_SEARCH_RESULT, + + P2PSVC_OBJ_LIST_INIT(pNewObjList, + RT_OB_HDR_TYPE_DATA, + P2PSVC_OBJ_HDR_ID_INDIC_SEARCH_RESULT, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeObj(pNewObjList, P2PSVC_OBJ_HDR_ID_DATA_SEARCH_ID, pSearchIdObj->Length, pSearchIdObj->Value); @@ -620,12 +620,12 @@ P2PSvc_MakeSearchResultDataFromSDRsp( if(pIsSDDoneObj != NULL) P2PSvc_MakeObj(pNewObjList, P2PSVC_OBJ_HDR_ID_DATA_IS_SD_DONE, sizeof(BOOLEAN), pIsSDDoneObj->Value); - + for(idxSvcInfoDesc = 0; idxSvcInfoDesc < nSvcInfoDesc; idxSvcInfoDesc++) { PP2PSVC_OBJ_LIST pSvcDescObjList = NULL; u1Byte svcNameLen = 0; - + if(0 == P2PSvc_MakeSvcDescObjList(pNewObjList, &pSvcDescObjList)) {rtStatus = RT_STATUS_INVALID_DATA ; break;} if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_ParseAnqpQueryRsp(pSvcRspTlv, idxSvcInfoDesc, &svcNameLen, &pSvcNameBuf, &advId, &svcStatus, &svcInfoLen, &pSvcInfoBuf))) @@ -651,7 +651,7 @@ P2PSvc_MakeSearchResultDataFromSDRsp( // Free the old one RTRemoveEntryListWithCnt((PRT_LIST_ENTRY)pOldSREntry, &pP2PSvcInfo->searchResultListCnt); P2PSvc_FreeMem(pOldSREntry, P2PSVC_SR_LIST_LEN(pOldSREntry)); - + }while(FALSE); if(RT_STATUS_SUCCESS != rtStatus) diff --git a/network/wlan/WDI/COMMON/P2PSvc_Utility.c b/network/wlan/WDI/COMMON/P2PSvc_Utility.c index 02952c17b..a28a2a9db 100644 --- a/network/wlan/WDI/COMMON/P2PSvc_Utility.c +++ b/network/wlan/WDI/COMMON/P2PSvc_Utility.c @@ -17,7 +17,7 @@ P2PSvc_AllocMem( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + rtStatus = PlatformAllocateMemory(Adapter, ppPtr, len); if(RT_STATUS_SUCCESS == rtStatus) gP2PSvcMemAllocCount++; else rtStatus = RT_STATUS_RESOURCE; @@ -37,13 +37,13 @@ P2PSvc_FreeMem( RT_STATUS P2PSvc_GetAdvSvcByAdvId( - IN PP2PSVC_INFO pP2PSvcInfo, + IN PP2PSVC_INFO pP2PSvcInfo, IN u4Byte advId, OUT PP2PSVC_REQ_INFO_ENTRY *ppAdvSvcEntry ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + do { PRT_LIST_ENTRY pEntry = NULL; @@ -52,7 +52,7 @@ P2PSvc_GetAdvSvcByAdvId( { PP2PSVC_REQ_INFO_ENTRY pInfoEntry = (PP2PSVC_REQ_INFO_ENTRY)pEntry; PRT_OBJECT_HEADER pObj = NULL; - + pObj = P2PSvc_GetParam(&pInfoEntry->objList, P2PSVC_OBJ_HDR_ID_DATA_ADV_ID, 0); if(sizeof(u4Byte) != pObj->Length) {rtStatus = RT_STATUS_INVALID_LENGTH; break;} RT_TRACE_F(COMP_P2P, DBG_LOUD, ("compare peer adv-id(%u) with self (%u)\n", advId, *(pu4Byte)pObj->Value)); @@ -84,7 +84,7 @@ P2PSvc_GetP2PAttr( RT_STATUS status = RT_STATUS_SUCCESS; u1Byte *pos = NULL; u1Byte *end = NULL; - + posAttr->Length = 0; posAttr->Octet = NULL; @@ -100,7 +100,7 @@ P2PSvc_GetP2PAttr( RT_PRINT_DATA(COMP_P2P, DBG_WARNING, "rx invalid attribute\n", posP2PAttrs->Octet, posP2PAttrs->Length); break; } - + // Parse the attribute if(attrId == pos[0]) { @@ -133,10 +133,10 @@ P2PSvc_Indicate( { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("indicate a buf with length: %u\n", bufLen)); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "indicated data:\n", pvBuf, bufLen); - - if(RT_STATUS_SUCCESS != (rtStatus = PlatformIndicateCustomStatus(pP2PSvcInfo->pAdapter, - RT_CUSTOM_EVENT_P2P_SVC, - RT_CUSTOM_INDI_TARGET_IHV, + + if(RT_STATUS_SUCCESS != (rtStatus = PlatformIndicateCustomStatus(pP2PSvcInfo->pAdapter, + RT_CUSTOM_EVENT_P2P_SVC, + RT_CUSTOM_INDI_TARGET_IHV, pvBuf, bufLen) ) ) @@ -172,23 +172,23 @@ P2PSvc_IndicateFrameSent( + (RT_OBJECT_HEADER_SIZE + 6) + (RT_OBJECT_HEADER_SIZE + attrLen) ; - + if(RT_STATUS_SUCCESS != (rtStatus = P2PSvc_AllocMem(pP2PSvcInfo->pAdapter, &pBuf, reqBufSize))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuff\n")); break; } - + pObjList = (PP2PSVC_OBJ_LIST)pBuf; P2PSVC_OBJ_LIST_INIT(pObjList, RT_OB_HDR_TYPE_DATA, id, P2PSVC_MIN_SUPPORT_VER); P2PSvc_MakeDevAddrObj(pObjList, peerMac); P2PSvc_MakeP2PAttrsObj(pObjList, attrLen, pAttrs); - - if(RT_STATUS_SUCCESS != (rtStatus = PlatformIndicateCustomStatus(pP2PSvcInfo->pAdapter, - RT_CUSTOM_EVENT_P2P_SVC, - RT_CUSTOM_INDI_TARGET_IHV, + + if(RT_STATUS_SUCCESS != (rtStatus = PlatformIndicateCustomStatus(pP2PSvcInfo->pAdapter, + RT_CUSTOM_EVENT_P2P_SVC, + RT_CUSTOM_INDI_TARGET_IHV, pObjList, reqBufSize) ) ) @@ -220,7 +220,7 @@ P2PSvc_Notify( u4Byte reqBufSize = 0; do - { + { PP2PSVC_OBJ_LIST pObjList = NULL; reqBufSize = 0; @@ -231,13 +231,13 @@ P2PSvc_Notify( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("[WARNING] Failed to allocate memory for pBuff\n")); break; } - + pObjList = (PP2PSVC_OBJ_LIST)pBuf; P2PSVC_OBJ_LIST_INIT(pObjList, RT_OB_HDR_TYPE_DATA, id, P2PSVC_MIN_SUPPORT_VER); - - if(RT_STATUS_SUCCESS != (rtStatus = PlatformIndicateCustomStatus(pP2PSvcInfo->pAdapter, - RT_CUSTOM_EVENT_P2P_SVC, - RT_CUSTOM_INDI_TARGET_IHV, + + if(RT_STATUS_SUCCESS != (rtStatus = PlatformIndicateCustomStatus(pP2PSvcInfo->pAdapter, + RT_CUSTOM_EVENT_P2P_SVC, + RT_CUSTOM_INDI_TARGET_IHV, pObjList, reqBufSize) ) ) @@ -284,7 +284,7 @@ P2PSvc_MatchSubstring( u4Byte targetIdx = 0; u4Byte patternIdx = 0; BOOLEAN bMatch = FALSE; - + if(targetBufLen < patternBufLen) return FALSE; while(targetIdx < targetBufLen && patternIdx < patternBufLen) @@ -300,7 +300,7 @@ P2PSvc_MatchSubstring( patternIdx = 0; } } - + if(patternIdx == patternBufLen) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("match, idx: %u\n", patternIdx)); @@ -339,11 +339,11 @@ P2PSvc_GetDevNameFromDevInfoAttr( rtStatus = RT_STATUS_INVALID_DATA; break; } - - RT_PRINT_DATA(COMP_P2P, DBG_TRACE, - "P2PSvc_GetDevNameFromDevInfoAttr(): osDevInfo:\n", + + RT_PRINT_DATA(COMP_P2P, DBG_TRACE, + "P2PSvc_GetDevNameFromDevInfoAttr(): osDevInfo:\n", osDevInfo.Octet, osDevInfo.Length); - + offsetNSecDevTypes = 6 + 2 + 8; if (osDevInfo.Octet != NULL) @@ -351,8 +351,8 @@ P2PSvc_GetDevNameFromDevInfoAttr( nSecDevTypes = *(pu1Byte)(osDevInfo.Octet + offsetNSecDevTypes); } offsetDevName = offsetNSecDevTypes + 1 + (8 * nSecDevTypes) + 2 + 2; - - if(osDevInfo.Length < offsetDevName + 1) + + if(osDevInfo.Length < offsetDevName + 1) { rtStatus = RT_STATUS_INVALID_DATA; break; @@ -363,16 +363,16 @@ P2PSvc_GetDevNameFromDevInfoAttr( rtStatus = RT_STATUS_INVALID_DATA; break; } - + devNameLen = osDevInfo.Length - (6 + 2 + 8 + 1 + 8 * nSecDevTypes + 2 + 2); - + posDevName->Octet = osDevInfo.Octet + offsetDevName; posDevName->Length = devNameLen; - + }while(FALSE); return rtStatus; - + } #endif // #if (P2PSVC_SUPPORT == 1) diff --git a/network/wlan/WDI/COMMON/P2P_AdditionalIe.c b/network/wlan/WDI/COMMON/P2P_AdditionalIe.c index bf9438084..663a92408 100644 --- a/network/wlan/WDI/COMMON/P2P_AdditionalIe.c +++ b/network/wlan/WDI/COMMON/P2P_AdditionalIe.c @@ -75,7 +75,7 @@ P2P_AddIe_Set( if(*ppDestBuf) FrameBuf_Free(*ppDestBuf); *ppDestBuf = pClonedSrcBuf; - + return TRUE; } diff --git a/network/wlan/WDI/COMMON/P2P_AdditionalIe.h b/network/wlan/WDI/COMMON/P2P_AdditionalIe.h index c5bb89ebb..e41c99b7f 100644 --- a/network/wlan/WDI/COMMON/P2P_AdditionalIe.h +++ b/network/wlan/WDI/COMMON/P2P_AdditionalIe.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_ADDITIONAL_IE_H @@ -62,5 +62,5 @@ P2P_AddIe_Append( IN P2P_ADD_IE_ID id, IN FRAME_BUF *pBuf ); - + #endif // #ifndef __INC_P2P_ADDITIONAL_IE_H diff --git a/network/wlan/WDI/COMMON/P2P_Attribute.c b/network/wlan/WDI/COMMON/P2P_Attribute.c index 1c2e20d85..07ff046aa 100644 --- a/network/wlan/WDI/COMMON/P2P_Attribute.c +++ b/network/wlan/WDI/COMMON/P2P_Attribute.c @@ -33,7 +33,7 @@ p2pattr_make_DevType( FrameBuf_Add_be_u2(pBuf, catId); FrameBuf_Add_Data(pBuf, oui, 4); FrameBuf_Add_be_u2(pBuf, subCatId); - + return; } @@ -45,7 +45,7 @@ p2pattr_make_WpsDevType( ) { p2pattr_make_DevType(pBuf, type->CategoryId, type->Oui, type->SubCategoryId); - + return; } @@ -54,11 +54,11 @@ VOID p2pattr_make_WpsSecDevTypeList( IN FRAME_BUF *pBuf, IN u1Byte numSecDevType, - IN const P2P_WPS_ATTRIBUTES_DEVICE_TYPE *pSecDevTypeList + IN const P2P_WPS_ATTRIBUTES_DEVICE_TYPE *pSecDevTypeList ) { u1Byte itTypeList = 0; - + FrameBuf_Add_u1(pBuf, numSecDevType); for(itTypeList = 0; itTypeList < numSecDevType; itTypeList++) { @@ -98,7 +98,7 @@ p2pattr_make_CliInfoDesc( if(NULL == (pLen = FrameBuf_Add(pBuf, 1))) return; initBufLen = FrameBuf_Length(pBuf); - + FrameBuf_Add_Data(pBuf, pDesc->DeviceAddress, 6); FrameBuf_Add_Data(pBuf, pDesc->InterfaceAddress, 6); FrameBuf_Add_u1(pBuf, pDesc->DeviceCapability); @@ -109,7 +109,7 @@ p2pattr_make_CliInfoDesc( if(FrameBuf_Length(pBuf) - initBufLen > 0 && FrameBuf_Length(pBuf) - initBufLen < 0xFF) { - *pLen = (u1Byte)(FrameBuf_Length(pBuf) - initBufLen); + *pLen = (u1Byte)(FrameBuf_Length(pBuf) - initBufLen); } return; @@ -123,17 +123,17 @@ p2pattr_make_CliInfoDescList( ) { u1Byte itList = 0; - + for(itList = 0; itList < ASSOCIATE_ENTRY_NUM; itList++) { const RT_WLAN_STA *pEntry = pCliList + itList; - + if(!(pEntry->bUsed && pEntry->bAssociated && pEntry->bP2PClient)) continue; p2pattr_make_CliInfoDesc(pBuf, pEntry); } - + return; } @@ -148,12 +148,12 @@ p2pattr_make_IntfAddrList( u1Byte itList = 0; FrameBuf_Add_u1(pBuf, numIntfAddr); - + for(itList = 0; itList < numIntfAddr; itList++) { FrameBuf_Add_Data(pBuf, intfAddrList + (6 * itList), 6); } - + return; } @@ -169,10 +169,10 @@ p2pattr_Make_ChannelEntryList( { if(!commonChannels->regClass[it].channels) continue; - - P2PAttr_Make_ChannelEntry(pBuf, - commonChannels->regClass[it].regClass, - commonChannels->regClass[it].channels, + + P2PAttr_Make_ChannelEntry(pBuf, + commonChannels->regClass[it].regClass, + commonChannels->regClass[it].channels, commonChannels->regClass[it].channel); } @@ -202,7 +202,7 @@ P2PAttr_Make_Status( FrameBuf_Add_u1(pBuf, P2P_ATTR_STATUS); FrameBuf_Add_le_u2(pBuf, 1); FrameBuf_Add_u1(pBuf, status); - + //RT_TRACE_F(COMP_P2P, FrameBuf_DbgLevel(pBuf), ("[%s] statue: %u, channel: %u\n", MOD_TRACE_TAG, status)); return; @@ -217,7 +217,7 @@ P2PAttr_Make_MinorReasonCode( FrameBuf_Add_u1(pBuf, P2P_ATTR_MINOR_REASON_CODE); FrameBuf_Add_le_u2(pBuf, 1); FrameBuf_Add_u1(pBuf, minorReasonCode); - + RT_TRACE_F(COMP_P2P, FrameBuf_DbgLevel(pBuf), ("[%s] minor reason code: %u\n", MOD_TRACE_TAG, minorReasonCode)); return; @@ -236,7 +236,7 @@ P2PAttr_Make_Capability( FrameBuf_Add_u1(pBuf, grpCap); RT_TRACE_F(COMP_P2P, FrameBuf_DbgLevel(pBuf), ("[%s] devCap: %02X, grpCap: %02X\n", MOD_TRACE_TAG, devCap, grpCap)); - + return; } @@ -270,7 +270,7 @@ P2PAttr_Make_GoIntent( return; } -VOID +VOID P2PAttr_Make_ConfigTimeout( IN FRAME_BUF *pBuf, IN u1Byte goTimeout, @@ -306,7 +306,7 @@ P2PAttr_Make_ListenChannel( return; } -VOID +VOID P2PAttr_Make_GroupBssid( IN FRAME_BUF *pBuf, IN const pu1Byte grpBssid @@ -321,7 +321,7 @@ P2PAttr_Make_GroupBssid( return; } -VOID +VOID P2PAttr_Make_ExtListenTiming( IN FRAME_BUF *pBuf, IN u2Byte period, @@ -338,7 +338,7 @@ P2PAttr_Make_ExtListenTiming( return; } -VOID +VOID P2PAttr_Make_IntendedIntfAddr( IN FRAME_BUF *pBuf, IN const pu1Byte intfAddr @@ -380,7 +380,7 @@ P2PAttr_Make_ChannelEntry( if(0 == nChannels) return; - + // Regulatory class FrameBuf_Add_u1(pBuf, regClass); @@ -388,7 +388,7 @@ P2PAttr_Make_ChannelEntry( FrameBuf_Add_u1(pBuf, nChannels); // Channel list - for(it = 0; it < nChannels; it++) + for(it = 0; it < nChannels; it++) FrameBuf_Add_u1(pBuf, channelList[it]); return; @@ -412,13 +412,13 @@ P2PAttr_Make_ChannelList( #if (MULTICHANNEL_SUPPORT == 1) // For Compilation: Only PCI-E Support MultiChannel Now u1Byte uPortConnected20MhzChannel = MultiChannelGetPortConnected20MhzChannel(GetDefaultAdapter(pP2PInfo->pAdapter)); - + MgntActSet_P2PChannelList( - pP2PInfo->pAdapter, - 1, + pP2PInfo->pAdapter, + 1, &uPortConnected20MhzChannel ); - + #endif #endif } @@ -439,7 +439,7 @@ P2PAttr_Make_ChannelList( return; } -VOID +VOID P2PAttr_Make_Noa( IN FRAME_BUF *pBuf, IN u1Byte noaIEIndex, @@ -493,19 +493,19 @@ P2PAttr_Make_NoaFromPsSet( for(itNoaDesc = 0; itNoaDesc < P2P_MAX_NUM_NOA_DESC; itNoaDesc++) { u1Byte countType = 0; - + if(FALSE == pPs->NoASet[itNoaDesc].bNoAEn) continue; if(2 < pPs->NoASet[itNoaDesc].NoACnt || pPs->NoASet[itNoaDesc].NoACnt < 1) countType = 1; - else + else countType = pPs->NoASet[itNoaDesc].NoACnt; - + FrameBuf_Add_u1(pBuf, countType); FrameBuf_Add_le_u4(pBuf, pPs->NoASet[itNoaDesc].NoADur); FrameBuf_Add_le_u4(pBuf, pPs->NoASet[itNoaDesc].NoAInt); } - + P2PAttr_Update_AttrHdrLen(pBuf, pLen); return; @@ -525,7 +525,7 @@ P2PAttr_Make_DevInfo( { u1Byte *pLen = NULL; u1Byte itTypeList = 0; - + FrameBuf_Add_u1(pBuf, P2P_ATTR_DEVICE_INFO); if(NULL == (pLen = FrameBuf_Add(pBuf, 2))) return; @@ -548,7 +548,7 @@ P2PAttr_Make_GroupInfo( IN const RT_WLAN_STA *pCliList ) { - + pu1Byte pLen = NULL; FRAME_BUF tBuf; @@ -563,8 +563,8 @@ P2PAttr_Make_GroupInfo( if(0 == FrameBuf_Length(&tBuf)) { - // Clause 3.2.4: the p2p group owner shall not - // include a p2p group info subelement if it + // Clause 3.2.4: the p2p group owner shall not + // include a p2p group info subelement if it // has zero connected p2p clients return; } @@ -576,7 +576,7 @@ P2PAttr_Make_GroupInfo( return; } -VOID +VOID P2PAttr_Make_GroupId( IN FRAME_BUF *pBuf, IN const pu1Byte grpDevAddr, @@ -596,7 +596,7 @@ P2PAttr_Make_GroupId( } -VOID +VOID P2PAttr_Make_Interface( IN FRAME_BUF *pBuf, IN const pu1Byte devAddr, @@ -632,13 +632,13 @@ P2PAttr_Make_OperatingChannel( FrameBuf_Add_Data(pBuf, country, 3); FrameBuf_Add_u1(pBuf, regClass); FrameBuf_Add_u1(pBuf, channel); - + RT_TRACE_F(COMP_P2P, FrameBuf_DbgLevel(pBuf), ("[%s] country: 0x%02X%02X%02X, reg class: %u, channel: %u\n", MOD_TRACE_TAG, country[0], country[1], country[2], regClass, channel)); return; } -VOID +VOID P2PAttr_Make_InvitationFlags( IN FRAME_BUF *pBuf, IN u1Byte flags diff --git a/network/wlan/WDI/COMMON/P2P_Attribute.h b/network/wlan/WDI/COMMON/P2P_Attribute.h index 305260dd0..a36911f2b 100644 --- a/network/wlan/WDI/COMMON/P2P_Attribute.h +++ b/network/wlan/WDI/COMMON/P2P_Attribute.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_ATTRIBUTE_H @@ -47,7 +47,7 @@ P2PAttr_Make_GoIntent( IN u1Byte intent ); -VOID +VOID P2PAttr_Make_ConfigTimeout( IN FRAME_BUF *pBuf, IN u1Byte goTimeout, @@ -62,20 +62,20 @@ P2PAttr_Make_ListenChannel( IN u1Byte channel ); -VOID +VOID P2PAttr_Make_GroupBssid( IN FRAME_BUF *pBuf, IN const pu1Byte grpBssid ); -VOID +VOID P2PAttr_Make_ExtListenTiming( IN FRAME_BUF *pBuf, IN u2Byte period, IN u2Byte interval ); -VOID +VOID P2PAttr_Make_IntendedIntfAddr( IN FRAME_BUF *pBuf, IN const pu1Byte intfAddr @@ -102,7 +102,7 @@ P2PAttr_Make_ChannelList( IN const P2P_CHANNELS *channels ); -VOID +VOID P2PAttr_Make_Noa( IN FRAME_BUF *pBuf, IN u1Byte noaIEIndex, @@ -137,7 +137,7 @@ P2PAttr_Make_GroupInfo( IN const RT_WLAN_STA *pCliList ); -VOID +VOID P2PAttr_Make_GroupId( IN FRAME_BUF *pBuf, IN const pu1Byte grpDevAddr, @@ -145,7 +145,7 @@ P2PAttr_Make_GroupId( IN u1Byte grpSsidLen ); -VOID +VOID P2PAttr_Make_Interface( IN FRAME_BUF *pBuf, IN const pu1Byte devAddr, @@ -161,7 +161,7 @@ P2PAttr_Make_OperatingChannel( IN u1Byte channel ); -VOID +VOID P2PAttr_Make_InvitationFlags( IN FRAME_BUF *pBuf, IN u1Byte flags diff --git a/network/wlan/WDI/COMMON/P2P_Build.c b/network/wlan/WDI/COMMON/P2P_Build.c index 8b3a901a4..45f8bacea 100644 --- a/network/wlan/WDI/COMMON/P2P_Build.c +++ b/network/wlan/WDI/COMMON/P2P_Build.c @@ -44,9 +44,9 @@ p2p_build_AttrIe( fragLen = P2P_BUILD_MAX_ATTR_LEN_PER_IE; if(NULL == (pLen = p2p_add_IEHdr(pBuf))) break; - + FrameBuf_Add_Data(pBuf, pos, fragLen); - + p2p_write_IeLength(pBuf, pLen); } @@ -63,11 +63,11 @@ p2p_add_IEHdr( ) { u1Byte *pLen = NULL; - + FrameBuf_Add_u1(pBuf, (u1Byte)EID_Vendor); pLen = FrameBuf_Add(pBuf, 1); - + FrameBuf_Add_be_u4(pBuf, P2P_IE_VENDOR_TYPE); return pLen; @@ -102,7 +102,7 @@ p2p_update_IeHdrLen( FrameBuf_Free(pDupAttrBuf); } - + return; } @@ -118,9 +118,9 @@ p2p_add_ActionFrameMacHdr( ) { pu1Byte buf = NULL; - + if(NULL == (buf = FrameBuf_Add(pBuf, 24))) return; - + SET_80211_HDR_FRAME_CONTROL(buf, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(buf, Type_Action); SET_80211_HDR_DURATION(buf, 0); @@ -142,13 +142,13 @@ p2p_add_MgntFrameMacHdr( ) { pu1Byte buf = NULL; - + if(NULL == (buf = FrameBuf_Add(pBuf, 24))) return; - + SET_80211_HDR_FRAME_CONTROL(buf, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(buf, typeSubtype); SET_80211_HDR_DURATION(buf, 0); - + SET_80211_HDR_FRAGMENT_SEQUENCE(buf, 0); SET_80211_HDR_ADDRESS1(buf, dest); SET_80211_HDR_ADDRESS2(buf, src); diff --git a/network/wlan/WDI/COMMON/P2P_Build_Action.c b/network/wlan/WDI/COMMON/P2P_Build_Action.c index 9db51145a..8692df4dc 100644 --- a/network/wlan/WDI/COMMON/P2P_Build_Action.c +++ b/network/wlan/WDI/COMMON/P2P_Build_Action.c @@ -36,7 +36,7 @@ p2p_build_PresenceReqIe( ) { pu1Byte pLen = NULL; - + if(NULL == (pLen = p2p_add_IEHdr(pBuf))) return; P2PAttr_Make_NoaFromPsSet(pBuf, pPs); @@ -55,15 +55,15 @@ p2p_build_PresenceRspIe( ) { pu1Byte pLen = NULL; - + if(NULL == (pLen = p2p_add_IEHdr(pBuf))) return; - + P2PAttr_Make_Status(pBuf, status); - P2PAttr_Make_Noa(pBuf, - pP2PInfo->NoAIEIndex, - pP2PInfo->bOppPS, - pP2PInfo->CTWindow, - P2P_MAX_NUM_NOA_DESC, + P2PAttr_Make_Noa(pBuf, + pP2PInfo->NoAIEIndex, + pP2PInfo->bOppPS, + pP2PInfo->CTWindow, + P2P_MAX_NUM_NOA_DESC, pP2PInfo->NoADescriptors); p2p_update_IeHdrLen(pBuf, pLen); @@ -105,7 +105,7 @@ p2p_Construct_PresenceReq( p2p_build_PresenceReqIe(pBuf, pP2pPs); FrameBuf_Dump(pBuf, 0, DBG_LOUD, __FUNCTION__); - + return; } @@ -117,7 +117,7 @@ p2p_Construct_PresenceRsp( IN u1Byte status, IN FRAME_BUF *pBuf ) -{ +{ // MAC Header p2p_add_ActionFrameMacHdr(pBuf, da, pP2PInfo->DeviceAddress, pP2PInfo->DeviceAddress); @@ -139,7 +139,7 @@ p2p_Copnstruct_GoDiscoverabilityReq( IN u1Byte dialogToken, IN FRAME_BUF *pBuf ) -{ +{ // MAC Header p2p_add_ActionFrameMacHdr(pBuf, da, pP2PInfo->DeviceAddress, pP2PInfo->InterfaceAddress); @@ -154,7 +154,7 @@ p2p_Copnstruct_GoDiscoverabilityReq( return; } -VOID +VOID p2p_Construct_SDReq( IN const P2P_INFO *pP2PInfo, IN FRAME_BUF *pBuf, @@ -178,11 +178,11 @@ p2p_Construct_SDReq( FrameBuf_Add_u1(pBuf, 2); // Legnth FrameBuf_Add_u1(pBuf, 0); // Query Response Length Limit and PAME-BI FrameBuf_Add_u1(pBuf, 0); // Advertisment Protocol ID - + //Query Request Length pQueryReqLen = FrameBuf_Add(pBuf, 2); - // ANQP Query Request + // ANQP Query Request FrameBuf_Add_u1(pBuf, 0xDD); // Info ID, first FrameBuf_Add_u1(pBuf, 0xDD); // Info ID, second pAnqpQueryReqLen = FrameBuf_Add(pBuf, 2); // Lenghth @@ -199,8 +199,8 @@ p2p_Construct_SDReq( FrameBuf_Add_u1(pBuf, tlv->ServiceDesc.ServiceType); // Service Protocol Type FrameBuf_Add_u1(pBuf, tlv->TransactionID); // Service Transaction ID FrameBuf_Add_Data(pBuf, // Query Data - tlv->ServiceDesc.Buffer, - tlv->ServiceDesc.BufferLength); + tlv->ServiceDesc.Buffer, + tlv->ServiceDesc.BufferLength); WriteEF2Byte(pContentLen, // Write back length FrameBuf_Tail(pBuf) - (pContentLen + 2)); @@ -214,7 +214,7 @@ p2p_Construct_SDReq( return; } -VOID +VOID p2p_Construct_SDRsp( IN const P2P_INFO *pP2PInfo, IN FRAME_BUF *pBuf, @@ -228,7 +228,7 @@ p2p_Construct_SDRsp( FunctionIn(COMP_P2P); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bFragment: %u\n", bFrag)); - + // MAC Header p2p_add_ActionFrameMacHdr(pBuf, da, pP2PInfo->DeviceAddress, pP2PInfo->DeviceAddress); @@ -244,7 +244,7 @@ p2p_Construct_SDRsp( // Advertisement Protocol Info IE FrameBuf_Add_u1(pBuf, 108); // Element ID FrameBuf_Add_u1(pBuf, 2); // Legnth - FrameBuf_Add_u1(pBuf, 0x7F); // Query Response Length Limit and PAME-BI. + FrameBuf_Add_u1(pBuf, 0x7F); // Query Response Length Limit and PAME-BI. // The Response Length set to 1111111 PAME-BI is 0 FrameBuf_Add_u1(pBuf, 0); // Advertisment Protocol ID @@ -254,12 +254,12 @@ p2p_Construct_SDRsp( // ANQP Query Response if(!bFrag) {// append the entire ANQP Query Rsp Field - FrameBuf_Add_Data(pBuf, - pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, + FrameBuf_Add_Data(pBuf, + pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "Adding query rsp:\n", - pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, + pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf, pP2PInfo->SDContext.ANQPQueryRspFieldToSendSize); } @@ -270,19 +270,19 @@ p2p_Construct_SDRsp( return; } -VOID +VOID p2p_Construct_SDComebackReq( IN const P2P_INFO *pP2PInfo, IN FRAME_BUF *pBuf, IN const u1Byte *da, IN u1Byte dialogToken ) -{ +{ FunctionIn(COMP_P2P); - + // MAC Header p2p_add_ActionFrameMacHdr(pBuf, da, pP2PInfo->DeviceAddress, da); - + // Action Header p2p_add_PublicActionHdr(pBuf, WLAN_PA_GAS_COMEBACK_REQ, dialogToken); @@ -300,7 +300,7 @@ p2p_Construct_SDComebackRsp( IN u2Byte bytesToCopy, IN BOOLEAN bMoreData ) -{ +{ // // Note: if comeback is used, we send only 1 Service Rsp TLV in the ComebackRsp // @@ -317,11 +317,11 @@ p2p_Construct_SDComebackRsp( p2p_add_PublicActionHdr(pBuf, WLAN_PA_GAS_COMEBACK_RESP, dialogToken); // Status code (11u): 2 octets - FrameBuf_Add_le_u2(pBuf, 0); + FrameBuf_Add_le_u2(pBuf, 0); // GAS Query Response Fragment ID fragId = pP2PInfo->SDContext.FragmentID; - if(bMoreData) + if(bMoreData) SET_FLAG(fragId, BIT7); FrameBuf_Add_u1(pBuf, fragId); @@ -331,7 +331,7 @@ p2p_Construct_SDComebackRsp( // Advertisement Protocol Info IE FrameBuf_Add_u1(pBuf, 108); // Element ID FrameBuf_Add_u1(pBuf, 2); // Legnth - FrameBuf_Add_u1(pBuf, 0x7F); // Query Response Length Limit and PAME-BI. + FrameBuf_Add_u1(pBuf, 0x7F); // Query Response Length Limit and PAME-BI. // The Response Length set to 1111111 PAME-BI is 0 FrameBuf_Add_u1(pBuf, 0); // Advertisment Protocol ID @@ -339,8 +339,8 @@ p2p_Construct_SDComebackRsp( pQueryRspLen = FrameBuf_Add(pBuf, 2); // Payload - FrameBuf_Add_Data(pBuf, - pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf + pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset, + FrameBuf_Add_Data(pBuf, + pP2PInfo->SDContext.ANQPQueryRspFieldToSendBuf + pP2PInfo->SDContext.ANQPQueryRspFieldToSendOffset, bytesToCopy); WriteEF2Byte(pQueryRspLen, FrameBuf_Tail(pBuf) - (pQueryRspLen + 2)); // Write back length @@ -360,15 +360,15 @@ p2p_Construct_AnqpQueryRspField( // // We construct an un-fragmented ANQP Query Rsp Field according to the Service Req TLVs // - + FRAME_BUF fbuf; - + const P2P_SERVICE_RSP_TLV *pSvcRspTLVs = pRspCtx->ServiceRspTLVList; u1Byte *pAnqpQueryRspLen = NULL; - FrameBuf_Init(sizeof(pSdCtx->ANQPQueryRspFieldToSendBuf), - 0, - pSdCtx->ANQPQueryRspFieldToSendBuf, + FrameBuf_Init(sizeof(pSdCtx->ANQPQueryRspFieldToSendBuf), + 0, + pSdCtx->ANQPQueryRspFieldToSendBuf, &fbuf); FrameBuf_Add_u1(&fbuf, 0xDD); @@ -382,17 +382,17 @@ p2p_Construct_AnqpQueryRspField( if(pRspCtx->SDStatus == P2P_SD_STATUS_SUCCESS) { u1Byte itSvcTlv = 0; - + for(itSvcTlv = 0; itSvcTlv < pRspCtx->ServiceRspTLVSize; itSvcTlv++) { u1Byte *pLen = NULL; - + pLen = FrameBuf_Add(&fbuf, 2); FrameBuf_Add_u1(&fbuf, pSvcRspTLVs[itSvcTlv].ServiceDesc.ServiceType); // Service Protocol Type FrameBuf_Add_u1(&fbuf, pSvcRspTLVs[itSvcTlv].TransactionID); // Service Transation ID FrameBuf_Add_u1(&fbuf, pSvcRspTLVs[itSvcTlv].Status); // Status FrameBuf_Add_Data(&fbuf, // Response Data - pSvcRspTLVs[itSvcTlv].ServiceDesc.Buffer, + pSvcRspTLVs[itSvcTlv].ServiceDesc.Buffer, pSvcRspTLVs[itSvcTlv].ServiceDesc.BufferLength); WriteEF2Byte(pLen, FrameBuf_Tail(&fbuf) - (pLen + 2)); // Write back length } diff --git a/network/wlan/WDI/COMMON/P2P_Build_Mgnt.c b/network/wlan/WDI/COMMON/P2P_Build_Mgnt.c index f8f092a98..d734dae29 100644 --- a/network/wlan/WDI/COMMON/P2P_Build_Mgnt.c +++ b/network/wlan/WDI/COMMON/P2P_Build_Mgnt.c @@ -27,17 +27,17 @@ p2p_Make_SupportedRate( FillOctetString(SuppRates, SuppRatesContent, 0); FillOctetString(ExtSuppRates, ExtSuppRatesContent, 0); - SelectSupportedRatesElement(pMgntInfo->dot11CurrentWirelessMode, + SelectSupportedRatesElement(pMgntInfo->dot11CurrentWirelessMode, pMgntInfo->SupportedRates, TRUE, - &SuppRates, + &SuppRates, &ExtSuppRates); // Supported Rates FrameBuf_Add_u1(pBuf, EID_SupRates); FrameBuf_Add_u1(pBuf, (u1Byte)SuppRates.Length); FrameBuf_Add_Data(pBuf, SuppRates.Octet, SuppRates.Length); - + // Extended Supported Rates if(ExtSuppRates.Length != 0) { @@ -54,7 +54,7 @@ p2p_build_TimeStamp( ) { u8Byte timeStamp = 0; - + timeStamp = PlatformGetCurrentTime(); FrameBuf_Add_le_u4(pBuf, (u4Byte)(timeStamp & 0xffffffff)); @@ -73,16 +73,16 @@ p2p_build_ProbeReqIe( pu1Byte pLen = NULL; if(NULL == (pLen = p2p_add_IEHdr(pBuf))) return; - + if(p2p_ActingAs_Go(pP2PInfo)) RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Invalid role\n")); - P2PAttr_Make_Capability(pBuf, + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq 0); - // The P2P Device ID attribute may be present in the - // Probe Request frame when using the discovery + // The P2P Device ID attribute may be present in the + // Probe Request frame when using the discovery // protocol to find a P2P Device with a specific Device // Address. if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) @@ -117,16 +117,16 @@ p2p_build_ProbeRspIe( if(p2p_ActingAs_Go(pP2PInfo)) RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Invalid role\n")); - P2PAttr_Make_Capability(pBuf, + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq 0); P2PAttr_Make_ExtListenTiming(pBuf, pP2PInfo->ExtListenTimingDuration, pP2PInfo->ExtListenTimingPeriod); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -162,8 +162,8 @@ p2p_build_GoProbeRspIe( { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid role\n")); } - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); @@ -171,11 +171,11 @@ p2p_build_GoProbeRspIe( if(P2P_GO == pP2PInfo->Role) P2PAttr_Make_Noa(pBuf, pP2PInfo->NoAIEIndex, pP2PInfo->bOppPS, pP2PInfo->CTWindow, P2P_MAX_NUM_NOA_DESC, pP2PInfo->NoADescriptors); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, - pWps->SecondaryDeviceTypeLength, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, + pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -212,20 +212,20 @@ p2p_build_BeaconIe( { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid role\n")); } - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); P2PAttr_Make_DevId(pBuf, pP2PInfo->DeviceAddress); - P2PAttr_Make_Noa(pBuf, - pP2PInfo->NoAIEIndex, - pP2PInfo->bOppPS, - pP2PInfo->CTWindow, - P2P_MAX_NUM_NOA_DESC, + P2PAttr_Make_Noa(pBuf, + pP2PInfo->NoAIEIndex, + pP2PInfo->bOppPS, + pP2PInfo->CTWindow, + P2P_MAX_NUM_NOA_DESC, pP2PInfo->NoADescriptors); - + p2p_update_IeHdrLen(pBuf, pLen); return; @@ -264,21 +264,21 @@ p2p_build_AssociationReqIe( if(p2p_ActingAs_Go(pP2PInfo)) RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Invalid role\n")); - P2PAttr_Make_Capability(pBuf, + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability, 0); P2PAttr_Make_ExtListenTiming(pBuf, pP2PInfo->ExtListenTimingDuration, pP2PInfo->ExtListenTimingPeriod); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, - pWps->SecondaryDeviceTypeLength, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, + pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); - + p2p_update_IeHdrLen(pBuf, pLen); return; @@ -300,7 +300,7 @@ p2p_build_AssociationReqToWlanApIe( P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability, pP2PInfo->GroupCapability); P2PAttr_Make_Interface(pBuf, pP2PInfo->DeviceAddress, 1, pP2PInfo->InterfaceAddress); - + p2p_update_IeHdrLen(pBuf, pLen); return; @@ -329,13 +329,13 @@ p2p_build_AssociationRspIe( SET_FLAG(grpCap, P2P_GROUP_CAP_GROUP_FORMATION); if(p2p_Check_GroupLimitReached(pP2PInfo)) SET_FLAG(grpCap, P2P_GROUP_CAP_GROUP_LIMIT); - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); P2PAttr_Make_ExtListenTiming(pBuf, pP2PInfo->ExtListenTimingDuration, pP2PInfo->ExtListenTimingPeriod); - + p2p_update_IeHdrLen(pBuf, pLen); return; @@ -379,7 +379,7 @@ p2p_Construct_ProbeReqEx( // WFD IE WFD_AppendProbeReqIEs(pP2PInfo->pAdapter, FrameBuf_Cap(pBuf), &pBuf->os); - + FrameBuf_Dump(pBuf, 0, FrameBuf_DbgLevel(pBuf), __FUNCTION__); return; @@ -393,7 +393,7 @@ p2p_Construct_ProbeReq( { u1Byte ssidLen = P2P_WILDCARD_SSID_LEN; u1Byte *ssidBuf = P2P_WILDCARD_SSID; - + if(P2P_STATE_SCAN == pP2PInfo->State) { ssidLen = 0; @@ -421,7 +421,7 @@ p2p_Construct_ProbeRsp( u1Byte channel = 0; BOOLEAN bToSendProbeRsp = TRUE; - + // MAC Header p2p_add_MgntFrameMacHdr(pBuf, Type_Probe_Rsp, da, pP2PInfo->DeviceAddress, pP2PInfo->DeviceAddress); @@ -453,7 +453,7 @@ p2p_Construct_ProbeRsp( channel = pP2PInfo->ListenChannel; else if(pP2PInfo->State == P2P_STATE_OPERATING) channel = pP2PInfo->OperatingChannel; - else + else channel = pP2PInfo->ListenChannel; FrameBuf_Add_u1(pBuf, EID_DSParms); FrameBuf_Add_u1(pBuf, 1); @@ -514,7 +514,7 @@ P2P_Append_GoProbeRspIe( { FRAME_BUF p2pAttrs; BOOLEAN bToSendProbeRsp = FALSE; - + if(NULL == posProbeReq) {// No probe request. break; @@ -534,7 +534,7 @@ P2P_Append_GoProbeRspIe( // Get assembled P2P attributes p2p_parse_AssembleIe(rfdProbeReq->Buffer.VirtualAddress, rfdProbeReq->PacketLength, OUI_SUB_WIFI_DIRECT, &p2pAttrs); - + // WFDS IE P2PSvc_MakeProbeRspIE(pP2PInfo->pP2PSvcInfo, &p2pAttrs.os, &fbuf, &bToSendProbeRsp); @@ -551,7 +551,7 @@ P2P_Append_GoProbeRspIe( FillOctetString(*posFrame, FrameBuf_MHead(&fbuf), FrameBuf_Length(&fbuf)); FrameBuf_Dump(&fbuf, 0, FrameBuf_DbgLevel(&fbuf), __FUNCTION__); - + return; } @@ -565,15 +565,15 @@ P2P_Append_BeaconIe( MGNT_INFO *pMgntInfo = &pAdapter->MgntInfo; FrameBuf_Init(FRAME_BUF_CAP_UNKNOWN, pMgntInfo->beaconframe.Length, pMgntInfo->beaconframe.Octet, &fbuf); - + if(P2P_ENABLED(pP2PInfo)) { // Additional IE P2P_AddIe_Append(&pP2PInfo->AdditionalIEs, P2P_ADD_IE_BEACON, &fbuf); - + // P2P IE p2p_build_BeaconIe(&fbuf, pP2PInfo); - } + } else {// P2P Managed Function simulator for test only. p2p_build_ManagedIe(&fbuf); @@ -598,10 +598,10 @@ P2P_Append_AssociationReqIe( FrameBuf_Init(FRAME_BUF_CAP_UNKNOWN, posFrame->Length, posFrame->Octet, &fbuf); FrameBuf_SetDbgLevel(&fbuf, DBG_LOUD); - + // Append P2P IE if(P2P_ENABLED(GET_P2P_INFO(pAdapter))) - { + { if(P2PScanListIsGo(pP2PInfo, Frame_pDaddr(*posFrame))) {// to P2P GO p2p_build_AssociationReqIe(&fbuf, pP2PInfo); @@ -616,7 +616,7 @@ P2P_Append_AssociationReqIe( FillOctetString(*posFrame, FrameBuf_MHead(&fbuf), FrameBuf_Length(&fbuf)); FrameBuf_Dump(&fbuf, 0, FrameBuf_DbgLevel(&fbuf), __FUNCTION__); - + return; } @@ -633,7 +633,7 @@ P2P_Append_AssociationRspIe( FrameBuf_Init(FRAME_BUF_CAP_UNKNOWN, posFrame->Length, posFrame->Octet, &fbuf); FrameBuf_SetDbgLevel(&fbuf, DBG_LOUD); - + // Append P2P IE if(P2P_ENABLED(pP2PInfo)) { @@ -659,7 +659,7 @@ P2P_Append_ProbeReqIe( ) { FRAME_BUF fbuf; - + FrameBuf_Init(FRAME_BUF_CAP_UNKNOWN, posFrame->Length, posFrame->Octet, &fbuf); if(P2P_ENABLED(pP2PInfo)) diff --git a/network/wlan/WDI/COMMON/P2P_Build_PublicAction.c b/network/wlan/WDI/COMMON/P2P_Build_PublicAction.c index a048e74d4..92558c571 100644 --- a/network/wlan/WDI/COMMON/P2P_Build_PublicAction.c +++ b/network/wlan/WDI/COMMON/P2P_Build_PublicAction.c @@ -22,7 +22,7 @@ p2p_build_GoNegReqIe( pu1Byte pLen = NULL; u1Byte grpCap = 0; P2P_WPS_ATTRIBUTES *pWps = &pP2PInfo->WpsAttributes; - + u1Byte intent = 0; if(NULL == (pLen = p2p_add_IEHdr(pBuf))) return; @@ -36,8 +36,8 @@ p2p_build_GoNegReqIe( } else grpCap = pP2PInfo->GroupCapability; - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); @@ -54,10 +54,10 @@ p2p_build_GoNegReqIe( P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pP2PInfo->ChannelEntryList); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -80,7 +80,7 @@ p2p_build_GoNegRspIe( pu1Byte pLen = NULL; u1Byte grpCap = 0; PP2P_WPS_ATTRIBUTES pWps = &pP2PInfo->WpsAttributes; - + u1Byte status = 0; u1Byte intent = 0; pu1Byte pGrpDevAddr = NULL; @@ -92,7 +92,7 @@ p2p_build_GoNegRspIe( if(NULL == (pLen = p2p_add_IEHdr(pBuf))) return; pDev = p2p_DevList_Find(&pP2PInfo->devList, da, P2P_DEV_TYPE_DEV); - + if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) status = pP2PInfo->NegotiationResponseStatus; else @@ -108,8 +108,8 @@ p2p_build_GoNegRspIe( } else grpCap = pP2PInfo->GroupCapability; - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); @@ -117,13 +117,13 @@ p2p_build_GoNegRspIe( { intent = pP2PInfo->GOIntent; } - else + else { // TODO: this is bad doing jobs other than making IE here!!! // The tie breaker bit in a GONRsp shall be toggled from the corresponding GONReq // pP2PInfo->GOIntent = (pP2PInfo->GOIntent | !(pP2PInfo->ConnectionContext.ConnectingDevice.GOIntent & 0x01)); - + intent = pP2PInfo->GOIntent; } @@ -137,10 +137,10 @@ p2p_build_GoNegRspIe( else P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pP2PInfo->ChannelEntryList); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -166,23 +166,23 @@ p2p_build_GoNegRspIe( if(pGrpDevAddr) P2PAttr_Make_GroupId(pBuf, pGrpDevAddr, pGrpSsidBuf, grpSsidLen); - + // // Going to be GO: - // The Operating Channel attribute shall indicate the intended Operating Channel - // of the P2P Group. The channel indicated in the Operating Channel attribute shall - // be one of the channels in the Channel List attribute in the GO Negotiation Response + // The Operating Channel attribute shall indicate the intended Operating Channel + // of the P2P Group. The channel indicated in the Operating Channel attribute shall + // be one of the channels in the Channel List attribute in the GO Negotiation Response // frame. // // Going to be Client: - // The Operating Channel attribute may indicate a preferred Operating Channel of the - // P2P Group, or may be omitted. Any channel indicated in the Operating Channel attribute + // The Operating Channel attribute may indicate a preferred Operating Channel of the + // P2P Group, or may be omitted. Any channel indicated in the Operating Channel attribute // shall be one of the channels in the Channel List attribute in the GO Negotiation Response frame. // P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, pP2PInfo->OperatingChannel); p2p_update_IeHdrLen(pBuf, pLen); - + return; } @@ -224,8 +224,8 @@ p2p_build_GoNegConfIe( } else grpCap = pP2PInfo->GroupCapability; - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); @@ -250,18 +250,18 @@ p2p_build_GoNegConfIe( grpSsidLen = pP2PInfo->SSIDLen; } } - + if(pGrpDevAddr) P2PAttr_Make_GroupId(pBuf, pGrpDevAddr, pGrpSsidBuf, grpSsidLen); // - // Going to be GO: - // The Operating Channel attribute shall indicate the intended Operating Channel of the - // P2P Group. The channel indicated in the Operating Channel attribute shall be one of the + // Going to be GO: + // The Operating Channel attribute shall indicate the intended Operating Channel of the + // P2P Group. The channel indicated in the Operating Channel attribute shall be one of the // channels in the Channel List attribute in the GO Negotiation Confirmation frame. // // Going to be Client: - // The Operating Channel attribute in the GO Negotiation Confirmation frame shall be the + // The Operating Channel attribute in the GO Negotiation Confirmation frame shall be the // Operating Channel attribute from the GO Negotiation Response frame. // if(pP2PInfo->ConnectionContext.bGoingToBeGO) @@ -304,7 +304,7 @@ p2p_build_InvitationReqIe( goTimeout = pP2PInfo->GOConfigurationTimeout; cliTimeout = pP2PInfo->ClientConfigurationTimeout; } - else + else {// otherwise, we're either a GO or client in operating phase, wo we don't have to fill the conf time // Ref Clause 3.1.5.1, a normal invitation always have them to be 0 goTimeout = 0; @@ -316,28 +316,28 @@ p2p_build_InvitationReqIe( P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pP2PInfo->ChannelEntryList); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, - pWps->SecondaryDeviceTypeLength, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, + pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, - pWps->DeviceName); + pWps->DeviceName); - P2PAttr_Make_GroupId(pBuf, - pP2PInfo->InvitationContext.GODeviceAddress, - pP2PInfo->InvitationContext.SsidBuf, + P2PAttr_Make_GroupId(pBuf, + pP2PInfo->InvitationContext.GODeviceAddress, + pP2PInfo->InvitationContext.SsidBuf, pP2PInfo->InvitationContext.SsidLen); - + // - // GO: + // GO: // the Operating Channel attribute indicates the Operating Channel of the P2P Group // // Peristent GO: // the Operating Channel attribute indicates the intended Operating Channel of the P2P Group // - // Client: + // Client: // an Operating Channel attribute shall also be present, indicating the Operating Channel of the P2P Group // // Persistent Client: @@ -367,12 +367,12 @@ p2p_build_InvitationReqIe( opChannel = pP2PInfo->InvitationContext.OpChannel; } } - + P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, opChannel); if(pP2PInfo->InvitationContext.bPersistentInvitation) SET_FLAG(invitFlag, P2P_INVITATION_FLAGS_TYPE); - + P2PAttr_Make_InvitationFlags(pBuf, invitFlag); p2p_update_IeHdrLen(pBuf, pLen); @@ -414,7 +414,7 @@ p2p_build_InvitationRspIe( goTimeout = pP2PInfo->GOConfigurationTimeout; cliTimeout = pP2PInfo->ClientConfigurationTimeout; } - else + else {// non persistent case goTimeout = 0; cliTimeout = 0; @@ -426,10 +426,10 @@ p2p_build_InvitationRspIe( P2PAttr_Make_ChannelList(pBuf, pP2PInfo, &pDev->p2p->commonChannels); // - // GO or Persisstent GO: + // GO or Persisstent GO: // intended Operating Channel // - // Client or Persistent Client (optional): + // Client or Persistent Client (optional): // not specified in the spec // if(pP2PInfo->InvitationContext.bPersistentInvitation) @@ -457,7 +457,7 @@ p2p_build_InvitationRspIe( // opChannel = pP2PInfo->InvitationContext.InvitedDevice.OperatingChannel; } - + P2PAttr_Make_OperatingChannel(pBuf, pP2PInfo->CountryString, pP2PInfo->RegulatoryClass, opChannel); p2p_update_IeHdrLen(pBuf, pLen); @@ -497,10 +497,10 @@ p2p_build_DevDiscRspIe( pu1Byte pLen = NULL; if(NULL == (pLen = p2p_add_IEHdr(pBuf))) return; - + P2PAttr_Make_Status(pBuf, status); p2p_update_IeHdrLen(pBuf, pLen); - + return; } @@ -530,16 +530,16 @@ p2p_build_PdReqIe( } else grpCap = pP2PInfo->GroupCapability; - - P2PAttr_Make_Capability(pBuf, + + P2PAttr_Make_Capability(pBuf, pP2PInfo->DeviceCapability & ~P2P_DEV_CAP_CLIENT_DISCOVERABILITY, // this cap valid only in P2P Group Info and AssocReq grpCap); - P2PAttr_Make_DevInfo(pBuf, - pP2PInfo->DeviceAddress, - pWps->ConfigMethod, - &pWps->PrimaryDeviceType, - pWps->SecondaryDeviceTypeLength, + P2PAttr_Make_DevInfo(pBuf, + pP2PInfo->DeviceAddress, + pWps->ConfigMethod, + &pWps->PrimaryDeviceType, + pWps->SecondaryDeviceTypeLength, pWps->SecondaryDeviceTypeList, pWps->DeviceNameLength, pWps->DeviceName); @@ -590,11 +590,11 @@ p2p_add_WpsIeConfigMethods( ) { pu1Byte pLen = NULL; - + FrameBuf_Add_u1(pBuf, (u1Byte)EID_Vendor); pLen = FrameBuf_Add(pBuf, 1); - + FrameBuf_Add_be_u4(pBuf, 0x0050F204); // Version @@ -624,7 +624,7 @@ p2p_add_P2PPublicActionHdr( ) { RT_TRACE_F(COMP_P2P, pBuf->dbgLevel, ("token: %u\n", dialogToken)); - + FrameBuf_Add_u1(pBuf, WLAN_ACTION_PUBLIC); FrameBuf_Add_u1(pBuf, WLAN_PA_VENDOR_SPECIFIC); FrameBuf_Add_be_u4(pBuf, P2P_IE_VENDOR_TYPE); @@ -641,7 +641,7 @@ p2p_Construct_GoNegReq( IN const u1Byte *da, IN u1Byte dialogToken ) -{ +{ FunctionIn(COMP_P2P); // MAC Header @@ -662,15 +662,15 @@ p2p_Construct_GoNegReq( // WFD IE WFD_AppendP2pGoNegReqIEs(pP2PInfo->pAdapter, FrameBuf_Cap(pBuf), &pBuf->os); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s(): intent = %u, tie breaker: %u, dialog token: %u\n", __FUNCTION__, pP2PInfo->GOIntent >> 1, pP2PInfo->GOIntent & 0x01, dialogToken)); - + FrameBuf_Dump(pBuf, 0, DBG_LOUD, __FUNCTION__); - + FunctionOut(COMP_P2P); return; @@ -704,7 +704,7 @@ p2p_Construct_GoNegRsp( // WFD IE WFD_AppendP2pGoNegRspIEs(pP2PInfo->pAdapter, FrameBuf_Cap(pBuf), &pBuf->os); - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s(): intent = %u, tie breaker: %u, dialog token: %u\n", __FUNCTION__, pP2PInfo->GOIntent >> 1, @@ -725,7 +725,7 @@ p2p_Construct_GoNegConf( IN FRAME_BUF *pBuf, IN const u1Byte *da ) -{ +{ FunctionIn(COMP_P2P); // MAC Header @@ -771,7 +771,7 @@ p2p_Construct_InvitationReq( // Additional IE P2P_AddIe_Append(&pP2PInfo->AdditionalIEs, P2P_ADD_IE_INVITATION_REQUEST, pBuf); - + /* Below use octet string ONLY */ { WFD_AppendP2pInvitationReqIEs(pP2PInfo->pAdapter, FrameBuf_Cap(pBuf), &pBuf->os); @@ -795,9 +795,9 @@ p2p_Construct_InvitationRsp( // // Assume that pP2PInfo->Status has been set. // - + FunctionIn(COMP_P2P); - + // MAC Header p2p_add_ActionFrameMacHdr(pBuf, da, pP2PInfo->DeviceAddress, pP2PInfo->DeviceAddress); @@ -809,7 +809,7 @@ p2p_Construct_InvitationRsp( // Additional IE P2P_AddIe_Append(&pP2PInfo->AdditionalIEs, P2P_ADD_IE_INVITATION_RESPONSE, pBuf); - + // WFD IE WFD_AppendP2pInvitationRspIEs(pP2PInfo->pAdapter, FrameBuf_Cap(pBuf), &pBuf->os); @@ -828,7 +828,7 @@ p2p_Construct_DevDiscReq( IN const u1Byte *da, IN const u1Byte *bssid ) -{ +{ FunctionIn(COMP_P2P); // MAC Header @@ -841,7 +841,7 @@ p2p_Construct_DevDiscReq( p2p_build_DevDiscReqIe(pBuf, pP2PInfo); FrameBuf_Dump(pBuf, 0, DBG_LOUD, __FUNCTION__); - + FunctionOut(COMP_P2P); return; @@ -855,7 +855,7 @@ p2p_Construct_DevDiscRsp( IN const u1Byte *da, IN u1Byte status ) -{ +{ FunctionIn(COMP_P2P); // MAC Header @@ -866,9 +866,9 @@ p2p_Construct_DevDiscRsp( // P2P IE p2p_build_DevDiscRspIe(pBuf, pP2PInfo, status); - + FrameBuf_Dump(pBuf, 0, DBG_LOUD, __FUNCTION__); - + FunctionOut(COMP_P2P); return; @@ -995,7 +995,7 @@ p2p_Construct_FakePDRsp( pu1Byte pPdReqFrame = NULL; OCTET_STRING osPdReq, osTmpIe; pu1Byte pPdRspTa = NULL;; - + FunctionIn(COMP_P2P); do @@ -1006,7 +1006,7 @@ p2p_Construct_FakePDRsp( rtStatus = RT_STATUS_INVALID_PARAMETER; break; } - + if(!pRspDev->txFrames[P2P_FID_PD_REQ]) { RT_ASSERT(FALSE, ("pRspDev->txFrames[P2P_FID_PD_REQ] = NULL\n")); @@ -1038,7 +1038,7 @@ p2p_Construct_FakePDRsp( { PacketMakeElement(&(pBuf->os), EID_Vendor, osTmpIe); } - + // WFD IE if(pRspDev->rxFrames[P2P_FID_PROBE_RSP]->frameLen > 0) { @@ -1046,10 +1046,10 @@ p2p_Construct_FakePDRsp( if(osTmpIe.Length > 0) { PacketMakeElement(&(pBuf->os), EID_Vendor, osTmpIe); - } + } } FrameBuf_Dump(pBuf, 0, DBG_LOUD, __FUNCTION__); - }while(FALSE); + }while(FALSE); FunctionOut(COMP_P2P); diff --git a/network/wlan/WDI/COMMON/P2P_Channel.c b/network/wlan/WDI/COMMON/P2P_Channel.c index 121ab9d89..cfbbbe0e0 100644 --- a/network/wlan/WDI/COMMON/P2P_Channel.c +++ b/network/wlan/WDI/COMMON/P2P_Channel.c @@ -47,7 +47,7 @@ p2p_channel_IntersectRegClass( { if(a->channel[ita] != b->channel[itb]) continue; - + res->channel[res->channels++] = a->channel[ita]; if(P2P_MAX_REG_CLASS_CHANNELS == res->channels) return; @@ -62,7 +62,7 @@ p2p_channel_Dump( { u1Byte itRegCls = 0; u1Byte itChnl = 0; - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("# reg class: %u\n", channels->regClasses)); for(itRegCls = 0; itRegCls < channels->regClasses; itRegCls++) @@ -99,7 +99,7 @@ p2p_Channel_Add( for(itRegClass = 0; itRegClass < channels->regClasses; itRegClass++) { P2P_REG_CLASS *pRegCls = &channels->regClass[itRegClass]; - + if(regClass != pRegCls->regClass) continue; @@ -143,9 +143,9 @@ p2p_Channel_Intersect( { u1Byte itRegClsA = 0; u1Byte itRegClsB = 0; - + p2p_Channel_Reset(res); - + if(!a->regClasses || !b->regClasses) return; @@ -188,7 +188,7 @@ p2p_Channel_ChannelListAttrToChannels( { const u1Byte *pos = chnlListAttr; const u1Byte *end = chnlListAttr + chnlListAttrLen; - + if(!chnlListAttr) return FALSE; @@ -209,7 +209,7 @@ p2p_Channel_ChannelListAttrToChannels( // number of channels channels = pos[1]; pos++; - + if(sizeof(regClass->channel) < channels) channels = sizeof(regClass->channel); diff --git a/network/wlan/WDI/COMMON/P2P_Channel.h b/network/wlan/WDI/COMMON/P2P_Channel.h index 17b833a4e..f41218928 100644 --- a/network/wlan/WDI/COMMON/P2P_Channel.h +++ b/network/wlan/WDI/COMMON/P2P_Channel.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_CHANNEL_H diff --git a/network/wlan/WDI/COMMON/P2P_DevList.c b/network/wlan/WDI/COMMON/P2P_DevList.c index d651cbd66..f8ea78316 100644 --- a/network/wlan/WDI/COMMON/P2P_DevList.c +++ b/network/wlan/WDI/COMMON/P2P_DevList.c @@ -22,11 +22,11 @@ p2p_devlist_FreeDev( IN P2P_DEV_LIST *dlist, IN P2P_DEV_LIST_ENTRY *pDev ); - + static const char * p2p_devlist_DevTypeStr( - IN P2P_DEV_TYPE type + IN P2P_DEV_TYPE type ); static @@ -62,7 +62,7 @@ p2p_devlist_RemoveDatedDev( //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Freeing "MACSTR", type: %s for no rx for %llu ms\n", //MAC2STR(pDev->mac), p2p_devlist_DevTypeStr(pDev->type), lastRxElapsed)); - + p2p_devlist_FreeDev(dlist, pDev); nFreedDev++; } @@ -79,7 +79,7 @@ p2p_devlist_RemoveProbeReqOnlyDev( { RT_LIST_ENTRY *pEntry, *pn = NULL; u4Byte nFreedDev = 0; - + RtEntryListForEachSafe(&dlist->list, pEntry, pn) { P2P_DEV_LIST_ENTRY *pDev = (P2P_DEV_LIST_ENTRY *)pEntry; @@ -95,7 +95,7 @@ p2p_devlist_RemoveProbeReqOnlyDev( { //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Freeing "MACSTR", type: %s for we've rx only probe req from it\n", //MAC2STR(pDev->mac), p2p_devlist_DevTypeStr(pDev->type))); - + p2p_devlist_FreeDev(dlist, pDev); nFreedDev++; } @@ -111,13 +111,13 @@ p2p_devlist_AgeFunction( ) { u4Byte nFreedDev = 0; - + nFreedDev += p2p_devlist_RemoveDatedDev(dlist); nFreedDev += p2p_devlist_RemoveProbeReqOnlyDev(dlist); return nFreedDev; } - + static P2P_DEV_LIST_ENTRY * p2p_devlist_NewDev( @@ -128,14 +128,14 @@ p2p_devlist_NewDev( { P2P_DEV_LIST_ENTRY *pDev = NULL; P2P_DEV_INFO *pInfo = NULL; - + if(NULL == (pDev = (P2P_DEV_LIST_ENTRY *)Pool_Acquire(&dlist->entryPool))) { if(!p2p_devlist_AgeFunction(dlist)) { return NULL; } - + pDev = (P2P_DEV_LIST_ENTRY *)Pool_Acquire(&dlist->entryPool); } @@ -172,7 +172,7 @@ p2p_devlist_FreeRxFrames( { u4Byte it = 0; u4Byte start = bActionOnly ? P2P_FID_ACTION_START : 0; - + for(it = start; it < P2P_FID_MAX; it++) { if(pDev->rxFrames[it]) @@ -202,7 +202,7 @@ p2p_devlist_FreeTxFrames( { u4Byte it = 0; u4Byte start = bActionOnly ? P2P_FID_ACTION_START : 0; - + for(it = start; it < P2P_FID_MAX; it++) { if(pDev->txFrames[it]) @@ -251,7 +251,7 @@ p2p_devlist_ParseFrame( { RT_STATUS status = RT_STATUS_SUCCESS; const OCTET_STRING mpdu = {frame, frameLen}; - + if(P2P_FID_ACTION_START <= frameType) status = p2p_parse_Action(&mpdu, DBG_LOUD, msg); else @@ -280,13 +280,13 @@ p2p_devlist_UpdateFrameInfo( { // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_TRACE_F(COMP_P2P, DBG_WARNING, - ("Unable to copy frame, frame size: %u, buf size: %u\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, + ("Unable to copy frame, frame size: %u, buf size: %u\n", frameLen, sizeof(finfo->frame))); - + return RT_STATUS_BUFFER_TOO_SHORT; } - + p2p_MoveMemory(finfo->frame, frame, frameLen); finfo->frameLen = frameLen; finfo->type = type; @@ -320,26 +320,26 @@ p2p_devlist_RxUpdateFrameInfo( ) { RT_STATUS status = RT_STATUS_SUCCESS; - + if(!pEntry->rxFrames[type]) { if(!(pEntry->rxFrames[type] = Pool_Acquire(&dlist->framePool))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Unable to acquire from frame pool\n")); - return RT_STATUS_RESOURCE; + return RT_STATUS_RESOURCE; } } - + status = p2p_devlist_UpdateFrameInfo(dlist, - rfd->PacketLength, - rfd->Buffer.VirtualAddress, - type, - msg->dialogToken, + rfd->PacketLength, + rfd->Buffer.VirtualAddress, + type, + msg->dialogToken, msg, - PlatformGetCurrentTime(), - (msg->_dsParam) ? (msg->dsParam) : (rxChnl), - rfd->Status.RecvSignalPower, - rfd->Status.SignalStrength, + PlatformGetCurrentTime(), + (msg->_dsParam) ? (msg->dsParam) : (rxChnl), + rfd->Status.RecvSignalPower, + rfd->Status.SignalStrength, pEntry->rxFrames[type]); if(RT_STATUS_SUCCESS != status) @@ -370,20 +370,20 @@ p2p_devlist_TxUpdateFrameInfo( if(!(pEntry->txFrames[type] = Pool_Acquire(&dlist->framePool))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Unable to acquire from frame pool\n")); - return RT_STATUS_RESOURCE; + return RT_STATUS_RESOURCE; } } status = p2p_devlist_UpdateFrameInfo(dlist, - FrameBuf_Length(buf), - FrameBuf_Head(buf), - type, - token, + FrameBuf_Length(buf), + FrameBuf_Head(buf), + type, + token, NULL, - PlatformGetCurrentTime(), - channel, - 0, - 0, + PlatformGetCurrentTime(), + channel, + 0, + 0, pEntry->txFrames[type]); if(RT_STATUS_SUCCESS != status) @@ -405,7 +405,7 @@ p2p_devlist_Get( ) { RT_LIST_ENTRY *pEntry = NULL; - + RtEntryListForEach(&dlist->list, pEntry) { P2P_DEV_LIST_ENTRY *pDev = (P2P_DEV_LIST_ENTRY *)pEntry; @@ -418,7 +418,7 @@ p2p_devlist_Get( return pDev; } - + return NULL; } @@ -430,7 +430,7 @@ p2p_devlist_GetGo( ) { RT_LIST_ENTRY *pEntry = NULL; - + RtEntryListForEach(&dlist->list, pEntry) { P2P_DEV_LIST_ENTRY *pDev = (P2P_DEV_LIST_ENTRY *)pEntry; @@ -454,7 +454,7 @@ p2p_devlist_GetGo( return pDev; } } - + return NULL; } @@ -478,7 +478,7 @@ p2p_devlist_RxFrameElapsedTimeMs( IN const P2P_FRAME_INFO *finfo ) { - return (PlatformGetCurrentTime() - finfo->time) / 1000; + return (PlatformGetCurrentTime() - finfo->time) / 1000; } static @@ -488,7 +488,7 @@ p2p_devlist_FrameTypeStr( ) { const char *typeStr = NULL; - + if(P2P_FID_BEACON == type) typeStr = "BEACON"; else if(P2P_FID_PROBE_REQ == type) @@ -509,7 +509,7 @@ p2p_devlist_FrameTypeStr( typeStr = "PdReq"; else if(P2P_FID_PD_RSP == type) typeStr = "PdRsp"; - else + else typeStr = "unknown"; return typeStr; @@ -518,18 +518,18 @@ p2p_devlist_FrameTypeStr( static const char * p2p_devlist_DevTypeStr( - IN P2P_DEV_TYPE type + IN P2P_DEV_TYPE type ) { const char *typeStr = NULL; - + if(P2P_DEV_TYPE_LEGACY == type) typeStr = "Legacy"; else if(P2P_DEV_TYPE_GO == type) typeStr = "GO"; else if(P2P_DEV_TYPE_DEV == type) typeStr = "Device"; - else + else typeStr = "unknown"; return typeStr; @@ -542,7 +542,7 @@ p2p_devlist_DumpFrameInfo( ) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("***\n")); - + // Type RT_TRACE(COMP_P2P, DBG_LOUD, ("type: %s\n", p2p_devlist_FrameTypeStr(finfo->type))); @@ -557,7 +557,7 @@ p2p_devlist_DumpFrameInfo( // Signal strength RT_TRACE(COMP_P2P, DBG_LOUD, ("sig strength: %u\n", finfo->sigStrength)); - + } static @@ -605,7 +605,7 @@ p2p_devlist_DumpDev( // Rx frames RT_TRACE(COMP_P2P, DBG_LOUD, ("Rx frames in chronological order\n")); - + RtEntryListForEach(&pDev->rxFrameQ, pRxFrame) { p2p_devlist_DumpFrameInfo((P2P_FRAME_INFO *)pRxFrame); @@ -613,7 +613,7 @@ p2p_devlist_DumpDev( // Tx frames RT_TRACE(COMP_P2P, DBG_LOUD, ("Tx frames\n")); - + for(it = 0; it < P2P_FID_MAX; it++) { if(!pDev->txFrames[it]) @@ -642,7 +642,7 @@ p2p_devlist_GetCorrespReqActionCode( if(P2P_FID_PD_RSP == frameType) return P2P_FID_PD_REQ; - + return P2P_FID_MAX; } @@ -663,7 +663,7 @@ p2p_DevList_Init( dlist->count = 0; RTInitializeListHead(&dlist->list); dlist->sig = signature; - + Pool_Init(&dlist->entryPool, "DevPool", sizeof(dlist->entryPoolRsvd), dlist->entryPoolRsvd, sizeof(dlist->entryPoolRsvd[0]), 0, DBG_LOUD); Pool_Init(&dlist->p2pDevInfoPool, "P2PDevInfoPool", sizeof(dlist->p2pDevInfoPoolRsvd), dlist->p2pDevInfoPoolRsvd, sizeof(dlist->p2pDevInfoPoolRsvd[0]), 0, DBG_LOUD); Pool_Init(&dlist->framePool, "FramePool", sizeof(dlist->framePoolRsvd), dlist->framePoolRsvd, sizeof(dlist->framePoolRsvd[0]), 0, DBG_LOUD); @@ -678,13 +678,13 @@ p2p_DevList_Flush( ) { RT_LIST_ENTRY *pEntry = NULL; - + RT_ASSERT(signature == dlist->sig, ("Uninitialized list\n")); FunctionIn(COMP_P2P); - + p2p_AcquireLock(&dlist->lock); - + RtEntryListForEach(&dlist->list, pEntry) { P2P_DEV_LIST_ENTRY *pDev = (P2P_DEV_LIST_ENTRY *)pEntry; @@ -705,9 +705,9 @@ p2p_DevList_Free( ) { RT_ASSERT(signature == dlist->sig, ("Uninitialized list\n")); - + p2p_AcquireLock(&dlist->lock); - + p2p_devlist_Flush(dlist); dlist->sig = NULL; @@ -787,7 +787,7 @@ p2p_DevList_RxUpdate( return RT_STATUS_NOT_RECOGNIZED; } - if(NULL != (pDev = p2p_devlist_Get(dlist, mac, P2P_DEV_TYPE_GO)) + if(NULL != (pDev = p2p_devlist_Get(dlist, mac, P2P_DEV_TYPE_GO)) && P2P_FID_PD_RSP == frameType && pDev->txFrames[P2P_FID_PD_REQ] ) @@ -796,7 +796,7 @@ p2p_DevList_RxUpdate( } reqFrameType = p2p_devlist_GetCorrespReqActionCode(frameType); - + do { // Get existing/new device @@ -811,7 +811,7 @@ p2p_DevList_RxUpdate( status = RT_STATUS_INVALID_CONTEXT; break; } - + if(NULL == (pDev = p2p_devlist_NewDev(dlist, mac, type))) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Failed to acquire new dev entry from the pool\n")); @@ -819,8 +819,8 @@ p2p_DevList_RxUpdate( break; } - //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Add "MACSTR", type: %s for rx: %s\n", - //MAC2STR(mac), + //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Add "MACSTR", type: %s for rx: %s\n", + //MAC2STR(mac), //p2p_devlist_DevTypeStr(type), //p2p_devlist_FrameTypeStr(frameType))); } @@ -829,10 +829,10 @@ p2p_DevList_RxUpdate( if(P2P_FID_ACTION_START <= frameType && pDev->rxFrames[frameType] ) - {// updating an action + {// updating an action if(msg->dialogToken == pDev->rxFrames[frameType]->msg->dialogToken) { - //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("rx duplicated %s from "MACSTR", drop it\n", + //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("rx duplicated %s from "MACSTR", drop it\n", // p2p_devlist_FrameTypeStr(frameType), // MAC2STR(mac))); status = RT_STATUS_PKT_DROP; @@ -894,7 +894,7 @@ p2p_DevList_RxUpdate( if(ppDev) *ppDev = pDev; - + return status; } @@ -934,7 +934,7 @@ p2p_DevList_TxUpdate( P2P_DEV_LIST_ENTRY *pDev = NULL; RT_ASSERT(signature == dlist->sig, ("Uninitialized list\n")); - + do { // Get existing/new device @@ -947,8 +947,8 @@ p2p_DevList_TxUpdate( break; } - //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Add "MACSTR", type: %s for tx: %s", - //MAC2STR(mac), + //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Add "MACSTR", type: %s for tx: %s", + //MAC2STR(mac), //p2p_devlist_DevTypeStr(devType), //p2p_devlist_FrameTypeStr(frameType))); } @@ -959,7 +959,7 @@ p2p_DevList_TxUpdate( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("token (%u) specified when updating a mgnt frame, reset it to 0\n", token)); token = 0; } - + if(RT_STATUS_SUCCESS != (status = p2p_devlist_TxUpdateFrameInfo(dlist, pDev, buf, frameType, token, channel))) { break; @@ -970,7 +970,7 @@ p2p_DevList_TxUpdate( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("token updated to: %u\n", token)); }while(FALSE); - + return status; } @@ -997,7 +997,7 @@ p2p_DevList_Find( RT_ASSERT(signature == dlist->sig, ("Uninitialized list\n")); pDev = p2p_devlist_Get(dlist, mac, type); - + return pDev; } @@ -1018,7 +1018,7 @@ p2p_DevList_Get( {// no rx frame since last flush return NULL; } - + return pDev; } @@ -1058,7 +1058,7 @@ p2p_DevList_Translate( if(!pDev->bDirty) { - //RT_TRACE_F(COMP_P2P, DBG_TRACE, + //RT_TRACE_F(COMP_P2P, DBG_TRACE, //("skip "MACSTR" for no rx after previous flush\n", MAC2STR(pDev->mac))); continue; } @@ -1070,14 +1070,14 @@ p2p_DevList_Translate( && !pDev->rxFrames[P2P_FID_PD_REQ] ) { - //RT_TRACE_F(COMP_P2P, DBG_LOUD, + //RT_TRACE_F(COMP_P2P, DBG_LOUD, //("skip "MACSTR" for not rx frames with dev info (no dev name)\n", MAC2STR(pDev->mac))); continue; } - + if(maxDevices <= nCopied) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Unable to copy all descriptors: max: %u, total: %u\n", maxDevices, dlist->count)); status = RT_STATUS_RESOURCE; break; @@ -1089,7 +1089,7 @@ p2p_DevList_Translate( } *pNumDevCopied = nCopied; - + }while(FALSE); return status; @@ -1108,10 +1108,10 @@ p2p_DevList_TranslateDev( RtEntryListForEach(&pDev->rxFrameQ, pRxFrame) { P2P_FRAME_INFO * finfo = (P2P_FRAME_INFO *)pRxFrame; - - p2p_parse_UpdateDevDesc(finfo->frame, - finfo->msg, - finfo->sigStrength, + + p2p_parse_UpdateDevDesc(finfo->frame, + finfo->msg, + finfo->sigStrength, desc); } @@ -1136,7 +1136,7 @@ p2p_DevList_Dump( { p2p_devlist_DumpDev((P2P_DEV_LIST_ENTRY *)pEntry); } - + }while(FALSE); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("@@@\n")); @@ -1161,14 +1161,14 @@ p2p_DevList_RxFrameElapsedTimeMs( ) { RT_ASSERT(signature == dlist->sig, ("Uninitialized list\n")); - + if(!pDev) return 0; if(NULL == pDev->rxFrames[frameType]) return 0; - return p2p_devlist_RxFrameElapsedTimeMs(pDev->rxFrames[frameType]); + return p2p_devlist_RxFrameElapsedTimeMs(pDev->rxFrames[frameType]); } BOOLEAN @@ -1181,7 +1181,7 @@ p2p_DevList_ActionProcessed( { RT_ASSERT(signature == dlist->sig, ("Uninitialized list\n")); RT_ASSERT(P2P_FID_ACTION_START <= frameType, ("%s(): not an action frame: %u\n", __FUNCTION__, frameType)); - + if(!pDev) return FALSE; @@ -1215,7 +1215,7 @@ p2p_DevList_GetDevChnl( chnl = finfo->msg->dsParamBuf[0]; else chnl = finfo->channel; - + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("get from beacon/probe, dsParam exist: %u, chnl: %u\n", finfo->msg->_dsParam ? 1 : 0, chnl)); break; } @@ -1241,7 +1241,7 @@ p2p_DevList_GetDevChnl( else if(P2P_FID_INV_RSP == finfo->type) { P2P_FRAME_INFO *req = dev->txFrames[P2P_FID_INV_REQ]; - + if(req) { chnl = req->channel; @@ -1250,7 +1250,7 @@ p2p_DevList_GetDevChnl( } } else if(P2P_FID_GO_NEG_RSP == finfo->type) - { + { if(finfo->msg->_status && P2P_ATTR_STATUS == finfo->msg->status && finfo->msg->_grpId && !eqMacAddr(finfo->msg->grpDevAddr, finfo->msg->da) // i'm not the go, i.e., peer is the go && finfo->msg->_opChannel diff --git a/network/wlan/WDI/COMMON/P2P_DevList.h b/network/wlan/WDI/COMMON/P2P_DevList.h index 40c06cf21..dadfb1905 100644 --- a/network/wlan/WDI/COMMON/P2P_DevList.h +++ b/network/wlan/WDI/COMMON/P2P_DevList.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_DEV_LIST_H diff --git a/network/wlan/WDI/COMMON/P2P_Indication.c b/network/wlan/WDI/COMMON/P2P_Indication.c index 28a39bcba..915e771ad 100644 --- a/network/wlan/WDI/COMMON/P2P_Indication.c +++ b/network/wlan/WDI/COMMON/P2P_Indication.c @@ -26,7 +26,7 @@ p2p_IndicateEvent( mbObject.Buffer = (pu1Byte) pEventData; mbObject.Length = sizeof(P2P_EVENT_DATA); - + PlatformIndicateP2PEvent(pP2PInfo, eventId, &mbObject); } else @@ -49,9 +49,9 @@ p2p_IndicateActionFrameReceivedWithToken( ) { u1Byte origToken = GET_P2P_PUB_ACT_FRAME_DIALOG_TOKEN(pFrameBuf); - + SET_P2P_PUB_ACT_FRAME_DIALOG_TOKEN(pFrameBuf, token); - + p2p_IndicateActionFrameReceived(pP2PInfo, eventId, rtStatus, pFrameBuf, frameLen); SET_P2P_PUB_ACT_FRAME_DIALOG_TOKEN(pFrameBuf, origToken); @@ -137,14 +137,14 @@ p2p_IndicateActionFrameSendCompleteWithToken( origToken = GET_P2P_PUB_ACT_FRAME_DIALOG_TOKEN(pFrameBuf); SET_P2P_PUB_ACT_FRAME_DIALOG_TOKEN(pFrameBuf, token); } - + p2p_IndicateActionFrameSendComplete(pP2PInfo, eventId, rtStatus, pFrameBuf, frameLen); if(RT_STATUS_SUCCESS == rtStatus) { SET_P2P_PUB_ACT_FRAME_DIALOG_TOKEN(pFrameBuf, origToken); } - + return; } @@ -157,19 +157,19 @@ p2p_IndicatePdReqSent( if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) { // Change dialog token to make sure the token is the same as the previous query. - p2p_IndicateActionFrameSendCompleteWithToken(pP2PInfo, - P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pDev->txFrames[P2P_FID_PD_REQ]->frame, + p2p_IndicateActionFrameSendCompleteWithToken(pP2PInfo, + P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pDev->txFrames[P2P_FID_PD_REQ]->frame, pDev->txFrames[P2P_FID_PD_REQ]->frameLen, pP2PInfo->oidDialogToken); } else { - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pDev->txFrames[P2P_FID_PD_REQ]->frame, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pDev->txFrames[P2P_FID_PD_REQ]->frame, pDev->txFrames[P2P_FID_PD_REQ]->frameLen); } } @@ -183,11 +183,11 @@ p2p_IndicatePdRspReceived( RT_STATUS status = RT_STATUS_SUCCESS; u1Byte *rxFrame = NULL; u2Byte rxFrameLen = 0; - + if(pDev->rxFrames[P2P_FID_PD_RSP]) { RT_ASSERT(pDev->txFrames[P2P_FID_PD_REQ], ("%s(): no corresponding tx frame\n", __FUNCTION__)); - + rxFrame = pDev->rxFrames[P2P_FID_PD_RSP]->frame; rxFrameLen = pDev->rxFrames[P2P_FID_PD_RSP]->frameLen; } @@ -195,27 +195,27 @@ p2p_IndicatePdRspReceived( {// failed to rx rsp frame status = RT_STATUS_FAILURE; } - + // Handle PD req dialog token // Note that if status is not success, frame and frameLen could be 0 - if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) + if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) && RT_STATUS_SUCCESS == status ) { // Change dialog token to make sure the token is the same as the previous query. - p2p_IndicateActionFrameReceivedWithToken(pP2PInfo, - P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, - status, - rxFrame, + p2p_IndicateActionFrameReceivedWithToken(pP2PInfo, + P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, + status, + rxFrame, rxFrameLen, pP2PInfo->oidDialogToken); } else { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, - status, - rxFrame, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, + status, + rxFrame, rxFrameLen); } @@ -278,24 +278,24 @@ p2p_IndicateFakePdRspReceived( if(P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter)) { // Change dialog token to make sure the token is the same as the previous query. - p2p_IndicateActionFrameReceivedWithToken(pP2PInfo, - P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, - rtStatus, - fbuf.os.Octet, + p2p_IndicateActionFrameReceivedWithToken(pP2PInfo, + P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, + rtStatus, + fbuf.os.Octet, fbuf.os.Length, pP2PInfo->oidDialogToken); } else { - p2p_IndicateActionFrameReceived(pP2PInfo, - P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, - rtStatus, - fbuf.os.Octet, + p2p_IndicateActionFrameReceived(pP2PInfo, + P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE, + rtStatus, + fbuf.os.Octet, fbuf.os.Length); } }while(FALSE); - + if(pGenBuf) { ReturnGenTempBuffer (pAdapter, pGenBuf); diff --git a/network/wlan/WDI/COMMON/P2P_Indication.h b/network/wlan/WDI/COMMON/P2P_Indication.h index c530bfcdb..30e3631c1 100644 --- a/network/wlan/WDI/COMMON/P2P_Indication.h +++ b/network/wlan/WDI/COMMON/P2P_Indication.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_INDICATION_H diff --git a/network/wlan/WDI/COMMON/P2P_Internal.h b/network/wlan/WDI/COMMON/P2P_Internal.h index a7ffa58da..a457ba932 100644 --- a/network/wlan/WDI/COMMON/P2P_Internal.h +++ b/network/wlan/WDI/COMMON/P2P_Internal.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_INTERNAL_H @@ -29,10 +29,10 @@ p2p_MoveMemory( IN const VOID *src, IN u4Byte len ); - + int p2p_go_det( - IN u1Byte selfVal, + IN u1Byte selfVal, IN u1Byte peerVal ); @@ -114,7 +114,7 @@ p2p_add_P2PPublicActionHdr( IN u1Byte subtype, IN u1Byte dialogToken ); - + VOID p2p_Construct_GoNegReq( IN P2P_INFO *pP2PInfo, @@ -237,14 +237,14 @@ p2p_Copnstruct_GoDiscoverabilityReq( IN FRAME_BUF *pBuf ); -VOID +VOID p2p_Construct_SDReq( IN const P2P_INFO *pP2PInfo, IN FRAME_BUF *pBuf, IN const u1Byte *da ); -VOID +VOID p2p_Construct_SDRsp( IN const P2P_INFO *pP2PInfo, IN FRAME_BUF *pBuf, @@ -254,7 +254,7 @@ p2p_Construct_SDRsp( IN BOOLEAN bFrag ); -VOID +VOID p2p_Construct_SDComebackReq( IN const P2P_INFO *pP2PInfo, IN FRAME_BUF *pBuf, @@ -493,27 +493,27 @@ p2p_parse_ValidateAttribute( RT_STATUS p2p_parse_P2PIe( IN const FRAME_BUF *pAttr, // a series of P2P attributes - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ); RT_STATUS p2p_parse_WpsIe( IN const FRAME_BUF *pAttr, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ); RT_STATUS p2p_parse_Ies( - IN const OCTET_STRING *posMpdu, + IN const OCTET_STRING *posMpdu, IN u4Byte dbgLevel, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ); RT_STATUS p2p_parse_Action( - IN const OCTET_STRING *posMpdu, + IN const OCTET_STRING *posMpdu, IN u4Byte dbgLevel, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ); RT_STATUS @@ -528,9 +528,9 @@ RT_STATUS p2p_parse_ChannelEntryList( IN u2Byte len, IN const u1Byte *data, - OUT P2P_CHANNELS *channels + OUT P2P_CHANNELS *channels ); - + //--------------------------------------------------------------------------- // P2P_Channel //--------------------------------------------------------------------------- @@ -554,7 +554,7 @@ p2p_Channel_Intersect( IN const P2P_CHANNELS *b, OUT P2P_CHANNELS *res ); - + BOOLEAN p2p_Channel_ChannelListAttrToChannels( IN u2Byte chnlListAttrLen, diff --git a/network/wlan/WDI/COMMON/P2P_Parse.c b/network/wlan/WDI/COMMON/P2P_Parse.c index 4fe34f9f0..603fcf124 100644 --- a/network/wlan/WDI/COMMON/P2P_Parse.c +++ b/network/wlan/WDI/COMMON/P2P_Parse.c @@ -16,10 +16,10 @@ RT_STATUS p2p_parse_Status( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 1) + if(len < 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -38,10 +38,10 @@ RT_STATUS p2p_parse_MinorReasonCode( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 1) + if(len < 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -51,7 +51,7 @@ p2p_parse_MinorReasonCode( msg->minorReasonCode = data[0]; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("%u\n", msg->minorReasonCode)); - + return RT_STATUS_SUCCESS; } @@ -60,10 +60,10 @@ RT_STATUS p2p_parse_Capability( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 2) + if(len < 2) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -76,7 +76,7 @@ p2p_parse_Capability( // pDevDescriptor->Role = P2P_GO; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("devCap: 0x%02X, grpCap: 0x%02X\n", msg->devCap, msg->grpCap)); - + return RT_STATUS_SUCCESS; } @@ -85,10 +85,10 @@ RT_STATUS p2p_parse_DevId( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 6) + if(len < 6) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -98,7 +98,7 @@ p2p_parse_DevId( msg->devIdDevAddr = data; //RT_TRACE_F(COMP_P2P, msg->dbgLevel, (MACSTR "\n", MAC2STR(msg->devIdDevAddr))); - + return RT_STATUS_SUCCESS; } @@ -107,10 +107,10 @@ RT_STATUS p2p_parse_GoIntent( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 1) + if(len < 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -120,7 +120,7 @@ p2p_parse_GoIntent( msg->goIntent = data[0]; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("intent: %u, tie: %u\n", msg->goIntent >> 1, msg->goIntent & 0x01)); - + return RT_STATUS_SUCCESS; } @@ -129,10 +129,10 @@ RT_STATUS p2p_parse_ConfigTimeout( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 2) + if(len < 2) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -143,7 +143,7 @@ p2p_parse_ConfigTimeout( msg->cliConfigTimeout = data[1]; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("goConfigTimeout: %u, cliConfigTimeout: %u\n", msg->goConfigTimeout, msg->cliConfigTimeout)); - + return RT_STATUS_SUCCESS; } @@ -152,10 +152,10 @@ RT_STATUS p2p_parse_ListenChannel( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 5) + if(len < 5) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -164,11 +164,11 @@ p2p_parse_ListenChannel( msg->_listenChannel = data; msg->listenChannel = data[4]; - RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("country: %c%c(0x%02x), class: %u, channel: %u\n", + RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("country: %c%c(0x%02x), class: %u, channel: %u\n", data[0], data[1], data[2], data[3], msg->listenChannel)); - + return RT_STATUS_SUCCESS; } @@ -177,10 +177,10 @@ RT_STATUS p2p_parse_GrpBssid( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 6) + if(len < 6) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -190,7 +190,7 @@ p2p_parse_GrpBssid( msg->grpBssid = data; //RT_TRACE_F(COMP_P2P, msg->dbgLevel, (MACSTR "\n", MAC2STR(msg->grpBssid))); - + return RT_STATUS_SUCCESS; } @@ -199,10 +199,10 @@ RT_STATUS p2p_parse_ExtListenTiming( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 4) + if(len < 4) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -213,7 +213,7 @@ p2p_parse_ExtListenTiming( msg->extListenInterval = ReadEF2Byte(data + 2); RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("period: %u (ms), interval: %u (ms)\n", msg->extListenPeriod, msg->extListenInterval)); - + return RT_STATUS_SUCCESS; } @@ -222,10 +222,10 @@ RT_STATUS p2p_parse_IntendedIntfAddr( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 6) + if(len < 6) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -235,7 +235,7 @@ p2p_parse_IntendedIntfAddr( msg->intfAddr = data; //RT_TRACE_F(COMP_P2P, msg->dbgLevel, (MACSTR "\n", MAC2STR(msg->intfAddr))); - + return RT_STATUS_SUCCESS; } @@ -244,10 +244,10 @@ RT_STATUS p2p_parse_Manageability( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 1) + if(len < 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -257,7 +257,7 @@ p2p_parse_Manageability( msg->manageability = data[0]; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("%u\n", msg->manageability)); - + return RT_STATUS_SUCCESS; } @@ -266,12 +266,12 @@ RT_STATUS p2p_parse_ChannelList( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; - - if(len < 3) + + if(len < 3) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -279,18 +279,18 @@ p2p_parse_ChannelList( msg->_channelList = data; msg->channelListLen = len; - + msg->channelListCountry = pos; pos += 3; - + msg->channelEntryList = pos; msg->channelEntryListLen = (u2Byte)(data + len - pos); - RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("country: %c%c(0x%02x)\n", + RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("country: %c%c(0x%02x)\n", msg->channelListCountry[0], msg->channelListCountry[1], msg->channelListCountry[2])); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "ChannelEntryList:\n", msg->channelEntryList, msg->channelEntryListLen); - + return RT_STATUS_SUCCESS; } @@ -299,12 +299,12 @@ RT_STATUS p2p_parse_NoA( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; - - if(len < 2) + + if(len < 2) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -315,7 +315,7 @@ p2p_parse_NoA( msg->noaIndex = pos[0]; pos += 1; - + msg->noaCtWindowAndOppPsParam = pos[0]; pos += 1; @@ -325,7 +325,7 @@ p2p_parse_NoA( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("index: %u, ctWindowAndOppPsParam: 0x%02X\n", msg->noaIndex, msg->noaCtWindowAndOppPsParam)); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "NoA Descriptors:\n", msg->noaDescriptors, msg->noaDescriptorLen); - + return RT_STATUS_SUCCESS; } @@ -334,13 +334,13 @@ RT_STATUS p2p_parse_DevInfo( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; u1Byte devNameLen = 0; - - if(len < 6 + 2 + 8 + 1) + + if(len < 6 + 2 + 8 + 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -399,7 +399,7 @@ p2p_parse_DevInfo( //MAC2STR(msg->devInfoDevAddr), //ReadN2H2BYTE(msg->primDevType + 0), ReadN2H4BYTE(msg->primDevType + 2), ReadN2H2BYTE(msg->primDevType + 6), //msg->configMethod)); - + return RT_STATUS_SUCCESS; } @@ -408,10 +408,10 @@ RT_STATUS p2p_parse_GrpInfo( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 0) + if(len < 0) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -423,7 +423,7 @@ p2p_parse_GrpInfo( //RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("")); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "Group Info:\n", msg->cliInfoDescList, msg->cliInfoDescListLen); - + return RT_STATUS_SUCCESS; } @@ -432,12 +432,12 @@ RT_STATUS p2p_parse_GrpId( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; - - if(len < 6 || 6 + 32 < len) + + if(len < 6 || 6 + 32 < len) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -460,7 +460,7 @@ p2p_parse_GrpId( //RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("grpDevAddr: " MACSTR "\n", MAC2STR(msg->grpDevAddr))); RT_PRINT_STR(COMP_P2P, msg->dbgLevel, "grpSsid:\n", msg->grpSsid, msg->grpSsidLen); - + return RT_STATUS_SUCCESS; } @@ -469,20 +469,20 @@ RT_STATUS p2p_parse_Interface( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; u1Byte itIntfAddr = 0; - - if(len < 6 + 1) + + if(len < 6 + 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; } msg->_intf = data; - + msg->intfDevAddr = pos; pos += 6; @@ -501,7 +501,7 @@ p2p_parse_Interface( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("intf addr list:\n")); //for(itIntfAddr = 0; itIntfAddr < msg->intfAddrCount; itIntfAddr++) //RT_TRACE_F(COMP_P2P, msg->dbgLevel, (MACSTR "\n", MAC2STR(msg->intfAddrList + 6 * itIntfAddr))); - + return RT_STATUS_SUCCESS; } @@ -510,10 +510,10 @@ RT_STATUS p2p_parse_OpChannel( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 5) + if(len < 5) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -522,11 +522,11 @@ p2p_parse_OpChannel( msg->_opChannel = data; msg->opChannel = data[4]; - RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("country: %c%c(0x%02x), class: %u, channel: %u\n", + RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("country: %c%c(0x%02x), class: %u, channel: %u\n", data[0], data[1], data[2], data[3], msg->opChannel)); - + return RT_STATUS_SUCCESS; } @@ -535,10 +535,10 @@ RT_STATUS p2p_parse_InvitationFlags( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 1) + if(len < 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -559,11 +559,11 @@ RT_STATUS p2p_parse_SvcHash( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { u2Byte itSvcHash = 0; - if(len < 6) + if(len < 6) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -587,10 +587,10 @@ RT_STATUS p2p_parse_SessionInfoDataInfo( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 0) + if(len < 0) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -611,10 +611,10 @@ RT_STATUS p2p_parse_ConnCap( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 1) + if(len < 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -633,19 +633,19 @@ RT_STATUS p2p_parse_AdvId( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; - - if(len < 4 + 6) + + if(len < 4 + 6) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; } msg->_advId = data; - + msg->advId = ReadEF4Byte(pos); pos += 4; @@ -670,8 +670,8 @@ p2p_parse_AdvSvcDesc( ) { const u1Byte *pos = data; - - if(len < 4 + 2 + 1) + + if(len < 4 + 2 + 1) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -708,12 +708,12 @@ RT_STATUS p2p_parse_AdvSvc( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; - - if(len < 0) + + if(len < 0) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -746,12 +746,12 @@ RT_STATUS p2p_parse_SessionId( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { const u1Byte *pos = data; - - if(len < 4 + 6) + + if(len < 4 + 6) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -774,10 +774,10 @@ RT_STATUS p2p_parse_FeatureCap( IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { - if(len < 2) + if(len < 2) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid length: %u\n", len)); return RT_STATUS_INVALID_LENGTH; @@ -797,91 +797,91 @@ p2p_parse_Attributes( IN u1Byte id, IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { RT_STATUS status = RT_STATUS_SUCCESS; - + switch(id) { default: break; - + case P2P_ATTR_STATUS: status = p2p_parse_Status(len, data, msg); break; - + case P2P_ATTR_MINOR_REASON_CODE: status = p2p_parse_MinorReasonCode(len, data, msg); break; - + case P2P_ATTR_CAPABILITY: status = p2p_parse_Capability(len, data, msg); break; - + case P2P_ATTR_DEVICE_ID: status = p2p_parse_DevId(len, data, msg); break; - + case P2P_ATTR_GROUP_OWNER_INTENT: status = p2p_parse_GoIntent(len, data, msg); break; - + case P2P_ATTR_CONFIGURATION_TIMEOUT: status = p2p_parse_ConfigTimeout(len, data, msg); break; - + case P2P_ATTR_LISTEN_CHANNEL: status = p2p_parse_ListenChannel(len, data, msg); break; - + case P2P_ATTR_GROUP_BSSID: status = p2p_parse_GrpBssid(len, data, msg); break; - + case P2P_ATTR_EXT_LISTEN_TIMING: status = p2p_parse_ExtListenTiming(len, data, msg); break; - + case P2P_ATTR_INTENDED_INTERFACE_ADDRESS: status = p2p_parse_IntendedIntfAddr(len, data, msg); break; - + case P2P_ATTR_MANAGEABILITY: status = p2p_parse_Manageability(len, data, msg); break; - + case P2P_ATTR_CHANNEL_LIST: status = p2p_parse_ChannelList(len, data, msg); break; - + case P2P_ATTR_NOTICE_OF_ABSENCE: status = p2p_parse_NoA(len, data, msg); break; - + case P2P_ATTR_DEVICE_INFO: status = p2p_parse_DevInfo(len, data, msg); break; - + case P2P_ATTR_GROUP_INFO: status = p2p_parse_GrpInfo(len, data, msg); break; - + case P2P_ATTR_GROUP_ID: status = p2p_parse_GrpId(len, data, msg); break; - + case P2P_ATTR_INTERFACE: status = p2p_parse_Interface(len, data, msg); break; - + case P2P_ATTR_OP_CHANNEL: status = p2p_parse_OpChannel(len, data, msg); break; - + case P2P_ATTR_INVITATION_FLAGS: status = p2p_parse_InvitationFlags(len, data, msg); break; case P2P_ATTR_SVC_HASH: status = p2p_parse_SvcHash(len, data, msg); break; - + case P2P_ATTR_SESSION_INFO_DATA_INFO: status = p2p_parse_SessionInfoDataInfo(len, data, msg); break; - + case P2P_ATTR_CONN_CAP_INFO: status = p2p_parse_ConnCap(len, data, msg); break; - + case P2P_ATTR_ADV_ID_INFO: status = p2p_parse_AdvId(len, data, msg); break; - + case P2P_ATTR_ADV_SVC_INFO: status = p2p_parse_AdvSvc(len, data, msg); break; - + case P2P_ATTR_SESSION_ID_INFO: status = p2p_parse_SessionId(len, data, msg); break; - + case P2P_ATTR_FEATURE_CAP_INFO: status = p2p_parse_FeatureCap(len, data, msg); break; } @@ -891,7 +891,7 @@ p2p_parse_Attributes( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("parse attr id %u failed, status: 0x%X, attr content:\n", id, status)); RT_PRINT_DATA(COMP_P2P, DBG_WARNING, __FUNCTION__, data, len); } - + return status; } @@ -901,7 +901,7 @@ p2p_parse_WpsAttributes( IN u2Byte type, IN u2Byte len, IN const u1Byte *data, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { RT_STATUS status = RT_STATUS_SUCCESS; @@ -911,7 +911,7 @@ p2p_parse_WpsAttributes( switch(type) { - default: + default: break; case ATTR_CONFIG_METHODS: @@ -936,7 +936,7 @@ p2p_parse_WpsAttributes( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("Device Name:\n")); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "", msg->_wpsDevName, msg->wpsDevNameLen); break; - + case ATTR_DEV_PASSWORD_ID: if(len < 2) { @@ -947,7 +947,7 @@ p2p_parse_WpsAttributes( msg->wpsDevPasswordId = ReadN2H2BYTE(data); RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("dev password id: 0x%04X\n", msg->wpsDevPasswordId)); break; - + case ATTR_MANUFACTURER: if(64 < len) { @@ -959,7 +959,7 @@ p2p_parse_WpsAttributes( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("Manufacturer:\n")); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "", msg->_wpsManufacturer, msg->wpsManufacturerLen); break; - + case ATTR_MODEL_NAME: if(32 < len) { @@ -971,7 +971,7 @@ p2p_parse_WpsAttributes( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("Model Name:\n")); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "", msg->_wpsModelName, msg->wpsModelNameLen); break; - + case ATTR_MODEL_NUMBER: if(32 < len) { @@ -983,7 +983,7 @@ p2p_parse_WpsAttributes( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("Model Number:\n")); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "", msg->_wpsModelNumber, msg->wpsModelNumberLen); break; - + case ATTR_SERIAL_NUMBER: if(32 < len) { @@ -995,7 +995,7 @@ p2p_parse_WpsAttributes( RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("Serial Number:\n")); RT_PRINT_DATA(COMP_P2P, msg->dbgLevel, "", msg->_wpsSerialNumber, msg->wpsSerialNumberLen); break; - + case ATTR_PRIMARY_DEV_TYPE: if(len < 8) { @@ -1005,22 +1005,22 @@ p2p_parse_WpsAttributes( msg->_wpsPrimaryDevType = data; msg->wpsPrimaryDevTypeLen = len; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("PrimDevType(id-oui-subid): %u-0x%08X-%u\n", - ReadN2H2BYTE(msg->_wpsPrimaryDevType + 0), - ReadN2H4BYTE(msg->_wpsPrimaryDevType + 2), + ReadN2H2BYTE(msg->_wpsPrimaryDevType + 0), + ReadN2H4BYTE(msg->_wpsPrimaryDevType + 2), ReadN2H2BYTE(msg->_wpsPrimaryDevType + 6))); break; - + case ATTR_SECONDARY_DEV_TYPE_LIST: msg->_wpsSecDevTypeList = data; msg->wpsSecDevTypeListLen = len; msg->wpsSecDevTypeNum = 0; - + while(pos + 8 <= end) { RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("SecDevType(id-oui-subid)[%u]: %u-0x%08X-%u\n", msg->wpsSecDevTypeNum, - ReadN2H2BYTE(pos + 0), - ReadN2H4BYTE(pos + 2), + ReadN2H2BYTE(pos + 0), + ReadN2H4BYTE(pos + 2), ReadN2H2BYTE(pos + 6))); msg->wpsSecDevTypeNum++; @@ -1072,7 +1072,7 @@ p2p_parse_VendorIEConcat( { OCTET_STRING osIEs; OCTET_STRING osie; - const u1Byte *end, *pos; + const u1Byte *end, *pos; pos = ies; end = ies + iesLen; @@ -1085,7 +1085,7 @@ p2p_parse_VendorIEConcat( while(osie.Length) { if(4 <= osie.Length) - {// for case length equals to 4, FrameBuf_Add_Data will simply copies nothing + {// for case length equals to 4, FrameBuf_Add_Data will simply copies nothing // Copy P2P Attributes, skip OUI (3) and OUI type (1) FrameBuf_Add_Data(pBuf, osie.Octet + 4, osie.Length - 4); } @@ -1096,12 +1096,12 @@ p2p_parse_VendorIEConcat( } pos = osie.Octet + osie.Length; - + FillOctetString(osIEs, pos, (u2Byte)(end - pos)); osie = IEGetElement(osIEs, EID_Vendor, ouiType, OUI_SUBTYPE_DONT_CARE); } - + return; } @@ -1178,7 +1178,7 @@ p2p_parse_ValidateAttribute( ) { u2Byte attrLen = 0; - + // Check if we can read the length field if(end < pos + 3) { @@ -1205,7 +1205,7 @@ static RT_STATUS p2p_parse_P2PIe( IN const FRAME_BUF *pAttr, // a series of P2P attributes - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { RT_STATUS status = RT_STATUS_SUCCESS; @@ -1215,7 +1215,7 @@ p2p_parse_P2PIe( while(pos < end) { u2Byte attrLen = 0; - + // Check if we can read the length field if(end < pos + 3) { @@ -1246,14 +1246,14 @@ p2p_parse_P2PIe( // Parse next attribute pos += 3 + attrLen; } - + return status; } RT_STATUS p2p_parse_WpsIe( IN const FRAME_BUF *pAttr, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { RT_STATUS status = RT_STATUS_SUCCESS; @@ -1264,7 +1264,7 @@ p2p_parse_WpsIe( { u2Byte type = 0; u2Byte len = 0; - + // Check if we can read the length field if(end < pos + 4) { @@ -1300,7 +1300,7 @@ p2p_parse_WpsIe( // Parse next attribute pos += len; } - + return status; } @@ -1309,7 +1309,7 @@ RT_STATUS p2p_parse_Ies( IN const OCTET_STRING *posMpdu, IN u4Byte dbgLevel, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { RT_STATUS status = RT_STATUS_SUCCESS; @@ -1328,7 +1328,7 @@ p2p_parse_Ies( { /* WPS IE */ p2p_parse_AssembleIe(posMpdu->Octet, posMpdu->Length, OUI_SUB_SimpleConfig, &msg->wpsAttributes); - + if(FrameBuf_Length(&msg->wpsAttributes)) { if(RT_STATUS_SUCCESS != (status = p2p_parse_WpsIe(&msg->wpsAttributes, msg))) @@ -1338,10 +1338,10 @@ p2p_parse_Ies( break; } } - + /* P2P IE */ p2p_parse_AssembleIe(posMpdu->Octet, posMpdu->Length, OUI_SUB_WIFI_DIRECT, &msg->p2pAttributes); - + if(FrameBuf_Length(&msg->p2pAttributes)) { if(RT_STATUS_SUCCESS == (status = p2p_parse_P2PIe(&msg->p2pAttributes, msg))) @@ -1369,7 +1369,7 @@ p2p_parse_Ies( msg->devAddr = msg->sa; } }while(FALSE); - + if(RT_STATUS_SUCCESS != status) { p2p_parse_FreeMessage(msg); @@ -1384,7 +1384,7 @@ p2p_parse_Ies( if(os.Length <= 32) { p2p_MoveMemory(msg->ssidBuf, os.Octet, os.Length); - + msg->_ssid = msg->ssidBuf; msg->ssidLen = (u1Byte)os.Length; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("ssid:\n")); @@ -1398,13 +1398,13 @@ p2p_parse_Ies( /* DS Param */ os = PacketGetElement(*posMpdu, EID_DSParms, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); - + if(os.Length) { if(os.Length == 1) { p2p_MoveMemory(msg->dsParamBuf, os.Octet, os.Length); - + msg->_dsParam = msg->dsParamBuf; msg->dsParam = os.Octet[0]; RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("DS Param: %u\n", msg->dsParam)); @@ -1414,15 +1414,15 @@ p2p_parse_Ies( RT_TRACE_F(COMP_P2P, DBG_WARNING, ("invalid ds param len: %u\n", os.Length)); } } - + return status; } RT_STATUS p2p_parse_Action( - IN const OCTET_STRING *posMpdu, + IN const OCTET_STRING *posMpdu, IN u4Byte dbgLevel, - OUT P2P_MESSAGE *msg + OUT P2P_MESSAGE *msg ) { RT_STATUS status = RT_STATUS_SUCCESS; @@ -1440,7 +1440,7 @@ p2p_parse_Action( { RT_TRACE_F(COMP_P2P, msg->dbgLevel, ("dialog token: %u\n", msg->dialogToken)); } - + return status; } @@ -1464,12 +1464,12 @@ p2p_parse_UpdateDevDesc( pDesc->DeviceCapability = msg->devCap; pDesc->GroupCapability = msg->grpCap; } - + cpMacAddr(pDesc->DeviceAddress, msg->devAddr); if(msg->_wpsConfigMethods) pDesc->WpsAttributes.ConfigMethod = msg->wpsConfigMethods; - + if(msg->_wpsDevPasswordId) pDesc->WpsAttributes.DevicePasswdId = msg->wpsDevPasswordId; @@ -1477,19 +1477,19 @@ p2p_parse_UpdateDevDesc( { P2P_WPS_ATTRIBUTES *w = &pDesc->WpsAttributes; - p2p_parse_WpsDevType(msg->primDevType, - &w->PrimaryDeviceType.CategoryId, - w->PrimaryDeviceType.Oui, + p2p_parse_WpsDevType(msg->primDevType, + &w->PrimaryDeviceType.CategoryId, + w->PrimaryDeviceType.Oui, &w->PrimaryDeviceType.SubCategoryId); - + w->SecondaryDeviceTypeLength = msg->numSecDevType; for(it = 0; it < msg->numSecDevType; it++) { P2P_WPS_ATTRIBUTES_DEVICE_TYPE *t = w->SecondaryDeviceTypeList + it; - p2p_parse_WpsDevType(msg->secDevTypeList + it * 6, - &t->CategoryId, - t->Oui, + p2p_parse_WpsDevType(msg->secDevTypeList + it * 6, + &t->CategoryId, + t->Oui, &t->SubCategoryId); } w->DeviceNameLength = msg->devNameLen; @@ -1523,7 +1523,7 @@ p2p_parse_UpdateDevDesc( u1Byte itChnl = 0; u1Byte nChnls = 0; u1Byte opClass = 0; - + if(end <= pos + 2) break; opClass = pos[0]; @@ -1540,20 +1540,20 @@ p2p_parse_UpdateDevDesc( { // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_TRACE_F(COMP_P2P, DBG_WARNING, - ("Unable to record all the channels in the channel entry list, max is %u, discarding channel: %u\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, + ("Unable to record all the channels in the channel entry list, max is %u, discarding channel: %u\n", sizeof(pDesc->ChannelPlanChannel), pos[itChnl])); continue; } - if(DFS_5G_RADAR_CHANNEL(pos[itChnl])) + if(DFS_5G_RADAR_CHANNEL(pos[itChnl])) { - //RT_TRACE_F(COMP_P2P, DBG_WARNING, - //("Discarding radar channel channel: %u\n", + //RT_TRACE_F(COMP_P2P, DBG_WARNING, + //("Discarding radar channel channel: %u\n", //sizeof(pDesc->ChannelPlanChannel), pos[itChnl])); continue; } - + pDesc->ChannelPlanChannel[pDesc->ChannelPlanLength] = pos[itChnl]; pDesc->ChannelPlanLength++; } @@ -1566,7 +1566,7 @@ p2p_parse_UpdateDevDesc( { const u1Byte *pos = msg->cliInfoDescList; const u1Byte *end = msg->cliInfoDescList + msg->cliInfoDescListLen; - + pDesc->P2PClientDescriptorListLength = 0; PlatformZeroMemory(pDesc->P2PClientDescriptorList, sizeof(pDesc->P2PClientDescriptorList)); @@ -1580,7 +1580,7 @@ p2p_parse_UpdateDevDesc( len = pos[0]; pos += 1; - + infoend = pos + len; if(end < infoend) { @@ -1606,9 +1606,9 @@ p2p_parse_UpdateDevDesc( w->ConfigMethod = ReadN2H2BYTE(pos); pos += 2; - pos += p2p_parse_WpsDevType(pos, - &w->PrimaryDeviceType.CategoryId, - w->PrimaryDeviceType.Oui, + pos += p2p_parse_WpsDevType(pos, + &w->PrimaryDeviceType.CategoryId, + w->PrimaryDeviceType.Oui, &w->PrimaryDeviceType.SubCategoryId); w->SecondaryDeviceTypeLength = pos[0]; @@ -1624,9 +1624,9 @@ p2p_parse_UpdateDevDesc( { P2P_WPS_ATTRIBUTES_DEVICE_TYPE *t = w->SecondaryDeviceTypeList + it; - pos += p2p_parse_WpsDevType(pos, - &t->CategoryId, - t->Oui, + pos += p2p_parse_WpsDevType(pos, + &t->CategoryId, + t->Oui, &t->SubCategoryId); } @@ -1668,7 +1668,7 @@ p2p_parse_UpdateDevDesc( if(msg->_dialogToken) pDesc->DialogToken = msg->dialogToken; - + if(msg->_grpBssid) cpMacAddr(pDesc->GroupBssid, msg->grpBssid); @@ -1682,7 +1682,7 @@ p2p_parse_UpdateDevDesc( pDesc->MinorReasonCode = msg->minorReasonCode; if(msg->_extListenTiming) - { + { pDesc->ExtendedListenTimingDuration = msg->extListenInterval; pDesc->ExtendedListenTimingPeriod = msg->extListenPeriod; } @@ -1691,12 +1691,12 @@ p2p_parse_UpdateDevDesc( { // Update only if the signal strength is changed over 5%. if(0 == pDesc->SignalStrength || - (sigStrength > pDesc->SignalStrength + 5) || + (sigStrength > pDesc->SignalStrength + 5) || (pDesc->SignalStrength >= 5 && sigStrength < pDesc->SignalStrength - 5)) { pDesc->SignalStrength = sigStrength; } - } + } if(msg->_wpsManufacturer) { @@ -1708,9 +1708,9 @@ p2p_parse_UpdateDevDesc( if(IsMgntBeacon(pHdr)) // from P2P_OnBeacon { // Get Operating Channel, parse DS Parameter for the channel - if(msg->_dsParam) + if(msg->_dsParam) pDesc->OperatingChannel = msg->dsParam; - + cpMacAddr(pDesc->IntendedP2PInterfaceAddress, msg->sa); } @@ -1721,7 +1721,7 @@ p2p_parse_UpdateDevDesc( if(msg->_dsParam) {// Get Listen/Operating Channel, parse DS Parameter for the channel - if(pDesc->Role == P2P_GO) + if(pDesc->Role == P2P_GO) pDesc->OperatingChannel = msg->dsParam; else if(pDesc->Role == P2P_DEVICE) pDesc->ListenChannel= msg->dsParam; @@ -1729,7 +1729,7 @@ p2p_parse_UpdateDevDesc( } if(IsMgntAsocReq(pHdr)) // from P2P_OnAssocReqAccept - { + { cpMacAddr(pDesc->IntendedP2PInterfaceAddress, msg->sa); } @@ -1740,7 +1740,7 @@ RT_STATUS p2p_parse_ChannelEntryList( IN u2Byte len, IN const u1Byte *data, - OUT P2P_CHANNELS *channels + OUT P2P_CHANNELS *channels ) { RT_STATUS status = RT_STATUS_SUCCESS; @@ -1749,7 +1749,7 @@ p2p_parse_ChannelEntryList( while(pos < end) { - if(data + len - pos < 2) + if(data + len - pos < 2) { RT_TRACE_F(COMP_P2P, DBG_WARNING, ("no valid channel entry list, remain len is: %u\n", (u4Byte)(data + len - pos))); status = RT_STATUS_INVALID_LENGTH; @@ -1758,7 +1758,7 @@ p2p_parse_ChannelEntryList( if(data + len - pos < 2 + pos[1]) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("no valid channel entry list, #chanels is: %u, remain len is: %u\n", pos[1], (u4Byte)(data + len - pos))); status = RT_STATUS_INVALID_LENGTH; break; diff --git a/network/wlan/WDI/COMMON/P2P_ProtocolSpec.h b/network/wlan/WDI/COMMON/P2P_ProtocolSpec.h index 74eb2e589..55562d711 100644 --- a/network/wlan/WDI/COMMON/P2P_ProtocolSpec.h +++ b/network/wlan/WDI/COMMON/P2P_ProtocolSpec.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2015 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: // Defines values specified in the WFA P2P Specification. @@ -15,7 +15,7 @@ #define P2P_MAX_GO_INTENT 15 -typedef enum _P2P_ATTR_ID +typedef enum _P2P_ATTR_ID { P2P_ATTR_STATUS = 0, P2P_ATTR_MINOR_REASON_CODE = 1, @@ -47,7 +47,7 @@ typedef enum _P2P_ATTR_ID P2P_ATTR_ADV_SVC_INFO = 25, P2P_ATTR_SESSION_ID_INFO = 26, P2P_ATTR_FEATURE_CAP_INFO = 27, - + P2P_ATTR_VENDOR_SPECIFIC = 221 }P2P_ATTR_ID, *PP2P_ATTR_ID; @@ -83,7 +83,7 @@ typedef enum _P2P_ACTION_FRAME_TYPES }P2P_ACTION_FRAME_TYPES, *PP2P_ACTION_FRAME_TYPES; // P2P public action frames -typedef enum _P2P_PUBLIC_ACTION_FRAME_TYPES +typedef enum _P2P_PUBLIC_ACTION_FRAME_TYPES { P2P_GO_NEG_REQ = 0, P2P_GO_NEG_RSP = 1, diff --git a/network/wlan/WDI/COMMON/P2P_Public.h b/network/wlan/WDI/COMMON/P2P_Public.h index eeea5cf53..3790f7fde 100644 --- a/network/wlan/WDI/COMMON/P2P_Public.h +++ b/network/wlan/WDI/COMMON/P2P_Public.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_PUBLIC_H @@ -113,7 +113,7 @@ BOOLEAN p2p_validate_DevDiscReq( IN P2P_MESSAGE *msg ); - + BOOLEAN p2p_validate_DevDiscRsp( IN P2P_MESSAGE *msg diff --git a/network/wlan/WDI/COMMON/P2P_Receive.c b/network/wlan/WDI/COMMON/P2P_Receive.c index 858e82313..fbbe4a57c 100644 --- a/network/wlan/WDI/COMMON/P2P_Receive.c +++ b/network/wlan/WDI/COMMON/P2P_Receive.c @@ -27,21 +27,21 @@ p2p_validate_Beacon( ) { BOOLEAN bValid = FALSE; - + do { if(!FrameBuf_Length(&msg->p2pAttributes)) { break; } - - if(!msg->_devId) + + if(!msg->_devId) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev id attr\n")); break; } - if(!msg->_capability) + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; @@ -66,8 +66,8 @@ p2p_validate_ProbeReq( { break; } - - if(!msg->_capability) + + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; @@ -78,10 +78,10 @@ p2p_validate_ProbeReq( // PF #2, some vender don't send ProbeReq with op channel // do not filter } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -98,14 +98,14 @@ p2p_validate_ProbeRsp( { break; } - - if(!msg->_capability) + + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; } - - if(!msg->_devInfo) + + if(!msg->_devInfo) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev info attr\n")); break; @@ -119,7 +119,7 @@ p2p_validate_ProbeRsp( bValid = TRUE; }while(FALSE); - + return bValid; } @@ -132,13 +132,13 @@ p2p_validate_AssocReq( do { - if(!msg->_capability) + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; } - - if(!msg->_devInfo) + + if(!msg->_devInfo) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev info attr\n")); break; @@ -146,7 +146,7 @@ p2p_validate_AssocReq( bValid = TRUE; }while(FALSE); - + return bValid; } @@ -159,21 +159,21 @@ p2p_validate_AssocRsp( do { - /*if(!msg->_status) + /*if(!msg->_status) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no status attr\n")); break; }*/ - - /*if(!msg->_capability) + + /*if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; }*/ - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -183,18 +183,18 @@ p2p_validate_Deauth( ) { BOOLEAN bValid = FALSE; - + do { - /*if(!msg->_minorReasonCode) + /*if(!msg->_minorReasonCode) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no minor reason code attr\n")); break; }*/ - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -212,50 +212,50 @@ p2p_validate_GoNegReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_capability) + + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; } - if(!msg->_goIntent) + if(!msg->_goIntent) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no go intent attr\n")); break; } - if(!msg->_configTimeout) + if(!msg->_configTimeout) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no config timeout attr\n")); break; } - if(!msg->_listenChannel) + if(!msg->_listenChannel) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no listen channel attr\n")); break; } - if(!msg->_intendedIntfAddr) + if(!msg->_intendedIntfAddr) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no intended interface address attr\n")); break; } - if(!msg->_channelList) + if(!msg->_channelList) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no channel list attr\n")); break; } - if(!msg->_devInfo) + if(!msg->_devInfo) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev info attr\n")); break; } - if(!msg->_opChannel) + if(!msg->_opChannel) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no op channel attr\n")); break; @@ -266,10 +266,10 @@ p2p_validate_GoNegReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no WPS device password id attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -290,20 +290,20 @@ p2p_validate_GoNegRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_status) + + if(!msg->_status) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no status attr\n")); break; } - if(!msg->_capability) + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; } - if(!msg->_goIntent) + if(!msg->_goIntent) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no go intent attr\n")); break; @@ -311,19 +311,19 @@ p2p_validate_GoNegRsp( go = p2p_go_det(info->GOIntent, msg->goIntent); - if(!msg->_intendedIntfAddr) + if(!msg->_intendedIntfAddr) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no intended interface address attr\n")); break; } - if(!msg->_channelList) + if(!msg->_channelList) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no channel list attr\n")); break; } - if(!msg->_devInfo) + if(!msg->_devInfo) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev info attr\n")); break; @@ -346,10 +346,10 @@ p2p_validate_GoNegRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("status is success but no WPS device password id attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -368,20 +368,20 @@ p2p_validate_GoNegConfirm( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_status) + + if(!msg->_status) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no status attr\n")); break; } - if(!msg->_capability) + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; } - if(!msg->_channelList) + if(!msg->_channelList) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no channel list attr\n")); break; @@ -393,15 +393,15 @@ p2p_validate_GoNegConfirm( break; } - if(!msg->_opChannel) + if(!msg->_opChannel) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no op channel attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -420,14 +420,14 @@ p2p_validate_InvitationReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_configTimeout) + + if(!msg->_configTimeout) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no config timeout attr\n")); break; } - if(!msg->_grpId) + if(!msg->_grpId) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no group id attr\n")); break; @@ -441,31 +441,31 @@ p2p_validate_InvitationReq( break; } - if(!msg->_channelList) + if(!msg->_channelList) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no channel list attr\n")); break; } - if(!msg->_devInfo) + if(!msg->_devInfo) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev info attr\n")); break; } - if(!msg->_grpId) + if(!msg->_grpId) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no group id attr\n")); break; } - if(!msg->_opChannel && P2P_GO == invitorRole) + if(!msg->_opChannel && P2P_GO == invitorRole) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no op channel attr when invitor role is GO\n")); break; } - if(!msg->_invitationFlags) + if(!msg->_invitationFlags) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no invitation flags attr\n")); break; @@ -473,7 +473,7 @@ p2p_validate_InvitationReq( bValid = TRUE; }while(FALSE); - + return bValid; } @@ -492,14 +492,14 @@ p2p_validate_InvitationRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_status) + + if(!msg->_status) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no status attr\n")); break; } - if(!msg->_channelList) + if(!msg->_channelList) { // Although the channel list attribute is mandatory for the successful case of // invitation response, actually the information is not important because the @@ -520,10 +520,10 @@ p2p_validate_InvitationRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no group bssid attr when invitor role is GO\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -541,22 +541,22 @@ p2p_validate_DevDiscReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_devId) + + if(!msg->_devId) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no device id attr\n")); break; } - if(!msg->_grpId) + if(!msg->_grpId) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no group id attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -574,16 +574,16 @@ p2p_validate_DevDiscRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_status) + + if(!msg->_status) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no status attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -601,14 +601,14 @@ p2p_validate_PDReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_capability) + + if(!msg->_capability) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no capability attr\n")); break; } - if(!msg->_devInfo) + if(!msg->_devInfo) { //RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dev info attr\n")); //break; @@ -623,10 +623,10 @@ p2p_validate_PDReq( } // TODO: if this is a PD req to join our GO, group id is mandatory - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -644,16 +644,16 @@ p2p_validate_PDRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - + if(!msg->_wpsConfigMethods) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no WPS config method attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -671,16 +671,16 @@ p2p_validate_PresenceReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - + if(!msg->_noa) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no noa attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -698,8 +698,8 @@ p2p_validate_PresenceRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - - if(!msg->_status) + + if(!msg->_status) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no status attr\n")); break; @@ -710,10 +710,10 @@ p2p_validate_PresenceRsp( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no noa attr\n")); break; } - + bValid = TRUE; }while(FALSE); - + return bValid; } @@ -731,13 +731,13 @@ p2p_validate_GoDiscoverabilityReq( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("no dialog token\n")); break; } - + // Thter is no Elements field in a GO Discoverability Request frame - + bValid = TRUE; }while(FALSE); - + return bValid; } diff --git a/network/wlan/WDI/COMMON/P2P_SendAction.c b/network/wlan/WDI/COMMON/P2P_SendAction.c index bd6d9ade8..c6415a479 100644 --- a/network/wlan/WDI/COMMON/P2P_SendAction.c +++ b/network/wlan/WDI/COMMON/P2P_SendAction.c @@ -22,83 +22,83 @@ p2p_Send_DumpTxReport( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("pTxProfile: is NULL!!!\n")); return; } - - if(pTxProfile->bPktOk.bVaild) + + if(pTxProfile->bPktOk.bVaild) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bPktOk: %u\n", pTxProfile->bPktOk.Data)); } - else + else { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bPktOk: N/A\n")); } - + if(pTxProfile->bRetryOver.bVaild) - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bRetryOver: %u\n", pTxProfile->bRetryOver.Data));} - else - { + else + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bRetryOver: N/A\n")); } - + if(pTxProfile->bLifeTimeOver.bVaild) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bLifeTimeOver: %u\n", pTxProfile->bLifeTimeOver.Data)); } else - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bLifeTimeOver: N/A\n")); } - + if(pTxProfile->bUnicast.bVaild) - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bUnicast: %u\n", pTxProfile->bUnicast.Data)); } else - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("bUnicast: N/A\n")); } - + if(pTxProfile->uQueueID.bVaild) - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uQueueID: %u\n", pTxProfile->uQueueID.Data)); } else - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uQueueID: N/A\n")); } - + if(pTxProfile->uMacID.bVaild) - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uMacID: %u\n", pTxProfile->uMacID.Data)); } else { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uMacID: N/A\n")); } - + if(pTxProfile->uDataRetryCount.bVaild) - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uDataRetryCount: %u\n", pTxProfile->uDataRetryCount.Data)); } else - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uDataRetryCount: N/A\n")); } - + if(pTxProfile->uQueueTimeUs.bVaild) - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uQueueTimeUs: %u\n", pTxProfile->uQueueTimeUs.Data)); } else - { + { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uQueueTimeUs: N/A\n")); } - - if(pTxProfile->uFinalDataRateIndex.bVaild) + + if(pTxProfile->uFinalDataRateIndex.bVaild) { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uFinalDataRateIndex: %u\n", pTxProfile->uFinalDataRateIndex.Data)); } - else + else { RT_TRACE_F(COMP_P2P, DBG_LOUD, ("uFinalDataRateIndex: N/A\n")); } @@ -117,23 +117,23 @@ p2p_GetSentFrame( ) { BOOLEAN bFound = FALSE; - + do { P2P_DEV_LIST_ENTRY *dev = NULL; FrameBuf_Init(0, 0, NULL, buf); - + if(NULL == (dev = p2p_DevList_Get(&info->devList, devAddr, devType))) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, ("dev not found: %02X:%02X:%02X:%02X:%02X:%02X\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("dev not found: %02X:%02X:%02X:%02X:%02X:%02X\n", devAddr[0], devAddr[1], devAddr[2], devAddr[3], devAddr[4], devAddr[5])); break; } if(NULL == dev->txFrames[frameType]->frame) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, ("no tx frame recorded: %02X:%02X:%02X:%02X:%02X:%02X\n", + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("no tx frame recorded: %02X:%02X:%02X:%02X:%02X:%02X\n", devAddr[0], devAddr[1], devAddr[2], devAddr[3], devAddr[4], devAddr[5])); break; } @@ -158,24 +158,24 @@ p2p_IndicateFrameSent( ) { p2p_DevList_Lock(&info->devList); - + do { FRAME_BUF buf; - + if(!p2p_GetSentFrame(info, devAddr, devType, frameType, &buf)) { break; } - - p2p_IndicateActionFrameSendComplete(info, - eventId, - rtStatus, - buf.os.Octet, + + p2p_IndicateActionFrameSendComplete(info, + eventId, + rtStatus, + buf.os.Octet, buf.os.Length); - + }while(FALSE); - + p2p_DevList_Unlock(&info->devList); return; @@ -188,7 +188,7 @@ p2p_GoNegConfirmSent( IN const RT_TX_FEEDBACK_INFO * const pTxFeedbackInfo ) { - PP2P_INFO pP2PInfo = (pTxFeedbackInfo) ? + PP2P_INFO pP2PInfo = (pTxFeedbackInfo) ? (pTxFeedbackInfo->pContext) : (NULL); u1Byte dataRate = P2P_LOWEST_RATE; @@ -212,14 +212,14 @@ p2p_GoNegConfirmSent( { BOOLEAN bSupportTxReport = FALSE; - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("failed, try again\n")); + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("failed, try again\n")); p2p_Send_DumpTxReport(&pTxFeedbackInfo->TxProfile); p2p_DevList_Lock(&pP2PInfo->devList); - p2p_Send_GoNegConfirm(pP2PInfo, - pP2PInfo->ConnectionContext.ConnectingDevice.DeviceAddress, - pP2PInfo->ConnectionContext.DialogToken, + p2p_Send_GoNegConfirm(pP2PInfo, + pP2PInfo->ConnectionContext.ConnectingDevice.DeviceAddress, + pP2PInfo->ConnectionContext.DialogToken, &bSupportTxReport); p2p_DevList_Unlock(&pP2PInfo->devList); @@ -229,7 +229,7 @@ p2p_GoNegConfirmSent( FunctionOut(COMP_P2P); return; - + } VOID @@ -260,15 +260,15 @@ p2p_PDRspSent( } else { - RT_TRACE(COMP_P2P, DBG_LOUD, ("send failed\n")); + RT_TRACE(COMP_P2P, DBG_LOUD, ("send failed\n")); } P2PSvc_OnPDRspSent(pP2PInfo->pP2PSvcInfo, bSendOk); - + }while(FALSE); FunctionOut(COMP_P2P); - + return; } @@ -302,24 +302,24 @@ p2p_Send_GoNegReq( pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pBuf->Buffer.VirtualAddress, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pBuf->Buffer.VirtualAddress, pTcb->PacketLength); - + if(bSend) { - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_GO_NEG_REQ, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_GO_NEG_REQ, da, P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); - } + } else RT_TRACE_F(COMP_P2P, DBG_LOUD, ("update dev list only\n")); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); return; @@ -345,24 +345,24 @@ p2p_Send_GoNegRsp( FrameBuf_Init(pAdapter->MAX_TRANSMIT_BUFFER_SIZE, 0, pBuf->Buffer.VirtualAddress, &fbuf); FrameBuf_SetDbgLevel(&fbuf, DBG_LOUD); - + p2p_Construct_GoNegRsp(pP2PInfo, dialogToken, &fbuf, da); pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pBuf->Buffer.VirtualAddress, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pBuf->Buffer.VirtualAddress, pTcb->PacketLength); - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_GO_NEG_RSP, - da, P2P_DEV_TYPE_DEV, &fbuf, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_GO_NEG_RSP, + da, P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); - + MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -392,32 +392,32 @@ p2p_Send_GoNegConfirm( pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_GO_NEGOTIATION_CONFIRM_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pBuf->Buffer.VirtualAddress, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_GO_NEGOTIATION_CONFIRM_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pBuf->Buffer.VirtualAddress, pTcb->PacketLength); *pbSupportTxReport = TxFeedbackInstallTxFeedbackInfoForTcb(pAdapter, pTcb); - + if(*pbSupportTxReport) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - RT_TX_FEEDBACK_ID_P2P_NEGO_TX, - pAdapter, + pTcb, + RT_TX_FEEDBACK_ID_P2P_NEGO_TX, + pAdapter, p2p_GoNegConfirmSent, pP2PInfo ); } - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_GO_NEG_CONF, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_GO_NEG_CONF, da, P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); - + MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_TX_SPINLOCK); } @@ -446,19 +446,19 @@ p2p_Send_InvitationReq( pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_INVITATION_REQUEST_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pBuf->Buffer.VirtualAddress, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_INVITATION_REQUEST_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pBuf->Buffer.VirtualAddress, pTcb->PacketLength); - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_INV_REQ, - da, P2P_DEV_TYPE_DEV, &fbuf, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_INV_REQ, + da, P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -487,19 +487,19 @@ p2p_Send_InvitationRsp( pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_INVITATION_RESPONSE_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pBuf->Buffer.VirtualAddress, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_INVITATION_RESPONSE_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pBuf->Buffer.VirtualAddress, pTcb->PacketLength); - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_INV_RSP, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_INV_RSP, da, P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); - + MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -531,7 +531,7 @@ p2p_Send_DevDiscReq( MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -562,10 +562,10 @@ p2p_Send_DevDiscRsp( pTcb->PacketLength = FrameBuf_Length(&fbuf); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Send Packet! status = %d\n", status)); - + MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -594,18 +594,18 @@ p2p_Send_PDReq( // Increase the dialog token. IncreaseDialogToken(pP2PInfo->DialogToken); - + p2p_Construct_PDReq(pP2PInfo, &fbuf, mac, dialogToken, configMethod); pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_PD_REQ, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_PD_REQ, mac, bGo ? P2P_DEV_TYPE_GO : P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); - + MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -640,18 +640,18 @@ p2p_Send_PDRsp( pTcb->PacketLength = FrameBuf_Length(&fbuf); - p2p_IndicateActionFrameSendComplete(pP2PInfo, - P2P_EVENT_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE, - RT_STATUS_SUCCESS, - pBuf->Buffer.VirtualAddress, + p2p_IndicateActionFrameSendComplete(pP2PInfo, + P2P_EVENT_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE, + RT_STATUS_SUCCESS, + pBuf->Buffer.VirtualAddress, pTcb->PacketLength); if(TRUE == (bSupportTxReport = TxFeedbackInstallTxFeedbackInfoForTcb(pAdapter, pTcb))) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - RT_TX_FEEDBACK_ID_P2P_PD_RSP_TX, - pAdapter, + pTcb, + RT_TX_FEEDBACK_ID_P2P_PD_RSP_TX, + pAdapter, p2p_PDRspSent, (PVOID)(pP2PInfo) ); @@ -659,13 +659,13 @@ p2p_Send_PDRsp( if(pbSupportTxReport) *pbSupportTxReport = bSupportTxReport; - p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_PD_RSP, + p2p_DevList_TxUpdate(&pP2PInfo->devList, P2P_FID_PD_RSP, da, P2P_DEV_TYPE_DEV, &fbuf, dialogToken, RT_GetChannelNumber(pP2PInfo->pAdapter)); MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -697,7 +697,7 @@ p2p_Send_PresenceReq( MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -729,7 +729,7 @@ p2p_Send_PresenceRsp( MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -760,7 +760,7 @@ p2p_Send_GoDiscoverabilityReq( MgntSendPacket(pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, dataRate); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -787,10 +787,10 @@ p2p_Send_SDReq( p2p_Construct_SDReq(pP2PInfo, &fbuf, da); pTcb->PacketLength = FrameBuf_Length(&fbuf); - + MgntSendPacket(pP2PInfo->pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_TX_SPINLOCK); return; @@ -818,14 +818,14 @@ p2p_Send_SDRsp( FrameBuf_Init(pAdapter->MAX_TRANSMIT_BUFFER_SIZE, 0, pBuf->Buffer.VirtualAddress, &fbuf); FrameBuf_SetDbgLevel(&fbuf, DBG_LOUD); - + p2p_Construct_SDRsp(pP2PInfo, &fbuf, da, dialogToken, status, bFrag); pTcb->PacketLength = FrameBuf_Length(&fbuf); - + MgntSendPacket(pP2PInfo->pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_TX_SPINLOCK); return; @@ -856,7 +856,7 @@ p2p_Send_SDComebackReq( MgntSendPacket(pP2PInfo->pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_TX_SPINLOCK); return; @@ -889,7 +889,7 @@ p2p_Send_SDComebackRsp( MgntSendPacket(pP2PInfo->pAdapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } - + PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_TX_SPINLOCK); return; diff --git a/network/wlan/WDI/COMMON/P2P_SendMgnt.c b/network/wlan/WDI/COMMON/P2P_SendMgnt.c index b465d459a..1b18a86bd 100644 --- a/network/wlan/WDI/COMMON/P2P_SendMgnt.c +++ b/network/wlan/WDI/COMMON/P2P_SendMgnt.c @@ -35,9 +35,9 @@ p2p_Send_ProbeRsp( if(MgntGetBuffer(pP2PInfo->pAdapter, &pTcb, &pBuf)) { FRAME_BUF fbuf; - + FrameBuf_Init(pP2PInfo->pAdapter->MAX_TRANSMIT_BUFFER_SIZE, 0, pBuf->Buffer.VirtualAddress, &fbuf); - + if(p2p_Construct_ProbeRsp(&fbuf, pP2PInfo, da, rfdProbeReq, posProbeReq, posAttrs)) { pTcb->PacketLength = FrameBuf_Length(&fbuf); @@ -51,7 +51,7 @@ p2p_Send_ProbeRsp( ReturnTCB(pP2PInfo->pAdapter, pTcb, RT_STATUS_SUCCESS); } } - + PlatformReleaseSpinLock(pP2PInfo->pAdapter, RT_TX_SPINLOCK); } diff --git a/network/wlan/WDI/COMMON/P2P_Synch.h b/network/wlan/WDI/COMMON/P2P_Synch.h index d2a7e3b35..f3d3ced8a 100644 --- a/network/wlan/WDI/COMMON/P2P_Synch.h +++ b/network/wlan/WDI/COMMON/P2P_Synch.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_P2P_LOCK_H diff --git a/network/wlan/WDI/COMMON/P2P_TempPublic.h b/network/wlan/WDI/COMMON/P2P_TempPublic.h index 33d389e31..b25a8baf7 100644 --- a/network/wlan/WDI/COMMON/P2P_TempPublic.h +++ b/network/wlan/WDI/COMMON/P2P_TempPublic.h @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //------------------------------------------------------------------------------ // // Description: @@ -24,7 +24,7 @@ typedef struct _P2P_MESSAGE u1Byte bssid[6]; u1Byte *devAddr; - + /* IE raw data */ FRAME_BUF p2pAttributes; // concatenated P2P attributes FRAME_BUF wpsAttributes; // concatenated WPS attributes @@ -37,53 +37,53 @@ typedef struct _P2P_MESSAGE /* P2P IE, pointers into the raw IE data */ const u1Byte *_status; u1Byte status; - + const u1Byte *_minorReasonCode; u1Byte minorReasonCode; - + const u1Byte *_capability; u1Byte grpCap; u1Byte devCap; - + const u1Byte *_devId; const u1Byte *devIdDevAddr; - + const u1Byte *_goIntent; u1Byte goIntent; - + const u1Byte *_configTimeout; u1Byte goConfigTimeout; u1Byte cliConfigTimeout; - + const u1Byte *_listenChannel; u1Byte listenChannel; - + const u1Byte *_grpBssid; const u1Byte *grpBssid; - + const u1Byte *_extListenTiming; u2Byte extListenPeriod; u2Byte extListenInterval; - + const u1Byte *_intendedIntfAddr; const u1Byte *intfAddr; - + const u1Byte *_manageability; u1Byte manageability; - + const u1Byte *_channelList; u2Byte channelListLen; const u1Byte *channelListCountry; u2Byte channelEntryListLen; const u1Byte *channelEntryList; - + const u1Byte *_noa; u2Byte noaLen; u1Byte noaIndex; u1Byte noaCtWindowAndOppPsParam; u2Byte noaDescriptorLen; const u1Byte *noaDescriptors; - + const u1Byte *_devInfo; const u1Byte *devInfoDevAddr; u2Byte configMethod; @@ -92,24 +92,24 @@ typedef struct _P2P_MESSAGE const u1Byte *secDevTypeList; u1Byte devNameLen; const u1Byte *devName; - + const u1Byte *_grpInfo; u2Byte cliInfoDescListLen; const u1Byte *cliInfoDescList; - + const u1Byte *_grpId; const u1Byte *grpDevAddr; u1Byte grpSsidLen; const u1Byte *grpSsid; - + const u1Byte *_intf; const u1Byte *intfDevAddr; u1Byte intfAddrCount; const u1Byte *intfAddrList; - + const u1Byte *_opChannel; u1Byte opChannel; - + const u1Byte *_invitationFlags; u1Byte invitationFlags; @@ -118,18 +118,18 @@ typedef struct _P2P_MESSAGE u2Byte svcHashLen; u2Byte svcHashNum; const u1Byte *svcHashList; - + const u1Byte *_sessionInfoDataInfo; u2Byte sessionInfoLen; const u1Byte *sessionInfo; - + const u1Byte *_connCap; u1Byte connCap; - + const u1Byte *_advId; u4Byte advId; const u1Byte *svcMac; - + const u1Byte *_advSvc; u2Byte advSvcLen; u2Byte advSvcNum; @@ -137,8 +137,8 @@ typedef struct _P2P_MESSAGE const u1Byte *_sessionId; u4Byte sessionId; const u1Byte *sessionMac; - - const u1Byte *_featureCap; + + const u1Byte *_featureCap; u2Byte featureCap; /* WPS IE */ @@ -147,19 +147,19 @@ typedef struct _P2P_MESSAGE const u1Byte *_wpsDevName; u2Byte wpsDevNameLen; - + const u1Byte *_wpsDevPasswordId; // Device password id u2Byte wpsDevPasswordId; - + const u1Byte *_wpsManufacturer; // WPS manufacturer u2Byte wpsManufacturerLen; - + const u1Byte *_wpsModelName; // WPS model name u2Byte wpsModelNameLen; - + const u1Byte *_wpsModelNumber; // WPS model number u2Byte wpsModelNumberLen; - + const u1Byte *_wpsSerialNumber; // WPS serial number u2Byte wpsSerialNumberLen; @@ -169,7 +169,7 @@ typedef struct _P2P_MESSAGE const u1Byte *_wpsSecDevTypeList; u2Byte wpsSecDevTypeListLen; u1Byte wpsSecDevTypeNum; // Number of secondary device type - + const u1Byte *_wpsUuidE; u2Byte wpsUuidELen; @@ -186,12 +186,12 @@ typedef struct _P2P_MESSAGE /* Debug */ u4Byte dbgLevel; RT_STATUS rtStatus; - + }P2P_MESSAGE; #define P2P_MAX_DEV_LIST 256 #define P2P_MAX_P2P_DEV_INFO_POOL_ENTRIES 32 -#define P2P_MAX_FRAME_POOL_ENTRIES 256 +#define P2P_MAX_FRAME_POOL_ENTRIES 256 #define P2P_MAX_FRAME_BUF_SIZE 640 #define P2P_MAX_MSG_POOL_ENTRIES 32 @@ -222,8 +222,8 @@ typedef enum _P2P_FRAME_TYPE typedef struct _P2P_FRAME_INFO { RT_LIST_ENTRY list; - - // Contains the raw frame + + // Contains the raw frame u2Byte frameLen; u1Byte frame[P2P_MAX_FRAME_BUF_SIZE]; P2P_FRAME_TYPE type; @@ -262,7 +262,7 @@ typedef struct _P2P_DEV_LIST_ENTRY { RT_LIST_ENTRY list; - // TA from the received frame, if from a P2P Device, it is the Device + // TA from the received frame, if from a P2P Device, it is the Device // Address, otherwise it is either the Interface Address or the BSSID u1Byte mac[6]; diff --git a/network/wlan/WDI/COMMON/P2P_Util.c b/network/wlan/WDI/COMMON/P2P_Util.c index a1f3666c7..1ca0f5c9e 100644 --- a/network/wlan/WDI/COMMON/P2P_Util.c +++ b/network/wlan/WDI/COMMON/P2P_Util.c @@ -23,7 +23,7 @@ p2p_MoveMemory( IN u4Byte len ) { - u4Byte it = 0; + u4Byte it = 0; for(it = 0; it < len; it++) *(((u1Byte *)dest) + it) = *(((u1Byte *)src) + it); @@ -31,7 +31,7 @@ p2p_MoveMemory( int p2p_go_det( - IN u1Byte selfVal, + IN u1Byte selfVal, IN u1Byte peerVal ) { @@ -40,7 +40,7 @@ p2p_go_det( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("self intent: %u, tie: %u, peer intent: %u, tie: %u\n", selfVal >> 1, selfVal & 0x01, peerVal >> 1, peerVal & 0x01)); - + if(selfIntent == peerIntent) { if (P2P_MAX_GO_INTENT == selfIntent) @@ -57,11 +57,11 @@ p2p_go_det( BOOLEAN p2p_ActingAs_Go( IN P2P_INFO *pP2PInfo - ) + ) { BOOLEAN bGo = FALSE; - ADAPTER *pExtAdapter = P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) - ? pP2PInfo->pAdapter + ADAPTER *pExtAdapter = P2P_ADAPTER_OS_SUPPORT_P2P(pP2PInfo->pAdapter) + ? pP2PInfo->pAdapter : GetFirstGOPort(pP2PInfo->pAdapter); bGo = (P2P_GO == pP2PInfo->Role && ACTING_AS_AP(pExtAdapter)); // copied from P2PMakeP2PCapability @@ -83,7 +83,7 @@ p2p_Doing_Provisioning( IN const P2P_INFO *pP2PInfo ) { - PMGNT_INFO pDefaultMgntInfo = &(GetDefaultAdapter(pP2PInfo->pAdapter)->MgntInfo); + PMGNT_INFO pDefaultMgntInfo = &(GetDefaultAdapter(pP2PInfo->pAdapter)->MgntInfo); if(0 < GET_SIMPLE_CONFIG_IE_LEN(pDefaultMgntInfo) && GET_SIMPLE_CONFIG_ENABLED(pDefaultMgntInfo)) { @@ -122,7 +122,7 @@ p2p_MessageSrcType( { return P2P_DEV_TYPE_LEGACY; } - + if(msg->_dialogToken) {// action frame if(msg->_capability) @@ -169,7 +169,7 @@ p2p_FindClientInfoByDevAddr( ) { BOOLEAN bFound = FALSE; - + if(msg->_grpInfo && TEST_FLAG(msg->grpCap, P2P_GROUP_CAP_GROUP_OWNER)) { const u1Byte *pos = msg->cliInfoDescList; @@ -185,7 +185,7 @@ p2p_FindClientInfoByDevAddr( len = pos[0]; pos += 1; - + infoend = pos + len; if(end < infoend) { @@ -211,7 +211,7 @@ p2p_FindClientInfoByDevAddr( pos = infoend; } } - } + } return bFound; } diff --git a/network/wlan/WDI/COMMON/ParserGen.c b/network/wlan/WDI/COMMON/ParserGen.c index df264db25..bbd37730c 100644 --- a/network/wlan/WDI/COMMON/ParserGen.c +++ b/network/wlan/WDI/COMMON/ParserGen.c @@ -3,16 +3,16 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: ParserGen.c - + Abstract: Parse MSDU to match the specified type, fetch fixed offset. - + Major Change History: When Who What ---------- --------------- ------------------------------- 2007-06-11 shienchang Create. 2008-03-11 Bruce Modify from 818xB. - + --*/ #include "Mp_Precomp.h" @@ -231,14 +231,14 @@ RuleMatchingProcess( pRuleSet[0] = pParser->pParseRules; pRuleSet[1] = GPGlobalRule; - + while ( i < sizeof(pRuleSet) / sizeof(PGP_RULE) ) - { + { // // Go through parser's rules & global rules. // bMatched = FALSE; - + for (pRule = pRuleSet[i]; (pRule != NULL) && (pRule->CurrProtocol != 0); pRule ++) @@ -250,7 +250,7 @@ RuleMatchingProcess( pToken, pParser); if (bMatched) - break; + break; } } @@ -264,12 +264,12 @@ RuleMatchingProcess( { break; } - } + } else i ++; } - if (!bMatched) + if (!bMatched) { DbgProtocol(pToken->currProtocol); if (pToken->ProtocolCount < MAX_PROTOCOL_NUM) @@ -294,16 +294,16 @@ MatchingByRule( u1Byte SigBuffer[MAX_SIG_LENGTH]; BOOLEAN bApply = FALSE; BOOLEAN bMatched = FALSE; - BOOLEAN bAdv=FALSE; + BOOLEAN bAdv=FALSE; u4Byte currIndex, currOffset; u4Byte hdrLen=0; - + if ( pRule->SigLength <= MAX_SIG_LENGTH) { currIndex = pToken->currBufferIndex; currOffset = pToken->currBufferOffset; hdrLen = PROTO_UNKNOWN_HDRLEN; - + // // Check signature. // case 1: if signature is unknown, invoke the customer routine @@ -338,18 +338,18 @@ MatchingByRule( NULL, 0); } - + if (bApply && bAdv) { DbgProtocol(pToken->currProtocol); if (pToken->ProtocolCount < MAX_PROTOCOL_NUM) pToken->ProtocolSuite[pToken->ProtocolCount++] = pToken->currProtocol; - + if (pRule->NextProtocol != PROTO_UNKNOWN) pToken->currProtocol = pRule->NextProtocol; bMatched = TRUE; } - + } else { @@ -391,13 +391,13 @@ MatchingByRule( DbgProtocol(pToken->currProtocol); if (pToken->ProtocolCount < MAX_PROTOCOL_NUM) pToken->ProtocolSuite[pToken->ProtocolCount++] = pToken->currProtocol; - + if (pRule->NextProtocol != PROTO_UNKNOWN) pToken->currProtocol = pRule->NextProtocol; bMatched = TRUE; } - } - + } + } } else @@ -439,13 +439,13 @@ GetSignatureAndAdvanceToNextProtocol( IN u4Byte DataBufLength ) { - + if (pDataBuffer!=NULL && DataBufLength!=0) { - if (AdvanceAndGetDataByOffset(pToken, - DataOffset, + if (AdvanceAndGetDataByOffset(pToken, + DataOffset, FALSE, - pDataBuffer, + pDataBuffer, DataBufLength)) { if (AdvanceAndGetDataByOffset(pToken, @@ -467,7 +467,7 @@ GetSignatureAndAdvanceToNextProtocol( 0)) { return TRUE; - } + } } return FALSE; @@ -508,22 +508,22 @@ GetNextLine( u4Byte BytesRead = 0; u4Byte i, j; u4Byte start; - + PlatformZeroMemory(pOutBuffer, OutBufferLen); - + for(i = pToken->currBufferIndex; i < pToken->BufferCount; i ++) { - if (i == pToken->currBufferIndex) + if (i == pToken->currBufferIndex) start = pToken->currBufferOffset; else start = 0; - + for (j = start; j < pToken->BufferList[i].Length; j ++) { pOutBuffer[BytesRead ++] = pToken->BufferList[i].VirtualAddress[j]; - + if (pOutBuffer[BytesRead-2]==0x0d && - pOutBuffer[BytesRead-1]==0x0a) + pOutBuffer[BytesRead-1]==0x0a) { if (!bNoAdvance) { @@ -581,11 +581,11 @@ UngetLine( for (i = pToken->currBufferIndex + 1; i > 0; i --) { - if (i==pToken->currBufferIndex+1) + if (i==pToken->currBufferIndex+1) len = pToken->currBufferOffset; else len = pToken->BufferList[i-1].Length; - + for (j = len; j > 0; j --) { if (pToken->BufferList[i-1].VirtualAddress[j-1] == 0x0a) @@ -660,7 +660,7 @@ AdvanceAndGetDataByOffset( u4Byte tmpIndex=0, tmpOffset=0; BOOLEAN bOnlyAdvance = (pDataBuffer==NULL || DataBufLength==0) ? TRUE : FALSE; BOOLEAN bOnlyAdvanceComplete = FALSE; - + for(i = pToken->currBufferIndex;i < pToken->BufferCount; i ++) { if(pToken->BufferList[i].Length==0) @@ -674,12 +674,12 @@ AdvanceAndGetDataByOffset( { len = pToken->BufferList[i].Length; } - + for (; (BytesRead!=DataBufLength) || bOnlyAdvance; BytesRead ++) { if ( (len + offset) > (DataOffset + BytesRead) ) { - u4Byte ByteIndexToCopy = + u4Byte ByteIndexToCopy = (i == pToken->currBufferIndex) ? (DataOffset+BytesRead + pToken->currBufferOffset ) - offset : (DataOffset+BytesRead) - offset; @@ -693,7 +693,7 @@ AdvanceAndGetDataByOffset( tmpIndex = i; tmpOffset = ByteIndexToCopy; - if (bOnlyAdvance) + if (bOnlyAdvance) { bOnlyAdvanceComplete = TRUE; break; @@ -763,8 +763,8 @@ GPUseHPParser( u4Byte nodeIndex = 0; u4Byte currNode=0, nextNode=0; PRT_LIST_ENTRY pListEntry; - - if (pParser->pParsingTree == NULL) + + if (pParser->pParsingTree == NULL) { pParser->bUseHP = FALSE; return; @@ -778,8 +778,8 @@ GPUseHPParser( for (pRule = pRuleSet[i]; (pRule != NULL) && (pRule->CurrProtocol != 0); pRule ++) - { - for (j = 0; j < nodeIndex; j ++) + { + for (j = 0; j < nodeIndex; j ++) { pNode = GP_HP_GET_NODE_BY_INDEX(pParser->pParsingTree, j); if (pNode->ProtocolId == pRule->CurrProtocol) @@ -788,7 +788,7 @@ GPUseHPParser( break; } } - if (j == nodeIndex) + if (j == nodeIndex) { currNode = nodeIndex; pNode = GP_HP_GET_NODE_BY_INDEX(pParser->pParsingTree, currNode); @@ -796,7 +796,7 @@ GPUseHPParser( pNode->bUsed = TRUE; RTInitializeListHead(&(pNode->Link)); nodeIndex ++; - if (nodeIndex == MAX_HP_PROTOCOL_PER_PARSER) + if (nodeIndex == MAX_HP_PROTOCOL_PER_PARSER) { pParser->bUseHP = FALSE; return; @@ -820,7 +820,7 @@ GPUseHPParser( pNode->bUsed = TRUE; RTInitializeListHead(&(pNode->Link)); nodeIndex++; - if (nodeIndex == MAX_HP_PROTOCOL_PER_PARSER) + if (nodeIndex == MAX_HP_PROTOCOL_PER_PARSER) { pParser->bUseHP = FALSE; return; @@ -843,17 +843,17 @@ GPUseHPParser( break; } } - + pEntry->pRule = pRule; pEntry->index = (u1Byte)nextNode; RTInsertTailList(&(pNode->Link), &(pEntry->Link)); entryIndex++; - if (entryIndex == MAX_HP_RULES_PER_PARSER) + if (entryIndex == MAX_HP_RULES_PER_PARSER) { pParser->bUseHP = FALSE; return; } - + } } @@ -884,17 +884,17 @@ GPParserHandlerEthernet( if (pSigBuffer == NULL) return FALSE; typeLength = N2H2BYTE( *((UNALIGNED pu2Byte)pSigBuffer) ); - + switch (NextProtocol) { case PROTO_IP: - if (typeLength == 0x0800) + if (typeLength == 0x0800) { *AdvBytes = PROTO_ETHERNET_HDRLEN; bResult = TRUE; } break; - + default: break; } @@ -921,7 +921,7 @@ GPParserHandlerWlan( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); u4Byte QosCtrlLen = 0; - + *AdvBytes = PROTO_UNKNOWN_HDRLEN; if (pSigBuffer == NULL) return FALSE; @@ -964,17 +964,17 @@ GPParserHandlerWlanLlc( if (pSigBuffer == NULL) return FALSE; typeLength = N2H2BYTE( *((UNALIGNED pu2Byte)pSigBuffer) ); - + switch (NextProtocol) { case PROTO_IP: - if (typeLength == 0x0800) + if (typeLength == 0x0800) { *AdvBytes = PROTO_WLAN_LLC_HDRLEN; bResult = TRUE; } break; - + default: break; } @@ -1005,11 +1005,11 @@ GPParserHandlerIP( *AdvBytes = PROTO_UNKNOWN_HDRLEN; if (pSigBuffer == NULL) return FALSE; - + switch (NextProtocol) { case PROTO_TCP: - if (type == 0x06) + if (type == 0x06) { *AdvBytes = PROTO_IP_HDRLEN; bResult = TRUE; @@ -1017,7 +1017,7 @@ GPParserHandlerIP( break; case PROTO_UDP: - if (type == 0x11) + if (type == 0x11) { *AdvBytes = PROTO_IP_HDRLEN; bResult = TRUE; @@ -1091,7 +1091,7 @@ GPAllocateParser( if (Status != RT_STATUS_SUCCESS) { RT_TRACE(COMP_CCX, DBG_SERIOUS, ("GPAllocateParser(): Failed to allocate parser\n")); - return FALSE; + return FALSE; } PlatformZeroMemory(pParser, sizeof(GENERIC_PARSER)); @@ -1143,7 +1143,7 @@ GPAllocateParser( } *(((PGENERIC_PARSER*)pMgntInfo->pGenericParser) + i) = pParser; - + bFound = TRUE; break; } @@ -1168,10 +1168,10 @@ GPFreeParser( BOOLEAN bClear = TRUE; u4Byte i; PGENERIC_PARSER pParser; - + if (pMgntInfo->pGenericParser == NULL) return; - + // // Try to free parser. // @@ -1192,7 +1192,7 @@ GPFreeParser( MAX_HP_PROTOCOL_PER_PARSER * sizeof(GP_HP_NODE) + MAX_HP_RULES_PER_PARSER * sizeof(GP_HP_ENTRY)); } - + PlatformFreeMemory(pParser, sizeof(GENERIC_PARSER)); *(((PGENERIC_PARSER*)pMgntInfo->pGenericParser)+i) = NULL; @@ -1240,7 +1240,7 @@ GPParseTCB( PlatformZeroMemory(pToken, sizeof(GPPARSE_TOKEN)); - PlatformMoveMemory(pToken->BufferList, + PlatformMoveMemory(pToken->BufferList, pTcb->BufferList, sizeof(SHARED_MEMORY) * MAX_PER_PACKET_BUFFER_LIST_LENGTH); pToken->BufferCount = pTcb->BufferCount; @@ -1251,7 +1251,7 @@ GPParseTCB( pToken->gpFlag = GPFLAG_TX; return ParseBuffer(Adapter, pToken); - + } // @@ -1270,7 +1270,7 @@ GPParseRFD( PGPPARSE_TOKEN pToken = &token; PlatformZeroMemory(pToken, sizeof(GPPARSE_TOKEN)); - + pToken->BufferList[0].VirtualAddress = pRfd->Buffer.VirtualAddress + pRfd->FragOffset; pToken->BufferList[0].Length = pRfd->FragLength; pToken->BufferCount = 1; @@ -1281,7 +1281,7 @@ GPParseRFD( pToken->gpFlag = GPFLAG_RX; return ParseBuffer(Adapter, pToken); - + } @@ -1318,9 +1318,9 @@ GPParserGateVoWlanSIP( (pMgntInfo->pStaQos->CurrentQosMode & QOS_WMMSA) ) { u1Byte CurrCcxVerNumber = 0; - + CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); - + if ( CurrCcxVerNumber >= 4 ) { pu1Byte param = GET_WMM_PARAM_ELE_AC_PARAM(pStaQos->WMMParamEle); @@ -1365,7 +1365,7 @@ GPAllocateParserVoWlanSIP( if (pParser->pParsingTree && pParser->bUseHP) GPUseHPParser(pParser); - + return TRUE; } @@ -1443,7 +1443,7 @@ GPParserCustomHandleUDP2SIP( RT_SPINLOCK_TYPE SpinLockType; BOOLEAN bQosData = FALSE; BOOLEAN bRejectData = FALSE; - + RT_ASSERT( ((pToken->gpFlag == GPFLAG_TX)||(pToken->gpFlag == GPFLAG_RX)), ("GPParserCustomHandleUDP2SIP(): Parser flag must either be GPFLAG_TX or GPFLAG_RX\n")); @@ -1453,12 +1453,12 @@ GPParserCustomHandleUDP2SIP( SpinLockType = RT_RX_SPINLOCK; else return bReturn; - + *AdvBytes = PROTO_UNKNOWN_HDRLEN; if (!GetNextLine(pToken, TRUE, line, sizeof(line)) ) return FALSE; - + switch (NextProtocol) { case PROTO_SIP_INVITE: @@ -1467,7 +1467,7 @@ GPParserCustomHandleUDP2SIP( { RT_TRACE(COMP_CCX , DBG_LOUD, ("GPParserCustomHandleUDP2SIP(): PROTO_SIP_INVITE, pToken->gpFlag = %02X\n", pToken->gpFlag)); CCX_GPParserCustomHandleUDP2SIP(Adapter, SpinLockType, &bQosData, &bReturn, &bRejectData); - } + } break; case PROTO_SIP_STATUS: @@ -1485,7 +1485,7 @@ GPParserCustomHandleUDP2SIP( { // Reject the status packet responding to the in-call. bRejectData = TRUE; } - } + } break; case PROTO_SIP_BYE: @@ -1499,7 +1499,7 @@ GPParserCustomHandleUDP2SIP( CCX_CAC_DelTs(Adapter); PlatformAcquireSpinLock(Adapter, SpinLockType); bReturn = TRUE; - } + } break; case PROTO_SIP_NOTIFY: @@ -1514,7 +1514,7 @@ GPParserCustomHandleUDP2SIP( bReturn = TRUE; } break; - + case PROTO_SIP_ACK: if (PlatformCompareMemory( &line[PROTO_UDP_HDRLEN], @@ -1527,11 +1527,11 @@ GPParserCustomHandleUDP2SIP( bReturn = TRUE; } break; - + default: break; } - + if (bQosData) { *AdvBytes = PROTO_UDP_HDRLEN; @@ -1563,7 +1563,7 @@ GPParserCustomHandleUDP2SIP( PRT_TCB pTcb = (PRT_TCB)pToken->pDataObj; if (pTcb) pTcb->TSID = SESSION_REJECT_TSID; } - + return bReturn; } @@ -1588,7 +1588,7 @@ GPParserCustomHandleSIP2SDP( const char* AudioSig = "m=audio"; *AdvBytes = PROTO_UNKNOWN_HDRLEN; - + while (GetNextLine(pToken, FALSE, line, sizeof(line)) ) { if (PlatformCompareMemory(line, (PVOID)AudioSig, 7) == 0) @@ -1596,7 +1596,7 @@ GPParserCustomHandleSIP2SDP( return TRUE; } } - + return FALSE; } @@ -1621,7 +1621,7 @@ GPParserCustomHandleSIPSTATUS( u1Byte callId[MAX_SESSION_ID]; u4Byte callIdLen; RT_SPINLOCK_TYPE SpinLockType; - + RT_ASSERT( ((pToken->gpFlag == GPFLAG_TX)||(pToken->gpFlag == GPFLAG_RX)), ("GPParserCustomHandleUDP2SIP(): Parser flag must either be GPFLAG_TX or GPFLAG_RX\n")); @@ -1631,16 +1631,16 @@ GPParserCustomHandleSIPSTATUS( SpinLockType = RT_RX_SPINLOCK; else return FALSE; - + *AdvBytes = PROTO_UNKNOWN_HDRLEN; - + if (GetNextLine(pToken, TRUE, line, sizeof(line)) ) { - // + // // SIP reponse status code: // 1XX Provisional 100 Trying // 2XX Successful 200 OK - // 3XX Redirection 302 Moved Temporarily + // 3XX Redirection 302 Moved Temporarily // 4XX Client Error 404 Not Found // 5XX Server Error 504 Server Time-out // 6XX Global Failure 603 Decline @@ -1691,7 +1691,7 @@ GetCallId( u1Byte buf[256]; u4Byte i; const char* CallSig = "Call-ID:"; - + while (GetNextLine(pToken, bNoAdvance, buf, sizeof(buf))) { if (PlatformCompareMemory(buf, (PVOID)CallSig, 8) == 0) @@ -1727,7 +1727,7 @@ RemoveSession( if (sessionIdLen > MAX_SESSION_ID) return; - + for (i = 0; i < MAX_SESSION; i ++) { if ( (pContext->Session[i].bUsed == TRUE) && @@ -1774,7 +1774,7 @@ GPParserCustomHandleSDP( const char* RtpSig = "RTP/AVP"; *AdvBytes = PROTO_UNKNOWN_HDRLEN; - + if (GetCallId(pToken, FALSE, callId, &callIdLen)) { if (!AddSession((PGP_VOWLAN_CONTEXT)pParserContext, callId, callIdLen)) @@ -1798,9 +1798,9 @@ GPParserCustomHandleSDP( if (!UngetLine(pToken)) return FALSE; } - else + else return FALSE; - + if (!GetNextLine(pToken, TRUE, line, sizeof(line)) ) return FALSE; @@ -1832,7 +1832,7 @@ GPParserCustomHandleSDP( { i ++; type = 65535; - + for (; i < sizeof(line); i ++) { for (j = 0; j < sizeof(charTable); j ++) @@ -1866,7 +1866,7 @@ GPParserCustomHandleSDP( { RT_TRACE(COMP_CCX, DBG_LOUD, ("GPParserCustomHandleSDP(): Invalid flag\n")); } - + break; } } @@ -1897,7 +1897,7 @@ AddSession( } RT_PRINT_STR(COMP_CCX, DBG_LOUD, "AddSession():\n", sessionId, sessionIdLen); - + // // Check if an call can be added. // @@ -1912,9 +1912,9 @@ AddSession( { RT_TRACE(COMP_CCX, DBG_LOUD, ("AddSession(): This session has been existed!\n")); return TRUE; - } + } } - + if (!pContext->Session[i].bUsed) break; } @@ -1923,7 +1923,7 @@ AddSession( PlatformZeroMemory(pContext->Session[i].sessionId, MAX_SESSION_ID); PlatformMoveMemory(pContext->Session[i].sessionId, sessionId, sessionIdLen); pContext->Session[i].sessionIdLen = sessionIdLen; - pContext->Session[i].bUsed = TRUE; + pContext->Session[i].bUsed = TRUE; return TRUE; } @@ -1950,7 +1950,7 @@ UpdateSessionInfo( if (sessionIdLen > MAX_SESSION_ID) return FALSE; - + for (i = 0; i < MAX_SESSION; i ++) { if ( (pContext->Session[i].bUsed == TRUE) && @@ -1989,7 +1989,7 @@ MatchSession( return FALSE; if (Port == 0) return FALSE; - + for (i = 0; i < MAX_SESSION; i ++) { if (pContext->Session[i].bUsed) @@ -2024,9 +2024,9 @@ GPParserCustomHandleSIPBYE( { u1Byte callId[MAX_SESSION_ID]; u4Byte callIdLen; - + *AdvBytes = PROTO_UNKNOWN_HDRLEN; - + if (GetCallId(pToken, FALSE, callId, &callIdLen)) { RemoveSession((PGP_VOWLAN_CONTEXT)pParserContext, callId, callIdLen); @@ -2061,7 +2061,7 @@ GPParserCustomHandleUDP2RTP( if ( (pToken->gpFlag == GPFLAG_TX) || (pToken->gpFlag == GPFLAG_RX) ) { - offset = 0; + offset = 0; } else { @@ -2081,7 +2081,7 @@ GPParserCustomHandleUDP2RTP( bReturn = TRUE; } } - + return bReturn; } @@ -2103,12 +2103,12 @@ GPParserCustomHandleRTP2G711( ) { u1Byte type; - + *AdvBytes = PROTO_UNKNOWN_HDRLEN; - - if (AdvanceAndGetDataByOffset(pToken, - 1, - TRUE, + + if (AdvanceAndGetDataByOffset(pToken, + 1, + TRUE, &type, sizeof(type)) ) { @@ -2145,7 +2145,7 @@ GPParserCustomHandleG711( PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; PQOS_TSTREAM pTs = NULL; - + *AdvBytes = PROTO_UNKNOWN_HDRLEN; if (pToken->gpFlag == GPFLAG_TX) { @@ -2190,11 +2190,11 @@ GPGetParseRFDInfo( pu1Byte pDA; pu1Byte pSA; u1Byte PacketType; // RX_PACKET_TYPE - pu1Byte pEtherType; // 2 bytes : IPv4 , IPv6 , ARP ... + pu1Byte pEtherType; // 2 bytes : IPv4 , IPv6 , ARP ... // IP - u1Byte ARPOption; // Request or Response - pu1Byte ARPSPA; // ARP Sender IP - pu1Byte ARPTPA; // ARP Target IP + u1Byte ARPOption; // Request or Response + pu1Byte ARPSPA; // ARP Sender IP + pu1Byte ARPTPA; // ARP Target IP u1Byte Protocol; // UDP : 0x11 , TCP : 0x06 //UDP pu1Byte pDestinationPort; // 2 bytes @@ -2206,7 +2206,7 @@ GPGetParseRFDInfo( u1Byte ArpType[2] = {0x08 ,0x06}; u1Byte IPv4Type[2] = {0x08 ,0x00}; u1Byte IPv6Type[2] = {0x86 ,0xdd}; - + FillOctetString(frame, pRfd->Buffer.VirtualAddress+PLATFORM_GET_FRAGOFFSET(pRfd), pRfd->PacketLength); PlatformZeroMemory(pRxfiterInfo, sizeof(RX_FILTER_INFO)); @@ -2217,7 +2217,7 @@ GPGetParseRFDInfo( pRxfiterInfo->PacketType = RXPacketTypeUndefined; return FALSE; } - + // MAC !! pRxfiterInfo->pDA = Frame_pDaddr(frame); pRxfiterInfo->pSA = Frame_pSaddr(frame); @@ -2246,13 +2246,13 @@ GPGetParseRFDInfo( pRxfiterInfo->pEtherType = frame.Octet + sMacHdrLng + LLC_HEADER_SIZE; pCurrentbuf = frame.Octet + sMacHdrLng + LLC_HEADER_SIZE + TYPE_LENGTH_FIELD_SIZE; - + // IP !! if( PlatformCompareMemory(pRxfiterInfo->pEtherType , ArpType, 2) == 0) { // ARP pRxfiterInfo->ARPOption = pCurrentbuf + 6; - pRxfiterInfo->ARPSPA = pCurrentbuf + 6 + 2 + 6; // 6 Option offset , 2 Option Len , 6 SPA Mac Len + pRxfiterInfo->ARPSPA = pCurrentbuf + 6 + 2 + 6; // 6 Option offset , 2 Option Len , 6 SPA Mac Len pRxfiterInfo->ARPTPA = pCurrentbuf + 6 + 2 + 6 + 4 + 6 ; // // 6 Option offset , 2 Option Len , 6 SPA Mac Len , 4 SPA len , 6 TPA Mac Len } else if(PlatformCompareMemory(pRxfiterInfo->pEtherType , IPv4Type, 2) == 0) @@ -2262,14 +2262,14 @@ GPGetParseRFDInfo( if(pRxfiterInfo->Protocol == 0x11) { u1Byte IPv4len = (pCurrentbuf[0]&0x0f) * 4; - pRxfiterInfo->pDestinationPort = pCurrentbuf + IPv4len + 2; // (pCurrentbuf[0]>>4) IPv4 Heard len 2 Source Port + pRxfiterInfo->pDestinationPort = pCurrentbuf + IPv4len + 2; // (pCurrentbuf[0]>>4) IPv4 Heard len 2 Source Port //RT_PRINT_DATA(COMP_TEST, DBG_LOUD, "IPV4 pRxfiterInfo->pDestinationPort :\n", pRxfiterInfo->pDestinationPort, 2); } //RT_TRACE(COMP_TEST, DBG_LOUD , ("===> pRfd nTotalSubframe (%d) \n" , pRfd->nTotalSubframe) ); } else if(PlatformCompareMemory(pRxfiterInfo->pEtherType , IPv6Type, 2) == 0) { - + pRxfiterInfo->Protocol = pCurrentbuf[6]; // UDP !! if(pRxfiterInfo->Protocol == 0x11) @@ -2279,10 +2279,10 @@ GPGetParseRFDInfo( } //RT_TRACE(COMP_TEST, DBG_LOUD , ("===> pRfd nTotalSubframe (%d) \n" , pRfd->nTotalSubframe) ); } - - + + return TRUE; - + } diff --git a/network/wlan/WDI/COMMON/ParserGen.h b/network/wlan/WDI/COMMON/ParserGen.h index c956945e8..8237f501f 100644 --- a/network/wlan/WDI/COMMON/ParserGen.h +++ b/network/wlan/WDI/COMMON/ParserGen.h @@ -3,16 +3,16 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: ParserGen.h - + Abstract: Parse MSDU to match the specified type, fetch fixed offset. - + Major Change History: When Who What ---------- --------------- ------------------------------- 2007-06-11 shienchang Create. 2008-03-10 Bruce Modify from 818xB. - + --*/ #ifndef __INC_PARSERGEN_H #define __INC_PARSERGEN_H @@ -180,7 +180,7 @@ typedef struct _GP_HP_NODE // ParserName: // The name of this generic parser. // ParserRules: -// The corrresponding handler and the next protocol to the current protocol. +// The corrresponding handler and the next protocol to the current protocol. // ParserContext: // The input context about for this parser. // Gate: @@ -198,7 +198,7 @@ typedef struct _GENERIC_PARSER u1Byte PID; u1Byte ParserName[MAX_PARSER_NAME]; PGP_RULE pParseRules; - PVOID ParserContext; + PVOID ParserContext; GPParserGate Gate; GPParserAction Action; PGP_HP_NODE pParsingTree; @@ -210,7 +210,7 @@ typedef struct _GENERIC_PARSER // typedef BOOLEAN (*ifAllocateParser)( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PGENERIC_PARSER pParser ); diff --git a/network/wlan/WDI/COMMON/PowerSave.h b/network/wlan/WDI/COMMON/PowerSave.h index aa10b31b9..fb8123f92 100644 --- a/network/wlan/WDI/COMMON/PowerSave.h +++ b/network/wlan/WDI/COMMON/PowerSave.h @@ -6,24 +6,24 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: HalUsb.h - + Abstract: Prototype of HalUsbXXX() and related data structure. - + Major Change History: When Who What ---------- --------------- ------------------------------- 2006-11-06 Rcnjko Create. - + --*/ //================================================================================ -// Helper macros. +// Helper macros. //================================================================================ #define IN_LEGACY_POWER_SAVE(__pStaQos) (((__pStaQos)->Curr4acUapsd & 0x0f) == 0) #define GET_POWER_SAVE_CONTROL(_pMgntInfo) ((PRT_POWER_SAVE_CONTROL)(&((_pMgntInfo)->PowerSaveControl))) -// +// // Get Wifi Mode Power Save, if it is true, follow PS-POLL or WMM APSD specification. Or use NULL-frame to // implement power save mode. By Bruce, 2008-09-17. // @@ -49,7 +49,7 @@ Major Change History: #define IS_RTD3_SUPPORT(_pAdapter) FALSE #define RTD3_GET_DEV_PWR_STATE PowerDeviceD0 -// Currently we support the machanism on 8723BS A to D-cut for Intel Baytrail-CR old BIOS behavior. +// Currently we support the machanism on 8723BS A to D-cut for Intel Baytrail-CR old BIOS behavior. // 2014.04.09 by tynli. #define IS_CARD_DISABLE_IN_FW_LOW_PWR_STATE(_pAdapter) \ (GET_POWER_SAVE_CONTROL(&(_pAdapter->MgntInfo))->CardDisableInLowClk && IS_VENDOR_8723B_D_CUT_BEFORE(_pAdapter)) @@ -99,7 +99,7 @@ Major Change History: #define LPS_DISABLE_BT_COEX BIT26 #define LPS_DISABLE_DEVICE_DISCOVERY BIT27 //================================================================================ -// Variable Definition. +// Variable Definition. //================================================================================ typedef enum _POWER_LEVEL_CONFIG { @@ -130,9 +130,9 @@ typedef enum _POWER_POLICY_CONFIG //================================================================================ -// Callback routines of timers and workitems. +// Callback routines of timers and workitems. //================================================================================ -VOID +VOID OnMoreData( IN PADAPTER pAdapter ); diff --git a/network/wlan/WDI/COMMON/Protocol802_11.c b/network/wlan/WDI/COMMON/Protocol802_11.c index 2943422ca..369e3b180 100644 --- a/network/wlan/WDI/COMMON/Protocol802_11.c +++ b/network/wlan/WDI/COMMON/Protocol802_11.c @@ -4,7 +4,7 @@ #include "Protocol802_11.tmh" #endif -static u2Byte sPacketIEOffsetTable[] = +static u2Byte sPacketIEOffsetTable[] = { sMacHdrLng + 4, //SubType_Asoc_Req = 0, sMacHdrLng + 6, //SubType_Asoc_Rsp = 1, @@ -14,7 +14,7 @@ static u2Byte sPacketIEOffsetTable[] = sMacHdrLng + 12, //SubType_Probe_Rsp = 5, 0, // rsvd = 6, x 0, // rsvd = 7, x - sMacHdrLng + 12, //SubType_Beacon = 8, + sMacHdrLng + 12, //SubType_Beacon = 8, 0, //SubType_Atim = 9, x 0, //SubType_Disasoc = 10, x sMacHdrLng + 6, //SubType_Auth = 11, @@ -182,7 +182,7 @@ PKT_PATTERN_MAP PktActPatternsMap[] = // 802.11 Action Frame IE offset PKT_IE_OFFSET_MAP ActPktIeOffsetMap[] = -{ +{ // Qos (0x1) {ACT_PKT_QOS_ADDTSREQ, (sMacHdrLng + 3)}, {ACT_PKT_QOS_ADDTSRSP, (sMacHdrLng + 5)}, @@ -211,7 +211,7 @@ PKT_IE_OFFSET_MAP ActPktIeOffsetMap[] = {ACT_PKT_P2P_PRESENCE_REQ, (sMacHdrLng + 7)}, {ACT_PKT_P2P_PRESENCE_RSP, (sMacHdrLng + 7)}, {ACT_PKT_P2P_GO_DISCOVERABILITY_REQ, (sMacHdrLng + 7)}, - + // ===== Insert new item above this line ===== {ACT_PKT_TYPE_UNKNOWN, 0} }; @@ -273,7 +273,7 @@ EqualOS( return FALSE; if( os1.Length==0 ) - return FALSE; + return FALSE; return (PlatformCompareMemory(os1.Octet,os2.Octet,os1.Length)==0) ? TRUE:FALSE; } @@ -285,7 +285,7 @@ IsSSIDAny( ) { BOOLEAN retValue = FALSE; - + if(ssid.Length == 0) // a kind of "ANY SSID" retValue = TRUE; else if(ssid.Length == 3) @@ -296,7 +296,7 @@ IsSSIDAny( retValue = TRUE; } - return retValue; + return retValue; } @@ -339,12 +339,12 @@ IsSSIDNdisTest( { return TRUE; } - + if( (ssid.Length >= 8) && ( (ssid.Octet[0]=='N' || ssid.Octet[0]=='n') && (ssid.Octet[1]=='D' || ssid.Octet[1]=='d') && - (ssid.Octet[2]=='I' || ssid.Octet[2]=='i') && - (ssid.Octet[3]=='S' || ssid.Octet[2]=='s') && + (ssid.Octet[2]=='I' || ssid.Octet[2]=='i') && + (ssid.Octet[3]=='S' || ssid.Octet[2]=='s') && (ssid.Octet[4]=='T' || ssid.Octet[2]=='t') && (ssid.Octet[5]=='E' || ssid.Octet[2]=='e') && (ssid.Octet[6]=='S' || ssid.Octet[2]=='s') && @@ -356,14 +356,14 @@ IsSSIDNdisTest( { return FALSE; } - + } // // Description: // Checks whether a packet contains any invalid IE. // Implemented based on PacketGetElement(). -// +// // 2008.12.32, haich // BOOLEAN @@ -383,7 +383,7 @@ PacketCheckIEValidity( { if(sMacHdrLng > packet.Length) {// not able to get packet type - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("PacketCheckIEValidity(): sMacHdrLng(%u) > packet.Length (%u)\n", sMacHdrLng, packet.Length)); bRet = FALSE; break; @@ -391,17 +391,17 @@ PacketCheckIEValidity( if(!IsMgntFrame(packet.Octet)) {// not a mangaement frame - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("PacketCheckIEValidity(): frame type: %u\n", Frame_Type(packet))); bRet = FALSE; break; } PacketSubType = Frame_Subtype(packet); - + if(PacketSubType > 12) {// beyond deauth - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("PacketCheckIEValidity(): wrong subtype: %u\n", PacketSubType)); bRet = FALSE; break; @@ -409,7 +409,7 @@ PacketCheckIEValidity( if(!(offset = sPacketIEOffsetTable[PacketSubType])) {// not a sub type of frame that could have IEs - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("PacketCheckIEValidity(): not a sub type of frame that could have IEs, subtype: %u\n", PacketSubType)); bRet = FALSE; break; @@ -419,7 +419,7 @@ PacketCheckIEValidity( { if(offset + 2 >= packet.Length) {// [malicious attack] not ok to read EID and Element Length - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("PacketCheckIEValidity(): [malicious attack] not ok to read EID and Element Length\n")); bRet = TRUE; break; @@ -433,21 +433,21 @@ PacketCheckIEValidity( bRet = FALSE; break; } - - if(offset + 2 + u1ELength < packet.Length) + + if(offset + 2 + u1ELength < packet.Length) {// Jump to the position of length of next IE. (2 byte is for the ID and length field.) offset = offset + 2 + u1ELength; // incr at least 2 for every loop ValidPacketLength = offset; } - else if(offset + 2 + u1ELength == packet.Length) + else if(offset + 2 + u1ELength == packet.Length) {// the IEs in the packet are all valid. bRet = TRUE; ValidPacketLength = offset + 2 + u1ELength; break; } - else + else {// [malicious attack] length of IE exceeds packet length - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("PacketCheckIEValidity(): [malicious attack] length of IE exceeds packet length\n")); bRet = TRUE; break; @@ -477,7 +477,7 @@ PacketCheckIEValidity( // Remark: // It checks the category, action field (if there is such one) and OUI information to determine the type. // Do not input non-action frame to this function and it doesn't check if this packet is action frame. -// By Bruce, 2012-03-09. +// By Bruce, 2012-03-09. // ACT_PKT_TYPE PacketGetActionFrameType( @@ -503,7 +503,7 @@ PacketGetActionFrameType( if(0 == PlatformCompareMemory(Frame_FrameBody(*posMpdu), PktActPatternsMap[idx].Pattern, PktActPatternsMap[idx].PatternLen)) { return (ACT_PKT_TYPE)(PktActPatternsMap[idx].PktType); - } + } } return ACT_PKT_TYPE_UNKNOWN; } @@ -541,7 +541,7 @@ PacketGetEncapDataFrameType( if(0 == PlatformCompareMemory(posDataContent->Octet, PktEncapDataPatternsMap[idx].Pattern, PktEncapDataPatternsMap[idx].PatternLen)) { return (ENCAP_DATA_PKT_TYPE)(PktEncapDataPatternsMap[idx].PktType); - } + } } return ENCAP_DATA_PKT_UNKNOWN; } @@ -570,44 +570,44 @@ PacketGetIeOffset( { BOOLEAN bValid = TRUE; u4Byte idx = 0; - + switch(PacketGetType(*posMpdu)) { default: bValid = FALSE; break; - + case Type_Auth: *pOffset = (sMacHdrLng + 6); break; - + case Type_Probe_Req: *pOffset = (sMacHdrLng + 0); break; - + case Type_Beacon: case Type_Probe_Rsp: *pOffset = (sMacHdrLng + 12); break; - + case Type_Reasoc_Req: *pOffset = (sMacHdrLng + 10); break; - + case Type_Asoc_Req: *pOffset = (sMacHdrLng + 4); break; - + case Type_Asoc_Rsp: case Type_Reasoc_Rsp: *pOffset = (sMacHdrLng + 6); break; - + case Type_Disasoc: case Type_Deauth: *pOffset = (sMacHdrLng + 2); break; - + case Type_Action: { ACT_PKT_TYPE actType = PacketGetActionFrameType(posMpdu); @@ -663,12 +663,12 @@ PacketGetElementNum( { return 0; } - + if(offset < packet.Length) { pu1Byte pIE; u2Byte IELen = (packet.Length - offset); - + pIE = (packet.Octet + offset); FillOctetString(IEs, pIE,IELen); @@ -681,17 +681,17 @@ PacketGetElementNum( IENum++; RT_TRACE(COMP_WPS, DBG_TRACE,("We find a WPS IE in probe or beacon Fragment num is %d \n",IENum)); IELen = IELen - ((u2Byte)(ret.Octet - pIE) + ret.Length); - pIE = (ret.Octet + ret.Length); - FillOctetString(IEs, pIE,IELen); + pIE = (ret.Octet + ret.Length); + FillOctetString(IEs, pIE,IELen); RT_PRINT_DATA(COMP_WPS, DBG_TRACE, "The IE after WPS IE in the packet :\n", pIE, IELen); } else { - RT_TRACE(COMP_WPS, DBG_TRACE,("There is no WPS IE in the probe or beacon\n")); + RT_TRACE(COMP_WPS, DBG_TRACE,("There is no WPS IE in the probe or beacon\n")); } } while(ret.Length != 0); - + return IENum; } else @@ -707,7 +707,7 @@ PacketGetElementNum( // Added a parameter "OUISubType" and rewrited by Annie, 2005-11-08, // since the element ID of WPA-IE and WMM-IE are the same(0xDD=221). // -OCTET_STRING +OCTET_STRING PacketGetElement( IN OCTET_STRING packet, IN ELEMENT_ID ID, @@ -774,9 +774,9 @@ TimGetBcMcBit( return ((Tim.Octet[2] & 0x01) == 0x01); } -BOOLEAN -TimGetAIDBit( - IN OCTET_STRING Tim, +BOOLEAN +TimGetAIDBit( + IN OCTET_STRING Tim, IN u2Byte AID ) { @@ -784,7 +784,7 @@ TimGetAIDBit( u2Byte offset,offset_byte; u1Byte offset_bit; u2Byte FirstStationInTim; - + FirstStationInTim = (Tim.Octet[2] & 0xFE) * 8; if( AID= (FirstStationInTim+(Tim.Length-3)*8) ) { // Out of the range(too large) @@ -792,9 +792,9 @@ TimGetAIDBit( } else { - + offset = AID - FirstStationInTim; - + offset_byte = offset >>3; offset_bit = (unsigned char)(offset & 0x7); @@ -853,7 +853,7 @@ N_DBPSOfRate( return N_DBPS; } -u2Byte +u2Byte ComputeTxTime( IN u2Byte FrameLength, IN u4Byte DataRate, @@ -874,7 +874,7 @@ ComputeTxTime( // 1M can only use Long Preamble. Ref. 802.11b 18.2.2.2. 2005.01.18, by rcnjko. if( bManagementFrame || !bShortPreamble || DataRate == 2 ) { // long preamble - FrameTime = (u2Byte)(144+48+(FrameLength*8*2/DataRate)); + FrameTime = (u2Byte)(144+48+(FrameLength*8*2/DataRate)); } else { // Short preamble @@ -899,7 +899,7 @@ ComputeTxTime( FrameTime = (u2Byte)(16 + 4 + 4*Ceiling + 6); break; } - + return FrameTime; } @@ -974,7 +974,7 @@ CompareSSID( ( PlatformCompareMemory(ssidbuf1, ssidbuf2, ssidlen1) == 0 )) return TRUE; } - + return FALSE; } @@ -989,21 +989,21 @@ ComputeAckRate( DataRate &= 0x7F; - // Find the highest rate in the BSSBasicRateSet + // Find the highest rate in the BSSBasicRateSet // that is less than or equal to DataRate. for( i = 0; i < BSSBasicRateSet.Length; i++) { - BasicRate = BSSBasicRateSet.Octet[i] & 0x7F; + BasicRate = BSSBasicRateSet.Octet[i] & 0x7F; if( BasicRate <= DataRate && BasicRate > AckRate) - AckRate = BasicRate; + AckRate = BasicRate; } - // Make sure the AckRate is in the same modulation of DataRate, - // otherwise we it shall use highest mandatory rate of PHY + // Make sure the AckRate is in the same modulation of DataRate, + // otherwise we it shall use highest mandatory rate of PHY // that is less than or equal to DataRate. switch(DataRate) { - // CCK. + // CCK. case MGN_1M: case MGN_2M: case MGN_5_5M: @@ -1063,7 +1063,7 @@ HasNextIE( if(Offset + 2 > posMpdu->Length) // 2 = 1(ID) + 1(Length). return FALSE; - if(Offset + 2 + *(posMpdu->Octet + Offset + 1) > posMpdu->Length) + if(Offset + 2 + *(posMpdu->Octet + Offset + 1) > posMpdu->Length) return FALSE; return TRUE; @@ -1071,11 +1071,11 @@ HasNextIE( // // Description: -// Wrap the IE in an RT_DOT11_IE object and advance offset +// Wrap the IE in an RT_DOT11_IE object and advance offset // to next IE. // -// Assumption: -// Currnet offset contains a valid IE, that is, HasNextIE() +// Assumption: +// Currnet offset contains a valid IE, that is, HasNextIE() // returns TRUE before calling this function. // RT_DOT11_IE @@ -1094,7 +1094,7 @@ AdvanceToNextIE( return Ie; } -// +// // Description: // Get the number of IE elements and extract the interested element for return. // Arguments: @@ -1121,14 +1121,14 @@ IEGetElementNum( u1Byte IENum = 0; OCTET_STRING osTmp, osSingleIE; u2Byte offset = 0; - + do { if(offset >= IEs.Length) break; FillOctetString(osTmp, IEs.Octet + offset, (IEs.Length - offset)); - + osSingleIE = IEGetElement(osTmp, ID, OUIType, OUISubType); if(osSingleIE.Length > 0) { @@ -1142,12 +1142,12 @@ IEGetElementNum( } } while(TRUE); - + return IENum; } -// +// // Description: // Parse the IE elements and extract the interested element for return. // Arguments: @@ -1159,7 +1159,7 @@ IEGetElementNum( // Vendor specified OUI to be determined in the element. // Revised by Bruce, 2009-02-12. // -OCTET_STRING +OCTET_STRING IEGetElement( IN OCTET_STRING IEs, IN ELEMENT_ID ID, @@ -1185,11 +1185,11 @@ IEGetElement( static u1Byte CcxSSIDLTag[] = {0x00, 0x50, 0xf2, 0x05}; static u1Byte RealtekTurboModeTag[] = {0x00, 0xE0, 0x4C, 0x01}; // Added by Annie, 2005-12-27 static u1Byte RealtekAggModeTag[] = {0x00, 0xe0, 0x4c, 0x02}; - static u1Byte RealtekBTIOTModeTag[] = {0x00, 0xe0, 0x4c, 0x03}; // Add for BT IOT - static u1Byte RealtekBtHsTag[] = {0x00, 0xe0, 0x4c, 0x04}; // Add for BT HS + static u1Byte RealtekBTIOTModeTag[] = {0x00, 0xe0, 0x4c, 0x03}; // Add for BT IOT + static u1Byte RealtekBtHsTag[] = {0x00, 0xe0, 0x4c, 0x04}; // Add for BT HS static u1Byte Epigram[] = {0x00,0x90,0x4c}; static u1Byte EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x033}; // For 11n EWC definition, 2007.07.17, by Emily - static u1Byte EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x034}; // For 11n EWC definition, 2007.07.17, by Emily + static u1Byte EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x034}; // For 11n EWC definition, 2007.07.17, by Emily static u1Byte Epigram11ACCap[] = {0x00, 0x90, 0x4c, 0x04, 0x08, 0xBF, 0x0C}; // For 11ac Epigram definition static u1Byte BroadcomCap_1[] = {0x00, 0x10, 0x18}; static u1Byte BroadcomCap_2[] = {0x00, 0x0a, 0xf7}; @@ -1209,7 +1209,7 @@ IEGetElement( static u1Byte CcxMHDR[] = {0x00, 0x40, 0x96, 0x10}; static u1Byte P2P_OUI_WITH_TYPE[] = {0x50, 0x6F, 0x9A, WLAN_PA_VENDOR_SPECIFIC}; static u1Byte WFD_OUI_WITH_TYPE[] = {0x50, 0x6F, 0x9A, WFD_OUI_TYPE}; - static u1Byte NAN_OUI_WITH_TYPE[] = {0x50, 0x6F, 0x9A, 0x13}; + static u1Byte NAN_OUI_WITH_TYPE[] = {0x50, 0x6F, 0x9A, 0x13}; static u1Byte RealtekTDLSTag[] = {0x00, 0xe0, 0x4c, 0x03}; //Mix mode can't get DHCP in MacOS Driver. CCW revice offset 2008-04-15 @@ -1221,7 +1221,7 @@ IEGetElement( { return ret; } - + temp = IEs.Octet[offset]; // Get current Element ID. if( temp == ID ) @@ -1236,7 +1236,7 @@ IEGetElement( case OUI_SUB_WPA2GTK: FillOctetString(osOuiSub, WPA2GTKTag, sizeof(WPA2GTKTag)); break; - + case OUI_SUB_CCX_TSM: FillOctetString(osOuiSub, CcxTsmTag, sizeof(CcxTsmTag)); break; @@ -1268,7 +1268,7 @@ IEGetElement( case OUI_SUB_CCX_VER_NUM: FillOctetString(osOuiSub, CcxVerNumTag, sizeof(CcxVerNumTag)); break; - + case OUI_SUB_EPIG_IE: FillOctetString(osOuiSub, Epigram, sizeof(Epigram)); break; @@ -1286,28 +1286,28 @@ IEGetElement( break; case OUI_SUB_BROADCOM_IE_1: - FillOctetString(osOuiSub, BroadcomCap_1, sizeof(BroadcomCap_1)); + FillOctetString(osOuiSub, BroadcomCap_1, sizeof(BroadcomCap_1)); break; - + case OUI_SUB_BROADCOM_IE_2: - FillOctetString(osOuiSub, BroadcomCap_2, sizeof(BroadcomCap_2)); + FillOctetString(osOuiSub, BroadcomCap_2, sizeof(BroadcomCap_2)); break; - + case OUI_SUB_BROADCOM_IE_3: - FillOctetString(osOuiSub, BroadcomCap_3, sizeof(BroadcomCap_3)); + FillOctetString(osOuiSub, BroadcomCap_3, sizeof(BroadcomCap_3)); break; - + case OUI_SUB_BROADCOM_LINKSYSE4200_IE_1: - FillOctetString(osOuiSub, BroadcomLinksysE4200Cap_1, sizeof(BroadcomLinksysE4200Cap_1)); + FillOctetString(osOuiSub, BroadcomLinksysE4200Cap_1, sizeof(BroadcomLinksysE4200Cap_1)); break; - + case OUI_SUB_BROADCOM_LINKSYSE4200_IE_2: - FillOctetString(osOuiSub, BroadcomLinksysE4200Cap_2, sizeof(BroadcomLinksysE4200Cap_2)); + FillOctetString(osOuiSub, BroadcomLinksysE4200Cap_2, sizeof(BroadcomLinksysE4200Cap_2)); break; - + case OUI_SUB_BROADCOM_LINKSYSE4200_IE_3: - FillOctetString(osOuiSub, BroadcomLinksysE4200Cap_3, sizeof(BroadcomLinksysE4200Cap_3)); - break; + FillOctetString(osOuiSub, BroadcomLinksysE4200Cap_3, sizeof(BroadcomLinksysE4200Cap_3)); + break; case OUI_SUB_CISCO_IE: FillOctetString(osOuiSub, CiscoCap, sizeof(CiscoCap)); @@ -1320,27 +1320,27 @@ IEGetElement( case OUI_SUB_RALINK_IE: FillOctetString(osOuiSub, RalinkCap, sizeof(RalinkCap)); break; - + case OUI_SUB_ATHEROS_IE_1: FillOctetString(osOuiSub, AtherosCap_1, sizeof(AtherosCap_1)); break; - + case OUI_SUB_ATHEROS_IE_2: FillOctetString(osOuiSub, AtherosCap_2, sizeof(AtherosCap_2)); break; - + case OUI_SUB_MARVELL: FillOctetString(osOuiSub, MarvellCap, sizeof(MarvellCap)); break; - + case OUI_SUB_AIRGO: FillOctetString(osOuiSub, AirgoCap, sizeof(AirgoCap)); - break; - + break; + case OUI_SUB_CCX_SFA: FillOctetString(osOuiSub, CcxSFA, sizeof(CcxSFA)); break; - + case OUI_SUB_CCX_DIAG_REQ_REASON: FillOctetString(osOuiSub, CcxDiagReqReason, sizeof(CcxDiagReqReason)); break; @@ -1348,7 +1348,7 @@ IEGetElement( case OUI_SUB_CCX_MFP_MHDR: FillOctetString(osOuiSub, CcxMHDR, sizeof(CcxMHDR)); break; - + case OUI_SUB_WIFI_DIRECT: FillOctetString(osOuiSub, P2P_OUI_WITH_TYPE, sizeof(P2P_OUI_WITH_TYPE)); break; @@ -1356,15 +1356,15 @@ IEGetElement( case OUI_SUB_WIFI_DISPLAY: FillOctetString(osOuiSub, WFD_OUI_WITH_TYPE, sizeof(WFD_OUI_WITH_TYPE)); break; - + case OUI_SUB_NAN: FillOctetString(osOuiSub, NAN_OUI_WITH_TYPE, sizeof(NAN_OUI_WITH_TYPE)); break; - + case OUI_SUB_REALTEK_TDLS: FillOctetString(osOuiSub, RealtekTDLSTag, sizeof(RealtekTDLSTag)); break; - + case OUI_SUB_REALTEK_BT_IOT : FillOctetString(osOuiSub, RealtekBTIOTModeTag, sizeof(RealtekBTIOTModeTag)); break; @@ -1372,7 +1372,7 @@ IEGetElement( case OUI_SUB_REALTEK_BT_HS: FillOctetString(osOuiSub, RealtekBtHsTag, sizeof(RealtekBtHsTag)); break; - + default: FillOctetString(osOuiSub, NULL, 0); break; @@ -1380,8 +1380,8 @@ IEGetElement( if( osOuiSub.Length > 0 && (length >= (offset + 2 + osOuiSub.Length)) ) // Prevent malicious attack. { if( PlatformCompareMemory( - (IEs.Octet + offset + 2), - osOuiSub.Octet, + (IEs.Octet + offset + 2), + osOuiSub.Octet, osOuiSub.Length) == 0 ) { // OUI field and subtype field are matched bIEMatched = TRUE; @@ -1390,7 +1390,7 @@ IEGetElement( // 060801, Isaiah: // [UAPSD Logo] Marvel AP has similar element, [DD 07 00 50 F2 02 05 01 24]. // - if( (OUI_SUB_WMM == OUIType) && + if( (OUI_SUB_WMM == OUIType) && (length >= (offset + 2 + osOuiSub.Length + 1)) ) { // WMM-IE Matched! u1Byte WmmSubtype = *(IEs.Octet+offset+2+sizeof(WMMTag)); @@ -1401,7 +1401,7 @@ IEGetElement( } } } - else + else { // Other ID: Matched! bIEMatched = TRUE; } @@ -1412,7 +1412,7 @@ IEGetElement( { // IE matched! break to return. // // Get the length of current IE. - // We also perform length checking here to pervent malicious attack. + // We also perform length checking here to pervent malicious attack. // switch(ID) { @@ -1529,7 +1529,7 @@ IsIELengthValid( IN u1Byte IELength ) { - BOOLEAN bRet = TRUE; + BOOLEAN bRet = TRUE; u1Byte MaxIELength = MAX_IE_LEN; switch(IDIE) @@ -1541,63 +1541,63 @@ IsIELengthValid( case EID_SupRates: MaxIELength = 12;//Because Belkin 11AC on g Mode only has 12 Octets in this IE break; - + case EID_FHParms: MaxIELength = MAX_FH_PARM_LEN; break; - + case EID_DSParms: MaxIELength = MAX_DS_PARM_LEN; break; - + case EID_CFParms: MaxIELength = MAX_CF_PARM_LEN; break; - + case EID_Tim: MaxIELength = MAX_TIM_PARM_LEN; break; - + case EID_IbssParms: MaxIELength = MAX_IBSS_PARM_LEN; break; - + case EID_QBSSLoad: MaxIELength = MAX_QBSS_LOAD_LEN; break; - + case EID_EDCAParms: MaxIELength = MAX_EDCA_PARM_LEN; break; - + case EID_TSpec: MaxIELength = MAX_TSPEC_LEN; break; - + case EID_Schedule: MaxIELength = MAX_SCHEDULE_LEN; break; - + case EID_Ctext: MaxIELength = MAX_CTEXT_LEN; break; - + case EID_ERPInfo: MaxIELength = MAX_ERP_INFO_LEN; break; - + case EID_TSDelay: MaxIELength = MAX_TS_DELAY_LEN; break; - + case EID_TCLASProc: MaxIELength = MAX_TC_PROC_LEN; break; - + case EID_QoSCap: MaxIELength = MAX_QOS_CAP; break; - + case EID_ExtSupRates: MaxIELength = MAX_EXT_SUP_RATE_LEN; break; @@ -1605,23 +1605,23 @@ IsIELengthValid( case EID_WAPI: MaxIELength = MAX_WAPI_IE_LEN; break; - + case EID_LinkIdentifier: MaxIELength = MAX_LINKID_LEN; break; - + case EID_SupportedChannels: MaxIELength = MAX_SUPCHNL_LEN; break; - + case EID_SupRegulatory: MaxIELength = MAX_SUPREGULATORY_LEN; break; - + case EID_SecondaryChnlOffset: MaxIELength = MAX_SECONDARYOFFSET_LEN; break; - + case EID_ChnlSwitchTimeing: MaxIELength = MAX_CHNLSWITCHTIMING_LEN; break; diff --git a/network/wlan/WDI/COMMON/Protocol802_11.h b/network/wlan/WDI/COMMON/Protocol802_11.h index 5f6e3a6c0..e970352c5 100644 --- a/network/wlan/WDI/COMMON/Protocol802_11.h +++ b/network/wlan/WDI/COMMON/Protocol802_11.h @@ -54,31 +54,31 @@ typedef u4Byte CONTENT_PKT_TYPE, *PCONTENT_PKT_TYPE; #define Frame_FrameBody(f) ( Frame_Addr4(f)+6*Frame_ValidAddr4(f) ) // return pu1Byte #define Frame_FrameHdrLng(f) ( sMacHdrLng + 6*Frame_ValidAddr4(f) +2*IsQoSDataFrame((f).Octet) ) // return lenght of 802.11 data frame header. -#define Frame_GAS_QueryReq(f) ( Frame_FrameBody(f) + 1 + 1 + 1 + 4 + 2 ) +#define Frame_GAS_QueryReq(f) ( Frame_FrameBody(f) + 1 + 1 + 1 + 4 + 2 ) //Category(1 byte), Action(1 byte), DialogToken(1 byte), Advertisement protocol IE(4 bytes), Query Request Length(2 bytes) -#define Frame_GAS_QueryReq_OUI(f) ( Frame_GAS_QueryReq(f) + 2 + 2 ) +#define Frame_GAS_QueryReq_OUI(f) ( Frame_GAS_QueryReq(f) + 2 + 2 ) //Info ID(2 bytes), Length(2 bytes) -#define Frame_GAS_QueryReq_Type(f) ( Frame_GAS_QueryReq_OUI(f) + 3 ) +#define Frame_GAS_QueryReq_Type(f) ( Frame_GAS_QueryReq_OUI(f) + 3 ) //OUI(3 bytes) -#define Frame_GAS_QueryRsp(f) ( Frame_FrameBody(f) + 1 + 1 + 1 + 2 + 2 + 4 + 2 ) +#define Frame_GAS_QueryRsp(f) ( Frame_FrameBody(f) + 1 + 1 + 1 + 2 + 2 + 4 + 2 ) //Category(1 byte), Action(1 byte), DialogToken(1 byte), Status code(2 bytes), GAS Comeback Delay(2 bytes), Advertisement protocol IE(4 bytes), Query Response Length(2 bytes) -#define Frame_GAS_QueryRsp_OUI(f) ( Frame_GAS_QueryRsp(f) + 2 + 2 ) +#define Frame_GAS_QueryRsp_OUI(f) ( Frame_GAS_QueryRsp(f) + 2 + 2 ) //Info ID(2 bytes), Length(2 bytes) -#define Frame_GAS_QueryRsp_Type(f) ( Frame_GAS_QueryRsp_OUI(f) + 3 ) +#define Frame_GAS_QueryRsp_Type(f) ( Frame_GAS_QueryRsp_OUI(f) + 3 ) //OUI(3 bytes) -#define Frame_GAS_ComebackRsp(f) ( Frame_FrameBody(f) + 1 + 1 + 1 + 2 + 1 + 2 + 4 + 2 ) +#define Frame_GAS_ComebackRsp(f) ( Frame_FrameBody(f) + 1 + 1 + 1 + 2 + 1 + 2 + 4 + 2 ) //Category(1 byte), Action(1 byte), DialogToken(1 byte), Status code(2 bytes), GAS Query Response Fragment ID(1 byte), GAS Comeback Delay(2 bytes), Advertisement protocol IE(4 bytes), Query Response Length(2 bytes) -#define Frame_GAS_ComebackRsp_OUI(f) ( Frame_GAS_ComebackRsp(f) + 2 + 2 ) +#define Frame_GAS_ComebackRsp_OUI(f) ( Frame_GAS_ComebackRsp(f) + 2 + 2 ) //Info ID(2 bytes), Length(2 bytes) -#define Frame_GAS_ComebackRsp_Type(f) ( Frame_GAS_ComebackRsp_OUI(f) + 3 ) +#define Frame_GAS_ComebackRsp_Type(f) ( Frame_GAS_ComebackRsp_OUI(f) + 3 ) //OUI(3 bytes) #define Frame_QoSTID(f, offset) (EF1Byte( *((f).Octet +offset )) & 0x0f) @@ -215,7 +215,7 @@ typedef enum _ELEMENT_ID{ EID_TClass = 14, EID_Schedule = 15, // - + EID_Ctext = 16, /* challenge text*/ EID_POWER_CONSTRAINT = 32, /* Power Constraint*/ @@ -227,7 +227,7 @@ typedef enum _ELEMENT_ID{ EID_MeasureRequest = 38, // Measurement Request EID_MeasureReport = 39, // Measurement Report - + EID_ERPInfo = 42, // Form 7.3.2: Information elements in 802.11E/D13.0, page 46. @@ -236,28 +236,28 @@ typedef enum _ELEMENT_ID{ EID_HTCapability = 45, EID_QoSCap = 46, // - + EID_WPA2 = 48, EID_ExtSupRates = 50, EID_FTIE = 55, // Defined in 802.11r EID_Timeout = 56, // Defined in 802.11r - + EID_SupRegulatory = 59, // Supported Requlatory Classes 802.11y EID_HTInfo = 61, EID_SecondaryChnlOffset = 62, EID_WAPI = 68, - + EID_BSSCoexistence = 72, // 20/40 BSS Coexistence EID_BSSIntolerantChlReport = 73, EID_OBSS = 74, // Overlapping BSS Scan Parameters - + EID_LinkIdentifier = 101, // Defined in 802.11z EID_WakeupSchedule = 102, // Defined in 802.11z EID_ChnlSwitchTimeing = 104, // Defined in 802.11z EID_PTIControl = 105, // Defined in 802.11z EID_PUBufferStatus = 106, // Defined in 802.11z - + EID_EXTCapability = 127, // Extended Capabilities // From S19:Aironet IE and S21:AP IP address IE in CCX v1.13, p16 and p18. EID_Aironet = 133, // 0x85: Aironet Element for Cisco CCX @@ -265,7 +265,7 @@ typedef enum _ELEMENT_ID{ EID_CellPwr = 150, // 0x96: Cell Power Limit IE. Ref. 0x96. - EID_CCKM = 156, + EID_CCKM = 156, EID_VHTCapability = 191, // Based on 802.11ac D2.0 EID_VHTOperation = 192, // Based on 802.11ac D2.0 @@ -341,7 +341,7 @@ typedef enum _OUI_SUBTYPE{ OUI_SUB_BROADCOM_IE_3, OUI_SUB_BROADCOM_LINKSYSE4200_IE_1, // 2012/04/28 zhiyuan to make sure Linksys E4200 AP 5G only OUI_SUB_BROADCOM_LINKSYSE4200_IE_2, - OUI_SUB_BROADCOM_LINKSYSE4200_IE_3, + OUI_SUB_BROADCOM_LINKSYSE4200_IE_3, OUI_SUB_CISCO_IE, // 2008/05/12 Emily. Recognize Cisco AP OUI_SUB_MERU_IE, OUI_SUB_RALINK_IE, @@ -350,7 +350,7 @@ typedef enum _OUI_SUBTYPE{ OUI_SUB_WPA2GTK, OUI_SUB_MARVELL, OUI_SUB_AIRGO, - OUI_SUB_SSIDL, // For CCX v4 s53 SSIDL,070702 by CCW + OUI_SUB_SSIDL, // For CCX v4 s53 SSIDL,070702 by CCW OUI_SUB_CCX_TSM, // For CCX4 S56, Traffic Stream Metrics, 070615, by rcnjko. OUI_SUB_CCX_SFA, // For CCX5, CCX Support Features Advertisement OUI_SUB_CCX_DIAG_REQ_REASON, // For CCX5, CCX Diagnostic Channel Request Reason @@ -410,7 +410,7 @@ typedef enum _TYPE_SUBTYPE{ Type_Deauth = 0xc0, Type_Action = 0xd0, Type_Action_No_Ack = 0xe0, - + // Control Frame Type_Beamforming_Report_Poll = 0x44, //= MkString(S8(0,0,1,0,0,0,1,0)); Type_NDPA = 0x54,//= MkString(S8(0,0,1,0,1,0,1,0)); @@ -565,7 +565,7 @@ typedef enum _VHT_ACTION{ typedef enum _ACT_PKT_TYPE { ACT_PKT_TYPE_UNKNOWN, // Invalid or unrecognized frame - + // Qos (0x1) ACT_PKT_QOS_ADDTSREQ, ACT_PKT_QOS_ADDTSRSP, @@ -672,7 +672,7 @@ typedef enum _ENCAP_DATA_PKT_TYPE typedef struct _PKT_PATTERN_MAP { u4Byte PktType; // Packet Type - u2Byte PatternLen; // The length in byte of the Pattern + u2Byte PatternLen; // The length in byte of the Pattern pu1Byte Pattern; // Point to the pattern array }PKT_PATTERN_MAP, *PPKT_PATTERN_MAP; @@ -716,7 +716,7 @@ typedef struct _PKT_IE_OFFSET_MAP #define SET_80211_HDR_TYPE_AND_SUBTYPE(_hdr, _val) WriteEF1Byte(_hdr, _val) -// Byte[0] BIT7 in Frame Control is reserved for QoS. Added by Annie, 2005-12-02. +// Byte[0] BIT7 in Frame Control is reserved for QoS. Added by Annie, 2005-12-02. #define FC_QOS_BIT BIT7 // Byte[0] BIT6 in Frame Control seems to be reserved for "No Data". Added by Annie, 2006-01-06. @@ -800,7 +800,7 @@ typedef struct _PKT_IE_OFFSET_MAP // // Authentication frame. -// +// #define GET_AUTH_FRAME_AUTH_ALG_NUM(__pHeader) ReadEF2Byte(((pu1Byte)(__pHeader)) + 24) #define SET_AUTH_FRAME_AUTH_ALG_NUM(__pHeader, __Value) WriteEF2Byte(((pu1Byte)(__pHeader)) + 24, __Value) @@ -814,7 +814,7 @@ typedef struct _PKT_IE_OFFSET_MAP // // Associate Request frame. -// +// #define GET_ASOC_REQ_CAPABILITY_INFO(__pHeader) ReadEF2Byte(((pu1Byte)(__pHeader)) + 24) #define SET_ASOC_REQ_CAPABILITY_INFO(__pHeader, __Value) WriteEF2Byte(((pu1Byte)(__pHeader)) + 24, __Value) @@ -823,7 +823,7 @@ typedef struct _PKT_IE_OFFSET_MAP // // Associate Reponse frame. -// +// #define GET_ASOC_RSP_CAPABILITY_INFO(__pHeader) ReadEF2Byte(((pu1Byte)(__pHeader)) + 24) #define SET_ASOC_RSP_CAPABILITY_INFO(__pHeader, __Value) WriteEF2Byte(((pu1Byte)(__pHeader)) + 24, __Value) @@ -974,13 +974,13 @@ TimGetBcMcBit( IN OCTET_STRING Tim ); -BOOLEAN -TimGetAIDBit( - IN OCTET_STRING Tim, +BOOLEAN +TimGetAIDBit( + IN OCTET_STRING Tim, IN u2Byte AID ); -u2Byte +u2Byte ComputeTxTime( IN u2Byte FrameLength, IN u4Byte DataRate, @@ -1015,10 +1015,10 @@ CompareSSID( #define CopySsid(__pDstBuf, __DstLen, __pSrcBuf, __SrcLen) \ {(__DstLen) = ( ((__SrcLen) > MAX_SSID_LEN) ? MAX_SSID_LEN : (__SrcLen) ); \ - CopyMem((__pDstBuf), (__pSrcBuf), (__DstLen));} + CopyMem((__pDstBuf), (__pSrcBuf), (__DstLen));} #define CopySsidOS(__osDst, __osSrc) \ - CopySsid((__osDst).Octet, (__osDst).Length, (__osSrc).Octet, (__osSrc).Length) + CopySsid((__osDst).Octet, (__osDst).Length, (__osSrc).Octet, (__osSrc).Length) u1Byte ComputeAckRate( @@ -1046,7 +1046,7 @@ IEGetElementNum( IN u1Byte OUISubType ); -OCTET_STRING +OCTET_STRING IEGetElement( IN OCTET_STRING IEs, IN ELEMENT_ID ID, diff --git a/network/wlan/WDI/COMMON/QosGen.c b/network/wlan/WDI/COMMON/QosGen.c index fabb19f1c..47bcf91bc 100644 --- a/network/wlan/WDI/COMMON/QosGen.c +++ b/network/wlan/WDI/COMMON/QosGen.c @@ -19,7 +19,7 @@ QosParsingDebug_TspecIE( ) { pu1Byte pIe = pOsBuffer->Octet; - + RT_TRACE( COMP_QOS, DBG_LOUD, ("======= TSPEC IE =======\n")); RT_TRACE( COMP_QOS, DBG_LOUD, ("TrafficType: %d\n", GET_TSPEC_TSINFO_TRAFFIC_TYPE(pIe) )); @@ -31,7 +31,7 @@ QosParsingDebug_TspecIE( RT_TRACE( COMP_QOS, DBG_LOUD, ("UP: %d\n", GET_TSPEC_TSINFO_UP(pIe) )); RT_TRACE( COMP_QOS, DBG_LOUD, ("AckPolicy: %d\n", GET_TSPEC_TSINFO_ACK_POLICY(pIe) )); RT_TRACE( COMP_QOS, DBG_LOUD, ("Schedule: %d\n", GET_TSPEC_TSINFO_SCHEDULE(pIe) )); - + RT_TRACE( COMP_QOS, DBG_LOUD, ("NominalMsduSize: %d\n", GET_TSPEC_NOMINAL_MSDU_SIZE(pIe) )); RT_TRACE( COMP_QOS, DBG_LOUD, ("MaxMsduSize: %d\n", GET_TSPEC_MAX_MSDU_SIZE(pIe) )); RT_TRACE( COMP_QOS, DBG_LOUD, ("MinServiceInterval: %d\n", GET_TSPEC_MIN_SERVICE_INTERVAL(pIe) )); @@ -47,7 +47,7 @@ QosParsingDebug_TspecIE( RT_TRACE( COMP_QOS, DBG_LOUD, ("MinPhyRate: %d\n", GET_TSPEC_MIN_PHY_RATE(pIe) )); RT_TRACE( COMP_QOS, DBG_LOUD, ("SurplusBandwith: %d\n", GET_TSPEC_SURPLUS_BANDWITH_ALLOWANCE(pIe) )); RT_TRACE( COMP_QOS, DBG_LOUD, ("MediumTime: %d\n", GET_TSPEC_MEDIUM_TIME(pIe) )); - + RT_TRACE( COMP_QOS, DBG_LOUD, ("===== end of TSPEC IE =====\n")); } @@ -66,19 +66,19 @@ QosParsingDebug_TsrsIE( u1Byte Length; u1Byte i; u1Byte rate; - + RT_TRACE( COMP_QOS, DBG_LOUD, ("======= TSRS IE =======\n")); Length = (*(pOsBuffer->Octet + 1)) - 5; TSID = *(pOsBuffer->Octet + 6); - + RT_TRACE( COMP_QOS, DBG_LOUD, ("TSID: %d\n", TSID)); for (i = 0; i < Length; i ++) { rate = *(pOsBuffer->Octet + 7 + i); RT_TRACE( COMP_QOS, DBG_LOUD, ("Rate: 0x%x\n", rate)); } - + RT_TRACE( COMP_QOS, DBG_LOUD, ("===== end of TSRS IE =====\n")); } @@ -95,15 +95,15 @@ QosParsingDebug_MsduLifetimeIE( { u1Byte TSID; u2Byte MsduLifetime; - + RT_TRACE( COMP_QOS, DBG_LOUD, ("======= MSDU Lifetime IE =======\n")); TSID = *(pOsBuffer->Octet+6); MsduLifetime = N2H2BYTE( *((UNALIGNED pu2Byte)(pOsBuffer->Octet+7)) ); RT_TRACE( COMP_QOS, DBG_LOUD, ("TSID: %d\n", TSID)); - RT_TRACE( COMP_QOS, DBG_LOUD, ("MsduLifetime: %d\n", MsduLifetime)); - + RT_TRACE( COMP_QOS, DBG_LOUD, ("MsduLifetime: %d\n", MsduLifetime)); + RT_TRACE( COMP_QOS, DBG_LOUD, ("===== end of MSDU Lifetime IE =====\n")); } @@ -113,8 +113,8 @@ QosParsingDebug_MsduLifetimeIE( // // Initialize QoS parameters. // Ref: RTL8185B_InitQoSPara() in 8185 QoS code. -// -VOID +// +VOID QosInitializeSTA( IN PADAPTER Adapter ) @@ -123,7 +123,7 @@ QosInitializeSTA( PSTA_QOS pStaQos = pMgntInfo->pStaQos; u1Byte szQoSOUI[] = {0x00, 0x50, 0xf2, 0x02}; - + pStaQos->CurrentQosMode = QOS_DISABLE; pStaQos->bInServicePeriod = FALSE; //[APSD] Isaiah 2006-07-24 @@ -131,7 +131,7 @@ QosInitializeSTA( pStaQos->WMMIE.Octet = pStaQos->WMMIEBuf; pStaQos->WMMIE.Length = 0; pStaQos->pWMMInfoEle = pStaQos->WMMIEBuf; - + // Default OUI & type: 00-50-F2-02 // CopyMem( pStaQos->WMMIE.Octet, szQoSOUI, 4 ); PlatformMoveMemory(pStaQos->WMMIE.Octet, szQoSOUI, 4); @@ -140,7 +140,7 @@ QosInitializeSTA( SET_WMM_INFO_ELE_QOS_INFO_FIELD(pStaQos->pWMMInfoEle,0); pStaQos->WMMIE.Length = 7; - + // Decide ACM method. Annie, 2005-12-13. pStaQos->AcmMethod = eAcmWay2_SW; @@ -151,9 +151,9 @@ QosInitializeSTA( } // -// Deinitialize all resources allocated at QosInitializeSTA +// Deinitialize all resources allocated at QosInitializeSTA // -VOID +VOID QosDeinitializeSTA( IN PADAPTER Adapter ) @@ -163,7 +163,7 @@ QosDeinitializeSTA( -VOID +VOID QosInitializeBssDesc( IN PBSS_QOS pBssQos ) @@ -185,8 +185,8 @@ QosInitializeBssDesc( // // Parsing WMM Information element or parameter element. // Ref: RTL8185B_InitQoSPara() in 8185 QoS code. -// -VOID +// +VOID QosParsingQoSElement( IN PADAPTER Adapter, IN BOOLEAN bEDCAParms, @@ -222,7 +222,7 @@ QosParsingQoSElement( switch( pBssDesc->BssQos.EleSubType ) { - case QOSELE_TYPE_INFO: + case QOSELE_TYPE_INFO: pBssDesc->BssQos.pWMMInfoEle = pBssDesc->BssQos.bdWMMIE.Octet; qosinfo= GET_WMM_INFO_ELE_QOS_INFO_FIELD(pBssDesc->BssQos.pWMMInfoEle); break; @@ -237,7 +237,7 @@ QosParsingQoSElement( } - //[APSD] Indicate QosMode whether WMM AP supports WMM Power Save or not. + //[APSD] Indicate QosMode whether WMM AP supports WMM Power Save or not. if(Adapter->MgntInfo.pStaQos->QosCapability & QOS_WMM_UAPSD) { RT_TRACE( COMP_QOS, DBG_LOUD, ("[APSD] qosinfo=%x\n", qosinfo)); @@ -249,14 +249,14 @@ QosParsingQoSElement( //RT_TRACE( COMP_QOS, DBG_LOUD, ("[WMM] AP bdQoSMode=%x\n", pBssDesc->BssQos.bdQoSMode)); - + // For debugging ONLY. Annie, 2005-11-12. //QosParsingDebug_BssDesc( pBssDesc ); } -VOID +VOID QosSetLegacyWMMParamWithHT( IN PADAPTER Adapter, OUT PRT_WLAN_BSS pBssDesc @@ -266,14 +266,14 @@ QosSetLegacyWMMParamWithHT( pBssDesc->BssQos.bdQoSMode |= QOS_WMM; // [Isaiah] when to pBssDesc->BssQos.bdQoSMode &= ~QOS_WMM ?? pBssDesc->BssQos.bdQoSMode &=~ QOS_WMM_UAPSD; - + FillOctetString(pBssDesc->BssQos.bdWMMIE, pBssDesc->BssQos.bdWMMIEBuf, WMM_PARAM_ELEMENT_SIZE); pBssDesc->BssQos.pWMMParamEle = pBssDesc->BssQos.bdWMMIE.Octet; SET_WMM_PARAM_ELE_AC_PARAMS(pBssDesc->BssQos.pWMMParamEle, Adapter->STA_EDCA_PARAM); - + RT_TRACE( COMP_QOS, DBG_LOUD, ("[WMM] QosSetLegacyWMMParamWithHT(): AP bdQoSMode=%x\n", pBssDesc->BssQos.bdQoSMode)); - + // For debugging ONLY. Annie, 2005-11-12. // QosParsingDebug_BssDesc( pBssDesc ); @@ -290,7 +290,7 @@ QosSetLegacyACParam( ) { // [Win7] pChnlAccessSetting use the common part for both adapters. 2009.07.02, by Bohn - PCHANNEL_ACCESS_SETTING pChnlAccessSetting = &(GetDefaultMgntInfo(Adapter)->ChannelAccessSetting); + PCHANNEL_ACCESS_SETTING pChnlAccessSetting = &(GetDefaultMgntInfo(Adapter)->ChannelAccessSetting); AC_CODING eACI; u4Byte AcParam=0; pu1Byte pTmp_WMMParamEle=NULL; @@ -300,23 +300,23 @@ QosSetLegacyACParam( // 2. Note that, 85B's throughput with Cisco1231 and Broadcom testbed are less than 20M, so we change the contention window from 0xA5 to 0x73. // With CW=0x73, the throughput are 21M~22M. // If there in any side event with 0x73, we should test 0xA4 first (following spec). Annie, 2006-04-04. - // + // SET_WMM_AC_PARAM_AIFSN(&AcParam, 2); // Follow 802.11 DIFS. SET_WMM_AC_PARAM_ACM(&AcParam, 0); SET_WMM_AC_PARAM_ECWMIN(&AcParam, pChnlAccessSetting->CWminIndex); SET_WMM_AC_PARAM_ECWMAX(&AcParam, pChnlAccessSetting->CWmaxIndex); SET_WMM_AC_PARAM_TXOP_LIMIT(&AcParam, 0); - + pTmp_WMMParamEle = (pu1Byte)GetTwoPortSharedResource(Adapter,TWO_PORT_SHARED_OBJECT__SET_OF_pStaQos_WMMParamEle ,Adapter->MgntInfo.pStaQos->WMMParamEle,NULL); - + RT_ASSERT(pTmp_WMMParamEle != NULL, ("QosSetLegacyACParam(): Get Null WMMParamEle.\n")); for(eACI = 0; eACI < AC_MAX; eACI++) { if(eACI == AC3_VO) - { + { // For Wifi-Direct Device Discovery: MgntQueue should be fast ---------------------------------------- u4Byte VOQueueAcParam = 0; SET_WMM_AC_PARAM_AIFSN(&VOQueueAcParam, 0); @@ -345,14 +345,14 @@ QosSetLegacyACParam( // Ref: QOS_OnAssociationResponse() in 8185 QoS code: // TODO: // (1)Config QoS mode, MSR reister for EDCA/HCCA mode -// (2) Config ACM reqirement +// (2) Config ACM reqirement // (2.1) Config driver parameter for ACM control // (2.2) Configure WME parameter register // (2.3) Configure WiFi mode ACM // (3) Config Queue Size Request Mode // (4) Turn on accumulated duration field if required // (5)Create AddTspec action management frame -// +// VOID QosOnAssocRsp( IN PADAPTER Adapter, @@ -389,7 +389,7 @@ QosOnAssocRsp( FillOctetString(WMMParaEle, pStaQos->WMMParamEle, WMM_PARAM_ELEMENT_SIZE); } - + //copy OUI ~ Reserved (8 bytes), because Joseph say AC Parameters may disorder. //They would store later. CopyMem( pStaQos->WMMParamEle, WMMParaEle.Octet, 8 ); @@ -402,11 +402,11 @@ QosOnAssocRsp( { AcParamPtr = GET_WMM_PARAM_ELE_SINGLE_AC_PARAM(WMMParaEle.Octet, index); if(AcParamPtr != NULL) - eACI = GET_WMM_AC_PARAM_ACI(AcParamPtr); - + eACI = GET_WMM_AC_PARAM_ACI(AcParamPtr); + // Filter out ACI and ACM which is not related to EDCA parameters and check if the // value is all NULL. If the value is all NULL, we shall use EDCA default value. - //Prefast warning C28182: Dereferencing NULL pointer. 'AcParamPtr' contains the same NULL value as 'WMMParaEle.Octet' did. + //Prefast warning C28182: Dereferencing NULL pointer. 'AcParamPtr' contains the same NULL value as 'WMMParaEle.Octet' did. if(AcParamPtr != NULL && EF4Byte( *((UNALIGNED pu4Byte)AcParamPtr) & 0xffffff0f)==0) SET_WMM_PARAM_ELE_SINGLE_AC_PARAM(pStaQos->WMMParamEle, eACI, &(Adapter->STA_EDCA_PARAM[eACI]) ); @@ -439,11 +439,11 @@ QosOnBeaconUpdateParameter( { PSTA_QOS pStaQos = Adapter->MgntInfo.pStaQos; - RT_ASSERT( pStaQos->QosCapability, ("QosOnBeaconUpdateParameter(): QosCapability == WMM_Disable!!!\n")); + RT_ASSERT( pStaQos->QosCapability, ("QosOnBeaconUpdateParameter(): QosCapability == WMM_Disable!!!\n")); if(pBssDesc->BssQos.EleSubType != QOSELE_TYPE_PARAM) return; - else + else { pu1Byte pWMMPE_STA= pStaQos->WMMParamEle; @@ -458,9 +458,9 @@ QosOnBeaconUpdateParameter( { bssAcParamPtr = GET_WMM_PARAM_ELE_SINGLE_AC_PARAM(pBssDesc->BssQos.pWMMParamEle, index); AcIdx = GET_WMM_AC_PARAM_ACI(bssAcParamPtr); - + staAcParamPtr = GET_WMM_PARAM_ELE_SINGLE_AC_PARAM(pWMMPE_STA, AcIdx); - + staAcParam = EF4Byte(*((UNALIGNED pu4Byte)staAcParamPtr)); bssAcParam = EF4Byte(*((UNALIGNED pu4Byte)bssAcParamPtr)); @@ -492,23 +492,23 @@ QosFillHeader( u2Byte FragBufferIndex = 0; pu1Byte pHeader = (pu1Byte)(GET_FRAME_OF_FIRST_FRAG(Adapter, pTcb)); PSTA_QOS pStaQos = Adapter->MgntInfo.pStaQos; - + // Note: subtype of QoS data has already changed in TranslateHeader(). - // Thus I use FC byte[0] bit7 to determine filling QoS control field or not. + // Thus I use FC byte[0] bit7 to determine filling QoS control field or not. // Annie, 2005-12-06. if( IsQoSDataFrame(pHeader) && !IsMgntQosNull(pHeader)) - { + { u2Byte QosCtrl; // 1. Fill QoS Control Field SET_QOS_CTRL(pHeader, 0); SET_QOS_CTRL_STA_DATA_AMSDU(pHeader, ((pTcb->bAggregate)?1:0) ); SET_QOS_CTRL_WMM_UP(pHeader, pTcb->priority); - SET_QOS_CTRL_WMM_ACK_POLICY(pHeader, + SET_QOS_CTRL_WMM_ACK_POLICY(pHeader, (WMMUP_TO_RT_AC_BIT(pTcb->priority) & pStaQos->AcNoAck) ? 1 : 0); // Set Ack Policy by the UP setting - + // 2. Consider fragmentation case. QosCtrl=GET_QOS_CTRL(pHeader); - + for( i=0; iBufferCount; i++ ) { if( FragBufferIndex == 0 ) // fragmentation header @@ -537,14 +537,14 @@ QosFillHeader( case 3: pTcb->SpecifiedQueueID = BE_QUEUE; // 1 break; - + case 1: case 2: pTcb->SpecifiedQueueID = BK_QUEUE; // 0 break; - + case 4: - case 5: + case 5: pTcb->SpecifiedQueueID = VI_QUEUE; // 2 break; @@ -644,7 +644,7 @@ QosParsingDebug_BssDesc( return; } - RT_TRACE( COMP_QOS, DBG_LOUD, ("-----------------------------------------\n" ) ); + RT_TRACE( COMP_QOS, DBG_LOUD, ("-----------------------------------------\n" ) ); RT_TRACE( COMP_QOS, DBG_LOUD, ("===> QosParsingDebug_BssDesc()\n") ); RT_PRINT_STR( COMP_QOS, DBG_LOUD, "SSID", pBssDesc->bdSsIdBuf, pBssDesc->bdSsIdLen ); @@ -669,10 +669,10 @@ QosParsingDebug_STA( RT_TRACE( COMP_QOS, DBG_LOUD, ("QosParsingDebug_STA(): CurrentQosMode is %d\n", pStaQos->CurrentQosMode ) ); if( pStaQos->CurrentQosMode == QOS_DISABLE ) { - RT_TRACE( COMP_QOS, DBG_LOUD, ("<=== QosParsingDebug_STA(): QOS_DISABLE.\n") ); + RT_TRACE( COMP_QOS, DBG_LOUD, ("<=== QosParsingDebug_STA(): QOS_DISABLE.\n") ); return; } - + // 0. Show current SSID. RT_PRINT_STR( COMP_QOS, DBG_LOUD, "SSID", pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length ); @@ -684,7 +684,7 @@ QosParsingDebug_STA( RT_TRACE( COMP_QOS, DBG_LOUD, ("--------------- WMM Parameter Element Content ----------------\n") ); QosParsingDebug_ParaElement( pStaQos->WMMParamEle ); - + RT_TRACE( COMP_QOS, DBG_LOUD, ("------------------------------------------------------------\n") ); RT_TRACE( COMP_QOS, DBG_LOUD, ("<=== QosParsingDebug_STA()\n") ); } @@ -720,7 +720,7 @@ QosParsingDebug_ParaElement( RT_TRACE( COMP_QOS, DBG_LOUD, ("OUI sub Type: 0x%02X\n",GET_WMM_PARAM_ELE_OUI_SUBTYPE(pWMMParamEle)) ); RT_TRACE( COMP_QOS, DBG_LOUD, ("Version: 0x%02X\n", GET_WMM_PARAM_ELE_VERSION(pWMMParamEle)) ); RT_TRACE( COMP_QOS, DBG_LOUD, ("QosInfo: 0x%02X\n", GET_WMM_PARAM_ELE_QOS_INFO_FIELD(pWMMParamEle)) ); - + pAcParam = GET_WMM_PARAM_ELE_AC_PARAMS(pWMMParamEle); for( eACI=0; eACIBuffer.VirtualAddress, &pTcb->PacketLength, StaAddr, @@ -810,10 +810,10 @@ SendQoSNullFunctionData( bForcePowerSave); DataRate = pMgntInfo->LowestBasicRate; // Annie, 2005-03-31 - + pTcb->priority = AC; - - MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, LOW_QUEUE, DataRate); + + MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, LOW_QUEUE, DataRate); } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); @@ -824,12 +824,12 @@ SendQoSNullFunctionData( VOID QosConstructEDCAParamElem( IN PADAPTER Adapter, - OUT POCTET_STRING posEDCAParamElem + OUT POCTET_STRING posEDCAParamElem ) { //1REWRITE this part!!! PlatformZeroMemory(posEDCAParamElem->Octet, 2); //(Qos Info field + reserved) for WMM - + CopyMem(posEDCAParamElem->Octet + 2, Adapter->STA_EDCA_PARAM, AC_MAX * AC_PARAM_SIZE); posEDCAParamElem->Length = WMM_PARAM_ELE_BODY_LEN; @@ -881,7 +881,7 @@ QosConstructTSPEC( SET_TSPEC_OUI_TYPE(pTspec, 2); SET_TSPEC_OUI_SUBTYPE(pTspec, 2); SET_TSPEC_VERSION(pTspec, 1); - + // TSINFO SET_TSPEC_TSINFO_TSID(pTspec, TID); SET_TSPEC_TSINFO_DIRECTION(pTspec, Direction); @@ -925,13 +925,13 @@ VOID QosInitTs( IN PADAPTER Adapter, IN PQOS_TSTREAM pTs, - IN u1Byte TSID, + IN u1Byte TSID, IN PWMM_TSPEC pTSpec ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; - + RT_ASSERT(pTs != NULL, ("QosInitTs(): pTs should NOT be NULL!!!\n")); RT_ASSERT(pTSpec != NULL, ("QosInitTs(): pTSpecElm should NOT be NULL!!!\n")); RT_ASSERT(TSID < MAX_STA_TS_COUNT, ("QosInitTs(): invalid TSID(%d)!!!\n", TSID)); @@ -946,7 +946,7 @@ QosInitTs( PlatformMoveMemory(&(pTs->OutStandingTSpec), pTSpec, sizeof(WMM_TSPEC)); pTs->NominalPhyRate = (u1Byte) QOS_BPS_TO_RATE( GET_TSPEC_MIN_PHY_RATE(pTSpec) ); pTs->UserPriority = GET_TSPEC_TSINFO_UP(pTSpec); - + RT_TRACE(COMP_QOS, DBG_LOUD, ("========================================\n")); RT_TRACE(COMP_QOS, DBG_LOUD, ("QosInitTs(): pTs(%p), TSID(%d)\n", pTs, TSID)); @@ -970,13 +970,13 @@ QosFlushTs( ) { PRT_TCB pTcb; - + if(!ACTING_AS_AP(Adapter)) { while ( !RTIsListEmpty(&(pTs->BufferedPacketList)) ) { pTcb = (PRT_TCB)RTRemoveHeadList(&(pTs->BufferedPacketList)); - + pTcb->bFromUpperLayer = FALSE; NicIFSendPacket(Adapter, pTcb); @@ -991,22 +991,22 @@ QosFlushTs( // // Input: // TSID: Traffic stream ID, WMM: 0-7, CAC: 8,9, 11e: 8-15 -// RA: Receiver MAC address. +// RA: Receiver MAC address. // TA: Transmitter MAC address. // pTSpec: TSPEC of the traffic stream, its content will be copied into the QOS_TSTREAM object. // // Output: -// Pointer to the TS object for new created traffic stream if succeeded, +// Pointer to the TS object for new created traffic stream if succeeded, // NULL otherwise. // // Assumption: // 1. RT_QOS_SPINLOCK is NOT acquired. // -PQOS_TSTREAM +PQOS_TSTREAM QosAddTs( IN PADAPTER Adapter, - IN u1Byte TSID, - IN pu1Byte RA, + IN u1Byte TSID, + IN pu1Byte RA, IN pu1Byte TA, IN PWMM_TSPEC pTSpec ) @@ -1023,7 +1023,7 @@ QosAddTs( { if(TSID < MAX_STA_TS_COUNT) { - pTs = &(pStaQos->StaTsArray[TSID]); + pTs = &(pStaQos->StaTsArray[TSID]); } } else @@ -1038,9 +1038,9 @@ QosAddTs( if(pTs != NULL) { - if (pTs->bUsed) + if (pTs->bUsed) QosUpdateTs(Adapter, pTs, pTSpec); - else + else QosInitTs(Adapter, pTs, TSID, pTSpec); } else @@ -1053,7 +1053,7 @@ QosAddTs( // // Description: -// Get a TS object according to given (TSID, RA, TA). +// Get a TS object according to given (TSID, RA, TA). // // Input: // TSID: Traffic stream ID, WMM: 0-7, CAC: 8,9, 11e: 8-15 @@ -1064,27 +1064,27 @@ QosAddTs( // Pointer to a TS object if found, NULL otherwise. // // Assumption: -// 1. We MIGHT acquired RT_QOS_SPINLOCK before calling this function, +// 1. We MIGHT acquired RT_QOS_SPINLOCK before calling this function, // so, we should not acquire it in this function. // -PQOS_TSTREAM +PQOS_TSTREAM QosGetTs( IN PADAPTER Adapter, - IN u1Byte TSID, - IN pu1Byte RA, + IN u1Byte TSID, + IN pu1Byte RA, IN pu1Byte TA ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; PQOS_TSTREAM pTs = NULL; - + if(!ACTING_AS_AP(Adapter)) { - if( TSID < MAX_STA_TS_COUNT && + if( TSID < MAX_STA_TS_COUNT && pStaQos->StaTsArray[TSID].bUsed ) { - pTs = &(pStaQos->StaTsArray[TSID]); + pTs = &(pStaQos->StaTsArray[TSID]); } } else @@ -1116,7 +1116,7 @@ QosUpdateTs( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PSTA_QOS pStaQos = pMgntInfo->pStaQos; - + RT_ASSERT(pTs != NULL, ("QosUpdateTs(): pTs should NOT be NULL!!!\n")); RT_ASSERT(pTSpec != NULL, ("QosUpdateTs(): pTSpec should NOT be NULL!!!\n")); @@ -1142,7 +1142,7 @@ QosSendAddTs( PSTA_QOS pStaQos = pMgntInfo->pStaQos; PQOS_TSTREAM pTStream = pTs; u4Byte i; - + for (i = 0; i < numTs; i ++) { if (pTStream && pTStream->bUsed) @@ -1150,8 +1150,8 @@ QosSendAddTs( pTStream ++; } - PlatformSetTimer(Adapter, - &(pStaQos->AddTsTimer), + PlatformSetTimer(Adapter, + &(pStaQos->AddTsTimer), ADDTS_TIME_SLOT); SendQosAddTs(Adapter, pTs, numTs); @@ -1190,7 +1190,7 @@ QosTsHash( RT_PRINT_DATA(COMP_QOS, DBG_TRACE, "TSID, RA, TA: ", Key, RM_STA_RX_POWER_KEY_SIZE); - for(idx = 1; idx < QOS_TSTREAM_KEY_SIZE; idx ++) + for(idx = 1; idx < QOS_TSTREAM_KEY_SIZE; idx ++) result += Key[idx]; result = result % MAX_AP_TS_COUNT; @@ -1227,7 +1227,7 @@ QosAddTsTimerCallback( // If ADDTS has sent out, TimeSlotCount should not be zero. if (pTs->TimeSlotCount) pTs->TimeSlotCount ++; - + if (pTs->TimeSlotCount == (ADDTS_TIMEOUT / ADDTS_TIME_SLOT) ) { // Time is up, remove this ts, do not request ts. RT_TRACE(COMP_QOS, DBG_LOUD, ("QosAddTsTimerCallback(): ADDTS Timeout!\n")); @@ -1249,7 +1249,7 @@ QosAddTsTimerCallback( ADDTS_TIME_SLOT); } } - + } // @@ -1299,7 +1299,7 @@ QosResetTs( ) { PRT_TCB pTcb; - + RT_ASSERT(pTs != NULL, ("QosResetTs(): pTs should NOT be NULL!!!\n")); pTs->bUsed = FALSE; @@ -1328,7 +1328,7 @@ QosResetTs( // Assumption: // RT_QOS_SPINLOCK is NOT acquired. // -BOOLEAN +BOOLEAN QosResetAllTs( IN PADAPTER Adapter ) @@ -1380,7 +1380,7 @@ QosRemoveAllTs( PQOS_TSTREAM pTs; PRT_LIST_ENTRY pList, pEntry; u1Byte i; - + for (i = 0; i < MAX_STA_TS_COUNT; i ++) { @@ -1398,8 +1398,8 @@ QosRemoveAllTs( RT_ASSERT(pTs->bUsed, ("QosRemoveAllTs(): pTs(%p) bUsed==FALSE !!!\n", pTs)); QosRemoveTs(Adapter, pTs); } - RtResetHashTable(pStaQos->hApTsTable); - + RtResetHashTable(pStaQos->hApTsTable); + } @@ -1473,7 +1473,7 @@ QosParsingTrafficStreamIE( { osIE.Octet = Dot11Ie.Content.Octet - 2; osIE.Length = Dot11Ie.Content.Length + 2; - + if (PlatformCompareMemory( Dot11Ie.Content.Octet, TspecOui, @@ -1487,7 +1487,7 @@ QosParsingTrafficStreamIE( TsrsOui, sizeof(TsrsOui)) == 0) { - QosRecvTsrsIE(Adapter, &osIE, source, rspStatus); + QosRecvTsrsIE(Adapter, &osIE, source, rspStatus); QosParsingDebug_TsrsIE(Adapter, &osIE); } else if (PlatformCompareMemory( @@ -1499,11 +1499,11 @@ QosParsingTrafficStreamIE( QosParsingDebug_MsduLifetimeIE(Adapter, &osIE); } else if (PlatformCompareMemory( - Dot11Ie.Content.Octet, + Dot11Ie.Content.Octet, CcxTsmOui, sizeof(CcxTsmOui)) == 0) { - + } } } @@ -1539,19 +1539,19 @@ QosRecvTspecIE( pTs->TimeSlotCount = 0; // Update TS parameter. - RT_ASSERT( (pOsBuffer->Length == sizeof(WMM_TSPEC)), + RT_ASSERT( (pOsBuffer->Length == sizeof(WMM_TSPEC)), ("QosRecvTspecIE(): Invalid TSPEC IE length\n")); PlatformMoveMemory(&(pTs->TSpec), pOsBuffer->Octet, sizeof(WMM_TSPEC)); QosIncAdmittedTime(Adapter, pTs); - + if (pTs->bEstablishing) { u1Byte CurrCcxVerNumber = 0; - + CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); - + pTs->bEstablishing = FALSE; if (CurrCcxVerNumber >= 4) @@ -1572,22 +1572,22 @@ QosRecvTspecIE( QosFlushTs(Adapter, pTs); PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } - + } - } + } } else if (source == QOSIE_SRC_DELTS) { TSID = GET_TSPEC_TSINFO_TSID(pOsBuffer->Octet); - + QosDecAdmittedTime(Adapter, pTs); - pTs = &(pStaQos->StaTsArray[TSID]); + pTs = &(pStaQos->StaTsArray[TSID]); if (pTs && pTs->bUsed) { QosRemoveTs(Adapter, pTs); } } - + } else { @@ -1626,7 +1626,7 @@ QosRecvTsrsIE( (source == QOSIE_SRC_REASOCRSP) ) { pTs = &(pStaQos->StaTsArray[TSID]); - + for (i = 0; i < Length; i ++) { rate = *(pOsBuffer->Octet + 7 + i); @@ -1635,7 +1635,7 @@ QosRecvTsrsIE( rate &= ~0x80; if (rate != QosGetNPR(Adapter, pTs)) { - RT_TRACE(COMP_QOS, DBG_LOUD, + RT_TRACE(COMP_QOS, DBG_LOUD, ("QosRecvTsrsIE(): returned NPR (%d) is not one we requested (%d) \n", rate, QosGetNPR(Adapter, pTs))); QosSetNPR(Adapter, pTs, rate); @@ -1682,7 +1682,7 @@ QosConstructTSRS( // u1Byte TSRS[] = { 0xdd, 0x06, 0x00, 0x40, 0x96, 0x08, 0x00, 0x00 }; u1Byte TSID; - + if (pTs && pTs->bUsed) { TSID = GET_TSPEC_TSINFO_TSID(pTs->TSpec); @@ -1720,10 +1720,10 @@ QosIncAdmittedTime( bAcm = (BOOLEAN)GET_WMM_AC_PARAM_ACM(pTs->TSpec); if (!bAcm) return; - + UserPriority = GET_TSPEC_TSINFO_UP(pTs->TSpec); MediumTime = GET_TSPEC_MEDIUM_TIME(pTs->TSpec); - + switch (UserPriority) { case 0: @@ -1768,10 +1768,10 @@ QosDecAdmittedTime( RT_ASSERT(pTs != NULL, ("QosIncAdmittedTime(): pTs should not be NULL\n")); if (!pTs->bUsed) return; - + UserPriority = GET_TSPEC_TSINFO_UP(pTs->TSpec); MediumTime = GET_TSPEC_MEDIUM_TIME(pTs->TSpec); - + switch (UserPriority) { case 0: @@ -1792,7 +1792,7 @@ QosDecAdmittedTime( break; } //RT_TRACE(COMP_QOS, DBG_LOUD, ("QosDecAdmittedTime(): DELTS: AC(%d) AdmitTime(%"i64fmt"d) MediumTime(%d)\n", - // eACI, pStaQos->acm[eACI].MediumTime, MediumTime)); + // eACI, pStaQos->acm[eACI].MediumTime, MediumTime)); if (pStaQos->acm[eACI].MediumTime > MediumTime) pStaQos->acm[eACI].MediumTime -= MediumTime; else @@ -1815,7 +1815,7 @@ QosACMTimerCallback( AC_CODING eACI; pu1Byte pacParam; BOOLEAN bAcm; - + for(eACI = 0; eACI < AC_MAX; eACI ++) { pacParam = (pu1Byte)(GET_WMM_PARAM_ELE_AC_PARAM(pStaQos->WMMParamEle)+(4 * eACI)); @@ -1831,7 +1831,7 @@ QosACMTimerCallback( pStaQos->acm[eACI].UsedTime = pStaQos->acm[eACI].UsedTime - pStaQos->acm[eACI].MediumTime; } - } + } } CCX_UpdateUsedTime( Adapter ); @@ -1873,13 +1873,13 @@ QosSetNPR( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); u4Byte MinPhyRate = 0; - + if (!MgntIsRateValidForWirelessMode(rate, pMgntInfo->dot11CurrentWirelessMode)) { RT_TRACE(COMP_QOS, DBG_WARNING, ("QosSetNPR(): Invalid data rate to set!\n")); return; } - + if (pTs && pTs->bUsed) { MinPhyRate = GET_TSPEC_MIN_PHY_RATE(pTs->TSpec); @@ -1896,7 +1896,7 @@ QosSetNPR( // // Description: -// Search established TS and if +// Search established TS and if // 1. No TS -- drop the packet. // 2. TS is establishing -- buffer the packet. // 3. TS is established -- transmit the packet. @@ -1914,20 +1914,20 @@ QosAdmissionControl( PQOS_TSTREAM pTs; BOOLEAN bHandled = FALSE; u1Byte CurrCcxVerNumber = 0; - - CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); - + + CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); + if (CurrCcxVerNumber >= 4) { return CCX_CallAdmissionControl(Adapter, pTcb); } - + if (ACTING_AS_AP(Adapter)) return FALSE; - + if (pTcb->TSID <= MAX_TSPEC_TSID) { - pTs = QosGetTs(Adapter, - pTcb->TSID, + pTs = QosGetTs(Adapter, + pTcb->TSID, pMgntInfo->Bssid, Adapter->CurrentAddress); @@ -1965,7 +1965,7 @@ QosAdmissionControl( bHandled = TRUE; } } - + return bHandled; } @@ -1990,9 +1990,9 @@ QosCalcUsedTimeAndAdmitPacket( u8Byte AccUsedTime; BOOLEAN bReturn = TRUE; - if (pStaQos->CurrentQosMode == QOS_DISABLE) + if (pStaQos->CurrentQosMode == QOS_DISABLE) return TRUE; - + switch (pTcb->priority) { case 0: @@ -2027,7 +2027,7 @@ QosCalcUsedTimeAndAdmitPacket( // 1. Calc used time UsedTime = ((pTcb->PacketLength * 8 * 2) / (pTcb->DataRate)) / 32; AccUsedTime = pStaQos->acm[eACI].UsedTime + UsedTime; - + // 2. Admit packet. if (AccUsedTime >= pStaQos->acm[eACI].MediumTime) { @@ -2045,14 +2045,14 @@ QosCalcUsedTimeAndAdmitPacket( break; case AC1_BK: bReturn = FALSE; - bDetermined = TRUE; + bDetermined = TRUE; break; case AC0_BE: eACI = AC1_BK; pTcb->priority = 2; - break; + break; } - + } else { @@ -2086,7 +2086,7 @@ QosReturnAllPendingTxMsdu( PRT_LIST_ENTRY pList, pEntry; u1Byte i; PRT_TCB pTcb; - + for(i = 0; i < MAX_STA_TS_COUNT; i ++) { @@ -2116,7 +2116,7 @@ QosReturnAllPendingTxMsdu( ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); } } - + } // @@ -2149,10 +2149,10 @@ OnAddTsReq( pTaddr = Frame_Addr2(*posMpdu); pRaddr = Frame_Addr1(*posMpdu); - QosParsingTrafficStreamIE(Adapter, - posMpdu, + QosParsingTrafficStreamIE(Adapter, + posMpdu, (sMacHdrLng + 4), // The first IE in this action frame. - QOSIE_SRC_ADDTSREQ, + QOSIE_SRC_ADDTSREQ, FALSE ); return RT_STATUS_SUCCESS; @@ -2177,7 +2177,7 @@ OnAddTsRsp( u1Byte i; u1Byte DialogToken, StatusCode; u1Byte CurrCcxVerNumber = 0; - + if(ACTING_AS_AP(Adapter)) return RT_STATUS_SUCCESS; @@ -2203,7 +2203,7 @@ OnAddTsRsp( pTs->TimeSlotCount = 0; } } - + CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); if (CurrCcxVerNumber >= 4) @@ -2214,21 +2214,21 @@ OnAddTsRsp( if (StatusCode == 0) { // Success. - QosParsingTrafficStreamIE(Adapter, - posMpdu, - (sMacHdrLng + 4), - QOSIE_SRC_ADDTSRSP, + QosParsingTrafficStreamIE(Adapter, + posMpdu, + (sMacHdrLng + 4), + QOSIE_SRC_ADDTSRSP, TRUE ); } else { // Failed. if (CurrCcxVerNumber >= 4) - { + { RT_TRACE(COMP_QOS, DBG_LOUD, ("OnAddTsRsp(): ADDTS failed, try to roaming...\n")); CCX_OnAddTsRspSet(Adapter); - - MgntActSet_802_11_BSSID_LIST_SCAN(Adapter); + + MgntActSet_802_11_BSSID_LIST_SCAN(Adapter); } else { @@ -2241,14 +2241,14 @@ OnAddTsRsp( { pTs->TimeSlotCount = 0; if (pTs->bEstablishing) - QosRemoveTs(Adapter, pTs); - } + QosRemoveTs(Adapter, pTs); + } } } } } - + //return (StatusCode == 0); return RT_STATUS_SUCCESS; } @@ -2278,10 +2278,10 @@ OnDelTs( pTaddr = Frame_Addr2(*posMpdu); pRaddr = Frame_Addr1(*posMpdu); - QosParsingTrafficStreamIE(Adapter, - posMpdu, - (sMacHdrLng + 4), - QOSIE_SRC_DELTS, + QosParsingTrafficStreamIE(Adapter, + posMpdu, + (sMacHdrLng + 4), + QOSIE_SRC_DELTS, FALSE ); return RT_STATUS_SUCCESS; diff --git a/network/wlan/WDI/COMMON/QosGen.h b/network/wlan/WDI/COMMON/QosGen.h index aa194efba..a73724272 100644 --- a/network/wlan/WDI/COMMON/QosGen.h +++ b/network/wlan/WDI/COMMON/QosGen.h @@ -37,23 +37,23 @@ QosParsingDebug_MsduLifetimeIE( //============================================================================= -VOID +VOID QosInitializeSTA( IN PADAPTER Adapter ); -VOID +VOID QosDeinitializeSTA( IN PADAPTER Adapter ); -VOID +VOID QosInitializeBssDesc( IN PBSS_QOS pBssQos ); -VOID +VOID QosParsingQoSElement( IN PADAPTER Adapter, IN BOOLEAN bEDCAParms, @@ -61,7 +61,7 @@ QosParsingQoSElement( OUT PRT_WLAN_BSS pBssDesc ); -VOID +VOID QosSetLegacyWMMParamWithHT( IN PADAPTER Adapter, OUT PRT_WLAN_BSS pBssDesc @@ -186,7 +186,7 @@ VOID QosInitTs( IN PADAPTER Adapter, IN PQOS_TSTREAM pTs, - IN u1Byte TSID, + IN u1Byte TSID, IN PWMM_TSPEC pTSpec ); @@ -196,20 +196,20 @@ QosFlushTs( IN PQOS_TSTREAM pTs ); -PQOS_TSTREAM +PQOS_TSTREAM QosAddTs( IN PADAPTER Adapter, - IN u1Byte TSID, - IN pu1Byte RA, + IN u1Byte TSID, + IN pu1Byte RA, IN pu1Byte TA, IN PWMM_TSPEC pTSpec ); -PQOS_TSTREAM +PQOS_TSTREAM QosGetTs( IN PADAPTER Adapter, - IN u1Byte TSID, - IN pu1Byte RA, + IN u1Byte TSID, + IN pu1Byte RA, IN pu1Byte TA ); @@ -257,7 +257,7 @@ QosResetTs( IN PQOS_TSTREAM pTs ); -BOOLEAN +BOOLEAN QosResetAllTs( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/COMMON/RC4.h b/network/wlan/WDI/COMMON/RC4.h index 9a765e24e..399446b11 100644 --- a/network/wlan/WDI/COMMON/RC4.h +++ b/network/wlan/WDI/COMMON/RC4.h @@ -3,14 +3,14 @@ #define CRC32_POLY 0x04c11db7 -void +void EncodeWEP( pu1Byte key, s4Byte keysize, pu1Byte plaintext, s4Byte len, pu1Byte out); -BOOLEAN +BOOLEAN DecodeWEP( pu1Byte key, s4Byte keysize, @@ -18,23 +18,23 @@ DecodeWEP( s4Byte len, pu1Byte out); -u1Byte -ReverseBit( - u1Byte data +u1Byte +ReverseBit( + u1Byte data ); // Isaiah note: previous declaration in libkern.h // uint32_t crc32(uint32_t crc, const void *bufp, size_t len); -u1Byte -ReverseBit( - u1Byte data +u1Byte +ReverseBit( + u1Byte data ); -ULONG +ULONG crc32( - pu1Byte buf, + pu1Byte buf, u4Byte len); diff --git a/network/wlan/WDI/COMMON/ROGUEAP.h b/network/wlan/WDI/COMMON/ROGUEAP.h index df3927bdc..e7a731d46 100644 --- a/network/wlan/WDI/COMMON/ROGUEAP.h +++ b/network/wlan/WDI/COMMON/ROGUEAP.h @@ -8,7 +8,7 @@ typedef struct _ROGUEAP_REPORT_PACKET{ u1Byte message_type; // 0x40. u1Byte function_code; // 0x8e. u1Byte DstAddr[6]; // MAC address of the AP. - u1Byte SrcAddr[6]; // Reporting STA's MAC address. + u1Byte SrcAddr[6]; // Reporting STA's MAC address. u2Byte Failure_Reason; u1Byte RogueAPAddr[6]; //MAC address of the client reporting the AP. u1Byte RogueAPname[16]; // All Null if not known @@ -38,24 +38,24 @@ typedef struct _MH_CCX_ROGUE_AP_STATUS{ #define MH_CCX_ROGUE_AP_STATUS_ClearRogues 5 #define MH_CCX_ROGUE_AP_STATUS_Invalidauthenticationtype 6 - + //----------------------------------------------------- //name : CCX_Add_ROGUE_AP_Entry //function : Add an Entry to ROGUE AP List //Input : ROGUEAP => Aegis offer data about ROGUE AP //----------------------------------------------------- void -CCX_Add_ROGUE_AP_Entry( +CCX_Add_ROGUE_AP_Entry( PADAPTER Adapter, MH_CCX_ROGUE_AP_STATUS *ROGUEAP ); //----------------------------------------------------- //name : CCX_Add_ROGUE_AP_Authfail_Entry //function : Add an Entry to ROGUE AP List for fail code : 0x00 0x01 -//Input : +//Input : //----------------------------------------------------- void -CCX_Add_ROGUE_AP_Authfail_Entry( +CCX_Add_ROGUE_AP_Authfail_Entry( PADAPTER Adapter ); //----------------------------------------------------- @@ -64,26 +64,26 @@ CCX_Add_ROGUE_AP_Authfail_Entry( //Input : ROGUEAP => Aegis offer data about ROGUE AP //----------------------------------------------------- void -CCX_Del_ROGUE_AP_Entry( +CCX_Del_ROGUE_AP_Entry( PADAPTER Adapter, MH_CCX_ROGUE_AP_STATUS *ROGUEAP ); - + //----------------------------------------------------- //name : CCX_Clear_ROGUE_AP_All_Entry //function : Del an Entry to ROGUE AP List When all AP connent fail. -//Input : +//Input : //----------------------------------------------------- void -CCX_Clear_ROGUE_AP_All_Entry( +CCX_Clear_ROGUE_AP_All_Entry( PADAPTER Adapter ); //----------------------------------------------------- //name : SendCcxROGUEAPReport //function : Send all ROGUE AP report in list to AP ( which connected successful ) -//Input : +//Input : //----------------------------------------------------- void SendCcxROGUEAPReport( PADAPTER Adapter ); - + #endif diff --git a/network/wlan/WDI/COMMON/RadioMeasurement.h b/network/wlan/WDI/COMMON/RadioMeasurement.h index 8db1b7d4a..cabec9ae4 100644 --- a/network/wlan/WDI/COMMON/RadioMeasurement.h +++ b/network/wlan/WDI/COMMON/RadioMeasurement.h @@ -14,8 +14,8 @@ typedef enum _RT_RM_ACTION_STATUS{ // RM action status typedef enum _RT_RM_HASH_TABLE{ - RT_RM_TABLE_FRAME_REPORT = 0, // - RT_RM_TABLE_NEIGHBOR = 1, // + RT_RM_TABLE_FRAME_REPORT = 0, // + RT_RM_TABLE_NEIGHBOR = 1, // RT_RM_TABLE_MAX, // The rm is still going. }_RT_RM_HASH_TABLE, *P_RT_RM_HASH_TABLE; @@ -52,7 +52,7 @@ StopCcxTsm( BOOLEAN StartCcxTsm( IN PADAPTER Adapter, - IN u1Byte TSID, + IN u1Byte TSID, IN u2Byte MeasurementInterval // in TU ); @@ -70,7 +70,7 @@ TsmTimerCallback( VOID OnCcxTsmIE( IN PADAPTER Adapter, - IN POCTET_STRING posCcxTsmIE + IN POCTET_STRING posCcxTsmIE ); VOID diff --git a/network/wlan/WDI/COMMON/Receive.c b/network/wlan/WDI/COMMON/Receive.c index ee7ca86ba..6739a539a 100644 --- a/network/wlan/WDI/COMMON/Receive.c +++ b/network/wlan/WDI/COMMON/Receive.c @@ -24,7 +24,7 @@ InitializeRxVariables( Adapter->NumRfd = Adapter->MAX_NUM_RFD; for(QueueID=0 ; QueueID < MAX_RX_QUEUE ; QueueID++) - Adapter->NumRxDesc[QueueID]= Adapter->MAX_NUM_RX_DESC; + Adapter->NumRxDesc[QueueID]= Adapter->MAX_NUM_RX_DESC; #if (MAX_RX_QUEUE ==2) Adapter->NumRxDesc[RX_CMD_QUEUE] = RX_DESC_NUM; @@ -71,11 +71,11 @@ ChkValidRFDs( PADAPTER Adapter, pu4Byte pRfdAddr ) -{ +{ BOOLEAN bValid = FALSE; u2Byte RfdIdx; - - + + for(RfdIdx = 0; RfdIdx < (u2Byte)(Adapter->NumRfd + 1); RfdIdx++) { if(Adapter->RfdListAddr[RfdIdx] == pRfdAddr) @@ -93,10 +93,10 @@ ChkValidVAs( PADAPTER Adapter, pu4Byte pVirtualAddr ) -{ +{ BOOLEAN bValid = FALSE; u2Byte RfdIdx; - + for(RfdIdx = 0; RfdIdxNumRfd; RfdIdx++) { if(Adapter->RfdVirtualAddr[RfdIdx] == pVirtualAddr) @@ -110,7 +110,7 @@ PrepareRFDs( PADAPTER Adapter ) { - + u2Byte i; PRT_RFD pRfd; RT_STATUS status; @@ -133,13 +133,13 @@ PrepareRFDs( do{ Adapter->RfdBuffer.Length=Adapter->NumRfd*sizeof(RT_RFD); - + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before RfdBuffer\n")); status=PlatformAllocateMemory(Adapter, &Adapter->RfdBuffer.Ptr,Adapter->RfdBuffer.Length); if(status!=RT_STATUS_SUCCESS) { - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("RfdBuffer fail\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("RfdBuffer fail\n")); return status; } PlatformZeroMemory(Adapter->RfdBuffer.Ptr,Adapter->RfdBuffer.Length); @@ -150,26 +150,26 @@ PrepareRFDs( #endif pRfd=(PRT_RFD)Adapter->RfdBuffer.Ptr; - + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before DrvIFAssociateRFD\n")); - + for(i=0;iNumRfd;i++) { status=DrvIFAssociateRFD(Adapter,&pRfd[i]); pRfd[i].SeqNum = i; Adapter->RfdListAddr[i] = (pu4Byte)&pRfd[i]; - Adapter->RfdVirtualAddr[i] = (pu4Byte)pRfd[i].Buffer.VirtualAddress; + Adapter->RfdVirtualAddr[i] = (pu4Byte)pRfd[i].Buffer.VirtualAddress; if(status!=RT_STATUS_SUCCESS) { - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("DrvIFAssociateRFD fail\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("DrvIFAssociateRFD fail\n")); return status; } PlatformAcquireSpinLock(Adapter, RT_RFD_SPINLOCK); RTInsertTailListWithCnt(&Adapter->RfdIdleQueue, &pRfd[i].List, &Adapter->NumIdleRfd); PlatformReleaseSpinLock(Adapter, RT_RFD_SPINLOCK); } - // To keep track the head of RfdIdleQueue. 2008.06.03. + // To keep track the head of RfdIdleQueue. 2008.06.03. Adapter->RfdListAddr[i] = (pu4Byte)&Adapter->RfdIdleQueue; RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before pAMSDU\n")); @@ -177,26 +177,26 @@ PrepareRFDs( status = PlatformAllocateMemory(Adapter, (PVOID *)&Adapter->pAMSDU, Adapter->MAX_SUBFRAME_TOTAL_COUNT*sizeof(ALIGNED_SHARED_MEMORY)); if(status != RT_STATUS_SUCCESS) { - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("pAMSDU fail\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("pAMSDU fail\n")); return status; } - + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("before MAX_SUBFRAME_TOTAL_COUNT pAMSDU\n")); - + for(i=0;i < Adapter->MAX_SUBFRAME_TOTAL_COUNT;i++) { status=PlatformAllocateAlignedSharedMemory(Adapter, Adapter->pAMSDU+i, NIC_MAX_PACKET_SIZE); if( status != RT_STATUS_SUCCESS ) { - RT_TRACE_F(COMP_INIT, DBG_TRACE, ("MAX_SUBFRAME_TOTAL_COUNT pAMSDU fail\n")); + RT_TRACE_F(COMP_INIT, DBG_TRACE, ("MAX_SUBFRAME_TOTAL_COUNT pAMSDU fail\n")); return status; } } - + }while(FALSE); DefragInitialize(Adapter); - + #if RX_AGGREGATION PlatformAcquireSpinLock(Adapter, RT_RFD_SPINLOCK); RTInitializeListHead(&Adapter->RfdTmpList); @@ -255,17 +255,17 @@ FreeRFDs( pRfd=(PRT_RFD)RTRemoveHeadListWithCnt(&Adapter->RfdBusyQueue[QueueID], &Adapter->NumBusyRfd[QueueID]); RT_ASSERT(ChkValidRFDs(Adapter, (pu4Byte)&(pRfd->List)), ("(1)FreeRFDs(): Invalid RFD\n")); RTInsertTailListWithCnt(&Adapter->RfdIdleQueue, &pRfd->List, &Adapter->NumIdleRfd); - + if (rfdbusy[QueueID]++ > Adapter->MAX_NUM_RX_DESC) { // 2011/03/30 MH This is an ASSERTION CASE need debug for RFD busy queue pointer!!! - // We already found two case may cause incorrect RFD busy queue pointer A). ISR DPC is + // We already found two case may cause incorrect RFD busy queue pointer A). ISR DPC is // executed after driver is goinfto unload or surpeised removes. B). DTM card we will indicate // packets twice and return RFD, this may cause incorrect idle RFD pointer!!! We need to - // declare dould RFD number more than RX_DESC. We ae afraid of third case, so add a + // declare dould RFD number more than RX_DESC. We ae afraid of third case, so add a // workaround method for unknow case temporarily. - // If we escape from the case, the RFD aligned share memory may not be released. after a - // period of long time. resource may be insufficient. + // If we escape from the case, the RFD aligned share memory may not be released. after a + // period of long time. resource may be insufficient. RT_ASSERT(TRUE, ("FreeRFDs(): Something Wrong!\n")); break; } @@ -282,35 +282,35 @@ FreeRFDs( nFreed=0; while(!RTIsListEmpty(&Adapter->RfdIdleQueue)) { - pRfd=(PRT_RFD)RTRemoveHeadListWithCnt(&Adapter->RfdIdleQueue, + pRfd=(PRT_RFD)RTRemoveHeadListWithCnt(&Adapter->RfdIdleQueue, &Adapter->NumIdleRfd); RT_ASSERT(ChkValidRFDs(Adapter, (pu4Byte)&(pRfd->List)), ("(2)FreeRFDs(): Invalid RFD\n")); - - // If starting address of rx buffer is shifted because of the existence of QoS + + // If starting address of rx buffer is shifted because of the existence of QoS // control(in 818xb and 8190) or the existence of RxDrvInfo(in 8190), driver // sholud shift it back, otherwise, it returns wrong address. 2006.1.5 by emily if(pRfd->Status.bShift) - { - pRfd->Buffer.VirtualAddress -= Adapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd); + { + pRfd->Buffer.VirtualAddress -= Adapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd); pRfd->Status.bShift = 0; } - + DrvIFDisassociateRFD(Adapter,pRfd); - + nFreed++; } if(nFreed != Adapter->NumRfd){ - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("Freed RFD less than allocated!nFreed:%d alloc:%d .\n",nFreed,Adapter->NumRfd)); + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("Freed RFD less than allocated!nFreed:%d alloc:%d .\n",nFreed,Adapter->NumRfd)); } RT_ASSERT(nFreed==Adapter->NumRfd,("Freed RFD less than allocated!!\n")); } PlatformReleaseSpinLock(Adapter, RT_RFD_SPINLOCK); - + if(Adapter->RfdBuffer.Ptr != NULL) { PlatformFreeMemory(Adapter->RfdBuffer.Ptr,Adapter->RfdBuffer.Length); } - + if(Adapter->pAMSDU != NULL) { for(i = 0;i MAX_SUBFRAME_TOTAL_COUNT; i++) @@ -318,7 +318,7 @@ FreeRFDs( PlatformFreeAlignedSharedMemory(Adapter, Adapter->pAMSDU+i); } - PlatformFreeMemory((PVOID)Adapter->pAMSDU, Adapter->MAX_SUBFRAME_TOTAL_COUNT*sizeof(ALIGNED_SHARED_MEMORY)); + PlatformFreeMemory((PVOID)Adapter->pAMSDU, Adapter->MAX_SUBFRAME_TOTAL_COUNT*sizeof(ALIGNED_SHARED_MEMORY)); } } @@ -361,20 +361,20 @@ SpareRxDesc( -VOID +VOID ResetRxStatistics( PADAPTER Adapter ) { // Joseph 20090703: Restore last sniff value. u4Byte temp = Adapter->RxStats.LastRxSniffMediaPktCnt; - + PlatformZeroMemory( &Adapter->RxStats, sizeof(RT_RX_STATISTICS) ); // Joseph 20090703: Restore last sniff value. Adapter->RxStats.LastRxSniffMediaPktCnt = temp; Adapter->RxStats.LastLinkQuality = 0xFF; - + } VOID @@ -391,12 +391,12 @@ CountRxFragmentStatistics( { return; } - + Adapter->RxStats.NumRxFramgment++; } -VOID +VOID CountRxStatistics( PADAPTER Adapter, PRT_RFD pRfd @@ -421,7 +421,7 @@ CountRxStatistics( { return; } - + if(!pMgntInfo->bMediaConnect || MgntRoamingInProgress(pMgntInfo)) Adapter->RxStats.LastLinkQuality = 0xFF; // @@ -435,9 +435,9 @@ CountRxStatistics( FillOctetString(pduOS, pRfd->Buffer.VirtualAddress + PLATFORM_GET_FRAGOFFSET(pRfd), pRfd->PacketLength); pdu = pRfd->Buffer.VirtualAddress + PLATFORM_GET_FRAGOFFSET(pRfd); - pDaddr = Frame_pDaddr(pduOS); + pDaddr = Frame_pDaddr(pduOS); pTaddr = Frame_Addr2(pduOS); - + if( pRfd->Status.bCRC || pRfd->Status.bICV || pRfd->Status.bHwError ) { // Statistics for error packets are now handled in CountRxErrStatistics(). @@ -448,10 +448,10 @@ CountRxStatistics( //We should spearate the Date and Mgnt packet to avoid dectet roaming case in watchdog(no packet receive) // else if (IsMgntFrame(pdu)) - { + { Adapter->RxStats.NumRxMgntPacket++; bLedBlinking=FALSE; - } + } else if(IsDataFrame(pdu)) { Adapter->RxStats.NumRxOkTotal ++; @@ -463,20 +463,20 @@ CountRxStatistics( Adapter->RxStats.NumRxOKSmallPacket++; else if(pRfd->PacketLength < 1000) Adapter->RxStats.NumRxOKMiddlePacket++; - else + else Adapter->RxStats.NumRxOKLargePacket++; rateIndex = pRfd->Status.DataRateIdx; // We get the rate index and save it when do QueryRxStatus - + Adapter->RxStats.ReceivePacketDataRateCounter[rateIndex]++; //for Rx Data Rate Counter , by Jacken 2008/03/12 - + if(GET_TDLS_ENABLED(pMgntInfo) && pMgntInfo->bMediaConnect && pMgntInfo->mAssoc) { if(PlatformCompareMemory(pTaddr, pMgntInfo->Bssid, 6)==0) Adapter->RxStats.ReceivedRateFromAPHistogram[rateIndex]++; } - + } if( MacAddr_isBcst( pDaddr ) ){ @@ -487,7 +487,7 @@ CountRxStatistics( Adapter->RxStats.NumRxMulticast ++; Adapter->RxStats.NumRxBytesMulticast += pRfd->PacketLength ; } - else{ + else{ if(pRfd->bIsAggregateFrame) Adapter->RxStats.NumRxUnicast += pRfd->nTotalSubframe; else @@ -501,7 +501,7 @@ CountRxStatistics( Adapter->MgntInfo.LinkDetectInfo.NumRxUnicastOkInPeriod+=pRfd->nTotalSubframe; else Adapter->MgntInfo.LinkDetectInfo.NumRxUnicastOkInPeriod++; - + // 2009.03.03 Leave DC mode immediately when detect high traffic if(pMgntInfo->bMediaConnect && !MgntInitAdapterInProgress(pMgntInfo)) { @@ -514,16 +514,16 @@ CountRxStatistics( } } } - } + } } if( pRfd->Status.BandWidth == 1) - + Adapter->RxStats.NumRx40MHzPacket++; else Adapter->RxStats.NumRx20MHzPacket++; - + //To avoid led always blink when in rx, by Maddest 20080307; if(bLedBlinking) { @@ -542,7 +542,7 @@ CountRxStatistics( -VOID +VOID CountRxErrStatistics( PADAPTER Adapter, PRT_RFD pRfd @@ -556,7 +556,7 @@ CountRxErrStatistics( pu1Byte pBssid; BOOLEAN bAddrMatch = FALSE; BOOLEAN bIsMulticast = FALSE; - + pduOS.Octet = pRfd->Buffer.VirtualAddress; pduOS.Length = pRfd->PacketLength; @@ -568,7 +568,7 @@ CountRxErrStatistics( if(pRfd->Status.bCRC) Adapter->RxStats.NumRxCrxErrorPacket++; - + // When RF is off, we should not count the packet for hw/sw synchronize // reason, ie. there may be a duration while sw switch is changed and hw // switch is being changed. 2006.12.04, by shien chang. @@ -602,29 +602,29 @@ CountRxErrStatistics( CountRxCCMPDecryptErrorsStatistics(Adapter, pRfd); } } - - if(pRfd->Status.bCRC) + + if(pRfd->Status.bCRC) { // CRC error packet. if(pRfd->PacketLength < 500) Adapter->RxStats.NumRxCrcErrSmallPacket++; else if(pRfd->PacketLength < 1000) Adapter->RxStats.NumRxCrcErrMiddlePacket++; - else + else Adapter->RxStats.NumRxCrcErrLargePacket++; } - else + else { // CRC OK packet. if( IsFrameTypeData(pduOS.Octet) && Frame_Retry(pduOS)) { // Type data && Retry bit set. Adapter->RxStats.NumRxRetryCount++; - + if(pRfd->PacketLength < 500) Adapter->RxStats.NumRxRetrySmallPacket++; else if(pRfd->PacketLength < 1000) Adapter->RxStats.NumRxRetryMiddlePacket++; - else + else Adapter->RxStats.NumRxRetryLargePacket++; } } @@ -632,7 +632,7 @@ CountRxErrStatistics( if(pRfd->Status.bICV) { // ICV error. RT_ENC_ALG alg = RT_ENC_ALG_NO_CIPHER; - + Adapter->RxStats.NumRxIcvErr ++; alg = (bAddrMatch) ? pSecInfo->PairwiseEncAlgorithm : pSecInfo->GroupEncAlgorithm; @@ -658,7 +658,7 @@ CountRxErrStatistics( if(!pRfd->Status.Decrypted) { RT_TRACE(COMP_RECV, DBG_LOUD, ("CountRxErrStatistics:() CountRxDecryptErrorStatistics\n")); - + CountRxDecryptErrorStatistics(Adapter, pRfd); if(pSecInfo->GroupEncAlgorithm == RT_ENC_ALG_WEP40 || @@ -666,11 +666,11 @@ CountRxErrStatistics( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP104) { - CountWEPUndecryptableStatistics(Adapter, pRfd); + CountWEPUndecryptableStatistics(Adapter, pRfd); } - } + } else - CountRxDecryptSuccessStatistics(Adapter, pRfd); + CountRxDecryptSuccessStatistics(Adapter, pRfd); } } @@ -737,7 +737,7 @@ CountRxTKIPLocalMICFailuresStatistics( else { Adapter->RxStats.NumRxTKIPLocalMICFailuresUnicast ++; - } + } } // @@ -784,7 +784,7 @@ CountRxTKIPDecryptErrorsStatistics( else { Adapter->RxStats.NumRxTKIPICVErrorUnicast ++; - } + } } @@ -813,7 +813,7 @@ CountRxCCMPDecryptErrorsStatistics( else { Adapter->RxStats.NumRxCCMPDecryptErrorsUnicast ++; - } + } } @@ -841,7 +841,7 @@ CountWEPICVErrorStatistics( else { Adapter->RxStats.NumRxWEPICVErrorUnicast ++; - } + } } @@ -870,7 +870,7 @@ CountTKIPICVErrorStatistics( else { Adapter->RxStats.NumRxTKIPICVErrorUnicast ++; - } + } } @@ -926,7 +926,7 @@ CountRxDecryptErrorStatistics( else { Adapter->RxStats.NumRxDecryptFailureUnicast++; - } + } } @@ -954,7 +954,7 @@ CountWEPUndecryptableStatistics( else { Adapter->RxStats.NumRxWEPUndecryptableUnicast++; - } + } } @@ -985,7 +985,7 @@ CountRxTKIPRelpayStatistics( else { Adapter->RxStats.NumRxTKIPReplayUnicast ++; - } + } } @@ -1014,7 +1014,7 @@ CountRxCCMPRelpayStatistics( else { Adapter->RxStats.NumRxCCMPReplayUnicast ++; - } + } } @@ -1050,10 +1050,10 @@ CountRxMgntCCMPRelpayStatistics( // Description: // Count the number of unencrypted mgnt TKIP packets for encryption mode is enabled (CCXv5 S67 MFP). // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - -// The Rx buffer and information. +// The Rx buffer and information. // By Bruce, 2009-10-15. // VOID @@ -1069,10 +1069,10 @@ CountRxMgntTKIPNoEncryptStatistics( // Description: // Count the number of unencrypted mgnt AES packets for encryption mode is enabled (CCXv5 S67 MFP). // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - -// The Rx buffer and information. +// The Rx buffer and information. // By Bruce, 2009-10-15. // VOID @@ -1088,10 +1088,10 @@ CountRxMgntCCMPNoEncryptStatistics( // Description: // Count the number of CCXv5 MFP TKIP MHDRIE invalid. // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - -// The Rx buffer and information. +// The Rx buffer and information. // By Bruce, 2009-10-15. // VOID @@ -1107,10 +1107,10 @@ CountRxMgntMFPTKIPMHDRStatistics( // Description: // Count the number of mgnt TKIP packet descrypted error. // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - -// The Rx buffer and information. +// The Rx buffer and information. // By Bruce, 2009-10-16. // VOID @@ -1126,10 +1126,10 @@ CountRxMgntTKIPDecryptErrorsStatistics( // Description: // Count the number of mgnt AES packet descrypted error. // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - -// The Rx buffer and information. +// The Rx buffer and information. // By Bruce, 2009-10-16. // VOID @@ -1204,7 +1204,7 @@ RxStatisticsWatchdog( { Adapter->RxStats.CurRxDataRate.RawValue= legacy_rate[slct_idx]; } - + } } @@ -1216,17 +1216,17 @@ RxStatisticsWatchdog( #if SW_CRC_CHECK /** * Function: SwCrcCheck -* -* Overview: This function do Crc check to received packets. +* +* Overview: This function do Crc check to received packets. * It returns FALSE if the SW CRC check is not identical to HW CRC check. -* -* Input: +* +* Input: * PRT_RFD pRfd -* -* Output: +* +* Output: * None -* -* Return: +* +* Return: * TRUE: SW CRC check is identical to HW CRC check. * FALSE: SW CRC check is not identical to HW CRC check. */ @@ -1345,21 +1345,21 @@ ParseSubframe( // // Record AMSDU size if it is a valid AMSDU packet - // + // AMSDU_UpdateRxAMSDUSizeHistogram(Adapter, pRfd->PacketLength); - + if(Frame_WEP(frame)!=0) { // For MPDU and MSDU head overhead in first frag SecGetEncryptionOverhead( Adapter, - &EncryptionMPDUHeadOverhead, - NULL, - &EncryptionMSDUHeadOverhead, + &EncryptionMPDUHeadOverhead, + NULL, + &EncryptionMSDUHeadOverhead, NULL, TRUE, MacAddr_isMulticast(Frame_pDaddr(frame))); - + EncryptionHeadOverhead=EncryptionMPDUHeadOverhead;// + EncryptionMSDUHeadOverhead; } @@ -1367,7 +1367,7 @@ ParseSubframe( nRemain_Length = pRfd->PacketLength - LLCOffset; pRfd->bIsAggregateFrame = bIsAggregateFrame; - + if(!bIsAggregateFrame) { pRfd->nTotalSubframe = 1; @@ -1376,14 +1376,14 @@ ParseSubframe( return 1; } else - { + { pRfd->nTotalSubframe = 0; while(nRemain_Length > ETHERNET_HEADER_SIZE) { nSubframe_Length = N2H2BYTE(*((UNALIGNED pu2Byte)(frame.Octet + LLCOffset + 12))); // - // Prevent unexpected MDL length requirement when packet indicateion, which might + // Prevent unexpected MDL length requirement when packet indicateion, which might // cause system using improper addresses, added by Roger, 2010.05.26. // if(nSubframe_Length<1) @@ -1391,12 +1391,12 @@ ParseSubframe( RT_ASSERT(FALSE, ("Invalid A-MSDU subframe size: %d, drop it!!\n", nSubframe_Length)); break; } - + if(nRemain_Length<(ETHERNET_HEADER_SIZE + nSubframe_Length)) { #if 0//cosa RT_ASSERT( - (nRemain_Length>=(ETHERNET_HEADER_SIZE + nSubframe_Length)), + (nRemain_Length>=(ETHERNET_HEADER_SIZE + nSubframe_Length)), ("ParseSubframe(): A-MSDU subframe parse error!! Subframe Length: %d\n", nSubframe_Length) ); #endif //DbgPrint("ParseSubframe(): A-MSDU subframe parse error!! pRfd->nTotalSubframe : %d\n", pRfd->nTotalSubframe); @@ -1405,7 +1405,7 @@ ParseSubframe( //DbgPrint("The Packet SeqNum is %d\n",SeqNum); return 0; } - + LLCOffset += ETHERNET_HEADER_SIZE; pRfd->SubframeArray[pRfd->nTotalSubframe] = frame.Octet + LLCOffset; pRfd->SubframeLenArray[pRfd->nTotalSubframe] = nSubframe_Length; @@ -1423,19 +1423,19 @@ ParseSubframe( nPadding_Length = 4 - ((nSubframe_Length + ETHERNET_HEADER_SIZE) % 4); if(nPadding_Length == 4) nPadding_Length = 0; - + if(nRemain_Length < nPadding_Length) { RT_ASSERT( - (nRemain_Length >= nPadding_Length), + (nRemain_Length >= nPadding_Length), ("ParseSubframe(): A-MSDU subframe parse error!!! Remain Length: %d\n", nRemain_Length)); return 0; } - + nRemain_Length -= nPadding_Length; LLCOffset = LLCOffset + nSubframe_Length + nPadding_Length; - } + } } AMSDU_UpdateRxAMSDUNumHistogram(Adapter, pRfd->nTotalSubframe); return pRfd->nTotalSubframe; @@ -1463,7 +1463,7 @@ RxCheckSWDecryption( // // Case : Used SW Decrypt all Packet // - + if(RT_SEC_STATUS_SUCCESS != (secStatus = SecSoftwareDecryption(Adapter, pRfd))) { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Failed (0x%08X) from SecSoftwareDecryption()\n", secStatus)); @@ -1473,9 +1473,9 @@ RxCheckSWDecryption( else if(Adapter->HalFunc.GetNmodeSupportBySWSecHandler(Adapter)) { // - // Case : SWRxDecryptFlag == False , in WEP or TKIP & 24N-mode & bHalfWiirelessN24GMode + // Case : SWRxDecryptFlag == False , in WEP or TKIP & 24N-mode & bHalfWiirelessN24GMode // - + if(!SecSoftwareDecryption(Adapter, pRfd)) { bFreeRfd = TRUE; @@ -1487,7 +1487,7 @@ RxCheckSWDecryption( - + VOID ProcessReceivedPacket( @@ -1500,7 +1500,7 @@ ProcessReceivedPacket( // Here handles and monitors the system/driver state for Rx path. Please place codes here. // ========================================================================= - // Get shifted bytes of Starting address of 802.11 header. 2006.09.28, by Emily + // Get shifted bytes of Starting address of 802.11 header. 2006.09.28, by Emily pRfd->Buffer.VirtualAddress += Adapter->HalFunc.GetRxPacketShiftBytesHandler(pRfd); pRfd->bRxBTdata = FALSE; @@ -1516,7 +1516,7 @@ ProcessReceivedPacket( { // NOTE: ----------------------------------------------------------------------- // This function is a packet distributor for each port. Please distrubute your packet herein. - + PADAPTER pSingleAdapter = MultiPortFeedPacketToMultipleAdapter(Adapter, pRfd); if(pSingleAdapter == NULL) @@ -1558,12 +1558,12 @@ ProcessReceivedPacketForEachPortSpecific( RT_SEC_STATUS secStatus = RT_SEC_STATUS_SUCCESS; BOOLEAN bSupportRemoteWakeUp; - Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); /* 2007/01/16 MH Add RX command packet handle here. */ /* 2007/03/01 MH We have to release RFD and return if rx pkt is cmd pkt. */ if (Adapter->HalFunc.RxCommandPacketHandler(Adapter, pRfd)) - { + { ReturnRFDList(Adapter, pRfd); return; } @@ -1579,7 +1579,7 @@ ProcessReceivedPacketForEachPortSpecific( return; } } - + // ========================================================================= // Here defines and handles signle MPDU for a single port. Please let it be the first line // ========================================================================= @@ -1591,18 +1591,18 @@ ProcessReceivedPacketForEachPortSpecific( ReturnRFDList(Adapter, pRfd); return; } - + GetDefaultAdapter(Adapter)->bRemoveTsInRxPath = TRUE; - + bSecEAPOLPacket = SecIsEAPOLPacket( Adapter, &frame);// Remenber the IsSecEAPOL, 2009.08.26, by Bohn pSaddr_ori= Frame_pSaddr(frame); PlatformMoveMemory(Saddr, pSaddr_ori, 6); PlatformMoveMemory(pRfd->Address3,Frame_Addr3(frame),6); - + pSaddr = Saddr; pMgntInfo = &Adapter->MgntInfo; - + //Go determines Client is active or not by sherry 20130117 if((IsMgntNullFrame(frame.Octet)) && eqMacAddr(Frame_pRaddr(frame), Adapter->CurrentAddress)) { @@ -1611,13 +1611,13 @@ ProcessReceivedPacketForEachPortSpecific( // RT_TRACE(COMP_MLME,DBG_LOUD,("It is Go port receive packet \n")); // RT_PRINT_DATA(COMP_MLME, DBG_LOUD,"recv null function data: \n",frame.Octet,frame.Length); pMgntInfo->LinkDetectInfo.RxNullDataNum++; - + if(Frame_PwrMgt(frame)) Adapter->bRecvEnterPSForGo = TRUE; else Adapter->bRecvEnterPSForGo = FALSE; } - + } #if (STATISTIC_SUPPORT == 1) @@ -1638,7 +1638,7 @@ ProcessReceivedPacketForEachPortSpecific( pRfd->Status.bContainHTC = HTCCheck( Adapter, pRfd, &frame ); if(pRfd->Status.bHwError) - { + { bFreeRfd = TRUE; break; } @@ -1673,12 +1673,12 @@ ProcessReceivedPacketForEachPortSpecific( { break; } - + CCX_QueryIHVSupport(Adapter, &bIhvFrameLogMode); if(!MgntFilterReceivedPacket(Adapter, pRfd) && !bIhvFrameLogMode) { - if (IsMgntFrame(frame.Octet)) + if (IsMgntFrame(frame.Octet)) break; bFreeRfd=TRUE; break; @@ -1691,7 +1691,7 @@ ProcessReceivedPacketForEachPortSpecific( // TODO: SecurityCheckMPDU if(!DefragPacket(Adapter, &pRfd, &bQueued)) - { + { bFreeRfd=TRUE; break; } @@ -1714,16 +1714,16 @@ ProcessReceivedPacketForEachPortSpecific( bFreeRfd = TRUE; break; } - + // TODO: SecurityCheckMSDU - + if(Frame_ContainQc(frame) && GET_QOS_CTRL_HC_CFP_USRSVD(frame.Octet) == 1) { //2Here we handle the condition of multiple packets in single frame if(ParseSubframe(Adapter, pRfd) == 0) { bFreeRfd=TRUE; break; - } + } if(pMgntInfo->OpMode==RT_OP_MODE_AP) { PRT_RFD PRFD_Array[MAX_SUBFRAME_COUNT]; @@ -1779,14 +1779,14 @@ ProcessReceivedPacketForEachPortSpecific( bFreeRfd = TRUE; break; } - + if(nIndicateCnt == 0 ) { bFreeRfd = TRUE; break; } } - + if(!TranslateHandleRxDot11FrameHeader(Adapter, pRfd)) { bFreeRfd=TRUE; @@ -1798,11 +1798,11 @@ ProcessReceivedPacketForEachPortSpecific( pRfd->nTotalSubframe = 0; // This indicates that this is not an aggregation frame. pRfd->bIsAggregateFrame = FALSE; - + if(pMgntInfo->OpMode==RT_OP_MODE_AP) { // - // Win7 handles intra-BSS bridging through the regular reception and transmission path, + // Win7 handles intra-BSS bridging through the regular reception and transmission path, // i.e. miniport does not have to build the logic of forwarding intra-BSS frames to appropriate peers. // if(!MgntCheckForwarding(Adapter, pRfd)) @@ -1827,17 +1827,17 @@ ProcessReceivedPacketForEachPortSpecific( { RT_DISP(FRX, RX_PATH_AP_MODE, ("AP mode need to indicate\n")); } - + } // Parse the RFD. if (CCX_ParseRfd(Adapter, pRfd, frame, &bFreeRfd)) { break; - } + } if(!TranslateHandleRxDot11FrameHeader(Adapter, pRfd)) - { + { bFreeRfd=TRUE; break; } @@ -1857,14 +1857,14 @@ ProcessReceivedPacketForEachPortSpecific( { BOOLEAN bReorder = FALSE; BOOLEAN bStopRxreorder = FALSE; - + CountRxStatistics(Adapter, pRfd); if(ACTING_AS_AP(Adapter)) { // For Win8 NdisTest - WFD_DataTransmission_ext: - if( pRfd->Status.pRxTS != NULL - && (!bSecEAPOLPacket) + if( pRfd->Status.pRxTS != NULL + && (!bSecEAPOLPacket) && pMgntInfo->pHTInfo->bCurRxReorderEnable ) { bReorder = TRUE; @@ -1872,8 +1872,8 @@ ProcessReceivedPacketForEachPortSpecific( } else { - if( pMgntInfo->pHTInfo->bCurrentHTSupport - && pMgntInfo->pHTInfo->bCurRxReorderEnable + if( pMgntInfo->pHTInfo->bCurrentHTSupport + && pMgntInfo->pHTInfo->bCurRxReorderEnable && pRfd->Status.pRxTS!=NULL && (!bSecEAPOLPacket)) bReorder = TRUE; @@ -1893,18 +1893,18 @@ ProcessReceivedPacketForEachPortSpecific( } GetDefaultAdapter(Adapter)->bRemoveTsInRxPath = FALSE; - + { if(bReorder) { -#if RX_AGGREGATION +#if RX_AGGREGATION if(pRfd->RxAggrInfo.bIsRxAggr) RxReorderAggrBatchIndicate(Adapter, pRfd); else #endif RxReorderIndicatePacket(Adapter, pRfd); } - else + else { #if RX_AGGREGATION if(pRfd->RxAggrInfo.bIsRxAggr && pRfd->RxAggrInfo.bIsLastPkt) @@ -1918,10 +1918,10 @@ ProcessReceivedPacketForEachPortSpecific( // Flush pending Rx Packets. FlushAllRxTsPendingPkts(Adapter); } - + DrvIFIndicatePacket(Adapter, pRfd); if(pRfd->Status.pRxTS!=NULL) - pRfd->Status.pRxTS->RxIndicateSeq = (pRfd->Status.Seq_Num+1)%4096; + pRfd->Status.pRxTS->RxIndicateSeq = (pRfd->Status.Seq_Num+1)%4096; } } } @@ -1958,9 +1958,9 @@ DefragPacket( FragNum=(u1Byte)Frame_FragNum(frame); bMoreFrag=(BOOLEAN)Frame_MoreFrag(frame); bEncrypted=(BOOLEAN)Frame_WEP(frame); - + RT_TRACE_F(COMP_RECV, DBG_TRACE, ("SeqNum %d FragNum %d bMoreFrag %d bEncrypted %d\n", SeqNum, FragNum, bMoreFrag, bEncrypted)); - + *pbQueued=FALSE; if(bEncrypted && !pMgntInfo->SafeModeEnabled) @@ -1974,7 +1974,7 @@ DefragPacket( NULL, TRUE, MacAddr_isMulticast(Frame_pDaddr(frame))); - + MAKE_RFD_OFFSET_AT_BACK(*ppRfd, EncryptionOverhead); } @@ -2000,8 +2000,8 @@ DefragPacket( else *pbQueued=TRUE; } - - // At this point, we check the number of free RFDs. + + // At this point, we check the number of free RFDs. // If it is lower than LowRfdThreshold, just release the LRU entry of DefragArray and // return associate RFDs. 2006.07.25, by shien chang // Note 1: The reason we didn't recycle RFDs at the above codes is even no fragment @@ -2012,13 +2012,13 @@ DefragPacket( { for (i=0; i<*GET_LOW_RFD_THRESHOLD(Adapter); i++) { - // for 92se test we disable to prevent the check - //Alghouth there many be more than one rx queuem but there should be only one + // for 92se test we disable to prevent the check + //Alghouth there many be more than one rx queuem but there should be only one //queue for received data. 2006.1.3, by Emily //if (Adapter->NumIdleRfd+Adapter->NumBusyRfd[RX_MPDU_QUEUE] < Adapter->LowRfdThreshold) if ((*GET_NUM_IDLE_RFD(Adapter)+*GET_NUM_BUSY_RFD(Adapter, RX_MPDU_QUEUE))< *GET_LOW_RFD_THRESHOLD(Adapter)) { - RT_TRACE(COMP_RECV, DBG_LOUD, + RT_TRACE(COMP_RECV, DBG_LOUD, ("DefragPacket(): Number of RFDs (%d) is lower than threshold (%d).", Adapter->NumIdleRfd, Adapter->LowRfdThreshold)); DefragRecycleRFD(Adapter); @@ -2027,7 +2027,7 @@ DefragPacket( break; } } - + if(!(*pbQueued)) { //1 Note: We must get all ppRfd information again @@ -2035,11 +2035,11 @@ DefragPacket( // Should be the same for all fragment bEncrypted=(BOOLEAN)Frame_WEP(frame); - + if(bEncrypted && !pMgntInfo->SafeModeEnabled) { //2 Check MIC and remove MIC - + //2004/07/07, kcwu, check mic bReturn = SecCheckMIC(Adapter, *ppRfd); @@ -2050,7 +2050,7 @@ DefragPacket( NULL, &EncryptionOverhead, TRUE, - MacAddr_isMulticast(Frame_pDaddr(frame))); + MacAddr_isMulticast(Frame_pDaddr(frame))); MAKE_RFD_LIST_OFFSET_AT_BACK(Adapter, *ppRfd, EncryptionOverhead); } } @@ -2067,7 +2067,7 @@ TranslateRxPacketHeader( OCTET_STRING frame; BOOLEAN RemoveLLCFlag=FALSE; u2Byte LLCOffset; - u2Byte offset; + u2Byte offset; u2Byte EncryptionMPDUHeadOverhead, EncryptionMSDUHeadOverhead, EncryptionHeadOverhead=0; u1Byte SrcAddr[6]; u1Byte DestAddr[6]; @@ -2083,7 +2083,7 @@ TranslateRxPacketHeader( FillOctetString(frame, pRfd->Buffer.VirtualAddress + pRfd->FragOffset, pRfd->FragLength); // - // Figure out "LLCOffset", and + // Figure out "LLCOffset", and // "offset", the offset to advance from 802.11 frame to 802.3. // LLCOffset = Frame_FrameHdrLng(frame); @@ -2110,26 +2110,26 @@ TranslateRxPacketHeader( { // For MPDU and MSDU head overhead in first frag SecGetEncryptionOverhead( Adapter, - &EncryptionMPDUHeadOverhead, - NULL, - &EncryptionMSDUHeadOverhead, + &EncryptionMPDUHeadOverhead, + NULL, + &EncryptionMSDUHeadOverhead, NULL, TRUE, MacAddr_isMulticast(Frame_pDaddr(frame))); - + EncryptionHeadOverhead=EncryptionMPDUHeadOverhead;// + EncryptionMSDUHeadOverhead; } - + LLCOffset +=EncryptionHeadOverhead; offset +=EncryptionHeadOverhead; - if( EF1Byte( frame.Octet[LLCOffset + 0] )==0xaa && - EF1Byte( frame.Octet[LLCOffset + 1] )==0xaa && + if( EF1Byte( frame.Octet[LLCOffset + 0] )==0xaa && + EF1Byte( frame.Octet[LLCOffset + 1] )==0xaa && EF1Byte( frame.Octet[LLCOffset + 2] )==0x03 ) { // check if need remove LLC header - + RemoveLLCFlag=TRUE; for(i=0;i>8) ); (frame.Octet+offset)[13]=( (u1Byte)(len&0xff) ); } - + // // Advance offset. // @@ -2237,14 +2237,14 @@ TranslateHandleRxDot11FrameHeader( || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX ) { // - // 061227, rcnjko: - // Translate header for NDIS6 faked AP mode (UI make upper layer take us as AdHoc mode). + // 061227, rcnjko: + // Translate header for NDIS6 faked AP mode (UI make upper layer take us as AdHoc mode). // - if( pMgntInfo->OpMode == RT_OP_MODE_AP ) + if( pMgntInfo->OpMode == RT_OP_MODE_AP ) { if(GET_80211_HDR_TO_DS(pHeader) == 1 && GET_80211_HDR_FROM_DS(pHeader) == 0) { // Translate (1,0) to (0,0) - u1Byte tmpAddr[6]; + u1Byte tmpAddr[6]; u1Byte tmpAddr2[6]; SET_80211_HDR_FROM_DS(pHeader, 0); @@ -2276,16 +2276,16 @@ TranslateHandleRxDot11FrameHeader( { // For MPDU and MSDU head overhead in first frag SecGetEncryptionOverhead( Adapter, - &EncryptionMPDUHeadOverhead, - NULL, - &EncryptionMSDUHeadOverhead, + &EncryptionMPDUHeadOverhead, + NULL, + &EncryptionMSDUHeadOverhead, NULL, TRUE, MacAddr_isMulticast(Frame_pDaddr(frame))); - + EncryptionHeadOverhead=EncryptionMPDUHeadOverhead;// + EncryptionMSDUHeadOverhead; } - + LLCOffset +=EncryptionHeadOverhead; offset +=EncryptionHeadOverhead; @@ -2326,14 +2326,14 @@ TranslateRxLLCHeaders( cpMacAddr(DestinationAddress, pLLC - ETHERNET_HEADER_SIZE); cpMacAddr(srcaddr, pLLC - ETHERNET_HEADER_SIZE + ETHERNET_ADDRESS_LENGTH); - + pFrame = pLLC -ETHERNET_HEADER_SIZE; - if( *(pLLC + 0) == 0xaa && - *(pLLC + 1) == 0xaa && + if( *(pLLC + 0) == 0xaa && + *(pLLC + 1) == 0xaa && *(pLLC + 2) == 0x03 ) { // check if need remove LLC header - + RemoveLLCFlag=TRUE; for(i=0;inChildCnt>0, ("ReturnRFDList(): Error handle Parent Rfd\n")); - + pParentRfd->nChildCnt--; if(pParentRfd->nChildCnt==0) @@ -2457,7 +2457,7 @@ ReturnRFDList( VOID MakeRFDListOffsetAtBack( PADAPTER Adapter, - PRT_RFD pRfd, + PRT_RFD pRfd, u2Byte offset ) { @@ -2484,7 +2484,7 @@ MakeRFDListOffsetAtBack( pCurrentRfd->FragLength-=offset; } else - { + { //2 We need to remove last RFD pPreviousRfd->FragLength-=(offset - pCurrentRfd->FragLength); @@ -2492,9 +2492,9 @@ MakeRFDListOffsetAtBack( ReturnRFDList(Adapter, pCurrentRfd); pRfd->nTotalFrag--; - pPreviousRfd->NextRfd=NULL; + pPreviousRfd->NextRfd=NULL; } - + pRfd->PacketLength-= offset; } } @@ -2553,7 +2553,7 @@ RxCheckLength( return FALSE; if(!IsDataFrame(frame.Octet)) - return TRUE; + return TRUE; if(IsMgntNullFrame(frame.Octet)) return TRUE; @@ -2567,12 +2567,12 @@ RxCheckLength( if(pRfd->bRxBTdata) return TRUE; - // + // if( pRfd->Status.bIsQosData ) { NeedLength += sQoSCtlLng; } - + if( pRfd->Status.bContainHTC) NeedLength += sHTCLng; @@ -2583,7 +2583,7 @@ RxCheckLength( //SecGetEncryptionOverhead(PADAPTER Adapter, pu2Byte pMPDUHead, pu2Byte pMPDUTail, pu2Byte pMSDUHead, pu2Byte pMSDUTail, BOOLEAN bByPacket, BOOLEAN bIsBroadcastPkt) NeedLength += pSec->EncryptionHeadOverhead + pSec->EncryptionTailOverhead; - + // 2010/04/30 MH Add TKIP MIC length check. // 2010/05/13 MH Add broadcast tkip length check. Multicast will corver broadcast. PlatformMoveMemory(DestAddr, Frame_Addr1(frame), ETHERNET_ADDRESS_LENGTH); @@ -2595,7 +2595,7 @@ RxCheckLength( return ( pRfd->PacketLength >= NeedLength ) ? TRUE:FALSE; - + } // @@ -2617,13 +2617,13 @@ RxNotifyThreadCallback( { if( PlatformAcquireSemaphore(&(pNdisCommon->RxNotifySemaphore)) != RT_STATUS_SUCCESS ) break; - + if(pAdapter->bDriverIsGoingToUnload == TRUE) { RT_TRACE(COMP_INIT, DBG_LOUD, ("[Rx Thread] Driver is going to unload\n")); break; } - + /**************************************************************************************************** * 20150707 Sinda * WDI will check MAC address in frame header when TID is WDI_EXT_TID_UNKNOWN(0x1f) or PeerId is Wildcard(0xffff) @@ -2653,6 +2653,6 @@ RxNotifyThreadCallback( } } PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK); - } + } } diff --git a/network/wlan/WDI/COMMON/Receive.h b/network/wlan/WDI/COMMON/Receive.h index 8601c179b..aff34b632 100644 --- a/network/wlan/WDI/COMMON/Receive.h +++ b/network/wlan/WDI/COMMON/Receive.h @@ -7,12 +7,12 @@ // // We set Maximum Rx Buffer Size to 16K to avoid USB BABBLE error status. 2008.06.20. - // Revise Maximal Receive buffer size to 32K to overcome Rx FIFO overflow issue. + // Revise Maximal Receive buffer size to 32K to overcome Rx FIFO overflow issue. // Suggeseted by Scott, 2008.10.03. // // 2011/05/31 MH We will fine tue RX aggregation size for USB later. // -#define RX_AGG_BLOCK_SIZE 512 // hardware defined the size of a block, for USB mode +#define RX_AGG_BLOCK_SIZE 512 // hardware defined the size of a block, for USB mode #define RX_AGG_PAGE_SIZE 128 // hardware defined the size of a page, for DMA mode #define MAX_RX_AGG_BLKCNT 60 // Maximum available RX aggregation block count @@ -29,7 +29,7 @@ #define IsThereBufferInRxDesc(_Adapter, _QueueID) \ ((_Adapter)->nBufInRxDesc[_QueueID] > 0) - + #define IncrementRxDescToFill(_Adapter, _QueueID) \ (_Adapter)->NextRxDescToFill[_QueueID]=((_Adapter)->NextRxDescToFill[_QueueID]+1)%(_Adapter)->NumRxDesc[_QueueID]; \ (_Adapter)->nBufInRxDesc[_QueueID]++; @@ -89,7 +89,7 @@ ChkValidVAs( PADAPTER Adapter, pu4Byte pRfdAddr ); - + RT_STATUS PrepareRFDs( PADAPTER Adapter @@ -111,29 +111,29 @@ PrepareOneRxDescBuffer8814AE( PADAPTER Adapter ); -VOID +VOID SpareRxDesc( PADAPTER Adapter ); -VOID +VOID ResetRxStatistics( PADAPTER Adapter ); -VOID +VOID CountRxFragmentStatistics( PADAPTER Adapter ); -VOID +VOID CountRxStatistics( PADAPTER Adapter, PRT_RFD pRfd ); -VOID +VOID CountRxErrStatistics( PADAPTER Adapter, PRT_RFD pRfd @@ -266,7 +266,7 @@ RxCheckSWDecryption( PRT_RFD pRfd ); -PADAPTER +PADAPTER SelectReceiveAdapter( PADAPTER Adapter, OCTET_STRING frame @@ -318,7 +318,7 @@ ReturnRFDList( VOID MakeRFDListOffsetAtBack( PADAPTER Adapter, - PRT_RFD pRfd, + PRT_RFD pRfd, u2Byte offset ); diff --git a/network/wlan/WDI/COMMON/RxReorder.c b/network/wlan/WDI/COMMON/RxReorder.c index 51a41d563..2024e8de5 100644 --- a/network/wlan/WDI/COMMON/RxReorder.c +++ b/network/wlan/WDI/COMMON/RxReorder.c @@ -136,13 +136,13 @@ IndicateRxReorderList( } if(index > 0) { - if(PlatformCompareMemory(pReorderEntry->pRfd->Address3,pRfdIndicateArray[index-1]->Address3,6) != 0) + if(PlatformCompareMemory(pReorderEntry->pRfd->Address3,pRfdIndicateArray[index-1]->Address3,6) != 0) { bPktInBuf = TRUE; break; } } - + pReorderEntry = (PRX_REORDER_ENTRY)RTRemoveHeadList(&pTS->RxPendingPktList); if(SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq)) @@ -151,7 +151,7 @@ IndicateRxReorderList( RT_TRACE(COMP_RX_REORDER, DBG_LOUD, ("RxReorderIndicatePacket(): Packets indication!! IndicateSeq: %d\n", pReorderEntry->SeqNum)); pRfdIndicateArray[index] = pReorderEntry->pRfd; index++; - + RTInsertTailList(&pMgntInfo->RxReorder_Unused_List, &pReorderEntry->List); } else @@ -194,7 +194,7 @@ IndicateRxReorderList( if(bPktInBuf) { u1Byte set_penf_timer=FALSE; - + { if(pTS->RxIndicateState != RXTS_INDICATE_REORDER) set_penf_timer = TRUE; @@ -232,7 +232,7 @@ ISinWindow( else return FALSE; } - else + else { if( ( NewSeqNum + 4096 - RxIndicateSeq ) < REORDER_WIN_SIZE ) return TRUE; @@ -271,7 +271,7 @@ CheckRxTsIndicateSeq( RT_TRACE(COMP_RX_REORDER, DBG_WARNING, ("CheckRxTsIndicateSeq(): out-off squence !! Packet Drop! IndicateSeq: %d, NewSeq: %d\n", pTS->RxIndicateSeq, NewSeqNum)); return FALSE; } - + // // Sliding window manipulation. Conditions includes: // 1. Incoming SeqNum is equal to WinStart =>Window shift 1 @@ -313,7 +313,7 @@ FlushRxTsPendingPkts( pTS->RxIndicateState = RXTS_INDICATE_IDLE; return; } - + pGenBuf = GetGenTempBuffer (Adapter, sizeof(PRT_RFD)*REORDER_WIN_SIZE); RfdArray = (PRT_RFD *)pGenBuf->Buffer.Ptr; @@ -328,7 +328,7 @@ FlushRxTsPendingPkts( DrvIFIndicatePackets(Adapter, RfdArray, RfdCnt); ReturnGenTempBuffer(Adapter, pGenBuf); - + pTS->RxIndicateSeq = 0xffff; pTS->RxIndicateState = RXTS_INDICATE_IDLE; } @@ -459,9 +459,9 @@ RxPktPendingTimeout( PADAPTER Adapter = (PADAPTER)pTimer->Adapter; PRX_TS_RECORD pRxTS = (PRX_TS_RECORD)pTimer->Context; BOOLEAN bSupportAvoidRxDpcWatchdogVoilation = FALSE; - + RT_TRACE(COMP_RX_REORDER, DBG_WARNING, ("==>RxPktPendingTimeout()\n")); - + //Only 8814AE set bSupportAvoidRxDpcWatchdogVoilation true now. Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_AVOID_RX_DPC_WATCHDOG_VIOLATION, (pu1Byte)(&bSupportAvoidRxDpcWatchdogVoilation)); if(bSupportAvoidRxDpcWatchdogVoilation) @@ -477,7 +477,7 @@ RxPktPendingTimeout( return; } } - + PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); // Only do indication process in Batch and Reorder state in this function. diff --git a/network/wlan/WDI/COMMON/RxReorder.h b/network/wlan/WDI/COMMON/RxReorder.h index 30bcdbe83..74e877802 100644 --- a/network/wlan/WDI/COMMON/RxReorder.h +++ b/network/wlan/WDI/COMMON/RxReorder.h @@ -10,7 +10,7 @@ #define RX_BATCH_PACKET_NUM 10 -typedef enum _RX_REORDER_ACTION { +typedef enum _RX_REORDER_ACTION { NOT_INDICATE, INDICATED, RX_REORDER_INDICATE diff --git a/network/wlan/WDI/COMMON/SMBios.h b/network/wlan/WDI/COMMON/SMBios.h index 6c84d8a19..63de3ab56 100644 --- a/network/wlan/WDI/COMMON/SMBios.h +++ b/network/wlan/WDI/COMMON/SMBios.h @@ -58,7 +58,7 @@ typedef struct _SMBIOS_DATA{ BOOLEAN bAsusTX201; BOOLEAN bWABTSeries; BOOLEAN bB550; - + #if(MUTUAL_AUTHENTICATION == 1) SMBIOS_STATUS MutualAuth; BOOLEAN MutualAuthEnable; @@ -95,7 +95,7 @@ SmbiosGetMutualAuth( IN ULONG RemainLen ); VOID -MutualAuthWorkItemCallback( +MutualAuthWorkItemCallback( IN PVOID pContext ); VOID diff --git a/network/wlan/WDI/COMMON/SecurityGen.c b/network/wlan/WDI/COMMON/SecurityGen.c index 23abf5b4d..1c1a57267 100644 --- a/network/wlan/WDI/COMMON/SecurityGen.c +++ b/network/wlan/WDI/COMMON/SecurityGen.c @@ -19,16 +19,16 @@ SecCheckMIC( PRT_SECURITY_T pSec = &Adapter->MgntInfo.SecurityInfo; BOOLEAN bResult = TRUE; - + FillOctetString(frame, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); - - //2004/07/12, kcwu, + + //2004/07/12, kcwu, //Check if the packet is encrypted if(!Frame_WEP(frame)) { return bResult; } - + //2004/07/12, kcwu //Find the algorithm that should be used PlatformMoveMemory(DestAddr, Frame_Addr1(frame), ETHERNET_ADDRESS_LENGTH); @@ -45,13 +45,13 @@ SecCheckMIC( bResult = TRUE; } return bResult; - + } // -// Description: -// Figure out TKIP MIC from packet content and compare it to +// Description: +// Figure out TKIP MIC from packet content and compare it to // MIC of packet received. // // 2004.10.08, by rcnjko. @@ -85,14 +85,14 @@ SecCheckTKIPMIC( return TRUE; } - // This is just a workaround for WiFi 5.2.2.4 S2 might failed - // in unknown condition. For example, we think the packets received is TKIP MIC error - // during this test and finally trigger counter measure. 2005.09.06, by rcnjko. + // This is just a workaround for WiFi 5.2.2.4 S2 might failed + // in unknown condition. For example, we think the packets received is TKIP MIC error + // during this test and finally trigger counter measure. 2005.09.06, by rcnjko. // Prefast warning C28182: Dereferencing NULL pointer. 'pRfd' contains NULL. if(pRfd != NULL && pRfd->nTotalFrag > 1) { return TRUE; - } + } // Initialize first buffer of the packet to as header. // Prefast warning C6011: Dereferencing NULL pointer 'pRfd'. @@ -111,13 +111,13 @@ SecCheckTKIPMIC( { IVOffset = sMacHdrLng; } - // Prefast warning C6011: Dereferencing NULL pointer 'pRfd'. + // Prefast warning C6011: Dereferencing NULL pointer 'pRfd'. if(pRfd != NULL && pRfd->Status.bContainHTC) IVOffset += sHTCLng; IVKeyIdOffset = IVOffset + KEYID_POS_IN_IV; - + // Packet length check. if(pRfd != NULL && pRfd->PacketLength < IVOffset ) { @@ -125,7 +125,7 @@ SecCheckTKIPMIC( return FALSE; // Drop the packet. } - // Prefast warning C6011: Dereferencing NULL pointer 'frame.Octet'. + // Prefast warning C6011: Dereferencing NULL pointer 'frame.Octet'. if (frame.Octet != NULL) { // Get DestAddr from header. //Modified by Jay 0713 @@ -140,25 +140,25 @@ SecCheckTKIPMIC( if(ACTING_AS_AP(Adapter) && frame.Octet != NULL) //Added by Jay for SwAP 0708 { // AP Mode. pEntry = AsocEntry_GetEntry(pMgntInfo, Frame_pSaddr(frame)); - - if(pEntry == NULL) + + if(pEntry == NULL) return FALSE; - - if(pEntry->perSTAKeyInfo.RxMICKey == NULL) + + if(pEntry->perSTAKeyInfo.RxMICKey == NULL) return FALSE; - + SecMICSetKey(&micdata, pEntry->perSTAKeyInfo.RxMICKey); } else if(pRfd != NULL && pRfd->bTDLPacket) { pEntry = AsocEntry_GetEntry(pMgntInfo, Frame_pSaddr(frame)); - - if(pEntry == NULL) + + if(pEntry == NULL) return FALSE; - - if(pEntry->perSTAKeyInfo.TxMICKey == NULL) + + if(pEntry->perSTAKeyInfo.TxMICKey == NULL) return FALSE; - + SecMICSetKey(&micdata, pEntry->perSTAKeyInfo.TxMICKey); } else @@ -169,12 +169,12 @@ SecCheckTKIPMIC( Keyidx = SecGetRxKeyIdx( Adapter, DestAddr, ((frame.Octet[IVKeyIdOffset]>>6)&0x03) ); // Changed by Annie, 2005-12-22. //RT_TRACE(COMP_DBG, DBG_LOUD, ("SecCheckTKIPMIC(): Keyidx: %d\n", Keyidx)); - if(Keyidx > 4) - { - RT_TRACE(COMP_SEC, DBG_LOUD, ("SecCheckTKIPMIC(): Keyidx: %d > 4\n", Keyidx)); - return FALSE; // Drop the packet. + if(Keyidx > 4) + { + RT_TRACE(COMP_SEC, DBG_LOUD, ("SecCheckTKIPMIC(): Keyidx: %d > 4\n", Keyidx)); + return FALSE; // Drop the packet. } - + SecMICSetKey(&micdata, pSec->KeyBuf[Keyidx]+TKIP_MICKEYTX_POS); } @@ -204,16 +204,16 @@ SecCheckTKIPMIC( CurrBufferLen = (int)(pCurrRfd->FragLength) - ((int)(IVOffset)+(int)(pSec->EncryptionHeadOverhead)); } while(pCurrRfd != NULL) - { + { // Get MIC of the Last buffer and exclude MIC from it. if(pCurrRfd->NextRfd == NULL) - { + { if(CurrBufferLen >= TKIP_MIC_LEN) { // MIC is not fragmented. // Get MIC. PlatformMoveMemory( - mic_from_packet, + mic_from_packet, pCurrBuffer + CurrBufferLen - TKIP_MIC_LEN, TKIP_MIC_LEN); @@ -228,11 +228,11 @@ SecCheckTKIPMIC( // Get MIC. PlatformMoveMemory( - mic_from_packet, + mic_from_packet, pPrevRfd->Buffer.VirtualAddress + pPrevRfd->FragLength - cbMicInPrev, cbMicInPrev); PlatformMoveMemory( - mic_from_packet + cbMicInPrev, + mic_from_packet + cbMicInPrev, pCurrBuffer, CurrBufferLen); @@ -242,7 +242,7 @@ SecCheckTKIPMIC( } else if(pCurrRfd->NextRfd->NextRfd == NULL) { // In case if MIC is fragmented, we must take care about the last two fragment. - + if(pCurrRfd->NextRfd->FragLength < TKIP_MIC_LEN) { // MIC is fragmented. int cbMicInPrev = TKIP_MIC_LEN - pCurrRfd->NextRfd->FragLength; @@ -261,7 +261,7 @@ SecCheckTKIPMIC( // Next one. pPrevRfd = pCurrRfd; - pCurrRfd = pCurrRfd->NextRfd; + pCurrRfd = pCurrRfd->NextRfd; if(pCurrRfd != NULL) { pCurrBuffer = pCurrRfd->Buffer.VirtualAddress + pCurrRfd->FragOffset; @@ -273,12 +273,12 @@ SecCheckTKIPMIC( CurrBufferLen = 0; } } - + // Figure out MIC from micdata. SecMICGetMIC(&micdata, mic_for_check); // PRINT_DATA((const void*)"mic_for_check===>", (const void*)mic_for_check, TKIP_MIC_LEN); // PRINT_DATA((const void*)"mic_from_packet===>", (const void*)mic_from_packet, TKIP_MIC_LEN); - + // Compare two MICs. if(PlatformCompareMemory(mic_for_check, mic_from_packet,TKIP_MIC_LEN)) { // Different! @@ -300,9 +300,9 @@ SecCheckTKIPMIC( else if (IsMgntFrame(frame.Octet)) CountRxMgntTKIPLocalMICFailuresStatistics(Adapter, pRfd); } - + // Handle TKIP MIC error. - if(ACTING_AS_AP(Adapter)) //Added by Jay 0708. + if(ACTING_AS_AP(Adapter)) //Added by Jay 0708. { // AP Mode. //Enter integrity failure state... Authenticator_StateINTEGRITYFAILURE(Adapter, pEntry); @@ -313,7 +313,7 @@ SecCheckTKIPMIC( } else { // STA Mode. - + // We don't indication MIC ERROR in MFP Packet !! // Prefast warning C28182: Dereferencing NULL pointer. 'pRfd' contains the same NULL value as 'pCurrRfd' did. if(pRfd != NULL && !pRfd->Status.bRxMFPPacket ) @@ -325,7 +325,7 @@ SecCheckTKIPMIC( else { // The same. - RT_TRACE(COMP_DBG, DBG_LOUD, ("Rx:TKIP_MIC Ok\n")); + RT_TRACE(COMP_DBG, DBG_LOUD, ("Rx:TKIP_MIC Ok\n")); return TRUE; } } @@ -403,11 +403,11 @@ SecHeaderFillIV( { pSecHeader += sQoSCtlLng; } - + // Check address 4 valiaddr , add for BT // Note : AP WDS mode need to do .... oFrame.Octet = PacketStart; - + if( Frame_ValidAddr4( oFrame ) ) { RT_TRACE( COMP_SEC , DBG_LOUD, ("===>SecHeaderFillIV() : 4 address data \n") ); @@ -415,7 +415,7 @@ SecHeaderFillIV( pSecHeader += 6; show = TRUE; } - + switch(SelectEncAlgorithm){ case RT_ENC_ALG_WEP104: case RT_ENC_ALG_WEP40: @@ -431,7 +431,7 @@ SecHeaderFillIV( pSecHeader[3] = EF1Byte( (u1Byte)((pSec->DefaultTransmitKeyIdx<<6)&0xc0) ); } break; - + case RT_ENC_ALG_TKIP: { if(!ACTING_AS_AP(Adapter)) @@ -439,7 +439,7 @@ SecHeaderFillIV( u2Byte u2IV16 = (u2Byte)(pSec->TxIV& UINT64_C(0x000000000000ffff) ); u4Byte u4IV32 = (u4Byte)(((pSec->TxIV& UINT64_C(0x0000ffffffff0000) ) >> 16)& UINT64_C(0x00000000ffffffff) ); pSec->TxIV++; - + //keyid is always 0 for STA TKIP_TSC_DECIMAL2ARRAY(u2IV16, u4IV32, 0, pSecHeader); } @@ -459,9 +459,9 @@ SecHeaderFillIV( if( pEntry==NULL ) return; u2IV16 = (u2Byte)(pEntry->perSTAKeyInfo.TxIV & UINT64_C(0x000000000000ffff) ); - u4IV32 = (u4Byte)(((pEntry->perSTAKeyInfo.TxIV& UINT64_C(0x0000ffffffff0000) ) >> 16)& UINT64_C(0x00000000ffffffff) ); + u4IV32 = (u4Byte)(((pEntry->perSTAKeyInfo.TxIV& UINT64_C(0x0000ffffffff0000) ) >> 16)& UINT64_C(0x00000000ffffffff) ); pEntry->perSTAKeyInfo.TxIV++; - + //keyid is always 0 for STA TKIP_TSC_DECIMAL2ARRAY(u2IV16, u4IV32, 0, pSecHeader); } @@ -485,16 +485,16 @@ SecHeaderFillIV( { RT_TRACE( COMP_SEC , DBG_LOUD , ("===>ccw Ok \n") ); } - - PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000) ), - (pSec->TxIV& UINT64_C(0x00000000ffffffff)), - PAIRWISE_KEYIDX, //keyid = 0 for pairwise packet + + PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000) ), + (pSec->TxIV& UINT64_C(0x00000000ffffffff)), + PAIRWISE_KEYIDX, //keyid = 0 for pairwise packet pSecHeader); pSec->TxIV++; } else if( ACTING_AS_AP(Adapter) ) { - + if(!MacAddr_isMulticast(pRA)) { // Pairwise traffic. @@ -502,45 +502,45 @@ SecHeaderFillIV( PRT_WLAN_STA pEntry; pEntry = AsocEntry_GetEntry(pMgntInfo, pRA); - + if( pEntry==NULL ) return; - - PN_DECIMAL2ARRAY((pEntry->perSTAKeyInfo.TxIV& UINT64_C(0xffffffff00000000)), - (pEntry->perSTAKeyInfo.TxIV& UINT64_C(0x00000000ffffffff)), - 0, //keyid = 0 for pairwise packet + + PN_DECIMAL2ARRAY((pEntry->perSTAKeyInfo.TxIV& UINT64_C(0xffffffff00000000)), + (pEntry->perSTAKeyInfo.TxIV& UINT64_C(0x00000000ffffffff)), + 0, //keyid = 0 for pairwise packet pSecHeader); pEntry->perSTAKeyInfo.TxIV++; } else - { // Group traffic. - PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000)), - (pSec->TxIV& UINT64_C(0x00000000ffffffff)), + { // Group traffic. + PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000)), + (pSec->TxIV& UINT64_C(0x00000000ffffffff)), pSec->GroupTransmitKeyIdx,// 0, pSecHeader); pSec->TxIV++; } - + } else { if(!MacAddr_isMulticast(pRA)) { // Pairwise traffic. - PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000) ), - (pSec->TxIV&0x00000000ffffffff), - PAIRWISE_KEYIDX, //keyid = 0 for pairwise packet + PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000) ), + (pSec->TxIV&0x00000000ffffffff), + PAIRWISE_KEYIDX, //keyid = 0 for pairwise packet pSecHeader); } else - { // Group traffic. - PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000) ), - (pSec->TxIV& UINT64_C(0x00000000ffffffff) ), - pSec->DefaultTransmitKeyIdx, + { // Group traffic. + PN_DECIMAL2ARRAY((pSec->TxIV& UINT64_C(0xffffffff00000000) ), + (pSec->TxIV& UINT64_C(0x00000000ffffffff) ), + pSec->DefaultTransmitKeyIdx, pSecHeader); } pSec->TxIV++; } - + break; case RT_ENC_ALG_SMS4: @@ -556,7 +556,7 @@ SecHeaderFillIV( // //Note : SecInit() need to Used after SecClearAllKeys(); -// Because Clear CAM Key will check SecInfo Key Buffer Length +// Because Clear CAM Key will check SecInfo Key Buffer Length // If Length = 0, CAM entey will "NO" Clear .... VOID @@ -564,7 +564,7 @@ SecInit( PADAPTER Adapter ) { - PRT_SECURITY_T pSec = &Adapter->MgntInfo.SecurityInfo; + PRT_SECURITY_T pSec = &Adapter->MgntInfo.SecurityInfo; s1Byte i = 0; pSec->PairwiseEncAlgorithm = pSec->GroupEncAlgorithm = RT_ENC_ALG_AESCCMP; @@ -572,7 +572,7 @@ SecInit( pSec->DefaultTransmitKeyIdx = 0; pSec->GroupTransmitKeyIdx = 0; SecSetSwEncryptionDecryption(Adapter, FALSE, FALSE); - pSec->SWRxAESMICFlag = FALSE; + pSec->SWRxAESMICFlag = FALSE; pSec->bGroupKeyFixed = FALSE; pSec->AuthMode = RT_802_11AuthModeWPA2; @@ -582,7 +582,7 @@ SecInit( // 2007.08.08 We must initialize this value, otherwise, software decryption // without initilization of AES mode cause Assertion in Vista. By Lanhsin pSec->AESCCMPMicLen = 8; - + PlatformZeroMemory(pSec->RSNIEBuf, MAXRSNIELEN); pSec->RSNIE.Length = 0; FillOctetString(pSec->RSNIE, pSec->RSNIEBuf, pSec->RSNIE.Length); @@ -615,13 +615,13 @@ SecInit( init_crc32(); // Initialize TKIP MIC error related, 2004.10.06, by rcnjko. - pSec->LastPairewiseTKIPMICErrorTime = 0; + pSec->LastPairewiseTKIPMICErrorTime = 0; pSec->bToDisassocAfterMICFailureReportSend = FALSE; for(i = 0; i < MAX_DENY_BSSID_LIST_CNT; i++) { pSec->DenyBssidList[i].bUsed = FALSE; } - + } /* @@ -636,7 +636,7 @@ SecInit( // //Note : SecClearAllKeys() need to Used before SecInit(); -// Because Clear CAM Key will check SecInfo Key Buffer Length +// Because Clear CAM Key will check SecInfo Key Buffer Length // If Length = 0, CAM entey will "NO" Clear .... VOID @@ -657,8 +657,8 @@ SecClearAllKeys( // for(i = 0; i < MAX_NUM_PER_STA_KEY; i++) { - PlatformZeroMemory( &(pSec->PerStaDefKeyTable[i]), sizeof(PER_STA_DEFAULT_KEY_ENTRY) ); - PlatformZeroMemory( &(pSec->MAPKEYTable[i]), sizeof(PER_STA_MPAKEY_ENTRY) ); + PlatformZeroMemory( &(pSec->PerStaDefKeyTable[i]), sizeof(PER_STA_DEFAULT_KEY_ENTRY) ); + PlatformZeroMemory( &(pSec->MAPKEYTable[i]), sizeof(PER_STA_MPAKEY_ENTRY) ); } } @@ -669,7 +669,7 @@ SecClearGroupKeyByIdx( ){ PlatformZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[paraIndex], MAX_KEY_LEN); Adapter->MgntInfo.SecurityInfo.KeyLen[paraIndex] = 0; - Adapter->HalFunc.SetKeyHandler(Adapter, paraIndex, 0, TRUE, + Adapter->HalFunc.SetKeyHandler(Adapter, paraIndex, 0, TRUE, Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm, FALSE, FALSE); } @@ -681,7 +681,7 @@ SecClearWEPKeyByIdx( { PlatformZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[paraIndex], MAX_KEY_LEN); Adapter->MgntInfo.SecurityInfo.KeyLen[paraIndex] = 0; - Adapter->HalFunc.SetKeyHandler(Adapter, paraIndex, 0, TRUE, + Adapter->HalFunc.SetKeyHandler(Adapter, paraIndex, 0, TRUE, Adapter->MgntInfo.SecurityInfo.GroupEncAlgorithm, FALSE, FALSE); } //for AP mode @@ -695,7 +695,7 @@ SecClearPairwiseKeyByMacAddr( PlatformZeroMemory(Adapter->MgntInfo.SecurityInfo.PairwiseKey, MAX_KEY_LEN); Adapter->MgntInfo.SecurityInfo.KeyLen[PAIRWISE_KEYIDX] = 0; //2004/09/07, kcwu, disable the key entry in cam - Adapter->HalFunc.SetKeyHandler(Adapter, PAIRWISE_KEYIDX, paraMacAddr, FALSE, + Adapter->HalFunc.SetKeyHandler(Adapter, PAIRWISE_KEYIDX, paraMacAddr, FALSE, Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm, FALSE, FALSE); } @@ -748,8 +748,8 @@ Sec_SelAkmFromAuthMode( if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_CLIENT)) { PFT_INFO_ENTRY pEntry = NULL; - - if(!pInfoBuf || InfoBufLen < sizeof(RT_WLAN_BSS)) + + if(!pInfoBuf || InfoBufLen < sizeof(RT_WLAN_BSS)) { RT_TRACE_F(COMP_SEC, DBG_SERIOUS, ("Invalid input buffer or length, pInfoBuf = %p, InfoBufLen = %d\n", pInfoBuf, InfoBufLen)); return RT_STATUS_INVALID_DATA; @@ -767,7 +767,7 @@ Sec_SelAkmFromAuthMode( { ftMDIeLen = pEntry->MDELen; } - } + } RT_TRACE_F(COMP_SEC, DBG_LOUD, ("AuthMode = %d, RegCapAKMSuite = 0x%08X\n", AuthMode, pAdapter->MgntInfo.RegCapAKMSuite)); @@ -776,7 +776,7 @@ Sec_SelAkmFromAuthMode( default: rtStatus = RT_STATUS_NOT_RECOGNIZED; break; - + case RT_802_11AuthModeWPA: if(bCCX8021xenable && bAPSuportCCKM) { @@ -787,7 +787,7 @@ Sec_SelAkmFromAuthMode( *pAKM = AKM_WPA_1X; } break; - + case RT_802_11AuthModeWPA2: if(bCCX8021xenable && bAPSuportCCKM) { @@ -799,7 +799,7 @@ Sec_SelAkmFromAuthMode( } else if(TEST_FLAG(targetAKMSuites, AKM_RSNA_1X_SHA256) && TEST_FLAG(pAdapter->MgntInfo.RegCapAKMSuite, AKM_RSNA_1X_SHA256)) { - *pAKM = AKM_RSNA_1X_SHA256; + *pAKM = AKM_RSNA_1X_SHA256; } else { @@ -810,7 +810,7 @@ Sec_SelAkmFromAuthMode( case RT_802_11AuthModeWPAPSK: *pAKM = AKM_WPA_PSK; break; - + case RT_802_11AuthModeWPA2PSK: { if(ftMDIeLen > 0) @@ -826,7 +826,7 @@ Sec_SelAkmFromAuthMode( *pAKM = AKM_WPA2_PSK; } } - break; + break; } return rtStatus; @@ -937,7 +937,7 @@ Sec_MapAKMSuiteToOUIType( PlatformMoveMemory(pOUI, RSN_OUI, SIZE_OUI); *pOUIType = RSN_AKM_SUITE_OUI_TYPE_FT_PSK; } - break; + break; } return rtStatus; @@ -974,7 +974,7 @@ Sec_MapOUITypeToAKMSuite( CHECK_NULL_RETURN_STATUS(pOUI); CHECK_NULL_RETURN_STATUS(pOUIType); CHECK_NULL_RETURN_STATUS(pAKMSuite); - + if(RT_SEC_LVL_NONE == secLevl) { *pAKMSuite = AKM_SUITE_NONE; @@ -988,7 +988,7 @@ Sec_MapOUITypeToAKMSuite( default: rtStatus = RT_STATUS_NOT_RECOGNIZED; break; - + case AKM_WPA_1X_OUI_TYPE: *pAKMSuite = AKM_WPA_1X; break; @@ -996,7 +996,7 @@ Sec_MapOUITypeToAKMSuite( case AKM_WPA_PSK_OUI_TYPE: *pAKMSuite = AKM_WPA_PSK; break; - } + } } else if(eqOUI(pOUI, CCKM_OUI) && CCKM_OUI_TYPE == *pOUIType) { @@ -1005,7 +1005,7 @@ Sec_MapOUITypeToAKMSuite( else { rtStatus = RT_STATUS_NOT_RECOGNIZED; - } + } } else if(RT_SEC_LVL_WPA2 == secLevl) { @@ -1016,7 +1016,7 @@ Sec_MapOUITypeToAKMSuite( default: rtStatus = RT_STATUS_NOT_RECOGNIZED; break; - + case RSN_AKM_SUITE_OUI_TYPE_RSN_1X: *pAKMSuite = AKM_WPA2_1X; break; @@ -1040,7 +1040,7 @@ Sec_MapOUITypeToAKMSuite( case RSN_AKM_SUITE_OUI_TYPE_PSK_SHA256: *pAKMSuite = AKM_RSNA_PSK_SHA256; break; - } + } } else if(eqOUI(pOUI, CCKM_OUI) && CCKM_OUI_TYPE == *pOUIType) { @@ -1051,7 +1051,7 @@ Sec_MapOUITypeToAKMSuite( rtStatus = RT_STATUS_NOT_RECOGNIZED; } } - + return RT_STATUS_NOT_SUPPORT; } @@ -1145,7 +1145,7 @@ Sec_MapCipherSuiteToOUIType( RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Invalid Cipher suite RT_ENC_ALG_SMS4 to map OUI\n")); rtStatus = RT_STATUS_INVALID_DATA; } - break; + break; } } else if(RT_SEC_LVL_WPA2 == secLevl) @@ -1266,7 +1266,7 @@ Sec_MapOUITypeToCipherSuite( CHECK_NULL_RETURN_STATUS(pOUI); CHECK_NULL_RETURN_STATUS(pOUIType); CHECK_NULL_RETURN_STATUS(pCipherSuite); - + if(RT_SEC_LVL_NONE == secLevl) { *pCipherSuite = RT_ENC_ALG_NO_CIPHER; @@ -1280,7 +1280,7 @@ Sec_MapOUITypeToCipherSuite( default: rtStatus = RT_STATUS_NOT_RECOGNIZED; break; - + case WPA_CIPHER_SUITE_OUI_TYPE_NONE: *pCipherSuite = RT_ENC_ALG_NO_CIPHER;; break; @@ -1299,13 +1299,13 @@ Sec_MapOUITypeToCipherSuite( case WPA_CIPHER_SUITE_OUI_TYPE_WEP104: *pCipherSuite = RT_ENC_ALG_WEP104;; - break; - } + break; + } } else { rtStatus = RT_STATUS_NOT_RECOGNIZED; - } + } } else if(RT_SEC_LVL_WPA2 == secLevl) { @@ -1351,7 +1351,7 @@ Sec_MapOUITypeToCipherSuite( rtStatus = RT_STATUS_NOT_RECOGNIZED; } } - + return RT_STATUS_NOT_SUPPORT; } @@ -1374,7 +1374,7 @@ Sec_MapNewCipherToDepCipherAlg( switch(newCipherSuite) { default: - { + { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Unknown newCipherSuite(0x%08X) to map\n", newCipherSuite)); } break; @@ -1426,7 +1426,7 @@ SecGetEncryptionOverhead( PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; RT_ENC_ALG ulSwitchCondition = (bByPacket&&bIsBroadcastPkt)? \ pMgntInfo->SecurityInfo.GroupEncAlgorithm:pMgntInfo->SecurityInfo.PairwiseEncAlgorithm; - + // Decide EncryptionOverhead according to Encryption algorithm switch( ulSwitchCondition ) { @@ -1460,12 +1460,12 @@ SecGetEncryptionOverhead( if(pMSDUTail){ *pMSDUTail=0; } break; - case RT_ENC_ALG_SMS4: + case RT_ENC_ALG_SMS4: if(pMPDUHead){ *pMPDUHead=18; } if(pMPDUTail){ *pMPDUTail=16; } if(pMSDUHead){ *pMSDUHead=0; } if(pMSDUTail){ *pMSDUTail=0; } - break; + break; default: break; @@ -1481,7 +1481,7 @@ SecGetGroupCipherFromBeacon( PRT_WLAN_BSS pbssDesc) { PRT_SECURITY_T pSecInfo = &(Adapter->MgntInfo.SecurityInfo); - + pSecInfo->GroupEncAlgorithm = pbssDesc->GroupCipherSuite; RT_TRACE( COMP_SEC, DBG_LOUD, ("SecGetGroupCipherFromBeacon(): GroupEncAlgorithm = %d\n", pSecInfo->GroupEncAlgorithm) ); @@ -1516,7 +1516,7 @@ SecConstructRSNIE( NULL, 0, &selAKM); - + if(pSecInfo->SecLvl == RT_SEC_LVL_WPA) { // WPA OUI and Type @@ -1527,7 +1527,7 @@ SecConstructRSNIE( SET_WPA_IE_VERSION(pIeHead, WPA_VER1); IeLen += 2; - // + // // 2. Group Cipher Suite. // Sec_MapCipherSuiteToOUIType(pSecInfo->GroupEncAlgorithm, RT_SEC_LVL_WPA, tmpOUI, &tmpOUIType); @@ -1552,7 +1552,7 @@ SecConstructRSNIE( // AKM suite list Sec_MapAKMSuiteToOUIType(selAKM, tmpOUI, &tmpOUIType); ADD_WPA_IE_AKM_SUITE_OUI_W_TYPE(pIeHead, tmpOUI, tmpOUIType); - IeLen += 4; + IeLen += 4; // Capabilities SET_WPA_IE_CAP_PTKSA_REPLAY_COUNTER(pIeHead, 0); @@ -1567,13 +1567,13 @@ SecConstructRSNIE( // Group cipher suite OUI/Type Sec_MapCipherSuiteToOUIType(pSecInfo->GroupEncAlgorithm, RT_SEC_LVL_WPA2, tmpOUI, &tmpOUIType); SET_RSN_IE_GROUP_CIPHER_SUITE_OUI_W_TYPE(pIeHead, tmpOUI, tmpOUIType); - IeLen += 4; - + IeLen += 4; + // Pairwise cipher suite OUI/Type Sec_MapCipherSuiteToOUIType(pSecInfo->PairwiseEncAlgorithm, RT_SEC_LVL_WPA2, tmpOUI, &tmpOUIType); - + // RT_TRACE_F(COMP_SEC, DBG_LOUD, ("PairwiseEncAlgorithm = 0x%08X, OUI = %02X-%02X-%02X-%02X\n", pSecInfo->PairwiseEncAlgorithm, tmpOUI[0], tmpOUI[1], tmpOUI[2], tmpOUIType)); - + // Intialize pairwise count SET_RSN_IE_PAIRWISE_CIPHER_SUITE_CNT(pIeHead, 0); IeLen += 2; @@ -1588,7 +1588,7 @@ SecConstructRSNIE( Sec_MapAKMSuiteToOUIType(selAKM, tmpOUI, &tmpOUIType); ADD_RSN_IE_AKM_SUITE_OUI_W_TYPE(pIeHead, tmpOUI, tmpOUIType); - IeLen += 4; + IeLen += 4; // @@ -1613,10 +1613,10 @@ SecConstructRSNIE( IeLen += 2; } - + Adapter->MgntInfo.SecurityInfo.RSNIE.Length = IeLen; - - RT_PRINT_DATA( COMP_SEC, DBG_LOUD, ("SecConstructRSNIE(): RSNIE:\n"), pSecInfo->RSNIE.Octet, pSecInfo->RSNIE.Length); + + RT_PRINT_DATA( COMP_SEC, DBG_LOUD, ("SecConstructRSNIE(): RSNIE:\n"), pSecInfo->RSNIE.Octet, pSecInfo->RSNIE.Length); } // @@ -1682,7 +1682,7 @@ Sec_AppendWPAIE( rtStatus = RT_STATUS_INVALID_STATE; break; } - } + } if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_802_11)) { @@ -1701,7 +1701,7 @@ Sec_AppendWPAIE( } pBssDesc = (PRT_WLAN_BSS)pInfoBuf; - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_SelAkmFromAuthMode( pAdapter, pSecInfo->AuthMode, @@ -1713,9 +1713,9 @@ Sec_AppendWPAIE( RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Failed (0x%08X) from Sec_SelAkmFromAuthMode(), pSecInfo->AuthMode = %d, pBssDesc->AKMsuit = 0x%08X\n", rtStatus, pSecInfo->AuthMode, pBssDesc->AKMsuit)); break; - + } - + RT_TRACE_F(COMP_SEC, DBG_LOUD, ("selAKM = 0x%08X\n", selAKM)); // Do not append RSN IE in default. @@ -1724,7 +1724,7 @@ Sec_AppendWPAIE( { default: rtStatus = RT_STATUS_INVALID_DATA; - break; + break; case Type_Asoc_Req: case Type_Reasoc_Req: @@ -1759,12 +1759,12 @@ Sec_AppendWPAIE( osRsn.Length += 4; // Pairwise cipher suite OUI/Type - if(RT_STATUS_SUCCESS != + if(RT_STATUS_SUCCESS != (rtStatus = Sec_MapCipherSuiteToOUIType(pSecInfo->PairwiseEncAlgorithm, RT_SEC_LVL_WPA, tmpOUI, &tmpOUIType))) { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Fail (0x%08X) to get OUI/Type from pairwise EncAlg(0x%08X)\n", rtStatus, pSecInfo->PairwiseEncAlgorithm)); break; - + } // Initialize Pairwise Suite count @@ -1781,7 +1781,7 @@ Sec_AppendWPAIE( // AKM suite list if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_CLIENT)) - { + { if(RT_STATUS_SUCCESS != (rtStatus = Sec_MapAKMSuiteToOUIType(selAKM, tmpOUI, &tmpOUIType))) { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Failed (0x%08X) from Sec_MapAKMSuiteToOUIType() for selAKM = 0x%08X, AuthMode = %d, targetAKMSuite = 0x%08X\n", @@ -1795,7 +1795,7 @@ Sec_AppendWPAIE( { // ToDo rtStatus = RT_STATUS_NOT_SUPPORT; - break; + break; } // Capabilities @@ -1808,7 +1808,7 @@ Sec_AppendWPAIE( { if((maxBufLen - posOutContent->Length) < osRsn.Length) { - RT_TRACE_F(COMP_SEC, DBG_WARNING, + RT_TRACE_F(COMP_SEC, DBG_WARNING, ("maxBufLen (%d) - posOutContent.Length (%d) < osRsn.Length(%d)\n", maxBufLen, posOutContent->Length, osRsn.Length)); rtStatus = RT_STATUS_BUFFER_TOO_SHORT; } @@ -1875,8 +1875,8 @@ Sec_AppendRSNIE( PFT_INFO_ENTRY pFtEntry = NULL; CHECK_NULL_RETURN_STATUS(posOutContent); - - FillOctetString(osRsn, rsnBuf, 0); + + FillOctetString(osRsn, rsnBuf, 0); do { @@ -1908,7 +1908,7 @@ Sec_AppendRSNIE( } pBssDesc = (PRT_WLAN_BSS)pInfoBuf; - if(RT_STATUS_SUCCESS != (rtStatus = + if(RT_STATUS_SUCCESS != (rtStatus = Sec_SelAkmFromAuthMode( pAdapter, pSecInfo->AuthMode, @@ -1920,7 +1920,7 @@ Sec_AppendRSNIE( RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Failed (0x%08X) from Sec_SelAkmFromAuthMode(), pSecInfo->AuthMode = %d, pBssDesc->AKMsuit = 0x%08X\n", rtStatus, pSecInfo->AuthMode, pBssDesc->AKMsuit)); break; - + } RT_TRACE_F(COMP_SEC, DBG_LOUD, ("selAKM = 0x%08X\n", selAKM)); @@ -1960,7 +1960,7 @@ Sec_AppendRSNIE( bFtIeFromEntry = TRUE; RT_TRACE_F(COMP_SEC, DBG_LOUD, ("RSN IE content from FT entry\n")); } - + } rtStatus = RT_STATUS_SUCCESS; } @@ -1978,32 +1978,32 @@ Sec_AppendRSNIE( if(bFtIeFromEntry) break; } - + SET_RSN_IE_VERSION(osRsn.Octet, RSN_VER1); osRsn.Length += 2; // Group cipher suite OUI/Type - if(RT_STATUS_SUCCESS != + if(RT_STATUS_SUCCESS != (rtStatus = Sec_MapCipherSuiteToOUIType(pSecInfo->GroupEncAlgorithm, RT_SEC_LVL_WPA2, tmpOUI, &tmpOUIType))) { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Fail (0x%08X) to get OUI/Type from group EncAlg(0x%08X)\n", rtStatus, pSecInfo->GroupEncAlgorithm)); break; - + } SET_RSN_IE_GROUP_CIPHER_SUITE_OUI_W_TYPE(osRsn.Octet, tmpOUI, tmpOUIType); osRsn.Length += 4; - + // Pairwise cipher suite OUI/Type - if(RT_STATUS_SUCCESS != + if(RT_STATUS_SUCCESS != (rtStatus = Sec_MapCipherSuiteToOUIType(pSecInfo->PairwiseEncAlgorithm, RT_SEC_LVL_WPA2, tmpOUI, &tmpOUIType))) { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Fail (0x%08X) to get OUI/Type from pairwise EncAlg(0x%08X)\n", rtStatus, pSecInfo->PairwiseEncAlgorithm)); break; - + } - + // RT_TRACE_F(COMP_SEC, DBG_LOUD, ("PairwiseEncAlgorithm = 0x%08X, OUI = %02X-%02X-%02X-%02X\n", pSecInfo->PairwiseEncAlgorithm, tmpOUI[0], tmpOUI[1], tmpOUI[2], tmpOUIType)); - + // Intialize pairwise count SET_RSN_IE_PAIRWISE_CIPHER_SUITE_CNT(osRsn.Octet, 0); osRsn.Length += 2; @@ -2015,9 +2015,9 @@ Sec_AppendRSNIE( // Intialize AKM suite count SET_RSN_IE_AKM_SUITE_CNT(osRsn.Octet, 0); osRsn.Length += 2; - + if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_CLIENT)) - { + { if(RT_STATUS_SUCCESS != (rtStatus = Sec_MapAKMSuiteToOUIType(selAKM, tmpOUI, &tmpOUIType))) { RT_TRACE_F(COMP_SEC, DBG_WARNING, ("Failed (0x%08X) from Sec_MapAKMSuiteToOUIType() for selAKM = 0x%08X, AuthMode = %d, targetAKMSuite = 0x%08X\n", @@ -2031,7 +2031,7 @@ Sec_AppendRSNIE( { // ToDo rtStatus = RT_STATUS_NOT_SUPPORT; - break; + break; } @@ -2056,16 +2056,16 @@ Sec_AppendRSNIE( SET_RSN_IE_CAP_GTKSA_REPLAY_COUNTER(osRsn.Octet, 0); osRsn.Length += 2; - + if(TEST_FLAG(contentType, CONTENT_PKT_TYPE_CLIENT)) { pu1Byte pPmkIdBuf = NULL; int pmkIdx = -1; BOOLEAN bGroupMgntCipher = FALSE; - + // Append PMKID if(pFtEntry) - { // FT PMKID + { // FT PMKID if(pFtEntry->PMKR0NameLen > 0) { pPmkIdBuf = pFtEntry->PMKR0Name; @@ -2082,13 +2082,13 @@ Sec_AppendRSNIE( SET_RSN_IE_CAP_MFP_CAPABLE(osRsn.Octet, 1); if(RT_STATUS_SUCCESS == Sec_MapCipherSuiteToOUIType(RT_ENC_ALG_BIP, RT_SEC_LVL_WPA2, tmpOUI, &tmpOUIType)) { - bGroupMgntCipher = TRUE; - } + bGroupMgntCipher = TRUE; + } } // Intialize PMKID count if there is any more content to avoid IOT issue if(pPmkIdBuf || bGroupMgntCipher) - { + { SET_RSN_IE_PMKID_CNT(osRsn.Octet, 0); osRsn.Length += 2; } @@ -2111,7 +2111,7 @@ Sec_AppendRSNIE( { if((maxBufLen - posOutContent->Length) < osRsn.Length) { - RT_TRACE_F(COMP_SEC, DBG_WARNING, + RT_TRACE_F(COMP_SEC, DBG_WARNING, ("maxBufLen (%d) - posOutContent.Length (%d) < osRsn.Length(%d)\n", maxBufLen, posOutContent->Length, osRsn.Length)); rtStatus = RT_STATUS_BUFFER_TOO_SHORT; } @@ -2175,7 +2175,7 @@ SecCalculateMIC( SecCalculateCKIPMIC(Adapter, pTcb); } break; - + case RT_ENC_ALG_TKIP: SecCalculateTKIPMIC(Adapter, pTcb); break; @@ -2190,20 +2190,20 @@ SecCalculateMIC( // -// Descriptin: +// Descriptin: // Append TKIP MIC of given tx packet to send. // // Note: // 1. TKIP MIC input: DA(6) + SA(6) + Priority(1) + Zero(3) + Data(n) // where Data field shall conform 802.2 LLC and 802.1 bridging. // For example, Data is begined with LLC/SNAP. -// +// // Assumption: -// 1. The tx packet repsented by RT_TCB here is an 802.11 MPDU +// 1. The tx packet repsented by RT_TCB here is an 802.11 MPDU // translated from an MSDU before doing fragmentation. // // Revision History: -// 061028, rcnjko: +// 061028, rcnjko: // Generalize the way to retrive MSDU payload. // VOID @@ -2221,65 +2221,65 @@ SecCalculateTKIPMIC( PRT_WLAN_STA pEntry = NULL; pu1Byte pHeader = pTcb->BufferList[0].VirtualAddress; - u4Byte FrameHdrLng = sMacHdrLng + pSec->EncryptionHeadOverhead; + u4Byte FrameHdrLng = sMacHdrLng + pSec->EncryptionHeadOverhead; u4Byte OffsetToByPass = 0; // // MIC Key. // - if(ACTING_AS_AP(Adapter)) + if(ACTING_AS_AP(Adapter)) { if(MacAddr_isMulticast(pTcb->DestinationAddress)) { - //Check if set GTK was completed - if(pMgntInfo->globalKeyInfo.GTK[0] == 0) + //Check if set GTK was completed + if(pMgntInfo->globalKeyInfo.GTK[0] == 0) return; - //Set Tx Group Key + //Set Tx Group Key SecMICSetKey(&micdata, &pMgntInfo->globalKeyInfo.GTK[16]); } else { - //Check if STA within associated lsit table - pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); - if(pEntry == NULL) + //Check if STA within associated lsit table + pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); + if(pEntry == NULL) return; - - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.TxMICKey == NULL) + + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.TxMICKey == NULL) return; - - //Set Tx Pairwise Key by destination Address + + //Set Tx Pairwise Key by destination Address SecMICSetKey(&micdata, pEntry->perSTAKeyInfo.TxMICKey); } - } + } else if(pTcb->bTDLPacket) { - //Check if STA within associated lsit table - pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); - if(pEntry == NULL) + //Check if STA within associated lsit table + pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); + if(pEntry == NULL) return; - - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.TxMICKey == NULL) + + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.TxMICKey == NULL) return; - - //Set Tx Pairwise Key by destination Address + + //Set Tx Pairwise Key by destination Address SecMICSetKey(&micdata, pEntry->perSTAKeyInfo.TxMICKey); } - else - { + else + { if(pSec->PairwiseEncAlgorithm != RT_ENC_ALG_TKIP) { RT_TRACE(COMP_SEC, DBG_LOUD, ("PairwiseEncAlg=%d\n", pSec->PairwiseEncAlgorithm) ); return; } if(pMgntInfo->mAssoc) - { + { SecMICSetKey(&micdata, pSec->KeyBuf[keyidx]+TKIP_MICKEYRX_POS); } - else + else { SecMICSetKey(&micdata, pSec->KeyBuf[keyidx]+TKIP_MICKEYTX_POS); } @@ -2296,7 +2296,7 @@ SecCalculateTKIPMIC( // Qos // PlatformZeroMemory(Qos, 4); - + if(IsQoSDataFrame(pHeader)) Qos[0] = pTcb->priority; // Added by Annie, 2005-12-21. @@ -2320,7 +2320,7 @@ SecCalculateTKIPMIC( else { SecMICAppend( - &micdata, + &micdata, pTcb->BufferList[idx].VirtualAddress + OffsetToByPass, pTcb->BufferList[idx].Length - OffsetToByPass); } @@ -2361,30 +2361,30 @@ SecCalculateCKIPMIC( PRT_GEN_TEMP_BUFFER pGenBufMICdata; RT_TRACE( COMP_CKIP, DBG_TRACE, ("==> SecCalculateCKIPMIC()\n") ); - + if( !pSec->pCkipPara->bIsMIC) // if not support MIC retun , added by CCW return; pGenBufMICdata = GetGenTempBuffer (Adapter, 2000); MICdata = (pu1Byte)pGenBufMICdata->Buffer.Ptr; - + //ckip_miccalc(Adapter, key, pDA, pSA, dcr, dcrlen, calcmic, mickeyid); // key = wep key , dcr = payload ( | LLC | SNAP |MIC |SEQ |eth-payload |) for(idx=1;idxBufferCount;idx++){ // Only check first nonzero buffer if(pTcb->BufferList[idx].Length==0) continue; - + PlatformMoveMemory( - MICdata + datalen, + MICdata + datalen, pTcb->BufferList[idx].VirtualAddress, pTcb->BufferList[idx].Length ); - + datalen += pTcb->BufferList[idx].Length; } pucMIC = pTcb->BufferList[1].VirtualAddress + 8 ; // Set MIC file point - - + + ckip_miccalc( Adapter , pSec->pCkipPara->CKIPKeyBuf[keyidx] , pTcb->DestinationAddress ,pTcb->SourceAddress , MICdata ,datalen , pucMIC , keyidx ); @@ -2401,7 +2401,7 @@ SecSoftwareEncryption( { RT_ENC_ALG SelectEncAlgorithm; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + if(pMgntInfo->SafeModeEnabled) { RT_TRACE_F(COMP_SEND, DBG_LOUD, ("Do not use software encrypt when safemode enable\n")); @@ -2420,7 +2420,7 @@ SecSoftwareEncryption( } else SelectEncAlgorithm = Adapter->MgntInfo.SecurityInfo.PairwiseEncAlgorithm; - + switch(SelectEncAlgorithm) { case RT_ENC_ALG_WEP40: @@ -2485,27 +2485,27 @@ SecSWTKIPEncryption( // AP mode: get key. - if(ACTING_AS_AP(Adapter)) + if(ACTING_AS_AP(Adapter)) { // AP mode. if(MacAddr_isMulticast(pTcb->DestinationAddress)) { // [AnnieNote] Current GTK is 12345678...12345678, so it's OK. // It's better to modify it by GTK length if we use PRF-X to generate GTK later. 2005-12-23. // - - //Check if set GTK was completed - if(Adapter->MgntInfo.globalKeyInfo.GTK[0] == 0) + + //Check if set GTK was completed + if(Adapter->MgntInfo.globalKeyInfo.GTK[0] == 0) return; } else { - //Check if STA within associated lsit table - pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); - if(pEntry == NULL) + //Check if STA within associated lsit table + pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); + if(pEntry == NULL) return; - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.TempEncKey == NULL) + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.TempEncKey == NULL) return; } } @@ -2526,14 +2526,14 @@ SecSWTKIPEncryption( // Get u2IV16 and u4IV32. u2IV16 = ((u2Byte)(*(pHeader+IVOffset + 0)) << 8) + \ ((u2Byte)(*(pHeader+IVOffset + 2)) << 0); - + u4IV32 = ((u4Byte) (*(pHeader+IVOffset + 4)) << 0) + \ ((u4Byte) (*(pHeader+IVOffset + 5)) << 8) + \ ((u4Byte) (*(pHeader+IVOffset + 6)) << 16) + \ ((u4Byte) (*(pHeader+IVOffset + 7)) << 24); - if(ACTING_AS_AP(Adapter)) + if(ACTING_AS_AP(Adapter)) { // AP mode. if(MacAddr_isMulticast(pTcb->DestinationAddress)) { @@ -2544,7 +2544,7 @@ SecSWTKIPEncryption( if(pEntry != NULL) TKIPGenerateKey(key, u4IV32, u2IV16, pMgntInfo->Bssid, pEntry->perSTAKeyInfo.TempEncKey); } - } + } else { // STA mode. TKIPGenerateKey(key, u4IV32, u2IV16, pTcb->SourceAddress, pSec->KeyBuf[SecGetTxKeyIdx(Adapter, pTcb->DestinationAddress)]); @@ -2558,7 +2558,7 @@ SecSWTKIPEncryption( //2004/09/14, kcwu, clear the Security Coalesce Buffer PlatformZeroMemory(pSec->SecBuffer, SW_ENCRYPT_BUF_SIZE); - + //2004/09/14, kcwu, to show how many buffers are there used by this fragment FragBufferCount = pTcb->FragBufCount[FragIndex]; @@ -2603,9 +2603,9 @@ SecSWTKIPEncryption( SecBufLen += SecLenForCopy; BufferIndex++; - //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", + //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", // FragBufferCount, SecBufLen, BufferIndex); - + } if(SecBufLen <= 0) @@ -2613,7 +2613,7 @@ SecSWTKIPEncryption( continue; } //PRINT_DATA("SecSWWEPEncryption_before_encrypted==>", SecBuffer, SecBufLen); - + EncodeWEP(key, 16, pSec->SecBuffer, @@ -2630,7 +2630,7 @@ SecSWTKIPEncryption( if(!TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { SecBufIndex = FragBufferIndexStart+1; - FragBufferCount = 1; + FragBufferCount = 1; } else { @@ -2643,7 +2643,7 @@ SecSWTKIPEncryption( // 2005.11.04, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) - { + { PlatformMoveMemory( pTcb->BufferList[SecBufIndex].VirtualAddress+(SpecificHeadOverhead+DataOffset), pSec->SecBuffer+SecBytesCopied, @@ -2665,8 +2665,8 @@ SecSWTKIPEncryption( SecBufIndex++; FragBufferCount++; } - - // Copy WEP ICV. + + // Copy WEP ICV. // 2005.11.04, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER) || pTcb->FragCount == 1) { @@ -2729,19 +2729,19 @@ SecSWWEPEncryption( IVOffset = sMacHdrLng; } DataOffset = IVOffset + WEP_IV_LEN; - + //2004/09/14, kcwu, the IV has been calculate, just get from current IV //wepIV.ul = (u4Byte) ((pSec->TxIV == 0)?0x00fffffe:((pSec->TxIV-1)&0x00ffffff)); SET_WEP_IV_INITVECTOR(&wepIV, *(UNALIGNED pu4Byte)(pHeader+IVOffset)); - + SET_WEP_IV_KEYID(& wepIV, pSec->DefaultTransmitKeyIdx); //PRINT_DATA("SecSWWEPEncryption==>", (pu1Byte)&wepIV, 4); - - PlatformMoveMemory(key, (pHeader+IVOffset), 3); - PlatformMoveMemory(key+3, pSec->KeyBuf[pSec->DefaultTransmitKeyIdx], + + PlatformMoveMemory(key, (pHeader+IVOffset), 3); + PlatformMoveMemory(key+3, pSec->KeyBuf[pSec->DefaultTransmitKeyIdx], (pSec->PairwiseEncAlgorithm==RT_ENC_ALG_WEP104)?13:5); for(FragIndex = 0; FragIndex < pTcb->FragCount; FragIndex++) @@ -2751,7 +2751,7 @@ SecSWWEPEncryption( //2004/09/14, kcwu, clear the Security Coalesce Buffer PlatformZeroMemory(pSec->SecBuffer, SW_ENCRYPT_BUF_SIZE); // 3000 -> 2000 to prevent stack overflow problem in Win98, 2005.03.15, by rcnjko. - + //2004/09/14, kcwu, to show how many buffers are there used by this fragment FragBufferCount = pTcb->FragBufCount[FragIndex]; @@ -2759,7 +2759,7 @@ SecSWWEPEncryption( if(!TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { BufferIndex = FragBufferIndexStart+1; - FragBufferCount--; // 2005.11.07, by rcnjko. + FragBufferCount--; // 2005.11.07, by rcnjko. } // Concatenate buffers to be encrypted into the buffer, SecBuffer. @@ -2789,14 +2789,14 @@ SecSWWEPEncryption( } PlatformMoveMemory( - pSec->SecBuffer + SecBufLen, // 2005.11.07, by rcnjko. + pSec->SecBuffer + SecBufLen, // 2005.11.07, by rcnjko. SecPtr, SecLenForCopy); SecBufLen += SecLenForCopy; BufferIndex++; - //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", + //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", // FragBufferCount, SecBufLen, BufferIndex); } @@ -2812,13 +2812,13 @@ SecSWWEPEncryption( SecBufLen, pSec->SecBuffer); //PRINT_DATA("SecSWWEPEncryption_after_encrypted==>", pSec->SecBuffer, SecBufLen+4); - + // For WEP ICV. SecBufLen += 4; SecBytesCopied = 0; - - // 2005.11.07, by rcnjko. + + // 2005.11.07, by rcnjko. if(!TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { SecBufIndex = FragBufferIndexStart+1; @@ -2832,9 +2832,9 @@ SecSWWEPEncryption( // //2004/09/14, then copy SecBuffer back to the buffer - // 2005.11.04, by rcnjko. + // 2005.11.04, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) - { + { PlatformMoveMemory( pTcb->BufferList[SecBufIndex].VirtualAddress+(SpecificHeadOverhead+DataOffset), pSec->SecBuffer+SecBytesCopied, @@ -2845,7 +2845,7 @@ SecSWWEPEncryption( FragBufferCount++; } // - + while(FragBufferCount < pTcb->FragBufCount[FragIndex]) { PlatformMoveMemory( @@ -2858,7 +2858,7 @@ SecSWWEPEncryption( FragBufferCount++; } - // Copy WEP ICV. + // Copy WEP ICV. // 2005.11.07, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { @@ -2872,7 +2872,7 @@ SecSWWEPEncryption( pTcb->FragLength[FragIndex] += pSec->EncryptionTailOverhead; pTcb->PacketLength += pSec->EncryptionTailOverhead; } - else + else { // For non-coalesce case, the WEP ICV cannot append to last buffer of the fragment directly, // because the buffer might belong to upper layer and we are NOT allow to change its length. @@ -2884,14 +2884,14 @@ SecSWWEPEncryption( pSec->EncryptionTailOverhead ); pTcb->Tailer.Length = pSec->EncryptionTailOverhead; - + pTcb->BufferList[pTcb->BufferCount] = pTcb->Tailer; pTcb->BufferCount++; - + pTcb->FragLength[FragIndex] += pSec->EncryptionTailOverhead; pTcb->FragBufCount[FragIndex]++; pTcb->PacketLength += pSec->EncryptionTailOverhead; - + SecBytesCopied += pSec->EncryptionTailOverhead; } else @@ -2926,7 +2926,7 @@ SecSWAESEncryption( u1Byte IVOffset; // Added by Annie, 2005-12-23. u1Byte DataOffset; // Added by Annie, 2005-12-23. PRT_WLAN_STA pEntry; - PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; + PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; OCTET_STRING frame; SpecificHeadOverhead = Adapter->TXPacketShiftBytes; @@ -2945,29 +2945,29 @@ SecSWAESEncryption( IVOffset = sMacHdrLng; } - // check address 4 + // check address 4 if( Frame_ValidAddr4(frame) ) { RT_TRACE( COMP_SEC , DBG_LOUD , ("====>ccw BT data SecSWAESEncryption \n") ); IVOffset += ETHERNET_ADDRESS_LENGTH; } - + DataOffset = IVOffset + EXT_IV_LEN; - if(ACTING_AS_AP(Adapter)) + if(ACTING_AS_AP(Adapter)) { if(MacAddr_isMulticast(pTcb->DestinationAddress)) { // TODO: - //keyidx = + //keyidx = } else { // TODO: - //keyidx = + //keyidx = } - } + } else { keyidx = SecGetTxKeyIdx(Adapter, pTcb->DestinationAddress); @@ -2980,7 +2980,7 @@ SecSWAESEncryption( //2004/09/14, kcwu, clear the Security Coalesce Buffer PlatformZeroMemory(pSec->SecBuffer, SW_ENCRYPT_BUF_SIZE); - + //2004/09/14, kcwu, to show how many buffers are there used by this fragment FragBufferCount = pTcb->FragBufCount[FragIndex]; @@ -3011,14 +3011,14 @@ SecSWAESEncryption( } PlatformMoveMemory( - pSec->SecBuffer + SecBufLen, // 2005.11.07, by rcnjko. + pSec->SecBuffer + SecBufLen, // 2005.11.07, by rcnjko. SecPtr, SecLenForCopy); SecBufLen += SecLenForCopy; BufferIndex++; - //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", + //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", // FragBufferCount, SecBufLen, BufferIndex); } @@ -3034,14 +3034,14 @@ SecSWAESEncryption( #endif if(pTcb->bTDLPacket) { - pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); - if(pEntry == NULL) + pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); + if(pEntry == NULL) return; - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) return; - + SecRSNAEncodeAESCCM( &Adapter->MgntInfo.SecurityInfo, (u4Byte *)pEntry->perSTAKeyInfo.AESKeyBuf, @@ -3079,17 +3079,17 @@ SecSWAESEncryption( //AP WPA AES, CCW else if( ACTING_AS_AP(Adapter) ) { // AP mode - - + + if(MacAddr_isMulticast(pTcb->DestinationAddress)) - {// Multicase packet , used AESGTK + {// Multicase packet , used AESGTK //RT_TRACE(COMP_WPAAES, DBG_LOUD, ("<===== AP WPA AES Multicase\n")); - //Check if set GTK was completed - if(Adapter->MgntInfo.globalKeyInfo.AESGTK[0] == 0) + //Check if set GTK was completed + if(Adapter->MgntInfo.globalKeyInfo.AESGTK[0] == 0) return; SecRSNAEncodeAESCCM( &Adapter->MgntInfo.SecurityInfo, - (u4Byte *)Adapter->MgntInfo.globalKeyInfo.AESGTK, + (u4Byte *)Adapter->MgntInfo.globalKeyInfo.AESGTK, pSec->GroupTransmitKeyIdx, pSec->SecBuffer, IVOffset, @@ -3100,15 +3100,15 @@ SecSWAESEncryption( else { // unitcase packet , used Entry Pairwise key //RT_TRACE(COMP_WPAAES, DBG_LOUD, ("<===== AP WPA AES unitcase\n")); - //Check if STA within associated lsit table - pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); - if(pEntry == NULL) + //Check if STA within associated lsit table + pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); + if(pEntry == NULL) return; - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) return; - + SecRSNAEncodeAESCCM( &Adapter->MgntInfo.SecurityInfo, (u4Byte *)pEntry->perSTAKeyInfo.AESKeyBuf, @@ -3122,7 +3122,7 @@ SecSWAESEncryption( } else { // RSNA-PSK mode - OCTET_STRING pduOS; + OCTET_STRING pduOS; pu1Byte pRA; pu1Byte pTA; u4Byte index; @@ -3141,16 +3141,16 @@ SecSWAESEncryption( // // TODO: remvoe our group key from PerStaDefKeyTable[] // - + //Multicast packet - //Find out Default KEY Entry + //Find out Default KEY Entry pDefKey = pSec->PerStaDefKeyTable; for( index = 0 ; index < MAX_NUM_PER_STA_KEY ; index++, pDefKey++) { if( pDefKey->Valid && (PlatformCompareMemory(pDefKey->MACAdrss , pTA, 6)==0)) break; } - + if(index != MAX_NUM_PER_STA_KEY) { RT_TRACE(COMP_RSNA, DBG_LOUD, ("DefaultTransmitKeyIdx: %d\n", pSec->DefaultTransmitKeyIdx)); @@ -3198,7 +3198,7 @@ SecSWAESEncryption( { // no key found! RT_PRINT_ADDR(COMP_RSNA, DBG_WARNING, ("SecSWAESEncryption(): No pairwse key found for pRA: \n"), pRA); } - } + } } // For AES MIC. SecBufLen += 8; @@ -3212,8 +3212,8 @@ SecSWAESEncryption( #endif SecBytesCopied = 0; - - // 2005.11.07, by rcnjko. + + // 2005.11.07, by rcnjko. if(!TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { SecBufIndex = FragBufferIndexStart+1; @@ -3240,7 +3240,7 @@ SecSWAESEncryption( FragBufferCount++; } // - + while(FragBufferCount < pTcb->FragBufCount[FragIndex]) { PlatformMoveMemory( @@ -3253,7 +3253,7 @@ SecSWAESEncryption( FragBufferCount++; } - // Copy AES MIC. + // Copy AES MIC. // 2005.11.07, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { @@ -3279,14 +3279,14 @@ SecSWAESEncryption( 8//pSec->EncryptionTailOverhead ); pTcb->Tailer.Length = 8;//pSec->EncryptionTailOverhead; - + pTcb->BufferList[pTcb->BufferCount] = pTcb->Tailer; pTcb->BufferCount++; - + pTcb->FragLength[FragIndex] += 8;//pSec->EncryptionTailOverhead; pTcb->FragBufCount[FragIndex]++; pTcb->PacketLength += 8;//pSec->EncryptionTailOverhead; - + SecBytesCopied += 8;//pSec->EncryptionTailOverhead; } else @@ -3355,8 +3355,8 @@ SecSWCKIPEncryption( else { IVOffset = sMacHdrLng; - } - DataOffset = IVOffset + WEP_IV_LEN; + } + DataOffset = IVOffset + WEP_IV_LEN; PlatformZeroMemory(pSec->SecBuffer, SW_ENCRYPT_BUF_SIZE); @@ -3405,9 +3405,9 @@ SecSWCKIPEncryption( SecBufLen += SecLenForCopy; BufferIndex++; - //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", + //DbgPrint("FragBufferCount = %d, SecBufLen = %d, BufferIndex = %d\n", // FragBufferCount, SecBufLen, BufferIndex); - + } if(SecBufLen <= 0) @@ -3426,7 +3426,7 @@ SecSWCKIPEncryption( if(!TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { SecBufIndex = FragBufferIndexStart+1; - FragBufferCount = 1; + FragBufferCount = 1; } else { @@ -3439,7 +3439,7 @@ SecSWCKIPEncryption( // 2005.11.04, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) - { + { PlatformMoveMemory( pTcb->BufferList[SecBufIndex].VirtualAddress+(SpecificHeadOverhead+DataOffset), pSec->SecBuffer+SecBytesCopied, @@ -3461,9 +3461,9 @@ SecSWCKIPEncryption( SecBufIndex++; FragBufferCount++; } - - - // Copy WEP ICV. + + + // Copy WEP ICV. // 2005.11.07, by rcnjko. if(TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) { @@ -3477,7 +3477,7 @@ SecSWCKIPEncryption( pTcb->FragLength[FragIndex] += pSec->EncryptionTailOverhead; pTcb->PacketLength += pSec->EncryptionTailOverhead; } - else + else { // For non-coalesce case, the WEP ICV cannot append to last buffer of the fragment directly, // because the buffer might belong to upper layer and we are NOT allow to change its length. @@ -3489,14 +3489,14 @@ SecSWCKIPEncryption( pSec->EncryptionTailOverhead ); pTcb->Tailer.Length = pSec->EncryptionTailOverhead; - + pTcb->BufferList[pTcb->BufferCount] = pTcb->Tailer; pTcb->BufferCount++; - + pTcb->FragLength[FragIndex] += pSec->EncryptionTailOverhead; pTcb->FragBufCount[FragIndex]++; pTcb->PacketLength += pSec->EncryptionTailOverhead; - + SecBytesCopied += pSec->EncryptionTailOverhead; } else @@ -3505,7 +3505,7 @@ SecSWCKIPEncryption( } } } - + } RT_TRACE( COMP_CKIP, DBG_TRACE, ("<== SecSWCKIPEncryption()\n") ); @@ -3514,7 +3514,7 @@ SecSWCKIPEncryption( // // Check IV increase -// +// // In Encrypt mode , IV is not increase ,and return FALSE. // RT_SEC_STATUS @@ -3538,7 +3538,7 @@ SecRxCheckIV( FillOctetString(Mpdu, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); DestAddr = Frame_pDaddr(Mpdu); bMulticastDest = MacAddr_isMulticast(DestAddr); - + if(!Frame_WEP(Mpdu)) { // Skip the non-encrypted frame, 2005.06.28, by rcnjko. return RT_SEC_STATUS_SUCCESS; @@ -3549,14 +3549,14 @@ SecRxCheckIV( SecGetEncryptionOverhead( Adapter, - &EncryptionMPDUHeadOverhead, - &EncryptionMPDUTailOverhead, - &EncryptionMSDUHeadOverhead, + &EncryptionMPDUHeadOverhead, + &EncryptionMPDUTailOverhead, + &EncryptionMSDUHeadOverhead, &EncryptionMSDUTailOverhead, TRUE, bMulticastDest); - MinEncPktSize = Frame_FrameHdrLng(Mpdu) + - EncryptionMPDUHeadOverhead + EncryptionMSDUHeadOverhead + + MinEncPktSize = Frame_FrameHdrLng(Mpdu) + + EncryptionMPDUHeadOverhead + EncryptionMSDUHeadOverhead + EncryptionMSDUTailOverhead + EncryptionMPDUTailOverhead; if(Mpdu.Length < MinEncPktSize) { // 061214, rcnjo: Discard invalid length frame to prevent memory access violation. @@ -3582,7 +3582,7 @@ SecRxCheckIV( { IVOffset = sMacHdrLng; } - + if(pRfd->Status.bContainHTC) IVOffset += sHTCLng; @@ -3594,17 +3594,17 @@ SecRxCheckIV( u4Byte TempIV = 0; // Get IV - TempIV = (((u4Byte)( Mpdu.Octet[IVOffset] )) << 16 ) + + TempIV = (((u4Byte)( Mpdu.Octet[IVOffset] )) << 16 ) + (((u4Byte)( Mpdu.Octet[IVOffset+1] )) << 8 ) + (((u4Byte)( Mpdu.Octet[IVOffset+2] )) << 0 ); - // Check IV + // Check IV // The 2 situations are not IV replay: (1) current IV of Pkt is greater than the rx IV (2) the current pkt is retry and IV is the same if(TempIV > pSec->RXUntiIV || (Frame_Retry(Mpdu) && pSec->RXUntiIV == TempIV)) pSec->RXUntiIV = TempIV; else secStatus = RT_SEC_STATUS_DATA_UNICAST_IV_REPLAY; - + } break; @@ -3618,7 +3618,7 @@ SecRxCheckIV( // Get u2IV16 and u4IV32. u2IV16 = ((u2Byte)(*(Mpdu.Octet+IVOffset + 0)) << 8)+ \ ((u2Byte)(*(Mpdu.Octet+IVOffset + 2)) << 0); - + u4IV32 = ((u4Byte) (*(Mpdu.Octet+IVOffset + 4)) << 0)+ \ ((u4Byte) (*(Mpdu.Octet+IVOffset + 5)) << 8)+ \ ((u4Byte) (*(Mpdu.Octet+IVOffset + 6)) << 16)+ \ @@ -3642,7 +3642,7 @@ SecRxCheckIV( pSec->RXUntiIV = TempIV; else secStatus = RT_SEC_STATUS_DATA_UNICAST_IV_REPLAY; - } + } } break; @@ -3663,7 +3663,7 @@ SecRxCheckIV( case RT_ENC_ALG_AESCCMP: CountRxCCMPRelpayStatistics(Adapter, pRfd); break; - + default: //for MacOSX Compiler warning. break; } @@ -3680,13 +3680,13 @@ SecRxCheckIV( case RT_ENC_ALG_AESCCMP: CountRxMgntCCMPRelpayStatistics(Adapter, pRfd); break; - + default: //for MacOSX Compiler warning. - break; + break; } } } - + return secStatus; } @@ -3722,7 +3722,7 @@ SecSoftwareDecryption( if(!pRfd->bRxBTdata) { if(!eqMacAddr(Frame_pBssid(Mpdu), Adapter->MgntInfo.Bssid)) - { + { // RT_PRINT_ADDR(COMP_SEC, DBG_WARNING, "Mismatched BSSID (RT_SEC_STATUS_UNKNOWN_TA):\nFrame_pBssid: ", Frame_pBssid(Mpdu)); // RT_PRINT_ADDR(COMP_SEC, DBG_WARNING, "MgntInfo.Bssid: ", Adapter->MgntInfo.Bssid); secStatus = RT_SEC_STATUS_UNKNOWN_TA; @@ -3732,14 +3732,14 @@ SecSoftwareDecryption( SecGetEncryptionOverhead( Adapter, - &EncryptionMPDUHeadOverhead, - &EncryptionMPDUTailOverhead, - &EncryptionMSDUHeadOverhead, + &EncryptionMPDUHeadOverhead, + &EncryptionMPDUTailOverhead, + &EncryptionMSDUHeadOverhead, &EncryptionMSDUTailOverhead, TRUE, bMulticastDest); - MinEncPktSize = Frame_FrameHdrLng(Mpdu) + - EncryptionMPDUHeadOverhead + EncryptionMSDUHeadOverhead + + MinEncPktSize = Frame_FrameHdrLng(Mpdu) + + EncryptionMPDUHeadOverhead + EncryptionMSDUHeadOverhead + EncryptionMSDUTailOverhead + EncryptionMPDUTailOverhead; if(Mpdu.Length < MinEncPktSize) { // 061214, rcnjo: Discard invalid length frame to prevent memory access violation. @@ -3805,7 +3805,7 @@ SecSoftwareDecryption( RT_TRACE(COMP_RECV, DBG_TRACE, ("SecSoftwareDecryption:() CountRxDecryptErrorStatistics\n")); CountRxDecryptErrorStatistics(Adapter, pRfd); - + switch(DecryptAlgorithm) { case RT_ENC_ALG_WEP104: @@ -3835,7 +3835,7 @@ SecSoftwareDecryption( break; } else - CountRxDecryptSuccessStatistics(Adapter, pRfd); + CountRxDecryptSuccessStatistics(Adapter, pRfd); if(RT_SEC_STATUS_SUCCESS != secStatus) break; @@ -3847,7 +3847,7 @@ SecSoftwareDecryption( // driver but not HW. So these packets are indicated to the upper layer. // By Bruce, 2009-10-14. // - + secStatus = SecRxCheckIV(Adapter, pRfd); switch(secStatus) @@ -3864,7 +3864,7 @@ SecSoftwareDecryption( break; } }while(FALSE); - + return secStatus; } @@ -3893,14 +3893,14 @@ SecSWAESDecryption( if( pRfd->Status.bContainHTC) IVOffset += sHTCLng; - // check address 4 + // check address 4 if( Frame_ValidAddr4(frame) ) { IVOffset += ETHERNET_ADDRESS_LENGTH; } - + IVKeyIdOffset = IVOffset + 3; - + keyidx = SecGetRxKeyIdx( Adapter, pRfd->Buffer.VirtualAddress+4, @@ -3910,19 +3910,19 @@ SecSWAESDecryption( if(pRfd->bTDLPacket) { pu1Byte pTA; - OCTET_STRING pduOS; + OCTET_STRING pduOS; FillOctetString(pduOS, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); pTA = Frame_Addr2(pduOS); - - pEntry = AsocEntry_GetEntry(pMgntInfo, pTA); - if(pEntry == NULL) + + pEntry = AsocEntry_GetEntry(pMgntInfo, pTA); + if(pEntry == NULL) return FALSE; - //Check if set PTK was completed + //Check if set PTK was completed if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) return FALSE; - + micOK = SecDecodeAESCCM( &Adapter->MgntInfo.SecurityInfo, (u4Byte *)pEntry->perSTAKeyInfo.AESKeyBuf, @@ -3958,25 +3958,25 @@ SecSWAESDecryption( pRfd->PacketLength ); } - - + + } else if( ACTING_AS_AP(Adapter) ) { pu1Byte pTA; - OCTET_STRING pduOS; + OCTET_STRING pduOS; FillOctetString(pduOS, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); pTA = Frame_Addr2(pduOS); - - pEntry = AsocEntry_GetEntry(pMgntInfo, pTA); - if(pEntry == NULL) + + pEntry = AsocEntry_GetEntry(pMgntInfo, pTA); + if(pEntry == NULL) return FALSE; - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.AESKeyBuf[0] == 0) return FALSE; - + micOK = SecDecodeAESCCM( &Adapter->MgntInfo.SecurityInfo, (u4Byte *)pEntry->perSTAKeyInfo.AESKeyBuf, @@ -3987,7 +3987,7 @@ SecSWAESDecryption( } else { - OCTET_STRING pduOS; + OCTET_STRING pduOS; pu1Byte pRA; pu1Byte pTA; u4Byte index; @@ -4006,7 +4006,7 @@ SecSWAESDecryption( PPER_STA_DEFAULT_KEY_ENTRY pDefKey; // Add by CCW //Multicast packet - //Find out Default KEY Entry + //Find out Default KEY Entry pDefKey = pSec->PerStaDefKeyTable; for( index = 0 ; index < MAX_NUM_PER_STA_KEY ; index++, pDefKey++) { @@ -4062,10 +4062,10 @@ SecSWAESDecryption( } - } + } RT_TRACE(COMP_RSNA, DBG_LOUD, (" micOK : %x\n", micOK)); } - + return micOK?TRUE:FALSE; } @@ -4104,11 +4104,11 @@ SecSWTKIPDecryption( IVKeyIdOffset = IVOffset + KEYID_POS_IN_IV; // Get Key Index. - keyidx = SecGetRxKeyIdx(Adapter, pHeader+4, ((pHeader[IVKeyIdOffset]>>6)&0x03) ); + keyidx = SecGetRxKeyIdx(Adapter, pHeader+4, ((pHeader[IVKeyIdOffset]>>6)&0x03) ); PlatformMoveMemory(SrcAddr, pHeader+10, ETHERNET_ADDRESS_LENGTH); - if(ACTING_AS_AP(Adapter)) + if(ACTING_AS_AP(Adapter)) { if(MacAddr_isMulticast(SrcAddr)) { @@ -4116,7 +4116,7 @@ SecSWTKIPDecryption( // It's better to modify it by GTK length if we use PRF-X to generate GTK later. 2005-12-23. // - //Check if set GTK was completed + //Check if set GTK was completed if(Adapter->MgntInfo.globalKeyInfo.GTK[0] == 0) { //RT_TRACE( COMP_AP, DBG_LOUD, ("SecSWTKIPDecryption(): GTK[0] == 0\n") ); @@ -4125,25 +4125,25 @@ SecSWTKIPDecryption( } else { - //Check if STA within associated lsit table - pEntry = AsocEntry_GetEntry(pMgntInfo, SrcAddr); - if(pEntry == NULL) - return FALSE; - - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.TempEncKey == NULL) + //Check if STA within associated lsit table + pEntry = AsocEntry_GetEntry(pMgntInfo, SrcAddr); + if(pEntry == NULL) + return FALSE; + + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.TempEncKey == NULL) return FALSE; } } else if(pRfd->bTDLPacket) { - //Check if STA within associated lsit table - pEntry = AsocEntry_GetEntry(pMgntInfo, SrcAddr); - if(pEntry == NULL) - return FALSE; - - //Check if set PTK was completed - if(pEntry->perSTAKeyInfo.TempEncKey == NULL) + //Check if STA within associated lsit table + pEntry = AsocEntry_GetEntry(pMgntInfo, SrcAddr); + if(pEntry == NULL) + return FALSE; + + //Check if set PTK was completed + if(pEntry->perSTAKeyInfo.TempEncKey == NULL) return FALSE; } @@ -4151,13 +4151,13 @@ SecSWTKIPDecryption( // Get u2IV16 and u4IV32. u2IV16 = ((u2Byte)(*(pHeader+IVOffset + 0)) << 8)+ \ ((u2Byte)(*(pHeader+IVOffset + 2)) << 0); - + u4IV32 = ((u4Byte) (*(pHeader+IVOffset + 4)) << 0)+ \ ((u4Byte) (*(pHeader+IVOffset + 5)) << 8)+ \ ((u4Byte) (*(pHeader+IVOffset + 6)) << 16)+ \ ((u4Byte) (*(pHeader+IVOffset + 7)) << 24); -#if 1 //Added by Jay 0712 for security IV +#if 1 //Added by Jay 0712 for security IV if( ACTING_AS_AP(Adapter) ) // Added by Annie. We should not enter here when STA mode. 2005-07-21. { u8Byte tempIV = 0; @@ -4173,7 +4173,7 @@ SecSWTKIPDecryption( //RT_TRACE(COMP_SEC, DBG_LOUD, ("Error: pEntry->perSTAKeyInfo.RxIV = 0x%16"i64fmt"x\n", pEntry->perSTAKeyInfo.RxIV)); //Process IV Error... - } + } else { // Prefast warning C6011: Dereferencing NULL pointer 'pEntry'. @@ -4220,10 +4220,10 @@ SecSWTKIPDecryption( } } } -#endif +#endif - if(ACTING_AS_AP(Adapter)) + if(ACTING_AS_AP(Adapter)) { // AP Mode. if(MacAddr_isMulticast(SrcAddr)) { @@ -4234,7 +4234,7 @@ SecSWTKIPDecryption( if(pEntry != NULL) TKIPGenerateKey(key, u4IV32, u2IV16, SrcAddr, pEntry->perSTAKeyInfo.TempEncKey); } - } + } else if(pRfd->bTDLPacket) { // Prefast warning C6011: Dereferencing NULL pointer 'pEntry' @@ -4276,7 +4276,7 @@ SecSWTKIPDecryption( } RT_TRACE(COMP_SEC, DBG_LOUD,("Rx:TKIP OK\n")); return TRUE; - + } BOOLEAN SecSWWEPDecryption( @@ -4294,7 +4294,7 @@ SecSWWEPDecryption( pu1Byte pHeader = pRfd->Buffer.VirtualAddress; //Fix SW WEP descryption multicase fail. 2009,12,08 - + u2Byte EncryptionMPDUHeadOverhead, EncryptionMPDUTailOverhead; u2Byte EncryptionMSDUHeadOverhead, EncryptionMSDUTailOverhead; @@ -4309,12 +4309,12 @@ SecSWWEPDecryption( if( pSec->SecLvl == RT_SEC_LVL_NONE ) bMulticastDest = FALSE; - + SecGetEncryptionOverhead( Adapter, - &EncryptionMPDUHeadOverhead, - &EncryptionMPDUTailOverhead, - &EncryptionMSDUHeadOverhead, + &EncryptionMPDUHeadOverhead, + &EncryptionMPDUTailOverhead, + &EncryptionMSDUHeadOverhead, &EncryptionMSDUTailOverhead, TRUE, bMulticastDest @@ -4323,7 +4323,7 @@ SecSWWEPDecryption( if( !bMulticastDest ) TempALg = pSec->PairwiseEncAlgorithm; else - TempALg = pSec->GroupEncAlgorithm; + TempALg = pSec->GroupEncAlgorithm; // Get offset. Annie, 2005-12-23. if( pRfd->Status.bIsQosData ) @@ -4337,13 +4337,13 @@ SecSWWEPDecryption( if(pRfd->Status.bContainHTC) IVOffset += sHTCLng; - + // Get IV. (Because 802.11 and key both are little endian) PlatformMoveMemory(key, pHeader+IVOffset , 3); // Prepare Key. - keyidx = GET_WEP_IV_KEYID(pHeader+IVOffset); - keysize = (TempALg==RT_ENC_ALG_WEP104) ? 16 : 8; + keyidx = GET_WEP_IV_KEYID(pHeader+IVOffset); + keysize = (TempALg==RT_ENC_ALG_WEP104) ? 16 : 8; PlatformMoveMemory(key+3, pSec->KeyBuf[keyidx], keysize-3); // Set up input data. @@ -4388,10 +4388,10 @@ SecSWCKIPDecryption( } if(pRfd->Status.bContainHTC) IVOffset += sHTCLng; - - //Get IV + + //Get IV keyidx= GET_WEP_IV_KEYID( pHeader+IVOffset); - + DEcok = DecodeCKIP( Adapter , (UCHAR *)pHeader , pRfd->PacketLength , pSec->pCkipPara->CKIPKeyBuf[keyidx] , keyidx ); RT_TRACE( COMP_CKIP, DBG_LOUD, ("SecSWCKIPDecryption(): DEcok=0x%X\n", DEcok) ); @@ -4404,10 +4404,10 @@ SecSWCKIPDecryption( // Used for deny link to MIC failure AP in 60 seconds. // 2004.10.06, by rcnjo. // -BOOLEAN +BOOLEAN SecInsertDenyBssidList ( PRT_SECURITY_T pSec, - u1Byte BssidToDeny[6], + u1Byte BssidToDeny[6], u8Byte DenyStartTime ) { @@ -4436,7 +4436,7 @@ SecInsertDenyBssidList ( if(pBssidToDeny == NULL) { // Use the oldest one. - pBssidToDeny = pSec->DenyBssidList + EarlyestIdx; + pBssidToDeny = pSec->DenyBssidList + EarlyestIdx; } PlatformMoveMemory(pBssidToDeny->Bssid, BssidToDeny, 6); @@ -4451,7 +4451,7 @@ SecInsertDenyBssidList ( // Used for deny link to MIC failure AP in 60 seconds. // 2004.10.06, by rcnjo. // -BOOLEAN +BOOLEAN SecIsInDenyBssidList ( PRT_SECURITY_T pSec, u1Byte BssidToCheck[6] @@ -4459,17 +4459,17 @@ SecIsInDenyBssidList ( { BOOLEAN bToDeny = FALSE; PRT_DENY_BSSID pBssidToDeny; - u8Byte CurrTime = PlatformGetCurrentTime(); + u8Byte CurrTime = PlatformGetCurrentTime(); int i; for(i = 0; i < MAX_DENY_BSSID_LIST_CNT; i++) { - pBssidToDeny = pSec->DenyBssidList + i; + pBssidToDeny = pSec->DenyBssidList + i; if(pBssidToDeny->bUsed) { // Check StartTime. if((CurrTime - pBssidToDeny->StartTime) < MIC_CHECK_TIME) // Diff < 60 seconds. - { + { // Check BSSID. if( PlatformCompareMemory(pBssidToDeny->Bssid, BssidToCheck, 6) == 0 ) { // The same BSSID. @@ -4491,13 +4491,13 @@ SecIsInDenyBssidList ( // // Desription: -// Fill up WEP bit and IV of each fragment in the TCB if necessary. +// Fill up WEP bit and IV of each fragment in the TCB if necessary. // Output: // 1. Return TRUE if this packet has to be encrypted. // 2. Set up pTcb->EncInfo. // 2005.06.27, by rcnjo. // -BOOLEAN +BOOLEAN SecFillHeader( PADAPTER Adapter, PRT_TCB pTcb) @@ -4514,7 +4514,7 @@ SecFillHeader( if(WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_NOTSETENCMACHEADER, 0)) return FALSE; - + if(!bEncrypt) { RT_TRACE( COMP_CKIP, DBG_TRACE, ("SecFillHeader(): !bEncrypt => return FALSE!\n")); @@ -4530,10 +4530,10 @@ SecFillHeader( pFrame = (pu1Byte)&pTcb->BufferList[i].VirtualAddress[Adapter->TXPacketShiftBytes]; - // WEP bit. + // WEP bit. SET_80211_HDR_WEP(pFrame, 1); - // IV. + // IV. SecHeaderFillIV(Adapter, pFrame); } @@ -4622,7 +4622,7 @@ SecIsEAPOLKEYPacket( } // 888e && Type is Key - if( (pPduOS->Octet[Offset_TypeEAPOL]==0x88) && (pPduOS->Octet[Offset_TypeEAPOL+1]==0x8e) + if( (pPduOS->Octet[Offset_TypeEAPOL]==0x88) && (pPduOS->Octet[Offset_TypeEAPOL+1]==0x8e) && (pPduOS->Octet[Offset_TypeEAPOL+3]==0x03) ) { IsEAPOLKeyPkt = TRUE; @@ -4666,7 +4666,7 @@ SecSetPMKID( pSecInfo->PMKIDList[ulIndex].bUsed = FALSE; PlatformZeroMemory(pSecInfo->PMKIDList[ulIndex].Bssid, sizeof(pSecInfo->PMKIDList[ulIndex].Bssid)); pSecInfo->PMKIDList[ulIndex].Ssid.Length = 0; - + } return; } @@ -4713,7 +4713,7 @@ SecSetPMKID( pBssidInfo ++; // pointer to next BSSID_INFO. continue; } - else + else { // Find a new entry for( j=0 ; jPMKIDList[ulIndex].Bssid, 6); RT_PRINT_DATA( COMP_SEC, DBG_LOUD, "PMKID", pSecInfo->PMKIDList[ulIndex].PMKID, sizeof(pBssidInfo->PMKID)); } - } + } } @@ -4815,9 +4815,9 @@ SecCatPMKID( int iEntry = 0; BOOLEAN bCCX8021xenable = FALSE; BOOLEAN bAPSuportCCKM = FALSE; - + u1Byte BIPOui[4] = {0x00, 0x0f , 0xac , 0x06}; - + // Note: PMKID can only be included in (Re)Association. if( ACTING_AS_AP(Adapter) || pMgntInfo->mIbss ) { @@ -4830,15 +4830,15 @@ SecCatPMKID( if(WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPISUPPORT, 0) && pSecInfo->SecLvl == RT_SEC_LVL_WAPI) return; - + // // CCKM mode return. // Note: - // Putting PMKID and CCKM together in the reassociation request must confuse the AP and + // Putting PMKID and CCKM together in the reassociation request must confuse the AP and // make it no response after reassociation request packet. // CCX_QueryCCKMSupport(Adapter, &bCCX8021xenable, &bAPSuportCCKM); - + if( bCCX8021xenable && bAPSuportCCKM) { return; @@ -4852,12 +4852,12 @@ SecCatPMKID( { RT_TRACE( COMP_SEC, DBG_LOUD, ("SecCatPMKID(): AP is not in current PMKID List => do nothing.\n") ); - // Check Need to add MFP IE or not !! + // Check Need to add MFP IE or not !! if( pBssDesc->bMFPC && pMgntInfo->bInBIPMFPMode) { pIECurrent = pSecInfo->RSNIE.Octet + pSecInfo->RSNIE.Length - 2; // Point to RSN Capablite SET_RSN_CAP_MFP_CAPABLE(pIECurrent , 1 ); - + if( pBssDesc->bMFPR ) { // Removed by Bruce, 2014-12-08. @@ -4867,11 +4867,11 @@ SecCatPMKID( // allow MFP-capable STA to associate. Access points not supporting MFP capability will fail association. If MFPR is set by an access point // and STA is not MFP capable, Windows 8 will treat the network as mismatched in capability and not send an association request to the // miniport. http://msdn.microsoft.com/en-us/library/windows/hardware/ff547688(v=vs.85).aspx - // + // // SET_RSN_IE_CAP_MFP_REQUIRED(pIECurrent, 1); } pIECurrent += 2; - + if( pBssDesc->bMFPBIP ) { // Add PMKID counter = 0x00 0x00 @@ -4893,7 +4893,7 @@ SecCatPMKID( // pIECurrent = pSecInfo->RSNIE.Octet + pSecInfo->RSNIE.Length; ((PDOT11_RSN_IE_PMKID)pIECurrent)->SuiteCount = NUM_CAT_PMKID; // NUM_CAT_PMKID=1 - CopyMem( ((PDOT11_RSN_IE_PMKID)pIECurrent)->PMKList, + CopyMem( ((PDOT11_RSN_IE_PMKID)pIECurrent)->PMKList, pSecInfo->PMKIDList[iEntry].PMKID, sizeof(pSecInfo->PMKIDList[iEntry].PMKID) ); @@ -4904,7 +4904,7 @@ SecCatPMKID( // Note : 802.11w sample RSN PMK and BIP support at same time !! // - // Check Need to add MFP IE or not !! + // Check Need to add MFP IE or not !! if( pBssDesc->bMFPC && pMgntInfo->bInBIPMFPMode ) { pIECurrent = pIECurrent - 2; // Point to RSN Capablite @@ -4914,7 +4914,7 @@ SecCatPMKID( { SET_RSN_CAP_MFP_REQUIRED(pIECurrent, 1); } - + pIECurrent = pSecInfo->RSNIE.Octet + pSecInfo->RSNIE.Length; if( pBssDesc->bMFPBIP ) @@ -4934,7 +4934,7 @@ SecCatPMKID( // If there is no key when security enabled, drop data frames. // Added by Annie, 2006-08-15. // -BOOLEAN +BOOLEAN SecDropForKeyAbsent( PADAPTER Adapter, PRT_TCB pTcb @@ -4967,13 +4967,13 @@ SecDropForKeyAbsent( { return bDrop; } - + if( pTcb->EncInfo.SecProtInfo == RT_SEC_NORMAL_DATA ) { // Data frame, not EAPOL packet. if(RT_STATUS_SUCCESS == WAPI_SecFuncHandler(WAPI_DROPFORSECKEYABSENT,Adapter, (PVOID)pRa, WAPI_END)) bDrop = TRUE; - + if( pSecInfo->SecLvl > RT_SEC_LVL_NONE ) { // WPA or WPA2. if( MacAddr_isMulticast(pRa) ) @@ -5044,10 +5044,10 @@ SecSetSwEncryptionDecryption( // Print an warning message. if (pSec->RegSWTxEncryptFlag != bSWTxEncrypt) { - RT_TRACE(COMP_SEC, DBG_WARNING, + RT_TRACE(COMP_SEC, DBG_WARNING, ("SecSetSwEncryptionDecryption(): Warning! User and driver determined encryption mechanism mismatch.\n")); - RT_TRACE(COMP_SEC, DBG_WARNING, - ("SecSetSwEncryptionDecryption(): RegSWTxEncryptFlag = %d, bSWTxEncrypt = %d\n", + RT_TRACE(COMP_SEC, DBG_WARNING, + ("SecSetSwEncryptionDecryption(): RegSWTxEncryptFlag = %d, bSWTxEncrypt = %d\n", pSec->RegSWTxEncryptFlag, bSWTxEncrypt)); } @@ -5072,7 +5072,7 @@ SecSetSwEncryptionDecryption( { RT_TRACE(COMP_SEC, DBG_WARNING, ("SecSetSwEncryptionDecryption(): Warning! User and driver determined decryption mechanism mismatch.\n")); - RT_TRACE(COMP_SEC, DBG_WARNING, + RT_TRACE(COMP_SEC, DBG_WARNING, ("SecSetSwEncryptionDecryption(): RegSWRxDecryptFlag = %d, bSWRxDecrypt = %d\n", pSec->RegSWRxDecryptFlag, bSWRxDecrypt)); } @@ -5106,7 +5106,7 @@ SecIsTxKeyInstalled( return FALSE; } else - { + { return FALSE; } } @@ -5117,7 +5117,7 @@ SecIsTxKeyInstalled( pSecInfo->KeyLen[1] == 0 && pSecInfo->KeyLen[2] == 0 && pSecInfo->KeyLen[3] == 0 && - pSecInfo->KeyLen[4] == 0 + pSecInfo->KeyLen[4] == 0 && 0 == WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_ISCAMUSED, 0) ) { @@ -5129,7 +5129,7 @@ SecIsTxKeyInstalled( if(!ACTING_AS_AP(pAdapter) && pSecInfo->SecLvl > RT_SEC_LVL_NONE ) { // - // Check Tx key + // Check Tx key // Note: // This is special case for WPA-2 (RSN). // When the CCX service (supplicant) receives the ANoce packet in the 1st packet of 4-way, @@ -5139,7 +5139,7 @@ SecIsTxKeyInstalled( // We find this behavior of CCX service in the CCX SDK version 1.1.13. // Advised from CCW, and edited by Bruce, 2009-09-04. // - if( pSecInfo->KeyLen[0] == 0 + if( pSecInfo->KeyLen[0] == 0 && 0 == WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_ISCAMUSED, 0) ) { @@ -5147,7 +5147,7 @@ SecIsTxKeyInstalled( return FALSE; } } - + return TRUE; } } @@ -5160,7 +5160,7 @@ SecIsTxKeyInstalled( PPER_STA_MPAKEY_ENTRY pMapKey; for( index = 0 ; index < MAX_NUM_PER_STA_KEY ; index++) - { + { pMapKey = &(pSecInfo->MAPKEYTable[index]); if( pMapKey->Valid && eqMacAddr(pMapKey->MACAdrss , pRA) ) @@ -5197,7 +5197,7 @@ SecIsTxKeyInstalled( // Description: // Descrypt the mgnt frame by SW and check if this packet is valid. // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - // The Rx buffer and information. @@ -5218,7 +5218,7 @@ SecSWMFPDecryption( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_SECURITY_T pSec = &(pMgntInfo->SecurityInfo); RT_SEC_STATUS secStatus = RT_SEC_STATUS_SUCCESS; - + if(RT_SEC_STATUS_SUCCESS != (secStatus = SecSoftwareDecryption(pAdapter, pRfd))) { switch(pSec->PairwiseEncAlgorithm) @@ -5230,20 +5230,20 @@ SecSWMFPDecryption( case RT_ENC_ALG_AESCCMP: CountRxMgntCCMPDecryptErrorsStatistics(pAdapter, pRfd); break; - + default: //for MacOSX Compiler warning. - break; + break; } - + RT_TRACE(COMP_SEC , DBG_WARNING , ("SecSWMFPDecryption(): Fail (0x%08X) MFP packe decrypt !!\n", secStatus) ); return secStatus; } else if( pMgntInfo->bInBIPMFPMode) - { // 802.11 MFP + { // 802.11 MFP OCTET_STRING frame; - + FillOctetString(frame, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); - + // Remove IV, but we haven't remove MIC if(frame.Length > (sMacHdrLng + pMgntInfo->SecurityInfo.EncryptionHeadOverhead)) { @@ -5260,19 +5260,19 @@ SecSWMFPDecryption( return RT_SEC_STATUS_INVALID_PKT_LEN; } } - + else { OCTET_STRING frame; - - FillOctetString(frame, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); + + FillOctetString(frame, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); // Check MHDR IE for TKIP... if(pSec->PairwiseEncAlgorithm == RT_ENC_ALG_TKIP) { // Remove the ICV so that we can caculate the MIC. MAKE_RFD_OFFSET_AT_BACK(pRfd, pMgntInfo->SecurityInfo.EncryptionTailOverhead); - + // Check the length is valid including MHDRIE and MIC if(frame.Length < (sMacHdrLng + pMgntInfo->SecurityInfo.EncryptionHeadOverhead + 2 + CCX_MFP_TKIP_MHDR_IE_LEN + TKIP_MIC_LEN)) // MHDRIE (2 + 12) + MIC (8) return RT_SEC_STATUS_INVALID_PKT_LEN; @@ -5292,7 +5292,7 @@ SecSWMFPDecryption( return RT_SEC_STATUS_MGNT_MIC_FAILURE; } } - + // Remove IV, but we haven't remove MIC and MHDR IE if(frame.Length > (sMacHdrLng + pMgntInfo->SecurityInfo.EncryptionHeadOverhead)) { @@ -5302,7 +5302,7 @@ SecSWMFPDecryption( // Clear the WEP bit because we have removed the IV field. SET_80211_HDR_WEP(pRfd->Buffer.VirtualAddress, 0); - + } else { @@ -5319,12 +5319,12 @@ SecSWMFPDecryption( // Description: // Handle 802.11w BIP MIC . // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - // The Rx buffer and information. // Return: -// RT_SEC_STATUS_SUCCESS if MIC and MMIE are OK , and otherwise if any error(this packet should be dropped and Do nothing !!). +// RT_SEC_STATUS_SUCCESS if MIC and MMIE are OK , and otherwise if any error(this packet should be dropped and Do nothing !!). // RT_SEC_STATUS @@ -5345,9 +5345,9 @@ SecCheckMMIE( PMMIE_STRUC pMMIE = NULL; u1Byte index = 0; - + FillOctetString(frame, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); - + if( frame.Length > 256 || frame.Length < 18 ) return RT_SEC_STATUS_MFP_MGNT_LEN_FAILURE; @@ -5361,8 +5361,8 @@ SecCheckMMIE( { return RT_SEC_STATUS_MFP_MGNT_MMIE_FAILURE; } - - // Get MMIE + + // Get MMIE pMMIE = (PMMIE_STRUC)( frame.Octet + frame.Length - 18 ); @@ -5371,7 +5371,7 @@ SecCheckMMIE( RT_PRINT_DATA(COMP_SEC, DBG_WARNING, "[WARNING] Skip this frame because we received the same IPN = \n", pMMIE->IPN, 6); return RT_SEC_STATUS_MGNT_IV_REPLAY; } - // Check PN + // Check PN for( index = 0 ; index < 6 ; index++ ) { if(pMMIE->IPN[5 - index] > pSec->IPN[5- index]) @@ -5385,8 +5385,8 @@ SecCheckMMIE( else continue; } - - // Constr ADD | frame body + + // Constr ADD | frame body PlatformZeroMemory( PlantData , 256 ); PlatformMoveMemory( pCurrent , frame.Octet , 2 ); // FC // Reset Retry , PW_MGN and MORE bit @@ -5394,12 +5394,12 @@ SecCheckMMIE( SET_80211_HDR_PWR_MGNT(PlantData, 0); SET_80211_HDR_MORE_DATA(PlantData, 0); pCurrent += 2; - + // A1 , A2 and A3 PlatformMoveMemory( pCurrent , frame.Octet + 4 , 18 ); pCurrent += 18; - // Frame body + // Frame body PlatformMoveMemory( pCurrent , frame.Octet + 24 , frame.Length - 24 ); // PlantData length = AAD + PacketLen - Hardlen @@ -5410,7 +5410,7 @@ SecCheckMMIE( RT_PRINT_DATA(COMP_SEC , DBG_LOUD , " PlantData :\n" , PlantData , PlantDataLen); - // Calculate MIC + // Calculate MIC AES_CMAC_1W( PlantData , PlantDataLen , pSec->BIPKeyBuffer , 16 , Micdata , &MACTextLength); // Compare MIC @@ -5431,12 +5431,12 @@ SecCheckMMIE( // Description: // Handle Rx Packet encryption status and descrypt it if need. // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pRfd - // The Rx buffer and information. // Return: -// RT_SEC_STATUS_SUCCESS if this packet is descrypted successfully, and otherwise if any error(this packet should be dropped). +// RT_SEC_STATUS_SUCCESS if this packet is descrypted successfully, and otherwise if any error(this packet should be dropped). // By Bruce, 2009-10-15. // RT_SEC_STATUS @@ -5494,7 +5494,7 @@ SecRxDescryption( else // Unicast { if(CCX_IS_MFP_ENABLED(pAdapter)) - { + { // Do nothing. } else if(pMgntInfo->bInBIPMFPMode) @@ -5528,14 +5528,14 @@ SecRxDescryption( case RT_ENC_ALG_AESCCMP: CountRxMgntCCMPNoEncryptStatistics(pAdapter, pRfd); break; - + default: //for MacOSX Compiler warning. - break; + break; } RT_PRINT_DATA(COMP_SEC, DBG_WARNING, "[WARNING] Received mgnt frame without protection bit\n", frame.Octet, frame.Length); return RT_SEC_STATUS_MGNT_FRAME_UNENCRYPT; } - } + } return RT_SEC_STATUS_SUCCESS; } @@ -5544,17 +5544,17 @@ SecRxDescryption( if(IsMgntFrame(frame.Octet)) { // Open Share Key mode, we do not handle this condition here. - if( IsMgntAuth(frame.Octet) && + if( IsMgntAuth(frame.Octet) && (pSec->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || pSec->PairwiseEncAlgorithm == RT_ENC_ALG_WEP104)) { return SecSoftwareDecryption(pAdapter, pRfd); } if(!eqMacAddr(pMgntInfo->Bssid, Frame_Addr3(frame))) - return RT_SEC_STATUS_SUCCESS; + return RT_SEC_STATUS_SUCCESS; // - // 802.11 MFP AES + // 802.11 MFP AES // if(pMgntInfo->bInBIPMFPMode || CCX_IS_MFP_ENABLED(pAdapter)) { @@ -5570,21 +5570,21 @@ SecRxDescryption( { RT_TRACE(COMP_SEC, DBG_WARNING, ("SecRxDescryption(): Error!!! Receive Mgnt Frame with WEP bit (Not support)!")); return RT_SEC_STATUS_PKT_TYPE_NOT_SUPPORT; - } - + } + return secStatus; } //3 // Data packet. if(IsDataFrame(frame.Octet)) - { + { if(pSec->SWRxDecryptFlag) { if(pMgntInfo->SafeModeEnabled) { RT_TRACE_F(COMP_RECV, DBG_LOUD, ("Do not use SecSoftwareDecryption when SafeModeEnabled\n")); - return RT_SEC_STATUS_SUCCESS; - } + return RT_SEC_STATUS_SUCCESS; + } if(RT_SEC_STATUS_SUCCESS != (secStatus = SecSoftwareDecryption(pAdapter, pRfd))) { @@ -5593,7 +5593,7 @@ SecRxDescryption( } return RT_SEC_STATUS_SUCCESS; } - + // Win7 SW Descryption Special Case if( pMgntInfo->NdisVersion >= RT_NDIS_VERSION_6_20 || pMgntInfo->bConcurrentMode || @@ -5619,7 +5619,7 @@ SecRxDescryption( //for win7 FPGA Verification, Adhoc TP test if(pMgntInfo->bRegAdhocUseHWSec && pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_ADHOC) bSWSec = FALSE; - + if(bSWSec) { if(RT_SEC_STATUS_SUCCESS != (secStatus = SecSoftwareDecryption(pAdapter, pRfd))) @@ -5627,11 +5627,11 @@ SecRxDescryption( { RT_TRACE(COMP_SEC , DBG_TRACE , ("===>Fail Win7 SW decrypt\n") ); return RT_SEC_STATUS_FAILURE; - } + } } } } - + // Normal Case with HW Descryption return RT_SEC_STATUS_SUCCESS; } @@ -5646,7 +5646,7 @@ SecRxDescryption( // Append 802.11w MFP MMIE , just for AP mode !! // Input : // posFrame : Action or mgnt frame , DA is broadcast !! -// +// void SecAppenMMIE( IN PADAPTER pAdapter, @@ -5712,7 +5712,7 @@ SecStaGetANoseForS5( } } - + } return FALSE; @@ -5724,7 +5724,7 @@ SecStaGenPMKForS5( IN PADAPTER Adapter ) { - + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PasswordHash(pMgntInfo->mbPassphrase,pMgntInfo->mPasspharseLen, pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length, pMgntInfo->mbS5PMK); @@ -5743,7 +5743,7 @@ SecStaGenPMKForS5( return TRUE; } -// +// // Description: // Received the SA query packet from the STA. // @@ -5756,7 +5756,7 @@ OnSAQueryReq( { PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + RT_PRINT_DATA(COMP_SEC, DBG_LOUD, "OnSAQueryReq(): Content:\n", posMpdu->Octet, posMpdu->Length); do @@ -5786,7 +5786,7 @@ OnSAQueryReq( return RT_STATUS_SUCCESS; } -// +// // Description: // Received the SA query response packet from the STA. // @@ -5800,7 +5800,7 @@ OnSAQueryRsp( PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + RT_PRINT_DATA(COMP_SEC, DBG_LOUD, "OnSAQueryRsp(): Content:\n", posMpdu->Octet, posMpdu->Length); do @@ -5858,7 +5858,7 @@ OnSAQueryRsp( // Description: // Fill and move IV and offset if this tx management frame shall be proteced. // Arguments: -// [in] Adapter - +// [in] Adapter - // The NIC context. // [in] pTcb - // The context of tx frame. @@ -5880,7 +5880,7 @@ SecFillProtectTxMgntFrameHeader( PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); OCTET_STRING osMpdu; BOOLEAN bProtected = FALSE; - + FillOctetString(osMpdu, GET_FRAME_OF_FIRST_FRAG(pAdapter, pTcb), (u2Byte)pTcb->BufferList[0].Length); do @@ -5916,18 +5916,18 @@ SecFillProtectTxMgntFrameHeader( bProtected = TRUE; }while(FALSE); - + if(bProtected) { //3 // Determine different kind of frames before fill the IV // ToDo - + //RT_PRINT_DATA(COMP_SEC, DBG_LOUD, "SecFillProtectTxMgntFrameHeader(): Before extend IV content:\n", osMpdu.Octet, osMpdu.Length); // Set WEP bit !! SET_80211_HDR_WEP(osMpdu.Octet, 1); PlatformMoveMemory(pSecInfo->SecBuffer, (osMpdu.Octet + sMacHdrLng), (osMpdu.Length - sMacHdrLng)); - + PlatformMoveMemory((osMpdu.Octet+ sMacHdrLng + pSecInfo->EncryptionHeadOverhead), pSecInfo->SecBuffer, (osMpdu.Length - sMacHdrLng)); @@ -5982,7 +5982,7 @@ SAQueryTimerCallback( // -// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . +// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . // We need to reorganize the locaton in he future. // --------------------------------------------------------------- // @@ -5995,7 +5995,7 @@ SEC_AsocEntry_ResetEntry( ) { u1Byte i; - + for( i = 4 ; i < Adapter->TotalCamEntry ; i++) { if( (Adapter->MgntInfo.SWCamTable[i].bUsed) @@ -6003,8 +6003,8 @@ SEC_AsocEntry_ResetEntry( { CamDeleteOneEntry( Adapter , pEntry->MacAddr, i); PlatformZeroMemory( & Adapter->MgntInfo.SWCamTable[i] , sizeof(SW_CAM_TABLE) ); - } - } + } + } } #endif // #if (HW_EN_DE_CRYPTION_FOR_NEW_CAM_SEARCH_FLOW == 1) @@ -6021,7 +6021,7 @@ SecUpdateSWGroupKeyInfo( RT_ENC_ALG EncAlgorithm; EncAlgorithm = pSecInfo->GroupEncAlgorithm; - RT_TRACE( COMP_INIT, DBG_LOUD, ("SecUpdateSWGroupKeyInfo(): SecLvl>0, Group EncAlgorithm=0x%08X, Pairwise EncAlgo=0x%08X\n", + RT_TRACE( COMP_INIT, DBG_LOUD, ("SecUpdateSWGroupKeyInfo(): SecLvl>0, Group EncAlgorithm=0x%08X, Pairwise EncAlgo=0x%08X\n", EncAlgorithm, pSecInfo->PairwiseEncAlgorithm) ); SecClearGroupKeyByIdx(Adapter, (u1Byte)KeyIndex); @@ -6033,7 +6033,7 @@ SecUpdateSWGroupKeyInfo( if((KeyIndex & ADD_KEY_IDX_AS)){//kcwu: Key is set by an Authenticator, exchange Tx/Rx MIC u1Byte tmpbuf[TKIP_MIC_KEY_LEN]; PlatformMoveMemory(tmpbuf, KeyMaterial+TKIP_ENC_KEY_LEN, TKIP_MIC_KEY_LEN); - PlatformMoveMemory(KeyMaterial+TKIP_ENC_KEY_LEN, + PlatformMoveMemory(KeyMaterial+TKIP_ENC_KEY_LEN, KeyMaterial+TKIP_ENC_KEY_LEN+TKIP_MIC_KEY_LEN, TKIP_MIC_KEY_LEN); PlatformMoveMemory(KeyMaterial+TKIP_ENC_KEY_LEN+TKIP_MIC_KEY_LEN, tmpbuf, TKIP_MIC_KEY_LEN); } @@ -6057,6 +6057,6 @@ SecUpdateSWGroupKeyInfo( // // --------------------------------------------------------------- -// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . +// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . // We need to reorganize the locaton in he future. // diff --git a/network/wlan/WDI/COMMON/SecurityGen.h b/network/wlan/WDI/COMMON/SecurityGen.h index a37214e54..d567aec3c 100644 --- a/network/wlan/WDI/COMMON/SecurityGen.h +++ b/network/wlan/WDI/COMMON/SecurityGen.h @@ -3,7 +3,7 @@ #define PAIRWISE_KEYIDX 0 -/* +/* WDK TKIP key format defintion: Bit(28) of Key Index |Bit 0-127 |Bit 128-191 |Bit 192-255 ------------------------+-------------------+---------------+----------- @@ -40,7 +40,7 @@ typedef u4Byte RT_SEC_STATUS; #define RT_SEC_STATUS_DATA_MIC_FAILURE (RT_SEC_STATUS)0x00000008 // TKIP data packet is MIC failure #define RT_SEC_STATUS_MGNT_MIC_FAILURE (RT_SEC_STATUS)0x00000009 // TKIP mgnt packet is MIC failure #define RT_SEC_STATUS_MFP_MGNT_MHDR_FAILURE (RT_SEC_STATUS)0x0000000A // CCXv5 MFP TKIP MHDRIE is invalid -#define RT_SEC_STATUS_MFP_MGNT_LEN_FAILURE (RT_SEC_STATUS)0x0000000B // 802.11w BIP data to long +#define RT_SEC_STATUS_MFP_MGNT_LEN_FAILURE (RT_SEC_STATUS)0x0000000B // 802.11w BIP data to long #define RT_SEC_STATUS_MFP_MGNT_MMIE_FAILURE (RT_SEC_STATUS)0x0000000C // 802.11w MMIE fail #define RT_SEC_STATUS_MFP_MGNT_MMIE_MIC_FAILURE (RT_SEC_STATUS)0x0000000D // 802.11w MMIE Mic fail #define RT_SEC_STATUS_UNKNOWN_TA (RT_SEC_STATUS)0x0000000E // Unknow TA, no Key to decrypt @@ -134,7 +134,7 @@ typedef struct _N5_802_11_PMKID #define AES_CBC_IV_LENGTH_1W 16 -// +// // Need to move TypeDef.h ..... // typedef struct _MMIE_STRUC{ @@ -152,14 +152,14 @@ typedef struct { /* AES operations */ -VOID +VOID AES_KeyExpansion_1W( u1Byte Key[], u4Byte KeyLength, AES_CTX_STRUC *paes_ctx ); -VOID +VOID AES_Encrypt_1W( u1Byte PlainBlock[], u4Byte PlainBlockSize, @@ -171,7 +171,7 @@ AES_Encrypt_1W( /* AES-CMAC operations */ -VOID +VOID AES_CMAC_GenerateSubKey_1W( u1Byte Key[], u4Byte KeyLength, @@ -207,7 +207,7 @@ int SecMFPDecodeAESCCM_1W( //--------------------------------- -// End of 802.1w +// End of 802.1w //--------------------------------- void @@ -219,7 +219,7 @@ TKIPGenerateKey( const UCHAR *TK ); -void +void SecEncodeAESCCM( PRT_SECURITY_T pSec, u4Byte pulKey[], @@ -240,7 +240,7 @@ void SecRSNAEncodeAESCCM( u1Byte *plaintext, u4Byte headerLen, u4Byte totalLen - + ); //------------------------------------------------ @@ -257,7 +257,7 @@ void SecMFPEncodeAESCCM( u4Byte totalLen ); -int +int SecDecodeAESCCM( PRT_SECURITY_T pSec, u4Byte pulKey[], @@ -517,11 +517,11 @@ typedef enum{ RSNIE_TYPE_WPA2 = 2 }RSNIE_TYPE; -//typedef enum { -// ERROR_BUFFER_TOO_SMALL = -1, -// ERROR_INVALID_PARA = -2, +//typedef enum { +// ERROR_BUFFER_TOO_SMALL = -1, +// ERROR_INVALID_PARA = -2, // ERROR_INVALID_RSNIE = -3, -// ERROR_INVALID_MULTICASTCIPHER = -4, +// ERROR_INVALID_MULTICASTCIPHER = -4, // ERROR_INVALID_UNICASTCIPHER = -5, // ERROR_INVALID_AUTHKEYMANAGE = -6, // ERROR_UNSUPPORTED_RSNEVERSION = -7, @@ -539,7 +539,7 @@ typedef enum{ #define DOT11_MAX_CIPHER_ALGORITHMS 0x0a // -// For pairwise cipher suite and +// For pairwise cipher suite and // Authentication and Key Management Suite List in RSN IE. // typedef struct _DOT11_RSN_IE_SUITE{ @@ -556,7 +556,7 @@ typedef struct _DOT11_RSN_IE_SUITE{ #define GET_RSNIE_SUITE_PTR(__pPtr, __Idx) (((DOT11_RSN_IE_SUITE *)((pu1Byte)(__pPtr) + 2)) + (__Idx)) // -// For pairwise cipher suite and +// For pairwise cipher suite and // Authentication and Key Management Suite List in RSN IE. // #define GET_RSN_CAP_PREAUTH(__pPtr) LE_BITS_TO_2BYTE(__pPtr, 0, 1) @@ -733,9 +733,9 @@ typedef enum{ #define RSN_CIPHER_SUITE_OUI_TYPE_WEP40 1 // WEP-40 #define RSN_CIPHER_SUITE_OUI_TYPE_TKIP 2 // TKIP #define RSN_CIPHER_SUITE_OUI_TYPE_RESERVED 3 // Reserved -#define RSN_CIPHER_SUITE_OUI_TYPE_CCMP 4 // CCMP ¡V default pairwise cipher suite and default group cipher suite for data frames in an RSNA +#define RSN_CIPHER_SUITE_OUI_TYPE_CCMP 4 // CCMP �V default pairwise cipher suite and default group cipher suite for data frames in an RSNA #define RSN_CIPHER_SUITE_OUI_TYPE_WEP104 5 // WEP-104 -#define RSN_CIPHER_SUITE_OUI_TYPE_BIP 6 // BIP¡Xdefault group management cipher suite in an RSNA with management frame protection enabled +#define RSN_CIPHER_SUITE_OUI_TYPE_BIP 6 // BIP�Xdefault group management cipher suite in an RSNA with management frame protection enabled #define RSN_CIPHER_SUITE_OUI_TYPE_GRP_ADDR_DISALLOWED 7 // Group addressed traffic not allowed // WPA Cipher suite OUI type with OUI 0x00 0F AC @@ -743,13 +743,13 @@ typedef enum{ #define WPA_CIPHER_SUITE_OUI_TYPE_WEP40 1 // WEP-40 #define WPA_CIPHER_SUITE_OUI_TYPE_TKIP 2 // TKIP #define WPA_CIPHER_SUITE_OUI_TYPE_WRAP 3 // WRAP -#define WPA_CIPHER_SUITE_OUI_TYPE_CCMP 4 // CCMP ¡V default pairwise cipher suite and default group cipher suite for data frames in an RSNA +#define WPA_CIPHER_SUITE_OUI_TYPE_CCMP 4 // CCMP �V default pairwise cipher suite and default group cipher suite for data frames in an RSNA #define WPA_CIPHER_SUITE_OUI_TYPE_WEP104 5 // WEP-104 //2004/06/29, kcwu TKIP_MIC implement in TKIP_MIC.c u4Byte -SecMICGetUINT32( +SecMICGetUINT32( pu1Byte p ); @@ -759,14 +759,14 @@ SecMICPutUINT32( u4Byte val ); -VOID +VOID SecMICClear( MicData *micdata ); -VOID +VOID SecMICSetKey( - MicData *micdata, + MicData *micdata, pu1Byte key ); @@ -783,7 +783,7 @@ SecMICAppend( s4Byte nBytes ); -VOID +VOID SecMICGetMIC( MicData *micdata, pu1Byte dst @@ -800,7 +800,7 @@ AES_SetKey( ); void AES_WRAP(PADAPTER Adapter, - u1Byte* plain, int plain_len, + u1Byte* plain, int plain_len, u1Byte * iv, int iv_len, u1Byte * kek, int kek_len, u1Byte *cipher, u2Byte *cipher_len @@ -809,7 +809,7 @@ void AES_WRAP(PADAPTER Adapter, void AES_UnWRAP(PADAPTER Adapter, - u1Byte * cipher, int cipher_len, + u1Byte * cipher, int cipher_len, u1Byte * kek, int kek_len, u1Byte * plain); @@ -820,73 +820,73 @@ void TestAES_WRAP(PADAPTER Adapter); //---------------------------------------------------------------------------- //CKIP.c //---------------------------------------------------------------------------- -void +void CKIP_TEST( ADAPTER * Adapter ); -int +int DecodeCKIP( - ADAPTER * Adapter, + ADAPTER * Adapter, UCHAR *pkt, - int pktlen, - UCHAR *key, + int pktlen, + UCHAR *key, int mickeyid ); -int +int EncodeCKIP( - ADAPTER * Adapter, + ADAPTER * Adapter, UCHAR *pkt, - int pktlen, - UCHAR *hdr, - UCHAR *key, - int keylen, + int pktlen, + UCHAR *hdr, + UCHAR *key, + int keylen, int mickeyid ); -int +int ckip_miccalc( - ADAPTER * Adapter, - UCHAR *CK, - UCHAR *pDA, - UCHAR *pSA, - UCHAR *payload, - int payloadlen, + ADAPTER * Adapter, + UCHAR *CK, + UCHAR *pDA, + UCHAR *pSA, + UCHAR *payload, + int payloadlen, UCHAR *calcmic, - int mickeyid + int mickeyid ); -int +int ckip_encrypt( - UCHAR *CK, - UCHAR *iv, - UCHAR *ecr, + UCHAR *CK, + UCHAR *iv, + UCHAR *ecr, int ecrlen - ); + ); -void +void AES_Encrypt( - const ULONG in_blk[4], - ULONG out_blk[4], + const ULONG in_blk[4], + ULONG out_blk[4], ULONG e_key[] ); -BOOLEAN +BOOLEAN SecInsertDenyBssidList( PRT_SECURITY_T pSec, u1Byte BssidToDeny[6], u8Byte DenyStartTime ); -BOOLEAN +BOOLEAN SecIsInDenyBssidList( PRT_SECURITY_T pSec, u1Byte BssidToCheck[6] ); -BOOLEAN +BOOLEAN SecFillHeader( PADAPTER Adapter, PRT_TCB pTcb @@ -927,7 +927,7 @@ SecCatPMKID( ); -BOOLEAN +BOOLEAN SecDropForKeyAbsent( PADAPTER Adapter, PRT_TCB pTcb @@ -946,12 +946,12 @@ SecIsTxKeyInstalled( IN pu1Byte pRA ); -void +void Supplicant_AES_UnWRAP( PADAPTER Adapter, - u1Byte * cipher, - int cipher_len, - u1Byte * kek, + u1Byte * cipher, + int cipher_len, + u1Byte * kek, int kek_len, u1Byte * plain ); @@ -1012,7 +1012,7 @@ SAQueryTimerCallback( // // --------------------------------------------------------------- -// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . +// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . // We need to reorganize the locaton in he future. // @@ -1041,7 +1041,7 @@ SEC_AsocEntry_ResetEntry( // -// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . +// 2011/03/04 MH Move all new CAN search metho to here forcommon binary . // We need to reorganize the locaton in he future. // --------------------------------------------------------------- // diff --git a/network/wlan/WDI/COMMON/TCPOFFLOADGen.h b/network/wlan/WDI/COMMON/TCPOFFLOADGen.h index 3b5c07bc0..b977a8467 100644 --- a/network/wlan/WDI/COMMON/TCPOFFLOADGen.h +++ b/network/wlan/WDI/COMMON/TCPOFFLOADGen.h @@ -1,17 +1,17 @@ #include "Mp_Precomp.h" -#if TCP_OFFLOAD_SUPPORT +#if TCP_OFFLOAD_SUPPORT // // Description: -// Get Register or Hal info to Set up Support TCP-Offload Mode +// Get Register or Hal info to Set up Support TCP-Offload Mode VOID TCP_OFFLOAD_Init( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); // // Description: -// Set Current by OID or User mode +// Set Current by OID or User mode // // Note : // PRT_SUPPORT_TCPOFFLOAD_CAP "Must" call TCP_OFFLOAD_CheckSupport before call TCP_OFFLOAD_SetCap diff --git a/network/wlan/WDI/COMMON/TCPOFFLOAD_Typt.h b/network/wlan/WDI/COMMON/TCPOFFLOAD_Typt.h index 1686fefac..9a4421492 100644 --- a/network/wlan/WDI/COMMON/TCPOFFLOAD_Typt.h +++ b/network/wlan/WDI/COMMON/TCPOFFLOAD_Typt.h @@ -51,7 +51,7 @@ typedef struct _RT_SUPPORT_TCPOFFLOAD_CAP{ // IPv4 used Tx : bit1 , Rx : bit2 -// IPv6 used Tx : bit5 , Rx : bit6 +// IPv6 used Tx : bit5 , Rx : bit6 typedef enum _RT_SUPPORT_TCPOFFLOAD_MODE{ TCPOFFLOAD_DISAB = 0x00, TCPOFFLOAD_IPV4_TX = 0x01, @@ -88,7 +88,7 @@ typedef enum _RT_TCPOFFLOAD_TX_MODE{ ((_pSetSupTCPCap)->IPV6Send.IpOptionsSupported == 1 ) || \ ((_pSetSupTCPCap)->IPV6Send.TcpOptionsSupported == 1) \ ) - + #define TCPOFFLOAD_SUPPORT_IPV4(_pSetSupTCPCap) \ ( \ ((_pSetSupTCPCap)->IPV4Recv.IpOptionsSupported == 1 ) || \ @@ -154,4 +154,4 @@ typedef enum _RT_TCPOFFLOAD_TX_MODE{ ((_pSetSupTCPCap)->IPV6Recv.TcpChecksum == 1) || \ ((_pSetSupTCPCap)->IPV6Recv.UdpChecksum == 1) \ ) -#endif +#endif diff --git a/network/wlan/WDI/COMMON/TDLSGen.h b/network/wlan/WDI/COMMON/TDLSGen.h index 3a8af444e..b2ea1eb26 100644 --- a/network/wlan/WDI/COMMON/TDLSGen.h +++ b/network/wlan/WDI/COMMON/TDLSGen.h @@ -91,7 +91,7 @@ TDLS_PrepareTxFeedback( PADAPTER Adapter, PRT_TCB pTcb ); - + VOID TDLS_UpdatePeer( PADAPTER Adapter, @@ -262,7 +262,7 @@ TDLS_GetTxMacId( ); VOID -TDLS_GetHtAMPDU( +TDLS_GetHtAMPDU( IN PADAPTER Adapter, IN pu1Byte Addr, IN PRT_TCB pTcb @@ -359,12 +359,12 @@ __inline RT_STATUS TDLS_OnTunneledProbeReq(PADAPTER pAdapter, PRT_RFD pRfd, POCT __inline RT_STATUS TDLS_OnTunneledProbeRsp(PADAPTER pAdapter, PRT_RFD pRfd, POCTET_STRING pPduOS, u4Byte contentOffset) {return RT_STATUS_SUCCESS;} #define GET_TDLS_ENABLED(__pMgntInfo) FALSE -#define SET_TDLS_ENABLED(__pMgntInfo, _value) +#define SET_TDLS_ENABLED(__pMgntInfo, _value) #define GET_TDLS_WIFITEST(__pMgntInfo) FALSE #define IS_TDL_EXIST(_pMgntInfo) FALSE #define GET_TDLS_WIFITESTBED_RADIO_OFF(__pMgntInfo) FALSE #endif // end of else of #if (TDLS_SUPPORT == 1) - + #endif diff --git a/network/wlan/WDI/COMMON/TSGen.c b/network/wlan/WDI/COMMON/TSGen.c index 36543f4b4..48ebad212 100644 --- a/network/wlan/WDI/COMMON/TSGen.c +++ b/network/wlan/WDI/COMMON/TSGen.c @@ -53,9 +53,9 @@ ResetRxTsEntry( pTS->RxIndicateState = 0; // Reset indicate state!! ResetBaEntry(&pTS->RxAdmittedBARecord); // For BA Recepient - //Init it for avoid drop first packet. + //Init it for avoid drop first packet. pTS->RxLastFragNum = 0xff; - pTS->RxLastSeqNum = 0xffff; + pTS->RxLastSeqNum = 0xffff; } VOID @@ -82,26 +82,26 @@ TSInitialize( // DLS related timer will be add here in the future!! // PlatformInitializeTimer( - Adapter, - &pTxTS->TsAddBaTimer, - (RT_TIMER_CALL_BACK)TsAddBaProcess, - (PVOID)pTxTS, + Adapter, + &pTxTS->TsAddBaTimer, + (RT_TIMER_CALL_BACK)TsAddBaProcess, + (PVOID)pTxTS, "TxTsAddBaTimer" ); PlatformInitializeTimer( Adapter, &pTxTS->TxPendingBARecord.Timer, - (RT_TIMER_CALL_BACK)BaSetupTimeOut, - (PVOID)pTxTS, + (RT_TIMER_CALL_BACK)BaSetupTimeOut, + (PVOID)pTxTS, "TxPendingBARecordTimer"); PlatformInitializeTimer( Adapter, &pTxTS->TxAdmittedBARecord.Timer, - (RT_TIMER_CALL_BACK)TxBaInactTimeout, - (PVOID) pTxTS, + (RT_TIMER_CALL_BACK)TxBaInactTimeout, + (PVOID) pTxTS, "TxAdmittedBARecordTimer" ); - + ResetTxTsEntry(pTxTS); RTInsertTailList(&pMgntInfo->Tx_TS_Unused_List, &pTxTS->TsCommonInfo.List); pTxTS++; @@ -118,15 +118,15 @@ TSInitialize( PlatformInitializeTimer( Adapter, &pRxTS->RxAdmittedBARecord.Timer, - (RT_TIMER_CALL_BACK)RxBaInactTimeout, - (PVOID)pRxTS, + (RT_TIMER_CALL_BACK)RxBaInactTimeout, + (PVOID)pRxTS, "RxAdmittedBARecordTimer"); - + PlatformInitializeTimer( Adapter, &pRxTS->RxPktPendingTimer, - (RT_TIMER_CALL_BACK)RxPktPendingTimeout, - (PVOID)pRxTS, + (RT_TIMER_CALL_BACK)RxPktPendingTimeout, + (PVOID)pRxTS, "RxPktPendingTimer"); ResetRxTsEntry(pRxTS); @@ -208,7 +208,7 @@ SearchAdmitTRStream( BOOLEAN search_dir[4] = {0, 0, 0, 0}; PRT_LIST_ENTRY psearch_list = NULL; PTS_COMMON_INFO pRet=NULL; - + if(pMgntInfo->ApType > 0) { if(TxRxSelect == TX_DIR) @@ -249,7 +249,7 @@ SearchAdmitTRStream( psearch_list = &pMgntInfo->Tx_TS_Admit_List; else psearch_list = &pMgntInfo->Rx_TS_Admit_List; - + //for(dir = DIR_UP; dir <= DIR_BI_DIR; dir++) for(dir = 0; dir <= DIR_BI_DIR; dir++) { @@ -264,7 +264,7 @@ SearchAdmitTRStream( if(pRet != NULL) return pRet ; - else + else return NULL; } @@ -282,7 +282,7 @@ MakeTSEntry( if(pTsCommonInfo == NULL) return; - + PlatformMoveMemory(pTsCommonInfo->Addr, Addr, 6); if(pTSPEC != NULL) @@ -320,27 +320,27 @@ GetTs( } if(pMgntInfo->pStaQos->CurrentQosMode == QOS_DISABLE) - {//only use one TS - UP = 0; - } + {//only use one TS + UP = 0; + } else if(pMgntInfo->pStaQos->CurrentQosMode & QOS_WMM) { // In WMM case: we use 4 TID only - + // - // We use 7 TIDs to fit differentiated service from IP layer + // We use 7 TIDs to fit differentiated service from IP layer // to meet different implementation of APs. // 2008.12.18. // - UP = TID; + UP = TID; } *ppTS = SearchAdmitTRStream( - pMgntInfo, + pMgntInfo, Addr, - UP, + UP, TxRxSelect); - + if(*ppTS != NULL) { RT_TRACE(COMP_QOS, DBG_TRACE, ("SearchAdmitTRStream get ppTS\r\n")); @@ -355,25 +355,25 @@ GetTs( } else { - // + // // Create a new Traffic stream for current Tx/Rx // This is for EDCA and WMM to add a new TS. // For HCCA or WMMSA, TS cannot be addmit without negotiation. // u1Byte TSpec[WMM_TSPEC_BODY_LENGTH]={0}; - + pu1Byte pTSInfo= TSpec; - PRT_LIST_ENTRY pUnusedList = + PRT_LIST_ENTRY pUnusedList = (TxRxSelect == TX_DIR)? (&pMgntInfo->Tx_TS_Unused_List): (&pMgntInfo->Rx_TS_Unused_List); - - PRT_LIST_ENTRY pAddmitList = + + PRT_LIST_ENTRY pAddmitList = (TxRxSelect == TX_DIR)? (&pMgntInfo->Tx_TS_Admit_List): (&pMgntInfo->Rx_TS_Admit_List); - DIRECTION_VALUE Dir = + DIRECTION_VALUE Dir = (ACTING_AS_AP(Adapter))? ((TxRxSelect==TX_DIR)?DIR_DOWN:DIR_UP): ((TxRxSelect==TX_DIR)?DIR_UP:DIR_DOWN); @@ -399,7 +399,7 @@ GetTs( SET_TSPEC_BODY_TSINFO_UP(pTSInfo, UP); // User priority SET_TSPEC_BODY_TSINFO_ACK_POLICY(pTSInfo, 0); // Ack policy SET_TSPEC_BODY_TSINFO_SCHEDULE(pTSInfo, 0); // Schedule - + MakeTSEntry(*ppTS, Addr, TSpec, NULL, 0, 0); AdmitTS(Adapter, *ppTS, 0); RTInsertTailList(pAddmitList, &((*ppTS)->List)); @@ -413,8 +413,8 @@ GetTs( { RT_ASSERT(FALSE, ("ManageTSInformation(): There is not enough TS record to be used!!")); return FALSE; - } - } + } + } } } @@ -448,9 +448,9 @@ RemoveTsEntry( PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); else bInRxProgress = TRUE; - + while(!RTIsListEmpty(&pRxTS->RxPendingPktList)) - { + { pRxReorderEntry = (PRX_REORDER_ENTRY)RTRemoveHeadList(&pRxTS->RxPendingPktList); pRxTS->RxBatchCount--; ReturnRFDList(Adapter, pRxReorderEntry->pRfd); @@ -546,7 +546,7 @@ RemovePeerTS( { pTS = (PTS_COMMON_INFO)RTNextEntryList(&pTS->List); } - } + } } VOID @@ -557,7 +557,7 @@ ReleaseAllTSTimer( PTX_TS_RECORD pTxTS = pMgntInfo->TxTsRecord; PRX_TS_RECORD pRxTS = pMgntInfo->RxTsRecord; u1Byte count = 0; - + for(count = 0; count < TOTAL_TS_NUM; count++) { // @@ -565,7 +565,7 @@ ReleaseAllTSTimer( // DLS related timer will be add here in the future!! // PlatformReleaseTimer( - Adapter, + Adapter, &pTxTS->TsAddBaTimer); PlatformReleaseTimer( @@ -575,7 +575,7 @@ ReleaseAllTSTimer( PlatformReleaseTimer( Adapter, &pTxTS->TxAdmittedBARecord.Timer); - + pTxTS++; } @@ -584,11 +584,11 @@ ReleaseAllTSTimer( PlatformReleaseTimer( Adapter, &pRxTS->RxAdmittedBARecord.Timer); - + PlatformReleaseTimer( Adapter, &pRxTS->RxPktPendingTimer); - + pRxTS++; } } @@ -602,7 +602,7 @@ RemoveAllTS( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PTS_COMMON_INFO pTS; - + while(!RTIsListEmpty(&pMgntInfo->Tx_TS_Pending_List)) { pTS = (PTS_COMMON_INFO)RTRemoveHeadList(&pMgntInfo->Tx_TS_Pending_List); @@ -633,7 +633,7 @@ RemoveAllTS( RemoveTsEntry(Adapter, pTS, RX_DIR); // RemoveMAEntry(Adapter, &pTS->Ts_MAInfo); RTInsertTailList(&pMgntInfo->Rx_TS_Unused_List, &pTS->List); - } + } } VOID @@ -647,7 +647,7 @@ TsStartAddBaProcess( RT_TRACE(COMP_MLME, DBG_LOUD, ("TsStartAddBaProcess ABORT becuase SafeModeEnable\n")); return; } - + if(pTxTS->bAddBaReqInProgress == FALSE) { pTxTS->bAddBaReqInProgress = TRUE; @@ -681,7 +681,7 @@ RxTSIndicate( SeqNum = Frame_SeqNum(frame); if(GetTs( - Adapter, + Adapter, (PTS_COMMON_INFO*) &(pRfd->Status.pRxTS), Frame_Addr2(frame), tid, @@ -702,9 +702,9 @@ RxTSIndicate( // When tested in win7 OS, every 45-50s, AP will send a TID=6 packet to // NIC for 3 times(6 sec). Then RTWLANU will disable EDCA turbo mode temporarily // So the throughput will downgrade. We need to ignore the special case. - { + { if(tid!=0 && tid!=3) - { + { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); if (Adapter->MgntInfo.bWiFiConfg) { diff --git a/network/wlan/WDI/COMMON/Transmit.c b/network/wlan/WDI/COMMON/Transmit.c index d90f662e3..6853e3dd3 100644 --- a/network/wlan/WDI/COMMON/Transmit.c +++ b/network/wlan/WDI/COMMON/Transmit.c @@ -39,7 +39,7 @@ VerifyPsOnTx( { if( !MacAddr_isMulticast(pRaddr) ) { // Unicast. - PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); + PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); // No entry. if(pEntry == NULL) @@ -49,7 +49,7 @@ VerifyPsOnTx( RT_TRACE(COMP_AP, DBG_LOUD, ("[WARNING] VerifyPsOnTx(): No Entry for client!\n")); return txPsStauts; } - + // Queue the unicast packet if dest STA is in power-save mode. if(pEntry->bPowerSave) { @@ -80,7 +80,7 @@ VerifyPsOnTx( } bEospPkt = GET_QOS_CTRL_WMM_EOSP(osMpdu.Octet); - if(bUAPSD) + if(bUAPSD) { if(bEospPkt) { @@ -88,7 +88,7 @@ VerifyPsOnTx( } else if(pEntry->WmmEosp != RT_STA_EOSP_STATE_OPENED || !RTIsListEmpty(&(pEntry->WmmPsQueue))) { - // + // // If the packets from the upper layer are queued, such as ping, the protocol layer or the socket // will block the packets sent until these queued packets are returned. It causes the ping rate with // large packet size low and fail in the P2P Test item 6.1.12/6.1.13/7.1.5. @@ -108,14 +108,14 @@ VerifyPsOnTx( // Check if this chip supports per tx packet feedback. bSupportTxFeedback = TxFeedbackInstallTxFeedbackInfoForTcb(pAdapter, pTcb); - + if(bSupportTxFeedback) { TxFeedbackFillTxFeedbackInfoUserConfiguration( - pTcb, - RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, - pAdapter, - Ap_PsTxFeedbackCallback, + pTcb, + RT_TX_FEEDBACK_ID_AP_WMM_EOSP_ENDING, + pAdapter, + Ap_PsTxFeedbackCallback, (PVOID) pEntry ); } @@ -179,13 +179,13 @@ VerifyPsOnTx( return txPsStauts; } - + // Set PwrMgnt bit, by Bruce, 2007-11-09. //RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "packet:\n", osMpdu.Octet, osMpdu.Length); SET_80211_HDR_PWR_MGNT(osMpdu.Octet, MgntGetPwrMgntInfo(pAdapter, pTcb, TRUE)); // // Move from PreTransmitTCB() becsauce the TCBs in the wait queues sent without passing - // through PreTransmitTCB(). + // through PreTransmitTCB(). // Only those packets without pwr mgnt bit set are considered as sent in awake // By Bruce, 2008-01-18. // @@ -198,7 +198,7 @@ VerifyPsOnTx( // Note, if the NULL frame without pwr mgnt bit set, the packet still should be inserted into the queue. if(IsMgntNullFrame(osMpdu.Octet) && GET_80211_HDR_PWR_MGNT(osMpdu.Octet)) break; - + if(IN_LEGACY_POWER_SAVE(pMgntInfo->pStaQos)) LPS_OnTx(pAdapter, pTcb); else @@ -216,7 +216,7 @@ VerifyPsOnTx( if(IsStaQosTriggerFrame(&osMpdu, pMgntInfo->pStaQos->Curr4acUapsd)) { pMgntInfo->pStaQos->bInServicePeriod = TRUE; - } + } } } } @@ -226,10 +226,10 @@ VerifyPsOnTx( { // Set PwrMgnt bit, by Bruce, 2007-11-09. SET_80211_HDR_PWR_MGNT(osMpdu.Octet, MgntGetPwrMgntInfo(pAdapter, pTcb, TRUE)); - + // // Move from PreTransmitTCB() becsauce the TCBs in the wait queues sent without passing - // through PreTransmitTCB(). + // through PreTransmitTCB(). // Only those packets without pwr mgnt bit set are considered as sent in awake // By Bruce, 2008-01-18. // @@ -252,13 +252,13 @@ InitializeTxVariables( u2Byte i; BOOLEAN bSupportEarlyMode; - // Initialize each queue with the same number of TxDesc, + // Initialize each queue with the same number of TxDesc, // except for BEACON_QUEUE. 2005.11.14, by rcnjko. for(i = 0; i < MAX_TX_QUEUE;i++) { Adapter->NumTxDesc[i] = Adapter->RT_TXDESC_NUM; } - // TODO: Emily 2006.11.15. If we are implmemting multiple BSSID feature, more + // TODO: Emily 2006.11.15. If we are implmemting multiple BSSID feature, more // TODO: than two descriptors may be required. Adapter->NumTxDesc[BEACON_QUEUE] = 2; // BEACON_QUEUE Adapter->NumTxDesc[BE_QUEUE] = Adapter->RT_TXDESC_NUM_BE_QUEUE; // BE queue need more descriptor for performance consideration @@ -275,9 +275,9 @@ InitializeTxVariables( Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_EARLY_MODE_THRESHOLD, &(Adapter->EarlyMode_Threshold)); for(i=0 ; i<8 ; i++) Adapter->EarlyMode_QueueNum[i] = 0; - + } - + RTInitializeListHead(&Adapter->TcbIdleQueue); for(i=0;iLocalBufferQueue); RTInitializeListHead(&Adapter->LocalFWBufferQueue); - + ResetTxStatistics(Adapter); - + } RT_STATUS @@ -303,10 +303,10 @@ PrepareTCBs( PRT_TX_LOCAL_BUFFER pLocalBuffer; RT_STATUS status; u4Byte BufferLength,offset; - BufferLength = MAX_LLC_LENGTH + - MAX_802_11_HEADER_LENGTH*MAX_FRAGMENT_COUNT + - MAX_802_11_TRAILER_LENGTH + - MAX_FIRMWARE_INFORMATION_SIZE + + BufferLength = MAX_LLC_LENGTH + + MAX_802_11_HEADER_LENGTH*MAX_FRAGMENT_COUNT + + MAX_802_11_TRAILER_LENGTH + + MAX_FIRMWARE_INFORMATION_SIZE + AMSDU_SUBHEADER_LENGTH; do{ //2 Allocate TCBs @@ -324,7 +324,7 @@ PrepareTCBs( if(status!=RT_STATUS_SUCCESS) return status; PlatformZeroMemory(pTcb[i].Buffer.VirtualAddress , BufferLength); - + GET_SHARED_MEMORY_WITH_OFFSET( &pTcb[i].Buffer, &pTcb[i].LLC, @@ -375,8 +375,8 @@ PrepareTCBs( status = PlatformAllocateSharedMemory(Adapter, &pLocalBuffer[i].Buffer, Adapter->MAX_TRANSMIT_BUFFER_SIZE); if(status!=RT_STATUS_SUCCESS) return status; - - RTInsertTailListWithCnt(&Adapter->LocalBufferQueue, &pLocalBuffer[i].List, &Adapter->NumLocalBufferIdle); + + RTInsertTailListWithCnt(&Adapter->LocalBufferQueue, &pLocalBuffer[i].List, &Adapter->NumLocalBufferIdle); } //2 Allocate Firmware local buffers @@ -388,7 +388,7 @@ PrepareTCBs( PlatformZeroMemory(Adapter->LocalFWBufferArray.Ptr,Adapter->LocalFWBufferArray.Length); pLocalBuffer=(PRT_TX_LOCAL_BUFFER)Adapter->LocalFWBufferArray.Ptr; - + for(i=0;iNumLocalFWBuffer;i++) { status = PlatformAllocateSharedMemory(Adapter, &pLocalBuffer[i].Buffer, RT_LOCAL_FW_BUF_SIZE+Adapter->HWDescHeadLength); @@ -397,10 +397,10 @@ PrepareTCBs( { return status; } - RTInsertTailListWithCnt(&Adapter->LocalFWBufferQueue, &pLocalBuffer[i].List, &Adapter->NumLocalFWBufferIdle); + RTInsertTailListWithCnt(&Adapter->LocalFWBufferQueue, &pLocalBuffer[i].List, &Adapter->NumLocalFWBufferIdle); } }while(FALSE); - + return status; } @@ -430,8 +430,8 @@ FreeTCBs( pTcb=(PRT_TCB)RTRemoveHeadList(&Adapter->TcbBusyQueue[QueueID]); ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); } - Adapter->nBufInTxDesc[QueueID] = 0; - + Adapter->nBufInTxDesc[QueueID] = 0; + while(!RTIsListEmpty(&Adapter->TcbWaitQueue[QueueID])) { pTcb=(PRT_TCB)RTRemoveHeadList(&Adapter->TcbWaitQueue[QueueID]); @@ -456,7 +456,7 @@ FreeTCBs( while(!RTIsListEmpty(&Adapter->LocalBufferQueue)) { pLocalBuffer=(PRT_TX_LOCAL_BUFFER)RTRemoveHeadListWithCnt(&Adapter->LocalBufferQueue, &Adapter->NumLocalBufferIdle); - + PlatformFreeSharedMemory(Adapter, &pLocalBuffer->Buffer); nFreed++; } @@ -474,7 +474,7 @@ FreeTCBs( while(!RTIsListEmpty(&Adapter->LocalFWBufferQueue)) { pLocalBuffer=(PRT_TX_LOCAL_BUFFER)RTRemoveHeadListWithCnt(&Adapter->LocalFWBufferQueue, &Adapter->NumLocalFWBufferIdle); - + PlatformFreeSharedMemory(Adapter, &pLocalBuffer->Buffer); nFreed++; } @@ -493,7 +493,7 @@ FreeTCBs( while(!RTIsListEmpty(&Adapter->TcbIdleQueue)) { pTcb=(PRT_TCB)RTRemoveHeadListWithCnt(&Adapter->TcbIdleQueue, &Adapter->NumIdleTcb); - + PlatformFreeSharedMemory(Adapter, &pTcb->Buffer); nFreed++; } @@ -522,7 +522,7 @@ RemoveZeroLengthBuffer( if(i!=j) { pTcb->BufferList[j]=pTcb->BufferList[i]; - + if(IS_REMOVE_ZERO_LEN_BUF(pTcb->SourceAdapt)) { if(pTcb->SubHdrIndexAry[k] == (u1Byte)i) @@ -568,7 +568,7 @@ RetrieveSegmentDataFromTCB( } if (BytesRead == DataBufLength) break; - + offset +=pTcb->BufferList[i].Length; } @@ -583,20 +583,20 @@ RetrieveSegmentDataFromTCB( /** * Function: TcbGetTOSField -* +* * Overview: Get TOS field of IP header in TCB buffer. -* Input the TCB pointer and indicate SkipBuffer number for this function to get the +* Input the TCB pointer and indicate SkipBuffer number for this function to get the * Ethernet packet sent from upper layer. * Using this function before packet conversion. (TranslateHeader()) -* -* Input: +* +* Input: * PRT_TCB pTcb * u1Byte SkipBuffers -* -* Output: +* +* Output: * None -* -* Return: +* +* Return: * TOS value */ u1Byte @@ -663,7 +663,7 @@ TranslateHeader( //2 Fill wireless header pHeader=pTcb->BufferList[0].VirtualAddress; - + //1 Note: BufferList[0] is reserved for 802.11 header //1 BufferList[1] is reserved for LLC @@ -675,16 +675,16 @@ TranslateHeader( if( (CheckFragment(Adapter, pTcb, Adapter->TXPacketShiftBytes) == FALSE) && ( (pTcb->PacketLength + additionalHeaderLen ) <= FRAGMENT_THRESHOLD(Adapter) ) ) - { + { } { SET_80211_HDR_FRAME_CONTROL(pHeader, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(pHeader, Type_Data); - + pTcb->bTDLPacket = FALSE; - + switch(pMgntInfo->OpMode) { case RT_OP_MODE_IBSS: // 0,0 @@ -728,7 +728,7 @@ TranslateHeader( PlatformMoveMemory(&pTcb->BufferList[0].VirtualAddress[SAOffset], Adapter->CurrentAddress, ETHERNET_ADDRESS_LENGTH); PlatformMoveMemory(pTcb->SourceAddress, Adapter->CurrentAddress, ETHERNET_ADDRESS_LENGTH); } - + PlatformMoveMemory(&pTcb->BufferList[0].VirtualAddress[DAOffset], pTcb->BufferList[2].VirtualAddress, ETHERNET_ADDRESS_LENGTH); //2004/07/22, kcwu PlatformMoveMemory(pTcb->DestinationAddress, pTcb->BufferList[2].VirtualAddress, ETHERNET_ADDRESS_LENGTH); @@ -745,7 +745,7 @@ TranslateHeader( //2 Add LLC if need // Find TypeLength, 2006.10.27, refined by shien chang. RetrieveSegmentDataFromTCB( - pTcb, + pTcb, 2, // The number of buffer in bufferlist to skip. 12, // The TypeLength offset. TypeLengthBuf, // 2 Byte buffer for TypeLength data. @@ -759,22 +759,22 @@ TranslateHeader( u1Byte btTmp = 0; // For delaying enter PS mode for FW control LPS. by tynli. - if(GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS && + if(GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS && GET_POWER_SAVE_CONTROL(pMgntInfo)->bLeisurePs) { //DbgPrint("EAPOL packet----->\n"); pMgntInfo->DelayLPSLastTimeStamp = PlatformGetCurrentTime(); - + // 20100902 Joseph: Since we send NULL frame in LeisurePSLeave() function, TX_SPINLOCK // shall be release for all product and OS. Originally, TX_SPINLOCK is raised twice here and // system hang immediately. - // We should call LeisurePSLeave to turn the RF on to receive EAPOL/DHCP/ARP packets, + // We should call LeisurePSLeave to turn the RF on to receive EAPOL/DHCP/ARP packets, // and release TX spinlock first beacuse we will acquire TX spinlock for FW H2C commands in 92su. PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); LeisurePSLeave(Adapter, LPS_DISABLE_TX_EAPOL_PKT); PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); } - + if( !SecIsTxKeyInstalled(Adapter, Addr1) ) { pTcb->EncInfo.SecProtInfo = RT_SEC_EAPOL_BEFORE_KEY_INSTALLED; @@ -785,7 +785,7 @@ TranslateHeader( } // Send in lowest basic rate to get more time for adding key. 2005.04.19, by rcnjko. - if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) + if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) { pTcb->DataRate = MgntQuery_TxRateExcludeCCKRates(pMgntInfo->mBrates);//0xc;//ofdm 6m pTcb->bTxDisableRateFallBack = FALSE; @@ -795,7 +795,7 @@ TranslateHeader( pTcb->DataRate = Adapter->MgntInfo.LowestBasicRate; //disable rate fallback for EAPOL packate to resolve 5G ad hoc cck hang. zhiyuan 2012/04/28 if(IS_WIRELESS_MODE_A(Adapter) || IS_WIRELESS_MODE_N_5G(Adapter)) - pTcb->bTxDisableRateFallBack = TRUE; + pTcb->bTxDisableRateFallBack = TRUE; } RT_DISP(FDM, WA_IOT, ("EAPOL TranslateHeader(), pTcb->DataRate = 0x%x\n", pTcb->DataRate)); @@ -806,19 +806,19 @@ TranslateHeader( { if(pTcb->BufferList[i].Length == 0) continue; - + if(pTcb->BufferList[i].Length + nTmpOffset > 19) { btTmp = EF1Byte(pTcb->BufferList[i].VirtualAddress[19-nTmpOffset]); - + if(btTmp == 0x0d || btTmp == 0x0f) { - pTcb->EncInfo.SecProtInfo |= RT_SEC_MIC_FAILURE_REPORT; + pTcb->EncInfo.SecProtInfo |= RT_SEC_MIC_FAILURE_REPORT; } break; } - + nTmpOffset += pTcb->BufferList[i].Length; } } @@ -828,12 +828,12 @@ TranslateHeader( } CCX_QueryCCKMSupport(Adapter, &bCCX8021xenable, &bAPSuportCCKM); - + { // Insert LLC in need if(TypeLength > (MAXIMUM_ETHERNET_PACKET_SIZE-ETHERNET_HEADER_SIZE) ) { - if ((TypeLength == 0x8137) || (TypeLength == 0x80F3)) + if ((TypeLength == 0x8137) || (TypeLength == 0x80F3)) { // Bridge tunneling PlatformMoveMemory( pTcb->BufferList[1].VirtualAddress, @@ -842,19 +842,19 @@ TranslateHeader( pTcb->BufferList[1].Length=LLC_HEADER_SIZE; pTcb->PacketLength += LLC_HEADER_SIZE; - } + } //else if( pSecInfo->pCkipPara->bIsMIC) It will add SNAP to EAPOL packet in 802.1x ,2006.10.04 CCW else if(pSecInfo->pCkipPara->bIsMIC && (pTcb->EncInfo.SecProtInfo != RT_SEC_EAPOL_BEFORE_KEY_INSTALLED) - && !(( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || - pSecInfo->PairwiseEncAlgorithm ==RT_ENC_ALG_WEP104 ) && // WEP mode + && !(( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || + pSecInfo->PairwiseEncAlgorithm ==RT_ENC_ALG_WEP104 ) && // WEP mode pSecInfo->AuthMode == RT_802_11AuthModeOpen && // Open mode !( bCCX8021xenable && bAPSuportCCKM ) && // Not in CCKM mode - IsSecProtEapol(pTcb->EncInfo.SecProtInfo) == TRUE) // Is EPAOL Packet + IsSecProtEapol(pTcb->EncInfo.SecProtInfo) == TRUE) // Is EPAOL Packet ) { // CKIP MIC SNAP RT_TRACE( COMP_CKIP, DBG_LOUD, ("[CKIP] TranslateHeader(): CMIC snap case!\n") ); - - // Set CKIP Snap + + // Set CKIP Snap PlatformMoveMemory( pTcb->BufferList[1].VirtualAddress, Snap_CKIP_MIC, @@ -864,18 +864,18 @@ TranslateHeader( pTcb->BufferList[1].VirtualAddress + 8, 8); - //Set SEQ + //Set SEQ CKIP_SEQ_DECIMAL2ARRAY( pSecInfo->pCkipPara->ulSeqUpLink, seqv ); PlatformMoveMemory( pTcb->BufferList[1].VirtualAddress + 12, seqv, 4); pSecInfo->pCkipPara->ulSeqUpLink += 2; - + pTcb->BufferList[1].Length=16; pTcb->PacketLength += 16; - } - else + } + else { // 802.1h PlatformMoveMemory( pTcb->BufferList[1].VirtualAddress, @@ -905,7 +905,7 @@ TranslateHeader( 2, 15, &TOS, - sizeof(TOS)); + sizeof(TOS)); pTcb->priority = TOS>>5; RT_DISP(FQoS, QoS_INIT, ("Translate Header pTcb->priority = %d\r\n", pTcb->priority)); } @@ -959,8 +959,8 @@ TranslateHeader( //Note: // osMpdu may not include the packet content but just 802.11 header. FillOctetString(osMpdu, pTcb->BufferList[0].VirtualAddress, (u2Byte)pTcb->BufferList[0].Length); - pRaddr = Frame_pRaddr(osMpdu); - + pRaddr = Frame_pRaddr(osMpdu); + // // Translate the DHCP offer packet from multicast packet to unicast so that the client // can receive the DHCP response easier. By Bruce, 2011-01-06. @@ -980,29 +980,29 @@ TranslateHeader( // Check if this mac address is belong to one of the clients. pEntry = AsocEntry_GetEntry(&pTcb->SourceAdapt->MgntInfo, ClientMac); - + if(pEntry != NULL) { RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "Replace the DHCP receiver address from multicast to ", ClientMac); PlatformMoveMemory(pRaddr, ClientMac, 6); PlatformMoveMemory(pTcb->DestinationAddress, ClientMac, 6); } - } + } // 68 : UDP BOOTP client // 67 : UDP BOOTP server //DbgPrint("DHCP Protocol !!\n"); // Use low rate to send DHCP packet. - if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) + if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) { pTcb->DataRate = MgntQuery_TxRateExcludeCCKRates(pMgntInfo->mBrates);//0xc;//ofdm 6m pTcb->bTxDisableRateFallBack = FALSE; } else - pTcb->DataRate = Adapter->MgntInfo.LowestBasicRate; + pTcb->DataRate = Adapter->MgntInfo.LowestBasicRate; RT_DISP(FDM, WA_IOT, ("DHCP TranslateHeader(), pTcb->DataRate = 0x%x\n", pTcb->DataRate)); pTcb->bTxUseDriverAssingedRate = TRUE; pTcb->specialDataType = PACKET_DHCP; - pMgntInfo->LPSDelayCnt= + pMgntInfo->LPSDelayCnt= GET_POWER_SAVE_CONTROL(pMgntInfo)->LPSAwakeIntvl*2; // For delaying enter PS mode for FW control LPS. by tynli. if( GET_POWER_SAVE_CONTROL(pMgntInfo)->bFwCtrlLPS && @@ -1024,13 +1024,13 @@ TranslateHeader( { //DbgPrint("IP ARP !!\n"); pMgntInfo->LPSDelayCnt = pMgntInfo->mDtimCount; - if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) + if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) { pTcb->DataRate = MgntQuery_TxRateExcludeCCKRates(pMgntInfo->mBrates);//0xc;//ofdm 6m pTcb->bTxDisableRateFallBack = FALSE; } else - pTcb->DataRate = pMgntInfo->LowestBasicRate; + pTcb->DataRate = pMgntInfo->LowestBasicRate; RT_DISP(FDM, WA_IOT, ("ARP TranslateHeader(), pTcb->DataRate = 0x%x\n", pTcb->DataRate)); pTcb->bTxUseDriverAssingedRate = TRUE; pTcb->specialDataType = PACKET_ARP; @@ -1039,7 +1039,7 @@ TranslateHeader( { // by tynli //DbgPrint("ARP packet----->\n"); pMgntInfo->DelayLPSLastTimeStamp = PlatformGetCurrentTime(); - + // 20100902 Joseph: Since we send NULL frame in LeisurePSLeave() function, TX_SPINLOCK // shall be release for all product and OS. Originally, TX_SPINLOCK is raised twice here and // system hang immediately. @@ -1061,12 +1061,12 @@ TranslateHeader( u1Byte CurrCcxVerNumber = 0; CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); - - if(!(( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || - pSecInfo->PairwiseEncAlgorithm ==RT_ENC_ALG_WEP104 ) && // WEP mode + + if(!(( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || + pSecInfo->PairwiseEncAlgorithm ==RT_ENC_ALG_WEP104 ) && // WEP mode pSecInfo->AuthMode == RT_802_11AuthModeOpen && // Open mode !( bCCX8021xenable && bAPSuportCCKM && CurrCcxVerNumber >= 2 ) && // Not in CCKM mode - IsSecProtEapol(pTcb->EncInfo.SecProtInfo) == TRUE // Is EPAOL Packet + IsSecProtEapol(pTcb->EncInfo.SecProtInfo) == TRUE // Is EPAOL Packet )) { pTcb->BufferList[0].Length = (sMacHdrLng + pSecInfo->EncryptionHeadOverhead); @@ -1178,7 +1178,7 @@ CheckSpecialTxPktContentFromHighLayer( u2Byte IP_Src_Port = 0, IP_Dst_Port = 0; u2Byte u2Tmp = 0; - u1Byte Check_Buf_Index, Check_Buf_Offset; + u1Byte Check_Buf_Index, Check_Buf_Offset; if(pTcb->BufferType==RT_TCB_BUFFER_TYPE_LOCAL) { @@ -1186,20 +1186,20 @@ CheckSpecialTxPktContentFromHighLayer( // Payload is saved in buffer 1. // Since LLC header is coalesced with oter payload in buffer 1, we just skip first 8 bytes LLC // in front of buffer to get the paylaod. - Check_Buf_Index = 1; - Check_Buf_Offset = 8; + Check_Buf_Index = 1; + Check_Buf_Offset = 8; } else { // 20100309 Joseph: Normal case. // Payload is saved in buffer 2 and LLC is separate with it in buffer 1. - Check_Buf_Index = 2; - Check_Buf_Offset = 0; + Check_Buf_Index = 2; + Check_Buf_Offset = 0; } RetrieveSegmentDataFromTCB( pTcb, - Check_Buf_Index, + Check_Buf_Index, 9+Check_Buf_Offset, // Get payload offset 9 to get protocol type. &IP_Protocol, sizeof(IP_Protocol)); @@ -1221,7 +1221,7 @@ CheckSpecialTxPktContentFromHighLayer( RetrieveSegmentDataFromTCB( pTcb, Check_Buf_Index, - IP_HeaderLen+Check_Buf_Offset, + IP_HeaderLen+Check_Buf_Offset, &u2Tmp, 2); IP_Src_Port = H2N2BYTE(u2Tmp); @@ -1230,16 +1230,16 @@ CheckSpecialTxPktContentFromHighLayer( RetrieveSegmentDataFromTCB( pTcb, Check_Buf_Index, - IP_HeaderLen + Check_Buf_Offset + 2, + IP_HeaderLen + Check_Buf_Offset + 2, &u2Tmp, 2); IP_Dst_Port = H2N2BYTE(u2Tmp); - } - + } + if(IP_Protocol == 0x11) // UDP protocol { pTcb->IPType = TX_IPTYPE_UDP; - + //DbgPrint("DHCP_Src_Port = %d, DHCP_Dst_Port = %d \n", DHCP_Src_Port, DHCP_Dst_Port); if((IP_Src_Port == 68 && IP_Dst_Port == 67) || (IP_Src_Port == 67 && IP_Dst_Port == 68)) @@ -1250,8 +1250,8 @@ CheckSpecialTxPktContentFromHighLayer( //Note: // osMpdu may not include the packet content but just 802.11 header. FillOctetString(osMpdu, pTcb->BufferList[0].VirtualAddress, (u2Byte)pTcb->BufferList[0].Length); - pRaddr = Frame_pRaddr(osMpdu); - + pRaddr = Frame_pRaddr(osMpdu); + // // Translate the DHCP offer packet from multicast packet to unicast so that the client // can receive the DHCP response easier. By Bruce, 2011-01-06. @@ -1270,16 +1270,16 @@ CheckSpecialTxPktContentFromHighLayer( 6); // Check if this mac address is belong to one of the clients. - pEntry = AsocEntry_GetEntry(&pTcb->SourceAdapt->MgntInfo, ClientMac); - + pEntry = AsocEntry_GetEntry(&pTcb->SourceAdapt->MgntInfo, ClientMac); + if(pEntry != NULL) - { + { RT_PRINT_ADDR(COMP_AP, DBG_LOUD, "Replace the DHCP receiver address from multicast to ", ClientMac); // Copy the client mac address to the ra. - PlatformMoveMemory(pRaddr, ClientMac, 6); + PlatformMoveMemory(pRaddr, ClientMac, 6); PlatformMoveMemory(pTcb->DestinationAddress, ClientMac, 6); } - } + } return TRUE; } @@ -1291,7 +1291,7 @@ CheckSpecialTxPktContentFromHighLayer( else if(0x06 == IP_Protocol) // TCP { pTcb->IPType = TX_IPTYPE_TCP; - + // DbgPrint("TCP src port = %d, dst port = %d\n", IP_Src_Port, IP_Dst_Port); if(IP_Src_Port == 7236 || IP_Dst_Port == 7236 || IP_Src_Port == 8554 || IP_Dst_Port == 8554) @@ -1304,8 +1304,8 @@ CheckSpecialTxPktContentFromHighLayer( continue; RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "", pTcb->BufferList[offset].VirtualAddress, pTcb->BufferList[offset].Length); - } - } + } + } } return FALSE; } @@ -1347,12 +1347,12 @@ FillPartialHeader( || MgntActQuery_ApType(Adapter) == RT_AP_TYPE_LINUX) { // - // 061227, rcnjko: - // Translate header for NDIS6 faked AP mode (UI make upper layer take us as AdHoc mode). + // 061227, rcnjko: + // Translate header for NDIS6 faked AP mode (UI make upper layer take us as AdHoc mode). // if( pMgntInfo->OpMode == RT_OP_MODE_AP && IsFrameTypeData((pTcb->BufferList[0].VirtualAddress)) ) { - u1Byte tmpAddr[6]; + u1Byte tmpAddr[6]; u1Byte tmpAddr2[6]; SET_80211_HDR_TO_DS(pHeader, 0); @@ -1389,17 +1389,17 @@ FillPartialHeader( pTcb->bMulticast = MacAddr_isMulticast(pTcb->DestinationAddress); else pTcb->bMulticast = FALSE; - + GET_80211_HDR_ADDRESS1(pHeader, Addr1); - + // Find TypeLength, 2006.10.27, refined by shien chang. RetrieveSegmentDataFromTCB( - pTcb, + pTcb, 0, // The number of buffer in bufferlist to skip. 30, // The TypeLength offset. 24 for Wireless header, 6 for LLC TypeLengthBuf, // 2 Byte buffer for TypeLength data. - sizeof(TypeLengthBuf)); // Buffer length. - + sizeof(TypeLengthBuf)); // Buffer length. + TypeLength=(((u2Byte)TypeLengthBuf[0])<<8) + TypeLengthBuf[1]; if(TypeLength == 0x888e) @@ -1447,14 +1447,14 @@ FillPartialHeader( if(bIsSpecialPkt) { // Use low rate to send DHCP packet. - if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) + if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) { pTcb->DataRate = MgntQuery_TxRateExcludeCCKRates(pMgntInfo->mBrates);//0xc;//ofdm 6m pTcb->bTxDisableRateFallBack = FALSE; } else { - pTcb->DataRate = pMgntInfo->HighestBasicRate; + pTcb->DataRate = pMgntInfo->HighestBasicRate; //disable rate fallback for EAPOL packate to resolve 5G ad hoc cck hang. zhiyuan 2012/04/28 //SUT disconnect,DUT will indication OS start association succuss,and send eapol packet in AES MODE.this will cause cck hang on 5G. if(IS_WIRELESS_MODE_A(Adapter) || IS_WIRELESS_MODE_N_5G(Adapter)) @@ -1470,7 +1470,7 @@ FillPartialHeader( GET_POWER_SAVE_CONTROL(pMgntInfo)->bLeisurePs) { //by tynli pMgntInfo->DelayLPSLastTimeStamp = PlatformGetCurrentTime(); - + // 20100902 Joseph: Since we send NULL frame in LeisurePSLeave() function, TX_SPINLOCK // shall be release for all product and OS. Originally, TX_SPINLOCK is raised twice here and // system hang immediately. @@ -1483,7 +1483,7 @@ FillPartialHeader( } } //************************************************************************* - + //3 Add SecurityHeader if(!IsSecProtEapolBeforeKeyInstalled(pTcb->EncInfo.SecProtInfo) && MgntGetEncryptionInfo(Adapter,pTcb,&pTcb->EncInfo,FALSE) @@ -1503,7 +1503,7 @@ FillPartialHeader( } RT_DISP(FQoS, QoS_INIT, ("FillPartialHeader CurrentQosMode=%d\r\n", pMgntInfo->pStaQos->CurrentQosMode)); - + //3 Added QoS Control if(!MacAddr_isMulticast(Addr1) && (pMgntInfo->pStaQos->CurrentQosMode > QOS_DISABLE )) { @@ -1512,7 +1512,7 @@ FillPartialHeader( { pu1Byte dstaddr = (pu1Byte)pTcb->DestinationAddress; PRT_WLAN_STA pSTA = AsocEntry_GetEntry( pMgntInfo, dstaddr); - + if(pSTA!=NULL) { if(pSTA->QosMode > QOS_DISABLE ) @@ -1521,7 +1521,7 @@ FillPartialHeader( } else// if(pMgntInfo->mActingAsAp && pSTA!=NULL) bInsertQoS = TRUE; - + if(bInsertQoS == TRUE) { pTcb->BufferList[0].Length += sQoSCtlLng; @@ -1584,17 +1584,17 @@ GetTcbDestaddr( ) { if( pTcb->ProtocolType==RT_PROTOCOL_802_3 ) - { - *ppDestaddr = pTcb->BufferList[0].VirtualAddress; - } + { + *ppDestaddr = pTcb->BufferList[0].VirtualAddress; + } else - { - *ppDestaddr = pTcb->BufferList[0].VirtualAddress+4; - } - if( TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER) || + { + *ppDestaddr = pTcb->BufferList[0].VirtualAddress+4; + } + if( TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER) || TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_PACKET_SHIFT)) *ppDestaddr += Adapter->TXPacketShiftBytes; - + } @@ -1615,11 +1615,11 @@ PreTransmitTxDoCoalesce( if(pTcb->ColoaseMethod == 2) bColoaseResult = TxDoCoalescePciE(Adapter, pTcb); - else + else { bColoaseResult = TxDoCoalesce(Adapter, pTcb); } - + if(!bColoaseResult) { ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); @@ -1641,8 +1641,8 @@ PreTransmitWaitQueue( { if(!RTIsListEmpty(Get_WAIT_QUEUE(Adapter, pTcb->SpecifiedQueueID))) { - RT_TRACE( COMP_SEND, DBG_TRACE, - ("PreTransmitTCB(): there is already packets queued in wait queue(%d)\n", + RT_TRACE( COMP_SEND, DBG_TRACE, + ("PreTransmitTCB(): there is already packets queued in wait queue(%d)\n", pTcb->SpecifiedQueueID)); RTInsertTailListWithCnt(Get_WAIT_QUEUE(Adapter, pTcb->SpecifiedQueueID), &pTcb->List, GET_WAIT_QUEUE_CNT(Adapter,pTcb->SpecifiedQueueID)); @@ -1684,9 +1684,9 @@ PreTransmitTCB( PADAPTER DefAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pDefaultMgntInfo =&(DefAdapter->MgntInfo); RT_STATUS rtStatus; - + pTcb->SourceAdapt = Adapter; - + Adapter->ShortcutIndex = 0; if( Adapter->SNForShortcut >= 255 ) @@ -1701,7 +1701,7 @@ PreTransmitTCB( return FALSE; } - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState)); if(rtState == eRfOff) { // This packet should not be sent if RF is OFF, drop it !! @@ -1720,7 +1720,7 @@ PreTransmitTCB( } do{ - + { if(pTcb->bAMSDUProcessed == FALSE) { @@ -1739,19 +1739,19 @@ PreTransmitTCB( TranslateHeader(Adapter, pTcb); pTcb->ProtocolType=RT_PROTOCOL_802_11; - - // We only check if GroupTransmitKey exists when + + // We only check if GroupTransmitKey exists when // sending non-EAPPacket in Ad-Hoc mode with AES or TKIP encryption. // 2004.11.30, by rcnjko. if( pMgntInfo->mIbss && !IsSecProtEapol(pTcb->EncInfo.SecProtInfo) ) { if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_TKIP || - pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_AESCCMP ) + pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_AESCCMP ) { if(pSecInfo->KeyLen[pSecInfo->DefaultTransmitKeyIdx] == 0) { ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); - break; + break; } } } @@ -1759,10 +1759,10 @@ PreTransmitTCB( // Not to send packet if there is no key. Added by Annie , 2006-04-27. if( SecDropForKeyAbsent( Adapter, pTcb ) ) { - ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); + ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); break; } - + bCheckLocalToWds = TRUE; } else @@ -1788,7 +1788,7 @@ PreTransmitTCB( if(SecDropForKeyAbsent( Adapter, pTcb ) ) { RT_TRACE(COMP_SEC,DBG_LOUD,("PreTransmit :SecDropForKeyAbsent: drop data \n")); - ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); + ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); break; } } @@ -1815,8 +1815,8 @@ PreTransmitTCB( u1Byte CurrCcxVerNumber = 0; CCX_QueryVersionNum(Adapter, &CurrCcxVerNumber); - CCX_QueryCACSupport(Adapter, &bCcxCACEnable); - + CCX_QueryCACSupport(Adapter, &bCcxCACEnable); + if((bCcxCACEnable) && CurrCcxVerNumber >= 4) { TR_ACTION trAction = TR_ACTION_CONTINUE; @@ -1838,13 +1838,13 @@ PreTransmitTCB( if(pMgntInfo->pStaQos->AcmMethod == eAcmWay2_SW) { // - // In admission cotrolled queue, the packet should be + // In admission cotrolled queue, the packet should be // (1) sent as the UP defined, or // (2) dropped, if the TSID is defined but the TS is invalid/rejected/non-used, or // (3) buffered, if the TSID and TS is valid but the used time exceeds the admitted time, or // (4) mapped to the lower UP that does not require ACM (WiFi test). // Note: - // If the pMgntInfo->pStaQos->AcmMethod is set eAcmWay2_SW, the ACM is absolutely + // If the pMgntInfo->pStaQos->AcmMethod is set eAcmWay2_SW, the ACM is absolutely // handled by SW and the actions follow the 4 items described of the above. // By Bruce, 2009-03-25. // @@ -1860,7 +1860,7 @@ PreTransmitTCB( break; } } - + if(AMSDUTransmitTCB(Adapter, &pTcb, pHeader) == FALSE) return FALSE; } @@ -1876,16 +1876,16 @@ PreTransmitTCB( RT_TRACE_F(COMP_TDLS, DBG_WARNING, ("TDLS_PrepareTxFeedback failed!\n")); } } - + // Forward the frame from local machine to WDS if necessary. if(bCheckLocalToWds && ACTING_AS_AP(Adapter) && pMgntInfo->WdsMode != WDS_DISABLED) { - AP_WdsTx(Adapter, pTcb); + AP_WdsTx(Adapter, pTcb); } bMicFailureReport = IsSecProtMicFailureReport(pTcb->EncInfo.SecProtInfo); - // Query management for data rate + // Query management for data rate pTcb->DataRate = MgntQuery_FrameTxRate( Adapter, pTcb ); // Calculate TKIP MIC if this packet will be encrypted by HW or SW. @@ -1896,7 +1896,7 @@ PreTransmitTCB( SecCalculateMIC(Adapter, pTcb); }else if( pTcb->EncInfo.bMFPPacket ) { - // TKIP MFP case + // TKIP MFP case RT_TRACE( COMP_CCX , DBG_LOUD , ("===> TKIP MFP Calculate MIC \n") ); SecCalculateMIC(Adapter, pTcb); } @@ -1904,7 +1904,7 @@ PreTransmitTCB( RemoveZeroLengthBuffer(pTcb); //2 After this point, the TCB should never contain zero-length buffer //2 Because all zero-length buffers are reserved for header translation - if( IsFrameTypeData(pHeader) ) + if( IsFrameTypeData(pHeader) ) { if(RT_STATUS_SUCCESS == WAPI_SecFuncHandler(WAPI_PRETRANSMITTCB, Adapter, (PVOID)pTcb, WAPI_END)) break; @@ -1917,10 +1917,10 @@ PreTransmitTCB( if(PreTransmitTxDoCoalesce(Adapter, pTcb, &pHeader) == FALSE)// '&' add by ylb 20130508 for pHeader is wrong when enable AMSDU break; } - + //1 Caution: Don't add any code between coalesce and fragment. //1 Because the length information may be wrong. - if(CheckFragment(Adapter, pTcb, Adapter->TXPacketShiftBytes)) + if(CheckFragment(Adapter, pTcb, Adapter->TXPacketShiftBytes)) { FragmentTCB(Adapter, pTcb); } @@ -1930,9 +1930,9 @@ PreTransmitTCB( // Update fragment information for non-fragment case. 2005.03.08, by rcnjko. if(pTcb->FragCount==1) - { + { pTcb->FragLength[0]=(u2Byte)pTcb->PacketLength; - pTcb->FragBufCount[0]=pTcb->BufferCount; + pTcb->FragBufCount[0]=pTcb->BufferCount; } // @@ -1946,12 +1946,12 @@ PreTransmitTCB( RT_ASSERT( pTcb->SpecifiedQueueID!=UNSPECIFIED_QUEUE_ID, ("PreTransmitTCB(): %d: SpecifiedQueueID should not be UNSPECIFIED!!\n", pTcb->SpecifiedQueueID ) ); - // Fill up WEP bit and IV of each fragment in the TCB if necessary. + // Fill up WEP bit and IV of each fragment in the TCB if necessary. if (SecFillHeader(Adapter, pTcb)) { // Do software encryption if necessary. - if( !pTcb->EncInfo.IsEncByHW || pSecInfo->SWTxEncryptFlag ) - { + if( !pTcb->EncInfo.IsEncByHW || pSecInfo->SWTxEncryptFlag ) + { SecSoftwareEncryption(Adapter, pTcb); } } @@ -1967,7 +1967,7 @@ PreTransmitTCB( // EAPoL can't be Fragment !! if( IsSecProtEapol(pTcb->EncInfo.SecProtInfo) ) { - // Get 4-Way 2nd Packet!! EAP_HDR_LEN + // Get 4-Way 2nd Packet!! EAP_HDR_LEN pEapMess = pTcb->BufferList[0].VirtualAddress + EAP_HDR_LEN; EapPkLen = pTcb->PacketLength - EAP_HDR_LEN; if( bEncrypt ) @@ -1988,7 +1988,7 @@ PreTransmitTCB( pEapKeyMess.Octet = pEapMess + LIB1X_EAPOL_HDRLEN; pEapKeyMess.Length = (u2Byte)(EapPkLen- LIB1X_EAPOL_HDRLEN); - + if( Message_KeyType(pEapKeyMess) == type_Pairwise ) { @@ -2007,11 +2007,11 @@ PreTransmitTCB( } } - + } RT_PRINT_DATA(COMP_SEC, DBG_LOUD, "S5 mbS5SNose \n", pMgntInfo->mbS5SNose , KEY_NONCE_LEN); - + } } @@ -2031,7 +2031,7 @@ PreTransmitTCB( // RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "PreTransmitTCB(): Packet Buffered pTcb->DestinationAddress: ", pTcb->DestinationAddress); break; } - + // // Map channel switch pkt to power save condition // TRUE: buffer pkt @@ -2054,9 +2054,9 @@ PreTransmitTCB( // Redirect to Specific Queue ------------------------------------------------------- // - // We should not redirect queue ID for upper Miracast application, it might cause + // We should not redirect queue ID for upper Miracast application, it might cause // compatibility issue for multi-queue transmission on DMP site. And we need to decide TCB priority for HW-AC mapping - // as well to prevent incorrect TXDMA mapping, e.g., VI_QUEUE(LOW_QUEUE for Non-Qos and default specific queue in AP mode) + // as well to prevent incorrect TXDMA mapping, e.g., VI_QUEUE(LOW_QUEUE for Non-Qos and default specific queue in AP mode) // map to QSLT_BE. // 2013.10.14. // @@ -2066,7 +2066,7 @@ PreTransmitTCB( QueueID = pTcb->SpecifiedQueueID; // ------------------------------------------------------------------------------ - + // SW-AC Queue and HW-AC Queue Coherence (cf. MapHwQueueToFirmwareQueue) --- switch(QueueID) { @@ -2083,7 +2083,7 @@ PreTransmitTCB( // Drop miracast RTP packet if necessary // { - PMULTICHANNEL_PORT_CONTEXT pPortContext = (PMULTICHANNEL_PORT_CONTEXT)(pTcb->SourceAdapt->MultiChannel); + PMULTICHANNEL_PORT_CONTEXT pPortContext = (PMULTICHANNEL_PORT_CONTEXT)(pTcb->SourceAdapt->MultiChannel); if(TEST_FLAG(pPortContext->FCSPortState, FCS_STATE_PKT_DROPPED) && (TX_IPTYPE_UDP == pTcb->IPType) ) { ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); @@ -2092,33 +2092,33 @@ PreTransmitTCB( } } #endif - + if(pHalData->bAutoAMPDUBurstMode && pTcb->SpecifiedQueueID < BEACON_QUEUE) { if(pMgntInfo->LinkDetectInfo.bBusyTrafficAccordingTP && pMgntInfo->bMediaConnect && (Adapter->bInHctTest==FALSE)) { if( IsFrameTypeData(pHeader)) - { + { RTInsertTailListWithCnt(Get_WAIT_QUEUE(Adapter, pTcb->SpecifiedQueueID), &pTcb->List, GET_WAIT_QUEUE_CNT(Adapter,pTcb->SpecifiedQueueID)); return FALSE; - } + } } if(!pMgntInfo->LinkDetectInfo.bBusyTrafficAccordingTP && (*GET_WAIT_QUEUE_CNT(Adapter,pTcb->SpecifiedQueueID))> 0) { HAL_HW_TIMER_TYPE TimerType = HAL_TIMER_EARLYMODE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_HW_REG_TIMER_RESTART, (pu1Byte)(&TimerType)); - } + } } - - // - // 1. We should insert the packet into tail of TcbWaitQueue, - // and transmit it TxHandleInterrupt() or UsbIoCompeleteSentXXX() + + // + // 1. We should insert the packet into tail of TcbWaitQueue, + // and transmit it TxHandleInterrupt() or UsbIoCompeleteSentXXX() // with TransmitTCB(). // 2. Other conditions: - // Out of TCB, TxDesc, NetworkSetupInProgress(). - if( (IsFrameTypeData(pHeader) && - + // Out of TCB, TxDesc, NetworkSetupInProgress(). + if( (IsFrameTypeData(pHeader) && + ((pMgntInfo->bScanInProgress) || GET_HAL_DATA(Adapter)->bNeedQueuePacketInIQKProgress) && // Marked: To shorten the Ping roundtrip time. Use TxPause to hold packets. !IsMgntNullFrame(pHeader) && @@ -2149,7 +2149,7 @@ PreTransmitTCB( if(PreTransmitWaitQueue(Adapter, pTcb, &bImmediateComplete) == TRUE) break; - if(GET_HAL_DATA(Adapter)->AMPDUBurstMode == RT_AMPDU_BRUST_92D || + if(GET_HAL_DATA(Adapter)->AMPDUBurstMode == RT_AMPDU_BRUST_92D || (GET_HAL_DATA(Adapter)->AMPDUBurstMode == RT_AMPDU_BRUST_8814A )|| (GET_HAL_DATA(Adapter)->AMPDUBurstMode == RT_AMPDU_BRUST_8822B)) { @@ -2165,7 +2165,7 @@ PreTransmitTCB( } } - if( IsFrameTypeData(pHeader) ) + if( IsFrameTypeData(pHeader) ) { // Start Timer for LED Tx/Rx blinking if(Adapter->bInHctTest) @@ -2177,7 +2177,7 @@ PreTransmitTCB( if (Adapter->LedTxCnt == 0) PlatformSetTimer(Adapter, &pMgntInfo->LedTimer, 50); } - + Adapter->LedTxCnt++; } @@ -2185,10 +2185,10 @@ PreTransmitTCB( // NOTE! DO NOT ACCESS pTcb after TransmitTCB() return sucessfully. // Otherwise, it will cause Tx dead locked at USB path. // 061122, by rcnjko. - // + // rtStatus = TransmitTCB(Adapter, pTcb); if(RT_STATUS_SUCCESS != rtStatus && RT_STATUS_PKT_DROP != rtStatus) - { + { RT_TRACE(COMP_SEND, DBG_LOUD, ("TransmitTcb fail\n")); RTInsertTailListWithCnt(Get_WAIT_QUEUE(Adapter, pTcb->SpecifiedQueueID), &pTcb->List, GET_WAIT_QUEUE_CNT(Adapter,pTcb->SpecifiedQueueID)); @@ -2211,24 +2211,24 @@ PreTransmitTCB( } // - // 041005, rcnjko: - // Disassociate from the AP after MIC failure report sent - // if twice MIC error occured in 60 seconds. + // 041005, rcnjko: + // Disassociate from the AP after MIC failure report sent + // if twice MIC error occured in 60 seconds. // if( bMicFailureReport && // Replaced with a local varible to prevent access pTcb after TransmitTCB(), 061122, by rcnjko. pSecInfo->bToDisassocAfterMICFailureReportSend ) // Modified by Annie for WiFi WPA2 Test in SGS, 2006-06-14. { - // For debug purpose. + // For debug purpose. RT_PRINT_DATA( COMP_SEC, DBG_LOUD, "PreTransmitTCB(): Send MIC Report", pTcb->BufferList[0].VirtualAddress, pTcb->BufferList[0].Length); // Reset bToDisassocAfterMICFailureReportSend. - // bToDisassocAfterMICFailureReportSend has better to be reset + // bToDisassocAfterMICFailureReportSend has better to be reset // if the MIC failure report is not sent by upper layer after a period. - pSecInfo->bToDisassocAfterMICFailureReportSend = FALSE; - - // Disassociate from AP. + pSecInfo->bToDisassocAfterMICFailureReportSend = FALSE; + + // Disassociate from AP. // Note that, we must relase Tx spinlock before calling MgntActSet_802_11_DISASSOCIATE() - // because SendDisassociation() will acquire it again, which will cause OS hang. + // because SendDisassociation() will acquire it again, which will cause OS hang. // 2005.08.02, by rcnjko. PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); MgntActSet_802_11_DEAUTHENTICATION(Adapter, mic_failure); // Modified for WiFi Mandatory Testplan v1.2: We shall send Deauthentication packet instead of Disassociation packet. Annie, 2006-05-04. @@ -2267,7 +2267,7 @@ TxDoCoalesce( return FALSE; // Note that! we have not yet reserved Tx Desc for 8187, so header offset is 0. - bFragment=CheckFragment(Adapter, pTcb, 0); + bFragment=CheckFragment(Adapter, pTcb, 0); BytesCopied = Adapter->TXPacketShiftBytes; // Consider QoS data frame. Added by Annie, 2006-01-08. @@ -2282,8 +2282,8 @@ TxDoCoalesce( for(i=0;iBufferCount;i++) { PlatformMoveMemory( - pCoalseceBuffer->Buffer.VirtualAddress+BytesCopied, - pTcb->BufferList[i].VirtualAddress, + pCoalseceBuffer->Buffer.VirtualAddress+BytesCopied, + pTcb->BufferList[i].VirtualAddress, pTcb->BufferList[i].Length); BytesCopied += (u2Byte)pTcb->BufferList[i].Length; } @@ -2328,7 +2328,7 @@ TxDoCoalesce( } } } - + //2 Modify buffer list pTcb->BufferList[0]=pCoalseceBuffer->Buffer; pTcb->BufferList[0].Length=BytesCopied; @@ -2349,13 +2349,13 @@ CheckFragment( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; pu1Byte pHeader = NULL; - pu1Byte pRaddr = NULL; + pu1Byte pRaddr = NULL; pHeader = pTcb->BufferList[0].VirtualAddress+ nHdrOffset; - pRaddr = pHeader + 4; + pRaddr = pHeader + 4; + - if(pTcb->bBTTxPacket) return FALSE; @@ -2389,12 +2389,12 @@ CheckFragment( { PRT_WLAN_STA pEntry = AsocEntry_GetEntry( pMgntInfo, pTcb->DestinationAddress); if(pEntry != NULL) - { - if(pEntry->IOTAction & HT_IOT_ACT_AMSDU_ENABLE) + { + if(pEntry->IOTAction & HT_IOT_ACT_AMSDU_ENABLE) return FALSE; else if(pEntry->IOTAction & HT_IOT_ACT_AMSDU_AMPDU) return FALSE; - } + } } else return FALSE; @@ -2449,24 +2449,24 @@ FragmentTCB( { Length=(u2Byte)(CoalesceBuffer.Length-Offset); } - + GET_SHARED_MEMORY_WITH_OFFSET( - &CoalesceBuffer, - &pTcb->BufferList[FragIndex], - Offset, + &CoalesceBuffer, + &pTcb->BufferList[FragIndex], + Offset, Length); pTcb->FragLength[FragIndex]=Length; pTcb->FragBufCount[FragIndex]=1; - + Offset+=Length; // offset ICV or MIC fild ,2007/12/28 by CCW Offset += pMgntInfo->SecurityInfo.EncryptionTailOverhead; - + FragIndex++; }while(OffsetFragCount=FragIndex; pTcb->BufferCount=FragIndex; } @@ -2491,10 +2491,10 @@ FragmentTCB( if(FragLen + BufferList[ReadBufferIndex].Length > FragThreshold) { AddLen=FragThreshold-FragLen; - + pTcb->BufferList[WriteBufferIndex]=BufferList[ReadBufferIndex]; pTcb->BufferList[WriteBufferIndex].Length=AddLen; - + MAKE_SHARED_MEMORY_OFFSET_AT_FRONT( &BufferList[ReadBufferIndex], AddLen); @@ -2517,7 +2517,7 @@ FragmentTCB( { //2 Insert header for 2~ fragment pTcb->Header[FragIndex].Length=sMacHdrLng+QosCtrlLen+pMgntInfo->SecurityInfo.EncryptionHeadOverhead; pTcb->BufferList[WriteBufferIndex++]=pTcb->Header[FragIndex]; - + FragLen=sMacHdrLng+QosCtrlLen+pMgntInfo->SecurityInfo.EncryptionHeadOverhead; FragBufferCount=1; } @@ -2534,7 +2534,7 @@ FragmentTCB( for(i=1;iFragCount;i++) { PlatformMoveMemory( - pTcb->BufferList[FragIndex].VirtualAddress + Adapter->TXPacketShiftBytes, + pTcb->BufferList[FragIndex].VirtualAddress + Adapter->TXPacketShiftBytes, pTcb->BufferList[0].VirtualAddress + Adapter->TXPacketShiftBytes, sMacHdrLng); @@ -2542,7 +2542,7 @@ FragmentTCB( { SET_80211_HDR_MORE_FRAG(pTcb->BufferList[FragIndex].VirtualAddress+Adapter->TXPacketShiftBytes, 0); // Clear more frag for last fragment } - + SET_80211_HDR_FRAGMENT(pTcb->BufferList[FragIndex].VirtualAddress+Adapter->TXPacketShiftBytes, (u1Byte)i); FragIndex+=pTcb->FragBufCount[i]; @@ -2550,22 +2550,22 @@ FragmentTCB( } /*----------------------------------------------------------------------------- -// Procedure: Transmit one packet +// Procedure: Transmit one packet // Description: Emily 2006/04/30, For 8190 PCI - When configure tx descriptor under 8190Pci hardware, reserve the - first one descriptor for Firmware Info(not insert, cause the descriptor - address nust be contineous). Then, fill descriptor for each packet - buffer from the second descriptor. Configure first descriptor and + When configure tx descriptor under 8190Pci hardware, reserve the + first one descriptor for Firmware Info(not insert, cause the descriptor + address nust be contineous). Then, fill descriptor for each packet + buffer from the second descriptor. Configure first descriptor and pTcb->nDescUsed++ before set Own bit. Joseph 2006/10/13, Revision - Integrate the procedure of protection mode determination and duration + Integrate the procedure of protection mode determination and duration calculation into single function respectively. TransmitTcb() handle the information of each MSDU. For further improvement, we can add an function like "HandleMPDUInfo" - to handle specific information of every fragment of MSDU. But now there - are only TxTime calculation is specific to each MPDU, so just leave this + to handle specific information of every fragment of MSDU. But now there + are only TxTime calculation is specific to each MPDU, so just leave this idea for future extension. Return value: TransmitTCB returns RT_STATUS_RESOURCE if TransmitTCB occur some error and cannot Tx. @@ -2586,13 +2586,13 @@ TransmitTCB( u2Byte SequenceNumber = 0; pu1Byte pFrame = GET_FRAME_OF_FIRST_FRAG(pAdapter, pTcb); u1Byte QueueID = pTcb->SpecifiedQueueID; - pu1Byte pRecvAddr = NULL; + pu1Byte pRecvAddr = NULL; s2Byte BufferCount; RT_RF_POWER_STATE rfState; PADAPTER Adapter = GetDefaultAdapter(pAdapter); - pMgntInfo = &(Adapter->MgntInfo); + pMgntInfo = &(Adapter->MgntInfo); Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); if(rfState != eRfOn) @@ -2607,9 +2607,9 @@ TransmitTCB( { //tynli_test_32k 2011.02.25. u1Byte FwPSState; - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(pAdapter, FwPSState)) - { + { RT_TRACE(COMP_SEND, DBG_LOUD, ("TransmitTCB(): CANNOT TX---> Wake up Hw. return RT_STATUS_RESOURCE\n")); if( PlatformIsWorkItemScheduled(&(pMgntInfo->PowerSaveControl.FwPsClockOnWorkitem)) == FALSE) { @@ -2641,7 +2641,7 @@ TransmitTCB( Adapter->HalFunc.TxFillDescriptorHandler(Adapter, pTcb, 0, 0, 0, 0); return RT_STATUS_SUCCESS; } - + #else if(FALSE == PlatformIsTxQueueAvailable(Adapter, QueueID, pTcb->BufferCount)) { @@ -2649,10 +2649,10 @@ TransmitTCB( return RT_STATUS_RESOURCE; } #endif - + // Note: - // To prevent lossing tx report from the HW restriction, make sure only one tcb + // To prevent lossing tx report from the HW restriction, make sure only one tcb // with tx feedback info in HW queue. if(TxFeedbackIsTxFeedbackInfoInstalled(pTcb)) { @@ -2664,7 +2664,7 @@ TransmitTCB( return RT_STATUS_RESOURCE; } } - + if(RT_IN_PS_LEVEL(Adapter, RT_RF_LPS_DISALBE_2R)) { BOOLEAN Disable2R = FALSE; @@ -2688,12 +2688,12 @@ TransmitTCB( RT_TRACE_F(COMP_CMD, DBG_LOUD, ("Return TRUE because Entry was release and the data frame needs to drop, return RT_STATUS_RESOURCE\n")); ReturnTCB(Adapter, pTcb, RT_STATUS_SUCCESS); return RT_STATUS_PKT_DROP; - }//if + }//if // Check if the A-MPDU aggreagtion is allowed and get its aggregation capabilities/ MgntQuery_AggregationCapability(pTcb->SourceAdapt, pRecvAddr, pTcb); - /* 2007/03/06 MH This function check if short GI is enabled, and current + /* 2007/03/06 MH This function check if short GI is enabled, and current transmit bandwidth for TX firmware info in RTL8190. */ MgntQuery_ShortGI(pTcb->SourceAdapt, pTcb); @@ -2710,7 +2710,7 @@ TransmitTCB( if(pTcb->SourceAdapt->TDLSSupport) TDLS_QueryCapability(pTcb->SourceAdapt, pTcb); - + // // This function will determine if we need to send protection frame and how to send protection frame. @@ -2727,7 +2727,7 @@ TransmitTCB( // Qos Data frame will use individual number sequence according to destination address and TID. // SequenceNumber = MgntQuery_SequenceNumber( - pTcb->SourceAdapt, + pTcb->SourceAdapt, pFrame, pTcb->bBTTxPacket, pRecvAddr, @@ -2744,7 +2744,7 @@ TransmitTCB( // Duration field and SeqNum field is now handled in this function. // FillFrameField(Adapter, pTcb, SequenceNumber); - + #if WLAN_ETW_SUPPORT // // Assign sequence number @@ -2754,7 +2754,7 @@ TransmitTCB( //cosa add for debug use. 08/23/2007 Adapter->TxStats.NumTransmitTCBAvailable[QueueID]++; - + // // Fill Tx Descriptor // @@ -2762,13 +2762,13 @@ TransmitTCB( firstDesc=0; else firstDesc = curDesc = Adapter->NextTxDescToFill[QueueID]; - + pTcb->nDescUsed=0; pTcb->nFragSent = 0; pTcb->nFragCompleted = 0; Adapter->nFragDescUsed=0; - BufferCount = pTcb->BufferCount; + BufferCount = pTcb->BufferCount; for(i=0;i< pTcb->BufferCount;i++) { @@ -2793,9 +2793,9 @@ TransmitTCB( #if !defined(MUTIPLE_BULK_OUT) // - // 050413, rcnjko: + // 050413, rcnjko: // For 8187, we must keep at most one Irp Pending in each endpoint, - // so, we send one fragment in TransmitTCB() and will handle other fragment + // so, we send one fragment in TransmitTCB() and will handle other fragment // in the complete handler of this endpoint. // if(pTcb->nDescUsed == 1) @@ -2806,7 +2806,7 @@ TransmitTCB( if(IS_RW_PTR(Adapter)) curDesc = Adapter->CurrentTXWritePoint[QueueID]; - + #if WLAN_ETW_SUPPORT // @@ -2839,7 +2839,7 @@ TransmitTCB( if(!IS_RW_PTR(Adapter)) curDesc=(curDesc+1)%Adapter->NumTxDesc[QueueID]; - + } return RT_STATUS_SUCCESS; @@ -2878,7 +2878,7 @@ CountTxStatistics( { return; } - + if( pTcb->status.TOK ) { @@ -2982,7 +2982,7 @@ UpdateEarlyModeInfo( break; default: maxPktNum = 0; - break; + break; } if(GET_HAL_DATA(Adapter)->AMPDUBurstNum < maxPktNum) @@ -3009,11 +3009,11 @@ UpdateEarlyModeInfo( case RT_ENC_ALG_SMS4: additionLen = 20; - break; + break; case RT_ENC_ALG_WEP: default: - break; + break; } if(MacAddr_isBcst(pTcb->DestinationAddress) ||MacAddr_isMulticast(pTcb->DestinationAddress) || !IsQoSDataFrame(pFrame)) @@ -3022,26 +3022,26 @@ UpdateEarlyModeInfo( // Prefast warning 6011 if(plistHead != NULL && RTIsListEmpty(plistHead)) return FALSE; - + // Prefast warning 6011 if (plistHead != NULL) { pEntry = RTGetHeadList(plistHead); } - + pTcb->EMPktNum = 0; do{ pNextTcb = (PRT_TCB)pEntry; // Prefast warning C6011: Dereferencing NULL pointer 'pNextTcb'. if((pNextTcb != NULL) && (PlatformCompareMemory(pTcb->DestinationAddress,pNextTcb->DestinationAddress,ETHERNET_ADDRESS_LENGTH) == 0) && (pTcb->priority == pNextTcb->priority)) - { + { pTcb->EMPktLen[pTcb->EMPktNum] =pNextTcb->FragLength[0]+additionLen; pTcb->EMPktNum ++; } else break; - + // Prefast warning C6011: Dereferencing NULL pointer 'pEntry'. if (pEntry != NULL) { @@ -3066,7 +3066,7 @@ TxCheckStuck( PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_TCB pTcb; u1Byte ResetThreshold=NIC_SEND_HANG_THRESHOLD_NORMAL; - + // // Decide Stuch threshold according to current power save mode // @@ -3086,20 +3086,20 @@ TxCheckStuck( default: //for MacOS comipler warning: "eAutoPs" not handled in switch break; } - + // // Check whether specific tcb has been queued for a specific time // for(QueueID = 0; QueueID < MAX_TX_QUEUE; QueueID++) { - + if(RTIsListEmpty(&Adapter->TcbBusyQueue[QueueID])) continue; else { pTcb = (PRT_TCB)RTGetHeadList(&Adapter->TcbBusyQueue[QueueID]); pTcb->nStuckCount++; - + if(pTcb->nStuckCount > ResetThreshold) { RT_TRACE( COMP_SEND, DBG_SERIOUS, ("<== TxCheckStuck()\n") ); @@ -3133,7 +3133,7 @@ _ReturnTCB( RT_STATUS status ) { - PADAPTER Adapter = GetDefaultAdapter(pAdapter); + PADAPTER Adapter = GetDefaultAdapter(pAdapter); RT_ASSERT(IS_TX_LOCKED(Adapter) == TRUE, ("ReturnTCB(): bTxLocked(%x) should be TRUE\n!", Adapter->bTxLocked)); if(pTcb == NULL) @@ -3151,9 +3151,9 @@ _ReturnTCB( switch(pTcb->BufferType) { case RT_TCB_BUFFER_TYPE_SYSTEM: - // We MUST release tx spin lock acquired before DrvIFCompletePacket(). + // We MUST release tx spin lock acquired before DrvIFCompletePacket(). // Otherwise, nested lock acquiration might happen. - // For example, when we plug two 8187 in one machine, it will cause + // For example, when we plug two 8187 in one machine, it will cause // OS hangs at RtUsbSend(). 2005.11.17, by rcnjko. if(pTcb->Reserved != NULL) { @@ -3169,7 +3169,7 @@ _ReturnTCB( case RT_TCB_BUFFER_TYPE_BT_LOCAL: break; - + case RT_TCB_BUFFER_TYPE_RFD: ReturnRFDList(Adapter, (PRT_RFD)pTcb->Reserved); break; @@ -3191,7 +3191,7 @@ _ReturnTCB( } // Initialize TCB before insert it into TcbIdleQueue, 2005.07.06, by rcnjko. - CLEAR_FLAGS(pTcb->tcbFlags); + CLEAR_FLAGS(pTcb->tcbFlags); pTcb->DataRate=UNSPECIFIED_DATA_RATE; pTcb->bSpecifShortGI = FALSE; pTcb->bUseShortGI = FALSE; @@ -3201,7 +3201,7 @@ _ReturnTCB( pTcb->BufferCount = 0; pTcb->Reserved = NULL; pTcb->priority = 0; - pTcb->EncInfo.SecProtInfo = RT_SEC_NORMAL_DATA; + pTcb->EncInfo.SecProtInfo = RT_SEC_NORMAL_DATA; pTcb->EncInfo.IsEncByHW = FALSE; // Null Function Data Len_Adjust debug, Annie, 2006-01-06. pTcb->bFromUpperLayer = FALSE; pTcb->TSID = DEFAULT_TSID; @@ -3248,7 +3248,7 @@ _ReturnTCB( RESET_CCX_PACKET_TX_INFO(pTcb); TxFeedbackDeInstallTxFeedbackInfoForTcb(Adapter, pTcb); - + RTInsertTailListWithCnt(&Adapter->TcbIdleQueue, &pTcb->List, &Adapter->NumIdleTcb); RT_TRACE(COMP_SEND, DBG_LOUD, ("_ReturnTCB(), Adapter->NumIdleTcb = %d\n", Adapter->NumIdleTcb)); } @@ -3260,7 +3260,7 @@ ReturnTCB( PRT_TCB pTcb, RT_STATUS status ) -{ +{ if(pTcb->isUsbTxAgg) { RT_LIST_ENTRY aggList; @@ -3277,7 +3277,7 @@ ReturnTCB( while(RTIsListNotEmpty(&aggList)) { PRT_TCB pAggTcb = (PRT_TCB)RTRemoveHeadList(&aggList); - _ReturnTCB(pAdapter, pAggTcb, status); + _ReturnTCB(pAdapter, pAggTcb, status); } } else @@ -3297,7 +3297,7 @@ ReturnTCB( ) { PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); - HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pDefaultAdapter); + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pDefaultAdapter); RT_ASSERT(IS_TX_LOCKED(pDefaultAdapter) == TRUE, ("ReturnTCB(): bTxLocked(%x) should be TRUE\n!", pDefaultAdapter->bTxLocked)); @@ -3309,7 +3309,7 @@ ReturnTCB( } if (TEST_FLAG(pTcb->tcbFlags, RT_TCB_FLAG_USE_COALESCE_BUFFER)) - { + { ReturnLocalBuffer(pDefaultAdapter, pTcb->pCoalesceBuffer); // coalesece buffer is belong to each adapter. } @@ -3320,7 +3320,7 @@ ReturnTCB( if(pTcb->ColoaseMethod == 2) { u1Byte i=0; - + for (i=0; iBufferBackCount; i++) { //pTcb->BufferList[i+1] = pTcb->BufferListBack[i]; @@ -3329,13 +3329,13 @@ ReturnTCB( } } - // We MUST release tx spin lock acquired before DrvIFCompletePacket(). + // We MUST release tx spin lock acquired before DrvIFCompletePacket(). // Otherwise, nested lock acquiration might happen. - // For example, when we plug two 8187 in one machine, it will cause + // For example, when we plug two 8187 in one machine, it will cause // OS hangs at RtUsbSend(). 2005.11.17, by rcnjko. if(pTcb->Reserved != NULL) { - PlatformReleaseSpinLock(pDefaultAdapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(pDefaultAdapter, RT_TX_SPINLOCK); DrvIFCompletePacket(pDefaultAdapter, pTcb, status); PlatformAcquireSpinLock(pDefaultAdapter, RT_TX_SPINLOCK); } @@ -3344,10 +3344,10 @@ ReturnTCB( case RT_TCB_BUFFER_TYPE_LOCAL: if(pTcb->bTxCompleteLater) { - PlatformReleaseSpinLock(pDefaultAdapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(pDefaultAdapter, RT_TX_SPINLOCK); DrvIFCompletePacket(pDefaultAdapter, pTcb, RT_STATUS_SUCCESS); PlatformAcquireSpinLock(pDefaultAdapter, RT_TX_SPINLOCK); - } + } ReturnLocalBuffer(pDefaultAdapter, (PRT_TX_LOCAL_BUFFER)pTcb->Reserved); break; @@ -3392,7 +3392,7 @@ ReturnTCB( pTcb->BufferType = RT_TCB_BUFFER_TYPE_NONE; pTcb->Reserved = NULL; pTcb->priority = 0; - pTcb->EncInfo.SecProtInfo = RT_SEC_NORMAL_DATA; + pTcb->EncInfo.SecProtInfo = RT_SEC_NORMAL_DATA; pTcb->EncInfo.IsEncByHW = FALSE; // Null Function Data Len_Adjust debug, Annie, 2006-01-06. pTcb->bFromUpperLayer = FALSE; pTcb->TSID = DEFAULT_TSID; @@ -3413,7 +3413,7 @@ ReturnTCB( pTcb->G_ID = 0; pTcb->bBTTxPacket = FALSE; pTcb->BT_macId = 0; - pTcb->EncInfo.bMFPPacket = FALSE; // CCX V65 Reset + pTcb->EncInfo.bMFPPacket = FALSE; // CCX V65 Reset pTcb->sysTime[0] = 0; pTcb->sysTime[1] = 0; pTcb->sysTime[2] = 0; @@ -3444,9 +3444,9 @@ ReturnTCB( // pTcb->TcbFrameUniqueueID = 0; #endif - + if(GET_HAL_DATA(pDefaultAdapter)->AMPDUBurstMode) - { + { pTcb->bEnableEarlyMode = FALSE; pTcb->EMPktNum = 0; PlatformZeroMemory(pTcb->EMPktLen,sizeof(pTcb->EMPktLen)); @@ -3455,7 +3455,7 @@ ReturnTCB( RESET_CCX_PACKET_TX_INFO(pTcb); TxFeedbackDeInstallTxFeedbackInfoForTcb(pDefaultAdapter, pTcb); - + RTInsertTailListWithCnt(&pDefaultAdapter->TcbIdleQueue, &pTcb->List, &pDefaultAdapter->NumIdleTcb); RT_TRACE(COMP_SEND, DBG_LOUD, ("ReturnTCB(), pAdapter->NumIdleTcb = %d\n", pDefaultAdapter->NumIdleTcb)); } @@ -3499,10 +3499,10 @@ ReturnLocalBuffer( PRT_TX_LOCAL_BUFFER pLocalBuffer ) { - PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); - //RTInsertTailList(&Adapter->LocalBufferQueue, &pLocalBuffer->List); + PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); + //RTInsertTailList(&Adapter->LocalBufferQueue, &pLocalBuffer->List); RTInsertTailListWithCnt(&pDefaultAdapter->LocalBufferQueue, &pLocalBuffer->List, &pDefaultAdapter->NumLocalBufferIdle); - + } VOID @@ -3511,7 +3511,7 @@ ReturnLocalFWBuffer( PRT_TX_LOCAL_BUFFER pLocalBuffer ) { - PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); + PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); RTInsertTailListWithCnt(&pDefaultAdapter->LocalFWBufferQueue, &pLocalBuffer->List, &pDefaultAdapter->NumLocalFWBufferIdle); } @@ -3535,7 +3535,7 @@ WaitTxBusyQueueComplete( BOOLEAN bResult = TRUE; u1Byte QueueID; int WaitingCnt; - + for(QueueID = 0, WaitingCnt = 0; QueueID < MAX_TX_QUEUE; ) { if(RTIsListEmpty(&Adapter->TcbBusyQueue[QueueID])) @@ -3580,7 +3580,7 @@ ReleaseDataFrameQueued( PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); // Return all packets in Tcb wait queues. - for(QueueID = 0; QueueID < MAX_TX_QUEUE; QueueID++) + for(QueueID = 0; QueueID < MAX_TX_QUEUE; QueueID++) { pEntry = RTGetHeadList(Get_WAIT_QUEUE(pAdapter, QueueID)); @@ -3588,24 +3588,24 @@ ReleaseDataFrameQueued( { pTcb = (PRT_TCB)pEntry; pEntry = RTNextEntryList(pEntry); - + if(pAdapter == pTcb->SourceAdapt) { RTRemoveEntryListWithCnt((PRT_LIST_ENTRY)pTcb, GET_WAIT_QUEUE_CNT(pAdapter, QueueID)); RtnCnt++; - ReturnTCB(pAdapter, pTcb, RT_STATUS_SUCCESS); + ReturnTCB(pAdapter, pTcb, RT_STATUS_SUCCESS); } } } RT_TRACE(COMP_SEND, DBG_LOUD, ("ReleaseDataFramemQueued(), free %d pTcb from TcbWaitQueue[].\n", RtnCnt)); - + if(!OS_SUPPORT_WDI(pAdapter)) { // Return all packets in platform wait queue. PlatformReleaseDataFrameQueued(pAdapter); } - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } @@ -3707,7 +3707,7 @@ tx_generalThreadCallback( while(1) { if(RT_DRIVER_HALT(Adapter)) - { + { RT_TRACE(COMP_SEND, DBG_LOUD, ("[TX], Tx general thread is stopped because bDriverStopped(%d) or bSurpriseRemoved(%d)!!!\n", Adapter->bDriverStopped, Adapter->bSurpriseRemoved)); break; @@ -3739,17 +3739,17 @@ TX_InitThreads( PlatformInitializeSemaphore(&Adapter->txGen.txGenSemaphore, 0); PlatformInitializeThread( - Adapter, - &Adapter->txGen.txGenThread, - (RT_THREAD_CALL_BACK)tx_generalThreadCallback, + Adapter, + &Adapter->txGen.txGenThread, + (RT_THREAD_CALL_BACK)tx_generalThreadCallback, "tx_generalThreadCallback", FALSE, 0, NULL); PlatformRunThread( - Adapter, - &Adapter->txGen.txGenThread, + Adapter, + &Adapter->txGen.txGenThread, PASSIVE_LEVEL, NULL); } @@ -3763,7 +3763,7 @@ TX_DeInitThreads( PlatformReleaseSemaphore(&Adapter->txGen.txGenSemaphore); PlatformFreeSemaphore(&Adapter->txGen.txGenSemaphore); - + PlatformWaitThreadEnd(Adapter, &(Adapter->txGen.txGenThread)); PlatformCancelThread(Adapter, &(Adapter->txGen.txGenThread)); PlatformReleaseThread(Adapter, &(Adapter->txGen.txGenThread)); diff --git a/network/wlan/WDI/COMMON/Transmit.h b/network/wlan/WDI/COMMON/Transmit.h index 3595bfcd9..2dea9f798 100644 --- a/network/wlan/WDI/COMMON/Transmit.h +++ b/network/wlan/WDI/COMMON/Transmit.h @@ -3,7 +3,7 @@ /*---------------------------Define---------------------------------------------*/ // -// We using different FW fragment size for PCIe and Usb interface respectively. +// We using different FW fragment size for PCIe and Usb interface respectively. // 2009.05.05. // #define RT_LOCAL_FW_BUF_SIZE 0x8000 // size 32k @@ -30,7 +30,7 @@ #define RT_TCB_FLAG_PS_PRE_TRANSMIT BIT4 // Means that we set it in PS queue before PreTransmitTCB(), we should send it in PreTransmitTCB(). #define RT_TCB_FLAG_RAW_DATA BIT5 // Sent by raw data. Do not change the content. -#define NIC_SEND_HANG_THRESHOLD_NORMAL 4 +#define NIC_SEND_HANG_THRESHOLD_NORMAL 4 #define NIC_SEND_HANG_THRESHOLD_POWERSAVE 8 #define MAX_DOZE_WAITING_TIMES 100 // The time of micro-second * 10 to wait before config RF OFF/Sleep. @@ -56,14 +56,14 @@ #define IsThereBufferInTxDesc(_Adapter, _Queue) \ ((_Adapter)->nBufInTxDesc[_Queue] > 0) - + #define IncrementTxDescToFill(_Adapter, _Queue, _N) \ (_Adapter)->NextTxDescToFill[_Queue]=((_Adapter)->NextTxDescToFill[_Queue]+_N)%(_Adapter)->NumTxDesc[_Queue]; \ (_Adapter)->nBufInTxDesc[_Queue]+=_N; #define IncrementTxDescToCheck(_Adapter, _Queue, _N) \ (_Adapter)->NextTxDescToCheck[_Queue]=((_Adapter)->NextTxDescToCheck[_Queue]+_N)%(_Adapter)->NumTxDesc[_Queue]; \ - (_Adapter)->nBufInTxDesc[_Queue] -=_N; + (_Adapter)->nBufInTxDesc[_Queue] -=_N; // TODO: Modify this !! #define FRAGMENT_THRESHOLD(_Adapter) ((u2Byte)((_Adapter)->MgntInfo.FragThreshold-4)) diff --git a/network/wlan/WDI/COMMON/TransmitDesc.c b/network/wlan/WDI/COMMON/TransmitDesc.c index fdb08d636..aa6b47905 100644 --- a/network/wlan/WDI/COMMON/TransmitDesc.c +++ b/network/wlan/WDI/COMMON/TransmitDesc.c @@ -9,12 +9,12 @@ * * Overview: Decide whether protection mode is required to be enabled * If protection is required to be enabled, decide how to send protection frame -* -* Input: +* +* Input: * PADAPTER Adapter, * PRT_TCB pTcb * -* Output: +* Output: * PRT_TCB pTcb * * (Following content of TCB will be changed) @@ -53,8 +53,8 @@ _IOT_ProtectionFrame( pTcb->bCTSEnable = TRUE; Ret = TRUE; } - - return Ret; + + return Ret; } void _RTS_CTS_settingframe( @@ -66,7 +66,7 @@ void _RTS_CTS_settingframe( if(_IOT_ProtectionFrame(Adapter, pTcb)) return; - + if(Adapter->RegWirelessMode <= WIRELESS_MODE_G) { pTcb->bRTSEnable = pMgntInfo->bForcedProtectRTSFrame; @@ -95,15 +95,15 @@ _HT_ProtectionFrame( return FALSE; //3 Check HTInfo Operation Mode - if((HTOpMode == HT_OPMODE_MIXED) && - (CHNL_RUN_ABOVE_40MHZ(pMgntInfo) || + if((HTOpMode == HT_OPMODE_MIXED) && + (CHNL_RUN_ABOVE_40MHZ(pMgntInfo) || !CHNL_RUN_ABOVE_40MHZ(pMgntInfo))) { pTcb->RTSRate = MGN_24M; // Rate is 24Mbps. pTcb->bRTSEnable = TRUE; return TRUE; } - + //3 Check Dynamic MIMO Power save condition if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) @@ -140,25 +140,25 @@ _HT_ProtectionFrame( else { pTcb->bRTSEnable = TRUE; - - if(IsFirstGoAdapter(Adapter) && + + if(IsFirstGoAdapter(Adapter) && (AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress) != NULL)) { pTcb->bRTSEnable = FALSE; pTcb->bCTSEnable = TRUE; pTcb->bHwProtection = TRUE; if(!Adapter->RASupport) - pTcb->RTSRate = MGN_24M; // Rate is 24Mbps. + pTcb->RTSRate = MGN_24M; // Rate is 24Mbps. } } - + return (pTcb->bRTSEnable||pTcb->bCTSEnable); } else { - if(IsFirstGoAdapter(Adapter) && + if(IsFirstGoAdapter(Adapter) && (AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress) != NULL)) - { + { pTcb->bRTSEnable = FALSE; pTcb->bCTSEnable = TRUE; if(!Adapter->RASupport) @@ -194,13 +194,13 @@ MgntQuery_ProtectionFrame( //When Bt only, we do not need to send RTS/CTS for better TP. //But when connect to N mode AP with cuncurrent, we need send RTS/CTS if(pTcb->bBTTxPacket && pMgntInfo->mAssoc) - { + { pTcb->bRTSSTBC = FALSE; pTcb->bRTSShort = FALSE; // Since protection frames are always sent by legacy rate, ShortGI will never be used. pTcb->bCTSEnable = FALSE; // Most of protection using RTS/CTS pTcb->RTSSC = 0; // 20MHz: Don't care; 40MHz: Duplicate. pTcb->RTSCCA = 0; - pTcb->RTSBW = 0; // RTS frame bandwidth is always 20MHz + pTcb->RTSBW = 0; // RTS frame bandwidth is always 20MHz //pTcb->bRTSEnable =TRUE; //pTcb->RTSRate =MGN_11M; return; @@ -216,7 +216,7 @@ MgntQuery_ProtectionFrame( pTcb->bNeedAckReply = FALSE; pTcb->bNeedCRCAppend = TRUE; goto NO_PROTECTION; - } + } else { // Unicast packet case pTcb->bNeedAckReply = TRUE; @@ -233,16 +233,16 @@ MgntQuery_ProtectionFrame( //3 Forced Protection mode if(pMgntInfo->ForcedProtectionMode == PROTECTION_MODE_FORCE_ENABLE) - { + { _RTS_CTS_settingframe(Adapter, pTcb); pTcb->RTSBW = pMgntInfo->ForcedProtectBW; pTcb->RTSSC = pMgntInfo->ForcedProtectSC; pTcb->RTSCCA = pMgntInfo->ForcedProtectCCA; - pTcb->RTSRate = pMgntInfo->ForcedProtectRate; + pTcb->RTSRate = pMgntInfo->ForcedProtectRate; return; } else if(pMgntInfo->ForcedProtectionMode == PROTECTION_MODE_FORCE_DISABLE) - { + { goto NO_PROTECTION; } @@ -250,9 +250,9 @@ MgntQuery_ProtectionFrame( if ( (pTcb->FragLength[0] > MgntActQuery_802_11_RTS_THRESHOLD(Adapter)) && (pTcb->bAggregate == FALSE)) { if(IS_WIRELESS_MODE_N(Adapter)) - { + { pTcb->RTSRate = MGN_24M; // Rate is 24Mbps. - } + } else { pTcb->RTSRate = ComputeAckRate( pMgntInfo->mBrates, pMgntInfo->HighestBasicRate ); @@ -293,12 +293,12 @@ MgntQuery_ProtectionFrame( pTcb->RTSRate = Adapter->HalFunc.GetHwRateFromMRateHandler(RtsRate); } - + // Determine RTS frame preamble mode. if(pTcb->RTSRate == MGN_1M) pTcb->bRTSShort = FALSE; else - pTcb->bRTSShort = MgntIsShortPreambleMode( Adapter, pTcb ); + pTcb->bRTSShort = MgntIsShortPreambleMode( Adapter, pTcb ); return; @@ -337,7 +337,7 @@ MgntQuery_PreambleMode( ) { // 1M can only use Long Preamble. Ref. 802.11b 18.2.2.2. 2005.01.18, by rcnjko. - if(pTcb->DataRate == MGN_1M) + if(pTcb->DataRate == MGN_1M) pTcb->bUseShortPreamble = FALSE; else pTcb->bUseShortPreamble = MgntIsShortPreambleMode( Adapter, pTcb ); @@ -348,9 +348,9 @@ MgntQuery_PreambleMode( * Function: MgntQuery_TxTime * * OverView: Calculate Tx duration and RTS duration. -* This function needs to refer to protection mode, so calling this function after +* This function needs to refer to protection mode, so calling this function after * protection mode is determined. -* This function needs to refer to preamble mode, so calling this function after +* This function needs to refer to preamble mode, so calling this function after * protection mode is determined. * Input: * PADAPTER Adapter, @@ -384,10 +384,10 @@ MgntQuery_TxTime( // Figure out ACK rate according to BSS basic rate and Tx rate, 2006.03.08 by rcnjko. AckRate = ComputeAckRate( Adapter->MgntInfo.mBrates, (u1Byte)(pTcb->DataRate) ); // Figure out ACK time according to the AckRate and assume long preamble is used on receiver, 2006.03.08, by rcnjko. - AckTime = ComputeTxTime( sAckCtsLng/8, AckRate, FALSE, FALSE); + AckTime = ComputeTxTime( sAckCtsLng/8, AckRate, FALSE, FALSE); } - + for(FragIndex = 0; FragIndex < pTcb->FragCount; FragIndex++) { //2 Initialize @@ -397,8 +397,8 @@ MgntQuery_TxTime( //2 Frame transmission time (Frame Body) ThisFrameTime = ComputeTxTime( pTcb->FragLength[FragIndex]+((pTcb->bNeedCRCAppend)?sCrcLng:0), - pTcb->DataRate, - FALSE, + pTcb->DataRate, + FALSE, pTcb->bUseShortPreamble); pTcb->TxDescDuration[FragIndex] += ThisFrameTime; @@ -407,13 +407,13 @@ MgntQuery_TxTime( if(FragIndex > 0) pTcb->DurationFieldVal[FragIndex-1] += (ThisFrameTime + 2*aSifsTime + AckTime); - + //2 Ack transmission time (SIFS + ACK) if(pTcb->bNeedAckReply) { pTcb->TxDescDuration[FragIndex] += (aSifsTime + AckTime); pTcb->DurationFieldVal[FragIndex] += (aSifsTime + AckTime); - } + } //2Protection frame time (RTS + SIFS + CTS + SIFS) if(pTcb->bRTSEnable) @@ -440,18 +440,18 @@ MgntQuery_TxTime( /** * Function: MgntQuery_AggregationCapability -* +* * Overview: Query whether the packet is allowed to be AMPDU aggregated. * Query the Aggregation Capability. Including MPDUFactor and AMPDUDensity. -* -* Input: +* +* Input: * PADAPTER Adapter * pu1Byte dstaddr * PRT_TCB pTcb -* -* Output: +* +* Output: * PRT_TCB pTcb -* Return: +* Return: * None */ VOID @@ -463,11 +463,11 @@ MgntQuery_AggregationCapability( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); + PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); pu1Byte pFrame = GET_FRAME_OF_FIRST_FRAG(Adapter, pTcb); PTX_TS_RECORD pTxTs; PRT_WLAN_STA pEntry = NULL; -#if (P2P_SUPPORT == 1) +#if (P2P_SUPPORT == 1) PP2P_INFO pP2PInfo = GET_P2P_INFO(Adapter); #endif @@ -490,31 +490,31 @@ MgntQuery_AggregationCapability( // //if(pMgntInfo->dot11PowerSaveMode != eActive) //return; - + if(!IsQoSDataFrame(pFrame) || IsSecProtEapol(pTcb->EncInfo.SecProtInfo) ) return; - + // Joseph 20090617: Fix TP low due to DHCP frame transmission. // Some weird Ralink AP lease IP address only 60s. This produces a lot of DHCP frames. // We just stop A-MPDU aggregation within first 4s after connection. // At the rest of time, we do not aggregate DHCP and ARP packets and do not affect other packets. if( (pTcb->specialDataType == PACKET_DHCP||pTcb->specialDataType == PACKET_ARP||pTcb->specialDataType == PACKET_EAPOL)||//pTcb->specialDataType != PACKET_NORMAL || //change by ylb 20141222, Fix ICMP cannot aggregate AMPDU - ((GetDefaultAdapter(Adapter)==Adapter) && + ((GetDefaultAdapter(Adapter)==Adapter) && (GetDefaultAdapter(Adapter)->MgntInfo.CntAfterLink<2)) ) return; - + if(pMgntInfo->IOTAction & HT_IOT_ACT_TX_NO_AGGREGATION) return; - + // For RTL819X, if pairwisekey = wep/tkip, we don't aggrregation. if(!Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter)) - return; + return; if(WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_NOTSETENCMACHEADER, 0)) return; - // Note : pHTInfo->bCurrentAMPDUEnable should be enabled only when AMPDU is enabled - // in registry and current operation mode is HT. + // Note : pHTInfo->bCurrentAMPDUEnable should be enabled only when AMPDU is enabled + // in registry and current operation mode is HT. if(pHTInfo->bCurrentAMPDUEnable == FALSE) return; @@ -537,7 +537,7 @@ MgntQuery_AggregationCapability( { if(pEntry->IOTAction & HT_IOT_ACT_AMSDU_AMPDU) ; - else + else return; } } @@ -545,7 +545,7 @@ MgntQuery_AggregationCapability( { if(pMgntInfo->IOTAction & HT_IOT_ACT_AMSDU_AMPDU) ; - else + else return; } @@ -554,13 +554,13 @@ MgntQuery_AggregationCapability( // This part shall be integrate to other function. // RT_TRACE(COMP_QOS, DBG_TRACE, ("GetTs=%d\r\n", pMgntInfo->SecurityInfo.SecLvl)); - + if(GetTs(Adapter, (PTS_COMMON_INFO*)(&pTxTs), dstaddr, pTcb->priority, TX_DIR, TRUE)) { if(pTxTs->TxAdmittedBARecord.bValid == FALSE) { // - // Caution: Now we just establish ADDBA protocol and use A-MPDU for + // Caution: Now we just establish ADDBA protocol and use A-MPDU for // every transmission. // // For Vwifi to support AMPDU, while keep the default port behavior, by Bohn , 2009.10.01 @@ -581,7 +581,7 @@ MgntQuery_AggregationCapability( bSecIsTxKeyInstalled = FALSE; } else - { + { bSecIsTxKeyInstalled = FALSE; } } @@ -589,7 +589,7 @@ MgntQuery_AggregationCapability( {// STA mode or Ad hoc mode bSecIsTxKeyInstalled = SecIsTxKeyInstalled(Adapter, pMgntInfo->Bssid); } - + if(pMgntInfo->SecurityInfo.SecLvl > RT_SEC_LVL_NONE && !bSecIsTxKeyInstalled) { RT_TRACE(COMP_QOS, DBG_TRACE, ("pMgntInfo->SecurityInfo.SecLv=%d\r\n", pMgntInfo->SecurityInfo.SecLvl)); @@ -611,7 +611,7 @@ MgntQuery_AggregationCapability( } - //2 //(1)Decide whether aggregation is required according to protocol handshake + //2 //(1)Decide whether aggregation is required according to protocol handshake if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) { PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, dstaddr); @@ -629,10 +629,10 @@ MgntQuery_AggregationCapability( } else { - if( (pTcb->bAggregate) && + if( (pTcb->bAggregate) && ((pMgntInfo->IOTAction & HT_IOT_ACT_AMSDU_AMPDU) == 0)) goto FORCED_AGG_SETTING; - + pTcb->bAMPDUEnable = TRUE; pTcb->AMPDUFactor = pHTInfo->CurrentAMPDUFactor; pTcb->AMPDUDensity = pHTInfo->CurrentMPDUDensity; @@ -643,16 +643,16 @@ MgntQuery_AggregationCapability( TDLS_GetHtAMPDU(Adapter, dstaddr, pTcb); } } - + } else if(pMgntInfo->IOTAction & HT_IOT_ACT_AMSDU_ENABLE) { - // If driver does not use AMPDU by default but use A-MSDU instead, and packet + // If driver does not use AMPDU by default but use A-MSDU instead, and packet // size is small. We do this because we hope TCP ack packet can be aggregated if(pTcb->bAggregate == FALSE && pTcb->PacketLength <= 200 && pMgntInfo->IOTPeer!= HT_IOT_PEER_REALTEK_92SE && - pMgntInfo->IOTPeer!=HT_IOT_PEER_REALTEK ) - { + pMgntInfo->IOTPeer!=HT_IOT_PEER_REALTEK ) + { pTcb->bAMPDUEnable = TRUE; pTcb->AMPDUFactor = pHTInfo->CurrentAMPDUFactor; pTcb->AMPDUDensity = pHTInfo->CurrentMPDUDensity; @@ -660,12 +660,12 @@ MgntQuery_AggregationCapability( } else if(TDLS_IsTxTDLSPacket(Adapter, pTcb)) { - TDLS_CheckAggregation(Adapter, dstaddr, pTcb); + TDLS_CheckAggregation(Adapter, dstaddr, pTcb); } - + FORCED_AGG_SETTING: //2// - //2 //(2) The OID control may overwrite protocol handshake + //2 //(2) The OID control may overwrite protocol handshake //2// switch(pHTInfo->ForcedAMPDUMode ) { @@ -676,16 +676,16 @@ MgntQuery_AggregationCapability( // Temply used to fix long run chariot may drop half ,as AMPDU not enable(Add BA not success).zhiyuan 2012/05/09 pTcb->bAMPDUEnable = TRUE; pTcb->AMPDUDensity = pHTInfo->ForcedMPDUDensity; - pTcb->AMPDUFactor = pHTInfo->ForcedAMPDUFactor; - } + pTcb->AMPDUFactor = pHTInfo->ForcedAMPDUFactor; + } break; - + case HT_AMPDU_ENABLE: pTcb->bAMPDUEnable = TRUE; pTcb->AMPDUDensity = pHTInfo->ForcedMPDUDensity; pTcb->AMPDUFactor = pHTInfo->ForcedAMPDUFactor; break; - + case HT_AMPDU_DISABLE: pTcb->bAMPDUEnable = FALSE; pTcb->AMPDUDensity = 0; @@ -694,26 +694,26 @@ MgntQuery_AggregationCapability( default: break; - - } + + } } -BOOLEAN -MgntQuery_RA_ShortGI( +BOOLEAN +MgntQuery_RA_ShortGI( IN PADAPTER Adapter, IN u1Byte macId, IN PRT_WLAN_STA pEntry, IN WIRELESS_MODE WirelessMode, IN CHANNEL_WIDTH ChnlBW ) -{ +{ BOOLEAN bShortGI; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); PRT_VERY_HIGH_THROUGHPUT pVHTInfo = GET_VHT_INFO(pMgntInfo); BOOLEAN bShortGI20MHz = FALSE,bShortGI40MHz = FALSE, bShortGI80MHz = FALSE; - + if(IS_N_WIRELESS_MODE(WirelessMode)) { if(macId == MAC_ID_STATIC_FOR_BROADCAST_MULTICAST) @@ -753,7 +753,7 @@ MgntQuery_RA_ShortGI( } return bShortGI; -} +} VOID @@ -778,7 +778,7 @@ MgntQuery_ShortGI( if(Adapter->RASupport) { - bUseSGI = pTcb->macId; + bUseSGI = pTcb->macId; Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_RA_SGI, (pu1Byte)&bUseSGI); if(bUseSGI) pTcb->bUseShortGI = TRUE; @@ -831,9 +831,9 @@ MgntQuery_Tx_LDPC( else if(pHTInfo->bCurrentHTSupport == FALSE) pTcb->bLDPC = FALSE; else if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) - { + { pu1Byte pRaddr = Frame_pRaddr(osMpdu); - PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); + PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); if(pEntry == NULL) pTcb->bLDPC = FALSE; @@ -848,7 +848,7 @@ MgntQuery_Tx_LDPC( { if(TEST_FLAG(pEntry->HTInfo.LDPC, LDPC_HT_ENABLE_TX)) pTcb->bLDPC = TRUE; - else + else pTcb->bLDPC = FALSE; } else @@ -862,15 +862,15 @@ MgntQuery_Tx_LDPC( pTcb->bLDPC =TRUE; else pTcb->bLDPC = FALSE; - } + } else { if(TEST_FLAG(pHTInfo->HtCurLdpc, LDPC_HT_ENABLE_TX) ) pTcb->bLDPC =TRUE; else pTcb->bLDPC = FALSE; - } - } + } + } } /* MgntQuery_LDPC */ @@ -917,7 +917,7 @@ MgntSet_TX_LDPC( SET_FLAG(pVHTInfo->VhtCurLdpc, LDPC_VHT_ENABLE_TX); else CLEAR_FLAG(pVHTInfo->VhtCurLdpc, LDPC_VHT_ENABLE_TX); - } + } else { if(bLDPC && TEST_FLAG(pHTInfo->HtCurLdpc, LDPC_HT_CAP_TX)) @@ -960,14 +960,14 @@ MgntQuery_Tx_STBC( else if(pHTInfo->bCurrentHTSupport == FALSE) pTcb->bSTBC = FALSE; else if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) - { + { pu1Byte pRaddr = Frame_pRaddr(osMpdu); - PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); + PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); if(pEntry == NULL) pTcb->bSTBC = FALSE; else - { + { if(IS_AC_WIRELESS_MODE(pEntry->WirelessMode)) { if(pEntry->VHTInfo.STBC) @@ -982,8 +982,8 @@ MgntQuery_Tx_STBC( if(pEntry->HTInfo.STBC) { pTcb->bSTBC = TRUE; - } - else + } + else pTcb->bSTBC = FALSE; } else @@ -1000,18 +1000,18 @@ MgntQuery_Tx_STBC( } else pTcb->bSTBC = FALSE; - } + } else { if(TEST_FLAG(pHTInfo->HtCurStbc, STBC_HT_ENABLE_TX) ) { pTcb->bSTBC =TRUE; - } + } else pTcb->bSTBC = FALSE; - } + } } -} +} VOID @@ -1026,7 +1026,7 @@ MgntQuery_BandwidthMode( OCTET_STRING osMpdu; FillOctetString(osMpdu, GET_FRAME_OF_FIRST_FRAG(Adapter, pTcb), (u2Byte)pTcb->BufferList[0].Length); - + if(pHTInfo->bCurrentHTSupport == FALSE) return; else if(IsFrameTypeCtrl(osMpdu.Octet) || IsFrameTypeMgnt(osMpdu.Octet)) @@ -1045,14 +1045,14 @@ MgntQuery_BandwidthMode( if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) { pu1Byte pRaddr = Frame_pRaddr(osMpdu); - PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); + PRT_WLAN_STA pEntry = AsocEntry_GetEntry(pMgntInfo, pRaddr); if(pEntry == NULL) pTcb->BWOfPacket = CHANNEL_WIDTH_20; else { if((GetDefaultAdapter(Adapter)->MgntInfo.bForceGoTxData20MBw == TRUE) && IsFirstGoAdapter(Adapter)) - pTcb->BWOfPacket = CHANNEL_WIDTH_20; + pTcb->BWOfPacket = CHANNEL_WIDTH_20; else pTcb->BWOfPacket = pEntry->BandWidth; } @@ -1072,18 +1072,18 @@ MgntQuery_BandwidthMode( VOID MgntSet_RA_Ratr_Index( - IN PMGNT_INFO pMgntInfo, + IN PMGNT_INFO pMgntInfo, IN MAC_ID_OWNER_TYPE MacIdOwnerType, IN u1Byte ratr_index, IN PRT_WLAN_STA pEntry ) { switch(MacIdOwnerType){ - + case MAC_ID_OWNER_BT: pMgntInfo->BT_RatrInx = ratr_index; break; - case MAC_ID_OWNER_INFRA_STA: + case MAC_ID_OWNER_INFRA_STA: case MAC_ID_OWNER_DEFAULT_PORT: pMgntInfo->ratr_index = ratr_index; break; @@ -1142,7 +1142,7 @@ MgntQuery_TxRateSelectMode( { // STA mode if(pMgntInfo->mAssoc && !ACTING_AS_AP(Adapter)) - { + { //Sinda 20150827, should assign a value to OdmAid to avoud ODM access NULL. // 0 mean station entry of default port. pTcb->OdmAid = 0; @@ -1150,9 +1150,9 @@ MgntQuery_TxRateSelectMode( else if(pMgntInfo->mIbss || ACTING_AS_AP(Adapter)) { pEntry = AsocEntry_GetEntry(pMgntInfo, pTcb->DestinationAddress); - + if(pEntry != NULL) - { + { // This is used for ODM Luke's requirement, they want to use AID corresponding SUM ID num for // collect RX PHY status info, we should take multi-port consideration, // revised by Roger, 2013.10.15. @@ -1164,19 +1164,19 @@ MgntQuery_TxRateSelectMode( // 0 mean station entry of default port. pTcb->OdmAid = 0; } - + if(pTcb->bTxUseDriverAssingedRate == FALSE) { if(pTcb->bBroadcast || pTcb->bMulticast) { - pTcb->DataRate = pMgntInfo->LowestBasicRate; - + pTcb->DataRate = pMgntInfo->LowestBasicRate; + pTcb->bTxUseDriverAssingedRate = TRUE; } else if(pEntry != NULL) { if((pEntry->AssociatedMacId >= MacIdHalGetMaxHWMacId(Adapter)) && (pEntry->DataRate != 0)) - { + { pTcb->DataRate = pEntry->DataRate; pTcb->bSpecifShortGI = TRUE; pTcb->bUseShortGI = pEntry->bUseShortGI; @@ -1201,7 +1201,7 @@ MgntQuery_TxRateSelectMode( if(pTcb->bTxDisableRateFallBack == FALSE) { u1Byte ratr_index = pMgntInfo->Multi_RatrInx; - + if(pTcb->bBTTxPacket) ratr_index = pMgntInfo->BT_RatrInx; else if(ACTING_AS_AP(Adapter) || ACTING_AS_IBSS(Adapter)) @@ -1228,24 +1228,24 @@ MgntQuery_TxRateSelectMode( /** * Function: FillFrameField -* +* * Overview: Filling the per frame information into each frame header. * Now we only insert duration field and seqeunce number in this function. -* -* Input: +* +* Input: * PRT_TCB pTcb, * u2Byte SeqNum -* -* Output: +* +* Output: * PRT_TCB pTcb * (Frame in the Buffer of pTcb will be modified) -* -* Return: +* +* Return: * None */ VOID FillFrameField( - PADAPTER Adapter, + PADAPTER Adapter, PRT_TCB pTcb, u2Byte SeqNum ) @@ -1267,12 +1267,12 @@ FillFrameField( SET_80211_HDR_DURATION(pTcb->BufferList[BufferIndex].VirtualAddress+HwDescOffset, pTcb->DurationFieldVal[FragIndex]); } - // Seq numbers are not assigned to control frames. + // Seq numbers are not assigned to control frames. if(IsCtrlFrame(pFrame) == FALSE) { SET_80211_HDR_SEQUENCE(pTcb->BufferList[BufferIndex].VirtualAddress+HwDescOffset, SeqNum); - } + } BufferIndex += pTcb->FragBufCount[FragIndex]; - } + } } diff --git a/network/wlan/WDI/COMMON/TransmitDesc.h b/network/wlan/WDI/COMMON/TransmitDesc.h index 7310b5edc..3c82b6f4c 100644 --- a/network/wlan/WDI/COMMON/TransmitDesc.h +++ b/network/wlan/WDI/COMMON/TransmitDesc.h @@ -27,8 +27,8 @@ MgntQuery_AggregationCapability( ); -BOOLEAN -MgntQuery_RA_ShortGI( +BOOLEAN +MgntQuery_RA_ShortGI( IN PADAPTER Adapter, IN u1Byte macId, IN PRT_WLAN_STA pEntry, @@ -37,7 +37,7 @@ MgntQuery_RA_ShortGI( ); -VOID +VOID MgntQuery_ShortGI( PADAPTER Adapter, PRT_TCB pTcb @@ -75,7 +75,7 @@ MgntQuery_BandwidthMode( VOID MgntSet_RA_Ratr_Index( - IN PMGNT_INFO pMgntInfo, + IN PMGNT_INFO pMgntInfo, IN MAC_ID_OWNER_TYPE MacIdOwnerType, IN u1Byte ratr_index, IN PRT_WLAN_STA pEntry diff --git a/network/wlan/WDI/COMMON/UsbModeSwitch.h b/network/wlan/WDI/COMMON/UsbModeSwitch.h index a7645c391..c3fbf41e9 100644 --- a/network/wlan/WDI/COMMON/UsbModeSwitch.h +++ b/network/wlan/WDI/COMMON/UsbModeSwitch.h @@ -3,8 +3,8 @@ typedef enum _USB_MODE { - USB_MODE_AUTO, - USB_MODE_U2, + USB_MODE_AUTO, + USB_MODE_U2, USB_MODE_U3, }USB_MODE, *PUSB_MODE; @@ -60,17 +60,17 @@ typedef struct _USB_MODE_MECH #define UsbModeSwitch_SetFirstScanOver(_Adapter, _bFirstScanOver) \ (_Adapter)->UsbModeMechanism.bFirstScanOver = (_bFirstScanOver) #define UsbModeSwitch_SetUsbSwitchFast(_Adapter, _UsbSwitchFast) \ - (_Adapter)->UsbModeMechanism.RegUsbSwFast = (_UsbSwitchFast) + (_Adapter)->UsbModeMechanism.RegUsbSwFast = (_UsbSwitchFast) #define UsbModeSwitch_SetUsbSwitchWps(_Adapter, _UsbSwitchWps) \ - (_Adapter)->UsbModeMechanism.RegUsbWps = (_UsbSwitchWps) + (_Adapter)->UsbModeMechanism.RegUsbWps = (_UsbSwitchWps) #define UsbModeSwitch_SetUsbSwitchPostive(_Adapter, _UsbSwitchPositive) \ - (_Adapter)->UsbModeMechanism.RegUsbSp = (_UsbSwitchPositive) + (_Adapter)->UsbModeMechanism.RegUsbSp = (_UsbSwitchPositive) #define UsbModeSwitch_SetUsbSwitchChannel(_Adapter, _UsbSwitchChnl) \ - (_Adapter)->UsbModeMechanism.RegUsbChnl = (_UsbSwitchChnl) + (_Adapter)->UsbModeMechanism.RegUsbChnl = (_UsbSwitchChnl) #define UsbModeSwitch_SetUsbSwitchSpeed(_Adapter, _UsbSwitchSpeed) \ - (_Adapter)->UsbModeMechanism.RegUsbSwitchSpeed = (_UsbSwitchSpeed) + (_Adapter)->UsbModeMechanism.RegUsbSwitchSpeed = (_UsbSwitchSpeed) #define UsbModeSwitch_SetUsbSwitchThL(_Adapter, _UsbSwitchThL) \ - (_Adapter)->UsbModeMechanism.RegUsbSwitchThL = (_UsbSwitchThL) + (_Adapter)->UsbModeMechanism.RegUsbSwitchThL = (_UsbSwitchThL) #define UsbModeSwitch_SetUsbSwitchThH(_Adapter, _UsbSwitchThH) \ (_Adapter)->UsbModeMechanism.RegUsbSwitchThH = (_UsbSwitchThH) #define UsbModeSwitch_SetUsbSwitchThRssi(_Adapter, _UsbSwitchThRssi) \ @@ -142,7 +142,7 @@ u1Byte UsbModeQuerySwitchChannel( PADAPTER Adapter ); - + VOID UsbModeSwitchCheckExt( PADAPTER Adapter diff --git a/network/wlan/WDI/COMMON/VHTGen.c b/network/wlan/WDI/COMMON/VHTGen.c index d9c0b4b24..88ff5c3f5 100644 --- a/network/wlan/WDI/COMMON/VHTGen.c +++ b/network/wlan/WDI/COMMON/VHTGen.c @@ -7,24 +7,24 @@ #if (VHT_SUPPORT == 1) -// 20/40/80, ShortGI, MCS Rate -const u2Byte VHT_MCS_DATA_RATE[3][2][30] = +// 20/40/80, ShortGI, MCS Rate +const u2Byte VHT_MCS_DATA_RATE[3][2][30] = { { {13, 26, 39, 52, 78, 104, 117, 130, 156, 156, 26, 52, 78, 104, 156, 208, 234, 260, 312, 312, 39, 78, 117, 156, 234, 312, 351, 390, 468, 520}, // Long GI, 20MHz {14, 29, 43, 58, 87, 116, 130, 144, 173, 173, 29, 58, 87, 116, 173, 231, 260, 289, 347, 347, 43, 87, 130, 173, 260, 347,390, 433, 520, 578} }, // Short GI, 20MHz - { {27, 54, 81, 108, 162, 216, 243, 270, 324, 360, + { {27, 54, 81, 108, 162, 216, 243, 270, 324, 360, 54, 108, 162, 216, 324, 432, 486, 540, 648, 720, 81, 162, 243, 324, 486, 648, 729, 810, 972, 1080}, // Long GI, 40MHz - {30, 60, 90, 120, 180, 240, 270, 300,360, 400, + {30, 60, 90, 120, 180, 240, 270, 300,360, 400, 60, 120, 180, 240, 360, 480, 540, 600, 720, 800, 90, 180, 270, 360, 540, 720, 810, 900, 1080, 1200}}, // Short GI, 40MHz { {59, 117, 176, 234, 351, 468, 527, 585, 702, 780, 117, 234, 351, 468, 702, 936, 1053, 1170, 1404, 1560, 176, 351, 527, 702, 1053, 1404, 1580, 1755, 2106, 2340}, // Long GI, 80MHz - {65, 130, 195, 260, 390, 520, 585, 650, 780, 867, + {65, 130, 195, 260, 390, 520, 585, 650, 780, 867, 130, 260, 390, 520, 780, 1040, 1170, 1300, 1560,1734, 195, 390, 585, 780, 1170, 1560, 1755, 1950, 2340, 2600} } // Short GI, 80MHz }; @@ -35,14 +35,14 @@ VHTDebugVHTCapability( PADAPTER Adapter, POCTET_STRING pocCap, pu1Byte TitleString - + ) { pu1Byte pCapELE = (pu1Byte)&pocCap->Octet[0]; pu1Byte pMCS; - + pMCS= GET_VHT_CAPABILITY_ELE_RX_MCS(pCapELE); - + RT_TRACE(COMP_HT, DebugLevel, (". Called by %s\n", TitleString )); RT_TRACE(COMP_HT, DebugLevel, ("\tSupported Channel Width = %d\n", (GET_VHT_CAPABILITY_ELE_CHL_WIDTH(pCapELE) ))); @@ -52,8 +52,8 @@ VHTDebugVHTCapability( RT_TRACE(COMP_HT, DebugLevel, ("\tMPDU Density = %d\n", GET_HT_CAPABILITY_ELE_MPDU_DENSITY(pCapELE))); RT_TRACE(COMP_HT, DebugLevel, ("\tRx MCS Rate Set = [%x][%x][%x][%x]\n", pMCS[0], pMCS[1], pMCS[2], pMCS[3])); RT_TRACE(COMP_HT, DebugLevel, ("\tRx LDPC = %d\n", GET_VHT_CAPABILITY_ELE_RX_LDPC(pCapELE))); - RT_TRACE(COMP_HT, DebugLevel, ("\n")); - + RT_TRACE(COMP_HT, DebugLevel, ("\n")); + } @@ -69,7 +69,7 @@ VHTMcsToDataRate( PRT_VERY_HIGH_THROUGHPUT pVHTInfo = pMgntInfo->pVHTInfo; VHTMcsRate -=MGN_VHT1SS_MCS0; - + switch(pMgntInfo->dot11CurrentChannelBandWidth){ case CHANNEL_WIDTH_20: isShortGI = pHTInfo->bCurShortGI20MHz?1:0; @@ -96,11 +96,11 @@ VHTFilterMCSRate( u1Byte i = 0, j = 0; u1Byte RegRate, dot11Rate, OpRate; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - - for(i = 0; i < 2; i++) + + for(i = 0; i < 2; i++) { pOperateMCS[i] = 0; - + for(j = 0; j < 8; j+=2) { RegRate = (pMgntInfo->Regdot11VHTOperationalRateSet[i] >> j) & 3; @@ -109,26 +109,26 @@ VHTFilterMCSRate( OpRate = 3; else if(RegRate > dot11Rate) OpRate = dot11Rate; - else + else OpRate = RegRate; pOperateMCS[i] |= (OpRate << j); } } - + return TRUE; } -u1Byte +u1Byte RateToSpatialStream( pu1Byte pVHTRate ) { u1Byte i,j , tmpRate; u1Byte NumSS = 0; - - for(i = 0; i < 2; i++) + + for(i = 0; i < 2; i++) { for(j = 0; j < 8; j+=2) { @@ -145,7 +145,7 @@ RateToSpatialStream( break; } } - + } RT_TRACE(COMP_HT, DBG_LOUD, ("RateToSpatialStream(): Number of Spatial Stream supported = %d\n", NumSS)); @@ -163,11 +163,11 @@ SpatialStreamToRate( u1Byte i = 0, j = 0; u1Byte RegRate, dot11Rate, OpRate; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - - for(i = 0; i < 2; i++) + + for(i = 0; i < 2; i++) { pVHTRate[i] = 0; - + for(j = 0; j < 8; j+=2) { RegRate = (pMgntInfo->Regdot11VHTOperationalRateSet[i] >> j) & 3; @@ -178,7 +178,7 @@ SpatialStreamToRate( OpRate = 3; else if(RegRate > dot11Rate) OpRate = dot11Rate; - else + else OpRate = RegRate; pVHTRate[i] |= (OpRate << j); @@ -187,7 +187,7 @@ SpatialStreamToRate( } -u1Byte +u1Byte VHTIOTActIsAMsduEnable( PADAPTER Adapter ) @@ -222,10 +222,10 @@ VHTConstructOpModeNotification( *pLength = 0; ConstructMaFrameHdr( - Adapter, - Addr, - ACT_CAT_VHT, - ACT_VHT_OPMODE_NOTIFICATION, + Adapter, + Addr, + ACT_CAT_VHT, + ACT_VHT_OPMODE_NOTIFICATION, &osNotifFrame); // Operating Mode @@ -252,7 +252,7 @@ VHTConstructCapabilityElement( POCTET_STRING posVHTCap, BOOLEAN bAssoc ) -{ +{ PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_VERY_HIGH_THROUGHPUT pVHTInfo = GET_VHT_INFO(pMgntInfo); pu1Byte pCapELE = NULL, pCapVHTMCS; @@ -261,14 +261,14 @@ VHTConstructCapabilityElement( u1Byte VHtSTBC = 0; PlatformZeroMemory(posVHTCap->Octet, posVHTCap->Length); - + pCapELE = (pu1Byte)posVHTCap->Octet; posVHTCap->Length = 12; // B0 B1 Maximum MPDU Length // in Current AC AP, we can only declare 4K MPDU support, the performance will be better. // Need to add IOT pattern later. - //SET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(pCapELE, 2); + //SET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(pCapELE, 2); // B2 B3 Supported Channel Width Set @@ -277,9 +277,9 @@ VHTConstructCapabilityElement( // B4 Rx LDPC if(TEST_FLAG(pVHTInfo->VhtLdpcCap, LDPC_VHT_ENABLE_RX)) { - SET_VHT_CAPABILITY_ELE_RX_LDPC(pCapELE, 1); + SET_VHT_CAPABILITY_ELE_RX_LDPC(pCapELE, 1); } - + // B5 ShortGI for 80MHz SET_VHT_CAPABILITY_ELE_SHORT_GI80M(pCapELE, pVHTInfo->bRegShortGI80MHz ? 1 : 0); // We can receive Short GI of 80M // B6 ShortGI for 160MHz @@ -311,7 +311,7 @@ VHTConstructCapabilityElement( SET_VHT_CAPABILITY_ELE_SU_BFEE(pCapELE, TRUE); SET_VHT_CAPABILITY_ELE_BFER_ANT_SUPP(pCapELE, HAL_QueryBeamformeeCap(Adapter)); } - + // B19 MU Beamformer Capable if (TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE)){ @@ -347,13 +347,13 @@ VHTConstructCapabilityElement( PlatformMoveMemory(pCapVHTMCS, pMgntInfo->Regdot11VHTOperationalRateSet, 2); HighestRate = VHT_MCS_DATA_RATE[pMgntInfo->dot11CurrentChannelBandWidth][FALSE][((pMgntInfo->RegVHTHighestOperaRate - MGN_VHT1SS_MCS0)&0x3f)]; - HighestRate = (HighestRate+1) >> 1; + HighestRate = (HighestRate+1) >> 1; SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(pCapELE, HighestRate); //indicate we support highest rx rate is 600Mbps. if(pVHTInfo->bAssignTxLGIRate) HighestRate = pVHTInfo->highestTxLGIRate; SET_VHT_CAPABILITY_ELE_MCS_TX_HIGHEST_RATE(pCapELE, HighestRate); //indicate we support highest tx rate is 600Mbps. - + RT_PRINT_DATA(COMP_HT, DBG_TRACE, "Construct VHTCap in Beacon/Assoc/ReAssoc", posVHTCap->Octet, posVHTCap->Length); VHTDebugVHTCapability(DBG_TRACE, Adapter, posVHTCap, (pu1Byte)"VHTConstructCapability()"); } @@ -367,7 +367,7 @@ VHTConstructOperationElement( { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; pu1Byte pOpELE = NULL; - CHANNEL_WIDTH ChnlWidth; + CHANNEL_WIDTH ChnlWidth; pOpELE = (pu1Byte)posVHTOperation->Octet; posVHTOperation->Length = 5; @@ -378,7 +378,7 @@ VHTConstructOperationElement( ChnlWidth = (CHANNEL_WIDTH)0; else if(pMgntInfo->dot11CurrentChannelBandWidth == CHANNEL_WIDTH_80) ChnlWidth = (CHANNEL_WIDTH)1; - + SET_VHT_OPERATION_ELE_CHL_WIDTH(pOpELE, ChnlWidth); //center frequency SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(pOpELE,pMgntInfo->pChannelInfo->CurrentChannelCenterFrequency); @@ -412,7 +412,7 @@ VHTSendOperatingModeNotification( MgntSendPacket(Adapter, pTcb, pBuf, pTcb->PacketLength, NORMAL_QUEUE, DataRate); } } - + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } @@ -475,16 +475,16 @@ VHTOnAssocRsp( OCTET_STRING osTmp; RT_TRACE(COMP_MLME, DBG_LOUD,("==============>VHTOnAssocRsp \n ")); - + if( pVHTInfo->bCurrentVHTSupport == FALSE ) { RT_TRACE( COMP_MLME, DBG_LOUD, ("<=== VHTOnAssocRsp(): VHT_DISABLE\n") ); return; } - + PlatformZeroMemory(pVHTInfo->PeerVHTCapBuf, sizeof(pVHTInfo->PeerVHTCapBuf)); PlatformZeroMemory(pVHTInfo->PeerVHTInfoBuf, sizeof(pVHTInfo->PeerVHTInfoBuf)); - + // Get VHT CAP and copy into buffer osTmp= PacketGetElement( asocpdu, EID_VHTCapability, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); @@ -497,13 +497,13 @@ VHTOnAssocRsp( osTmp.Length = MAX_VHT_CAP_LEN; } } - + osTmp.Length = osTmp.Length > sizeof(pVHTInfo->PeerVHTCapBuf)?\ sizeof(pVHTInfo->PeerVHTCapBuf):osTmp.Length; //prevent from overflow - + if(osTmp.Length > 0) CopyMem(pVHTInfo->PeerVHTCapBuf, osTmp.Octet, osTmp.Length); - + // Get VHT Operation and copy into buffer osTmp= PacketGetElement( asocpdu, EID_VHTOperation, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); @@ -519,16 +519,16 @@ VHTOnAssocRsp( osTmp.Length = osTmp.Length>sizeof(pVHTInfo->PeerVHTInfoBuf)?\ sizeof(pVHTInfo->PeerVHTInfoBuf):osTmp.Length; //prevent from overflow - + if(osTmp.Length > 0) CopyMem(pVHTInfo->PeerVHTInfoBuf, osTmp.Octet, osTmp.Length); - + pPeerVHTCap = (pu1Byte)(pVHTInfo->PeerVHTCapBuf); pPeerVHTInfo = (pu1Byte)(pVHTInfo->PeerVHTInfoBuf); - RT_DISP(FMLME, LINK_STS, - ("VHTOnAssocRsp(): call VHTSetBandWidthOnAsocRsp VHT_CAP=%04x VHT_INFO=%04x\n", + RT_DISP(FMLME, LINK_STS, + ("VHTOnAssocRsp(): call VHTSetBandWidthOnAsocRsp VHT_CAP=%04x VHT_INFO=%04x\n", EF2Byte(*((UNALIGNED pu2Byte)pPeerVHTCap)), EF2Byte(*((UNALIGNED pu2Byte)pPeerVHTInfo))) ); // B4 Rx LDPC @@ -537,7 +537,7 @@ VHTOnAssocRsp( SET_FLAG(pVHTInfo->VhtCurLdpc, GET_VHT_CAPABILITY_ELE_RX_LDPC(pPeerVHTCap) ? (LDPC_VHT_ENABLE_TX | LDPC_VHT_CAP_TX) : 0); RT_TRACE_F(COMP_HT, DBG_LOUD, ("Target BSS support VHT LDPC, enable Tx LDPC!\n")); } - + // B5 Short GI for 80 MHz pVHTInfo->bCurShortGI80MHz = (GET_VHT_CAPABILITY_ELE_SHORT_GI80M(pPeerVHTCap) & pVHTInfo->bRegShortGI80MHz) ? TRUE : FALSE; RT_TRACE_F(COMP_HT, DBG_LOUD, ("Current ShortGI80MHz = %d\n", pVHTInfo->bCurShortGI80MHz)); @@ -590,13 +590,13 @@ VHTOnAssocRsp( pVHTInfo->AMPDU_Len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pPeerVHTCap); if(pVHTInfo->AMPDU_Len > pHTInfo->CurrentAMPDUFactor) Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AMPDU_FACTOR, &pVHTInfo->AMPDU_Len); - + pCapMCS = GET_VHT_CAPABILITY_ELE_RX_MCS(pPeerVHTCap); VHTFilterMCSRate(Adapter, pCapMCS, pMgntInfo->dot11VHTOperationalRateSet); pMgntInfo->VHTHighestOperaRate = VHTGetHighestMCSRate( - Adapter, + Adapter, pMgntInfo->dot11VHTOperationalRateSet); - + pVHTInfo->PeerChnlBW = (CHANNEL_WIDTH)GET_VHT_OPERATION_ELE_CHL_WIDTH(pVHTInfo->PeerVHTInfoBuf); Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AMPDU_MAX_TIME, &pMgntInfo->VHTHighestOperaRate); } @@ -616,7 +616,7 @@ VHTInitializeVHTInfo( { PRT_VERY_HIGH_THROUGHPUT pVHTInfo = Adapter->MgntInfo.pVHTInfo; - // These parameters will be reset when receiving deauthentication packet + // These parameters will be reset when receiving deauthentication packet pVHTInfo->bCurrentVHTSupport = FALSE; // LDPC support @@ -628,10 +628,10 @@ VHTInitializeVHTInfo( // Short GI support pVHTInfo->bCurShortGI80MHz = FALSE; - // Sounding support + // Sounding support CLEAR_FLAGS(pVHTInfo->VhtCurBeamform); - // Initialize all of the parameters related to 11n + // Initialize all of the parameters related to 11n PlatformZeroMemory((PVOID)(&(pVHTInfo->SelfVHTCap)), sizeof(pVHTInfo->SelfVHTCap)); PlatformZeroMemory((PVOID)(&(pVHTInfo->SelfVHTInfo)), sizeof(pVHTInfo->SelfVHTInfo)); PlatformZeroMemory((PVOID)(&(pVHTInfo->PeerVHTCapBuf)), sizeof(pVHTInfo->PeerVHTCapBuf)); @@ -654,7 +654,7 @@ VHTParsingVHTCapElement( VHTCapIE.Length = VHTCapIE.Length > sizeof(pBssDesc->BssVHT.bdVHTCapBuf)?\ sizeof(pBssDesc->BssVHT.bdVHTCapBuf):VHTCapIE.Length; //prevent from overflow - + CopyMem(pBssDesc->BssVHT.bdVHTCapBuf, VHTCapIE.Octet, VHTCapIE.Length); pBssDesc->BssVHT.bdVHTCapLen = VHTCapIE.Length; @@ -675,7 +675,7 @@ VHTParsingVHTOperationElement( VHTOperIE.Length = VHTOperIE.Length > sizeof(pBssDesc->BssVHT.bdVHTOperBuf)?\ sizeof(pBssDesc->BssVHT.bdVHTOperBuf):VHTOperIE.Length; //prevent from overflow - + CopyMem(pBssDesc->BssVHT.bdVHTOperBuf, VHTOperIE.Octet, VHTOperIE.Length); pBssDesc->BssVHT.bdVHTOperLen = VHTOperIE.Length; } @@ -696,7 +696,7 @@ VHTParsingVHTOpModeNotification( VHTNotifIE.Length = VHTNotifIE.Length > sizeof(pBssDesc->BssVHT.bdVHTOpModeNotifBuf)?\ sizeof(pBssDesc->BssVHT.bdVHTOpModeNotifBuf):VHTNotifIE.Length; //prevent from overflow - + CopyMem(pBssDesc->BssVHT.bdVHTOpModeNotifBuf, VHTNotifIE.Octet, VHTNotifIE.Length); pBssDesc->BssVHT.bdVHTOpModeNotifLen = VHTNotifIE.Length; } @@ -722,7 +722,7 @@ VHTUseDefaultSettingFromReg( PlatformMoveMemory(pMgntInfo->dot11VHTOperationalRateSet, pMgntInfo->Regdot11VHTOperationalRateSet, 2); pMgntInfo->VHTHighestOperaRate = pMgntInfo->RegVHTHighestOperaRate; - + pMgntInfo->dot11CurrentChannelBandWidth = CHNL_GetRegBWSupport(Adapter); } @@ -737,8 +737,8 @@ VHTUseDefaultSettingFromDefault( PADAPTER DefAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pDefMgntInfo = &DefAdapter->MgntInfo; PRT_VERY_HIGH_THROUGHPUT pDefVHTInfo = pDefMgntInfo->pVHTInfo; - - //===== The ones that not follow ====== + + //===== The ones that not follow ====== pVHTInfo->bCurShortGI80MHz = TRUE; pVHTInfo->VhtCurLdpc = pVHTInfo->VhtLdpcCap; pVHTInfo->VhtCurStbc = pVHTInfo->VhtStbcCap; @@ -747,14 +747,14 @@ VHTUseDefaultSettingFromDefault( PlatformMoveMemory(pMgntInfo->dot11VHTOperationalRateSet, pMgntInfo->Regdot11VHTOperationalRateSet, 2); pMgntInfo->VHTHighestOperaRate = pMgntInfo->RegVHTHighestOperaRate; - //============================== + //============================== pVHTInfo->AMPDU_Len = pDefVHTInfo->AMPDU_Len; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AMPDU_FACTOR, &pVHTInfo->AMPDU_Len); pMgntInfo->dot11CurrentChannelBandWidth = pDefMgntInfo->dot11CurrentChannelBandWidth; } - + VOID VHTUseDefaultSetting( @@ -764,7 +764,7 @@ VHTUseDefaultSetting( PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; PRT_VERY_HIGH_THROUGHPUT pVHTInfo = GET_VHT_INFO(pMgntInfo); u1Byte TwoPortStatus =(u1Byte) TWO_PORT_STATUS__DEFAULT_ONLY; - + if(pVHTInfo->bEnableVHT) { pVHTInfo->bCurrentVHTSupport = TRUE; @@ -775,12 +775,12 @@ VHTUseDefaultSetting( //[win7 Two Port BW40Mhz issue] Extention Port Use Reg's Default Value. 2009.05.20, by bohn if( TwoPortStatus==TWO_PORT_STATUS__DEFAULT_ONLY || TwoPortStatus==TWO_PORT_STATUS__EXTENSION_ONLY || - TwoPortStatus==TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE) + TwoPortStatus==TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE) { - VHTUseDefaultSettingFromReg(Adapter); + VHTUseDefaultSettingFromReg(Adapter); } else if(TwoPortStatus==TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT) - { + { //[win7 Two Port BW40Mhz issue] Extention Port obey the rule of Default Port. 2009.05.20, by bohn VHTUseDefaultSettingFromDefault(Adapter); } @@ -806,7 +806,7 @@ VHTUseDefaultSetting( * /param Adapter Pionter to Adapter entity * pMCSRateSet Pointer to MCS rate bitmap * pMCSFilter Pointer to MCS rate filter -* +* * /return Highest MCS rate included in pMCSRateSet and filtered by pMCSFilter. * */ @@ -819,7 +819,7 @@ VHTGetHighestMCSRate( u1Byte i, j; u1Byte bitMap; u1Byte VHTMcsRate = 0; - + for(i = 0; i < 2; i++) { if(pVHTMCSRateSet[i] != 0xff) @@ -827,7 +827,7 @@ VHTGetHighestMCSRate( for(j = 0; j < 8; j += 2) { bitMap = (pVHTMCSRateSet[i] >> j) & 3; - + if(bitMap != 3) VHTMcsRate = MGN_VHT1SS_MCS7 + 10*j/2 + i*40 + bitMap; //VHT rate indications begin from 0x90 } @@ -872,7 +872,7 @@ VHTCheckVHTCap( CLEAR_FLAGS(pEntry->VHTInfo.VhtCurBeamform); // B11 SU Beamformer Capable, we are Beamformee - if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE) && + if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE) && GET_VHT_CAPABILITY_ELE_SU_BFER(pVHTCap)) { SET_FLAG(pEntry->VHTInfo.VhtCurBeamform, BEAMFORMING_VHT_BEAMFORMER_ENABLE); @@ -881,7 +881,7 @@ VHTCheckVHTCap( } // B12 SU Beamformee Capable, we are Beamformer - if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) && + if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) && GET_VHT_CAPABILITY_ELE_SU_BFEE(pVHTCap)) { SET_FLAG(pEntry->VHTInfo.VhtCurBeamform, BEAMFORMING_VHT_BEAMFORMEE_ENABLE); @@ -890,7 +890,7 @@ VHTCheckVHTCap( } // B19 MU Beamformer Capable, we are Beamformee - if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE) && + if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE) && GET_VHT_CAPABILITY_ELE_MU_BFER(pVHTCap)) { SET_FLAG(pEntry->VHTInfo.VhtCurBeamform, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE); @@ -899,14 +899,14 @@ VHTCheckVHTCap( } // B20 MU Beamformee Capable, we are Beamformer - if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE) && + if( TEST_FLAG(pVHTInfo->VhtBeamformCap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE) && GET_VHT_CAPABILITY_ELE_MU_BFEE(pVHTCap)) { SET_FLAG(pEntry->VHTInfo.VhtCurBeamform, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE); // Shit to BEAMFORMING_VHT_BEAMFORMEE_SOUND_DIM SET_FLAG(pVHTInfo->VhtCurBeamform, GET_VHT_CAPABILITY_ELE_SU_BFER_SOUND_DIM_NUM(pVHTCap)<<12); } - + RT_DISP(FBEAM, FBEAM_FUN, ("Client VHT Beaforming Cap = 0x%02X\n", pEntry->VHTInfo.VhtCurBeamform)); VHTFilterMCSRate(Adapter, GET_VHT_CAPABILITY_ELE_RX_MCS(pVHTCap), pEntry->VHTInfo.VHTRateSet); @@ -918,7 +918,7 @@ Function: Recovery to Initialize value Auther: sherry Date: 20111117 ************************************************************/ -VOID +VOID VHTInitializeBssDesc( IN PBSS_VHT pBssVHT ) @@ -974,16 +974,16 @@ VHTGetValueFromBeaconOrProbeRsp( if(Adapter->bInHctTest) return; - + // Get VHT Capability IE VHTCapIE = PacketGetElement(mmpdu, EID_VHTCapability, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); - + if(VHTCapIE.Length != 0) VHTParsingVHTCapElement(Adapter, VHTCapIE, bssDesc); else if(Adapter->MgntInfo.bRegIOTBcm256QAM) { VHTCapIE = PacketGetElement(mmpdu, EID_Vendor, OUI_SUB_11AC_EPIG_VHT_CAP, OUI_SUBTYPE_DONT_CARE); - + if(VHTCapIE.Length != 0) { VHTCapIE.Octet += 7; @@ -991,12 +991,12 @@ VHTGetValueFromBeaconOrProbeRsp( VHTParsingVHTCapElement(Adapter, VHTCapIE, bssDesc); } } - + RT_DISP(FBEACON, BCN_SHOW, ("EID_VHTCapability VHTCapIE.Length=%d\r\n", VHTCapIE.Length)); // Get VHT Opration IE VHTOperIE = PacketGetElement(mmpdu, EID_VHTOperation, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); - + if(VHTOperIE.Length != 0) VHTParsingVHTOperationElement(Adapter, VHTOperIE, bssDesc); else if(Adapter->MgntInfo.bRegIOTBcm256QAM) @@ -1007,7 +1007,7 @@ VHTGetValueFromBeaconOrProbeRsp( VHTOperIE.Octet = EpigIE.Octet+21; VHTOperIE.Length = 5; } - + if(VHTOperIE.Length != 0) VHTParsingVHTOperationElement(Adapter, VHTOperIE, bssDesc); } @@ -1015,7 +1015,7 @@ VHTGetValueFromBeaconOrProbeRsp( if(VHTCapIE.Length != 0) { bssDesc->BssVHT.bdSupportVHT = TRUE; - } + } // Operating Mode Notification VHTNotifIE = PacketGetElement(mmpdu, EID_OpModeNotification, OUI_SUB_DONT_CARE, OUI_SUBTYPE_DONT_CARE); @@ -1063,12 +1063,12 @@ VHTResetSelfAndSavePeerSetting( if(pBssDesc->BssVHT.bdVHTOperLen> 0 && pBssDesc->BssVHT.bdVHTOperLen <= sizeof(pVHTInfo->PeerVHTInfoBuf)) CopyMem(pVHTInfo->PeerVHTInfoBuf,pBssDesc->BssVHT.bdVHTOperBuf, pBssDesc->BssVHT.bdVHTOperLen); - + if(pBssDesc->BssVHT.bdVHTOperLen != 0) pVHTInfo->PeerChnlBW = (CHANNEL_WIDTH)GET_VHT_OPERATION_ELE_CHL_WIDTH(pBssDesc->BssVHT.bdVHTOperBuf); else pVHTInfo->PeerChnlBW = (CHANNEL_WIDTH)CHANNEL_WIDTH_20; - + pMgntInfo->IOTAction |= VHTIOTActIsAMsduEnable(Adapter); } else @@ -1092,7 +1092,7 @@ VHTUpdateSelfAndPeerSetting( { if(pBssDesc->BssVHT.bdVHTOperLen != 0) pVHTInfo->PeerChnlBW = (CHANNEL_WIDTH)GET_VHT_OPERATION_ELE_CHL_WIDTH(pBssDesc->BssVHT.bdVHTOperBuf); - + if(pBssDesc->BssVHT.bdVHTOpModeNotifLen > 0) { CHANNEL_WIDTH chnlBW = CHANNEL_WIDTH_20; @@ -1105,7 +1105,7 @@ VHTUpdateSelfAndPeerSetting( if(chnlBW != pMgntInfo->currentRABw) { - RT_TRACE(COMP_HT, DBG_LOUD, ("VHTUpdateSelfAndPeerSetting(): operating mode notification change bandwidth\n")); + RT_TRACE(COMP_HT, DBG_LOUD, ("VHTUpdateSelfAndPeerSetting(): operating mode notification change bandwidth\n")); bUpdateRA = TRUE; } @@ -1126,7 +1126,7 @@ VHTUpdateSelfAndPeerSetting( // -// Description: +// Description: // Update VHT Rate mask Regdot11OperationalRateSet. // // Arguments: @@ -1194,7 +1194,7 @@ VHTConstructOperationElement( {} -u1Byte +u1Byte VHTIOTActIsAMsduEnable( PADAPTER Adapter ) diff --git a/network/wlan/WDI/COMMON/VHTGen.h b/network/wlan/WDI/COMMON/VHTGen.h index 72eeb421b..51008b3fc 100644 --- a/network/wlan/WDI/COMMON/VHTGen.h +++ b/network/wlan/WDI/COMMON/VHTGen.h @@ -22,9 +22,9 @@ #define SET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+2, 7, 3, _val) //B23~B25 #define SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+3, 2, 2, _val) // B26~B27 #define SET_VHT_CAPABILITY_ELE_MCS_RX_MAP(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+4, 0, 16, _val) //B0~B15 indicate Rx MCS MAP, we write 0 to indicate MCS0~7. by page -#define SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+6, 0, 13, _val) +#define SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+6, 0, 13, _val) #define SET_VHT_CAPABILITY_ELE_MCS_TX_MAP(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+8, 0, 16, _val) //B0~B15 indicate Tx MCS MAP, we write 0 to indicate MCS0~7. by page -#define SET_VHT_CAPABILITY_ELE_MCS_TX_HIGHEST_RATE(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+10, 0, 13, _val) +#define SET_VHT_CAPABILITY_ELE_MCS_TX_HIGHEST_RATE(_pEleStart, _val) SET_BITS_TO_LE_2BYTE((_pEleStart)+10, 0, 13, _val) #define GET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(_pEleStart) LE_BITS_TO_1BYTE(_pEleStart, 0, 2) @@ -56,7 +56,7 @@ #define GET_VHT_OPERATION_ELE_CENTER_FREQ1(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart)+1,0,8) #define GET_VHT_OPERATION_ELE_CENTER_FREQ2(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart)+2,0,8) -//VHT Operating Mode +//VHT Operating Mode #define SET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(_pEleStart, _val) SET_BITS_TO_LE_1BYTE(_pEleStart, 0, 2, _val) #define SET_VHT_OPERATING_MODE_FIELD_RX_NSS(_pEleStart, _val) SET_BITS_TO_LE_1BYTE(_pEleStart, 4, 3, _val) #define SET_VHT_OPERATING_MODE_FIELD_RX_NSS_TYPE(_pEleStart, _val) SET_BITS_TO_LE_1BYTE(_pEleStart, 7, 1, _val) @@ -142,15 +142,15 @@ typedef struct _RT_VERY_HIGH_THROUGHPUT{ BOOLEAN bRegShortGI80MHz; // Capability setting for Tx Short GI for 80MHz BOOLEAN bCurShortGI80MHz; // Tx Short GI for 80MHz - u1Byte VhtLdpcCap; // Capability combination of VHT LDPC LDPC_VHT_XXX + u1Byte VhtLdpcCap; // Capability combination of VHT LDPC LDPC_VHT_XXX u1Byte VhtCurLdpc; // Current combination of VHT LDPC LDPC_VHT_XXX of target connection supports LDPC u1Byte VhtStbcCap; // Capability combination of STBC_VHT_XXX. u1Byte VhtCurStbc; // Current setting of STBC - u2Byte VhtBeamformCap; // Capability combination of VHT LDPC LDPC_VHT_XXX - u2Byte VhtCurBeamform; // Current combination of BEAMFORMING_VHT_XXX in BSS connection - + u2Byte VhtBeamformCap; // Capability combination of VHT LDPC LDPC_VHT_XXX + u2Byte VhtCurBeamform; // Current combination of BEAMFORMING_VHT_XXX in BSS connection + u1Byte AMPDU_Len; // Maximum A-MPUD Length Exponent // VHT related information for "Self" @@ -160,10 +160,10 @@ typedef struct _RT_VERY_HIGH_THROUGHPUT{ // VHT related information for "Peer" u1Byte PeerVHTCapBuf[32]; u1Byte PeerVHTInfoBuf[32]; - + // 40MHz Channel Offset settings. CHANNEL_WIDTH PeerChnlBW; - + // Operating Mode Notification BOOLEAN bOpModeNotif; CHANNEL_WIDTH BWToSwitch; @@ -208,7 +208,7 @@ typedef struct _RT_VHTINFO_STA_ENTRY{ typedef struct _BSS_VHT{ BOOLEAN bdSupportVHT; - + // VHT related elements u1Byte bdVHTCapBuf[13]; u2Byte bdVHTCapLen; diff --git a/network/wlan/WDI/COMMON/WOLPattern.c b/network/wlan/WDI/COMMON/WOLPattern.c index 5946768a6..344ad5f01 100644 --- a/network/wlan/WDI/COMMON/WOLPattern.c +++ b/network/wlan/WDI/COMMON/WOLPattern.c @@ -3,11 +3,11 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: WOLPattern.c - + Abstract: 1. This source file is going to be implemented the functions about Wake-on WLAN (WOL). - + Major Change History: When Who What ---------- --------------- ------------------------------- @@ -26,9 +26,9 @@ Major Change History: // // Description: Get the wake up frame pattern for wake-on WLAN (WOL). -// -// pWOLMaskToHW -It is an output. We must to set bit mask to HW in a reverse order, and -// sometimes to shift some bits because the payload offset from OS may +// +// pWOLMaskToHW -It is an output. We must to set bit mask to HW in a reverse order, and +// sometimes to shift some bits because the payload offset from OS may // be different from real wake up pattern. // 2009.06.15. by tynli. // @@ -51,29 +51,29 @@ GetWOLWakeUpPattern( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PRT_PM_WOL_PATTERN_INFO pWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); - + // Set the pattern match flag. pWoLPatternInfo[Index].IsPatternMatch = 1; - + // 8723A Hw just can save 12 patterns mask and CRC in registers, for the DTM reqirement, // the device should support 16 patterns, so the remain 4 patterns will be handled by Fw. // Keep all the pattern masks and contents, then download them in HaltAdapter(). 2012.03.19. by tynli. // To support wake pattern parsing so we need to store the pattern info. 2013.01.10, by tynli. AddWoLPatternEntry(pAdapter, pWOLPatternMask, WOLPatternMaskSize, pWOLPatternContent, WOLPatternContentSize, Index); - + PlatformZeroMemory((pu1Byte)WOLWakeupPattern, MAX_WOL_PATTERN_SIZE); PlatformZeroMemory((pu1Byte)mask, MAX_WOL_BIT_MASK_SIZE); PlatformZeroMemory((pu1Byte)MaskToHW, MAX_WOL_BIT_MASK_SIZE); - - //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("GetWOLWakeUpPattern() Mask: "), + + //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("GetWOLWakeUpPattern() Mask: "), //pWOLPatternMask, WOLPatternMaskSize); - //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("GetWOLWakeUpPattern() Pattern: "), + //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("GetWOLWakeUpPattern() Pattern: "), //pWOLPatternContent, WOLPatternContentSize); //1. Compare if DA = our MAC ADDR - + /* // 2009.07.09. //for DTM bit mask, it will macth from the highest bit of a byte, so we reverse each of byte. @@ -91,7 +91,7 @@ GetWOLWakeUpPattern( { MaskToHW[i] = pWOLPatternMask[i]; } - + // Remove MAC header 24 bytes. for(i=0; iHalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); - pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); + pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); + pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); } } // -// Description: +// Description: // To calculate the CRC remainder for the WOL wake up pattern. -// Input: +// Input: // A WOL Pattern, pattern length -// Output: +// Output: // The CRC remainder for the pattern // 2009.06.16. by tynli. // @@ -177,7 +177,7 @@ CalculateWOLPatternCRC( // unsigned char data[2]={0xC6,0xAA}; u2Byte CRC=0xffff; u4Byte i; - + for(i=0; iMgntInfo); @@ -266,7 +266,7 @@ ResetWoLPara( PRT_PM_WOL_PATTERN_INFO pPmWOLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); int i; - PlatformZeroMemory(pPmWOLPatternInfo, + PlatformZeroMemory(pPmWOLPatternInfo, sizeof(RT_PM_WOL_PATTERN_INFO)*(MAX_SUPPORT_WOL_PATTERN_NUM(Adapter))); for(i=0; iHalFunc.SetHwRegHandler(Adapter, HW_VAR_RESET_WFCRC, 0); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_RESET_WFCRC, 0); } VOID @@ -301,8 +301,8 @@ ConstructUserDefinedWakeUpPattern( { pGenBufAuthPacket = GetGenTempBuffer (Adapter, 100); AuthBuf = (u1Byte *)pGenBufAuthPacket->Buffer.Ptr; - - // + + // // 1. Auth // //Since this is always the 1st authentication frame @@ -331,7 +331,7 @@ ConstructUserDefinedWakeUpPattern( if(pPmWoLPatternInfo[Index].PatternId == 0) break; } - + if(Index >= MAX_SUPPORT_WOL_PATTERN_NUM(Adapter)) { RT_TRACE(COMP_POWER, DBG_LOUD, @@ -376,10 +376,10 @@ WolByGtkUpdate( { PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL((&pAdapter->MgntInfo)); - if((pPSC->WakeUpReason & (WOL_REASON_GTK_UPDATE | WOL_REASON_PTK_UPDATE)) != 0) - { + if((pPSC->WakeUpReason & (WOL_REASON_GTK_UPDATE | WOL_REASON_PTK_UPDATE)) != 0) + { if(PlatformGetCurrentTime() <= pPSC->LastWakeUpTime + 20000000) // 10 sec - { + { RT_TRACE_F(COMP_POWER, DBG_LOUD, ("Wake up by GTK and Indicate the WOL by GTK event!\n")); PlatformIndicateCustomStatus( pAdapter, @@ -417,11 +417,11 @@ RemoveUserDefinedWoLPattern( pPmWoLPatternInfo[Index].IsPatternMatch = 0; pPmWoLPatternInfo[Index].IsUserDefined = 0; pPmWoLPatternInfo[Index].IsSupportedByFW = 0; - - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); + + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); pPmWoLPatternInfo[Index].HwWFMIndex = 0xff; // reset the value after clear HW/CAM entry. - + pPSC->WoLPatternNum--; } } @@ -464,8 +464,8 @@ AddWoLPatternEntry( } } - } - + } + // // Add pattern content entry. // @@ -479,7 +479,7 @@ AddWoLPatternEntry( // // Description: Get the entrties to download to Fw. -// Input: +// Input: // - EnteryNum: [total pattern number (set by the OID) - 12 (Hw capability)] // VOID @@ -487,7 +487,7 @@ GetWoLPatternMatchOffloadEntries( IN PADAPTER Adapter, IN u1Byte EntryNum ) -{ +{ PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PRT_PM_WOL_PATTERN_INFO pWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); @@ -562,7 +562,7 @@ WoL_TranslateDot11FrameToDot3( bToDS = (Frame_ToDS(frame) ? TRUE : FALSE); bFromDS = (Frame_FromDS(frame) ? TRUE : FALSE); - + if(bToDS && !bFromDS) { GET_80211_HDR_ADDRESS3(pHeader, MacDestAddr); // DA @@ -655,7 +655,7 @@ WoL_IsMagicPacket( u2Byte i, j; u2Byte PayloadLen; BOOLEAN bMatchPacket=FALSE; - + FillOctetString(frame, pRfd->Buffer.VirtualAddress, pRfd->PacketLength); pHeader = frame.Octet; @@ -705,9 +705,9 @@ WoL_IsMagicPacket( RT_TRACE(COMP_RECV, DBG_TRACE, ("WoL_IsMagicPacket(): Packet length error. 1\n")); break; } - + // Find FF FF FF FF FF FF pattern. - if(*(pHeader+i+1) == 0xFF && *(pHeader+i+2) == 0xFF && + if(*(pHeader+i+1) == 0xFF && *(pHeader+i+2) == 0xFF && *(pHeader+i+3) == 0xFF && *(pHeader+i+4) == 0xFF && *(pHeader+i+5) == 0xFF) { @@ -717,7 +717,7 @@ WoL_IsMagicPacket( RT_TRACE(COMP_RECV, DBG_TRACE, ("WoL_IsMagicPacket(): Packet length error. 2\n")); break; } - + // Repeat STA addr 16 times. for(j=0; j<16; j++) { @@ -780,7 +780,7 @@ WoL_IsPatternMatchPacket( // Translate 802.11 packet format to 802.3 format to match the pattern match content set by OID. WoL_TranslateDot11FrameToDot3(Adapter, pRfd, pDot3Packet, &Dot3PacketLen); - + for(Index=0; IndexMgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); //static BOOLEAN bWakePacket = FALSE; @@ -880,7 +880,7 @@ WoL_HandleReceivedPacket( } RT_TRACE(COMP_POWER, DBG_LOUD, ("~~~~~~~~ It is a wake packet(%d)!\n", pRtRfdStatus->WakeMatch)); //RT_PRINT_DATA(COMP_INIT, DBG_LOUD,"WoL_HandleReceivedPacket: \n", pRfd->Buffer.VirtualAddress, pRfd->PacketLength); - + } else { @@ -903,7 +903,7 @@ WoL_HandleReceivedPacket( pPSC->WakeUpReason = WOL_REASON_PATTERN_PKT; } } - + // Indicate PM wake reason and packet to the OS. if(pPSC->bFindWakePacket) { diff --git a/network/wlan/WDI/COMMON/WOLPattern.h b/network/wlan/WDI/COMMON/WOLPattern.h index 5048d6f8e..e50aa551d 100644 --- a/network/wlan/WDI/COMMON/WOLPattern.h +++ b/network/wlan/WDI/COMMON/WOLPattern.h @@ -45,7 +45,7 @@ CRC16_CCITT( VOID ResetWoLPara( - IN PADAPTER Adapter + IN PADAPTER Adapter ); VOID diff --git a/network/wlan/WDI/COMMON/WPS.c b/network/wlan/WDI/COMMON/WPS.c index 6aa96fd3c..8b1fd8252 100644 --- a/network/wlan/WDI/COMMON/WPS.c +++ b/network/wlan/WDI/COMMON/WPS.c @@ -5,20 +5,20 @@ Module: WPS.c (RTL8190 Source C File) Note: Declare some variable which will be used by any debug command. - - Function: - - Export: - Abbrev: + Function: + + Export: + + Abbrev: History: Data Who Remark - + 06/15/2011 MH_Chen Create initial version. Move WPS relative functio to the files. - - + + ******************************************************************************/ /* Header Files. */ #include "Mp_Precomp.h" @@ -71,7 +71,7 @@ WPS_Init( ) { PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(&(GetDefaultAdapter(Adapter)->MgntInfo)); - + Adapter->WPSSupport = TRUE; pSimpleConfig->WpsIeVersion = SUPPORT_WPS_INFO_VERSION; } @@ -98,7 +98,7 @@ WPS_OnAsocReq( return FALSE; } return TRUE; - + } @@ -109,15 +109,15 @@ WPS_MgntActSet_802_11_SSID( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(&(Adapter->MgntInfo)); - + if( MgntIsLinkInProgress(pMgntInfo) && pSimpleConfig->bEnabled) { RT_TRACE(COMP_WPS, DBG_LOUD, ("MgntActSet_802_11_SSID(): In WPS process, do not connect to the same AP\n")); return TRUE; - } + } return FALSE; - + } @@ -139,11 +139,11 @@ WPS_ConstructBeaconFrame( if(!ACTING_AS_AP(Adapter)) return; - + pDefaultMgntInfo = &(GetDefaultAdapter(Adapter)->MgntInfo); pSimpleConfig = GET_SIMPLE_CONFIG(pDefaultMgntInfo); - + if( ((pSimpleConfig->WpsIeVersion < SUPPORT_WPS_INFO_VERSION) || (wps_IsWPSIEReady(Adapter) == FALSE)) && pSimpleConfig->IELen > 0) { // Original method carrying WPS IE RT_TRACE(COMP_WPS, DBG_TRACE, ("AP Construct Beacon \n")); @@ -156,7 +156,7 @@ WPS_ConstructBeaconFrame( if(pSimpleConfig->ieBeaconLen > 0) PacketAppendData(&pMgntInfo->beaconframe, SimpleConfigInfo); } - + } @@ -169,7 +169,7 @@ WPS_AppendElement( ) { PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(&(GetDefaultAdapter(Adapter)->MgntInfo)); - OCTET_STRING SimpleConfigInfo; + OCTET_STRING SimpleConfigInfo; FunctionIn(COMP_WPS); #if 0 @@ -187,7 +187,7 @@ WPS_AppendElement( currPtr = pSimpleConfig->IEBuf; //Tesplan to copy the first octet in the first fragment PlatformMoveMemory(tempBuf, currPtr, SIZE_OUI + SIZE_OUI_TYPE); - currPtr += (SIZE_OUI + SIZE_OUI_TYPE); + currPtr += (SIZE_OUI + SIZE_OUI_TYPE); currPtrAftOui = &tempBuf[SIZE_OUI + SIZE_OUI_TYPE]; // the first octet @@ -195,8 +195,8 @@ WPS_AppendElement( currPtr += 1; FillOctetString(SimpleConfigInfo,tempBuf,(SIZE_OUI + SIZE_OUI_TYPE +1)); PacketMakeElement( posFrame, EID_Vendor, SimpleConfigInfo); - - // the rest octet + + // the rest octet PlatformZeroMemory(currPtrAftOui, 1); PlatformMoveMemory(currPtrAftOui, currPtr, (pSimpleConfig->IELen-(SIZE_OUI + SIZE_OUI_TYPE)-1) ); @@ -214,7 +214,7 @@ WPS_AppendElement( currPtr = pSimpleConfig->IEBuf; //Tesplan to copy the first octet in the first fragment PlatformMoveMemory(tempBuf, currPtr, SIZE_OUI + SIZE_OUI_TYPE); - currPtr += (SIZE_OUI + SIZE_OUI_TYPE); + currPtr += (SIZE_OUI + SIZE_OUI_TYPE); currPtrAftOui = &tempBuf[SIZE_OUI + SIZE_OUI_TYPE]; // the first fragment @@ -222,14 +222,14 @@ WPS_AppendElement( currPtr += (MAX_SIMPLE_CONFIG_IE_LEN - (SIZE_OUI + SIZE_OUI_TYPE)); FillOctetString(SimpleConfigInfo,tempBuf,(MAX_SIMPLE_CONFIG_IE_LEN - (SIZE_OUI + SIZE_OUI_TYPE))); PacketMakeElement( posFrame, EID_Vendor, SimpleConfigInfo); - - // the rest octet + + // the rest octet PlatformZeroMemory(currPtrAftOui, (MAX_SIMPLE_CONFIG_IE_LEN - (SIZE_OUI + SIZE_OUI_TYPE))); PlatformMoveMemory(currPtrAftOui, currPtr, (pSimpleConfig->IELen-MAX_SIMPLE_CONFIG_IE_LEN) ); FillOctetString(SimpleConfigInfo,tempBuf,(pSimpleConfig->IELen-MAX_SIMPLE_CONFIG_IE_LEN)); PacketMakeElement( posFrame, EID_Vendor, SimpleConfigInfo); - + } else { @@ -264,7 +264,7 @@ WPS_AppendElement( PacketAppendData(posFrame, SimpleConfigInfo); } break; - + case WPS_INFO_PROBEREQ_IE: { FillOctetString(SimpleConfigInfo, pSimpleConfig->ieProbeReqBuf, pSimpleConfig->ieProbeReqLen); @@ -299,7 +299,7 @@ WPS_CopyRxEAPPacket( { PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(&(GetDefaultAdapter(Adapter)->MgntInfo)); pu1Byte RecieveBufPtrt,RfdBufferPtr; - + pu1Byte BufferPtr = (pu1Byte)&(pRfd->PacketLength ); RT_TRACE(COMP_WPS, DBG_LOUD, ("In WPS Copy EAP Packet\n")); pRfd->PacketLength -= 18;//18 is the length we don't want @@ -316,13 +316,13 @@ WPS_CopyRxEAPPacket( RT_TRACE(COMP_WPS, DBG_LOUD, ("The Data is %x and QoS is Set\n",RfdBufferPtr[0])); pRfd->PacketLength -= 2;//18 is the length we don't want PlatformMoveMemory(pSimpleConfig->RecieveBuf,BufferPtr, 2); - + } PlatformMoveMemory(RecieveBufPtrt,RfdBufferPtr,(pRfd->PacketLength -(ETHERNET_ADDRESS_LENGTH*2)) ); pSimpleConfig->bRecievePacket = TRUE; pSimpleConfig->RecieveLength = (pRfd->PacketLength+2);// 2 is the packet length we reserved for report to lib RT_PRINT_DATA(COMP_WPS, DBG_LOUD, "EAP Packet Content:", pSimpleConfig->RecieveBuf, pRfd->PacketLength); - + } @@ -337,7 +337,7 @@ WPS_QueryRxEAPPacket( { PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(&(Adapter->MgntInfo)); RT_STATUS status = RT_STATUS_SUCCESS; - + RT_TRACE(COMP_WPS, DBG_LOUD, ("WPS Check Recieve Buffer:\n")); if( InformationBufferLength < pSimpleConfig->RecieveLength) { @@ -345,7 +345,7 @@ WPS_QueryRxEAPPacket( *BytesWritten = 0; return RT_STATUS_INVALID_CONTEXT; } - + if(!pSimpleConfig->bRecievePacket) { *BytesNeeded =0; diff --git a/network/wlan/WDI/COMMON/WPS.h b/network/wlan/WDI/COMMON/WPS.h index 35f425600..470fe6c19 100644 --- a/network/wlan/WDI/COMMON/WPS.h +++ b/network/wlan/WDI/COMMON/WPS.h @@ -5,17 +5,17 @@ * * * Note: Declare some variable which will be used by any debug command. - * * - * Export: * - * Abbrev: + * Export: * - * History: - * Data Who Remark + * Abbrev: + * + * History: + * Data Who Remark * 06/15/2011 MHC Create initial version in different filed. * Move WPS relative define to the header file. - * + * *****************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __WPS_H__ @@ -46,7 +46,7 @@ typedef enum _WPS_INFO_OPCODE{ WPS_INFO_QUERY_INFO = 7, }WPS_INFO_OPCODE; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ // @@ -72,7 +72,7 @@ typedef struct _SIMPLE_CONFIG_T{ u1Byte ieProbeReqBuf[MAX_SIMPLE_CONFIG_IE_LEN_V2]; u2Byte ieProbeRspLen; u1Byte ieProbeRspBuf[MAX_SIMPLE_CONFIG_IE_LEN_V2]; - + u1Byte AssembleIEBuf[MAX_SIMPLE_CONFIG_IE_ASSEMBLE_LEN]; // Buffer to assemble fragment IE. u2Byte AssembleIELen; u1Byte RecieveBuf[MAX_SIMPLE_Return_PacketLength];//Save The packet we Recieve @@ -81,7 +81,7 @@ typedef struct _SIMPLE_CONFIG_T{ BOOLEAN bFragmentIE; }SIMPLE_CONFIG_T, *PSIMPLE_CONFIG_T; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ diff --git a/network/wlan/WDI/COMMON/WPS_Def.h b/network/wlan/WDI/COMMON/WPS_Def.h index 0675c6dff..bacb4afe4 100644 --- a/network/wlan/WDI/COMMON/WPS_Def.h +++ b/network/wlan/WDI/COMMON/WPS_Def.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: // Contains WPS definitions specified in the spec. diff --git a/network/wlan/WDI/COMMON/Wapi.h b/network/wlan/WDI/COMMON/Wapi.h index bf45131d5..415f85885 100644 --- a/network/wlan/WDI/COMMON/Wapi.h +++ b/network/wlan/WDI/COMMON/Wapi.h @@ -12,7 +12,7 @@ typedef enum _RT_WAPI_CALLBACK_FUNC_DEF //One Param WAPI_ENABLEWAPISUPPORT=0, WAPI_INIT=1, - WAPI_RETURNALLCAMENTRY=2, + WAPI_RETURNALLCAMENTRY=2, WAPI_RETURNALLSTAINFO=3, WAPI_FREEALLSTAINFO=4, WAPI_CONSTRUCTBEACON=5, @@ -35,7 +35,7 @@ typedef enum _RT_WAPI_CALLBACK_FUNC_DEF WAPI_SETAUTHENCRYPTSTATE = 20, //four Param WAPI_SETCAMENTRY = 21, - + WAPI_MAX =100, }RT_WAPI_FUNC_E; @@ -53,13 +53,13 @@ typedef enum _RT_WAPI_QUERYSET_VARIABLE WAPI_VAR_FIRSTAUTHENTIATEINPROGRESS, WAPI_VAR_NOTSETENCMACHEADER, WAPI_VAR_WAPIPSK, - + WAPI_VAR_MAX =255, }RT_WAPI_QUERYSET_VARIABLE; typedef enum _WAPI_REQUEST_TYPE { - WAPI_REQUEST_QUERY, + WAPI_REQUEST_QUERY, WAPI_REQUEST_SET, WAPI_REQUEST_METHOD, } WAPI_REQUEST_TYPE, *PWAPI_REQUEST_TYPE; @@ -112,11 +112,11 @@ typedef struct _WAPI_REQUEST #define DOT11_AUTH_ALGO_WAPI_PSK DOT11_AUTH_ALGO_IHV_START + 0x00000010L #define DOT11_AUTH_ALGO_WAPI_CERTIFICATE DOT11_AUTH_ALGO_IHV_START + 0x00000011L #define DOT11_CIPHER_ALGO_WAPI_SMS4 DOT11_CIPHER_ALGO_IHV_START + 0x00000010L - -#define WAPI_LITTLE_ENDIAN -#define ENCRYPT 0 -#define DECRYPT 1 + +#define WAPI_LITTLE_ENDIAN +#define ENCRYPT 0 +#define DECRYPT 1 typedef unsigned char muint8; typedef unsigned short muint16; typedef unsigned int muint32; @@ -193,7 +193,7 @@ typedef struct tag_Wapi_Handler_Def //int directory; /* Directory */ INT32 wapi_func_name; /* Use enum to define the function name. */ RT_STATUS (*wapi_func1) - ( IN PADAPTER pAdapter); + ( IN PADAPTER pAdapter); RT_STATUS (*wapi_func2) ( IN PADAPTER pAdapter, IN PVOID pWapiParam); @@ -215,7 +215,7 @@ typedef struct tag_Wapi_Handler_Def // //One Param // WAPI_ENABLEWAPISUPPORT=0, // WAPI_INIT=1, -// WAPI_RETURNALLCAMENTRY=2, +// WAPI_RETURNALLCAMENTRY=2, // WAPI_RETURNALLSTAINFO=3, // WAPI_FREEALLSTAINFO=4, // WAPI_CONSTRUCTBEACON=5, @@ -238,7 +238,7 @@ typedef struct tag_Wapi_Handler_Def // WAPI_SETAUTHENCRYPTSTATE = 20, // //four Param // WAPI_SETCAMENTRY = 21, -// +// // WAPI_MAX =100, // }RT_WAPI_FUNC_E; @@ -317,11 +317,11 @@ typedef enum _RT_WAPI_PACKET_TYPE typedef struct _RT_WAPI_STA_INFO { RT_LIST_ENTRY list; - u1Byte PeerMacAddr[6]; + u1Byte PeerMacAddr[6]; RT_WAPI_KEY wapiUsk; RT_WAPI_KEY wapiUskUpdate; RT_WAPI_KEY wapiMsk; - RT_WAPI_KEY wapiMskUpdate; + RT_WAPI_KEY wapiMskUpdate; u1Byte lastRxUnicastPN[16]; u1Byte lastTxUnicastPN[16]; u1Byte lastRxMulticastPN[16]; @@ -354,7 +354,7 @@ typedef struct _RT_WAPI_T u1Byte assoRspWapiIELength; u1Byte sendbeaconWapiIE[256]; u1Byte sendbeaconWapiIELength; -//BKID +//BKID RT_WAPI_BKID wapiBKID[WAPI_MAX_BKID_NUM]; RT_LIST_ENTRY wapiBKIDIdleList; RT_LIST_ENTRY wapiBKIDStoreList; @@ -398,9 +398,9 @@ typedef struct _RT_WAPI_T //RT_LIST_ENTRY wapiCamIdleList; //RT_LIST_ENTRY wapiCamUsedList; -// For WAPI IHV Support - u1Byte bIsWapiIHVSupport; - +// For WAPI IHV Support + u1Byte bIsWapiIHVSupport; + }RT_WAPI_T,*PRT_WAPI_T; @@ -425,7 +425,7 @@ WAPI_EventQuerySetInformation( OUT PULONG BytesNeeded ); -void +void WAPI_OptionHandler( PADAPTER Adapter, pu1Byte DestAddr, @@ -456,7 +456,7 @@ WAPI_OidHandler( OUT PULONG BytesNeeded ); -u1Byte +u1Byte WAPI_QuerySetVariable( IN PADAPTER Adapter, IN u1Byte QuerySet, @@ -474,5 +474,5 @@ WAPI_QuerySetVariable( __inline RT_STATUS WAPI_SecFuncHandler(UINT32 WapiFunc, PVOID pWapiParam,...){ return RT_STATUS_NOT_SUPPORT;} #endif // #ifndef __INC_SUPPLICANT_H -#endif +#endif diff --git a/network/wlan/WDI/COMMON/Widi.h b/network/wlan/WDI/COMMON/Widi.h index 7554470b2..f1e2e1d8e 100644 --- a/network/wlan/WDI/COMMON/Widi.h +++ b/network/wlan/WDI/COMMON/Widi.h @@ -109,7 +109,7 @@ WFD_AppendTDLSSetupIEs( OUT POCTET_STRING posMsdu ); -VOID +VOID WFD_ScanListClear( IN PADAPTER pAdapter ); diff --git a/network/wlan/WDI/COMMON/pool.c b/network/wlan/WDI/COMMON/pool.c index 3eab95742..dc11a8865 100644 --- a/network/wlan/WDI/COMMON/pool.c +++ b/network/wlan/WDI/COMMON/pool.c @@ -22,15 +22,15 @@ pool_OnBoundary( { if(pool->end <= (u1Byte *)entry) break; - + if((u1Byte *)entry < pool->start) break; - + if(((u1Byte *)entry - pool->start) % pool->entrySize) break; bOnBoundary = TRUE; - + }while(FALSE); if(!bOnBoundary) @@ -64,7 +64,7 @@ pool_DumpFreeList( RT_TRACE_F(pool->dbgComp, pool->dbgLevel, ("Head:\n")); pool_DumpListEntry(pool, &pool->freeList); - + for(pEntry = RTGetHeadList(&pool->freeList); pEntry != &pool->freeList; pEntry = RTNextEntryList(pEntry) @@ -98,7 +98,7 @@ Pool_Init( pool->start = pos; pool->end = end; pool->entrySize = entrySize; - + RTInitializeListHead(&pool->freeList); pool->freeCount = 0; @@ -129,7 +129,7 @@ Pool_Acquire( RT_ASSERT(pool, ("%s(): pool is NULL!!!\n", __FUNCTION__)); RT_ASSERT(pool_sig == pool->sig, ("%s(): invalid pool\n", __FUNCTION__)); - + if(RTIsListEmpty(&pool->freeList)) return NULL; entry = (VOID *)RTRemoveHeadListWithCnt(&pool->freeList, &pool->freeCount); @@ -139,7 +139,7 @@ Pool_Acquire( pool->lowMark = pool->freeCount; RT_TRACE_F(pool->dbgComp, pool->dbgLevel, ("%s: lowMark: %u, cap: %u\n", pool->name, pool->freeCount, pool->cap)); } - + return entry; } @@ -153,7 +153,7 @@ Pool_Release( RT_ASSERT(pool_sig == pool->sig, ("%s(): invalid pool\n", __FUNCTION__)); RT_ASSERT(entry < (VOID *)pool->end, ("%s(): entry (%p) beyond end (%p)\n", __FUNCTION__, entry, pool->end)); - RT_ASSERT((VOID *)pool->start <= entry, ("%s(): entry (%p) below start (%p)\n", __FUNCTION__, entry, pool->start)); + RT_ASSERT((VOID *)pool->start <= entry, ("%s(): entry (%p) below start (%p)\n", __FUNCTION__, entry, pool->start)); if(pool_OnBoundary(pool, entry)) { @@ -163,7 +163,7 @@ Pool_Release( { Pool_Dump(pool); } - + return; } @@ -174,7 +174,7 @@ Pool_Dump( { RT_ASSERT(pool, ("%s(): pool is NULL!!!\n", __FUNCTION__)); RT_ASSERT(pool_sig == pool->sig, ("%s(): invalid pool\n", __FUNCTION__)); - + RT_TRACE_F(pool->dbgComp, pool->dbgLevel, ("---\n")); RT_TRACE_F(pool->dbgComp, pool->dbgLevel, ("name: %s\n", pool->name)); RT_TRACE_F(pool->dbgComp, pool->dbgLevel, ("start addr: %p\n", pool->start)); diff --git a/network/wlan/WDI/COMMON/pool.h b/network/wlan/WDI/COMMON/pool.h index 9c61df6d5..37b97f472 100644 --- a/network/wlan/WDI/COMMON/pool.h +++ b/network/wlan/WDI/COMMON/pool.h @@ -1,10 +1,10 @@ //--------------------------------------------------------------------------- // // Copyright (c) 2014 Realtek Semiconductor, Inc. All rights reserved. -// +// //--------------------------------------------------------------------------- // Description: -// +// // #ifndef __INC_POOL_H diff --git a/network/wlan/WDI/COMMON/sources.sample.list b/network/wlan/WDI/COMMON/sources.sample.list index 80682747f..33e7b57f1 100644 --- a/network/wlan/WDI/COMMON/sources.sample.list +++ b/network/wlan/WDI/COMMON/sources.sample.list @@ -3,7 +3,7 @@ // //: Comment at the beginning // OS: * Ebd6 Ebd7 WinXP Vista Win7 Win8 WinBlue // +: Add for OS -// -: Remove for OS +// -: Remove for OS // +(*) [Debug.c] @@ -12,7 +12,7 @@ +(*) [GeneralFunc.c] +(*) [DriverInterface.c] +(*) [Transmit.c] -+(*) [Receive.c] ++(*) [Receive.c] +(*) [MgntGen.c] +(*) [MgntConstructPacket.c] +(*) [MgntSendPacket.c] diff --git a/network/wlan/WDI/COMMON/sources.tpl.win b/network/wlan/WDI/COMMON/sources.tpl.win index 7e31cac45..25ac399e7 100644 --- a/network/wlan/WDI/COMMON/sources.tpl.win +++ b/network/wlan/WDI/COMMON/sources.tpl.win @@ -7,7 +7,7 @@ PRECOMPILED_PCH=precomp.pch PRECOMPILED_OBJ=precomp.obj # -# IC dependent directories are defined in +# IC dependent directories are defined in # the environment variable HAL_INC_DIRS. # INCLUDES=\ diff --git a/network/wlan/WDI/HAL/HalADCSampling.h b/network/wlan/WDI/HAL/HalADCSampling.h index e08088e6c..152b8ae1e 100644 --- a/network/wlan/WDI/HAL/HalADCSampling.h +++ b/network/wlan/WDI/HAL/HalADCSampling.h @@ -11,15 +11,15 @@ typedef struct _RT_ADCSMP_STRING{ typedef enum _RT_ADCSMP_TRIG_SEL { - ADCSMP_BB_TRIG, - ADCSMP_MAC_TRIG, + ADCSMP_BB_TRIG, + ADCSMP_MAC_TRIG, }RT_ADCSMP_TRIG_SEL, *PRT_ADCSMP_TRIG_SEL; typedef enum _RT_ADCSMP_TRIG_SIG_SEL { - ADCSMP_TRIG_CRCOK, - ADCSMP_TRIG_CRCFAIL, + ADCSMP_TRIG_CRCOK, + ADCSMP_TRIG_CRCFAIL, ADCSMP_TRIG_CCA, ADCSMP_TRIG_REG, }RT_ADCSMP_TRIG_SIG_SEL, *PRT_ADCSMP_TRIG_SIG_SEL; @@ -27,8 +27,8 @@ typedef enum _RT_ADCSMP_TRIG_SIG_SEL typedef enum _RT_ADCSMP_STATE { - ADCSMP_STATE_IDLE, - ADCSMP_STATE_SET, + ADCSMP_STATE_IDLE, + ADCSMP_STATE_SET, ADCSMP_STATE_QUERY, }RT_ADCSMP_STATE, *PRT_ADCSMP_STATE; @@ -65,8 +65,8 @@ ADCSmp_Set( RT_STATUS ADCSmp_Query( IN PADAPTER Adapter, - IN ULONG InformationBufferLength, - OUT PVOID InformationBuffer, + IN ULONG InformationBufferLength, + OUT PVOID InformationBuffer, OUT PULONG BytesWritten ); diff --git a/network/wlan/WDI/HAL/HalCam.h b/network/wlan/WDI/HAL/HalCam.h index 70069cac6..798be8dcb 100644 --- a/network/wlan/WDI/HAL/HalCam.h +++ b/network/wlan/WDI/HAL/HalCam.h @@ -4,9 +4,9 @@ #define CAM_CONTENT_COUNT 8 #define CAM_PAIRWISE_KEY_POSITION 4 -// 0~3 : Default Key +// 0~3 : Default Key // 4 : Default Port Station Key ( Pairwise key ) -// 5~HALF_CAM_ENTRY - MAX_BT_ASOC_ENTRY_NUM : TDSL +// 5~HALF_CAM_ENTRY - MAX_BT_ASOC_ENTRY_NUM : TDSL // HALF_CAM_ENTRY ~ TOTAL_CAM_ENTRY-1 : ExtAP( VWifi , XP-ExtAP and Win7/8 ExtAP ) // CAM_EXTSTA_PAIRWISE_KEY_POSITION : ExtSta key ( Pairwise key ) #define CAM_TDSL_START_INDEX 5 @@ -19,19 +19,19 @@ u1Byte AP_CamAddOneEntry( PADAPTER Adapter, - u1Byte *pucMacAddr, - u4Byte ulKeyId, - u4Byte ulEncAlg, - u4Byte ulUseDK, + u1Byte *pucMacAddr, + u4Byte ulKeyId, + u4Byte ulEncAlg, + u4Byte ulUseDK, u1Byte *pucKey ); u1Byte AP_Setkey( PADAPTER Adapter, - u1Byte *pucMacAddr, - u4Byte ulKeyId, - u4Byte ulEncAlg, - u4Byte ulUseDK, + u1Byte *pucMacAddr, + u4Byte ulKeyId, + u4Byte ulEncAlg, + u4Byte ulUseDK, u1Byte *pucKey); @@ -52,16 +52,16 @@ void AP_RemoveKey( //====================== u1Byte CamAddOneEntry( PADAPTER Adapter, - u1Byte *pucMacAddr, - u4Byte ulKeyId, - u4Byte ulEntryId, - u4Byte ulEncAlg, - u4Byte ulUseDK, + u1Byte *pucMacAddr, + u4Byte ulKeyId, + u4Byte ulEntryId, + u4Byte ulEncAlg, + u4Byte ulUseDK, u1Byte *pucKey ); int CamDeleteOneEntry( PADAPTER Adapter, - u1Byte *pucMacAddr, + u1Byte *pucMacAddr, u4Byte ulKeyId ); @@ -81,37 +81,37 @@ u1Byte CAM_find_usable( void CAM_program_entry( PADAPTER Adapter, - u4Byte iIndex, + u4Byte iIndex, u1Byte *pucMacad, - u1Byte *pucKey128, + u1Byte *pucKey128, u2Byte usConfig); void CAM_read_entry( PADAPTER Adapter, - u4Byte iIndex, + u4Byte iIndex, u1Byte *pucMacad, - u1Byte *pucKey128, + u1Byte *pucKey128, u2Byte *usConfig); void CAM_read_mac_config( PADAPTER Adapter, - u1Byte ucIndex, - u1Byte *pucMacad, + u1Byte ucIndex, + u1Byte *pucMacad, u2Byte *pusTempConfig); void CAM_mark_invalid( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte ucIndex); void CAM_empty_entry( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte ucIndex); void CAM_read_entry( PADAPTER Adapter, - u4Byte index, + u4Byte index, u1Byte *macad, - u1Byte *key128, + u1Byte *key128, u2Byte *config); void CAM_debug_print( @@ -129,12 +129,12 @@ VOID CamResetAllEntry(PADAPTER Adapter); -VOID +VOID AP_CamRestoreAllEntry( PADAPTER Adapter); -VOID +VOID CamRestoreAllEntry(PADAPTER Adapter); @@ -159,8 +159,8 @@ void CAM_Policy_Verify(void); u4Byte Sta_FindFreeEntry( PADAPTER Adapter, pu1Byte pMacAddr, - u4Byte KeyIndex, - u4Byte ulEncAlg, + u4Byte KeyIndex, + u4Byte ulEncAlg, u1Byte *pucKey ); diff --git a/network/wlan/WDI/HAL/HalComDef.h b/network/wlan/WDI/HAL/HalComDef.h index 7d0141968..86a763ba0 100644 --- a/network/wlan/WDI/HAL/HalComDef.h +++ b/network/wlan/WDI/HAL/HalComDef.h @@ -5,18 +5,18 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: HalComDef.h - + Abstract: Defined 92C/88E common data structure. - + Major Change History: When Who What ---------- --------------- ------------------------------- - 2011-12-13 Isaiah Create. + 2011-12-13 Isaiah Create. --*/ /*--------------------------Define Parameters-------------------------------*/ - + //#pragma mark -- Chip specific. -- @@ -33,7 +33,7 @@ extern const char *const GLBwSrc[]; // // 2011.01.06. Define new structure of chip version for RTL8723A and so on. Added by tynli. -// Modify Manufacture and ROM version field, revised by Roger, 2012.11.01. +// Modify Manufacture and ROM version field, revised by Roger, 2012.11.01. // /* | BIT15:12 | BIT11:9 | BIT 8:7 | BIT6:4 | BIT3 | BIT 2:0 | @@ -108,14 +108,14 @@ extern const char *const GLBwSrc[]; |-----------+-------------+-----------+-------------+-------------+----------------+---------+---------------+---------+---------| | RESERVE | CUT VERSION | RESERVE | ROM VERSION | CHIP TYPE | BT EXIST IN IC | RESERVE | MANUFACTURE | RF TYPE | IC NAME | | | | | | TEST/NORMAL | | | TSMC/UMC/SMIC | | | - + */ // Remaining the meaning corresponding to those value in each column we used before. // And below is those be added newly // [27:24] CUT VERSION: A-cut=0 // [19:17] ROM VERSION // [16] CHIP TYPE: -// [15] BT exist: No=0, Yes=1 +// [15] BT exist: No=0, Yes=1 // [13:12] MANUFACTURE: TSMC=0, UMC=1, SMIC=2 // [11:8] RF TYPE: 1T1R=0, 1T2R=1, 2T2R=2, 3T3R=3 // [7:0] IC name: 8703B=0x0B @@ -145,7 +145,7 @@ extern const char *const GLBwSrc[]; #define NORMAL_CHIP_v2 0x1 // Cut Version -#define A_CUT_VERSION_v2 0 +#define A_CUT_VERSION_v2 0 #define B_CUT_VERSION_v2 0x1 #define C_CUT_VERSION_v2 0x2 #define D_CUT_VERSION_v2 0x3 @@ -189,7 +189,7 @@ extern const char *const GLBwSrc[]; #define SET_CVID_CHIP_TYPE(BUFFER, INPUT) SFT_AND_SET_IN_CHIPVER(BUFFER, INPUT, 16) #define SET_CVID_CUT_VER(BUFFER, INPUT) SFT_AND_SET_IN_CHIPVER(BUFFER, INPUT, 24) -/*------------------------------ Chip/EFUSE Macro ----------------------------*/ +/*------------------------------ Chip/EFUSE Macro ----------------------------*/ //#pragma mark -- Chip/EFUSE Macro. -- //---------------------------------------------------------------------------- #define IS_81XXC(version) ((GET_CVID_IC_TYPE(version) == 0)? TRUE : FALSE) @@ -291,7 +291,7 @@ extern const char *const GLBwSrc[]; #define IS_LEAVE_PS_BF_EN_NIC(_Adapter) (((PHAL_DATA_TYPE)(_Adapter->HalData))->bLeavePsBeforeEnNic) -#define WLAN_802_11N 0 +#define WLAN_802_11N 0 #define WLAN_802_11AC 1 #define IS_DOT_11N_SERIES(_Adapter) (((PHAL_DATA_TYPE)(_Adapter->HalData))->bNicWirelessMode == WLAN_802_11N) @@ -323,7 +323,7 @@ extern const char *const GLBwSrc[]; -/*------------------------------ RTL81xxxDefCom.h Definiction -----------------------*/ +/*------------------------------ RTL81xxxDefCom.h Definiction -----------------------*/ //Move 8192CDefCom.h/8188EDefCom.h to here. #define HAL_DM_DIG_DISABLE BIT0 // Disable Dig @@ -338,12 +338,12 @@ extern const char *const GLBwSrc[]; // Queue mapping // //----------------------------------------------------------- -#define BK_QUEUE 0 -#define BE_QUEUE 1 -#define VI_QUEUE 2 -#define VO_QUEUE 3 -#define BEACON_QUEUE 4 -#define TXCMD_QUEUE 5 +#define BK_QUEUE 0 +#define BE_QUEUE 1 +#define VI_QUEUE 2 +#define VO_QUEUE 3 +#define BEACON_QUEUE 4 +#define TXCMD_QUEUE 5 #define MGNT_QUEUE 6 #define HIGH_QUEUE 7 #define HCCA_QUEUE 8 @@ -409,15 +409,15 @@ typedef enum _H2C_STATUS{ #define MAX_H2C_QUEUE_NUM 64 -/*------------------------------ end of RTL81xxxDefCom.h Definiction -----------------------*/ +/*------------------------------ end of RTL81xxxDefCom.h Definiction -----------------------*/ // For store intial value of BB register typedef struct _BB_INIT_REGISTER{ u2Byte offset; - + u4Byte value; - + }BB_INIT_REGISTER, *PBB_INIT_REGISTER; @@ -458,7 +458,7 @@ typedef struct _LOG_SYS_INTERRUPT u4Byte nISR_SPS_OCP; u4Byte nISR_RON; u4Byte nISR_PDN; - + } LOG_SYS_INTERRUPT, *PLOG_SYS_INTERRUPT; @@ -484,7 +484,7 @@ typedef struct _LOG_INTERRUPT u4Byte nISR_TXFOVW; u4Byte nISR_RXFOVW; u4Byte nISR_TXBCNOK; - u4Byte nISR_TXBCNERR; + u4Byte nISR_TXBCNERR; u4Byte nISR_BCNERLY_INT; u4Byte nISR_C2HCMD; u4Byte nISR_CPWM1; @@ -492,11 +492,11 @@ typedef struct _LOG_INTERRUPT u4Byte nISR_HSISR_IND; u4Byte nISR_GTINT3_IND; u4Byte nISR_GTINT4_IND; - u4Byte nISR_PSTIMEOUT; - u4Byte nISR_OCPINT; - u4Byte nISR_ATIMEND; - u4Byte nISR_ATIMEND_E; - u4Byte nISR_CTWEND; + u4Byte nISR_PSTIMEOUT; + u4Byte nISR_OCPINT; + u4Byte nISR_ATIMEND; + u4Byte nISR_ATIMEND_E; + u4Byte nISR_CTWEND; u4Byte nISR_MCU_ERR; // For 8188ES only u4Byte nISR_BIT32_TOGGLE; // For 8188ES only u4Byte nIMR_C2HCMD; @@ -513,7 +513,7 @@ HAL_SetBcnCtrlReg( IN u1Byte SetBits, IN u1Byte ClearBits ); -VOID +VOID HAL_UpdateDefaultSetting( IN PADAPTER pAdapter ); @@ -571,5 +571,5 @@ HAL_DownloadRSVD_PostCfg( BOOLEAN IS_HAL_MAC_INIT( IN PADAPTER Adapter ); - -#endif + +#endif diff --git a/network/wlan/WDI/HAL/HalComDesc.h b/network/wlan/WDI/HAL/HalComDesc.h index 3bfbc70d7..432a1739b 100644 --- a/network/wlan/WDI/HAL/HalComDesc.h +++ b/network/wlan/WDI/HAL/HalComDesc.h @@ -5,22 +5,22 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: HalComDesc.h - + Abstract: Defined 92C/88E common Descriptor structure. - + Major Change History: When Who What ---------- --------------- ------------------------------- - 2011-12-14 Isaiah Create. + 2011-12-14 Isaiah Create. --*/ /*--------------------------Define Parameters-------------------------------*/ - -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ -/*------------------------------ Tx Desc definition Macro ------------------------*/ + +/*------------------------------ Tx Desc definition Macro ------------------------*/ //#pragma mark -- Tx Desc related definition. -- //---------------------------------------------------------------------------- //----------------------------------------------------------- @@ -122,91 +122,91 @@ typedef enum _DESC_RATE_{ // CCK Rates, TxHT = 0 DESC_RATE1M = 0x00, DESC_RATE2M = 0x01, - DESC_RATE5_5M = 0x02, - DESC_RATE11M = 0x03, + DESC_RATE5_5M = 0x02, + DESC_RATE11M = 0x03, // OFDM Rates, TxHT = 0 DESC_RATE6M = 0x04, DESC_RATE9M = 0x05, - DESC_RATE12M = 0x06, - DESC_RATE18M = 0x07, - DESC_RATE24M = 0x08, - DESC_RATE36M = 0x09, - DESC_RATE48M = 0x0A, - DESC_RATE54M = 0x0B, + DESC_RATE12M = 0x06, + DESC_RATE18M = 0x07, + DESC_RATE24M = 0x08, + DESC_RATE36M = 0x09, + DESC_RATE48M = 0x0A, + DESC_RATE54M = 0x0B, // MCS Rates, TxHT = 1 - DESC_RATEMCS0 = 0x0C, - DESC_RATEMCS1 = 0x0D, - DESC_RATEMCS2 = 0x0E, - DESC_RATEMCS3 = 0x0F, - DESC_RATEMCS4 = 0x10, - DESC_RATEMCS5 = 0x11, - DESC_RATEMCS6 = 0x12, - DESC_RATEMCS7 = 0x13, - DESC_RATEMCS8 = 0x14, - DESC_RATEMCS9 = 0x15, - DESC_RATEMCS10 = 0x16, - DESC_RATEMCS11 = 0x17, - DESC_RATEMCS12 = 0x18, - DESC_RATEMCS13 = 0x19, - DESC_RATEMCS14 = 0x1A, - DESC_RATEMCS15 = 0x1B, - DESC_RATEMCS16 = 0x1C, - DESC_RATEMCS17 = 0x1D, - DESC_RATEMCS18 = 0x1E, - DESC_RATEMCS19 = 0x1F, - DESC_RATEMCS20 = 0x20, - DESC_RATEMCS21 = 0x21, - DESC_RATEMCS22 = 0x22, - DESC_RATEMCS23 = 0x23, - DESC_RATEMCS24 = 0x24, - DESC_RATEMCS25 = 0x25, - DESC_RATEMCS26 = 0x26, - DESC_RATEMCS27 = 0x27, - DESC_RATEMCS28 = 0x28, - DESC_RATEMCS29 = 0x29, - DESC_RATEMCS30 = 0x2A, + DESC_RATEMCS0 = 0x0C, + DESC_RATEMCS1 = 0x0D, + DESC_RATEMCS2 = 0x0E, + DESC_RATEMCS3 = 0x0F, + DESC_RATEMCS4 = 0x10, + DESC_RATEMCS5 = 0x11, + DESC_RATEMCS6 = 0x12, + DESC_RATEMCS7 = 0x13, + DESC_RATEMCS8 = 0x14, + DESC_RATEMCS9 = 0x15, + DESC_RATEMCS10 = 0x16, + DESC_RATEMCS11 = 0x17, + DESC_RATEMCS12 = 0x18, + DESC_RATEMCS13 = 0x19, + DESC_RATEMCS14 = 0x1A, + DESC_RATEMCS15 = 0x1B, + DESC_RATEMCS16 = 0x1C, + DESC_RATEMCS17 = 0x1D, + DESC_RATEMCS18 = 0x1E, + DESC_RATEMCS19 = 0x1F, + DESC_RATEMCS20 = 0x20, + DESC_RATEMCS21 = 0x21, + DESC_RATEMCS22 = 0x22, + DESC_RATEMCS23 = 0x23, + DESC_RATEMCS24 = 0x24, + DESC_RATEMCS25 = 0x25, + DESC_RATEMCS26 = 0x26, + DESC_RATEMCS27 = 0x27, + DESC_RATEMCS28 = 0x28, + DESC_RATEMCS29 = 0x29, + DESC_RATEMCS30 = 0x2A, DESC_RATEMCS31 = 0x2B, - // VHT MCS Rates, - DESC_RATEVHTSS1MCS0 = 0x2C, - DESC_RATEVHTSS1MCS1 = 0x2D, - DESC_RATEVHTSS1MCS2 = 0x2E, - DESC_RATEVHTSS1MCS3 = 0x2F, - DESC_RATEVHTSS1MCS4 = 0x30, - DESC_RATEVHTSS1MCS5 = 0x31, - DESC_RATEVHTSS1MCS6 = 0x32, - DESC_RATEVHTSS1MCS7 = 0x33, - DESC_RATEVHTSS1MCS8 = 0x34, - DESC_RATEVHTSS1MCS9 = 0x35, - DESC_RATEVHTSS2MCS0 = 0x36, - DESC_RATEVHTSS2MCS1 = 0x37, - DESC_RATEVHTSS2MCS2 = 0x38, - DESC_RATEVHTSS2MCS3 = 0x39, - DESC_RATEVHTSS2MCS4 = 0x3A, - DESC_RATEVHTSS2MCS5 = 0x3B, - DESC_RATEVHTSS2MCS6 = 0x3C, - DESC_RATEVHTSS2MCS7 = 0x3D, - DESC_RATEVHTSS2MCS8 = 0x3E, - DESC_RATEVHTSS2MCS9 = 0x3F, - DESC_RATEVHTSS3MCS0 = 0x40, - DESC_RATEVHTSS3MCS1 = 0x41, - DESC_RATEVHTSS3MCS2 = 0x42, - DESC_RATEVHTSS3MCS3 = 0x43, - DESC_RATEVHTSS3MCS4 = 0x44, - DESC_RATEVHTSS3MCS5 = 0x45, - DESC_RATEVHTSS3MCS6 = 0x46, - DESC_RATEVHTSS3MCS7 = 0x47, - DESC_RATEVHTSS3MCS8 = 0x48, - DESC_RATEVHTSS3MCS9 = 0x49, - DESC_RATEVHTSS4MCS0 = 0x4A, - DESC_RATEVHTSS4MCS1 = 0x4B, - DESC_RATEVHTSS4MCS2 = 0x4C, - DESC_RATEVHTSS4MCS3 = 0x4D, - DESC_RATEVHTSS4MCS4 = 0x4E, - DESC_RATEVHTSS4MCS5 = 0x4F, - DESC_RATEVHTSS4MCS6 = 0x50, - DESC_RATEVHTSS4MCS7 = 0x51, - DESC_RATEVHTSS4MCS8 = 0x52, - DESC_RATEVHTSS4MCS9 = 0x53, + // VHT MCS Rates, + DESC_RATEVHTSS1MCS0 = 0x2C, + DESC_RATEVHTSS1MCS1 = 0x2D, + DESC_RATEVHTSS1MCS2 = 0x2E, + DESC_RATEVHTSS1MCS3 = 0x2F, + DESC_RATEVHTSS1MCS4 = 0x30, + DESC_RATEVHTSS1MCS5 = 0x31, + DESC_RATEVHTSS1MCS6 = 0x32, + DESC_RATEVHTSS1MCS7 = 0x33, + DESC_RATEVHTSS1MCS8 = 0x34, + DESC_RATEVHTSS1MCS9 = 0x35, + DESC_RATEVHTSS2MCS0 = 0x36, + DESC_RATEVHTSS2MCS1 = 0x37, + DESC_RATEVHTSS2MCS2 = 0x38, + DESC_RATEVHTSS2MCS3 = 0x39, + DESC_RATEVHTSS2MCS4 = 0x3A, + DESC_RATEVHTSS2MCS5 = 0x3B, + DESC_RATEVHTSS2MCS6 = 0x3C, + DESC_RATEVHTSS2MCS7 = 0x3D, + DESC_RATEVHTSS2MCS8 = 0x3E, + DESC_RATEVHTSS2MCS9 = 0x3F, + DESC_RATEVHTSS3MCS0 = 0x40, + DESC_RATEVHTSS3MCS1 = 0x41, + DESC_RATEVHTSS3MCS2 = 0x42, + DESC_RATEVHTSS3MCS3 = 0x43, + DESC_RATEVHTSS3MCS4 = 0x44, + DESC_RATEVHTSS3MCS5 = 0x45, + DESC_RATEVHTSS3MCS6 = 0x46, + DESC_RATEVHTSS3MCS7 = 0x47, + DESC_RATEVHTSS3MCS8 = 0x48, + DESC_RATEVHTSS3MCS9 = 0x49, + DESC_RATEVHTSS4MCS0 = 0x4A, + DESC_RATEVHTSS4MCS1 = 0x4B, + DESC_RATEVHTSS4MCS2 = 0x4C, + DESC_RATEVHTSS4MCS3 = 0x4D, + DESC_RATEVHTSS4MCS4 = 0x4E, + DESC_RATEVHTSS4MCS5 = 0x4F, + DESC_RATEVHTSS4MCS6 = 0x50, + DESC_RATEVHTSS4MCS7 = 0x51, + DESC_RATEVHTSS4MCS8 = 0x52, + DESC_RATEVHTSS4MCS9 = 0x53, DESC_RATEMAX }DESC_RATE_E, *PDESC_RATE_E; @@ -224,7 +224,7 @@ typedef enum _DESC_RATE_{ #define TX_DESC_SIZE_8822BS 48 #define TX_INFO_SIZE_8822B TX_DESC_SIZE_8822BS -/*------------------------------ Tx Desc field Macro ----------------------------*/ +/*------------------------------ Tx Desc field Macro ----------------------------*/ //#pragma mark -- Tx Desc field. -- //---------------------------------------------------------------------------- @@ -248,14 +248,14 @@ typedef enum _DESC_RATE_{ -/*------------------------------Tx Desc definition----------------------------*/ +/*------------------------------Tx Desc definition----------------------------*/ #pragma pack (1) typedef struct _Phy_CCK_Rx_Status_Report { /* For CCK rate descriptor. This is a unsigned 8:1 variable. LSB bit presend 0.5. And MSB 7 bts presend a signed value. Range from -64~+63.5. */ u1Byte adc_pwdb_X[4]; - u1Byte SQ_rpt; + u1Byte SQ_rpt; u1Byte cck_agc_rpt; u1Byte cck_bb_pwr; }PHY_STS_CCK_T; @@ -272,7 +272,7 @@ typedef struct _Phy_CCK_Rx_Status_Report /*--------------------------Tx Descriptor related function---------------------*/ u1Byte -MTxBFPacketTypeToSNDPktSel( +MTxBFPacketTypeToSNDPktSel( IN u1Byte Type ); @@ -283,7 +283,7 @@ HwRateToMRate( ); u1Byte -MRateToHwRate( +MRateToHwRate( IN u1Byte rate ); @@ -293,7 +293,7 @@ HwRateToMRate_2( ); u1Byte -MRateToRateIndex( +MRateToRateIndex( IN u1Byte rate ); @@ -302,16 +302,16 @@ u1Byte QueryIsShort( IN PADAPTER Adapter, IN u1Byte TxHT, - IN u1Byte TxRate, + IN u1Byte TxRate, IN PRT_TCB pTcb ); u1Byte -MapHwQueueToFirmwareQueue( - IN PRT_TCB pTcb, +MapHwQueueToFirmwareQueue( + IN PRT_TCB pTcb, IN u1Byte QueueID ); - + u1Byte @@ -319,14 +319,14 @@ QueueMapping( u1Byte QueueID ); -#if TX_AGGREGATION +#if TX_AGGREGATION VOID TxSdioAggregation( IN PADAPTER Adapter, IN u1Byte queueId ); #endif - + /*--------------------------Rx Descriptor related function---------------------*/ @@ -350,13 +350,13 @@ UpdateRxSignalStatistics( IN OUT PRT_RFD pRfd ); -s4Byte +s4Byte TranslateToDbm( IN PADAPTER Adapter, IN u1Byte SignalStrengthIndex // 0-100 index. ); -u1Byte +u1Byte GetSignalQuality( IN PADAPTER Adapter ); @@ -385,7 +385,7 @@ RxDesc_FlushScanList( IN PADAPTER Adapter ); -u1Byte +u1Byte EVMdbToPercentage( IN s1Byte Value ); diff --git a/network/wlan/WDI/HAL/HalComFirmware.h b/network/wlan/WDI/HAL/HalComFirmware.h index 545f1c6c2..abfc53f41 100644 --- a/network/wlan/WDI/HAL/HalComFirmware.h +++ b/network/wlan/WDI/HAL/HalComFirmware.h @@ -6,9 +6,9 @@ #define PageNum_512(_Len) (u4Byte)(((_Len)>>9) + ((_Len)&0x1FF ? 1:0)) // -// Check if FW header exists. We do not consider the lower 4 bits in this case. +// Check if FW header exists. We do not consider the lower 4 bits in this case. // By tynli. 2009.12.04. -// Add new FW signature recognized ID 23xx for RTL8723. +// Add new FW signature recognized ID 23xx for RTL8723. // // Signature header for RLE0380 Test chip: 0x2300, RTL8723A Normal Chip: 0x2301 // Added by Roger, 2011.07.28. @@ -28,7 +28,7 @@ #define IS_H2CQUEUE_EMPTY(_pHalData) (_pHalData->H2CQueueTail == _pHalData->H2CQueueHead) #endif -#define GET_FIRMWARE(_Adapter) ((PRT_FIRMWARE) (((HAL_DATA_TYPE*)(_Adapter->HalData))->pFirmware)) +#define GET_FIRMWARE(_Adapter) ((PRT_FIRMWARE) (((HAL_DATA_TYPE*)(_Adapter->HalData))->pFirmware)) //#define FillH2CCmd(_Adapter, _ElementID, _CmdLen,_pCmdBuffer) \ @@ -47,7 +47,7 @@ //-------------------------------------------------- typedef enum _DESC_PACKET_TYPE{ DESC_PACKET_TYPE_INIT = 0, - DESC_PACKET_TYPE_NORMAL = 1, + DESC_PACKET_TYPE_NORMAL = 1, DESC_PACKET_TYPE_CMD }DESC_PACKET_TYPE; @@ -62,8 +62,8 @@ typedef enum _FIRMWARE_SOURCE{ FW_SOURCE_HEADER_FILE = 1, //from header file }FIRMWARE_SOURCE, *PFIRMWARE_SOURCE; -typedef struct _RT_FIRMWARE{ - FIRMWARE_SOURCE eFWSource; +typedef struct _RT_FIRMWARE{ + FIRMWARE_SOURCE eFWSource; u1Byte szFwBuffer[FW_SIZE]; u4Byte ulFwLength; u1Byte szWoWLANFwBuffer[FW_SIZE]; @@ -86,7 +86,7 @@ typedef struct _RT_FIRMWARE{ #define GET_FIRMWARE_HDR_FUNCTION(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 24, 8) // Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions #define GET_FIRMWARE_HDR_VERSION(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 0, 16)// FW Version #define GET_FIRMWARE_HDR_SUB_VER(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 16, 8) // FW Subversion, default 0x00 -#define GET_FIRMWARE_HDR_RSVD1(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 24, 8) +#define GET_FIRMWARE_HDR_RSVD1(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 24, 8) //--- LONG WORD 1 ---- #define GET_FIRMWARE_HDR_MONTH(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+8, 0, 8) // Release time Month field @@ -113,7 +113,7 @@ typedef struct _RT_FIRMWARE{ // New Firmware Header(8-byte alinment required) //===================================================== //--- LONG WORD 0 ---- -#define GET_FIRMWARE_HDR_SIGNATURE_3081(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 0, 16) +#define GET_FIRMWARE_HDR_SIGNATURE_3081(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 0, 16) #define GET_FIRMWARE_HDR_CATEGORY_3081(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 16, 8) // AP/NIC and USB/PCI #define GET_FIRMWARE_HDR_FUNCTION_3081(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 24, 8) // Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions #define GET_FIRMWARE_HDR_VERSION_3081(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 0, 16)// FW Version @@ -171,8 +171,8 @@ typedef struct _RT_FIRMWARE{ #endif //------------------------------------------------------- -// H2C Command length -// The defines should be seperated into 92C series and 88E series ICs +// H2C Command length +// The defines should be seperated into 92C series and 88E series ICs // because of the H2C Box length are different. 2012.04.18. Noted by tynli. //------------------------------------------------------- @@ -264,18 +264,18 @@ typedef struct _RT_FIRMWARE{ #define H2C_8192E_FCS_INFO_LEN 7 #define H2C_8192E_FCS_MACID_BITMAP_LEN 7 -typedef struct _H2C_JOINBSSRPT_PARM{ - u1Byte OpMode; +typedef struct _H2C_JOINBSSRPT_PARM{ + u1Byte OpMode; u1Byte Ps_Qos_Info; - u1Byte Bssid[6]; - u2Byte BcnItv; + u1Byte Bssid[6]; + u2Byte BcnItv; u2Byte Aid; }H2C_JOINBSSRPT_PARM, *PH2C_JOINBSSRPT_PARM; typedef struct _C2H_EVT_HDR{ u1Byte CmdID: 4; - u1Byte CmdLen: 4; + u1Byte CmdLen: 4; u1Byte CmdSeq; }C2H_EVT_HDR, *PC2H_EVT_HDR; @@ -302,7 +302,7 @@ typedef struct _H2C_WPA_TWO_WAY_PARA{ u1Byte pairwise_en_alg; u1Byte group_en_alg; H2C_WPA_PTK wpa_ptk_value; -#if(USE_OLD_WOWLAN_DEBUG_FW == 1) +#if(USE_OLD_WOWLAN_DEBUG_FW == 1) u8Byte IV; #endif }H2C_WPA_TWO_WAY_PARA, *PH2C_WPA_TWO_WAY_PARA; @@ -314,12 +314,12 @@ typedef struct _H2C_REMOTE_WAKE_CTRL_INFO{ typedef struct _NDP_INFO_{ u1Byte bEnable:1; - u1Byte bCheckRemoveIP:1; // Need to Check Sender IP or not - u1Byte Rsvd:6; // Need to Check Sender IP or not + u1Byte bCheckRemoveIP:1; // Need to Check Sender IP or not + u1Byte Rsvd:6; // Need to Check Sender IP or not u1Byte NumberOfTargetIP; // Number of Check IP which NA query IP u1Byte TagetLinkAddress[6]; // Maybe support change MAC address !! u1Byte RemoteIPv6Address[16]; // Just respond IP - u1Byte TargetIP[2][16]; // target IP + u1Byte TargetIP[2][16]; // target IP }NDP_INFO,*PNDP_INFO; @@ -358,7 +358,7 @@ typedef struct _H2C_SS_DRV_CTRL{ u1Byte PriodScanTime; // Fw periodical scan time. unit: 1sec. u1Byte bRFEEnable; // for 8812A switch band u1Byte RFEType; - u1Byte Rsvd[7]; + u1Byte Rsvd[7]; }H2C_SS_DRV_CTRL, *PH2C_SS_DRV_CTRL; @@ -386,9 +386,9 @@ typedef enum _RTL8192C_C2H_EVT C2H_TSF = 1, C2H_AP_RPT_RSP = 2, C2H_CCX_TX_RPT = 3, // The FW notify the report of the specific tx packet. - C2H_BT_RSSI = 4, + C2H_BT_RSSI = 4, C2H_BT_OP_MODE = 5, - C2H_EXT_RA_RPT = 6, + C2H_EXT_RA_RPT = 6, C2H_HW_INFO_EXCH = 10, C2H_C2H_H2C_TEST = 11, C2H_BT_INFO = 12, @@ -398,7 +398,7 @@ typedef enum _RTL8192C_C2H_EVT typedef enum _FW_SCAN_OFFLOAD_TYPE{ FW_SCAN_OFFLOAD_D0 = 0, - FW_SCAN_OFFLOAD_D3 = 1, + FW_SCAN_OFFLOAD_D3 = 1, }FW_SCAN_OFFLOAD_TYPE; //========================================================== diff --git a/network/wlan/WDI/HAL/HalComLed.h b/network/wlan/WDI/HAL/HalComLed.h index eaee5e77c..dc4753d62 100644 --- a/network/wlan/WDI/HAL/HalComLed.h +++ b/network/wlan/WDI/HAL/HalComLed.h @@ -5,15 +5,15 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: HalComLed.h - + Abstract: LED related data structure and interface to manipulate LED. - + Major Change History: When Who What ---------- --------------- ------------------------------- 2012-12-23 Isaiah Create. - + --*/ //================================================================================ @@ -28,7 +28,7 @@ Major Change History: #define LED_INITIAL_INTERVAL 1800 -// LED Customerization +// LED Customerization //NETTRONIX #define LED_BLINK_NORMAL_INTERVAL_NETTRONIX 100 @@ -127,16 +127,16 @@ typedef enum _LED_STATE{ LED_BLINK_RUNTOP = 13, // Customized for RunTop LED_BLINK_CAMEO = 14, LED_BLINK_XAVI = 15, - LED_BLINK_ALWAYS_ON = 16, + LED_BLINK_ALWAYS_ON = 16, LED_BLINK_LINK_IN_PROCESS = 17, //Customized for Belkin AC950 LED_BLINK_AUTH_ERROR = 18, //Customized for Belkin AC950 - LED_BLINK_Azurewave_5Mbps = 19, - LED_BLINK_Azurewave_10Mbps = 20, - LED_BLINK_Azurewave_20Mbps = 21, - LED_BLINK_Azurewave_40Mbps = 22, - LED_BLINK_Azurewave_80Mbps = 23, - LED_BLINK_Azurewave_MAXMbps = 24, - LED_BLINK_LINK_IDEL = 25, + LED_BLINK_Azurewave_5Mbps = 19, + LED_BLINK_Azurewave_10Mbps = 20, + LED_BLINK_Azurewave_20Mbps = 21, + LED_BLINK_Azurewave_40Mbps = 22, + LED_BLINK_Azurewave_80Mbps = 23, + LED_BLINK_Azurewave_MAXMbps = 24, + LED_BLINK_LINK_IDEL = 25, LED_BLINK_WPS_LINKED = 26, LED_BLINK_TIME_BY_REG = 27, LED_BLINK_ECS_Below_1Mbps = 28, @@ -155,7 +155,7 @@ typedef enum _LED_PIN{ - + //================================================================================ // SDIO LED Definition. @@ -176,7 +176,7 @@ typedef enum _LED_STRATEGY_SDIO{ SW_LED_MODE2, // SW control 1 LED via GPIO0, customized for AzWave 8187 minicard. SW_LED_MODE3, // SW control 1 LED via GPIO0, customized for Sercomm Printer Server case. SW_LED_MODE4, //for Edimax / Belkin - SW_LED_MODE5, //for Sercomm / Belkin + SW_LED_MODE5, //for Sercomm / Belkin SW_LED_MODE6, //for 88CU minicard, porting from ce SW_LED_MODE7 SW_LED_MODE7, //for ECS HW_LED, // HW control 2 LEDs, LED0 and LED1 (there are 4 different control modes, see MAC.CONFIG1 for details.) @@ -196,15 +196,15 @@ typedef struct _LED_SDIO{ // ALPHA, added by chiyoko, 20090106 BOOLEAN bLedNoLinkBlinkInProgress; BOOLEAN bLedLinkBlinkInProgress; - BOOLEAN bLedStartToLinkBlinkInProgress; + BOOLEAN bLedStartToLinkBlinkInProgress; BOOLEAN bLedScanBlinkInProgress; BOOLEAN bLedWPSBlinkInProgress; - + u4Byte BlinkTimes; // Number of times to toggle led state for blinking. LED_STATE BlinkingLedState; // Next state for blinking, either LED_ON or LED_OFF are. RT_TIMER BlinkTimer; // Timer object for led blinking. - RT_WORK_ITEM BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED. + RT_WORK_ITEM BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED. } LED_SDIO, *PLED_SDIO; VOID @@ -237,7 +237,7 @@ LedControlSDIO( SwLedOn_8723D(_Adapter,_pLed); \ else \ IS_HARDWARE_TYPE_8188E(_Adapter) ? SwLedOn_8188E(_Adapter, _pLed) : SwLedOn_Dummy(_Adapter, _pLed) - + #define SwLedOff(_Adapter, _pLed) \ if(IS_HARDWARE_TYPE_8814A(_Adapter)) \ SwLedOff_8814A(_Adapter, _pLed); \ @@ -257,13 +257,13 @@ LedControlSDIO( SwLedOff_8723D(_Adapter,_pLed); \ else \ IS_HARDWARE_TYPE_8188E(_Adapter) ? SwLedOff_8188E(_Adapter, _pLed) : SwLedOff_Dummy(_Adapter, _pLed) - + VOID InitSwLeds( IN PADAPTER Adapter ); - + VOID DeInitSwLeds( IN PADAPTER Adapter @@ -280,5 +280,5 @@ SwLedOff_Dummy( IN PADAPTER Adapter, IN PVOID pLed ); - + #endif /*__INC_HALCOMLED_H*/ diff --git a/network/wlan/WDI/HAL/HalComPhyCfg.h b/network/wlan/WDI/HAL/HalComPhyCfg.h index 0af6b8d5f..f40c593d0 100644 --- a/network/wlan/WDI/HAL/HalComPhyCfg.h +++ b/network/wlan/WDI/HAL/HalComPhyCfg.h @@ -4,18 +4,18 @@ * Module: __INC_HALCOMPHYCFG_H * * - * Note: - * + * Note: + * * * Export: Constants, macro, functions(API), global variables(None). * - * Abbrev: + * Abbrev: * * History: - * Data Who Remark + * Data Who Remark * 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h. * 2. Reorganize code architecture. - * + * *****************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __INC_HALCOMPHYCFG_H @@ -35,13 +35,13 @@ #define bMaskHWord 0xffff0000 #define bMaskLWord 0x0000ffff #define bMaskDWord 0xffffffff -#define bMask12Bits 0xfff +#define bMask12Bits 0xfff #define bMask7bits 0x7f -#define bMaskH4Bits 0xf0000000 +#define bMaskH4Bits 0xf0000000 #define bMaskOFDM_D 0xffc00000 #define bMaskCCK 0x3f3f3f3f -#define bRFRegOffsetMask 0xfffff +#define bRFRegOffsetMask 0xfffff typedef enum _RATE_SECTION { @@ -50,7 +50,7 @@ typedef enum _RATE_SECTION { HT_MCS0_MCS7, HT_MCS8_MCS15, HT_MCS16_MCS23, - HT_MCS24_MCS31, + HT_MCS24_MCS31, VHT_1SSMCS0_1SSMCS9, VHT_2SSMCS0_2SSMCS9, VHT_3SSMCS0_3SSMCS9, @@ -65,7 +65,7 @@ typedef enum _RF_TX_NUM { RF_MAX_TX_NUM, RF_TX_NUM_NONIMPLEMENT, } RF_TX_NUM; - + /*--------------------------Define Parameters-------------------------------*/ #define MAX_DOZE_WAITING_TIMES_9x 64 @@ -91,23 +91,23 @@ typedef enum _RF_TX_NUM { #define MAX_BASE_NUM_IN_PHY_REG_PG_2_4G 10 // CCK:1, OFDM:1, HT:4, VHT:4 #define MAX_BASE_NUM_IN_PHY_REG_PG_5G 9 // OFDM:1, HT:4, VHT:4 -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ typedef struct _BB_REGISTER_DEFINITION{ - u4Byte rfintfs; // set software control: + u4Byte rfintfs; // set software control: // 0x870~0x877[8 bytes] - - u4Byte rfintfo; // output data: + + u4Byte rfintfo; // output data: // 0x860~0x86f [16 bytes] - - u4Byte rfintfe; // output enable: + + u4Byte rfintfe; // output enable: // 0x860~0x86f [16 bytes] - + u4Byte rf3wireOffset; // LSSI data: // 0x840~0x84f [16 bytes] - u4Byte rfHSSIPara2; // wire parameter control2 : + u4Byte rfHSSIPara2; // wire parameter control2 : // 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes] - + u4Byte rfLSSIReadBack; //LSSI RF readback data SI mode // 0x8a0~0x8af [16 bytes] @@ -167,14 +167,14 @@ typedef struct _BB_REGISTER_DEFINITION{ //---------------------------------------------------------------------- // Initial MAC/BB/RF config by reading Hard Code. -//---------------------------------------------------------------------- - +//---------------------------------------------------------------------- + RT_STATUS phy_ConfigBBWithHeaderFile( IN PADAPTER Adapter, IN u1Byte ConfigType ); - + RT_STATUS PHY_ConfigRFWithHeaderFile( IN PADAPTER Adapter, @@ -219,7 +219,7 @@ RT_STATUS PHY_MACConfig( IN PADAPTER Adapter ); - + RT_STATUS PHY_BBConfig( IN PADAPTER Adapter @@ -230,7 +230,7 @@ s4Byte phy_TxPwrIdxToDbm( IN PADAPTER Adapter, IN WIRELESS_MODE WirelessMode, - IN u1Byte TxPwrIdx + IN u1Byte TxPwrIdx ); @@ -247,8 +247,8 @@ PHY_MapChannelPlan( IN u2Byte HalChannelPlan ); -void -SINGLEMODULE_MAPFUN( +void +SINGLEMODULE_MAPFUN( IN PADAPTER Adapter, IN u2Byte Regchannelplane, IN u1Byte RegEnableAdaptivity, @@ -264,21 +264,21 @@ VOID PHY_IQCalibrate( IN PADAPTER Adapter, IN BOOLEAN bReCovery - ); + ); VOID PHY_SetTxPowerIndexShadow( IN PADAPTER Adapter, IN u4Byte PowerIndex, - IN u1Byte RFPath, + IN u1Byte RFPath, IN u1Byte Rate ); u1Byte PHY_GetTxPowerIndexShadow( IN PADAPTER Adapter, - IN u1Byte RFPath, + IN u1Byte RFPath, IN u1Byte Rate ); @@ -319,7 +319,7 @@ PHY_LCCalibrate_Dummy( typedef struct __RT_SINGLEMODULE_ENTRY { - u4Byte country_code; + u4Byte country_code; u2Byte Regchannelplane; u1Byte RegEnableAdaptivity; u2Byte RegHTMode; diff --git a/network/wlan/WDI/HAL/HalComReg.h b/network/wlan/WDI/HAL/HalComReg.h index 64577a977..8c0ec35f1 100644 --- a/network/wlan/WDI/HAL/HalComReg.h +++ b/network/wlan/WDI/HAL/HalComReg.h @@ -8,15 +8,15 @@ * 2. CCX register * 3. Backward compatible register with useless address. * 4. Define 92CU required register address and definition. - * + * * * Export: Constants, macro, functions(API), global variables(None). * - * Abbrev: + * Abbrev: * * History: - * Data Who Remark - * + * Data Who Remark + * *****************************************************************************/ #ifndef __INC_HALCOMREG_H #define __INC_HALCOMREG_H @@ -117,7 +117,7 @@ #define REG_HPON_FSM 0x00EC #define REG_SYS_CFG 0x00F0 #define REG_GPIO_OUTSTS 0x00F4 // For RTL8723 only. -#define REG_TYPE_ID 0x00FC +#define REG_TYPE_ID 0x00FC // // 2010/12/29 MH Add for 92D @@ -214,7 +214,7 @@ #define REG_RXDMA_AGG_PG_TH 0x0280 #define REG_FW_UPD_RDPTR 0x0284 // FW shall update this register before FW write RXPKT_RELEASE_POLL to 1 #define REG_RXDMA_CONTROL 0x0286 // Control the RX DMA. -#define REG_RXPKT_NUM_OLD 0x0287 // The number of packets in RXPKTBUF. +#define REG_RXPKT_NUM_OLD 0x0287 // The number of packets in RXPKTBUF. #define REG_RXDMA_STATUS 0x0288 @@ -224,7 +224,7 @@ // //----------------------------------------------------- #define REG_PCIE_CTRL_REG 0x0300 -#define REG_INT_MIG 0x0304 // Interrupt Migration +#define REG_INT_MIG 0x0304 // Interrupt Migration #define REG_BCNQ_DESA 0x0308 // TX Beacon Descriptor Address #define REG_HQ_DESA 0x0310 // TX High Queue Descriptor Address #define REG_MGQ_DESA 0x0318 // TX Manage Queue Descriptor Address @@ -373,7 +373,7 @@ #define REG_ATIMWND 0x055A #define REG_BCN_MAX_ERR 0x055D #define REG_RXTSF_OFFSET_CCK 0x055E -#define REG_RXTSF_OFFSET_OFDM 0x055F +#define REG_RXTSF_OFFSET_OFDM 0x055F #define REG_TSFTR 0x0560 #define REG_TSFTR1 0x0568 // HW Port 1 TSF Register #define REG_P2P_CTWIN 0x0572 // 1 Byte long (in unit of TU) @@ -479,7 +479,7 @@ #define REG_USB_HRPWM 0xFE58 #define REG_USB_HCPWM 0xFE57 -// for 92DU high_Queue low_Queue Normal_Queue select +// for 92DU high_Queue low_Queue Normal_Queue select #define REG_USB_High_NORMAL_Queue_Select_MAC0 0xFE44 //#define REG_USB_LOW_Queue_Select_MAC0 0xFE45 #define REG_USB_High_NORMAL_Queue_Select_MAC1 0xFE47 @@ -503,7 +503,7 @@ #define CTRL_INFO_PAGE 0x660 #define RPT_CRC 0x661 #define TX_SHORT_CUT_MACID_0_31 0x662 -#define TX_SHORT_CUT_MACID_32_63 0x663 +#define TX_SHORT_CUT_MACID_32_63 0x663 #define RPT_BUF_DESC_NUM_8814A 256 #define RPT_BUF_DESC_NUM_8821B 256 @@ -615,7 +615,7 @@ #define HSISR_GPIO9_INT BIT25 //---------------------------------------------------------------------------- -// 8192C (MSR) Media Status Register (Offset 0x4C, 8 bits) +// 8192C (MSR) Media Status Register (Offset 0x4C, 8 bits) //---------------------------------------------------------------------------- /* Network Type @@ -632,7 +632,7 @@ Default: 00b. #define MSR_TYPE_MASK 0x03 //---------------------------------------------------------------------------- -// 88EU (MSR) Media Status Register (Offset 0x4C, 8 bits) +// 88EU (MSR) Media Status Register (Offset 0x4C, 8 bits) //---------------------------------------------------------------------------- #define USB_INTR_CONTENT_HISR_OFFSET 48 #define USB_INTR_CONTENT_HISRE_OFFSET 52 @@ -644,16 +644,16 @@ Default: 00b. // 8192C Response Rate Set Register (offset 0x181, 24bits) //---------------------------------------------------------------------------- #define RRSR_1M BIT0 -#define RRSR_2M BIT1 -#define RRSR_5_5M BIT2 -#define RRSR_11M BIT3 -#define RRSR_6M BIT4 -#define RRSR_9M BIT5 -#define RRSR_12M BIT6 -#define RRSR_18M BIT7 -#define RRSR_24M BIT8 -#define RRSR_36M BIT9 -#define RRSR_48M BIT10 +#define RRSR_2M BIT1 +#define RRSR_5_5M BIT2 +#define RRSR_11M BIT3 +#define RRSR_6M BIT4 +#define RRSR_9M BIT5 +#define RRSR_12M BIT6 +#define RRSR_18M BIT7 +#define RRSR_24M BIT8 +#define RRSR_36M BIT9 +#define RRSR_48M BIT10 #define RRSR_54M BIT11 #define RRSR_MCS0 BIT12 #define RRSR_MCS1 BIT13 @@ -672,7 +672,7 @@ Default: 00b. #define RATR_2M 0x00000002 #define RATR_55M 0x00000004 #define RATR_11M 0x00000008 -//OFDM +//OFDM #define RATR_6M 0x00000010 #define RATR_9M 0x00000020 #define RATR_12M 0x00000040 @@ -681,7 +681,7 @@ Default: 00b. #define RATR_36M 0x00000200 #define RATR_48M 0x00000400 #define RATR_54M 0x00000800 -//MCS 1 Spatial Stream +//MCS 1 Spatial Stream #define RATR_MCS0 0x00001000 #define RATR_MCS1 0x00002000 #define RATR_MCS2 0x00004000 @@ -707,7 +707,7 @@ Default: 00b. #define RATE_2M BIT(1) #define RATE_5_5M BIT(2) #define RATE_11M BIT(3) -//OFDM +//OFDM #define RATE_6M BIT(4) #define RATE_9M BIT(5) #define RATE_12M BIT(6) @@ -718,11 +718,11 @@ Default: 00b. #define RATE_54M BIT(11) // ALL CCK Rate -#define RATE_ALL_CCK RATR_1M|RATR_2M|RATR_55M|RATR_11M +#define RATE_ALL_CCK RATR_1M|RATR_2M|RATR_55M|RATR_11M #define RATE_ALL_OFDM_AG RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M|\ - RATR_36M|RATR_48M|RATR_54M + RATR_36M|RATR_48M|RATR_54M #define RATE_ALL_OFDM_1SS RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3 |\ - RATR_MCS4|RATR_MCS5|RATR_MCS6 |RATR_MCS7 + RATR_MCS4|RATR_MCS5|RATR_MCS6 |RATR_MCS7 #define RATE_ALL_OFDM_2SS RATR_MCS8|RATR_MCS9 |RATR_MCS10|RATR_MCS11|\ RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15 @@ -735,19 +735,19 @@ Default: 00b. //---------------------------------------------------------------------------- // 8192C CAM Config Setting (offset 0x250, 1 byte) -//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- #define CAM_NONE 0x0 #define CAM_WEP40 0x01 #define CAM_TKIP 0x02 #define CAM_AES 0x04 #define CAM_WEP104 0x05 #define CAM_SMS4 0x6 - -#define TOTAL_CAM_ENTRY 32 - + +#define TOTAL_CAM_ENTRY 32 + #define CAM_CONFIG_USEDK TRUE #define CAM_CONFIG_NO_USEDK FALSE - + #define SCR_UseDK 0x01 #define SCR_TxSecEnable 0x02 @@ -757,7 +757,7 @@ Default: 00b. // 10. Power Save Control Registers (Offset: 0x0260 - 0x02DF) // #define WOW_PMEN BIT0 // Power management Enable. -#define WOW_WOMEN BIT1 // WoW function on or off. +#define WOW_WOMEN BIT1 // WoW function on or off. #define WOW_MAGIC BIT2 // Magic packet #define WOW_UWF BIT3 // Unicast Wakeup frame. @@ -787,7 +787,7 @@ Default: 00b. #define IMR_TIMEOUT2 BIT17 // Timeout interrupt 2 #define IMR_TIMEOUT1 BIT16 // Timeout interrupt 1 #define IMR_TXFOVW BIT15 // Transmit FIFO Overflow -#define IMR_PSTIMEOUT BIT14 // Power save time out interrupt +#define IMR_PSTIMEOUT BIT14 // Power save time out interrupt #define IMR_BcnInt BIT13 // Beacon DMA Interrupt 0 #define IMR_RXFOVW BIT12 // Receive FIFO Overflow #define IMR_RDU BIT11 // Receive Descriptor Unavailable @@ -924,33 +924,33 @@ Default: 00b. #define HAL_NIC_UNPLUG_PCI_ISR 0xEAEAEAEA // The value when the NIC is unplugged for PCI in PCI interrupt (page 3). //---------------------------------------------------------------------------- -// 8188 IMR/ISR bits +// 8188 IMR/ISR bits //---------------------------------------------------------------------------- #define IMR_DISABLED_88E 0x0 // IMR DW0(0x0060-0063) Bit 0-31 -#define IMR_TXCCK_88E BIT30 // TXRPT interrupt when CCX bit of the packet is set +#define IMR_TXCCK_88E BIT30 // TXRPT interrupt when CCX bit of the packet is set #define IMR_PSTIMEOUT_88E BIT29 // Power Save Time Out Interrupt -#define IMR_GTINT4_88E BIT28 // When GTIMER4 expires, this bit is set to 1 -#define IMR_GTINT3_88E BIT27 // When GTIMER3 expires, this bit is set to 1 -#define IMR_TBDER_88E BIT26 // Transmit Beacon0 Error -#define IMR_TBDOK_88E BIT25 // Transmit Beacon0 OK -#define IMR_TSF_BIT32_TOGGLE_88E BIT24 // TSF Timer BIT32 toggle indication interrupt -#define IMR_BCNDMAINT0_88E BIT20 // Beacon DMA Interrupt 0 -#define IMR_BCNDOK0_88E BIT16 // Beacon Queue DMA OK0 -#define IMR_HSISR_IND_ON_INT_88E BIT15 // HSISR Indicator (HSIMR & HSISR is true, this bit is set to 1) -#define IMR_BCNDMAINT_E_88E BIT14 // Beacon DMA Interrupt Extension for Win7 +#define IMR_GTINT4_88E BIT28 // When GTIMER4 expires, this bit is set to 1 +#define IMR_GTINT3_88E BIT27 // When GTIMER3 expires, this bit is set to 1 +#define IMR_TBDER_88E BIT26 // Transmit Beacon0 Error +#define IMR_TBDOK_88E BIT25 // Transmit Beacon0 OK +#define IMR_TSF_BIT32_TOGGLE_88E BIT24 // TSF Timer BIT32 toggle indication interrupt +#define IMR_BCNDMAINT0_88E BIT20 // Beacon DMA Interrupt 0 +#define IMR_BCNDOK0_88E BIT16 // Beacon Queue DMA OK0 +#define IMR_HSISR_IND_ON_INT_88E BIT15 // HSISR Indicator (HSIMR & HSISR is true, this bit is set to 1) +#define IMR_BCNDMAINT_E_88E BIT14 // Beacon DMA Interrupt Extension for Win7 #define IMR_ATIMEND_88E BIT12 // CTWidnow End or ATIM Window End #define IMR_HISR1_IND_INT_88E BIT11 // HISR1 Indicator (HISR1 & HIMR1 is true, this bit is set to 1) -#define IMR_C2HCMD_88E BIT10 // CPU to Host Command INT Status, Write 1 clear -#define IMR_CPWM2_88E BIT9 // CPU power Mode exchange INT Status, Write 1 clear -#define IMR_CPWM_88E BIT8 // CPU power Mode exchange INT Status, Write 1 clear -#define IMR_HIGHDOK_88E BIT7 // High Queue DMA OK -#define IMR_MGNTDOK_88E BIT6 // Management Queue DMA OK -#define IMR_BKDOK_88E BIT5 // AC_BK DMA OK -#define IMR_BEDOK_88E BIT4 // AC_BE DMA OK -#define IMR_VIDOK_88E BIT3 // AC_VI DMA OK -#define IMR_VODOK_88E BIT2 // AC_VO DMA OK -#define IMR_RDU_88E BIT1 // Rx Descriptor Unavailable +#define IMR_C2HCMD_88E BIT10 // CPU to Host Command INT Status, Write 1 clear +#define IMR_CPWM2_88E BIT9 // CPU power Mode exchange INT Status, Write 1 clear +#define IMR_CPWM_88E BIT8 // CPU power Mode exchange INT Status, Write 1 clear +#define IMR_HIGHDOK_88E BIT7 // High Queue DMA OK +#define IMR_MGNTDOK_88E BIT6 // Management Queue DMA OK +#define IMR_BKDOK_88E BIT5 // AC_BK DMA OK +#define IMR_BEDOK_88E BIT4 // AC_BE DMA OK +#define IMR_VIDOK_88E BIT3 // AC_VI DMA OK +#define IMR_VODOK_88E BIT2 // AC_VO DMA OK +#define IMR_RDU_88E BIT1 // Rx Descriptor Unavailable #define IMR_ROK_88E BIT0 // Receive DMA OK // IMR DW1(0x00B4-00B7) Bit 0-31 @@ -979,7 +979,7 @@ Default: 00b. /*=================================================================== ===================================================================== -Here the register defines are for 92C. When the define is as same with 92C, +Here the register defines are for 92C. When the define is as same with 92C, we will use the 92C's define for the consistency So the following defines for 92C is not entire!!!!!! ===================================================================== @@ -1018,7 +1018,7 @@ Current IOREG MAP // 8192C (RCR) Receive Configuration Register (Offset 0x608, 32 bits) //---------------------------------------------------------------------------- #define RCR_APPFCS BIT31 // WMAC append FCS after pauload -#define RCR_APP_MIC BIT30 // MACRX will retain the MIC at the bottom of the packet. +#define RCR_APP_MIC BIT30 // MACRX will retain the MIC at the bottom of the packet. #define RCR_APP_ICV BIT29 // MACRX will retain the ICV at the bottom of the packet. #define RCR_APP_PHYST_RXFF BIT28 // HY Status is appended before RX packet in RXFF #define RCR_APP_BA_SSN BIT27 // SSN of previous TXBA is appended as after original RXDESC as the 4-th DW of RXDESC. @@ -1040,19 +1040,19 @@ Current IOREG MAP #define RCR_ADF BIT11 // Accept data type frame. This bit also regulates BA, BAR, and PS-Poll (AP mode only). #define RCR_RSVD_BIT10 BIT10 // Reserved #define RCR_AICV BIT9 // Accept ICV error packet -#define RCR_ACRC32 BIT8 // Accept CRC32 error packet +#define RCR_ACRC32 BIT8 // Accept CRC32 error packet #define RCR_CBSSID_BCN BIT7 // Accept BSSID match packet (Rx beacon, probe rsp) #define RCR_CBSSID_DATA BIT6 // Accept BSSID match packet (Data) #define RCR_CBSSID RCR_CBSSID_DATA // Accept BSSID match packet #define RCR_APWRMGT BIT5 // Accept power management packet #define RCR_ADD3 BIT4 // Accept address 3 match packet -#define RCR_AB BIT3 // Accept broadcast packet -#define RCR_AM BIT2 // Accept multicast packet +#define RCR_AB BIT3 // Accept broadcast packet +#define RCR_AM BIT2 // Accept multicast packet #define RCR_APM BIT1 // Accept physical match packet -#define RCR_AAP BIT0 // Accept all unicast packet +#define RCR_AAP BIT0 // Accept all unicast packet //============================================================================ -// 8192C Regsiter Bit and Content definition +// 8192C Regsiter Bit and Content definition //============================================================================ //----------------------------------------------------- // @@ -1170,7 +1170,7 @@ Current IOREG MAP #define RFINI_RDY BIT(5) #define WINTINI_RDY BIT(6) #define RAM_DL_SEL BIT(7) -#define CPU_DL_READY BIT(15) //add flag by gw for fw download ready 20130826 +#define CPU_DL_READY BIT(15) //add flag by gw for fw download ready 20130826 #define ROM_DLEN BIT(19) #define CPRST BIT(23) @@ -1205,7 +1205,7 @@ Current IOREG MAP //2REG_GPIO_OUTSTS (For RTL8723 only) #define EFS_HCI_SEL (BIT(0)|BIT(1)) #define PAD_HCI_SEL (BIT(2)|BIT(3)) -#define HCI_SEL (BIT(4)|BIT(5)) +#define HCI_SEL (BIT(4)|BIT(5)) #define PKG_SEL_HCI BIT(6) #define FEN_GPS BIT(7) #define FEN_BT BIT(8) @@ -1293,7 +1293,7 @@ Current IOREG MAP // For normal driver, 0x10C #define _TXDMA_HIQ_MAP(x) (((x)&0x3) << 14) #define _TXDMA_MGQ_MAP(x) (((x)&0x3) << 12) -#define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10) +#define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10) #define _TXDMA_BEQ_MAP(x) (((x)&0x3) << 8 ) #define _TXDMA_VIQ_MAP(x) (((x)&0x3) << 6 ) #define _TXDMA_VOQ_MAP(x) (((x)&0x3) << 4 ) @@ -1322,13 +1322,13 @@ Current IOREG MAP #define _LLT_OP_VALUE(x) (((x) >> 30) & 0x3) #define _LLT_INIT_DATA_8814A(x) (((x) & 0xFFF)<<16) -#define _LLT_INIT_ADDR_8814A(x) ((x) & 0xFFF) +#define _LLT_INIT_ADDR_8814A(x) ((x) & 0xFFF) #define _LLT_INIT_DATA_8821B(x) (((x) & 0xFFF)<<16) -#define _LLT_INIT_ADDR_8821B(x) ((x) & 0xFFF) +#define _LLT_INIT_ADDR_8821B(x) ((x) & 0xFFF) #define _LLT_INIT_DATA_8822B(x) (((x) & 0xFFF)<<16) -#define _LLT_INIT_ADDR_8822B(x) ((x) & 0xFFF) +#define _LLT_INIT_ADDR_8822B(x) ((x) & 0xFFF) //----------------------------------------------------- @@ -1366,10 +1366,10 @@ Current IOREG MAP // Write only. When this bit is set, RXDMA will decrease RX PKT counter by one. Before // this bit is polled, FW shall update RXFF_RD_PTR first. This register is write pulse and auto clear. #define RXPKT_RELEASE_POLL BIT(0) -// Read only. When RXMA finishes on-going DMA operation, RXMDA will report idle state in +// Read only. When RXMA finishes on-going DMA operation, RXMDA will report idle state in // this bit. FW can start releasing packets after RXDMA entering idle mode. -#define RXDMA_IDLE BIT(1) -// When this bit is set, RXDMA will enter this mode after on-going RXDMA packet to host +#define RXDMA_IDLE BIT(1) +// When this bit is set, RXDMA will enter this mode after on-going RXDMA packet to host // completed, and stop DMA packet to host. RXDMA will then report Default: 0; #define RW_RELEASE_EN BIT(2) @@ -1682,7 +1682,7 @@ Current IOREG MAP #define LAST_ENTRY_OF_TX_PKT_BUFFER_8814A 2048-1 //20130415 KaiYuan add for 8814 #define LAST_ENTRY_OF_TX_PKT_BUFFER_8723B 255 #define LAST_ENTRY_OF_TX_PKT_BUFFER_8703B 255 -#define LAST_ENTRY_OF_TX_PKT_BUFFER_8188F 255 +#define LAST_ENTRY_OF_TX_PKT_BUFFER_8188F 255 #define LAST_ENTRY_OF_TX_PKT_BUFFER_8192C 255 #define LAST_ENTRY_OF_TX_PKT_BUFFER_DUAL_MAC 127 diff --git a/network/wlan/WDI/HAL/HalComTxPwrCfg.h b/network/wlan/WDI/HAL/HalComTxPwrCfg.h index 4497cce3b..085ec276d 100644 --- a/network/wlan/WDI/HAL/HalComTxPwrCfg.h +++ b/network/wlan/WDI/HAL/HalComTxPwrCfg.h @@ -32,30 +32,30 @@ PHY_GetRateIndexOfTxPowerByRate( IN u1Byte Rate ); -VOID +VOID PHY_SetTxPowerIndexByRateSection( IN PADAPTER pAdapter, - IN u1Byte RFPath, + IN u1Byte RFPath, IN u1Byte Channel, IN u1Byte RateSection ); s1Byte -PHY_GetTxPowerByRate( - IN PADAPTER pAdapter, - IN u1Byte Band, - IN u1Byte RFPath, - IN u1Byte TxNum, +PHY_GetTxPowerByRate( + IN PADAPTER pAdapter, + IN u1Byte Band, + IN u1Byte RFPath, + IN u1Byte TxNum, IN u1Byte RateIndex ); VOID -PHY_SetTxPowerByRate( - IN PADAPTER pAdapter, - IN u1Byte Band, - IN u1Byte RFPath, - IN u1Byte TxNum, +PHY_SetTxPowerByRate( + IN PADAPTER pAdapter, + IN u1Byte Band, + IN u1Byte RFPath, + IN u1Byte TxNum, IN u1Byte Rate, IN s1Byte Value ); @@ -67,11 +67,11 @@ PHY_SetTxPowerLevelByPath( IN u1Byte path ); -VOID +VOID PHY_SetTxPowerIndexByRateArray( IN PADAPTER pAdapter, IN u1Byte RFPath, - IN CHANNEL_WIDTH BandWidth, + IN CHANNEL_WIDTH BandWidth, IN u1Byte Channel, IN pu1Byte Rates, IN u1Byte RateArraySize @@ -103,14 +103,14 @@ u1Byte PHY_GetTxPowerIndexBase( IN PADAPTER pAdapter, IN u1Byte RFPath, - IN u1Byte Rate, - IN CHANNEL_WIDTH BandWidth, + IN u1Byte Rate, + IN CHANNEL_WIDTH BandWidth, IN u1Byte Channel, OUT PBOOLEAN bIn24G ); s1Byte -PHY_GetTxPowerTrackingOffset( +PHY_GetTxPowerTrackingOffset( PADAPTER pAdapter, u1Byte RFPath, u1Byte Rate diff --git a/network/wlan/WDI/HAL/HalComTxPwrLmtCfg.h b/network/wlan/WDI/HAL/HalComTxPwrLmtCfg.h index fabb60d7e..bd9f083f0 100644 --- a/network/wlan/WDI/HAL/HalComTxPwrLmtCfg.h +++ b/network/wlan/WDI/HAL/HalComTxPwrLmtCfg.h @@ -22,7 +22,7 @@ PHY_SetTxPowerLimit( IN pu1Byte PowerLimit ); -VOID +VOID PHY_ConvertTxPowerLimitToPowerIndex( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/HAL/HalDM.h b/network/wlan/WDI/HAL/HalDM.h index d08559547..ea15b55c2 100644 --- a/network/wlan/WDI/HAL/HalDM.h +++ b/network/wlan/WDI/HAL/HalDM.h @@ -4,17 +4,17 @@ * Module: HALDM.h * * - * Note: The header file records - * + * Note: The header file records * - * Export: * - * Abbrev: + * Export: * - * History: - * Data Who Remark + * Abbrev: + * + * History: + * Data Who Remark * 09/22/2011 MHC Create initial version. - * + * ******************************************************************************/ #ifndef __HALDM_H__ #define __HALDM_H__ @@ -39,16 +39,16 @@ //============================================================ // function prototype //============================================================ -void InitHalDm( - IN PADAPTER Adapter +void InitHalDm( + IN PADAPTER Adapter ); void DeInitHalDm( IN PADAPTER Adapter ); -void HalDmWatchDog( - IN PADAPTER Adapter +void HalDmWatchDog( + IN PADAPTER Adapter ); @@ -57,12 +57,12 @@ dm_initial_gain_MinPWDB( IN PADAPTER pAdapter ); -void +void dm_CCK_PacketDetectionThresh( IN PADAPTER pAdapter ); -VOID +VOID dm_CCK_PacketDetectionThresh_DMSP( IN PADAPTER pAdapter ); @@ -114,8 +114,8 @@ DM_OverwriteCckCcaThres( IN u1Byte ccaThres ); -VOID -DM_HwPbcGPIOChk( +VOID +DM_HwPbcGPIOChk( IN PADAPTER pAdapter ); diff --git a/network/wlan/WDI/HAL/HalEEPROM.h b/network/wlan/WDI/HAL/HalEEPROM.h index 913ac9884..3f703d15a 100644 --- a/network/wlan/WDI/HAL/HalEEPROM.h +++ b/network/wlan/WDI/HAL/HalEEPROM.h @@ -2,7 +2,7 @@ #define __INC_EEPROM_H #define EEPROM_MAX_SIZE 256 -#define CLOCK_RATE 50 //100us +#define CLOCK_RATE 50 //100us //- EEPROM opcodes #define EEPROM_READ_OPCODE 06 @@ -30,7 +30,7 @@ GetEEpromSize( PADAPTER Adapter ); -u2Byte +u2Byte ReadEEprom( PADAPTER Adapter, u2Byte Reg @@ -38,31 +38,31 @@ ReadEEprom( -VOID +VOID ShiftOutBits( PADAPTER Adapter, u2Byte data, u2Byte count ); -u2Byte +u2Byte ShiftInBits( PADAPTER Adapter ); -VOID +VOID RaiseClock( PADAPTER Adapter, u2Byte *x ); -VOID +VOID LowerClock( PADAPTER Adapter, u2Byte *x ); -VOID +VOID EEpromCleanup( PADAPTER Adapter ); @@ -89,7 +89,7 @@ StandBy( PADAPTER Adapter ); -extern BOOLEAN +extern BOOLEAN EEPROM_ProgramMap( IN PADAPTER Adapter, IN ps1Byte pFileName); diff --git a/network/wlan/WDI/HAL/HalEfuse.h b/network/wlan/WDI/HAL/HalEfuse.h index 9bfe9d942..54c612860 100644 --- a/network/wlan/WDI/HAL/HalEfuse.h +++ b/network/wlan/WDI/HAL/HalEfuse.h @@ -1,9 +1,9 @@ /****************************************************************************** - * + * * (c) Copyright 2008, RealTEK Technologies Inc. All Rights Reserved. - * + * * 03/04/2011 Cosa Modify - * + * ******************************************************************************/ #ifndef __INC_HAL_EFUSE_H__ #define __INC_HAL_EFUSE_H__ @@ -17,17 +17,17 @@ #define EFUSE_SUPPORT_92S 1 #define EFUSE_SUPPORT_92C 1 #define EFUSE_SUPPORT_92D 1 -#define EFUSE_SUPPORT_8188E 1 -#define EFUSE_SUPPORT_8188F 1 +#define EFUSE_SUPPORT_8188E 1 +#define EFUSE_SUPPORT_8188F 1 #define EFUSE_SUPPORT_8812A 1 -#define EFUSE_SUPPORT_8811A 1 -#define EFUSE_SUPPORT_8821A 1 -#define EFUSE_SUPPORT_8192E 1 -#define EFUSE_SUPPORT_8814A 1 +#define EFUSE_SUPPORT_8811A 1 +#define EFUSE_SUPPORT_8821A 1 +#define EFUSE_SUPPORT_8192E 1 +#define EFUSE_SUPPORT_8814A 1 #define EFUSE_SUPPORT_8723B 1 #define EFUSE_SUPPORT_8703B 1 -#define EFUSE_SUPPORT_8822B 1 -#define EFUSE_SUPPORT_8723D 1 +#define EFUSE_SUPPORT_8822B 1 +#define EFUSE_SUPPORT_8723D 1 #else #define EFUSE_SUPPORT_92S 0 @@ -127,7 +127,7 @@ typedef enum _PACKAGE_TYPE_E // To prevent out of boundary programming case, leave 1byte and program full section // 9bytes + 1byt + 5bytes and pre 1byte. // For worst case: -// | 1byte|----8bytes----|1byte|--5bytes--| +// | 1byte|----8bytes----|1byte|--5bytes--| // | | Reserved(14bytes) | // #define EFUSE_OOB_PROTECT_BYTES 15 // PG data exclude header, dummy 6 bytes frome CP test and reserved 1byte. @@ -160,11 +160,11 @@ typedef enum _PACKAGE_TYPE_E /*--------------------------Define Parameters-------------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ typedef struct PG_PKT_STRUCT_A{ UINT8 offset; UINT8 word_en; - UINT8 data[8]; + UINT8 data[8]; u1Byte word_cnts; }PGPKT_STRUCT,*PPGPKT_STRUCT; @@ -192,28 +192,28 @@ typedef struct _EFUSE_HAL{ // EFUSE Configuration, initialized in HAL_CmnInitPGData(). const u2Byte MaxSecNum_WiFi; - const u2Byte MaxSecNum_BT; - const u2Byte WordUnit; + const u2Byte MaxSecNum_BT; + const u2Byte WordUnit; const u2Byte PhysicalLen_WiFi; - const u2Byte PhysicalLen_BT; + const u2Byte PhysicalLen_BT; const u2Byte LogicalLen_WiFi; - const u2Byte LogicalLen_BT; + const u2Byte LogicalLen_BT; const u2Byte BankSize; const u2Byte TotalBankNum; const u2Byte BankNum_WiFi; - const u2Byte BankNum_BT; + const u2Byte BankNum_BT; const u2Byte OOBProtectBytes; const u2Byte ProtectBytes; - const u2Byte BankAvailBytes; + const u2Byte BankAvailBytes; const u2Byte TotalAvailBytes_WiFi; - const u2Byte TotalAvailBytes_BT; + const u2Byte TotalAvailBytes_BT; - const u2Byte HeaderRetry; - const u2Byte DataRetry; + const u2Byte HeaderRetry; + const u2Byte DataRetry; RT_ERROR_CODE Status; }EFUSE_HAL, *PEFUSE_HAL; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ @@ -256,18 +256,18 @@ EFUSE_ShadowUpdateChk( IN PADAPTER pAdapter, IN u1Byte efuseType, IN BOOLEAN bPseudoTest); -VOID +VOID EFUSE_RenewShadowMaps( IN PADAPTER pAdapter, IN u1Byte efuseType, IN BOOLEAN bPseudoTest); -extern VOID +extern VOID EFUSE_ForceWriteVendorId( IN PADAPTER pAdapter); -BOOLEAN +BOOLEAN EFUSE_ProgramMap( IN PADAPTER Adapter, IN ps1Byte pFileName, @@ -304,9 +304,9 @@ Hal_ReadEFuse_Pseudo( u1Byte *pbuf, IN BOOLEAN bPseudoTest ); -VOID +VOID EFUSE_LoadMap( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN u1Byte efuseType, IN OUT u1Byte *Efuse, IN BOOLEAN bPseudoTest); @@ -316,7 +316,7 @@ EFUSE_PowerSwitch( IN PADAPTER pAdapter, IN UINT8 bWrite, IN UINT8 PwrState); -INT32 +INT32 EFUSE_PgPacketWrite( IN PADAPTER pAdapter, IN UINT8 efuseType, @@ -369,14 +369,14 @@ EFUSE_WordEnableDataRead( IN UINT8 word_en, IN UINT8 *targetdata); INT32 EFUSE_OneByteRead( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN u2Byte addr, IN UINT8 *data, IN BOOLEAN bPseudoTest); INT32 EFUSE_OneByteWrite( - IN PADAPTER pAdapter, - IN u2Byte addr, + IN PADAPTER pAdapter, + IN u2Byte addr, IN UINT8 data, IN BOOLEAN bPseudoTest); @@ -388,7 +388,7 @@ EFUSE_PgPacketRead( IN PADAPTER pAdapter, UINT8 EFUSE_WordEnableDataWrite( IN PADAPTER pAdapter, IN u2Byte efuse_addr, - IN UINT8 word_en, + IN UINT8 word_en, IN UINT8 *data, IN BOOLEAN bPseudoTest); @@ -398,7 +398,7 @@ EFUSE_ContentWrite1Byte( IN UINT8 bank, IN u2Byte Offset, IN UINT8 Value ); - + VOID efuse_ShadowRead1Byte_BT( IN PADAPTER pAdapter, diff --git a/network/wlan/WDI/HAL/HalH2cIOCmd.h b/network/wlan/WDI/HAL/HalH2cIOCmd.h index c2b51a6d5..89d37d66d 100644 --- a/network/wlan/WDI/HAL/HalH2cIOCmd.h +++ b/network/wlan/WDI/HAL/HalH2cIOCmd.h @@ -2,7 +2,7 @@ #define __INC_HAL_H2CIOCMD_H //-------------------------------------------- -//3 Host Message Box +//3 Host Message Box //-------------------------------------------- //_RSVDPAGE_LOC_CMD0 @@ -132,7 +132,7 @@ #define GET_H2CCMD_INACTIVE_PS_PARM_FUNC_ENABLE(__pH2CCmd) LE_BITS_TO_1BYTE((__pH2CCmd), 0, 1) // Disconnect_Decision_Control -// +// // 1. The value "CHECK_PERIOD" should be larger than 5 which Fw checks beacon lost period. // 2. "TRY_OK_BCN_LOST_CNT" should be smaller than "CHECK_PERIOD". #define SET_H2CCMD_DISCONNECT_DECISION_CTRL_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 0, 1, __Value) @@ -150,14 +150,14 @@ #define SET_H2CCMD_KEEP_ALIVE_ACCPEPT_USER_DEFINED(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 1, 1, __Value) #define SET_H2CCMD_KEEP_ALIVE_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value) -typedef enum _H2C_CMD +typedef enum _H2C_CMD { H2C_RSVDPAGE = 0, H2C_MSRRPT = 1, H2C_SCAN = 2, // No used in 8723B, 8192E, 8812/8821 H2C_KEEP_ALIVE_CTRL = 3, H2C_DISCONNECT_DECISION = 4, - + H2C_INIT_OFFLOAD = 6, // No used in 8723B, 8192E, 8812/8821 H2C_AP_OFFLOAD = 8, // H2C_BCN_RSVDPAGE = 9, // @@ -167,16 +167,16 @@ typedef enum _H2C_CMD H2C_FCS_INFO = 0x11, H2C_NAN = 0x1B, - - H2C_SETPWRMODE = 0x20, + + H2C_SETPWRMODE = 0x20, H2C_PS_TUNING_PARA = 0x21, // No used in 8723B, 8192E, 8812/8821 H2C_PS_TUNING_PARA2 = 0x22, // H2C_PS_LPS_PARA = 0x23, // H2C_P2P_PS_OFFLOAD = 0x24, // - H2C_INACTIVE_PS = 0x27, - + H2C_INACTIVE_PS = 0x27, + H2C_RA_MASK = 0x40, H2C_TxBF = 0x41, // ADDed from 8192E and 8812 H2C_RSSI_REPORT = 0x42, @@ -186,7 +186,7 @@ typedef enum _H2C_CMD H2C_RA_PARA_ADJUST = 0x47, H2C_FW_TRACE_EN = 0x49, - + H2C_BT_FW_PATCH = 0x6a, H2C_WIFI_CALIBRATION = 0x6d, // 8723B used only @@ -202,7 +202,7 @@ typedef enum _H2C_CMD H2C_AOAC_RSVDPAGE3 = 0x88, //Not defined in new 88E H2C CMD Format - H2C_SELECTIVE_SUSPEND_ROF_CMD, + H2C_SELECTIVE_SUSPEND_ROF_CMD, H2C_P2P_PS_MODE, // This be replaced with H2C_P2P_PS_OFFLOAD(0x24) H2C_PSD_RESULT, MAX_H2CCMD @@ -359,7 +359,7 @@ SetFwFcsInfoCmd( ); VOID -HalSetFwKeepAliveCmd( +HalSetFwKeepAliveCmd( IN PADAPTER pAdapter, IN BOOLEAN bFuncEn ); diff --git a/network/wlan/WDI/HAL/HalIcGlue.h b/network/wlan/WDI/HAL/HalIcGlue.h index c1c0ccebc..a2f7bea05 100644 --- a/network/wlan/WDI/HAL/HalIcGlue.h +++ b/network/wlan/WDI/HAL/HalIcGlue.h @@ -292,7 +292,7 @@ #define SET_TX_DESC_USB_TXAGG_NUM_8188F(__pTxDesc, __Value) -void PHY_IQCalibrate_8188F( +void PHY_IQCalibrate_8188F( #if (DM_ODM_SUPPORT_TYPE & ODM_AP) IN PDM_ODM_T pDM_Odm, #else @@ -419,11 +419,11 @@ void PHY_IQCalibrate_8188F( #define REG_RXQ_TXBD_IDX_8192E 0x03B4 #define rA_RSSIDump_92E 0xcb0 #define rB_RSSIDump_92E 0xcb1 -#define rS1_RXevmDump_92E 0xcb2 +#define rS1_RXevmDump_92E 0xcb2 #define rS2_RXevmDump_92E 0xcb3 #define rA_RXsnrDump_92E 0xcb4 #define rB_RXsnrDump_92E 0xcb5 -#define rA_CfoShortDump_92E 0xcb6 +#define rA_CfoShortDump_92E 0xcb6 #define rB_CfoShortDump_92E 0xcb8 #define rA_CfoLongDump_92E 0xcba #define rB_CfoLongDump_92E 0xcbc @@ -864,7 +864,7 @@ HalSetFWWoWlanMode8723B( ); VOID -HalSetFwKeepAliveCmd8723B( +HalSetFwKeepAliveCmd8723B( IN PADAPTER pAdapter, IN BOOLEAN bFuncEn ); @@ -904,7 +904,7 @@ SetFwWiFiCalibrationCmd_8723B( ); VOID -FillH2CCmd8723B( +FillH2CCmd8723B( IN PADAPTER Adapter, IN u1Byte ElementID, IN u4Byte CmdLen, @@ -939,13 +939,13 @@ HalDownloadRSVDPage8723BE( ); u1Byte -hal_DBIRead_8723BE( +hal_DBIRead_8723BE( IN PADAPTER Adapter, IN u2Byte Addr ); VOID -hal_DBIWrite_8723BE( +hal_DBIWrite_8723BE( IN PADAPTER Adapter, IN u2Byte Addr, IN u1Byte Data @@ -1057,7 +1057,7 @@ PHY_GetTxPowerIndex_8723B( IN PADAPTER Adapter, IN u1Byte RFPath, IN u1Byte Rate, - IN CHANNEL_WIDTH BandWidth, + IN CHANNEL_WIDTH BandWidth, IN u1Byte Channel ); @@ -1065,11 +1065,11 @@ VOID PHY_SetTxPowerIndex_8723B( IN PADAPTER Adapter, IN u4Byte PowerIndex, - IN u1Byte RFPath, + IN u1Byte RFPath, IN u1Byte Rate ); -u4Byte +u4Byte PHY_GetTxBBSwing_8723B( IN PADAPTER Adapter, IN BAND_TYPE Band, @@ -1094,13 +1094,13 @@ TxDescriptorChecksum_8723B( VOID SwLedOn_8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PLED_SDIO pLed ); VOID SwLedOff_8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PLED_SDIO pLed ); diff --git a/network/wlan/WDI/HAL/HalJaguarPhyReg.h b/network/wlan/WDI/HAL/HalJaguarPhyReg.h index ac41eff9e..37e89d1a4 100644 --- a/network/wlan/WDI/HAL/HalJaguarPhyReg.h +++ b/network/wlan/WDI/HAL/HalJaguarPhyReg.h @@ -22,7 +22,7 @@ // BW and sideband setting #define rBWIndication_Jaguar 0x834 #define rL1PeakTH_Jaguar 0x848 -#define rRFMOD_Jaguar 0x8ac //RF mode +#define rRFMOD_Jaguar 0x8ac //RF mode #define rADC_Buf_160_Clk_Jaguar 0x8c4 #define rADC_Buf_40_Clk_Jaguar2 0x8c8 @@ -40,7 +40,7 @@ #define rTxPath_Jaguar 0x80c // Tx antenna #define bTxPath_Jaguar 0x0fffffff #define rCCK_RX_Jaguar 0xa04 // for cck rx path selection -#define bCCK_RX_Jaguar 0x0c000000 +#define bCCK_RX_Jaguar 0x0c000000 #define rVhtlen_Use_Lsig_Jaguar 0x8c3 // Use LSIG for VHT length #define rRxPath_Jaguar2 0xa04 // Rx antenna @@ -83,7 +83,7 @@ #define rNBI_Setting_Jaguar 0x87c -// YN: mask the following register definition temporarily +// YN: mask the following register definition temporarily //#define rFPGA0_XA_RFInterfaceOE 0x860 // RF Channel switch #define rFPGA0_XB_RFInterfaceOE 0x864 @@ -115,7 +115,7 @@ // YN: mask the following register definition temporarily -//#define rPdp_AntA 0xb00 +//#define rPdp_AntA 0xb00 //#define rPdp_AntA_4 0xb04 //#define rConfig_Pmpd_AntA 0xb28 //#define rConfig_AntA 0xb68 @@ -158,7 +158,7 @@ #define rB_TxPwrTraing_Jaguar 0xe54 // Report-related -#define rOFDM_ShortCFOAB_Jaguar 0xf60 +#define rOFDM_ShortCFOAB_Jaguar 0xf60 #define rOFDM_LongCFOAB_Jaguar 0xf64 #define rOFDM_EndCFOAB_Jaguar 0xf70 #define rOFDM_AGCReport_Jaguar 0xf84 @@ -173,7 +173,7 @@ #define bAGC_table_Jaguar 0x3 #define b_sel5g_Jaguar 0x1000 // sel5g #define b_LNA_sw_Jaguar 0x8000 // HW/WS control for LNA -#define rFc_area_Jaguar 0x860 // fc_area +#define rFc_area_Jaguar 0x860 // fc_area #define bFc_area_Jaguar 0x1ffe000 #define rSingleTone_ContTx_Jaguar 0x914 @@ -184,13 +184,13 @@ // RFE #define rA_RFE_Pinmux_Jaguar 0xcb0 // Path_A RFE cotrol pinmux #define rB_RFE_Pinmux_Jaguar 0xeb0 // Path_B RFE control pinmux -#define rA_RFE_Inv_Jaguar 0xcb4 // Path_A RFE cotrol +#define rA_RFE_Inv_Jaguar 0xcb4 // Path_A RFE cotrol #define rB_RFE_Inv_Jaguar 0xeb4 // Path_B RFE control -#define rA_RFE_Jaguar 0xcb8 // Path_A RFE cotrol +#define rA_RFE_Jaguar 0xcb8 // Path_A RFE cotrol #define rB_RFE_Jaguar 0xeb8 // Path_B RFE control #define r_ANTSEL_SW_Jaguar 0x900 // ANTSEL SW Control #define bMask_RFEInv_Jaguar 0x3ff00000 -#define bMask_AntselPathFollow_Jaguar 0x00030000 +#define bMask_AntselPathFollow_Jaguar 0x00030000 #define rC_RFE_Pinmux_Jaguar 0x18B4 // Path_C RFE cotrol pinmux #define rD_RFE_Pinmux_Jaguar 0x1AB4 // Path_D RFE cotrol pinmux @@ -198,7 +198,7 @@ -// TX AGC +// TX AGC #define rTxAGC_A_CCK11_CCK1_JAguar 0xc20 #define rTxAGC_A_Ofdm18_Ofdm6_JAguar 0xc24 #define rTxAGC_A_Ofdm54_Ofdm24_JAguar 0xc28 @@ -229,7 +229,7 @@ #define bTxAGC_byte3_Jaguar 0xff000000 -// TX AGC +// TX AGC #define rTxAGC_A_CCK11_CCK1_Jaguar2 0xc20 #define rTxAGC_A_Ofdm18_Ofdm6_Jaguar2 0xc24 #define rTxAGC_A_Ofdm54_Ofdm24_Jaguar2 0xc28 @@ -360,24 +360,24 @@ // RSSI Dump #define rA_RSSIDump_Jaguar 0xBF0 #define rB_RSSIDump_Jaguar 0xBF1 -#define rS1_RXevmDump_Jaguar 0xBF4 +#define rS1_RXevmDump_Jaguar 0xBF4 #define rS2_RXevmDump_Jaguar 0xBF5 #define rA_RXsnrDump_Jaguar 0xBF6 #define rB_RXsnrDump_Jaguar 0xBF7 -#define rA_CfoShortDump_Jaguar 0xBF8 +#define rA_CfoShortDump_Jaguar 0xBF8 #define rB_CfoShortDump_Jaguar 0xBFA #define rA_CfoLongDump_Jaguar 0xBEC #define rB_CfoLongDump_Jaguar 0xBEE - + // RF Register // -#define RF_AC_Jaguar 0x00 // -#define RF_RF_Top_Jaguar 0x07 // -#define RF_TXLOK_Jaguar 0x08 // +#define RF_AC_Jaguar 0x00 // +#define RF_RF_Top_Jaguar 0x07 // +#define RF_TXLOK_Jaguar 0x08 // #define RF_TXAPK_Jaguar 0x0B #define RF_CHNLBW_Jaguar 0x18 // RF channel and BW switch -#define RF_RCK1_Jaguar 0x1c // +#define RF_RCK1_Jaguar 0x1c // #define RF_RCK2_Jaguar 0x1d #define RF_RCK3_Jaguar 0x1e #define RF_ModeTableAddr 0x30 diff --git a/network/wlan/WDI/HAL/HalMacID.h b/network/wlan/WDI/HAL/HalMacID.h index db9f04c8e..93ac696e0 100644 --- a/network/wlan/WDI/HAL/HalMacID.h +++ b/network/wlan/WDI/HAL/HalMacID.h @@ -29,8 +29,8 @@ typedef enum _MAC_ID_OWNER_TYPE { // No Single Peer MAC_ID_OWNER_BROADCAST_MULTICAST, - // Default Port - MAC_ID_OWNER_DEFAULT_PORT, + // Default Port + MAC_ID_OWNER_DEFAULT_PORT, // BT High Speed Client MAC_ID_OWNER_BT, @@ -46,11 +46,11 @@ typedef enum _MAC_ID_OWNER_TYPE { // N62 Virtual Station / N62 P2P Client for broadcast & multicast MAC_ID_OWNER_INFRA_STA_MULTICAST, - + // N62 Virtual AP / N63 P2P GO MAC_ID_OWNER_INFRA_AP, - MAC_ID_OWNER_MAX + MAC_ID_OWNER_MAX } MAC_ID_OWNER_TYPE, *PMAC_ID_OWNER_TYPE; @@ -69,9 +69,9 @@ typedef struct _HAL_MAC_ID_COMMON_CONTEXT{ // Define the dynamically assigned MacID section u1Byte MacIdDynamicZoneStart; - + MAC_ID_DESCRIPTOR MacIdDescriptor[NUMBER_OF_HAL_MAC_ID_DESCRIPTOR]; - + } HAL_MAC_ID_COMMON_CONTEXT, *PHAL_MAC_ID_COMMON_CONTEXT; #define HAL_MAC_ID_SIZE_OF_COMMON_CONTEXT sizeof(HAL_MAC_ID_COMMON_CONTEXT) diff --git a/network/wlan/WDI/HAL/HalPG.h b/network/wlan/WDI/HAL/HalPG.h index 3acda33d8..763ac4b73 100644 --- a/network/wlan/WDI/HAL/HalPG.h +++ b/network/wlan/WDI/HAL/HalPG.h @@ -6,9 +6,9 @@ //==================================================== #define EEPROM_VID_92C 0x0A #define EEPROM_PID_92C 0x0C -#define EEPROM_DID_92C 0x0C +#define EEPROM_DID_92C 0x0C #define EEPROM_SVID_92C 0x0E -#define EEPROM_SMID_92C 0x10 +#define EEPROM_SMID_92C 0x10 #define EEPROM_MAC_ADDR_92C 0x16 #define EEPROM_SUBCUSTOMER_ID 0x59 @@ -53,8 +53,8 @@ #define EEPROM_HT40_1S_TX_PWR_INX_8723A 0x16 #define EEPROM_HT20_TX_PWR_INX_DIFF_8723A 0x1C #define EEPROM_OFDM_TX_PWR_INX_DIFF_8723A 0x1F -#define EEPROM_HT40_MAX_PWR_OFFSET_8723A 0x22 -#define EEPROM_HT20_MAX_PWR_OFFSET_8723A 0x25 +#define EEPROM_HT40_MAX_PWR_OFFSET_8723A 0x22 +#define EEPROM_HT20_MAX_PWR_OFFSET_8723A 0x25 #define EEPROM_ChannelPlan_8723A 0x28 #define EEPROM_TSSI_A_8723A 0x29 @@ -141,7 +141,7 @@ #define EEPROM_HT20_MAX_PWR_OFFSET_5GH_92D 0xB8 -#define EEPROM_CHANNEL_PLAN_92D 0xBB // Map of supported channels. +#define EEPROM_CHANNEL_PLAN_92D 0xBB // Map of supported channels. #define EEPROM_TEST_CHANNEL_PLAN_92D 0xBB #define EEPROM_THERMAL_METER_92D 0xC3 //[4:0] #define EEPROM_IQK_DELTA_92D 0xBC @@ -648,7 +648,7 @@ #define EEPROM_Default_HT20_Diff 2 #define EEPROM_Default_LegacyHTTxPowerDiff 0x3 #define EEPROM_Default_LegacyHTTxPowerDiff_92C 0x3 -#define EEPROM_Default_LegacyHTTxPowerDiff_92D 0x4 +#define EEPROM_Default_LegacyHTTxPowerDiff_92D 0x4 #define EEPROM_Default_HT40_PwrMaxOffset 0 #define EEPROM_Default_HT20_PwrMaxOffset 0 @@ -691,10 +691,10 @@ // // For VHT series TX power by rate table. -// VHT TX power by rate off setArray = +// VHT TX power by rate off setArray = // Band:-2G&5G = 0 / 1 // RF: at most 4*4 = ABCD=0/1/2/3 -// CCK=0 OFDM=1/2 HT-MCS 0-15=3/4/56 VHT=7/8/9/10/11 +// CCK=0 OFDM=1/2 HT-MCS 0-15=3/4/56 VHT=7/8/9/10/11 // #define TX_PWR_BY_RATE_NUM_BAND 2 #define TX_PWR_BY_RATE_NUM_RF 4 @@ -725,7 +725,7 @@ typedef struct _TxPowerInfo{ //For 88E new structure /* -2.4G: +2.4G: { {1,2}, {3,4,5}, @@ -753,8 +753,8 @@ typedef struct _TxPowerInfo{ } */ #define MAX_RF_PATH 4 -#define MAX_CHNL_GROUP_24G 6 -#define MAX_CHNL_GROUP_5G 14 +#define MAX_CHNL_GROUP_24G 6 +#define MAX_CHNL_GROUP_5G 14 //It must always set to 4, otherwise read efuse table secquence will be wrong. #define MAX_TX_COUNT 4 @@ -763,7 +763,7 @@ typedef struct _TxPowerInfo24G{ u1Byte IndexCCK_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; u1Byte IndexBW40_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G-1]; //If only one tx, only BW20 and OFDM are used. - s1Byte CCK_Diff[MAX_RF_PATH][MAX_TX_COUNT]; + s1Byte CCK_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte OFDM_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte BW20_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte BW40_Diff[MAX_RF_PATH][MAX_TX_COUNT]; @@ -781,12 +781,12 @@ typedef struct _TxPowerInfo5G{ typedef enum _BT_TOTAL_ANT_NUM{ - ANT_TOTAL_X2 = 0, + ANT_TOTAL_X2 = 0, ANT_TOTAL_X1 = 1 } BT_TOTAL_ANT_NUM, *PBT_TOTAL_ANT_NUM; typedef enum _BT_BOARD_TYPE{ - BT_2WIRE = 0, + BT_2WIRE = 0, BT_ISSC_3WIRE = 1, BT_ACCEL = 2, BT_CSR_BC4 = 3, diff --git a/network/wlan/WDI/HAL/HalPhy.h b/network/wlan/WDI/HAL/HalPhy.h index 387fe95aa..307dd1df9 100644 --- a/network/wlan/WDI/HAL/HalPhy.h +++ b/network/wlan/WDI/HAL/HalPhy.h @@ -5,14 +5,14 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: HalPhy.h - + Abstract: Prototype of PHY_XXX() and related data structure. - + Major Change History: When Who What ---------- --------------- ------------------------------- - 2011-08-10 Lanhsin Create. + 2011-08-10 Lanhsin Create. --*/ /*--------------------------Define Parameters-------------------------------*/ @@ -65,7 +65,7 @@ Major Change History: #define NON_SHORT_SLOT_TIME 20 // -// Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. +// Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. // Added by Roger, 2013.05.22. // #define IS_ANT_DETECT_SUPPORT_SINGLE_TONE(__Adapter) ((GET_HAL_DATA(__Adapter)->AntDetection) & BIT0) @@ -76,16 +76,16 @@ Major Change History: typedef enum _RF_TYPE{ RF_TYPE_MIN = 0, // 0 RF_8225=1, // 1 11b/g RF for verification only - RF_8256=2, // 2 11b/g/n + RF_8256=2, // 2 11b/g/n RF_8258=3, // 3 11a/b/g/n RF RF_6052=4, // 4 11b/g/n RF - RF_PSEUDO_11N=5, // 5, It is a temporality RF. + RF_PSEUDO_11N=5, // 5, It is a temporality RF. RF_TYPE_MAX }RF_TYPE_E,*PRF_TYPE_E; #define RF_PATH_MAX_92C_88E 2 -#define RF_PATH_MAX_90_8812 4 //Max RF number 90 support +#define RF_PATH_MAX_90_8812 4 //Max RF number 90 support #define RF_PATH_MAX_90_8814A 4 @@ -119,7 +119,7 @@ typedef enum _BaseBand_Config_Type{ BaseBand_Config_PHY_REG = 0, //Radio Path A BaseBand_Config_AGC_TAB = 1, //Radio Path B BaseBand_Config_AGC_TAB_2G = 2, - BaseBand_Config_AGC_TAB_5G = 3, + BaseBand_Config_AGC_TAB_5G = 3, BaseBand_Config_PHY_REG_PG }BaseBand_Config_Type, *PBaseBand_Config_Type; @@ -158,7 +158,7 @@ typedef enum _RATR_TABLE_MODE{ }RATR_TABLE_MODE, *PRATR_TABLE_MODE; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ typedef struct _SwChnlCmd{ SwChnlCmdID CmdID; u4Byte Para1; @@ -171,10 +171,10 @@ typedef struct _SwChnlCmd{ #pragma pack(1) #endif -typedef struct _R_ANTENNA_SELECT_OFDM{ - u4Byte r_tx_antenna:4; +typedef struct _R_ANTENNA_SELECT_OFDM{ + u4Byte r_tx_antenna:4; u4Byte r_ant_l:4; - u4Byte r_ant_non_ht:4; + u4Byte r_ant_non_ht:4; u4Byte r_ant_ht1:4; u4Byte r_ant_ht2:4; u4Byte r_ant_ht_s1:4; @@ -184,7 +184,7 @@ typedef struct _R_ANTENNA_SELECT_OFDM{ }R_ANTENNA_SELECT_OFDM; typedef struct _R_ANTENNA_SELECT_CCK{ - u1Byte r_cckrx_enable_2:2; + u1Byte r_cckrx_enable_2:2; u1Byte r_cckrx_enable:2; u1Byte r_ccktx_enable:4; }R_ANTENNA_SELECT_CCK; @@ -208,7 +208,7 @@ typedef struct RF_Shadow_Compare_Map { UINT8 Driver_Write; }RF_SHADOW_T; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ diff --git a/network/wlan/WDI/HAL/HalPowerSave.h b/network/wlan/WDI/HAL/HalPowerSave.h index fa5934c40..ee309b9b2 100644 --- a/network/wlan/WDI/HAL/HalPowerSave.h +++ b/network/wlan/WDI/HAL/HalPowerSave.h @@ -15,8 +15,8 @@ typedef struct _LPS_DEEP_SLEEP_CONTEXT { BOOLEAN bEnable; - pu1Byte pStaticConfigureFile; - pu1Byte pDynamicConfigureFile; + pu1Byte pStaticConfigureFile; + pu1Byte pDynamicConfigureFile; u4Byte ConfigurationFileOffset; u2Byte ConfigureFileLengthForPTK; u2Byte ConfigureFileLengthForGTK; @@ -115,12 +115,12 @@ FwInactivePSLeave( IN PADAPTER Adapter ); -VOID +VOID FwLPSDeepSleepInit( IN PADAPTER Adapter ); -VOID +VOID FwLPSDeepSleepDeInit( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/HAL/HalPwrSeqCmd.h b/network/wlan/WDI/HAL/HalPwrSeqCmd.h index 0fb664501..cba21845c 100644 --- a/network/wlan/WDI/HAL/HalPwrSeqCmd.h +++ b/network/wlan/WDI/HAL/HalPwrSeqCmd.h @@ -82,14 +82,14 @@ typedef enum _PWRSEQ_CMD_DELAY_UNIT_ typedef struct _WL_PWR_CFG_ { u2Byte offset; - u1Byte cut_msk; - u1Byte fab_msk:4; - u1Byte interface_msk:4; - u1Byte base:4; - u1Byte cmd:4; + u1Byte cut_msk; + u1Byte fab_msk:4; + u1Byte interface_msk:4; + u1Byte base:4; + u1Byte cmd:4; u1Byte msk; u1Byte value; - + } WLAN_PWR_CFG, *PWLAN_PWR_CFG; @@ -109,7 +109,7 @@ typedef struct _WL_PWR_CFG_ BOOLEAN HalPwrSeqCmdParsing( IN PADAPTER pAdapter, - IN u1Byte CutVersion, + IN u1Byte CutVersion, IN u1Byte FabVersion, IN u1Byte InterfaceType, IN WLAN_PWR_CFG PwrCfgCmd[] diff --git a/network/wlan/WDI/HAL/HalSIC.h b/network/wlan/WDI/HAL/HalSIC.h index ab46b9b39..f69150906 100644 --- a/network/wlan/WDI/HAL/HalSIC.h +++ b/network/wlan/WDI/HAL/HalSIC.h @@ -3,7 +3,7 @@ //================================================================== // Note: If SIC_ENABLE under PCIE, because of the slow operation -// you should +// you should // 1) "#define USE_WORKITEM 1" in PrecompInc.h. // 2) "#define RTL8723_FPGA_VERIFICATION 1" in Precomp.h.WlanE.Windows // 3) "#define LOAD_FIRMWARE_FROM_HEADER 0" in Precomp.h.WlanE.Windows if needed. diff --git a/network/wlan/WDI/HAL/HalSdio.h b/network/wlan/WDI/HAL/HalSdio.h index ec4006cf5..1f49f720f 100644 --- a/network/wlan/WDI/HAL/HalSdio.h +++ b/network/wlan/WDI/HAL/HalSdio.h @@ -5,15 +5,15 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: HalSdio.h - + Abstract: Prototype of HalsdioXXX() and related data structure. - + Major Change History: When Who What ---------- --------------- ------------------------------- - 2010-12-12 Roger Create. - + 2010-12-12 Roger Create. + --*/ #define SUPPORT_HW_RADIO_DETECT(_Adapter) TRUE @@ -26,16 +26,16 @@ Major Change History: #define MAX_NUM_SDIO_TX_QUEUE 3 // -// The number of OutPipe request must larger than or equal to the number of +// The number of OutPipe request must larger than or equal to the number of // pending request for each pipe. 2009. 01. 12. // #define MAX_NUM_REQUEST_PER_OUT_PIPE 8 -#define MAX_NUM_REQUEST_PER_IN_PIPE 128 +#define MAX_NUM_REQUEST_PER_IN_PIPE 128 #define MAX_NUM_REQUEST_PER_TX_QUEUE 3 -#define MAX_NUM_REQUEST_PER_RX_QUEUE 1 +#define MAX_NUM_REQUEST_PER_RX_QUEUE 1 -#define HAL_SDIO_COMPLETED_OK BIT1 +#define HAL_SDIO_COMPLETED_OK BIT1 #define HAL_SDIO_COMPLETED_ERROR BIT2 #define HAL_SDIO_COMPLETED_CANCELED BIT3 @@ -66,7 +66,7 @@ Major Change History: ((__pAdapter)->bDriverStopped || \ (__pAdapter)->bSurpriseRemoved || \ RT_IS_FUNC_DISABLED((__pAdapter), DF_RX_BIT)) - + #define RT_GetInterfaceSelection(_Adapter) ((u1Byte)GET_HAL_DATA(_Adapter)->InterfaceSel) #define IS_NEED_OFFSET_ON_AMPDU(_Adapter) FALSE @@ -91,12 +91,12 @@ typedef struct _SDIO_OUT_RESOURCE // RT_LIST_ENTRY TxFreeContextList; // An link list of SDIO_OUT_CONTEXT. Note that, every out pipe shall get and return SDIO_OUT_CONTEXT from and to here. u4Byte TxFreeContextCount; // Number of conext available to use. - s4Byte TxContextCount; // Total number of SDIO_OUT_CONTEXT allocated. + s4Byte TxContextCount; // Total number of SDIO_OUT_CONTEXT allocated. } SDIO_OUT_RESOURCE, *PSDIO_OUT_RESOURCE; -typedef struct _SDIO_OUT_CONTEXT +typedef struct _SDIO_OUT_CONTEXT { - RT_LIST_ENTRY List; + RT_LIST_ENTRY List; // // TODO: Replace pTcb as HalReserved[0]. @@ -111,12 +111,12 @@ typedef struct _SDIO_OUT_CONTEXT u1Byte AggrNum; // SDIO Tx aggregation number. // - // RT_PLATFORM reserved. - // For example, + // RT_PLATFORM reserved. + // For example, // - on Windows NDIS5/WDM: [0]: PADAPTER, [1]: NULL, [2]: NULL. // - On Windows NDIS6/WDF: [0]: PADAPTER, [1]: NULL, [2]: WDFREQUEST. // - PVOID PlatformReserved[4]; + PVOID PlatformReserved[4]; } SDIO_OUT_CONTEXT, *PSDIO_OUT_CONTEXT; @@ -136,22 +136,22 @@ typedef struct _SDIO_IN_RESOURCE // RT_LIST_ENTRY FreeContextList; // An link list of USB_IN_CONTEXT. Note that, every out pipe shall get and return USB_IN_CONTEXT from and to here. u4Byte FreeContextCount; // Current number of conext available to use. - s4Byte ContextCounAlloc; // Total number of USB_IN_CONTEXT allocated. + s4Byte ContextCounAlloc; // Total number of USB_IN_CONTEXT allocated. } SDIO_IN_RESOURCE, *PSDIO_IN_RESOURCE; -typedef struct _SDIO_IN_CONTEXT +typedef struct _SDIO_IN_CONTEXT { - RT_LIST_ENTRY List; + RT_LIST_ENTRY List; pu1Byte Buffer; // Pointer to the buffer to IN from USBD. u4Byte BufferLen; // Length of Buffer allowed USBD to use. - u4Byte BufLenUsed; // Length of Buffer used for the bulk IN transfer. + u4Byte BufLenUsed; // Length of Buffer used for the bulk IN transfer. BOOLEAN bRxPending; // TRUE if this context is pending in USBD. u1Byte RxPipeIndex; // An index to the IN pipe. // - // RT_PLATFORM reserved. - // For example, + // RT_PLATFORM reserved. + // For example, // - on Windows NDIS5/WDM: [0]:PADAPTER, [1]: NULL, [2]: NULL. // - On Windows NDIS6/WDF: // @@ -163,7 +163,7 @@ typedef struct _SDIO_IN_CONTEXT PVOID HalReserved[1]; #if VISTA_USB_RX_REVISE - u4Byte RetStatus; + u4Byte RetStatus; #endif } SDIO_IN_CONTEXT, *PSDIO_IN_CONTEXT; @@ -220,14 +220,14 @@ typedef struct _HAL_DATA_SDIO PlatformMutex mxCCKControl; PlatformMutex mxChnlBwControl; - // add for 92D Phy mode/mac/Band mode + // add for 92D Phy mode/mac/Band mode //MACPHY_MODE_8192D MacPhyMode92D; //u1Byte BandType92D; //0: 2.4G, 1: 5G BAND_TYPE CurrentBandType; //0:2.4G, 1:5G - BAND_TYPE LastBandType; //0:2.4G, 1:5G + BAND_TYPE LastBandType; //0:2.4G, 1:5G BAND_TYPE BandSet; BOOLEAN bIsVS; - + // // Add For EEPROM Efuse switch and Efuse Shadow map Setting // @@ -291,10 +291,10 @@ typedef struct _HAL_DATA_SDIO u2Byte EEPROMSVID; u2Byte EEPROMSDID; u1Byte EEPROMCustomerID; - u1Byte EEPROMSubCustomerID; + u1Byte EEPROMSubCustomerID; u1Byte EEPROMRegulatory; - u1Byte EEPROMThermalMeter; // ThermalMeter value. - u1Byte EEPROMBluetoothCoexist; + u1Byte EEPROMThermalMeter; // ThermalMeter value. + u1Byte EEPROMBluetoothCoexist; u1Byte EEPROMBluetoothType; u1Byte EEPROMBluetoothAntNum; u1Byte EEPROMBluetoothSingleAntPath; @@ -303,7 +303,7 @@ typedef struct _HAL_DATA_SDIO u1Byte USBDummyOffset; u1Byte USBALLDummyLength; u1Byte EFUSECloudKey_EX[EEPROM_CLOUD_KEY_LENGTH_EX]; - + // // SDIO ISR Related // @@ -326,9 +326,9 @@ typedef struct _HAL_DATA_SDIO u1Byte ThermalValue; u1Byte ThermalValue_LCK; u1Byte ThermalValue_IQK; - u1Byte ThermalValue_DPK; + u1Byte ThermalValue_DPK; u1Byte ThermalValue_AVG[AVG_THERMAL_NUM]; - u1Byte ThermalValue_AVG_index; + u1Byte ThermalValue_AVG_index; u1Byte ThermalValue_RxGain; u1Byte ThermalValue_Crystal; u1Byte ThermalValue_DPKstore; @@ -336,20 +336,20 @@ typedef struct _HAL_DATA_SDIO BOOLEAN TxPowerTrackingInProgress; //s2Byte index_mapping_DPK_current[4][index_mapping_DPK_NUM]; - + BOOLEAN bRfPiEnable; - BOOLEAN bReloadtxpowerindex; - BOOLEAN bDoneTxpower; - u1Byte CrystalCap; + BOOLEAN bReloadtxpowerindex; + BOOLEAN bDoneTxpower; + u1Byte CrystalCap; u1Byte CrystalFreq; u1Byte CrystalSrc; - + s1Byte OFDM_index_HP[2]; - s1Byte CCK_index_HP; + s1Byte CCK_index_HP; u1Byte ThermalValue_HP[HP_THERMAL_NUM]; u1Byte ThermalValue_HP_index; - BOOLEAN bAPKdone; + BOOLEAN bAPKdone; BOOLEAN bDPKdone[2]; //for TxPwrTracking @@ -357,26 +357,26 @@ typedef struct _HAL_DATA_SDIO s4Byte RegE9C; s4Byte RegEB4; s4Byte RegEBC; - //for IQK + //for IQK BOOLEAN bIQKInitialized; BOOLEAN bAntennaDetected; u4Byte ADDA_backup[IQK_ADDA_REG_NUM]; u4Byte IQK_MAC_backup[IQK_MAC_REG_NUM]; u4Byte IQK_BB_backup_recover[9]; - u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; + u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; //---------------------------------------------------------------------------------// //3 [2.4G] u1Byte Index24G_CCK_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER_2G]; u1Byte Index24G_BW40_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER_2G]; //If only one tx, only BW20 and OFDM are used. - s1Byte CCK_24G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; + s1Byte CCK_24G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte OFDM_24G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte BW20_24G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte BW40_24G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; //3 [5G] u1Byte Index5G_BW40_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER_5G]; - u1Byte Index5G_BW80_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER_5G_80M]; + u1Byte Index5G_BW80_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER_5G_80M]; s1Byte OFDM_5G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte BW20_5G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; s1Byte BW40_5G_Diff[MAX_RF_PATH][MAX_TX_COUNT]; @@ -384,26 +384,26 @@ typedef struct _HAL_DATA_SDIO // // TX power by rate table at most 4RF path. - // The register is + // The register is // - // VHT TX power by rate off setArray = + // VHT TX power by rate off setArray = // Band:-2G&5G = 0 / 1 // RF: at most 4*4 = ABCD=0/1/2/3 - // CCK=0 OFDM=1/2 HT-MCS 0-15=3/4/56 VHT=7/8/9/10/11 + // CCK=0 OFDM=1/2 HT-MCS 0-15=3/4/56 VHT=7/8/9/10/11 // u1Byte TxPwrByRateTable; u1Byte TxPwrByRateBand; s1Byte TxPwrByRateOffset[TX_PWR_BY_RATE_NUM_BAND] [TX_PWR_BY_RATE_NUM_RF] [TX_PWR_BY_RATE_NUM_RF] - [TX_PWR_BY_RATE_NUM_RATE]; + [TX_PWR_BY_RATE_NUM_RATE]; //---------------------------------------------------------------------------------// - + u1Byte PowerIndex_backup[6]; u1Byte TxPwrLevelCck[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; u1Byte TxPwrLevelHT40_1S[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; // For HT 40MHZ pwr - u1Byte TxPwrLevelHT40_2S[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; // For HT 40MHZ pwr + u1Byte TxPwrLevelHT40_2S[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; // For HT 40MHZ pwr s1Byte TxPwrHt20Diff[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; // HT 20<->40 Pwr diff u1Byte TxPwrLegacyHtDiff[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; // For HT<->legacy pwr diff @@ -434,11 +434,11 @@ typedef struct _HAL_DATA_SDIO // Used for TX power setting shadow map. u1Byte TxPwrShadow[MAX_RF_PATH][DESC_RATEMAX]; - + // For power group u1Byte PwrGroupHT20[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; u1Byte PwrGroupHT40[RF_PATH_MAX_92C_88E][CHANNEL_MAX_NUMBER]; - + u1Byte LegacyHTTxPowerDiff; // Legacy to HT rate power diff // Read/write are allow for following hardware information variables @@ -457,7 +457,7 @@ typedef struct _HAL_DATA_SDIO u4Byte ValidRxPath; // Valid Antenna path Tx (Used in Normal driver) u1Byte CCKRxPath; //Back CCX Rx Path u1Byte CCKTxPath; //Back CCX Tx Path - + u4Byte LedControlNum; u4Byte LedControlMode; @@ -465,7 +465,7 @@ typedef struct _HAL_DATA_SDIO u1Byte CurrentCckTxPwrIdx; u1Byte CurrentOfdm24GTxPwrIdx; u1Byte CurrentBW2024GTxPwrIdx; - u1Byte CurrentBW4024GTxPwrIdx; + u1Byte CurrentBW4024GTxPwrIdx; u1Byte OriginalCckTxPwrIdx; u1Byte OriginalOfdm24GTxPwrIdx; @@ -481,9 +481,9 @@ typedef struct _HAL_DATA_SDIO u4Byte RegA24; u1Byte RegC04; u4Byte RegD04; - u4Byte RegRF3C[2]; //pathA / pathB + u4Byte RegRF3C[2]; //pathA / pathB u4Byte RegRF36; - + HAL92C_P2P_PS_OFFLOAD p2pFwPsOffload; // @@ -538,7 +538,7 @@ typedef struct _HAL_DATA_SDIO //2 QoS Related variable u1Byte AcmControl; - + u4Byte FWChannelSwitchComplete; BOOLEAN bSwChnlAndSetBWInProgress; u1Byte CurrentCenterFrequencyIndex1; @@ -547,7 +547,7 @@ typedef struct _HAL_DATA_SDIO RT_WORK_ITEM SwChnlAndSetBWModeWorkItem; //2 Led Related variable - LED_STRATEGY_SDIO LedStrategy; + LED_STRATEGY_SDIO LedStrategy; LED_SDIO SwLed0; LED_SDIO SwLed1; LED_SDIO SwLed2; @@ -578,14 +578,14 @@ typedef struct _HAL_DATA_SDIO u4Byte ClmDurAcc; u4Byte NhmAcc[8]; u4Byte NhmDurAcc; - + // // Default setting (initialized from registry). // BOOLEAN bRegUseLed; // 0: disable LED, 1: eanble LED. - + // // High Power Mechanism. // @@ -607,7 +607,7 @@ typedef struct _HAL_DATA_SDIO // Interface selection. Added by Annie, 2005-11-18. u1Byte InterfaceSel; - u1Byte PackageType; + u1Byte PackageType; u1Byte RFEType; BOOLEAN bIsMPChip; @@ -617,31 +617,31 @@ typedef struct _HAL_DATA_SDIO BOOLEAN bSendingBeacon; // TRUE if we are sending beacon to host control and not yet completed. // Sw Antenna Diversity - //20070103 porting by David + //20070103 porting by David BOOLEAN bRegSwAntennaDiversityMechanism; // TRUE if S/W antenna diversity mechanism is allowed, see also EEPROMSwAntennaDiversity and bSwAntennaDiverity. BOOLEAN bAntennaDiversityTimerIssued; RT_WORK_ITEM SwAntennaWorkItem; u1Byte CurrAntennaIndex; // Index to current Antenna (both Tx and Rx). u1Byte AdTickCount; // Times of SwAntennaDiversityTimer happened. - u1Byte AdCheckPeriod; // # of period SwAntennaDiversityTimer to check Rx signal strength for SW Antenna Diversity. - u1Byte AdMinCheckPeriod; // Min value of AdCheckPeriod. - u1Byte AdMaxCheckPeriod; // Max value of AdCheckPeriod. + u1Byte AdCheckPeriod; // # of period SwAntennaDiversityTimer to check Rx signal strength for SW Antenna Diversity. + u1Byte AdMinCheckPeriod; // Min value of AdCheckPeriod. + u1Byte AdMaxCheckPeriod; // Max value of AdCheckPeriod. BOOLEAN bSwAntennaDiverity; // TRUE if we want to enable SW Antenna Diversity mechanism. RT_TIMER SwAntennaDiversityTimer; // Timer object for SW Antenna Diversity mechanism. u4Byte AdRxOkCnt; // ROK packet count from current BSS in ANTENNA_DIVERSITY_TIMER_PERIOD. - s4Byte AdRxSignalStrength; // Rx signal strength for Antenna Diversity, which had been smoothing, its valid range is [0,100]. + s4Byte AdRxSignalStrength; // Rx signal strength for Antenna Diversity, which had been smoothing, its valid range is [0,100]. s4Byte AdRxSsThreshold; // Signal strength threshold to switch antenna. s4Byte AdMaxRxSsThreshold; // Max value of AdRxSsThreshold. BOOLEAN bAdSwitchedChecking; // TRUE if we shall shall check Rx signal strength for last time switching antenna. s4Byte AdRxSsBeforeSwitched; // Rx signal strength before we swithed antenna. // //1 The following was added for 8192sUsb - - /* Firmware related */ + + /* Firmware related */ PRT_FIRMWARE pFirmware; u1Byte RegFWOffload; u4Byte RsvdBitMap; - + // Beamforming RF path number u1Byte RegBeamformerCapRfNum; u1Byte RegBeamformeeCapRfNum; @@ -654,18 +654,18 @@ typedef struct _HAL_DATA_SDIO /*Last RxDesc TSF value*/ u4Byte LastRxDescTSFHigh; u4Byte LastRxDescTSFLow; - + // // 8190 40MHz mode // u1Byte nCur40MhzPrimeSC; // Control channel sub-carrier u1Byte nCur80MhzPrimeSC; //used for primary 40MHz of 80MHz mode - + /* Rx Descriptor Debug message for aggregation related histogram */ u1Byte nRxAMPDU_AggrNum; u2Byte nRxAMPDU_Size; - + // // Joseph test for Silent Reset @@ -699,19 +699,19 @@ typedef struct _HAL_DATA_SDIO s4Byte nLinesBufRadioB; s4Byte nLinesBufRadioC; s4Byte nLinesBufRadioD; - + BOOLEAN bCCKinCH14; s1Byte CCK_index; s1Byte OFDM_index[2]; u4Byte TXPowerTrackingCallbackCnt; //debug only - + //cosa add for 2T4R/1T2R software control 10/24/2007 u1Byte RF_Type;// 1 means 2T4R, 0 means 1T2R // For EDCA Turbo mode BOOLEAN bIsAnyNonBEPkts; - + u8Byte SystemStartTime; u8Byte SystemCurrTime; @@ -740,8 +740,8 @@ typedef struct _HAL_DATA_SDIO u1Byte AntDivCfg; u1Byte AntDetection; u1Byte PathDivCfg; - u1Byte TRxAntDivType; // RF type, Read from 88E EFUSE 0xC9 - u1Byte ReverseDPDT; + u1Byte TRxAntDivType; // RF type, Read from 88E EFUSE 0xC9 + u1Byte ReverseDPDT; u4Byte OFDM_Pkt_Cnt; u4Byte CCK_Pkt_Cnt; @@ -753,24 +753,24 @@ typedef struct _HAL_DATA_SDIO u1Byte RSSI_BT; RT_TIMER PSDTriggerTimer; //---------------2011.08.24 ------------------ - - // 2008/01/10 MH HW Trun on/off RF according to GPIO1 + + // 2008/01/10 MH HW Trun on/off RF according to GPIO1 RT_WORK_ITEM GPIOChangeRFWorkItem; // TRUE if RF is turned to OFF by HW (e.g. GPIO1), FALSE otherwise. - BOOLEAN bHwRadioOff; + BOOLEAN bHwRadioOff; // 2010/11/25 Check PBC GPIO RT_WORK_ITEM GPIOCheckPBCWorkItem; - + // Ratr table used bitmap u1Byte RATRTableBitmap; - BOOLEAN bInMonitorMode; // Indicate if underlying h/w is configured in monitor mode. - + BOOLEAN bInMonitorMode; // Indicate if underlying h/w is configured in monitor mode. + //Add by Jacken Tx Power Control for Near/Far Range 2008/03/06 u1Byte DynamicTxHighPowerLvl; //Tx High power level u1Byte LastDTPLvl; - + SCAN_OPERATION_BACKUP_OPT ScanOperationBackupOtpType; RT_WORK_ITEM ScanOperationBackupWorkItem; @@ -788,7 +788,7 @@ typedef struct _HAL_DATA_SDIO u1Byte TxQueueToOutPipeMap[MAX_TX_QUEUE]; u1Byte DMFlag; // Indicate if each dynamic mechanism's status. - + u1Byte PreRpwmVal; // by tynli. For recording the previous RPWM value. u1Byte LastHCPWM1Val; @@ -815,7 +815,7 @@ typedef struct _HAL_DATA_SDIO u2Byte HwRxPageSize; // Hardware setting u4Byte MaxRxAggBlock; - + RX_AGG_MODE RxAggMode; u1Byte RegRxAggBlockCount; u1Byte RxAggBlockCount; // USB Block count. Block size is 512-byte in hight speed and 64-byte in full speed @@ -837,7 +837,7 @@ typedef struct _HAL_DATA_SDIO u4Byte lastFwCmdElementId; RT_WORK_ITEM FillH2CCmdWorkItem; - BOOLEAN bH2CSetInProgress; + BOOLEAN bH2CSetInProgress; RT_TIMER FillH2CCmdTimer; BOOLEAN H2CStopInsertQueue; //by tynli. 2010.10.07. #if(FW_QUEME_MECHANISM_NEW != 1) @@ -891,11 +891,11 @@ typedef struct _HAL_DATA_SDIO // 2010/08/09 MH Add CU power down mode. BOOLEAN pwrdown; - BOOLEAN bRfOnOffInt;// HW RF on/off interrupt + BOOLEAN bRfOnOffInt;// HW RF on/off interrupt // Add Tx Feedback for SDIO, by Hana, 2015.02.10 // TxFeedback Context Place Holder for Private Data: --------------------------- - // + Only access this private data inside the module by TxFeedbackGetContext() + // + Only access this private data inside the module by TxFeedbackGetContext() PRIVATE_DATA_ZONE TxFeedback[TX_FEEDBACK_SIZE_OF_CONTEXT]; // ---------------------------------------------------------------------- @@ -914,10 +914,10 @@ typedef struct _HAL_DATA_SDIO u1Byte AMPDUBurstNum; BOOLEAN bAutoAMPDUBurstMode; u2Byte AutoAMPDUBurstModeThreshold; - + u2Byte TxHignTPThreshold; u2Byte RxHignTPThreshold; - + u1Byte SwBeaconType; // The Beacon type defined by BACON_SEND_XX. BOOLEAN bMACFuncEnable; @@ -926,16 +926,16 @@ typedef struct _HAL_DATA_SDIO RT_WORK_ITEM IQKTriggerWorkItem; RT_WORK_ITEM LCKTriggerWorkItem; - RT_WORK_ITEM DPKTriggerWorkItem; - + RT_WORK_ITEM DPKTriggerWorkItem; + s4Byte MinUndecoratedPWDBForDM; s4Byte LastMinUndecoratedPWDBForDM; - + s1Byte BufOfLinesAGC2_4G[MAX_LINES_HWCONFIG_TXT][MAX_BYTES_LINE_HWCONFIG_TXT]; s1Byte BufOfLinesAGC5G[MAX_LINES_HWCONFIG_TXT][MAX_BYTES_LINE_HWCONFIG_TXT]; s4Byte nLinesReadAGC2_4G; - s4Byte nLinesReadAGC5G; + s4Byte nLinesReadAGC5G; //To reduce stack in phy_SwChnlStepByStep, 20110719 by sherry SwChnlCmd PreCommonCmd[MAX_PRECMD_CNT]; @@ -956,7 +956,7 @@ typedef struct _HAL_DATA_SDIO BOOLEAN bLinked; u1Byte CurrentRARate; - + u1Byte u1RsvdPageLoc[MAX_H2C_CMD_DATA_SIZE]; u1Byte u1RsvdPageLoc2[MAX_H2C_CMD_DATA_SIZE]; u1Byte u1RsvdPageLoc3[MAX_H2C_CMD_DATA_SIZE]; @@ -970,11 +970,11 @@ typedef struct _HAL_DATA_SDIO u1Byte SdioTxSequence; BOOLEAN bSpurCalComplete; // <20130515, VincentLan> To make sure spur calibration be execute only once - BOOLEAN bPhyValueInitReady; + BOOLEAN bPhyValueInitReady; BOOLEAN bNeedIQK; - BOOLEAN bNeedQueuePacketInIQKProgress; - + BOOLEAN bNeedQueuePacketInIQKProgress; + u1Byte ExternalPA_2G; u1Byte ExternalLNA_2G; u1Byte ExternalPA_5G; @@ -983,12 +983,12 @@ typedef struct _HAL_DATA_SDIO u2Byte TypeGPA; u2Byte TypeALNA; u2Byte TypeAPA; - + s1Byte TxBBSwing_2G; - s1Byte TxBBSwing_5G; - + s1Byte TxBBSwing_5G; + u1Byte RTSEN; - + u1Byte CurrScanOffloadType; //Current scan offload type // add for RfBbGain @@ -998,11 +998,11 @@ typedef struct _HAL_DATA_SDIO // Add to determine IQK ON/OFF in certain case, Suggested by Cheng. u1Byte IQK_MP_Switch; - - // for FW IQK time measurement + + // for FW IQK time measurement u8Byte IQK_StartTimer; u8Byte IQK_EndTimer; - + // Rate Adaptive Mask control BOOLEAN bUseRAMask; @@ -1029,7 +1029,7 @@ typedef struct _HAL_DATA_SDIO BOOLEAN bSWToBW40M; //8723D LPS 32K Close Power of IO - LPS_DEEP_SLEEP_CONTEXT LPSDeepSleepContext; + LPS_DEEP_SLEEP_CONTEXT LPSDeepSleepContext; }HAL_DATA_SDIO, *PHAL_DATA_SDIO; @@ -1066,12 +1066,12 @@ MapTxQueueToOutPipe( // // SDIO Rx Transfer // -PSDIO_IN_CONTEXT -HalSdioGetInContext( +PSDIO_IN_CONTEXT +HalSdioGetInContext( IN PADAPTER pAdapter ); -VOID +VOID HalSdioReturnInContext( IN PADAPTER pAdapter, IN PSDIO_IN_CONTEXT pContext @@ -1081,12 +1081,12 @@ HalSdioReturnInContext( // // SDIO Tx Transfer // -PSDIO_OUT_CONTEXT -HalSdioGetTxContext( +PSDIO_OUT_CONTEXT +HalSdioGetTxContext( IN PADAPTER pAdapter ); -VOID +VOID HalSdioReturnTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext diff --git a/network/wlan/WDI/HAL/HalTxFeedback.h b/network/wlan/WDI/HAL/HalTxFeedback.h index 2f66eead3..5bf7eedc9 100644 --- a/network/wlan/WDI/HAL/HalTxFeedback.h +++ b/network/wlan/WDI/HAL/HalTxFeedback.h @@ -69,7 +69,7 @@ typedef struct _RT_TX_FEEDBACK_INFO // Packet Tx Profile ----------------------------------------------------------- RT_TX_FEEDBACK_INFO_TX_PROFILE TxProfile; // -------------------------------------------------------------------------- - + }RT_TX_FEEDBACK_INFO, *PRT_TX_FEEDBACK_INFO; @@ -96,7 +96,7 @@ typedef struct _TX_FEEDBACK_CONTEXT{ typedef struct _TX_FEEDBACK_TCB_ZONE{ PRT_TX_FEEDBACK_INFO pTxFeedbackInfo; - + } TX_FEEDBACK_TCB_ZONE, *PTX_FEEDBACK_TCB_ZONE; #define TX_FEEDBACK_SIZE_OF_TCB_ZONE sizeof(TX_FEEDBACK_TCB_ZONE) diff --git a/network/wlan/WDI/HAL/halCmdPkt.h b/network/wlan/WDI/HAL/halCmdPkt.h index 0af6c4417..1b14c7e75 100644 --- a/network/wlan/WDI/HAL/halCmdPkt.h +++ b/network/wlan/WDI/HAL/halCmdPkt.h @@ -7,7 +7,7 @@ * Note: We define different command packets' structure and defintion. * Please refer to doc ws-06-0063-rtl8190-command-packet-specification. * 1. The defintiion and structure will be the same in DRV and FW. - * + * * * Export: Constants, macro, functions(API), global variables(None). * @@ -15,8 +15,8 @@ * .....For example. * * History: - * Data Who Remark - * 01/15/2007 MHC Create initial version. Define comadn packet + * Data Who Remark + * 01/15/2007 MHC Create initial version. Define comadn packet * structure and element definition. * 01/16/2007 MHC According to document, we add defintion in dedicated * field and corresponding structure. @@ -24,7 +24,7 @@ * from firmware. * 10/09/2007 MHC Accept all USB/PCI structure and enum. Nerge the * same structure or constant definition. - * + * *****************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __HAL90_CMD_PKT_H__ @@ -124,7 +124,7 @@ typedef int (*INTFUNCPTR) (void); /*--------------------------Define Parameters-------------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /* Define different command packet structure. */ /* 1. RX side: TX feedback packet. */ @@ -139,44 +139,44 @@ typedef struct tag_Cmd_Pkt_Tx_Feedback UINT8 Length; /* Command packet length. */ /* 2007/07/05 MH Change tx feedback info field. */ /*------TX Feedback Info Field */ - UINT8 TID:4; /* */ - UINT8 Fail_Reason:3; /* */ - UINT8 TOK:1; /* Transmit ok. */ + UINT8 TID:4; /* */ + UINT8 Fail_Reason:3; /* */ + UINT8 TOK:1; /* Transmit ok. */ UINT8 Reserve1:4; /* */ UINT8 Pkt_Type:2; /* */ UINT8 Bandwidth:1; /* */ - UINT8 Qos_Pkt:1; /* */ - - // DWORD 1 + UINT8 Qos_Pkt:1; /* */ + + // DWORD 1 UINT8 Reserve2; /* */ /*------TX Feedback Info Field */ UINT8 Retry_Cnt; /* */ UINT16 Pkt_ID; /* */ - - // DWORD 3 + + // DWORD 3 UINT16 Seq_Num; /* */ UINT8 S_Rate; /* Start rate. */ UINT8 F_Rate; /* Final rate. */ - - // DWORD 4 + + // DWORD 4 UINT8 S_RTS_Rate; /* */ UINT8 F_RTS_Rate; /* */ UINT16 pkt_length; /* */ - - // DWORD 5 - UINT16 Reserve3; /* */ - UINT16 Duration; /* */ + + // DWORD 5 + UINT16 Reserve3; /* */ + UINT16 Duration; /* */ }CMPK_TXFB_T; // For USB -/* 2. RX side: Interrupt status packet. It includes Beacon State, +/* 2. RX side: Interrupt status packet. It includes Beacon State, Beacon Timer Interrupt and other useful informations in MAC ISR Reg. */ typedef struct tag_Cmd_Pkt_Interrupt_Status { UINT8 Element_ID; /* Command packet type. */ UINT8 Length; /* Command packet length. */ UINT16 Reserve; - UINT32 InterruptStatus; /* Interrupt Status. */ + UINT32 InterruptStatus; /* Interrupt Status. */ }CMPK_INTR_STA_T; // For PCI @@ -185,8 +185,8 @@ typedef struct tag_Cmd_Pkt_Beacon_State { UINT8 Element_ID; /* Command packet type. */ UINT8 Length; /* Command packet length. */ - UINT16 BOK:1; /* Beacon info. */ - UINT16 Reserve:15; /* Beacon info. */ + UINT16 BOK:1; /* Beacon info. */ + UINT16 Reserve:15; /* Beacon info. */ }CMPK_BCN_STA_T; @@ -214,7 +214,7 @@ typedef struct tag_Cmd_Pkt_Set_Configuration -/* 4. Both side : TX/RX query configuraton packet. The query structure is the +/* 4. Both side : TX/RX query configuraton packet. The query structure is the same as set configuration. */ #define CMPK_QUERY_CFG_T CMPK_SET_CFG_T @@ -223,36 +223,36 @@ typedef struct tag_Cmd_Pkt_Set_Configuration typedef struct tag_Tx_Stats_Feedback // PJ quick rxcmd 09042007 { // For endian transfer --> Driver will not the same as firmware structure. - // DW 0 - UINT16 Reserve1; + // DW 0 + UINT16 Reserve1; UINT8 Length; // Command packet length UINT8 Element_ID; // Command packet type - - // DW 1 + + // DW 1 UINT16 TxFail; // Tx Fail count UINT16 TxOK; // Tx ok count - + // DW 2 UINT16 TxMCOK; // tx multicast - UINT16 TxRetry; // Tx Retry count - + UINT16 TxRetry; // Tx Retry count + // DW 3 UINT16 TxUCOK; // tx unicast - UINT16 TxBCOK; // tx broadcast - + UINT16 TxBCOK; // tx broadcast + // DW 4 UINT16 TxBCFail; // - UINT16 TxMCFail; // - + UINT16 TxMCFail; // + // DW 5 UINT16 Reserve2; // UINT16 TxUCFail; // - + // DW 6-8 - UINT32 TxMCLength; + UINT32 TxMCLength; UINT32 TxBCLength; UINT32 TxUCLength; - + // DW 9 UINT16 Reserve3_23; UINT8 Reserve3_1; @@ -265,41 +265,41 @@ typedef struct tag_Tx_Stats_Feedback // PJ quick rxcmd 09042007 typedef struct tag_Rx_Debug_Message_Feedback { // For endian transfer --> for driver - // DW 0 - UINT16 Reserve1; + // DW 0 + UINT16 Reserve1; UINT8 Length; // Command packet length UINT8 Element_ID; // Command packet type - + // DW 1-?? // Variable debug message. - + }CMPK_RX_DBGINFO_T; /* 2008/03/20 MH Define transmit rate history. For big endian format. */ typedef struct tag_Tx_Rate_History -{ +{ // For endian transfer --> for driver - // DW 0 + // DW 0 UINT8 Element_ID; // Command packet type UINT8 Length; // Command packet length - UINT16 Reserved1; - + UINT16 Reserved1; + // DW 1-2 CCK rate counter UINT16 CCK[4]; - + // DW 3-6 UINT16 OFDM[8]; - + // DW 7-14 //UINT16 MCS_BW0_SG0[16]; - + // DW 15-22 //UINT16 MCS_BW1_SG0[16]; - + // DW 23-30 //UINT16 MCS_BW0_SG1[16]; - + // DW 31-38 //UINT16 MCS_BW1_SG1[16]; @@ -308,17 +308,17 @@ typedef struct tag_Tx_Rate_History // DW 23-30 BW=0 SG=1 // DW 31-38 BW=1 SG=1 UINT16 HT_MCS[4][16]; - + }CMPK_TX_RAHIS_T; /* Define element ID of command packet. */ typedef enum tag_Command_Packet_Directories -{ +{ RX_TX_FEEDBACK = 0, - RX_BEACON_STATE = 1, + RX_BEACON_STATE = 1, TX_SET_CONFIG = 2, - BOTH_QUERY_CONFIG = 3, + BOTH_QUERY_CONFIG = 3, RX_TX_STATUS = 4, RX_DBGINFO_FEEDBACK = 5, RX_TX_PER_PKT_FEEDBACK = 6, @@ -330,13 +330,13 @@ typedef enum tag_Command_Packet_Directories /* Define packet type. */ typedef enum tag_Packet_Type -{ +{ TYPE_PACKET_BROADCAST = 0, - TYPE_PACKET_MULTICAST, - TYPE_PACKET_UNICAST, + TYPE_PACKET_MULTICAST, + TYPE_PACKET_UNICAST, TYPE_PACKET_TYPE_MAX }CMPK_PKT_TYPE_E; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ diff --git a/network/wlan/WDI/HAL/halDbgCmd.h b/network/wlan/WDI/HAL/halDbgCmd.h index 4d1aca044..356042abe 100644 --- a/network/wlan/WDI/HAL/halDbgCmd.h +++ b/network/wlan/WDI/HAL/halDbgCmd.h @@ -4,36 +4,36 @@ * Module: hal90DbgCmd.h (RTL8190 Header H File) * * - * Note: The header file records the command format between UI and + * Note: The header file records the command format between UI and * driver. And necessary constant for debug command handler. - * * - * Export: * - * Abbrev: + * Export: * - * History: - * Data Who Remark + * Abbrev: + * + * History: + * Data Who Remark * 05/30/2007 MHC Create initial version. - * 05/30/2007 MHC 1. Support debug command from UI. We define command + * 05/30/2007 MHC 1. Support debug command from UI. We define command * format between driver and UI. * 2. We copy debug command definition from firmware. * 06/07/2007 MHC We do not use MIPS GNU header file to support sprintf. * 06/08/2007 MHC Add RX command format structure. - * 06/11/2007 MHC 1. Copy debug command strcuture from MP UI. Programmer + * 06/11/2007 MHC 1. Copy debug command strcuture from MP UI. Programmer * must main the table when they add command. * 06/15/2007 MHC 1. Define current debug command index and do test. We do - * not need to send the header files to UI and UI can + * not need to send the header files to UI and UI can * support the new command immediately. - * 2. Add directory definition for driver. - * 07/13/2007 MHC 1. Define debug print macro which is controlled by + * 2. Add directory definition for driver. + * 07/13/2007 MHC 1. Define debug print macro which is controlled by * different debug flag. * 2. Define different debug flag. * 07/31/2007 MHC 1. Add debug command to count ISR time. * 08/15/2007 MHC Add debug command index for other commands. * 08/16/2007 MHC Extern global variable and API for debug command betwen * UI and firmware. - * + * ******************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __HAL90_DEBUG_COMMAND_H__ @@ -61,7 +61,7 @@ /*--------------------------Define Parameters-------------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ typedef struct tag_Debug_CoMmanD { char *name; /* Command string */ @@ -70,31 +70,31 @@ typedef struct tag_Debug_CoMmanD int directory; /* Directory */ int usage_counter; /* Usage counter for optimization */ int (*cmd_func)(IN PADAPTER pAdapter, - IN INT32 Cmd_Idx, - IN INT32 Argc, - IN INT8 *pArgs[]); + IN INT32 Cmd_Idx, + IN INT32 Argc, + IN INT8 *pArgs[]); /* Command function pointer */ }DCMD_T; /* 2007/06/15 MH Define driver debug command's directory. */ typedef enum tag_CMD_Directories -{ - /* General command. */ +{ + /* General command. */ COMMON = 1, DYNAMIC_SCHEME = 2, //Add for 92S shared commands CMD_92S = 3, - TX_PROCESS_CMD, + TX_PROCESS_CMD, RX_PROCESS_CMD, SECURITY_CMD, /* Private command. You can add according your requirement. */ PRIVATE = 11, MY_LOVELY_CMD, MY_DISLIKE_CMD, - + /* Directory to display all command index. */ CMD_INDEX_DISPLAY = 100, - + /* Last directory definition. */ OTHERS }DCMD_DIRECTORY_E; @@ -126,11 +126,11 @@ typedef enum tag_DCMD_Scanf_Type_Definition #define MAX_ARGV 16 // Only used here. typedef struct tag_Cmd_Format_UI_To_Driver { - INT32 Op; /* Command packet type. */ + INT32 Op; /* Command packet type. */ INT32 Length; /* Command packet length. */ - INT32 Cmd_Idx; /* Command index. */ - INT32 Argc; /* Argument counter. */ - INT8 Argv[MAX_ARGC][MAX_ARGV]; /* Argument value array. */ + INT32 Cmd_Idx; /* Command index. */ + INT32 Argc; /* Argument counter. */ + INT8 Argv[MAX_ARGC][MAX_ARGV]; /* Argument value array. */ }DCMD_TMSG_T, *PDCMD_TMSG_T; /* 2007/06/08 MH Define RX command format from driver to UI. */ @@ -138,11 +138,11 @@ typedef struct tag_Cmd_Format_UI_To_Driver #define RX_HEADER_SIZE 16 //OP+status+segment+length typedef struct tag_Cmd_Format_Driver_To_UI { - INT32 Op; /* Command packet type. */ + INT32 Op; /* Command packet type. */ INT32 Status; /* Command status0/1/2. */ - INT32 Segment; /* Command segment num. */ - INT32 Length; /* Return info size. */ - INT8 ReturnInfo[MAX_RETURN_INFO_SIZE]; /* Argument value array. */ + INT32 Segment; /* Command segment num. */ + INT32 Length; /* Return info size. */ + INT8 ReturnInfo[MAX_RETURN_INFO_SIZE]; /* Argument value array. */ }DCMD_RMSG_T; /* The debug command table is used for UI to do parser. */ @@ -152,10 +152,10 @@ typedef enum _DBG_DRIVER_CMD_INDEX{ DBG_CMD_REG_WRITE = 2 , DBG_CMD_ADAPTER_READ = 3 , DBG_CMD_ADAPTER_WRITE = 4 , - DBG_CMD_RF_READ = 5 , + DBG_CMD_RF_READ = 5 , DBG_CMD_UI_DEBUG = 6 , DBG_CMD_FLAG_CTRL = 7 , - DBG_CMD_RF_WRITE = 8 , + DBG_CMD_RF_WRITE = 8 , DBG_CMD_REG_R_2BYTE = 9 , DBG_CMD_REG_W_2BYTE = 10, DBG_CMD_REG_R_1BYTE = 11, @@ -197,7 +197,7 @@ typedef enum _DBG_CONTROL_TYPE DBG_CTRL_BT_HCI_INFO = 8, DBG_CTRL_BT_HS_INFO = 9, DBG_CTRL_RESET_BT_DBG = 10, - DBG_CTRL_BT_COEX_INFO = 11, + DBG_CTRL_BT_COEX_INFO = 11, DBG_CTRL_BT_LOGO_TEST = 12, DBG_CTRL_SEND_H2C = 13, DBG_CTRL_SET_EDCA = 14, @@ -254,7 +254,7 @@ typedef enum _DBG_CONTROL_TYPE // 2008/03/26 MH We define a simple tx command format for 92 series. No dbg support. typedef struct tag_Tx_Config_Cmd_Format { - UINT32 Op; /* Command packet type. */ + UINT32 Op; /* Command packet type. */ UINT32 Length; /* Command packet length. */ UINT32 Value; }DCMD_TXCMD_T, *PDCMD_TXCMD_T; @@ -269,7 +269,7 @@ typedef enum _tag_TxCmd_Config_Index{ TXCMD_SET_TX_PWR_TRACKING = 0xFF900005, TXCMD_XXXX_CTRL, }DCMD_TXCMD_OP; -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ @@ -300,14 +300,14 @@ extern u4Byte usb_speed; extern INT32 DCMD_Message_Handler_Tx(IN PADAPTER pAdapter, IN ULONG length, IN PVOID pBuffer); -extern INT32 DCMD_Message_Handler_Check( IN ULONG Length, - OUT PVOID pBuffer, +extern INT32 DCMD_Message_Handler_Check( IN ULONG Length, + OUT PVOID pBuffer, OUT ULONG *pLength); extern INT32 DCMD_Message_Handler_Rx(IN INT32 DbgType, - IN ULONG Length, - OUT PVOID pBuffer, + IN ULONG Length, + OUT PVOID pBuffer, OUT ULONG *pLength); -extern INT32 DCMD_Save_FW_Dbg_Info( IN ULONG Length, +extern INT32 DCMD_Save_FW_Dbg_Info( IN ULONG Length, IN PVOID pBuffer); diff --git a/network/wlan/WDI/HAL/phydm/development_note.txt b/network/wlan/WDI/HAL/phydm/development_note.txt index f83d166b3..e545ee94d 100644 --- a/network/wlan/WDI/HAL/phydm/development_note.txt +++ b/network/wlan/WDI/HAL/phydm/development_note.txt @@ -12,8 +12,8 @@ Modified Files: HAL/OUTSRC/phydm_types.h Change Notes: - 1.Merge MERGE_TEMP to RTWLAN_TRUNK - + 1.Merge MERGE_TEMP to RTWLAN_TRUNK + Verification Before Checked-In: 1. N62 buildall ok. -------------------------------------------------------------------------------- @@ -41,8 +41,8 @@ Modified Files: HAL/sources.list.WlanU Change Notes: - 1.Merge MERGE_TEMP to RTWLAN_TRUNK - + 1.Merge MERGE_TEMP to RTWLAN_TRUNK + Verification Before Checked-In: 1. N62 buildall ok. -------------------------------------------------------------------------------- @@ -53,8 +53,8 @@ Modified Files: HEADER/TypeDef.h Change Notes: - 1.Remove BuddyAdapter - + 1.Remove BuddyAdapter + Verification Before Checked-In: 1. N62 buildall ok. -------------------------------------------------------------------------------- @@ -81,10 +81,10 @@ Change Notes: 1.Merge MERGE_TEMP to RTWLAN_TRUNK Issue Tracking: - [PHYDM-3] - + [PHYDM-3] + Verification Before Checked-In: - 1. N62 buildall ok. + 1. N62 buildall ok. -------------------------------------------------------------------------------- <2014/12/30 11:25 Stanley Reviewer: Luke > Modified Files: @@ -92,10 +92,10 @@ Modified Files: Change Notes: 1. Disable CFO tracking for all IC - + Verification Before Checked-In: 1.N62 build all ok - + -------------------------------------------------------------------------------- <2014/12/29 18:50 Luke.Lee Reviewer: Wilson > Modified Files: @@ -105,7 +105,7 @@ Modified Files: Change Notes: 1. Merged from MERGE_TEMP - + Verification Before Checked-In: 1.N63 build all ok @@ -122,7 +122,7 @@ Modified Files: Change Notes: 1. Merged from MERGE_TEMP - + Verification Before Checked-In: 1.N63 build all ok @@ -149,7 +149,7 @@ Modified Files: Change Notes: 1. Merged from MERGE_TEMP - + Verification Before Checked-In: 1.N63 build all ok @@ -168,7 +168,7 @@ Modified Files: Change Notes: 1. Merged from MERGE_TEMP - + Verification Before Checked-In: 1.N62/N63 build all ok 2.8812AU ping OK @@ -192,7 +192,7 @@ New Files: Change Notes: 1. Merged from MERGE_TEMP - + Verification Before Checked-In: 1.N62 build all ok @@ -209,7 +209,7 @@ Deleted Files: Change Notes: 1. Merged from MERGE_TEMP - + Verification Before Checked-In: 1.N62 build all ok @@ -228,10 +228,10 @@ Modified Files: Change Notes: 1. update AdaptivityV8.3 add DCbackoff registry - + Verification Before Checked-In: 1.N62/N63 build all ok - + -------------------------------------------------------------------------------- <2014/12/16 19:50 Stanley Reviewer: YuChen > Modified Files: @@ -246,10 +246,10 @@ Change Notes: 1. Update RTL8723B_MP_Parameter_D-cut_v16_20141216 - Set 0x421=0xf. Do not report tx-report of MGNT or Hi queue packet 2. Update WaxApple_V2.13.2.3 - + Verification Before Checked-In: 1. N62 build all ok - + -------------------------------------------------------------------------------- <2014/12/09 22:00 Luke.Lee Reviewer: Wilson > Modified Files: @@ -257,7 +257,7 @@ Modified Files: Change Notes: 1. Rename PHYDM files 2. Clear compilation errors due to renaming - + Verification Before Checked-In: 1. build Win8.1 x64 ok -------------------------------------------------------------------------------- @@ -266,7 +266,7 @@ Modified Files: Change Notes: 1. Remove unnessary files - + Verification Before Checked-In: 1. build Win7X86 ok -------------------------------------------------------------------------------- @@ -276,7 +276,7 @@ Modified Files: Change Notes: 1. modify the boundary of IQK result for 8723B F-cut - + Verification Before Checked-In: 1. build ok -------------------------------------------------------------------------------- @@ -287,8 +287,8 @@ Modified Files: Change Notes: 1. Update Adaptivity V8.2 - 2. Set Forgetting factor = 0x0 for ac series IC - + 2. Set Forgetting factor = 0x0 for ac series IC + Verification Before Checked-In: 1. build ok -------------------------------------------------------------------------------- @@ -304,7 +304,7 @@ Modified Files: Change Notes: 1. Update Adaptivity V8.1 2. Sync with Merge temp - + Verification Before Checked-In: 1. build ok -------------------------------------------------------------------------------- @@ -318,7 +318,7 @@ Modified Files: Change Notes: 1. Refine IGI upperBound for 8723B B-cut 2. Only use BB reg to Control EDCCA - + Verification Before Checked-In: 1. N62 build all ok -------------------------------------------------------------------------------- @@ -341,7 +341,7 @@ Modified Files: Change Notes: 1. Update RTL8723B MP Parameter v14 2. Remove 0xe0 setting in MP Parameter for LED - + Verification Before Checked-In: 1. N62 build all ok -------------------------------------------------------------------------------- @@ -350,8 +350,8 @@ Modified Files: HAL/OUTSRC/PhyDM_Adaptivity.c Change Notes: - 1. Set EDCCA lambda forgetting factor = 0 - + 1. Set EDCCA lambda forgetting factor = 0 + Verification Before Checked-In: 1. N62 build all ok 2. TP ok @@ -364,7 +364,7 @@ Modified Files: Change Notes: 1. Modify DIG flow for adaptivity (sync from merge temp v31757) 2. Remove dummy prototype - + Verification Before Checked-In: 1. N62 build all ok -------------------------------------------------------------------------------- @@ -376,7 +376,7 @@ Modified Files: Change Notes: 1. sync SD7 adaptivity_BSOD function to prevent BSOD 2. Bug Fix, disable enable adc_mask to prevent 8812 EDCCA hang - + Verification Before Checked-In: 1. build all ok -------------------------------------------------------------------------------- @@ -408,13 +408,13 @@ Modified Files: Change Notes: 1. IQK version:V2.8 20141002 - 2. modify IQK flow + 2. modify IQK flow 3. PA all off at IQK 4. 8723B D-cut still run IQK Verification Before Checked-In: 1. N62 build all ok --------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- <2014/10/03 14:50 YuChen> Modified Files: OUTSRC/PhyDM_Adaptivity.c @@ -423,12 +423,12 @@ Modified Files: Change Notes: 1. Update Adaptivity V7.2 - 2. Adaptivity : + 2. Adaptivity : 2.1 Remove unnecessary condition(don't concern Band4 condition for ac series IC(only NIC)) 2.2 Remove NHM function and other dummy code 3. DIG 3.1 Add LPS write DIG condition - + Verification Before Checked-In: 1. N62/N63 build all ok -------------------------------------------------------------------------------- @@ -438,9 +438,9 @@ Modified Files: HAL/OUTSRC/PhyDM_Adaptivity.c Change Notes: - 1.fix regulation judgement error + 1.fix regulation judgement error 2.fix band 4 problem - + Verification Before Checked-In: 1. N62/N63 build all ok -------------------------------------------------------------------------------- @@ -464,7 +464,7 @@ Change Notes: 2. update FW v36 3. open FW IQK 4. fix LCK bug - + Verification Before Checked-In: 1. N62/N63 build all ok --------------------------------------------------------------------------- @@ -473,14 +473,14 @@ Modified Files: OUTSRC/PhyDM_Adaptivity.c Change Notes: - Fix SearchPwdBLowerBound() in MPdriver - + Fix SearchPwdBLowerBound() in MPdriver + Verification Before Checked-In: 1.make all ok --------------------------------------------------------------------------- <2014/08/06 18:00 YuChen Reviewer:Stanley > Modified Files: - HAL/halDbgCmd.c + HAL/halDbgCmd.c OUTSRC/odm_debug.c OUTSRC/odm_debug.h OUTSRC/PhyDM_Adaptivity.c @@ -488,7 +488,7 @@ Modified Files: Change Notes: Add Adaptivity debug message cmd 13 0 1 a - + Verification Before Checked-In: 1.N62/N63 build all ok --------------------------------------------------------------------------- @@ -510,7 +510,7 @@ Add Files: Change Notes: 1. Moving adaptivity function from odm_DIG.c to PhyDM_Adaptivity.c - + Verification Before Checked-In: 1.N62/N63 build all ok @@ -520,14 +520,14 @@ Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm_DIG.c HAL/OUTSRC/odm_DIG.h - + Change Notes: 1. Ignore DIG mechanism if IGI has been changed by other mechanism 2. bSTA flag need to be reset when STA mode - + Verification Before Checked-In: 1.N62 build all ok - + -------------------------------------------------------------------------------- <2014/07/21 17:30 YuChen Reviewer: Luke.Lee > Modified Files: @@ -545,7 +545,7 @@ Modified Files: Change Notes: 1. update Adaptivity V7.1 2. total legal version - + Verification Before Checked-In: 1.N62/N63 build all ok -------------------------------------------------------------------------------- @@ -569,7 +569,7 @@ Change Notes: 1. update Adaptivity V7.0 2. add Registry NHM_enable for performance improve(default off) 3. temporary turn off updatePowerTrainingStatus - + Verification Before Checked-In: 1.N62/N63 build all ok @@ -587,7 +587,7 @@ Change Notes: 2. Support Repeater mode(for AP) 3. Fix some unexpected error 4. increase lab test possibility - + Verification Before Checked-In: 1.N62 & N63 build all ok -------------------------------------------------------------------------------- @@ -614,7 +614,7 @@ Update Adaptivity V6.1 1. Support Reapeater mode( for lab test only) 2. Refine test condition, we can't reset EDCCA threshold when interference is exist - + Verification Before Checked-In: 1.N62/N63 buildall ok -------------------------------------------------------------------------------- @@ -625,34 +625,34 @@ Modified Files: Change Notes: 1. IQK remove PMAC for MAC TX hang - + Verification Before Checked-In: 1.N62 build all ok -------------------------------------------------------------------------------- -<2014/06/19 18:40 Stanley Reviewer: Dino > +<2014/06/19 18:40 Stanley Reviewer: Dino > Modified Files: HAL/OUTSRC/rtl8188e/Hal8188ERateAdaptive.c Change Notes: 1. Add dynamic power training mechanism for 8188E - + Verification Before Checked-In: 1.N62 build all ok - + -------------------------------------------------------------------------------- -<2014/06/19 13:20 YuChen Reviewer: LukeLee > +<2014/06/19 13:20 YuChen Reviewer: LukeLee > Modified Files: HAL/OUTSRC/odm.h HAL/OUTSRC/odm_DIG.c Change Notes: 1. Refine Adaptivity to V6.0, fix can't link problem - + Verification Before Checked-In: 1.make all ok -------------------------------------------------------------------------------- -<2014/06/18 14:45 YuChen Reviewer:Luke > +<2014/06/18 14:45 YuChen Reviewer:Luke > Modified Files: OUTSRC/odm.h OUTSRC/odm_DIG.c @@ -662,22 +662,22 @@ Modified Files: Change Notes: 1. Update Adaptivity V6.0 fix SearchPwdBlowerBound() - + Verification Before Checked-In: 1.make all ok -------------------------------------------------------------------------------- -<2014/06/17 18:10 Dino Reviewer:Luke > +<2014/06/17 18:10 Dino Reviewer:Luke > Modified Files: HAL/OUTSRC/odm_AntDiv.c Change Notes: 1. Update the mapping table for 88E antenna diversity - + Verification Before Checked-In: 1.N62 buildall ok -------------------------------------------------------------------------------- -<2014/06/13 18:00 Stanley Reviewer: James> +<2014/06/13 18:00 Stanley Reviewer: James> Modified Files: -Change Notes: +Change Notes: HAL/halDbgCmd.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_ACS.c @@ -685,12 +685,12 @@ Change Notes: 1. Sync. odm_ACS.c with linux driver - Add compile flag for linux driver - Check support ability - + HAL/OUTSRC/odm_DIG.c 1. Sync. odm_DIG.c with linux driver - Fix DIG upper bound before link - Disable forbidden IGI mechanism before link - + HAL/OUTSRC/odm_AntDiv.c HAL/OUTSRC/odm_interface.c HAL/OUTSRC/odm_interface.h @@ -699,12 +699,12 @@ Change Notes: HAL/OUTSRC/odm_RaInfo.h 1. Sync. odm_interface.c - Add ODM_FillH2CCmd interface for linux driver - + Verification Before Checked-In: 1.N62 buildall ok -------------------------------------------------------------------------------- -<2014/06/12 16:45 YuChen> +<2014/06/12 16:45 YuChen> Modified Files: HAL/OUTSRC/odm_DIG.c HAL/OUTSRC/odm_DynamicTxPower.c @@ -715,15 +715,15 @@ Modified Files: HAL/sources.list.WlanS HAL/sources.list.WlanU -Change Notes: - [ODM Reorganization] +Change Notes: + [ODM Reorganization] 1. Update Adaptivity to V5.3 sync with sd4 2. Remove 8723B and 8812A testchip hwimg file - + Verification Before Checked-In: 1.N62/N63 buildall ok -------------------------------------------------------------------------------- -<2014/06/10 18:16 YuChen> +<2014/06/10 18:16 YuChen> Modified Files: HAL/OUTSRC/rtl8188e/HalHWImg8188E_BB.c HAL/OUTSRC/rtl8188e/HalHWImg8188E_MAC.c @@ -738,14 +738,14 @@ Modified Files: HAL/OUTSRC/rtl8188e/MPChip/RF/TxPowerTrack_USB.txt HAL/OUTSRC/rtl8188e/MPChip/RF/TXPWR_LMT.txt -Change Notes: - [8188E] +Change Notes: + [8188E] 1. Update PHY REG V51 - Same content with V50, fix CSV logical error + Same content with V50, fix CSV logical error Verification Before Checked-In: 1.N62/N63 buildAll ok -------------------------------------------------------------------------------- -<2014/06/06 10:35 YuChen> +<2014/06/06 10:35 YuChen> Modified Files: HAL/OUTSRC/rtl8821a/HalHWImg8821A_BB.c HAL/OUTSRC/rtl8821a/HalHWImg8821A_MAC.c @@ -764,60 +764,60 @@ Modified Files: HAL/OUTSRC/rtl8821a/MPChip/RF/TXPWR_LMT_8821A_SAR_5mm.txt HAL/OUTSRC/rtl8821a/MPChip/RF/TXPWR_LMT_8821A_SAR_8mm.txt -Change Notes: - [8821A] +Change Notes: + [8821A] 1. Update PHY REG V41 - 0x1F = 0x00064, RC BW for 80M (for better TX mask) + 0x1F = 0x00064, RC BW for 80M (for better TX mask) Verification Before Checked-In: 1.N62/N63 buildAll ok -------------------------------------------------------------------------------- -<2014/06/04 21:10 Stanley> +<2014/06/04 21:10 Stanley> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_AntDiv.c HAL/OUTSRC/odm_AntDiv.h HAL/OUTSRC/odm_interface.c HAL/OUTSRC/odm_interface.h 1. Modify SW antenna diversity method of 8723B to avoid antenna switch when BT IQK - -Verification Before Checked-In: + +Verification Before Checked-In: 1.N62 buildall ok - + -------------------------------------------------------------------------------- -<2014/06/04 12:35 YuChen> +<2014/06/04 12:35 YuChen> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_DIG.c 1. Refine Adaptivity to V5.1 - -Verification Before Checked-In: + +Verification Before Checked-In: 1.N62/N63 buildall ok -------------------------------------------------------------------------------- -<2014/05/27 21:30 Stanley> +<2014/05/27 21:30 Stanley> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_RaInfo.c 1. Update BT 3.0 HS mode Rssi in odm_RSSIMonitorCheckMP - -Verification Before Checked-In: + +Verification Before Checked-In: 1.N62/N63 buildall ok - + -------------------------------------------------------------------------------- -<2014/05/27 10:10 YuChen> +<2014/05/27 10:10 YuChen> Modified Files: -Change Notes: +Change Notes: HAL/HalDM.c HAL/OUTSRC/odm_DIG.c HAL/OUTSRC/odm_DIG.h HEADER/RegCommon.h 1. Refine check channel plan to enable Adaptivity - -Verification Before Checked-In: + +Verification Before Checked-In: 1.N62/N63 buildall ok ----------------------------------------------------------------------------------------------------- -<2014/05/26 19:20 Stanley> +<2014/05/26 19:20 Stanley> New Files: Modified Files: Change Notes: @@ -1114,7 +1114,7 @@ Verification Before Checked-In: 2. MP buildall OK ----------------------------------------------------------------------------------------------------- -<2014/05/23 20:20 Stanley> +<2014/05/23 20:20 Stanley> Modified Files: Change Notes: HAL/OUTSRC/odm.c @@ -1135,20 +1135,20 @@ Change Notes: Verification Before Checked-In: 1. N62 buildall OK - + ----------------------------------------------------------------------------------------------------- -<2014/04/16 13:35 YuChen> +<2014/04/16 13:35 YuChen> Modified Files: -Change Notes: +Change Notes: OUTSRC/odm_EdcaTurboCheck.c - 1. Sync EdcaTurboCheck function with sd8 and sd4 + 1. Sync EdcaTurboCheck function with sd8 and sd4 Verification Before Checked-In: 1. N62/N63 buildall OK -------------------------------------------------------------------------------- -<2014/04/15 19:30 Luke.Lee> +<2014/04/15 19:30 Luke.Lee> Modified Files: HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/rtl8723a/HalHWImg8723A_BB.c @@ -1162,23 +1162,23 @@ Modified Files: HAL/OUTSRC/rtl8723a/odm_RegConfig8723A.c HAL/OUTSRC/rtl8723a/odm_RegConfig8723A.h -Change Notes: - [8723A] +Change Notes: + [8723A] 1. Update PHY REG V5 format to support Img2HeaderV2 2. Remove dummy files - + Verification Before Checked-In: 1. N62/N63 buildall OK -------------------------------------------------------------------------------- -<2014/04/11 18:15 YuChen> +<2014/04/11 18:15 YuChen> Modified Files: HAL/OUTSRC/odm_DIG.c HAL/OUTSRC/odm_DIG.h HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.c HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.h -Change Notes: +Change Notes: 1. Refine Power Tracking-> RFreg0x55 upper bound is 10, BBSW upper bound is 2dB 2. sync sd4 and sd7 odm_DIG @@ -1186,22 +1186,22 @@ Verification Before Checked-In: 1. N62/N63 buildall OK -------------------------------------------------------------------------------- -<2014/04/10 13:30 Stanley> +<2014/04/10 13:30 Stanley> Modified Files: HAL/OUTSRC/odm.h HAL/OUTSRC/odm_AntDiv.c HAL/OUTSRC/odm_AntDiv.h HAL/OUTSRC/odm_HWConfig.c -Change Notes: +Change Notes: 1. Refine SW antenna diversity mechanism 2. Add antenna diversity by control frame mechanism for RTL8723B\RTL8821A Verification Before Checked-In: 1. N62 buildall OK - + -------------------------------------------------------------------------------- -<2014/04/09 23:45 Luke.Lee> +<2014/04/09 23:45 Luke.Lee> Modified Files: HAL/halDbgCmd.c HAL/halDbgCmd.h @@ -1210,22 +1210,22 @@ Modified Files: HAL/OUTSRC/odm_debug.h HAL/OUTSRC/odm_HWConfig.c -Change Notes: +Change Notes: 1. Add debug message about PHY Reg version, FW version, etc. (cmd 29 29) 2. revise GET_VERSION macro Verification Before Checked-In: 1. N62 buildall OK - + -------------------------------------------------------------------------------- -<2014/04/09 20:50 Stanley> +<2014/04/09 20:50 Stanley> Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_AntDiv.c HAL/OUTSRC/odm_AntDiv.h -Change Notes: +Change Notes: 1. Add reset mechanism for all DM 2. Add reset mechanism for antenna diversity @@ -1233,34 +1233,34 @@ Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------- -<2014/04/09 14:12 YuChen> +<2014/04/09 14:12 YuChen> Modified Files: HAL/OUTSRC/odm_EdcaTurboCheck.c -Change Notes: +Change Notes: 1. Remove dummy code Verification Before Checked-In: 1. N62/N63 buildall OK -------------------------------------------------------------------------------- -<2014/04/09 10:10 YuChen> +<2014/04/09 10:10 YuChen> Modified Files: HAL/OUTSRC/HalPhyRf.c -Change Notes: +Change Notes: 1. return power tracking if efuse thermal base = 0xff Verification Before Checked-In: 1. N62/N63 buildall OK -------------------------------------------------------------------------------- -<2014/04/08 15:50 YuChen> +<2014/04/08 15:50 YuChen> Modified Files: HAL/OUTSRC/odm_EdcaTurboCheck.c HAL/OUTSRC/odm_EdcaTurboCheck.h -Change Notes: +Change Notes: 1. Sync odm_EdcaTurboCheck to exactly same with SD4 @@ -1268,7 +1268,7 @@ Verification Before Checked-In: 1. N62/N63 buildall OK -------------------------------------------------------------------------------- -<2014/04/07 09:45 YuChen> +<2014/04/07 09:45 YuChen> Modified Files: HAL/OUTSRC/HalPhyRf.c HAL/OUTSRC/odm.c @@ -1280,7 +1280,7 @@ Modified Files: HAL/sources.list.WlanS HAL/sources.list.WlanU -Change Notes: +Change Notes: 1. Seperate odm_DynamicBBPowerSaving and related function from odm.c 2. Refine HalPhyRf.c, remove wrong mask @@ -1288,7 +1288,7 @@ Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------- -<2014/04/03 20:10 Luke.Lee> +<2014/04/03 20:10 Luke.Lee> Modified Files: HAL/DESC/Hal8192EETxDesc.c HAL/DESC/Hal8192EUsbTxDesc.c @@ -1300,7 +1300,7 @@ Modified Files: HAL/DESC/Hal8821BETxDesc.c HAL/DESC/Hal8821BUsbTxDesc.c -Change Notes: +Change Notes: 1. [TxBF] disable BW signaling of VHT NPDA to prevent from IOT issue with BCM Verification Before Checked-In: @@ -1308,7 +1308,7 @@ Verification Before Checked-In: -------------------------------------------------------------------------------- -<2014/04/03 17:00 YuChen> +<2014/04/03 17:00 YuChen> Modified Files: HAL/OUTSRC/HalPhyRf.c HAL/OUTSRC/HalPhyRf.h @@ -1327,7 +1327,7 @@ Modified Files: HAL/PHY/HalComPhyCfg.h HAL/PHY/HalJaguarPhyReg.h -Change Notes: +Change Notes: 1. update 8814 test chip PHY_REG v30 2. update 8814 power tracking function @@ -1335,18 +1335,18 @@ Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------- -<2014/03/31 13:40 YuChen> +<2014/03/31 13:40 YuChen> Modified Files: HAL/OUTSRC/odm_DIG.c - -Change Notes: + +Change Notes: 1. Refine adaptivity condition Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------- -<2014/03/28 20:55 Luke.Lee> +<2014/03/28 20:55 Luke.Lee> Modified Files: HAL/EFUSE/Hal8814AEfuse.c HAL/HalDM.c @@ -1370,28 +1370,28 @@ New Files: HAL/OUTSRC/rtl8814a/TestChip/RF/TxPowerTrack.txt HAL/OUTSRC/rtl8814a/TestChip/Version.txt -Change Notes: - [8814A] +Change Notes: + [8814A] 1. Update PHY Reg V29 - 2. PHY init From Header - + 2. PHY init From Header + Verification Before Checked-In: 1.N62 buildall OK 2. 8814AU test OK -------------------------------------------------------------------------------- -<2014/03/28 13:40 James> +<2014/03/28 13:40 James> Modified Files: HAL/OUTSRC/rtl8812a/HalPhyRf_8812A.c 1. Update IQK flow for 2% fail(open RXIQK AGC function & Gain setting & RXIQC Fill) -Change Notes: +Change Notes: Verification Before Checked-In: 1.N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/25 17:00 RS_James> +<2014/03/25 17:00 RS_James> Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h @@ -1399,34 +1399,34 @@ Modified Files: HAL/sources.list.WlanS HAL/sources.list.WlanU -add files: +add files: HAL/OUTSRC/odm_PathDiv.c HAL/OUTSRC/odm_PathDiv.h 1. Seperate odm_PathDiversity and related function from odm.c -Change Notes: +Change Notes: Verification Before Checked-In: 1.N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/24 16:40 James> +<2014/03/24 16:40 James> Modified Files: HAL/OUTSRC/rtl8821a/HalPhyRf_8821A.c 1. Update IQK flow for 2% fail(average two LNA result for RXIQK) -Change Notes: +Change Notes: Verification Before Checked-In: 1.N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/24 11:50 Stanley> +<2014/03/24 11:50 Stanley> Modified Files: HAL/OUTSRC/OutputHWImg.bat 1. RTL8723B use Image2HeaderV2.exe - + HAL/OUTSRC/rtl8723b/HalHWImg8723B_BB.c HAL/OUTSRC/rtl8723b/HalHWImg8723B_BB.h HAL/OUTSRC/rtl8723b/HalHWImg8723B_FW.h @@ -1439,13 +1439,13 @@ Modified Files: HAL/OUTSRC/rtl8723b/MPChip/Version.txt 1. Update MP Parameter to RTL8723B_MP_Parameter_D-cut_v10_20140324 -Change Notes: +Change Notes: Verification Before Checked-In: 1.N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/20 22:10 Luke> +<2014/03/20 22:10 Luke> Modified Files: HAL/HalDM.c HAL/OUTSRC/odm.h @@ -1496,8 +1496,8 @@ Remove Files: HAL/OUTSRC/rtl8821b/TestChip/RF/TXPWR_LMT_8811AU_IPA.txt HAL/OUTSRC/rtl8821b/TestChip/RF/TXPWR_LMT_8821A.txt -Change Notes: - [8821B] +Change Notes: + [8821B] 1. Update Testchip PHY Reg V14 2. Disable DM @@ -1506,35 +1506,35 @@ Verification Before Checked-In: ----------------------------------------------------------------------------------------------------- -<2014/03/14 17:50 James> +<2014/03/14 17:50 James> Modified Files: HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.c -Change Notes: +Change Notes: 1.Lanch to Stand-by mode when IQK in porgessing - + Verification Before Checked-In: 1.N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/12 17:50 Stanley> +<2014/03/12 17:50 Stanley> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h 1.Add odm_UpdatePowerTrainingState() to disable power training when noisy environment 2.Retransmit H2C command when power training state is changed - + HAL/halDbgCmd.c 1.Add debug command to force power training state - + HAL/OUTSRC/odm_DIG.c HAL/OUTSRC/odm_DIG.h HAL/OUTSRC/odm_RegDefine11AC.h 1.Seperate NHM setting and report from odm_NHMBBInit() and NHMBB() 2.Add CCA conuter report in odm_FalseAlarmCounterStatistics() for 11ac series - + HAL/Jaguar/Hal8812MultiRate.c HAL/rtl8188E/Hal8188ECom.c HAL/rtl8192C/Hal8192CCom.c @@ -1542,23 +1542,23 @@ Change Notes: HAL/rtl8723B/Hal8723BCom.c HAL/rtl8814A/Hal8814ACom.c HAL/rtl8821B/Hal8821BMultiRate.c - 1.Disable power training when noisy environment + 1.Disable power training when noisy environment Verification Before Checked-In: 1.N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/12 11:00 YuChen> +<2014/03/12 11:00 YuChen> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_precomp.h HAL/sources.list.WlanE HAL/sources.list.WlanS HAL/sources.list.WlanU -add files +add files HAL/OUTSRC/odm_EdcaTurboCheck.c HAL/OUTSRC/odm_EdcaTurboCheck.h @@ -1569,9 +1569,9 @@ Verification Before Checked-In: ----------------------------------------------------------------------------------------------------- -<2014/03/07 10:39 James> +<2014/03/07 10:39 James> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/rtl8188e/HalHWImg8188E_BB.c HAL/OUTSRC/rtl8188e/MPChip/BB/PHY_REG_1T.txt @@ -1590,7 +1590,7 @@ Change Notes: HAL/OUTSRC/rtl8192e/MPChip/RF/TxPowerTrack_PCIE.txt HAL/OUTSRC/rtl8192e/MPChip/RF/TxPowerTrack_USB.txt HAL/OUTSRC/rtl8192e/MPChip/RF/TXPWR_LMT.txt - + 1. Update 92E PHY reg pacakge to v28 2. Using 92E_PCIE power tracking table on 92E_SDIO interface 3. Update 88E PHY reg pacakge to v48 @@ -1600,65 +1600,65 @@ Verification Before Checked-In: ----------------------------------------------------------------------------------------------------- -<2014/03/04 21:19 James> +<2014/03/04 21:19 James> Modified Files: -Change Notes: +Change Notes: OUTSRC/rtl8814a/HalPhyRf_8814A.c - 1. [8814A] add Path B/C/D RF Backup in IQK + 1. [8814A] add Path B/C/D RF Backup in IQK Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/03/04 11:30 YuChen> +<2014/03/04 11:30 YuChen> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_DIG.c HAL/OutSRC/odm.h 1. [ODM] Adaptivity Refine a.rename odm_DynamicAdjustAdaptivtiyThreshold to odm_SearchPwdBLowerBound - b.remove False alarm detect in odm_NHMBB() - c.refine odm_PauseDIG() to prevent scan insert during adaptivity odm_SearchPwdBLowerBound processing + b.remove False alarm detect in odm_NHMBB() + c.refine odm_PauseDIG() to prevent scan insert during adaptivity odm_SearchPwdBLowerBound processing Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/02/26 15:20 Lanhsin> +<2014/02/26 15:20 Lanhsin> Modified Files: -Change Notes: +Change Notes: HAL/PHY/Hal8814APhyCfg.c 1. Update to WB-20140226-YN-RLE0572B+user+guide+for+BB+functions-R18. Verification Before Checked-In: 1. N63/MP buildall OK ----------------------------------------------------------------------------------------------------- -<2014/02/26 13:30 James> +<2014/02/26 13:30 James> Modified Files: odm_HWConfig.c - -Change Notes: + +Change Notes: 1. [8189ES] Add power tracking table for 8189ES (the table is same as PCIE & USB table, suggest by RF Dennis) Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/02/24 20:45 Stanley> +<2014/02/24 20:45 Stanley> Modified Files: HAL/OUTSRC/odm.c - -Change Notes: + +Change Notes: 1. [8814A] Modify the offset of crystal cap. for ATC Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<2014/02/07 17:00 MH_C> +<2014/02/07 17:00 MH_C> Modified Files: -Change Notes: +Change Notes: 1. Allow ODM group to check in trunk code. Verification Before Checked-In: diff --git a/network/wlan/WDI/HAL/phydm/development_note2012.txt b/network/wlan/WDI/HAL/phydm/development_note2012.txt index a5b3b057e..880e2e3e1 100644 --- a/network/wlan/WDI/HAL/phydm/development_note2012.txt +++ b/network/wlan/WDI/HAL/phydm/development_note2012.txt @@ -6,14 +6,14 @@ Modified Files: Change Notes: 1. Fix the coding error of 92E Power tracking in assigning pathA/B CCK-11M TX power - + Verification Before Checked-In: 1. N62 build all ok ----------------------------------------------------------------------------------------------------- -<2014/04/18 19:00 James> +<2014/04/18 19:00 James> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_debug.c HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.c HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.h @@ -22,17 +22,17 @@ Change Notes: HAL/rtl8814A/Hal8814ACom.c HAL/rtl8814A/rtl8814as/Hal8814ASdioGen.c 1. Refine 8814A IQK function - + Verification Before Checked-In: 1. N62/N63 buildall OK 2. Mp buildall OK ----------------------------------------------------------------------------------------------------- -<08/08/2012 19:50 LukeLee> +<08/08/2012 19:50 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Merge WIN Trunk v2908 2. [8812A] Update MAC_PHY Reg V021 for MP chip @@ -41,7 +41,7 @@ Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/08/2012 13:45 LukeLee> +<08/08/2012 13:45 LukeLee> Modified Files: HAL/OUTSRC/odm_debug.c @@ -62,7 +62,7 @@ Modified Files: HAL/rtl8188E/Hal8812Firmware.c -Change Notes: +Change Notes: 1. [8723A] Update MAC_PHY_REG v001 2. [8821A] Update FW v001 @@ -71,7 +71,7 @@ Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/07/2012 20:55 LukeLee> +<08/07/2012 20:55 LukeLee> Modified Files: HAL/OUTSRC/rtl8188e/BB/AGC_TAB_1T.txt @@ -81,7 +81,7 @@ Modified Files: HAL/OUTSRC/rtl8188e/MAC/MAC_REG.txt HAL/OUTSRC/rtl8188e/RF/RadioA_1T.txt -Change Notes: +Change Notes: 1. [8188E] Update MAC_PHY_REG v035 @@ -89,7 +89,7 @@ Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/07/2012 19:50 LukeLee> +<08/07/2012 19:50 LukeLee> Modified Files: HAL/OUTSRC/rtl8812a/BB/AGC_TAB.txt @@ -107,7 +107,7 @@ Modified Files: HAL/OUTSRC/rtl8821a/MAC/MAC_REG.txt HAL/OUTSRC/rtl8821a/RF/RadioA.txt -Change Notes: +Change Notes: 1. [8812A] Update MAC_PHY_REG v021 2. [8821A] Update MAC_PHY_REG v006 @@ -115,10 +115,10 @@ Change Notes: Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/06/2012 11:40 LukeLee> +<08/06/2012 11:40 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Merge WIN Trunk v2897 2. Update Img2Header.exe @@ -127,7 +127,7 @@ Verification Before Checked-In: 1. N62/N5 buildall OK ----------------------------------------------------------------------------------------------------- -<07/31/2012 17:10 LukeLee> +<07/31/2012 17:10 LukeLee> Modified Files: \rtl8812a\BB\AGC_TAB.c @@ -138,7 +138,7 @@ Modified Files: \rtl8812a\HalHWImg8812A_TestChip_BB.c \rtl8812a\HalHWImg8812A_TestChip_RF.c -Change Notes: +Change Notes: 1. [8812A] Update MAC_PHY_REG v20 @@ -158,20 +158,20 @@ Change Notes: Verification Before Checked-In: 1. N63 buildall ok. ----------------------------------------------------------------------------------------------------- -<07/31/2012 11:35 Georgia> +<07/31/2012 11:35 Georgia> Modified Files: -Change Notes: +Change Notes: 1. Fixed incorrect data rate in wireless BG mode. Verification Before Checked-In: 1. 8188EUS CE driver test OK. ----------------------------------------------------------------------------------------------------- -<07/30/2012 12:25 LukeLee> +<07/30/2012 12:25 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Fix compile error of ODM v364 @@ -179,10 +179,10 @@ Verification Before Checked-In: 1. N62/N5 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/30/2012 13:50 LukeLee> +<07/30/2012 13:50 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Merge Trunk V2285 @@ -190,9 +190,9 @@ Verification Before Checked-In: 1. N62/N5 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/23/2012 15:50 Kordan> +<07/23/2012 15:50 Kordan> Modified Files: -Change Notes: +Change Notes: 1. Update Image2Header: a. A single-line comment is now allowable with if-else body. b. Bug fixed: #endif is missed when translating FW_AP.bin. @@ -200,12 +200,12 @@ Change Notes: Verification Before Checked-In: 1. Translation OK. - + ----------------------------------------------------------------------------------------------------- -<07/23/2012 15:50 Kordan> +<07/23/2012 15:50 Kordan> Modified Files: -Change Notes: +Change Notes: 1. Update Image2Header: a. A single-line comment is now allowable with if-else body. b. Bug fixed: #endif is missed when translating FW_AP.bin. @@ -213,9 +213,9 @@ Change Notes: Verification Before Checked-In: 1. Translation OK. - + ----------------------------------------------------------------------------------------------------- -<07/19/2012 16:06 LukeLee> +<07/19/2012 16:06 LukeLee> Modified Files: /rtl8188e/Hal8188ERateAdaptive.c @@ -256,16 +256,16 @@ Removed Files: HalComDMOutSrc.c HalComDMOutSrc.h -Change Notes: +Change Notes: - 1. Replace ODM_MP with ODM_WIN + 1. Replace ODM_MP with ODM_WIN 2. Remove redundancy files Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/18/2012 15:45 LukeLee> +<07/18/2012 15:45 LukeLee> Modified Files: /rtl8188e/BB/AGC_TAB_1T.txt @@ -276,17 +276,17 @@ Modified Files: /rtl8812a/HalHWImg8188E_BB.c /rtl8812a/HalHWImg8188E_FW.c -Change Notes: +Change Notes: 1. [8188E] Release MAC_PHY_Reg V033 2. Img2Header.exe has problem, must add #endif in the end of HalHWImg8188E_FW.c - + Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/17/2012 23:15 LukeLee> +<07/17/2012 23:15 LukeLee> Modified Files: /rtl8812a/BB/AGC_TAB.txt @@ -299,46 +299,46 @@ Modified Files: /rtl8812a/HalHWImg8812A_BB_testchip.c /rtl8812a/HalHWImg8812A_RF_testhcip.c -Change Notes: +Change Notes: 1. [8812A] Release MAC_PHY_Reg V019 - + Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/17/2012 17:47 NeilChen> +<07/17/2012 17:47 NeilChen> Modified Files: odm.c odm_interface.c -Change Notes: +Change Notes: - 1. Initialize SW Antenna diversity ANT flag by efuse PG Setting for all + 1. Initialize SW Antenna diversity ANT flag by efuse PG Setting for all 8723A Series IC MP 2. Fix H2C cmd Issue in odm_interface.c - + Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/11/2012 19:18 NeilChen> +<07/11/2012 19:18 NeilChen> Modified Files: odm.c hal\rtl8192c\rtl8192ce\hal8192CEGen.c -Change Notes: +Change Notes: 1.Fix 8723A SW ANT DIV Bug in MP temporality - + Verification Before Checked-In: 1. N62 buildall OK. 2. 8723AS_VAU testing OK ------------------------------------------------------------------------------------------------------ -<07/11/2012 17:45 Luke.Lee> +<07/11/2012 17:45 Luke.Lee> Modified Files: - /rtl8812a/RF/RadioA.txt + /rtl8812a/RF/RadioA.txt /rtl8812a/RF/RadioB.txt /rtl8812a/HalHWImg8812A_RF.c /rtl8812a/HalHWImg8812A_TestChip_RF.c @@ -346,9 +346,9 @@ Modified Files: odm_precomp.h odm_types.h -Change Notes: +Change Notes: - /OUTSRC/*.c, *.h + /OUTSRC/*.c, *.h 1.[8812A] revise PHY Reg files /HAL/rtl8188E/Hal8812Firmware.c @@ -356,27 +356,27 @@ Change Notes: /HAL/rtl8192C/Hal8192CFirmware.c 3.[8723A] add back ODM v344 feature - + Verification Before Checked-In: 1. N62 buildall OK. 2. 8812AE vs 8812AP DL:280Mbps, UL:330Mbps - 3. 8812AE vs 8812AE AdHoc 400Mbps(force 2SS MCS6) + 3. 8812AE vs 8812AE AdHoc 400Mbps(force 2SS MCS6) ------------------------------------------------------------------------------------------------------ -<07/10/2012 16:40 Luke.Lee> -Modified Files: +<07/10/2012 16:40 Luke.Lee> +Modified Files: + +Change Notes: -Change Notes: - 1.Copy Merge_Temp v2836 except OUTSRC - + Verification Before Checked-In: - 1. N62 buildall OK. + 1. N62 buildall OK. ------------------------------------------------------------------------------------------------------ -<07/09/2012 14:30 Luke.Lee> -Modified Files: +<07/09/2012 14:30 Luke.Lee> +Modified Files: /8812a/HalHWImg8812A_BB.c /8812a/HalHWImg8812A_BB.h @@ -394,31 +394,31 @@ Modified Files: odm_types.h -Change Notes: - +Change Notes: + 1.[8812A] Modify Reg Init Flow (Currently is TestChip only) - + Verification Before Checked-In: - 1. N62 buildall OK. + 1. N62 buildall OK. ------------------------------------------------------------------------------------------------------ -<07/06/2012 15:00 Luke.Lee> -Modified Files: +<07/06/2012 15:00 Luke.Lee> +Modified Files: HAL/OUTSRC/HalPhyRf.c HAL/OUTSRC/HalPhyRf.h HAL/OUTSRC/odm_precomp.h HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.h -Change Notes: - +Change Notes: + 1.Remove AP compile error - + Verification Before Checked-In: 1. N5/N62 buildall OK. - 2. AP compile OK + 2. AP compile OK ----------------------------------------------------------------------------------------------- +---------------------------------------------------------------------------------------------- <07/06/2012 15:00 lena_yang> New Files: Modified Files: @@ -430,45 +430,45 @@ Verification Before Checked-In: ------------------------------------------------------------------------------------------------------ -<07/06/2012 14:30 Cherry> -Modified Files: -Change Notes: - +<07/06/2012 14:30 Cherry> +Modified Files: +Change Notes: + HAL\HalDM.c HAL\OUTSRC\odm.c - 1. Enable 8812 EDCA TUREBO mode. - + 1. Enable 8812 EDCA TUREBO mode. + Verification Before Checked-In: - 1. N5/N62 buildall OK. + 1. N5/N62 buildall OK. ------------------------------------------------------------------------------------------------------ <07/06/2012 10:40 Mingzhi> New Files: -Modified Files: +Modified Files: odm.c Change Notes: 1. modify EDCA turbo for MP - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. ---------------------------------------------------------------------------------------------- <07/04/2012 14:30 Kordan> New Files: -Modified Files: +Modified Files: HAL/rtl8188E/rtl8188ee/Hal8188EEGen.c HAL/rtl8188E/rtl8188es/Hal8188ESdioGen.c Change Notes: 1. Fix compilation error. - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. - + ------------------------------------------------------------------------------------------- -<07/03/2012 17:00 Kordan> -Modified Files: +<07/03/2012 17:00 Kordan> +Modified Files: HAL/OUTSRC/HalPhyRf.c HAL/OUTSRC/HalPhyRf.h HAL/OUTSRC/rtl8812a/HalPhyRf_8812A.c @@ -478,25 +478,25 @@ Modified Files: HAL/rtl8188E/rtl8188es/Hal8188ESdioGen.c PLATFORM/NDIS5/N5C_Req.c -Change Notes: +Change Notes: 1. Implement 8812A IQK prototype. Verification Before Checked-In: 1. MP Buildall ok. 2. For test only. - + ------------------------------------------------------------------------------------------- -<06/25/2012 21:25 LukeLee> Modified Files: +<06/25/2012 21:25 LukeLee> Modified Files: odm.c -Change Notes: +Change Notes: 1. [8723A]modify odm_CommonInfoSelfInit() to enable SW AntDiv Verification Before Checked-In: 1. WIN N62 Buildall ok. ------------------------------------------------------------------------------------------- -<06/22/2012 18:30 LukeLee> Modified Files: +<06/22/2012 18:30 LukeLee> Modified Files: rtl8188e\HalHWImg8188E_BB.c rtl8188e\HalHWImg8188E_FW.c rtl8188e\HalHWImg8188E_FW.h @@ -504,25 +504,25 @@ Verification Before Checked-In: rtl8188e\HalHWImg8188E_RF.c rtl8188e\BB\PHY_REG_1T.txt -Change Notes: +Change Notes: 1. [88E]release 88E MAC_PHY_REG v032 for default ant setting Verification Before Checked-In: 1. WIN N62 Buildall ok. ------------------------------------------------------------------------------------------- -<06/22/2012 14:36 NeilChen> Modified Files: +<06/22/2012 14:36 NeilChen> Modified Files: odm.c odm.h Hal8192CFirmware.c -Change Notes: +Change Notes: 1. Fix PSD for BT3.0 TP issue 2. if BT3.0 is running, PSD scan times will be to decrease Verification Before Checked-In: 1. WIN N5 Buildall ok. 2. 8723AE Testing OK. -------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------- <06/22/2012 14:25 button> Modified Files: OUTSRC/rtl8188e/HalPhyRf_8188e.c @@ -535,102 +535,102 @@ Verification Before Checked-In: 1. AP platform compile ok. ------------------------------------------------------------------------------------------ <06/19/2012 19:40 Alexchou> -Modified Files: - +Modified Files: + OUTSRC/rtl8812a/FW/FW_NIC.BIN OUTSRC/rtl8812a/FW/FW_WoWLAN.BIN OUTSRC/rtl8812a/HalHWImg8812A_FW.c OUTSRC/rtl8812a/HalHWImg8812A_FW.h - -Change Notes: + +Change Notes: 1. Update 8812 testchip formal firmware V0003. - + Verification Before Checked-In: 1. ImgTransfer ok. - + ------------------------------------------------------------------------------------------- <06/18/2012 16:50 NeilChen> -Modified Files: +Modified Files: odm.c odm.h odm_RTL8188E.h HalDMOutSrc8192C_AP.c - HalDMOutSrc8192C_CE.c - -Change Notes: - 1. To integrate ANT definition for SW ANT DIV and ANT detect of ODM + HalDMOutSrc8192C_CE.c + +Change Notes: + 1. To integrate ANT definition for SW ANT DIV and ANT detect of ODM mechanism 2. MAIN_ANT is use to replace Antenna_A and ANT_Main - 3. AUX_ANT is use to replace Antenna_B and ANT_Aux - + 3. AUX_ANT is use to replace Antenna_B and ANT_Aux + Verification Before Checked-In: 1.WIN N5 Buildall ok. - + ------------------------------------------------------------------------------------------- <06/13/2012 16:30 Georgia> -Modified Files: +Modified Files: rtl8188e/HalHWImg8188E_FW.c -Change Notes: +Change Notes: 1. Fixed symbol:Array_8188E_FW_NIC undefine error for 88E. - + Verification Before Checked-In: 1.CE DRV make all ok. 1.WIN N5 buildall ok. - + ------------------------------------------------------------------------------------------- <06/13/2012 15:30 Georgia> -Modified Files: +Modified Files: rtl8188e/HalPhyRf_8188e.c -Change Notes: +Change Notes: 1. Fixed compile error for CE Platform. - + Verification Before Checked-In: 1.CE DRV make all ok. - + -------------------------------------------------------------------------------------------- <06/11/2012 21:00 LukeLee> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: HAL\OUTSRC\odm.c 1. Revise Single/Dual Ant Detection for 88C - + Verification Before Checked-In: 1. WIN N62 buildall ok. - 2. 88CE ant detection OK + 2. 88CE ant detection OK -------------------------------------------------------------------------------------------- <06/08/2012 16:12 James> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: 1. Update 8812 BB/MAC/RF parameters to V13 - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. 2. 8812AU XP scan ok. 8812AU link with WPA-2 AES AP ok. -------------------------------------------------------------------------------------------- <06/07/2012 16:04 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: HAL\OUTSRC\odm.c 1. Remove 8812 DM init return. - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. - 2. 8812AU win7 scan ok. 8812AU signal strength display ok. - + 2. 8812AU win7 scan ok. 8812AU signal strength display ok. + -------------------------------------------------------------------------------------------- <06/06/2012 19:04 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: COMMON &\HAL\Non-ODM & PLATFORM 1. Merge from windows driver trunk v2764-2766. Support 8812AU dual band scan. - - + + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. - 2. 8812AE/AU win7 scan ok. 8812AU reload test for 100 rounds ok. + 2. 8812AE/AU win7 scan ok. 8812AU reload test for 100 rounds ok. 3. 88CU win7 simple test ok. S3/S4/Reload/ Unlpg ok. -------------------------------------------------------------------------------------------- @@ -652,22 +652,22 @@ Modified Files: rtl8723a/HalHWImg8723A_MAC.c rtl8723a/HalHWImg8723A_RF.c rtl8723a/odm_RegConfig8723A.c - -Change Notes: + +Change Notes: 1. Fix compile error. - + Verification Before Checked-In: 1. CE Platform ,make all ok. -------------------------------------------------------------------------------------------- <06/06/2012 19:04 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: COMMON &\HAL\Non-ODM & PLATFORM 1. Merge from windows driver trunk v2744-2763. ODM 1. Revise compile error for windows driver. - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. 2. 8812AE/AU win7 scan ok. 8812AU reload test for 100 rounds ok. @@ -677,7 +677,7 @@ Verification Before Checked-In: -------------------------------------------------------------------------------------------- <06/06/2012 15:44 Georgia> -Modified Files: +Modified Files: HalPhyRf.c odm.c odm.h @@ -704,8 +704,8 @@ Modified Files: rtl8723a/HalHWImg8723A_MAC.c rtl8723a/HalHWImg8723A_RF.c rtl8723a/odm_RegConfig8723A.c - -Change Notes: + +Change Notes: 1. Add RefreshRAMask for CE platform. 2. Move releated marco of TX_RPT prasing to Hal8188ERateAdaptive.h. 3. Change data type of ODM_PHY_INFO_T - RxPWDBAll to u1Byte. @@ -716,25 +716,25 @@ Verification Before Checked-In: 2. 88EUS/89ES auto-test ok. -------------------------------------------------------------------------------------------- <06/06/2012 14:35 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: Merge from 2718 to 2743. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EE ping ok. But s4/reload fail!!?. -------------------------------------------------------------------------------------------- <06/06/2012 14:15 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: COMMON &\HAL\Non-ODM & PLATFORM 1. Merge from windows driver trunk v2718-2743. HAL\OUTSRC\rtl8812a\BB\AGC_TAB.txt.... 1. Use MP trunk driver HW parameters to replace ODM\MP parameters and scan ok. 2. Use new img2header to transfer MP trunk 8812 parametes. 3. RF delay pattern change back to 0xFE?? or 0xFFE?? - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. 2. 8812AE/AU win7 scan ok. @@ -744,39 +744,39 @@ Verification Before Checked-In: -------------------------------------------------------------------------------------------- <06/04/2012 21:55 Gimmy> -Deleted Files: +Deleted Files: \HAL\OUTSRC\rtl8188e\FW\RTL8188EFW_A_CUT_T.BIN -Change Notes: +Change Notes: 1. delete \HAL\OUTSRC\rtl8188e\FW\RTL8188EFW_A_CUT_T.BIN - + Verification Before Checked-In: 1. NONE. 2. ImgTransfer ok. -------------------------------------------------------------------------------------------- <06/04/2012 20:35 LukeLee> -Modified Files: +Modified Files: \rtl8188e\BB\PHY_REG_1T.txt \rtl8188e\HalHWImg8188E_BB.c \rtl8188e\HalHWImg8188E_FW.c \rtl8188e\HalHWImg8188E_FW.h \rtl8812a\HalHWImg8812A_BB.c -Change Notes: +Change Notes: 1. [88E]Release MAC_PHY_REG v031 for BB swing issue 2. [8812A] manually add "0" to patch Img2Header.exe bug - + Verification Before Checked-In: 1. N62 buildall OK 2. 88EE BB QC test OK --------------------------------------------------------------------------------------------- <06/04/2012 14:45 Gimmy> -New Files: +New Files: HAL/OUTSRC/rtl8188e/FW/FW_AP.BIN -Modified Files: +Modified Files: HAL/OUTSRC/rtl8188e/FW/FW_NIC.BIN HAL/OUTSRC/rtl8188e/FW/FW_WoWLAN.BIN HAL/OUTSRC/rtl8188e/HalHWImg8188E_FW.c @@ -785,76 +785,76 @@ Modified Files: Change Notes: 1. Update 88E formal firmware. V004. - + Verification Before Checked-In: 1. NONE. 2. ImgTransfer ok. -------------------------------------------------------------------------------------------- <06/01/2012 20:00 LukeLee> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c -Change Notes: +Change Notes: 1. [88E]Fix TP bad issue caused by V321 - + Verification Before Checked-In: 1. N62 buildall OK 2. 88EE TP test OK -------------------------------------------------------------------------------------------- <06/01/2012 18:50 LukeLee> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_RegDefine11AC.h HAL/OUTSRC/odm_RegDefine11N.h -Change Notes: +Change Notes: 1. Define bCckHighPower & RFPathRxEnable for Jaguar series 2. Revise if/else conidition of odm_HwAntDiv and odm_SwAntDivChkAntSwitch - + Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------------------- <05/30/2012 22:10 LukeLee> -Modified Files: +Modified Files: HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm.c -Change Notes: +Change Notes: 1. Modify odm_RxPhyStatusJaguarSeries_Parsing() 2. Add Back compile flag in Odm.c for CE team - - + + Verification Before Checked-In: 1. N62 buildall OK 2. 88EE Ad-Hoc ping OK, RSSI report OK -------------------------------------------------------------------------------------------- <05/30/2012 21:26 Alexchou> -Modified Files: -Change Notes: - +Modified Files: +Change Notes: + rtl8812a/FW/FW_NIC.BIN rtl8812a/HalHWImg8812A_FW.c rtl8812a/HalHWImg8812A_FW.h rtl8812a/FW/FW_WoWLAN.BIN 1. update 8812 testchip fw v0002 for new Img2header.exe - + rtl8812a/FW/RTL8812FW_Test_T.BIN rtl8812a/HalHWImg8812A_TestChip_FW.c rtl8812a/HalHWImg8812A_TestChip_FW.h 1. remove unused files - - + + Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/30/2012 20:17 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: COMMON\TransmitDesc.c 1. Support new ODM relative AID for luke. HAL\DESC @@ -862,16 +862,16 @@ Change Notes: HAL\ODM 1. Revise for PHY query inRX side and TX side TXFILLDESC. HAL\HalDM.c - - + + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU simple test ok. AP mode RSSI parsing ok. But vwifi fail. -------------------------------------------------------------------------------------------- <05/30/2012 17:40 Kordan> -Modified Files: -Change Notes: +Modified Files: +Change Notes: 1. Support 8188E/8812A MAC, BB, RF, and FW configuration. Buildrtwe.bat Buildrtws.bat @@ -894,7 +894,7 @@ Change Notes: HAL/sources.list.WlanE HAL/sources.list.WlanS HAL/sources.list.WlanU - + 2. Minor bug fixed and some improvement on Image2Header. 3. Supports batch conversion. HAL/OUTSRC/Image2Header.exe @@ -904,69 +904,69 @@ Change Notes: HAL/PHY/Hal8192CPhyCfg.c HAL/OUTSRC/OutputHWImg.bat - 4. Fix compilation error and revise the code of 88E ODM power tracking. + 4. Fix compilation error and revise the code of 88E ODM power tracking. HAL/MPT/MPT_Bt.c HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.h - + Verification Before Checked-In: 1. N5/N62/MP buildall OK. 2. 88EE MP T/Rx ok. - 3. The PHY reg package of both 8188E and 8812A might be wrong, + 3. The PHY reg package of both 8188E and 8812A might be wrong, please update the PHY reg and convert again from scratch. -------------------------------------------------------------------------------------------- <05/30/2012 17:05 Alexchou> -Modified Files: -Change Notes: +Modified Files: +Change Notes: rtl8812a/FW/RTL8812FW_Test_T.BIN rtl8812a/HalHWImg8812A_TestChip_FW.c 1. update 8812 testchip fw v0002 - + Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/30/2012 15:05 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: 1. DESC relative code to fix PHY query status. 2. ODM DIG MP abort case revise. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU simple test ok. -------------------------------------------------------------------------------------------- <05/30/2012 13:10 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: Remove MP relative cofr out of ODM folder. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU ping ok. -------------------------------------------------------------------------------------------- <05/29/2012 21:10 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: Windows Driver relative RXdesc resive 1. ODM pHY status query must input raw data. 2. Add GPL declaration for MP_Precomp.h 3. Revise ODM data structure defintion. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU ping ok. -------------------------------------------------------------------------------------------- <05/29/2012 17:00 Alexchou> -Modified Files: +Modified Files: Change Notes: rtl8195/ 1. deleted rtl8195 folder - + rtl8812a/ rtl8812a/BB/ rtl8812a/FW/ @@ -978,40 +978,40 @@ Change Notes: 1. Create rtl8812a relative folders. 2. update 8812 testchip fw v0001 - + Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/23/2012 17:28 MH_Chen> -Modified Files: +Modified Files: Change Notes: ODM relative file. 1. Add MP driver MP_Precomp.h to increase compile speed. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 92CU/92DU/8723AU/88EU simple test ok. -------------------------------------------------------------------------------------------- <05/23/2012 14:54 MH_Chen> -Modified Files: +Modified Files: Change Notes: HAL\DESC\Hal8192CRxDesc.c 1. Fix ODM PHY & packet info strcucture for 92C &8812 seies. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 92CU simple test ok. -------------------------------------------------------------------------------------------- <05/22/2012 22:40 MH_Chen> -Modified Files: +Modified Files: Change Notes: HAL\DESC\Hal8188ERxDesc.c HAL\DESC\Hal8812Desc.c HAL\OUTSRC\odm_HWConfig.c 1. Revise ODM PHY & packet info strcucture to fix 88E serries PHy query. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88EU simple test ok. @@ -1035,11 +1035,11 @@ Modified Files: Change Notes: 1. Prevent from "warning: no newline at end of file" 2. Fix comile error for CE Platform - + Verification Before Checked-In: 1. Make all ok. 2. 88EU auto-test ok. - + -------------------------------------------------------------------------------------------- <05/17/2012 11:40 LukeLee> Modified Files: @@ -1117,14 +1117,14 @@ Modified Files: Change Notes: 1. Support power tracking in AP platform 2. Refine RA threshold for AP - 3. Fix STA array number + 3. Fix STA array number Verification Before Checked-In: 1. AP buildall OK. -------------------------------------------------------------------------------------------- -<05/12/2012 12:30 LukeLee> -Modified Files: +<05/12/2012 12:30 LukeLee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\rtl8188e\odm_RTL8188E.c @@ -1136,31 +1136,31 @@ Modified Files: HAL\DESC\Hal8188ESdioTxDesc.c Change Notes: - 1. [88E]Enable CCK AntDiv and fix some AntDiv bugs - + 1. [88E]Enable CCK AntDiv and fix some AntDiv bugs + Verification Before Checked-In: 1. N62 buildall OK. 2. 88EE DL:53Mbps UL:49Mbps 88EU DL:51Mbps UL:47Mbps -------------------------------------------------------------------------------------------- <05/10/2012 16:00 MH_Chen> -New Files: -Modified Files: +New Files: +Modified Files: Change Notes: - 1. Merge from MP driver V2680 to V2685. - + 1. Merge from MP driver V2680 to V2685. + Verification Before Checked-In: 1. N5/N62 buildall OK. 2. 88EU ping ok S3/S4/reload/unplug ok. -------------------------------------------------------------------------------------------- <05/08/2012 23:00 MH_Chen> -New Files: -Modified Files: +New Files: +Modified Files: Change Notes: 1. Merge from MP driver V2560 to V2671. Many modification hard to describe.~~!! Please refer to MP driver lable v2560-2671. - + Verification Before Checked-In: 1. N5/N6/N62 buildall OK. 2. 88EU ping ok S3/S4/reload/unplug ok. @@ -1172,11 +1172,11 @@ Modified Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\BB\PHY_REG_1T.txt -Change Notes: +Change Notes: 1. remove compile error - 2. [88E] Update MAC_PHY_REG V030 for change RX default ant to CG + 2. [88E] Update MAC_PHY_REG V030 for change RX default ant to CG -Verification Before Checked-In: +Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------------------- @@ -1185,13 +1185,13 @@ Modified Files: HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm_types.h -Change Notes: +Change Notes: 1. Add two definitions in RT_SPINLOCK_TYPE. 2. [88E] Support PHY_REG_MP.txt configuration.(But disabled now) -Verification Before Checked-In: +Verification Before Checked-In: 1. None - + -------------------------------------------------------------------------------------------- <05/07/2012 11:40 LukeLee> Modified Files: @@ -1201,10 +1201,10 @@ Modified Files: Removed Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_MP.txt -Change Notes: +Change Notes: 1. [88E]Update right MAC_PHY_REG V029 (remove PHY_REG_MP.txt) -Verification Before Checked-In: +Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------------------- @@ -1214,10 +1214,10 @@ New Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.h -Change Notes: +Change Notes: 1. [88E]Update MAC_PHY_REG V029 for power by rate -Verification Before Checked-In: +Verification Before Checked-In: 1. 88EE RX:99Mbps, TX:83.5Mbps -------------------------------------------------------------------------------------------- @@ -1225,10 +1225,10 @@ Verification Before Checked-In: New Files: HEADER\RegCommon.h -Change Notes: +Change Notes: 1. [88E]Modify registry AntennaDivType -Verification Before Checked-In: +Verification Before Checked-In: 1. 88EE RX:98Mbps, TX:84Mbps 2. 88EE antenna diversity enable OK @@ -1238,16 +1238,16 @@ New Files: HAL\OUTSRC\odm_RegDefine11AC.h HAL\OUTSRC\odm_RegDefine11N.h -Change Notes: +Change Notes: 1. fix compile error -Verification Before Checked-In: +Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/03/2012 16:00 LukeLee> New Files: -Modified Files: +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\odm_interface.h @@ -1258,32 +1258,32 @@ New Files: HAL\OUTSRC\odm_RegDefine11AC.h HAL\OUTSRC\odm_RegDefine11N.h -Change Notes: +Change Notes: 1. [8812] Reg Define and DIG modified 2. restrict dynamic functions for 11AC series 3. Add SupportICtype ODM_RTL8812 - 4. enable odm_DynamicEDCCA() for all 11N series + 4. enable odm_DynamicEDCCA() for all 11N series -Verification Before Checked-In: +Verification Before Checked-In: 1. Buildall OK - 2. 88EU DL=94Mbps, UL=78Mbps, ODM v285 has the same issue! + 2. 88EU DL=94Mbps, UL=78Mbps, ODM v285 has the same issue! -------------------------------------------------------------------------------------------- <05/03/2012 11:00 JueYang> New Files: -Modified Files: +Modified Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c -Change Notes: - 1. Revise CCK PowerByRate. +Change Notes: + 1. Revise CCK PowerByRate. -Verification Before Checked-In: - 1. OFDM and CCK PowerByRate OK. +Verification Before Checked-In: + 1. OFDM and CCK PowerByRate OK. -------------------------------------------------------------------------------------------- <04/28/2012 12:00 JueYang> New Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_PG.txt -Modified Files: +Modified Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.h HAL\OUTSRC\rtl8188e\HalHWImg8188E_TestChip_BB.c @@ -1296,7 +1296,7 @@ Modified Files: HAL\PHY\HalComPhyCfg.h HAL\rtl8188E\rtl8188ee\Hal8188EEGen.c -Change Notes: +Change Notes: HAL\OUTSRC\rtl8188e\BB\PHY_REG_PG.txt HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.h @@ -1308,18 +1308,18 @@ Change Notes: HAL\PHY\Hal8188EPhyCfg.c HAL\PHY\HalComPhyCfg.c HAL\PHY\HalComPhyCfg.h - 1. Add PowerByRate and update PHY_REG_PG to V003. + 1. Add PowerByRate and update PHY_REG_PG to V003. HAL\rtl8188E\rtl8188ee\Hal8188EEGen.c - 1. Fix some bugs. + 1. Fix some bugs. -Verification Before Checked-In: - 1. N62 Buildall ok +Verification Before Checked-In: + 1. N62 Buildall ok -------------------------------------------------------------------------------------------- <04/27/2012 19:25 Georgia> New Files: -Modified Files: +Modified Files: odm.c odm.h odm_debug.c @@ -1333,19 +1333,19 @@ Modified Files: rtl8192c/odm_RTL8192C.c Change Notes: - 1. Remove CE compile error + 1. Remove CE compile error Verification Before Checked-In: 1. Make all ok. 2. 88EU auto-test ok. - + -------------------------------------------------------------------------------------------- <04/27/2012 17:33 MH_Chen> New Files: -Modified Files: +Modified Files: Change Notes: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c/h - 1. Revise TX power tracking mechanism. Prevent BB swing fail. + 1. Revise TX power tracking mechanism. Prevent BB swing fail. Verification Before Checked-In: 1. N5/N62 buildall ok. @@ -1383,56 +1383,56 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V028 for 20M mode noise resistence - + Verification Before Checked-In: 1. 88E Static Analysis OK -------------------------------------------------------------------------------------------- <04/13/2012 23:00 MH_Chen> -New Files: -Modified Files: +New Files: +Modified Files: Change Notes: 1. Merge from MP driver V2471 to V2561. Mant modification hard to describe.~~!! - + Verification Before Checked-In: 1. N5/N62 buildall OK. 2. 88EU/92CU ping ok S3/S4/reload/unplug ok. --------------------------------------------------------------------------------------------- <04/13/2012 20:10 LukeLee> -New Files: +New Files: HAL\HalDM.c -Modified Files: +Modified Files: Change Notes: 1. [8812]enable RSSI Monitor - + Verification Before Checked-In: 1. buildall OK --------------------------------------------------------------------------------------------- <04/13/2012 19:55 LukeLee> -New Files: +New Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm_HWConfig.c HAL\HalDM.c -Modified Files: +Modified Files: Change Notes: 1. [8812]enable DIG only 2. [8812]CCK RSSI format as 88E - + Verification Before Checked-In: 1. buildall OK --------------------------------------------------------------------------------------------- <04/13/2012 16:38 Gimmy> -New Files: +New Files: HAL\OUTSRC\rtl8188e\FW -Modified Files: +Modified Files: Change Notes: 1. Update first version 88E formal firmware. V001. - + Verification Before Checked-In: 1. NONE. 2. ImgTransfer ok. @@ -1449,7 +1449,7 @@ Modified Files: Change Notes: 1.[All IC except 8723A]Modify DIG 2.[88E] Modify AntDiv - + Verification Before Checked-In: 1. buildall ok. 2. 88EE test OK @@ -1465,8 +1465,8 @@ Modified Files: Change Notes: 1.[88E]Fix AntDiv type decision in init flow - - + + Verification Before Checked-In: 1. buildall ok. 2. 88EE test OK @@ -1490,16 +1490,16 @@ Verification Before Checked-In: <04/11/2012 10:20 JueYang> Modified Files: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c - + HAL\OUTSRC\odm.c Change Notes: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c 1. [88E] Fix BOSD. - + HAL\OUTSRC\odm.c 1. [88E] Add break. - + Verification Before Checked-In: 1. buildall ok. @@ -1511,7 +1511,7 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V026 - + Verification Before Checked-In: 1. 88EU TP dynamic rage test OK @@ -1526,25 +1526,25 @@ Modified Files: HEADER/RegCommon.h PLATFORM/NDIS5/N5C_Init.c HAL/EFUSE/Hal8188EEfuse.c - + Change Notes: 1. Change the default setting of AntennaDivType to "AUTO". 2. Ignore 0xC1[3] when 0xC9 is "1" or "2". - + Verification Before Checked-In: 1. MP buildall ok. - + --------------------------------------------------------------------------------------------- <04/02/2012 20:50 Luke.Lee> Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\rtl8188e\odm_RTL8188E.c - + Change Notes: 1. [88E] remove DbgPrint in odm_RTL8188E.c 2. [88C] modify ODM_SingleDualAntennaDetection() - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88CE TP test OK @@ -1572,12 +1572,12 @@ Modified Files: HAL/OUTSRC/rtl8188e/odm_RTL8188E.c HAL/EFUSE/Hal8188EEfuse.c MPBuild.bat - + Change Notes: 1. Add an option AUTO in advanced setting. (When AUTO is not selected, EFUSE setting would be ignored.) 2. Revise the registry setting and default value of Antenna diversity. 3. Fix compilation errors. - + Verification Before Checked-In: 1. N5/N62/MP buildall ok. 2. 88EE MP T/Rx OK. @@ -1590,21 +1590,21 @@ Modified Files: HAL\OUTSRC\odm_HWConfig.c HAL\OUTSRC\rtl8188e\odm_RTL8188E.c HAL\OUTSRC\rtl8188e\odm_RTL8188E.h - + Change Notes: 1. [88E]Modify Antenna Diversity ODM_SetTxAntByAntDiv() needs to be executed in TXDESC in each platform - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88EE TP test OK --------------------------------------------------------------------------------------------- <03/27/2012 23:05 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Merge from MP driver V2467 to V2470 to support 8821AU and fix some problem. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 882EU ping ok. @@ -1617,7 +1617,7 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V025 - + Verification Before Checked-In: 1. None @@ -1629,7 +1629,7 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V024 - + Verification Before Checked-In: 1. Power training is verified by Wilson @@ -1644,7 +1644,7 @@ Modified Files: Change Notes: 1. Fix wrong MACRO definition: READ_AND_CONFIG 2. Minor changes for MP driver. - + Verification Before Checked-In: 1. N5/N62/MP buildall OK. @@ -1655,8 +1655,8 @@ Modified Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_1T.txt Change Notes: - 1. Update MAC_PHY Reg V023 - + 1. Update MAC_PHY Reg V023 + Verification Before Checked-In: 1. None @@ -1685,11 +1685,11 @@ Change Notes: HEADER/PrecompInc.h HEADER/RegCommon.h HEADER/TypeDef.h - + 1. [8188E] Read antenna diversity type (0xC9 in EFUSE) into TRxAntDivType. 2. [8188E] New OIDs to Set/Query the antenna diversity type. 3. odm_FastAntTrainingInit for MP driver. - + PLATFORM/MACOSX/PMC_Init.cpp PLATFORM/NDIS5/N5C_Init.c PLATFORM/NDIS5/Ndis5Common.h @@ -1702,7 +1702,7 @@ Change Notes: PLATFORM/WinInf/PCI/rtwlanemp.inf PLATFORM/WinInf/USB/netrtwlanu.inf PLATFORM/WinInf/USB/rtwlanump.inf - + 4. New TRxAntDivType setting in the advance property page of the device manager. Verification Before Checked-In: @@ -1718,8 +1718,8 @@ Modified Files: HAL\OUTSRC\rtl8188e\RF\RadioA_1T.txt Change Notes: - 1. Update MAC_PHY Reg V022 - + 1. Update MAC_PHY Reg V022 + Verification Before Checked-In: 1. 88EE shielding room TP test OK @@ -1730,10 +1730,10 @@ Modified Files: Change Notes: 1. Bug fixed: wrong output array name of MP chip. - + Verification Before Checked-In: 1. None - + --------------------------------------------------------------------------------------------- <03/09/2012 21:45 Kordan> Modified Files: @@ -1767,7 +1767,7 @@ Change Notes: a. This feature is now only enabled in 8188EE. b. You can #define RTL8188E_FOR_TEST_CHIP 2 to supprt both MP and test chip. c. Also, #define RTL8188E_FOR_TEST_CHIP 0/1 could reduce the code size. - + Verification Before Checked-In: 1. N5/N62/MP buildall OK. @@ -1785,23 +1785,23 @@ Verification Before Checked-In: 1. AP platform compile OK. --------------------------------------------------------------------------------------------- -<03/08/2012 21:10 Kordan> -Modified Files: +<03/08/2012 21:10 Kordan> +Modified Files: HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c HEADER/Precomp.h.WlanE.Windows HEADER/Precomp.h.WlanU.Windows - + Change Notes: 1. Fix switch channel bug which causes OS hung. 2. Set TEST_CHIP flag to 0. 3. Fix MP compilation error. - + Verification Before Checked-In: 1. N5/N62 buildall OK. - + --------------------------------------------------------------------------------------------- -<03/05/2012 16:10 Luke.Lee> -Modified Files: +<03/05/2012 16:10 Luke.Lee> +Modified Files: HAL/OUTSRC/rtl8188e/HalHWImg8188E_MAC.c HAL/OUTSRC/rtl8188e/HalHWImg8188E_RF.c HAL/OUTSRC/rtl8188e/MAC/MAC_REG.txt @@ -1815,13 +1815,13 @@ Added Files: Change Notes: 1. Update RTL8188E_MAC_PHY_ForMPChip_v021.zip 2. Rename original MAC/BB/RF files as testchip files - + Verification Before Checked-In: 2. 8188ES test OK. --------------------------------------------------------------------------------------------- -<03/02/2012 19:00 Kordan> -Modified Files: +<03/02/2012 19:00 Kordan> +Modified Files: COMMON/Debug.c HAL/OUTSRC/Image2Header.exe HAL/OUTSRC/rtl8188e/*.c @@ -1831,13 +1831,13 @@ COMMON/Debug.c Change Notes: 1. Update HWIMG headers and Image2Header to handle if-else case. 2. Turn off RATE_ADAPTIVE_SUPPORT for MP driver. - + Verification Before Checked-In: 1. N5/N62 buildall OK. 2. 8188EE ping OK. --------------------------------------------------------------------------------------------- -<03/02/2012 17:30 Luke.Lee> -Modified Files: +<03/02/2012 17:30 Luke.Lee> +Modified Files: odm.c odm.h \rtl8188e\odm_RTL8188E.c @@ -1845,31 +1845,31 @@ Modified Files: Change Notes: 1. Simplify timer callback of fast antenna training - + Verification Before Checked-In: 1. N5/N62 buildall OK 2. 88EE hang in Win7 from label v234 3. 88EU workitem does not work if it is started by timer in WatchDog --------------------------------------------------------------------------------------------- -<02/29/2012 19:40 Georgia> -Modified Files: +<02/29/2012 19:40 Georgia> +Modified Files: odm.c rtl8188e/Hal8188ERateAdaptive.c rtl8723a/Hal8723UHWImg_CE.c rtl8723a/Hal8723UHWImg_CE.h Change Notes: - 1. Fix incorrect data type usage in func:ODM_RAInfo_Init_all. + 1. Fix incorrect data type usage in func:ODM_RAInfo_Init_all. 2. Fix compile error for CE Platform. - + Verification Before Checked-In: 1. Make all ok. 2. RTL8723A-VAL auto-test ok. 3. RTL8189E auto-test ok. --------------------------------------------------------------------------------------------- -<02/24/2012 18:30 Georgia> -Modified Files: +<02/24/2012 18:30 Georgia> +Modified Files: HalPhyRf.c HalPhyRf.h odm.c @@ -1883,80 +1883,80 @@ Modified Files: rtl8188e/odm_RTL8188E.c Change Notes: - 1. Fix compile error for CE platform. + 1. Fix compile error for CE platform. 2. Add GPL announce. 3. Remove useless codes. - + Verification Before Checked-In: 1. Make all ok. 2. RTL8723A-VAL auto-test ok. 3. RTL8189E auto-test ok. - + --------------------------------------------------------------------------------------------- -<02/23/2012 17:10 Kordan> -Modified Files: +<02/23/2012 17:10 Kordan> +Modified Files: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c Change Notes: 1. Update IQK setting and flow. - + Verification Before Checked-In: 1. None --------------------------------------------------------------------------------------------- -<02/23/2012 22:50 MH_Chen> -Modified Files: +<02/23/2012 22:50 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Revise CCK path diversity timer and workitem architecture. 2. ResetAllHw timer and cancel Hw timer will call ODM relative API.. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. --------------------------------------------------------------------------------------------- -<02/23/2012 21:35 MH_Chen> -Modified Files: +<02/23/2012 21:35 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Revise path diversity timer and workitem architecture. 2. Deleate HAL layer ODM path diversity timer and workitem declaation. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. - + --------------------------------------------------------------------------------------------- -<02/23/2012 20:35 MH_Chen> -Modified Files: +<02/23/2012 20:35 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Revise all ODM timer/workitem init/cancel.release flow. 2. Add cancel timer API to prevent BSOD and system resource leakage. 3. Fix unplug fail issue. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. 3. A special flow bug fixed ==> S3/S4 and then disable or unplug OK in NB111_WIN7. --------------------------------------------------------------------------------------------- -<02/22/2012 16:35 MH_Chen> -Modified Files: +<02/22/2012 16:35 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Merge from MP 2444 to 2459. 2. Some odm code is moved from MP to ODM code base. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. 3. A special under investigation ==> S3/S4 and then disable or unplug fail. And then cause all USB port detection fail in QC NB111. --------------------------------------------------------------------------------------------- -<02/22/2012 15:35 Kordan> -Modified Files: +<02/22/2012 15:35 Kordan> +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c @@ -1964,21 +1964,21 @@ Modified Files: Change Notes: 1. Revise PHY_ResetIQKResult to ODM format, ODM_ResetIQKResult. 2. Move TxPowerTrackControl initialization to odm_TXPowerTrackingThermalMeterInit. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK --------------------------------------------------------------------------------------------- -<02/21/2012 23:10 Kordan> -Modified Files: +<02/21/2012 23:10 Kordan> +Modified Files: HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c Change Notes: 1. Merge TxPower Tracking from trunk to ODM. - 2. Replace EOF pattern, 0xFF, of ParaFiles with 0xFFFF. - + 2. Replace EOF pattern, 0xFF, of ParaFiles with 0xFFFF. + Verification Before Checked-In: - 1. N5/N62 buildall OK - + 1. N5/N62 buildall OK + --------------------------------------------------------------------------------------------- <02/21/2012 14:45 button> Modified Files: @@ -2014,21 +2014,21 @@ Verification Before Checked-In: 2. Ping 65500 OK. --------------------------------------------------------------------------------------------- -<02/17/2012 18:05 Kordan> -Modified Files: +<02/17/2012 18:05 Kordan> +Modified Files: HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c Change Notes: - 1. When delta temperature is equal to or larger than 20 centigrade(index delta is about 8), + 1. When delta temperature is equal to or larger than 20 centigrade(index delta is about 8), do IQK and LCK. - 2. Update last thermal value to prevent from running IQK and LCK every time. + 2. Update last thermal value to prevent from running IQK and LCK every time. Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK --------------------------------------------------------------------------------------------- -<02/17/2012 16:45 Luke.Lee> -Modified Files: +<02/17/2012 16:45 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h @@ -2037,93 +2037,93 @@ Change Notes: 2. Add init and free all workitems for MP platform Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 88EE web brouse OK - + --------------------------------------------------------------------------------------------- -<02/17/2012 14:18 MH_Chen> -Modified Files: +<02/17/2012 14:18 MH_Chen> +Modified Files: Change Notes: 1. Add workitem relative API. Not enabled now, so we need not test. Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/16/2012 22:30 LukeLee> -Modified Files: +<02/16/2012 22:30 LukeLee> +Modified Files: HAL\OUTSRC\rtl8188e\odm_RTL8188E.c - + Change Notes: 1. [8188E]Modify fast antenna training Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/16/2012 17:00 Mingzhi> -Modified Files: +<02/16/2012 17:00 Mingzhi> +Modified Files: HAL\OUTSRC\odm.c - + Change Notes: 1. for CE platform, BE TXOP in B/G/BG/A mode is 0x5e(3ms) 2. for AP/ADSL platform: fix a bug in BE TXOP Verification Before Checked-In: - 1. N5/N62 buildrtwu/buildrtwe ok. + 1. N5/N62 buildrtwu/buildrtwe ok. --------------------------------------------------------------------------------------------- -<02/16/2012 15:00 Luke.Lee> -Modified Files: +<02/16/2012 15:00 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm_precomp.h New Files: HAL\OUTSRC\rtl8188e\odm_RTL8188E.c HAL\OUTSRC\rtl8188e\odm_RTL8188E.h - + Change Notes: 1. [8188E]Move Fast antenna training into 88E folder Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/14/2012 23:12 MH_Chen> -Modified Files: +<02/14/2012 23:12 MH_Chen> +Modified Files: Change Notes: 1. FIX ODM tracking list item 60. Revise ODM 88E rate adaptive ability support. Verification Before Checked-In: - 1. N5/N62 buildall ok. - 2. 8188EU ping test ok. + 1. N5/N62 buildall ok. + 2. 8188EU ping test ok. --------------------------------------------------------------------------------------------- -<02/14/2012 22:12 MH_Chen> -Modified Files: +<02/14/2012 22:12 MH_Chen> +Modified Files: Change Notes: 1. FIX ODM tracking list item 58. Revise ODM ability support. Verification Before Checked-In: - 1. N5/N62 buildall ok. - 2. 8188EU ping test ok. + 1. N5/N62 buildall ok. + 2. 8188EU ping test ok. --------------------------------------------------------------------------------------------- -<02/14/2012 15:40 Georgia> -Modified Files: +<02/14/2012 15:40 Georgia> +Modified Files: odm.c odm_debug.h - + Change Notes: 1.Turn on EDCA Turbo function for BG mode (CE Platform) Verification Before Checked-In: - 1. CE Platform make ok. - 2. 8188E-SDIO auto-test ok. + 1. CE Platform make ok. + 2. 8188E-SDIO auto-test ok. --------------------------------------------------------------------------------------------- -<02/13/2012 17:45 Luke.Lee> -Modified Files: +<02/13/2012 17:45 Luke.Lee> +Modified Files: HAL\OUTSRC\rtl8188e\MAC\MAC_REG.txt HAL\OUTSRC\rtl8188e\HalHWImg8188E_MAC.c @@ -2136,8 +2136,8 @@ Verification Before Checked-In: 1. None --------------------------------------------------------------------------------------------- -<02/13/2012 17:30 Luke.Lee> -Modified Files: +<02/13/2012 17:30 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h @@ -2148,11 +2148,11 @@ Change Notes: 1.Modify fast antenna training (default disabled) Verification Before Checked-In: - 1. N62 buildall ok. + 1. N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/10/2012 19:20 JueYang> -Modified Files: +<02/10/2012 19:20 JueYang> +Modified Files: COMMON\MgntLink.c HAL\DESC\Hal8188EETxDesc.c @@ -2174,7 +2174,7 @@ Change Notes: 2. Tune 3U Throughput for DIR 655. Reserved at least 2 packets in Tx FIFO to triggle early mode but avoid single AMPDU. HAL\DESC\Hal8188EETxDesc.c - 1. Fix DTM Fuzz BOSD for memory overflow when move memory for ealy mode dummy. Some codes are not covered by pHalData->bEarlyModeEnable. + 1. Fix DTM Fuzz BOSD for memory overflow when move memory for ealy mode dummy. Some codes are not covered by pHalData->bEarlyModeEnable. HAL\OUTSRC\rtl8188e\Hal8188ERateAdaptive.c HAL\OUTSRC\rtl8188e\odm_RegConfig8188E.c @@ -2190,13 +2190,13 @@ Change Notes: 1. Fix RX Hang after RF Off and RF On. Enable TRX DMA(REG[0x301]=0) during intialization. Verification Before Checked-In: - 1. N62 buildall ok. + 1. N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/09/2012 22:41 MH_Chen> -Modified Files: +<02/09/2012 22:41 MH_Chen> +Modified Files: Change Notes: - MERGE MP V2435. + MERGE MP V2435. 1. Increase build speed and revise aarchitecture. Verification Before Checked-In: @@ -2204,8 +2204,8 @@ Verification Before Checked-In: 1. 88EU reload/s3 ping ok. --------------------------------------------------------------------------------------------- -<02/09/2012 17:20 Kordan> -Modified Files: +<02/09/2012 17:20 Kordan> +Modified Files: HAL\OUTSRC\Image2Header.exe Change Notes: @@ -2215,8 +2215,8 @@ Verification Before Checked-In: 1. None. --------------------------------------------------------------------------------------------- -<02/08/2012 17:50 Luke.Lee> -Modified Files: +<02/08/2012 17:50 Luke.Lee> +Modified Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_1T.txt HAL\OUTSRC\rtl8188e\RF\RadioA_1T.txt HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c @@ -2226,12 +2226,12 @@ Change Notes: 1. Update MAC_PHY reg v019 Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EE run chariot ok. --------------------------------------------------------------------------------------------- -<02/08/2012 17:20 Luke.Lee> -Modified Files: +<02/08/2012 17:20 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm_HWConfig.c @@ -2240,12 +2240,12 @@ Change Notes: 2. [8188E] modify fast antenna training (default disabled) Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EE run chariot ok. --------------------------------------------------------------------------------------------- -<02/07/2012 21:30 MH_Chen> -Modified Files: +<02/07/2012 21:30 MH_Chen> +Modified Files: Change Notes: 1. Revise all batch file for MP. To fasten build speed. 2. We do not request ODM to check buildrtwee/eu/es. The batch files will be removed later. @@ -2253,16 +2253,16 @@ Change Notes: 4. Prevent SDIO build error by modifying buildclean all. Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EU ping ok. --------------------------------------------------------------------------------------------- -<02/07/2012 21:10 Luke.Lee> -Modified Files: +<02/07/2012 21:10 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\odm_HWConfig.c - + Change Notes: 1. [8188E] Modify fast antenna training (default disabled) @@ -2270,69 +2270,69 @@ Verification Before Checked-In: 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/07/2012 13:35 JueYang> -Modified Files: +<02/07/2012 13:35 JueYang> +Modified Files: HAL\DESC\Hal8188EETxDesc.c HAL\PHY\HalComPhyCfg.c - + Change Notes: 1. [8188E] Revise Power Trainning. Verification Before Checked-In: - 1. N62 buildrtwe ok. + 1. N62 buildrtwe ok. --------------------------------------------------------------------------------------------- -<02/07/2012 11:05 JueYang> -Modified Files: +<02/07/2012 11:05 JueYang> +Modified Files: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c - + Change Notes: 1. [8188EE] Fix pbScanInProcess error which cause initialize 88ee delayed 3 seconds. Verification Before Checked-In: - 1. N62 buildrtwe ok. + 1. N62 buildrtwe ok. --------------------------------------------------------------------------------------------- -<02/06/2012 21:30 Luke.Lee> -Modified Files: +<02/06/2012 21:30 Luke.Lee> +Modified Files: 1. rtl8188e/* - + Change Notes: 1. [8188E] Update 88E MAC_PHY_REG v018 Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/06/2012 20:30 Luke.Lee> -Modified Files: +<02/06/2012 20:30 Luke.Lee> +Modified Files: 1. rtl8188e/* - + Change Notes: 1. [8188E] Update 88E MAC_PHY_REG v017 Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EU vs Cisco1252 20M mode DL/UL:48Mbps --------------------------------------------------------------------------------------------- -<02/06/2012 13:30 Kordan> -Modified Files: +<02/06/2012 13:30 Kordan> +Modified Files: 1. Image2Header.exe 2. rtl8723a/* 3. rtl8188e/* - + Change Notes: 1. Update Image2Header to remove the redundant code. Verification Before Checked-In: - 1. N5/N6/N62 buildall ok. - + 1. N5/N6/N62 buildall ok. + --------------------------------------------------------------------------------------------- -<02/06/2012 11:24 MH_Chen> +<02/06/2012 11:24 MH_Chen> New Files: Delete FIles: -Modified Files: +Modified Files: Change Notes: 1. MErge MP V2516 to fix TX short cut and SDIO build error. @@ -2341,7 +2341,7 @@ Verification Before Checked-In: 2. 88EU ping ok. --------------------------------------------------------------------------------------------- -<02/03/2012 18:20 Georgia> +<02/03/2012 18:20 Georgia> New Files: Delete FIles: Modified Files: @@ -2356,19 +2356,19 @@ Verification Before Checked-In: 3. 8188E-SDIO auto-test ok. --------------------------------------------------------------------------------------------- -<02/03/2012 17:35 MH_Chen> +<02/03/2012 17:35 MH_Chen> New Files: Delete FIles: Modified Files: Change Notes: 1. Revise 88E MAC init flow. - + Verification Before Checked-In: 1. N6/N5 buildall OK. except sdio driver.. 2. 92CU S3/S5/Reload/Unplug and ping WPA2-AES ok. --------------------------------------------------------------------------------------------- -<02/03/2012 14:30 MH_Chen> +<02/03/2012 14:30 MH_Chen> New Files: Delete FIles: Modified Files: @@ -2377,7 +2377,7 @@ Change Notes: COMMON\WOLPattern.c 1. Support ODM for AP engine in MP. 2. Fix SDIO compile error. - + HAL\BTCoexist\HalBtCoexist.c\h HAL\DESC\Hal8192CRxDesc.c HAL\HWIMG\HalHWImg.h @@ -2386,23 +2386,23 @@ Change Notes: HAL\OUTSRC\rtl8188e\Hal8188ERateAdaptive.c HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c 1. Fix MP compile error. - + HAL\PHY\Hal8188EPhyCfg.c\h HAL\PHY\Hal8192CPhyCfg.c\h HAL\PHY\Hal8192DPhyCfg.h HAL\PHY\HalComPhyCfg.h 1. Disable original RF calibraet power tracking mechanism in MP old drv. 2. Georgia move some constant declare from MP old position to ODM. - + HEADER\... 1. Define IC support flag. 2. Revise precomp for SDIO build. - + Build batch files: 1. Support MP all IC with ODM module. 2. Support all SDIO driver build. 3. Spport 8812E build. - + Verification Before Checked-In: 1. N6/N5 buildall OK. We do not check EE/EU/ES sereis build batch file. 2. 92CU S3/S5/Reload/Unplug and ping WPA2-AES ok. @@ -2456,7 +2456,7 @@ Change Notes: Hal8188EEHWImg.c Hal8188EEHWImg.h Hal8188EUHWImg.c - Hal8188EUHWImg.h + Hal8188EUHWImg.h Hal8188ESHWImg.c Hal8188ESHWImg.h 1. Update 8188E HWImg header file. @@ -2490,7 +2490,7 @@ Change Notes: Verification Before Checked-In: 1. none - + --------------------------------------------------------------------------------------------- <02/01/2012 22:10 Kordan> Change Notes: @@ -2538,69 +2538,69 @@ Verification Before Checked-In: 2. Ping FAIL. --------------------------------------------------------------------------------------------- -<01/31/2012 17:00 Luke.Lee> -Modified Files: +<01/31/2012 17:00 Luke.Lee> +Modified Files: Change Notes: 1. Fix 88EU TX DESC bug 2. Add Fast Antenna Training Mechanism (default disabled) 3. enable 88EU auto RTS 4. Add control flag pAntDivCfg to SW AntDiv - + Verification Before Checked-In: 1. N6/N5 buildall OK 2. 92CU run TP OK but 88EU TP bad --------------------------------------------------------------------------------------------- -<01/31/2012 16:07 MH_Chen> -Modified Files: +<01/31/2012 16:07 MH_Chen> +Modified Files: Change Notes: 1. Merge MP SDIO driver for ODM module test. Unti version 2412. 2. Revise for MP common binary & ODM compatiable. - + Verification Before Checked-In: 1. N5/N62 Buildall ok. 2. 92CU win7 unplug/reload/S3/S5 ok. --------------------------------------------------------------------------------------------- -<01/30/2012 21:13 MH_Chen> -Modified Files: +<01/30/2012 21:13 MH_Chen> +Modified Files: Change Notes: 1. Fix rtwlan SDIO source file for MP. 2. Revise precomp header file and batch file for MP SDIO driver. - + Verification Before Checked-In: 1. N5 Build SDIO driver ok. --------------------------------------------------------------------------------------------- -<01/30/2012 20:40 MH_Chen> -Modified Files: +<01/30/2012 20:40 MH_Chen> +Modified Files: Change Notes: 1. Revise ODM phy rx desc query for MP. 2. Revise precomp header file for USB. - + Verification Before Checked-In: 1. N5/N62 buildall ok. N5 Build 8723AS fail. 2. 92CU test ok. Link with WPA2-AES AP. Unplug/reload/S3 ok. --------------------------------------------------------------------------------------------- -<01/29/2012 17:00 JueYang> +<01/29/2012 17:00 JueYang> Modified Files: HAL\OUTSRC\odm.c - + PLATFORM\NDIS6\USB\N6Usb_DrvIF.c - + Change Notes: HAL\OUTSRC\odm.c 1. Fix RA info not initialized. - + PLATFORM\NDIS6\USB\N6Usb_DrvIF.c 1. Fix a mistake in writing which cause USB memory leak. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88EE\88CE\88CU test ok. --------------------------------------------------------------------------------------------- -<01/29/2012 13:20 JueYang> +<01/29/2012 13:20 JueYang> Modified Files: COMMON\WOLPattern.c HAL\rtl8188E\rtl8188eu\Hal8188EUsbGen.c @@ -2618,12 +2618,12 @@ Modified Files: PLATFORM\NDIS6\USB\Mp_Req.c PLATFORM\NDIS6\USB\N6Usb_main.c PLATFORM\NDIS6\N62C_SetOID.c - + HAL\EFUSE\Hal8192CEfuse.c HAL\EFUSE\HalEfuse.h HAL\OUTSRC\odm.c HEADER\RegCommon.h - + Change Notes: COMMON\WOLPattern.c HAL\rtl8188E\rtl8188eu\Hal8188EUsbGen.c @@ -2642,17 +2642,17 @@ Change Notes: PLATFORM\NDIS6\USB\N6Usb_main.c PLATFORM\NDIS6\N62C_SetOID.c 1. Use MAX_SUPPORT_WOL_PATTERN_NUM(Adapter) instead of MAX_SUPPORT_WOL_PATTERN_NUM. - + HAL\EFUSE\Hal8192CEfuse.c HAL\EFUSE\HalEfuse.h HAL\OUTSRC\odm.c HEADER\RegCommon.h 1. Remove HAL_SUPPORT_88E_92C. - + Verification Before Checked-In: 1. N5/N62 buildall ok --------------------------------------------------------------------------------------------- -<01/29/2012 11:20 JueYang> +<01/29/2012 11:20 JueYang> Modified Files: COMMON\MgntGen.c COMMON\sources.Ebd @@ -2693,39 +2693,39 @@ Modified Files: Precomp.h.WlanE.Windows HEADER\PrecompInc.h HEADER\TypeDef.h - + Change Notes: 1. Move RA from COMMON\ to HAL\OURSRC\RTL8188E. 2. Support 88E and other chips when RATE_ADAPTIVE_SUPPORT=1. - + Verification Before Checked-In: 1. N5/N62 buildall ok ---------------------------------------------------------------------------------------------- <01/20/2012 19:07 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP V 2401-2410. - + Verification Before Checked-IN 1. N5/N6 buildall ok. 2. 92CU win7 ping test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 22:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Support 8188E power tracking mechanism in odm folder for MP. - + Verification Before Checked-IN 1. N5/N6 buildall ok. 2. 92CU win7 ping test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 21:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP V 2384-2400 to support new 88EU/8812U features. - + Verification Before Checked-IN 1. N5/N6 buildall ok. 2. 92CU win7 ping test ok. @@ -2733,16 +2733,16 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/19/2012 20:00 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. According to chariot test. 88EU will fail in RX side, we found that the reason is due to precomp.h setting. If you want to test 88E series IC Please use below setting. We will fix the problem later. - + #if 1 // For 92C/92D/8723A #define HAL_SUPPORT_88E_92C 0 #if (HAL_SUPPORT_88E_92C ==1) - #undef RTL8192D_DUAL_MAC_MODE_SWITCH + #undef RTL8192D_DUAL_MAC_MODE_SWITCH #define RTL8192D_DUAL_MAC_MODE_SWITCH 0 #undef RTL8192D_EASY_SMART_CONCURRENT #define RTL8192D_EASY_SMART_CONCURRENT 0 @@ -2753,7 +2753,7 @@ Change Note: #else // for 88E #define HAL_SUPPORT_88E_92C 1 #if (HAL_SUPPORT_88E_92C ==1) - #undef RTL8192D_DUAL_MAC_MODE_SWITCH + #undef RTL8192D_DUAL_MAC_MODE_SWITCH #define RTL8192D_DUAL_MAC_MODE_SWITCH 0 #undef RTL8192D_EASY_SMART_CONCURRENT #define RTL8192D_EASY_SMART_CONCURRENT 0 @@ -2764,96 +2764,96 @@ Change Note: #endif #endif - + Verification Before Checked-IN - 1. 88EU/92CU chariot throughput test ok. + 1. 88EU/92CU chariot throughput test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 16:00 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Move 8188E PHY calibrate relative code from HAL\PHY to HAL\ODM\rtl8188e 2. Revise MP source & build environment for testing ok. - + Verification Before Checked-IN 1. MP N5/N6 buildall ok. 2. 92CU win7 ping test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 11:50 Georgia> -Modified Files: +Modified Files: odm_HWConfig.c - + Change Note: 1. Fix compile error and wrning for CE. 2. Fix system crash for CE. (in func:odm_Process_RSSIForDM incorrect condition judgment) - + Verification Before Checked-IN 1. CE mak all ok. 2. 92DU-VS auto-test ok. ---------------------------------------------------------------------------------------------- <01/17/2012 23:03 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge PHY-RF relative API for HW out source share. 2. Disable MP PHY-RF calibrate relative function. 3. Revise MP build environment for compile pass. - + Verification Before Checked-IN 1. N5/N62 buildall OK. 2. CU Win7/XP ping with WPA2-AES AO OK. ---------------------------------------------------------------------------------------------- <01/16/2012 18:20 Luke.Lee> -Modified Files: +Modified Files: Change Note: 1. Fix ODM_CmnInfoInit() - + Verification Before Checked-IN 1. N5/N62 buildall OK 2. 88EU Win7 ping OK ---------------------------------------------------------------------------------------------- <01/16/2012 11:30 Luke.Lee> -Modified Files: +Modified Files: Change Note: 1. Modify 88E CCK RSSI formula. - + Verification Before Checked-IN 1. N5/N62 buildall OK 2. 88CE Win7 ping OK ---------------------------------------------------------------------------------------------- <01/13/2012 17:32 Georgia> -Modified Files: +Modified Files: Change Note: 1. Fix compile error for CE. - + Verification Before Checked-IN 1. CE Platform make ok. 2. 88CU/92DU-VS/8723AU/8723AS/8188ES Auto-test ok. - + ---------------------------------------------------------------------------------------------- <01/13/2012 16:35 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Revise common binary arch for 88EE/88EU. 2. Fine tune build environment for MP driver. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. XP platform 88EU ping and reload ok. 3. Vista platform 92CU link with dir-655 and ping ok. 4. WIn7 platform 88CU/92DU-VS/8723AU work at the same with rtwlanu.sys. Ping with dir-655 wpa2-aes S3/S5/reload ok. - - + + ---------------------------------------------------------------------------------------------- <01/12/2012 23:50 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP V 2383 to support 88EU/8812U in the same binary. - + Verification Before Checked-IN 1. N5/N62 buildall ok. 2. Vista platform 92CU link with dir-655 and ping ok. S3 fail~~!!! Under investigation. @@ -2862,46 +2862,46 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/12/2012 22:46 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Support default & AP mode STA info revise for MP. 2. Fix tracking list item 23/44. 3. Add more universal interface for power tracking and rf calibrate. - + Verification Before Checked-IN 1. N5/N62 buildall ok. 2. Vista platform 92CU link with dir-655 and ping ok. ---------------------------------------------------------------------------------------------- <01/12/2012 22:02 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge mp driver to v2382. 2. Revise MP DM entry arch. - + Verification Before Checked-IN 1. N5/N62 buildall ok. - + ---------------------------------------------------------------------------------------------- <01/12/2012 17:20 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge mp driver to v2382. 2. Revise MP DM entry arch. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. 88CU/8723AU/92DU test in the win7 platfrom. Ping with DIR-655 WPA2-AES ok. ---------------------------------------------------------------------------------------------- <01/12/2012 16:20 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Fix 92CU BSOD in win7 platfrom due to ODM deinit with null ptr. 2. Delete MP useless folder. 3. Revise driver linked & compilerd object. 4. Revise indlud file flow. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. 88CU/8723AU/92DU test in the win7 platfrom. S3/S4/reload unplug with DIR-655 WPA2-AES @@ -2909,10 +2909,10 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/11/2012 22:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Enable 8723 ODM HW config mode. - + Verification Before Checked-IN 1. N62 buildrtwu ok. 2. 88CU/8723AU/92DU test in the win7 platfrom. S3/S4/reload unplug with DIR-655 WPA1-AES @@ -2920,12 +2920,12 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/11/2012 21:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP driver from v2258 to v2377. 2. Revise ODM structure for MP. 3. Mere 88E/8812/8821 common binary. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. CU WIN7/Vista DIR-655 WPA2/AES S3/S4/S5 reload and ping ok. @@ -2934,25 +2934,25 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/10/2012 10:07 Mingzhi> -Modified Files: +Modified Files: Change Note: 1. fix a bug which will cause BSOD -Modified Files: +Modified Files: 1. odm.c 2. odm_RTL8192D.c - + Verification Before Checked-IN 1. N5 buildrtwu/buildrtwe ok 2. 88CE plug ok ---------------------------------------------------------------------------------------------- <01/10/2012 21:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP driver from v2218 to v2258. 2. Revise ODM structure for MP. 3. Mere 88E common binary. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. WIN7/Vista DIR-655 WPA2/AES S3/S4/S5 reload and ping ok. @@ -2960,28 +2960,28 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/10/2012 16:15 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Fix unload fail when deinit haldm in platform layer. - + Verification Before Checked-IN 1. ping with dir-655 and reload ok in vista. ---------------------------------------------------------------------------------------------- <01/09/2012 20:08 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Fix compile error in MP. 2. Fix USB init fail for inithaldm in platfrom or hal layer. - + Verification Before Checked-IN 1. N5/N62 buildall ok. 2. 8188CUS Vista & win7 ping with DIR-655 wpa2 aes ok. ---------------------------------------------------------------------------------------------- <01/09/2012 18:45 Georgia> -Modified Files: - odm.c +Modified Files: + odm.c odm.h odm_HWConfig.c rtl8723a/odm_RegConfig8723A.c @@ -2996,9 +2996,9 @@ Verification Before Checked-IN 2. 8188CUS with SW-ANT-DIV auto-test ok. ---------------------------------------------------------------------------------------------- <01/09/2012 13:05 Kordan> -Modified Files: +Modified Files: HAL/OUTSRC/odm_precomp.h - + Added Files: rtl8723a/odm_RegConfig8723A.h rtl8723a/odm_RegConfig8723A.c @@ -3010,18 +3010,18 @@ Change Note: Verification Before Checked-IN 1. MP N5/6/62 buildall ok. ---------------------------------------------------------------------------------------------- -<01/09/2012 10:40 MH_Chen> -Modified Files: +<01/09/2012 10:40 MH_Chen> +Modified Files: Change Note: 1.Fix N5/N6/ All IC compile error in MP. - + Verification Before Checked-IN 1.N5/N62 buildall OK 2. Link with DIR-655 with 92CU but performance is very bad~~~!! Connect and disconnect periodically~~~!! 3. Try another RTK AP also meet hard to link problem. ---------------------------------------------------------------------------------------------- -<01/06/2012 15:40 Georgia> +<01/06/2012 15:40 Georgia> Added Files: rtl8192c/Hal8192CEFWImg_CE.c rtl8192c/Hal8192CEFWImg_CE.h @@ -3051,24 +3051,24 @@ Added Files: rtl8723a/Hal8723SHWImg_CE.h rtl8723a/Hal8723UHWImg_CE.c rtl8723a/Hal8723UHWImg_CE.h - -Modified Files: + +Modified Files: odm.c odm_precomp.h rtl8192c/HalDMOutSrc8192C_CE.c rtl8192c/HalDMOutSrc8192C_CE.h - + Change Note: 1.)add related phy-parameters for CE. 2.)remove useless code of SW-Ant-div for CE. - + Verification Before Checked-IN 1. CE-Platform make OK. 2. 8188CUS With SW-ANT-DIV auto-test OK. ---------------------------------------------------------------------------------------------- -<01/05/2012 20:00 Luke.Lee> -Modified Files: +<01/05/2012 20:00 Luke.Lee> +Modified Files: odm.c odm_HWConfig.c odm_HWConfig.h @@ -3079,13 +3079,13 @@ Change Note: 1.Fix DIG error in some condition 2.include 88E modification from MERGE_TEMP 3.remove 64bit division - + Verification Before Checked-IN 1.N5/N62 buildall OK ---------------------------------------------------------------------------------------------- -<01/04/2012 18:30 Georgia> -Modified Files: +<01/04/2012 18:30 Georgia> +Modified Files: odm.c odm.h odm_precomp.h @@ -3094,14 +3094,14 @@ Modified Files: Change Note: 1.Fix compile error for CE. - + Verification Before Checked-IN 1.CE-platform make ok. 2.92DU-VS autotest ok. - + ---------------------------------------------------------------------------------------------- -<01/04/2012 16:00 Mingzhi> -Modified Files: +<01/04/2012 16:00 Mingzhi> +Modified Files: 1.odm.c 2.odm_RTL8192D.c @@ -3113,7 +3113,7 @@ Verification Before Checked-IN 1. N5 buildrtwu/buildrtwe ok ---------------------------------------------------------------------------------------------- -<01/02/2012 17:40 Kordan> +<01/02/2012 17:40 Kordan> Removed Files: HAL/OUTSRC/rtl8723/* HAL/OUTSRC/rtl8723a/Hal8723HWImg* @@ -3128,13 +3128,13 @@ Verification Before Checked-IN 1. none ---------------------------------------------------------------------------------------------- <01/02/2012 17:35 Kordan> -Modified Files: +Modified Files: HAL/HWIMG/HalHWImg.h HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm_precomp.h - + Added Files: HAL/OUTSRC/odm_HWConfigCallee.h @@ -3191,17 +3191,17 @@ Added Files: Change Note: 1. add & modify related code for rtl8723a. - + Verification Before Checked-IN: 1.CE-Platform make ok. - 2.8188CUS auto-test (with PS) ok. + 2.8188CUS auto-test (with PS) ok. 2.8723AU auto-test ok. - + ---------------------------------------------------------------------------------------------- <12/29/2011 18:00 Mingzhi> Modified Files: 1.odm.c - 2.odm_RTL8192D.c + 2.odm_RTL8192D.c Change Note: 1. fix a bug in ODM_Write_CCK_CCA_Thres/ODM_Write_CCK_CCA_Thres_92D 2. fix a bug which may cause 92D can't enter false alarm counter statistics function @@ -3214,9 +3214,9 @@ Verification Before Checked-IN: ---------------------------------------------------------------------------------------------- <12/28/2011 22:45 MH_Chen> -Modified Files: +Modified Files: Change Note: - 1. fix compile error for Ra structure. + 1. fix compile error for Ra structure. Verification Before Checked-IN 1. MP N5/6/62 buildall ok. @@ -3281,7 +3281,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/26/2011 21:00 Mingzhi> -Modified Files: +Modified Files: Odm.c Change Noet: @@ -3293,7 +3293,7 @@ Verification Before Checked-IN 2. 92DU-VC test ok ---------------------------------------------------------------------------------------------- <12/26/2011 15:20 Georgia> -Modified Files: +Modified Files: Odm.c Change Noet: 1. Fixed null pointer exception in func:odm_CmnInfoHook_Debug @@ -3304,7 +3304,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/23/2011 21:30 Mingzhi> -Modified Files: +Modified Files: Odm.h Odm.c Change Noet: @@ -3317,7 +3317,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/23/2011 20:50 Georgia> -Modified Files: +Modified Files: odm.c odm_RTL8192D.c @@ -3329,7 +3329,7 @@ Verification Before Checked-IN 2. 92DU-VS autotest ok ---------------------------------------------------------------------------------------------- <12/23/2011 18:00 Kordan> -Modified Files: +Modified Files: Image2Header.exe HW Configuration source/header/text files @@ -3347,7 +3347,7 @@ Added Files: HW_Integration_Status_20111221.xls Deleted Files: HW_Integration_Status_20111215.xls -Modified Files: +Modified Files: odm.h odm_interface.c odm_interface.h @@ -3361,7 +3361,7 @@ Verification Before Checked-IN 1. CE Platform make ok. ---------------------------------------------------------------------------------------------- <12/20/2011 21:20 Georgia> -Modified Files: +Modified Files: odm.c odm.h odm_interface.c @@ -3377,7 +3377,7 @@ Verification Before Checked-IN 2. 8188CUS Auto-test oK. ---------------------------------------------------------------------------------------------- <12/20/2011 11:07 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Fix 92C/92D init fail for scan fail issue. 2. Fix ODM HT Channel width setting. @@ -3385,10 +3385,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK 2. Link with DIr-655 reload/unplug/S3/S4/S5 and ping ok. - + ---------------------------------------------------------------------------------------------- <12/20/2011 10:50 Kordan> -Modified Files: +Modified Files: HAL/rtl8192C/rtl8192ce/Hal8192CEGen.c HAL/rtl8192S/rtl8192su/Hal8192SUsbGen.c @@ -3399,7 +3399,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/20/2011 10:13 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3410,7 +3410,7 @@ Verification Before Checked-IN 1. N5 buildrtwu/buildrtwe fail ---------------------------------------------------------------------------------------------- <12/19/2011 20:20 Georgia> -Modified Files: +Modified Files: odm.c Deleted Files: odm_TimerCallbacks.h @@ -3419,10 +3419,10 @@ Change Noet: 1. Move odm_SwAntDivChkAntSwitchCallback APIs back to odm.c Verification Before Checked-IN - 1. CE Platform make OK + 1. CE Platform make OK ---------------------------------------------------------------------------------------------- <12/19/2011 19:40 Kordan> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_interface.c @@ -3432,10 +3432,10 @@ Change Noet: 1. Move ODM_InitAllTimers/ODM_CancelAllTimers APIs back to odm.c Verification Before Checked-IN - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 18:10 Kordan> -Modified Files: +Modified Files: none Change Noet: 1. Add missing odm_TimerCallbacks.h @@ -3444,7 +3444,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 18:05 Kordan> -Modified Files: +Modified Files: HalDM.c OUTSRC/odm.c OUTSRC/odm_interface.c @@ -3452,7 +3452,7 @@ Modified Files: rtl8192C/rtl8192ce/Hal8192CEGen.c rtl8192C/rtl8192cs/Hal8192CSdioGen.c rtl8192C/rtl8192cu/Hal8192CUsbGen.c - HEADER/HTType.h + HEADER/HTType.h Change Noet: 1. Fix RF performance issue: The hardware capability only supports 20M. @@ -3466,13 +3466,13 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 17:02 Button> -Modified Files: +Modified Files: odm.c odm.h odm_interface.c odm_types.h rtl8192c/HALDMOutSrc8192C_AP.c - + Change Noet: 1. Fix compile error in AP platform. 2. Add delay, timer, memory function @@ -3483,7 +3483,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/19/2011 13:29 Kordan> -Modified Files: +Modified Files: odm.c Hal8192CUsbGen.c @@ -3494,7 +3494,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 10:25 Kordan> -Modified Files: +Modified Files: odm.h HAL/PHY/Hal8192CRf6052.c @@ -3505,7 +3505,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/16/2011 18:30 Georgia> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_interface.c @@ -3528,7 +3528,7 @@ Verification Before Checked-IN 2. 8188CUS/8188CU(With Antenna_Div)/92DU-VS(With 2.4G) Auto-test ok. ---------------------------------------------------------------------------------------------- <12/16/2011 11:23 Kordan> -Modified Files: +Modified Files: HAL/HWIMG/HalHWImg.h HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm_HWConfig.h @@ -3547,7 +3547,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/15/2011 14:04 Annie> -Modified Files: +Modified Files: odm.c odm_debug.h @@ -3559,12 +3559,12 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/14/2011 17:52 Annie> -Modified Files: +Modified Files: odm.c odm.h odm_debug.c odm_debug.h - + Change Noet: 1. Fix compiler error in ADSL platform. 2. Correct debug message code about ODM_COMP_ANT_DIV functions. @@ -3575,11 +3575,11 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/14/2011 13:30 Kordan> -Modified Files: +Modified Files: odm_types.h odm_HWConfig.c odm_HWConfig.h - + Change Noet: 1. Define HAL_STATUS status code in odm_types.h 2. Replace ODM_ConfigXxxWithHeaderFile(...) return value with HAL_STATUS. @@ -3588,7 +3588,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/14/2011 09:55 Kordan> -Modified Files: +Modified Files: odm.c odm_HWConfig.c odm_HWConfig.h @@ -3596,7 +3596,7 @@ Modified Files: rtl8192C/rtl8192cu/Hal8192CUsbGen.c NDIS5/USB/usb_main.c NDIS6/USB/N6Usn_main.c - + Change Noet: 1. Put InitHalDM right after NicIFReadAdapter to avoid null adapter. 2. ODM_ConfigMACWithHeaderFile prototype changed. @@ -3606,12 +3606,12 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/13/2011 23:58 Georgia> -Modified Files: +Modified Files: odm.c odm_precomp.h rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/HalDMOutSrc8192D_CE.c - + Change Noet: 1. odm_DynamicTxPowerNIC integration. @@ -3620,7 +3620,7 @@ Verification Before Checked-IN 2. 8188CUS Autotest ok. ---------------------------------------------------------------------------------------------- <12/13/2011 20:00 Georgia> -Modified Files: +Modified Files: odm.c odm.h odm_HWConfig.h @@ -3629,7 +3629,7 @@ Modified Files: rtl8192c/HalDMOutSrc8192C_CE.h rtl8192d/HalDMOutSrc8192D_CE.c rtl8192d/HalDMOutSrc8192D_CE.h - + Change Noet: 1. Fix compiler error in CE platform @@ -3638,7 +3638,7 @@ Verification Before Checked-IN 2. 8188CUS Autotest(with PS-IPS/LPS) ok. ---------------------------------------------------------------------------------------------- <12/12/2011 20:01 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3649,7 +3649,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/12/2011 14:30 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3659,7 +3659,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/09/2011 14:30 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3669,17 +3669,17 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/07/2011 22:33 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Revise SW antenna diversity atchitecture. Verification Before Checked-IN 1. N5/N62 buildall OK 2. 92CU win7 ping WPA2-AES AP ok. - + ---------------------------------------------------------------------------------------------- <12/07/2011 19:16 Mingzhi> -Modified Files: +Modified Files: odm.h odm.c @@ -3693,7 +3693,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/07/2011 17:00 Kordan> -Modified Files: +Modified Files: odm_HWConfig.c odm.h @@ -3707,7 +3707,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/07/2011 16:55 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Enable all support abilit for chanel emurator test in MP driver. 2. Fix BSOD in Edca turbo scheme. @@ -3719,7 +3719,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/07/2011 13:10 Kordan> -Modified Files: +Modified Files: odm_interface.c odm_interface.h odm_HWConfig.c @@ -3729,10 +3729,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK - + ---------------------------------------------------------------------------------------------- <12/07/2011 13:10 Kordan> -Modified Files: +Modified Files: odm_interface.c odm_interface.h odm_HWConfig.c @@ -3743,10 +3743,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK - + ---------------------------------------------------------------------------------------------- <12/06/2011 14:40 Kordan> -Modified Files: +Modified Files: odm_HWConfig.h odm_precomp.h rtl8723/* @@ -3758,10 +3758,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK - + ---------------------------------------------------------------------------------------------- <12/05/2011 20:20 LukeLee> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3773,7 +3773,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/02/2011 20:25 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Merge MP code base from V1990 to V2218. 2. Support 88E and 8812 Jaguar code base for MP. @@ -3807,7 +3807,7 @@ Modified Files: Change Noet: 1. Use ODM_REG for EDCA_PARAM registers. - 2. Buug fix: correct SupportICType in ADSL path, remove REG_NAMING_RULE_TEST + 2. Buug fix: correct SupportICType in ADSL path, remove REG_NAMING_RULE_TEST and ODM_RegisterOffsetTestFunction(). 3. Disable ODM_GlobalDebugLevel and ODM_GlobalDebugComponents. @@ -3818,7 +3818,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/01/2011 16:40 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Fix compiler error in V92 for different declaration. @@ -3828,9 +3828,9 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/01/2011 16:30 MH_Chen> -Modified Files: +Modified Files: Change Noet: - 1. Revise debug module to fix compile error. + 1. Revise debug module to fix compile error. 2. Fix BSOD in MP EDUCA init case temporarily. Verification Before Checked-IN @@ -3845,7 +3845,7 @@ Modified Files: odm_debug.h Change Noet: - 1. ODM_CmnInfoUpdate(): add ODM_CMNINFO_DBG_COMP/ODM_CMNINFO_DBG_LEVEL to + 1. ODM_CmnInfoUpdate(): add ODM_CMNINFO_DBG_COMP/ODM_CMNINFO_DBG_LEVEL to update DebugComponents/DebugLevel. Verification Before Checked-IN @@ -3878,7 +3878,7 @@ Change Noet: Verification Before Checked-IN 1.CE Platform make ok - + ---------------------------------------------------------------------------------------------- <11/30/2011 23:40 Georgia> Modified Files: @@ -3896,7 +3896,7 @@ Change Noet: Verification Before Checked-IN 1.CE Platform make ok - + ---------------------------------------------------------------------------------------------- <11/30/2011 23:20 Georgia> Modified Files: @@ -3942,7 +3942,7 @@ Modified Files: odm.h Change Notes: - 1. Merge SW AntDiv + 1. Merge SW AntDiv Verification Before Checked-IN 1. BuildAll ok. @@ -3953,7 +3953,7 @@ Modified Files: PrecompInc.h Change Notes: - 1. 8192CS compilation error fixed + 1. 8192CS compilation error fixed Verification Before Checked-IN 1. BuildAll ok. @@ -3995,7 +3995,7 @@ Change Notes: 3. The bug of transferring FW Binary to HW image is fixed. Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/28/2011 14:00 Kordan> Modified Files: @@ -4007,7 +4007,7 @@ Change Notes: 2. Replace COMP_INIT, DBG_LOUD with ODM-prefixed definition Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/28/2011 11:30 Kordan> Modified Files: @@ -4021,7 +4021,7 @@ Change Notes: 3. Minor bugs fixed Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/25/2011 20:45 Annie> Modified Files: @@ -4060,7 +4060,7 @@ Modified Files: rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/HalDMOutSrc8192D_CE.c rtl8192d/HalDMOutSrc8192D_CE.h - + Change Notes: 1. remove related pack(1) statement. 2. add sleep/delay funcs. @@ -4088,7 +4088,7 @@ Change Notes: 3. Arguments of Image2Header.exe now are case-insensitive. Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/24/2011 21:12 button> @@ -4122,7 +4122,7 @@ Verification Before Checked-IN <11/23/2011 22:30 LukeLee> Modified Files: HW_Integration_Status_Luke.xls - odm.c + odm.c odm_RTL8192D.c odm_debug.c odm_HWConfig.c @@ -4139,7 +4139,7 @@ Verification Before Checked-IN <11/23/2011 17:30 LukeLee> Modified Files: HW_Integration_Status_Luke.xls - odm.c + odm.c odm.h odm_debug.c odm_HWConfig.c @@ -4167,7 +4167,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/21/2011 15:50 Mingzhi> Modified Files: - odm.c + odm.c odm.h Change Notes: @@ -4182,14 +4182,14 @@ Verification Before Checked-IN Modified Files: Image2Header.exe odm_HWConfig.c - odm_precomp.h + odm_precomp.h Change Notes: 1. Add three ODM_ConfigXxxWithHeaderFile(...) APIs in odm_HWConfig.c. 2. Image2Header.exe is updated. 3. Notes: a. HWImg header files should be included in OUTSRC\odm_precomp.h - b. HWImg source files should be added in source file, + b. HWImg source files should be added in source file, for example, HAL\rtl8192C\rtl8192cu\sources.WlanU.Win c. By now, text files under the folders are just for testing. @@ -4256,7 +4256,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/18/2011 17:50 LukeLee> -Modified Files: +Modified Files: Change Notes: 1. Move bLinked and RSSI_Min to ODM_CmnInfoUpdate() @@ -4277,7 +4277,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/18/2011 00:01 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Support ODM PHY status query. @@ -4288,7 +4288,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/17/2011 23:15 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Add more universal interface template and MP can work. @@ -4298,7 +4298,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/17/2011 21:06 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Revise #include flow to be compatiable with other SW team. @@ -4310,18 +4310,18 @@ Verification Before Checked-IN <11/17/2011 20:30 LukeLee> Modified Files: HW_Itegration_Status.xls - + Change Notes: - 1. update status + 1. update status Verification Before Checked-IN None ---------------------------------------------------------------------------------------------- <11/17/2011 16:48 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Add new API for spin lock and memory allocate. - 2. Revise MP include flow to default setting. + 2. Revise MP include flow to default setting. Verification Before Checked-IN 1. N5/N62 buildall ok. @@ -4333,8 +4333,8 @@ Modified Files: odm.c Change Notes: - 1. fix a bug in dynamic_early_mode - + 1. fix a bug in dynamic_early_mode + Verification Before Checked-IN 1. MP platfrom N5 build ok @@ -4347,7 +4347,7 @@ Modified Files: Change Notes: 1. add variable bDefAdapter_APMode/bDefAdapter_ClientMode/bExtAdapter_APMode/bExtClientMode in Common info 2. remove ACTING_AS_AP() from dynamic_early_mode - + Verification Before Checked-IN 1. MP platfrom N5 build ok @@ -4361,13 +4361,13 @@ Change Notes: 2. Add new Image2Header.exe to SVN Verification Before Checked-IN - 1. Usage: Image2Header.exe IC_TYPE FILE_TYPE - - Example: If you want to convert text files in OUTSRC/rtl8192cu/BB/, - you could type the following command. The output files will be + 1. Usage: Image2Header.exe IC_TYPE FILE_TYPE + + Example: If you want to convert text files in OUTSRC/rtl8192cu/BB/, + you could type the following command. The output files will be put under OUTSRC/rtl8192cu/. $ Image2Header.exe rtl8192cu BB (case-sensitive) - + ---------------------------------------------------------------------------------------------- <17/11/2011 10:34 Mingzhi> Modified Files: @@ -4380,12 +4380,12 @@ Verification Before Checked-IN 1. MP platfrom N5 build ok ---------------------------------------------------------------------------------------------- <11/16/2011 22:22 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Revise Dual mac band definition to prevent scan fail. Need to adjust later. Verification Before Checked-In: - 1. MP platform N5/N62 build ok. + 1. MP platform N5/N62 build ok. 2. 92CU/92CE ping with open AP ok. But CU scan stop after a while. ---------------------------------------------------------------------------------------------- @@ -4399,7 +4399,7 @@ Modified Files: Change Notes: 1. Move AP team's tx power control to ODM module 2. rename macro IS_STA_VALID - 3. GlobalDebugComponents => ODM_GlobalDebugComponents , + 3. GlobalDebugComponents => ODM_GlobalDebugComponents , GlobalDebugLevel => ODM_GlobalDebugLevel Verification Before Checked-In: @@ -4426,7 +4426,7 @@ Change Notes: Verification Before Checked-In: 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) 2. 88CE Win7X86 cannot show scan list since v0049 3. #include <../Mp_Promcomp.h> is not allowable in MP platform @@ -4440,7 +4440,7 @@ Change Notes: Verification Before Checked-In: 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) ---------------------------------------------------------------------------------------------- <11/15/2011 13:00 LukeLee> @@ -4460,7 +4460,7 @@ Change Notes: Verification Before Checked-In: 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) ---------------------------------------------------------------------------------------------- <11/14/2011 21:15 button> @@ -4478,7 +4478,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/14/2011 16:50 MH_Chen> Modified Files: - odm.h + odm.h odm.c odm_debug.c odm_HWConfig.c @@ -4488,12 +4488,12 @@ Change Notes: 2. Revise some universal interface definition compatiable with other SW team. Verification Before Checked-In: - 1. MP platform N5/N62 build ok. + 1. MP platform N5/N62 build ok. ---------------------------------------------------------------------------------------------- <11/14/2011 13:00 LukeLee> Modified Files: - odm.h + odm.h odm.c odm_debug.c odm_HWConfig.c @@ -4503,8 +4503,8 @@ Change Notes: 2. add odm_IsLinked() and odm_InitCommonInfo() for ODM internal common info Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <14/11/2011 10:56 Mingzhi> Modified Files: @@ -4515,12 +4515,12 @@ Change Notes: Verification Before Checked-IN 1. MP platfrom N5 build ok - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/11/2011 17:20 LukeLee> Modified Files: - odm.h + odm.h odm.h odm_debug.h odm_HWConfig.c @@ -4530,11 +4530,11 @@ Change Notes: 2. Define debug tracing components Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/11/2011 10:00 LukeLee> -Modified Files: +Modified Files: odm.h Change Notes: @@ -4546,7 +4546,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/10/2011 23:00 LukeLee> Modified Files: - odm.c + odm.c odm.h Change Notes: @@ -4557,27 +4557,27 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/10/2011 16:40 MH_Chen> -Modified Files: +Modified Files: odm.c - odm.h + odm.h Change Notes: - 1. bRFPathRxEnable ·Q¤@¤U¡A³oÀ³¸Ó¬O³]©w¬° ODM write variable¡A©Ò¦³ team ³£¤£»Ý­n³]©w¤~¹ï¡A - ¦pªG±q§Ú­Ìªº HAL copy ¹L¥hÀ³¸Ó¤£¦X²z¡C©Ò¥HÀ³¸Ó¬O¦b ODM ¤§¤¤update ³o­Óvalue µ¹ PHY query ®É¨Ï¥Î¡A - ­ì¥» code base ¤]¦³¤]»~¡A§Ú­ÌÀ³¸Ó§ï¬° bit oriented coding style¡A³o³¡¤À§Ú·| update¡C - 2. MacPhyMode ­×§ï¦¨ ptr reference¡A¥Ø«e¥u¦³MP¥Î¨ä¥Lteam follow - 3. BTCoexist ­×§ï¦¨ ptr reference ­×§ï¦¨¥u¦³ ON/OFF boolean ¿ï¾Ü¡A¥Ñ©ó¦³¥i¯à¦³ driver ³¡¤ä´©¡A - §Ú©w¸q¤@­Ó pseudo ptr in DM structure for all team reference?¡C - 4. ¤U­±¥þ³¡²¾¬° prt reference¡A¥u¦³ init ³]©w¤@¦¸¡C - 5. ¤U­±«ØÄ³¤]¥Ñ run-time ³]©w­È¡A­×§ï¬° ptr reference¡A¤§«á HAL ¦@¥Î®É´N­×§ï¤ñ¸û¤p~~~!! - 6. ¥Ñ©ó§ó°Ê¤@¨Çptr ³]©w¡A¥i¯à·|Åý¨ä¥Lteam compile¤£¹LÁÙ½ÐÀ°¦£~~~!!! ¤£¾å±o¤W­±«ØÄ³¬O§_¥i¥H support °Ú?? ¦pªG¤£¦æÁٽЭקï execel ¬[ºc¡AÁÂÁ¡C - 7. §Ú­Ì¤U¦¸»Ý­n review ¤@¤U­þ¨Ç¬O ODM/Driver write ¤Á³Î¤@¤Uµ²ºc³W¹º¡C + 1. bRFPathRxEnable �Q�@�U�A�o���ӬO�]�w�� ODM write variable�A�Ҧ� team �����ݭn�]�w�~��A + �p�G�q�ڭ̪� HAL copy �L�h���Ӥ��X�z�C�ҥH���ӬO�b ODM ����update �o��value �� PHY query �ɨϥΡA + �쥻 code base �]���]�~�A�ڭ����ӧאּ bit oriented coding style�A�o�����ڷ| update�C + 2. MacPhyMode �ק令 ptr reference�A�ثe�u��MP�Ψ�Lteam follow + 3. BTCoexist �ק令 ptr reference �ק令�u�� ON/OFF boolean ��ܡA�ѩ󦳥i�঳ driver ���䴩�A + �کw�q�@�� pseudo ptr in DM structure for all team reference?�C + 4. �U���������� prt reference�A�u�� init �]�w�@���C + 5. �U����ij�]�� run-time �]�w�ȡA�קאּ ptr reference�A���� HAL �@�ήɴN�ק����p~~~!! + 6. �ѩ��ʤ@��ptr �]�w�A�i��|����Lteam compile���L�ٽ�����~~~!!! ����o�W����ij�O�_�i�H support ��?? �p�G�����ٽЭק� execel �[�c�A���¡C + 7. �ڭ̤U���ݭn review �@�U���ǬO ODM/Driver write ���Τ@�U���c�W���C Verification Before Checked-In: 1. N5N62 buildall ok. ---------------------------------------------------------------------------------------------- <11/09/2011 23:10 Annie> -Modified Files: +Modified Files: odm.c odm.h odm_interface.h @@ -4599,10 +4599,10 @@ Modified Files: Change Notes: 1. clean compile errors - + Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/09/2011 22:00 LukeLee> Modified Files: @@ -4611,10 +4611,10 @@ Modified Files: Change Notes: 1. Merge DIG function into ODM structure - + Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/09/2011 21:45 Button> Modified Files: @@ -4631,7 +4631,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/09/2011 17:00 LukeLee> -Removed Files: +Removed Files: HalDMOutSrc.c HalDMOutSrc.h HalHWOutSrc.c @@ -4649,14 +4649,14 @@ Change Notes: HalHWOutSrc.c/h -> odm_HWConfig.c/h 2. add common info for BTDM and DMSP 3. remove compile errors in MP platform - + Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/09/2011 14:40 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h HalHWOutSrc.c @@ -4667,25 +4667,25 @@ Change Notes: 1. Revise related source of odm_DynamicBBPowerSaving for MP driver compile ok. 2. Removed useless code of CE team driver. 3. Revise customer id for AP/ADSL driver compiler ok. - + Verification Before Checked-In: - 1. CE platform build ok. - + 1. CE platform build ok. + ---------------------------------------------------------------------------------------------- <11/08/2011 14:20 Georgia> -Modified Files: +Modified Files: HalHWOutSrc.c HalHWOutSrc.h Change Notes: 1. Removed useless code. - + Verification Before Checked-In: - 1. CE platform build ok. - + 1. CE platform build ok. + ---------------------------------------------------------------------------------------------- <11/08/2011 12:00 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h HalHWOutSrc.c @@ -4693,13 +4693,13 @@ Modified Files: Change Notes: 1. fixed phy_staus parsing error in func odm_RxPhyStatus92CSeries_Parsing - + Verification Before Checked-In: - 1. CE platform build ok. + 1. CE platform build ok. ---------------------------------------------------------------------------------------------- <11/07/2011 17:00 LukeLee> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h @@ -4708,12 +4708,12 @@ Change Notes: 2. divide common info OPMode into several BOOLEAN variables Verification Before Checked-In: - 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_interface.c/HalDMOutSrc.c/HalHWOutSrc.c) + 1. MP platform build ok. + (need to include Mp_Precomp.h in odm_interface.c/HalDMOutSrc.c/HalHWOutSrc.c) ---------------------------------------------------------------------------------------------- <11/04/2011 16:14 Annie> -Modified Files: +Modified Files: odm_interface.h Change Notes: @@ -4725,7 +4725,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/04/2011 13:23 Annie> -Modified Files: +Modified Files: odm_interface.h Change Notes: @@ -4740,7 +4740,7 @@ Verification Before Checked-In: New Files: rtl8195/Hal8195Reg.h odm_reg.h -Modified Files: +Modified Files: rtl8188e/Hal8188EReg.h rtl8192c/Hal8192CReg.h rtl8192d/Hal8192DReg.h @@ -4761,7 +4761,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/02/2011 22:47 MH_Chen> -Modified Files: +Modified Files: HAL\rtl8192C\sources.WlanE/U/S HAL\HalDM.c Change Notes: @@ -4777,7 +4777,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/02/2011 21:30 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.h rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/HalDMOutSrc8192D_CE.c @@ -4791,7 +4791,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/02/2011 20:00 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.h HalHWOutSrc.c odm_types.h @@ -4809,8 +4809,8 @@ Verification Before Checked-In: New Files: HalHWOutSrc.c HalHWOutSrc.h - -Modified Files: + +Modified Files: HalDMOutSrc.c HalDMOutSrc.h odm_debug.c @@ -4823,11 +4823,11 @@ Modified Files: rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/Hal8192DReg.h rtl8192d/HalDMOutSrc8192D_CE.c - + Removed Files: rtl8192c/odm_phy_info.h rtl8192d/odm_phy_info.h - + Change Notes: 1. Add Func ODM_PhyStatusQuery. 2. Modify INT8/INT16.. series declaration. @@ -4963,44 +4963,44 @@ Verification Before Checked-In: <10/21/2011 18:26 MH> New Files: Add odm debug & interface . -Modified Files: +Modified Files: Change Notes: 1. Support ODM independent I/O and debug interface. Verification Before Checked-In: - 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) + 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) ---------------------------------------------------------------------------------------------- <10/21/2011 16:20 Georgia> New Files: rtl8192c/odm_phy_info.h rtl8192d/odm_phy_info.h -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h odm_precomp.h odm_types.h Change Notes: - 1. Add data struct declaration of phy_info and rx_desc(must discuss the data member declaration method which different HW interface). + 1. Add data struct declaration of phy_info and rx_desc(must discuss the data member declaration method which different HW interface). 2. Add related statement for pack(1). - 3. Fixed some compiler warning and error in linux platform. + 3. Fixed some compiler warning and error in linux platform. Verification Before Checked-In: 1. CE make ok. ---------------------------------------------------------------------------------------------- <10/20/2011 23:44 MH> -Modified Files: +Modified Files: HAL\OUTSRC\HalDMOutSrc.c\h HAL\HalDM.c HEADER\TypeDef.h Change Notes: - 1. Add common info interface init/hook/update/array pointer hook. + 1. Add common info interface init/hook/update/array pointer hook. 2. MP driver can hook all common info interface. You can refer to API dm_ODMStructureInit() - 3. Revise code architecture for common interface hook readbility. + 3. Revise code architecture for common interface hook readbility. Verification Before Checked-In: - 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) + 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) ---------------------------------------------------------------------------------------------- <10/20/2011 21:30 LukeLee> @@ -5044,7 +5044,7 @@ Verification Before Checked-In: <10/13/2011 21:40 Georgia> New Files: - + Modified Files: HalDMOutSrc.c HalDMOutSrc.h @@ -5097,7 +5097,7 @@ Modified Files: Change Notes: 1. Modify common code for ADSL project compiler. - - Add a workaround flag: "ADSL_AP_BUILD_WORKAROUND", + - Add a workaround flag: "ADSL_AP_BUILD_WORKAROUND", it should be eliminated before final stage. Verification Before Checked-In: @@ -5105,7 +5105,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <10/07/2011 17:12 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h odm_types.h @@ -5119,7 +5119,7 @@ Change Notes: Verification Before Checked-In: 1. CE Team linux driver make ok. - + ---------------------------------------------------------------------------------------------- <10/06/2011 22:12 Jensonlee> Modified Files: @@ -5140,7 +5140,7 @@ Change Notes: Verification Before Checked-In: 1. AP platform 8196c+8192c build ok, connect with STA ok. - + ---------------------------------------------------------------------------------------------- <10/06/2011 21:22 Annie> Modified Files: @@ -5150,18 +5150,18 @@ Modified Files: 3. rtl8192c/Hal8192CEPHYImg_ADSL.h 4. odm_types.h -Change Notes: +Change Notes: 1. Update parameter files: try to sync with sd7 ODM svn. Verification Before Checked-In: - 1. ADSL platform make ok. + 1. ADSL platform make ok. ---------------------------------------------------------------------------------------------- <10/05/2011 22:50 Luke> New Files: Modified Files: /HalDMOutSrc.h -Change Notes: +Change Notes: 1. Add common info and STA structure Verification Before Checked-In: @@ -5176,34 +5176,34 @@ New Files: 3. Hal8192CEPHYImg_ADSL.c 4. Hal8192CEPHYImg_ADSL.h -Change Notes: +Change Notes: 1. Add 8192ce MAC/BB/RF parameter files for current ADSL platform. Verification Before Checked-In: - 1. ADSL platform make ok. + 1. ADSL platform make ok. ---------------------------------------------------------------------------------------------- <10/05/2011 12:00 Georgia> -New Files: +New Files: Modified Files: -Change Notes: +Change Notes: 1. Add odm_types.h. - 2. Remove useless img files. - + 2. Remove useless img files. + Verification Before Checked-In: - 1. CE Team linux driver make ok. + 1. CE Team linux driver make ok. ---------------------------------------------------------------------------------------------- <09/30/2011 17:50 MH_Chen> -New Files: +New Files: Modified Files: -Change Notes: +Change Notes: 1. Revise HW integration architecture. 2. Add MAC relative image.c. - 3. Update the newest HW parameters. - + 3. Update the newest HW parameters. + Verification Before Checked-In: - 1. Windows N5/N62 compiler buildall ok. + 1. Windows N5/N62 compiler buildall ok. ---------------------------------------------------------------------------------------------- <09/23/2011 11:30 Georgia> @@ -5225,16 +5225,16 @@ New Files: rtl8192d/HalDMOutSrc8192D_CE.c rtl8192d/HalDMOutSrc8192D_CE.h Modified Files: -Change Notes: - 1. Add related files for SD4- NIC Linux - +Change Notes: + 1. Add related files for SD4- NIC Linux + Verification Before Checked-In: - 1. CE,CU,DE,DU buildall ok. + 1. CE,CU,DE,DU buildall ok. ---------------------------------------------------------------------------------------------- <09/22/2011 23:09 MH_Chen> New Files: Modified Files: -Change Notes: +Change Notes: 1. Revise batch file for MP driver PCIE/USB/SDIO compile pass. 2. Revise all architecture for differemt team shaer common iinterface. 3. Revise coding style for readbility. @@ -5248,7 +5248,7 @@ Verification Before Checked-In: <09/20/2011 23:01 MH_Chen> New Files: Modified Files: -Change Notes: +Change Notes: 1. Add new out source interface for AP/Linux/ADSL/Windows team. HAL\OUTSRC ==> common interface HAL\OUTSRC\rtl8192c ==> independent out src files for different team temporarily. diff --git a/network/wlan/WDI/HAL/phydm/halhwimg.h b/network/wlan/WDI/HAL/phydm/halhwimg.h index 4c5c88160..a77a62856 100644 --- a/network/wlan/WDI/HAL/phydm/halhwimg.h +++ b/network/wlan/WDI/HAL/phydm/halhwimg.h @@ -29,7 +29,7 @@ #define RTL8188EE_HWIMG_SUPPORT 0 #define RTL8188EU_HWIMG_SUPPORT 0 #define RTL8188ES_HWIMG_SUPPORT 0 - + #elif (DEV_BUS_TYPE == RT_USB_INTERFACE) // For 92C #define RTL8192CE_HWIMG_SUPPORT 0 @@ -52,7 +52,7 @@ #define RTL8188EE_HWIMG_SUPPORT 0 #define RTL8188EU_HWIMG_SUPPORT 0 #define RTL8188ES_HWIMG_SUPPORT 0 - + #elif (DEV_BUS_TYPE == RT_SDIO_INTERFACE) // For 92C #define RTL8192CE_HWIMG_SUPPORT 0 @@ -102,7 +102,7 @@ #define RTL8188EU_HWIMG_SUPPORT 0 #define RTL8188ES_HWIMG_SUPPORT 0 - #else + #else // For 8723 #define RTL8723E_HWIMG_SUPPORT 1 diff --git a/network/wlan/WDI/HAL/phydm/halphyrf_ap.h b/network/wlan/WDI/HAL/phydm/halphyrf_ap.h index 5fc91594d..835011fd5 100644 --- a/network/wlan/WDI/HAL/phydm/halphyrf_ap.h +++ b/network/wlan/WDI/HAL/phydm/halphyrf_ap.h @@ -17,10 +17,10 @@ * * ******************************************************************************/ - + #ifndef __HAL_PHY_RF_H__ #define __HAL_PHY_RF_H__ - + typedef enum _PWRTRACK_CONTROL_METHOD { BBSWING, @@ -37,13 +37,13 @@ typedef VOID (*FuncSwing)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); typedef VOID (*FuncSwing8814only)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); typedef struct _TXPWRTRACK_CFG { - u1Byte SwingTableSize_CCK; + u1Byte SwingTableSize_CCK; u1Byte SwingTableSize_OFDM; u1Byte Threshold_IQK; - u1Byte Threshold_DPK; + u1Byte Threshold_DPK; u1Byte AverageThermalNum; u1Byte RfPathCount; - u4Byte ThermalRegAddr; + u4Byte ThermalRegAddr; FuncSetPwr ODM_TxPwrTrackSetPwr; FuncIQK DoIQK; FuncLCK PHY_LCCalibrate; @@ -51,7 +51,7 @@ typedef struct _TXPWRTRACK_CFG { FuncSwing8814only GetDeltaSwingTable8814only; } TXPWRTRACK_CFG, *PTXPWRTRACK_CFG; -VOID +VOID ConfigureTxpowerTrack( IN PVOID pDM_VOID, OUT PTXPWRTRACK_CFG pConfig @@ -67,7 +67,7 @@ ODM_TXPowerTrackingCallback_ThermalMeter( #endif ); -#if (RTL8192E_SUPPORT==1) +#if (RTL8192E_SUPPORT==1) VOID ODM_TXPowerTrackingCallback_ThermalMeter_92E( #if (DM_ODM_SUPPORT_TYPE & ODM_AP) @@ -112,24 +112,24 @@ ODM_TXPowerTrackingCallback_ThermalMeter_JaguarSeries( void PHY_SetMonitorMode8192C(IN PADAPTER pAdapter, IN BOOLEAN bEnableMonitorMode ); - + // // IQ calibrate // -void -PHY_IQCalibrate_8192C( IN PADAPTER pAdapter, +void +PHY_IQCalibrate_8192C( IN PADAPTER pAdapter, IN BOOLEAN bReCovery); - + // // LC calibrate // -void +void PHY_LCCalibrate_8192C( IN PADAPTER pAdapter); // // AP calibrate // -void +void PHY_APCalibrate_8192C( IN PADAPTER pAdapter, IN s1Byte delta); #endif @@ -141,13 +141,13 @@ VOID ODM_ResetIQKResult( IN PVOID pDM_VOID ); -u1Byte +u1Byte ODM_GetRightChnlPlaceforIQK( IN u1Byte chnl ); void phydm_rf_init(IN PVOID pDM_VOID); void phydm_rf_watchdog(IN PVOID pDM_VOID); - + #endif // #ifndef __HAL_PHY_RF_H__ diff --git a/network/wlan/WDI/HAL/phydm/halphyrf_ce.h b/network/wlan/WDI/HAL/phydm/halphyrf_ce.h index 9e95d9558..0f4bef0cf 100644 --- a/network/wlan/WDI/HAL/phydm/halphyrf_ce.h +++ b/network/wlan/WDI/HAL/phydm/halphyrf_ce.h @@ -17,10 +17,10 @@ * * ******************************************************************************/ - + #ifndef __HAL_PHY_RF_H__ #define __HAL_PHY_RF_H__ - + typedef enum _SPUR_CAL_METHOD { PLL_RESET, AFE_PHASE_SEL @@ -40,13 +40,13 @@ typedef VOID (*FuncSwing)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); typedef VOID (*FuncSwing8814only)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); typedef struct _TXPWRTRACK_CFG { - u1Byte SwingTableSize_CCK; + u1Byte SwingTableSize_CCK; u1Byte SwingTableSize_OFDM; - u1Byte Threshold_IQK; + u1Byte Threshold_IQK; u1Byte Threshold_DPK; u1Byte AverageThermalNum; u1Byte RfPathCount; - u4Byte ThermalRegAddr; + u4Byte ThermalRegAddr; FuncSetPwr ODM_TxPwrTrackSetPwr; FuncIQK DoIQK; FuncLCK PHY_LCCalibrate; @@ -83,13 +83,13 @@ VOID ODM_ResetIQKResult( IN PVOID pDM_VOID ); -u1Byte +u1Byte ODM_GetRightChnlPlaceforIQK( IN u1Byte chnl ); void phydm_rf_init( IN PVOID pDM_VOID); void phydm_rf_watchdog( IN PVOID pDM_VOID); - + #endif // #ifndef __HAL_PHY_RF_H__ diff --git a/network/wlan/WDI/HAL/phydm/halphyrf_win.h b/network/wlan/WDI/HAL/phydm/halphyrf_win.h index b7aa4bbbe..2ec28c047 100644 --- a/network/wlan/WDI/HAL/phydm/halphyrf_win.h +++ b/network/wlan/WDI/HAL/phydm/halphyrf_win.h @@ -17,10 +17,10 @@ * * ******************************************************************************/ - + #ifndef __HAL_PHY_RF_H__ #define __HAL_PHY_RF_H__ - + typedef enum _SPUR_CAL_METHOD { PLL_RESET, AFE_PHASE_SEL @@ -41,13 +41,13 @@ typedef VOID (*FuncSwing)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); typedef VOID (*FuncSwing8814only)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); typedef struct _TXPWRTRACK_CFG { - u1Byte SwingTableSize_CCK; + u1Byte SwingTableSize_CCK; u1Byte SwingTableSize_OFDM; u1Byte Threshold_IQK; - u1Byte Threshold_DPK; + u1Byte Threshold_DPK; u1Byte AverageThermalNum; u1Byte RfPathCount; - u4Byte ThermalRegAddr; + u4Byte ThermalRegAddr; FuncSetPwr ODM_TxPwrTrackSetPwr; FuncIQK DoIQK; FuncLCK PHY_LCCalibrate; @@ -55,7 +55,7 @@ typedef struct _TXPWRTRACK_CFG { FuncSwing8814only GetDeltaSwingTable8814only; } TXPWRTRACK_CFG, *PTXPWRTRACK_CFG; -VOID +VOID ConfigureTxpowerTrack( IN PDM_ODM_T pDM_Odm, OUT PTXPWRTRACK_CFG pConfig @@ -83,9 +83,9 @@ ODM_TXPowerTrackingCallback_ThermalMeter( VOID ODM_ResetIQKResult( - IN PDM_ODM_T pDM_Odm + IN PDM_ODM_T pDM_Odm ); -u1Byte +u1Byte ODM_GetRightChnlPlaceforIQK( IN u1Byte chnl ); @@ -93,6 +93,6 @@ ODM_GetRightChnlPlaceforIQK( VOID odm_IQCalibrate(IN PDM_ODM_T pDM_Odm); VOID phydm_rf_init( IN PDM_ODM_T pDM_Odm); VOID phydm_rf_watchdog( IN PDM_ODM_T pDM_Odm); - + #endif // #ifndef __HAL_PHY_RF_H__ diff --git a/network/wlan/WDI/HAL/phydm/mp_precomp.h b/network/wlan/WDI/HAL/phydm/mp_precomp.h index 2e950cb2e..f3a61df75 100644 --- a/network/wlan/WDI/HAL/phydm/mp_precomp.h +++ b/network/wlan/WDI/HAL/phydm/mp_precomp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. diff --git a/network/wlan/WDI/HAL/phydm/phydm.h b/network/wlan/WDI/HAL/phydm/phydm.h index 492a4f2ac..f450ce9f3 100644 --- a/network/wlan/WDI/HAL/phydm/phydm.h +++ b/network/wlan/WDI/HAL/phydm/phydm.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -64,7 +64,7 @@ #endif //============================================================ -// Definition +// Definition //============================================================ // // 2011/09/22 MH Define all team supprt ability. @@ -139,7 +139,7 @@ typedef struct _WLAN_STA{ typedef struct _Dynamic_Primary_CCA{ u1Byte PriCCA_flag; u1Byte intf_flag; - u1Byte intf_type; + u1Byte intf_type; u1Byte DupRTS_flag; u1Byte Monitor_flag; u1Byte CH_offset; @@ -167,15 +167,15 @@ typedef enum _HT_IOT_PEER HT_IOT_PEER_RALINK = 4, HT_IOT_PEER_ATHEROS = 5, HT_IOT_PEER_CISCO = 6, - HT_IOT_PEER_MERU = 7, + HT_IOT_PEER_MERU = 7, HT_IOT_PEER_MARVELL = 8, HT_IOT_PEER_REALTEK_SOFTAP = 9,// peer is RealTek SOFT_AP, by Bohn, 2009.12.17 HT_IOT_PEER_SELF_SOFTAP = 10, // Self is SoftAP HT_IOT_PEER_AIRGO = 11, - HT_IOT_PEER_INTEL = 12, - HT_IOT_PEER_RTK_APCLIENT = 13, - HT_IOT_PEER_REALTEK_81XX = 14, - HT_IOT_PEER_REALTEK_WOW = 15, + HT_IOT_PEER_INTEL = 12, + HT_IOT_PEER_RTK_APCLIENT = 13, + HT_IOT_PEER_REALTEK_81XX = 14, + HT_IOT_PEER_REALTEK_WOW = 15, HT_IOT_PEER_MAX = 16 }HT_IOT_PEER_E, *PHTIOT_PEER_E; #endif @@ -209,7 +209,7 @@ __PACK typedef struct _ODM_Phy_Status_Info_ typedef struct _ODM_Phy_Status_Info_Append_ { - u1Byte MAC_CRC32; + u1Byte MAC_CRC32; }ODM_PHY_INFO_Append_T,*PODM_PHY_INFO_Append_T; @@ -218,13 +218,13 @@ typedef struct _ODM_Phy_Status_Info_Append_ typedef struct _ODM_Phy_Status_Info_ { // - // Be care, if you want to add any element please insert between + // Be care, if you want to add any element please insert between // RxPWDBAll & SignalStrength. // #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN)) - u4Byte RxPWDBAll; + u4Byte RxPWDBAll; #else - u1Byte RxPWDBAll; + u1Byte RxPWDBAll; #endif u1Byte SignalQuality; /* in 0-100 index. */ s1Byte RxMIMOSignalQuality[4]; /* per-path's EVM */ @@ -256,7 +256,7 @@ typedef struct _ODM_Phy_Status_Info_ typedef struct _ODM_Per_Pkt_Info_ { - //u1Byte Rate; + //u1Byte Rate; u1Byte DataRate; u1Byte StationID; BOOLEAN bPacketMatchBSSID; @@ -279,15 +279,15 @@ typedef struct _ODM_Phy_Dbg_Info_ #endif u1Byte NumQryBeaconPkt; //Others - s4Byte RxEVM[4]; - + s4Byte RxEVM[4]; + }ODM_PHY_DBG_INFO_T; typedef struct _ODM_Mac_Status_Info_ { u1Byte test; - + }ODM_MAC_INFO; // @@ -298,12 +298,12 @@ typedef struct _ODM_Mac_Status_Info_ typedef struct _ODM_STA_INFO{ // Driver Write BOOLEAN bUsed; // record the sta status link or not? - //u1Byte WirelessMode; // + //u1Byte WirelessMode; // u1Byte IOTPeer; // Enum value. HT_IOT_PEER_E // ODM Write //1 PHY_STATUS_INFO - u1Byte RSSI_Path[4]; // + u1Byte RSSI_Path[4]; // u1Byte RSSI_Ave; u1Byte RXEVM[4]; u1Byte RXSNR[4]; @@ -331,7 +331,7 @@ typedef struct _ODM_STA_INFO{ // // ODM Write Wilson will handle this part(said by Luke.Lee) //TX_RPT_T pTxRpt; // Define in IC folder. Move lower layer. -#if 0 +#if 0 //1 For 88E RA (don't redefine the naming) u1Byte rate_id; u1Byte rate_SGI; @@ -361,7 +361,7 @@ typedef enum _ODM_Common_Info_Definition { //-------------REMOVED CASE-----------// //ODM_CMNINFO_CCK_HP, - //ODM_CMNINFO_RFPATH_ENABLE, // Define as ODM write??? + //ODM_CMNINFO_RFPATH_ENABLE, // Define as ODM write??? //ODM_CMNINFO_BT_COEXIST, // ODM_BT_COEXIST_E //ODM_CMNINFO_OP_MODE, // ODM_OPERATION_MODE_E //-------------REMOVED CASE-----------// @@ -379,11 +379,11 @@ typedef enum _ODM_Common_Info_Definition ODM_CMNINFO_CUT_VER, // ODM_CUT_VERSION_E ODM_CMNINFO_FAB_VER, // ODM_FAB_E ODM_CMNINFO_RF_TYPE, // ODM_RF_PATH_E or ODM_RF_TYPE_E? - ODM_CMNINFO_RFE_TYPE, + ODM_CMNINFO_RFE_TYPE, ODM_CMNINFO_BOARD_TYPE, // ODM_BOARD_TYPE_E ODM_CMNINFO_PACKAGE_TYPE, ODM_CMNINFO_EXT_LNA, // TRUE - ODM_CMNINFO_5G_EXT_LNA, + ODM_CMNINFO_5G_EXT_LNA, ODM_CMNINFO_EXT_PA, ODM_CMNINFO_5G_EXT_PA, ODM_CMNINFO_GPA, @@ -405,7 +405,7 @@ typedef enum _ODM_Common_Info_Definition ODM_CMNINFO_TX_TP, ODM_CMNINFO_RX_TP, ODM_CMNINFO_SOUNDING_SEQ, - //-----------HOOK BEFORE REG INIT-----------// + //-----------HOOK BEFORE REG INIT-----------// // @@ -422,7 +422,7 @@ typedef enum _ODM_Common_Info_Definition ODM_CMNINFO_BW, // ODM_BW_E ODM_CMNINFO_CHNL, ODM_CMNINFO_FORCED_RATE, - + ODM_CMNINFO_DMSP_GET_VALUE, ODM_CMNINFO_BUDDY_ADAPTOR, ODM_CMNINFO_DMSP_IS_MASTER, @@ -445,7 +445,7 @@ typedef enum _ODM_Common_Info_Definition //------------CALL BY VALUE-------------// ODM_CMNINFO_WIFI_DIRECT, ODM_CMNINFO_WIFI_DISPLAY, - ODM_CMNINFO_LINK_IN_PROGRESS, + ODM_CMNINFO_LINK_IN_PROGRESS, ODM_CMNINFO_LINK, ODM_CMNINFO_STATION_STATE, ODM_CMNINFO_RSSI_MIN, @@ -460,7 +460,7 @@ typedef enum _ODM_Common_Info_Definition ODM_CMNINFO_BT_OPERATION, ODM_CMNINFO_BT_LIMITED_DIG, //Need to Limited Dig or not ODM_CMNINFO_BT_DIG, - ODM_CMNINFO_BT_BUSY, //Check Bt is using or not//neil + ODM_CMNINFO_BT_BUSY, //Check Bt is using or not//neil ODM_CMNINFO_BT_DISABLE_EDCA, #if(DM_ODM_SUPPORT_TYPE & ODM_AP) // for repeater mode add by YuChen 2014.06.23 #ifdef UNIVERSAL_REPEATER @@ -477,7 +477,7 @@ typedef enum _ODM_Common_Info_Definition ODM_CMNINFO_STA_STATUS, ODM_CMNINFO_PHY_STATUS, ODM_CMNINFO_MAC_STATUS, - + ODM_CMNINFO_MAX, @@ -509,20 +509,20 @@ typedef enum _ODM_Support_Ability_Definition ODM_BB_NHM_CNT = BIT15, ODM_BB_PRIMARY_CCA = BIT16, ODM_BB_TXBF = BIT17, - + // // MAC DM section BIT 20-23 // ODM_MAC_EDCA_TURBO = BIT20, ODM_MAC_EARLY_MODE = BIT21, - + // // RF ODM section BIT 24-31 // ODM_RF_TX_PWR_TRACK = BIT24, ODM_RF_RX_GAIN_TRACK = BIT25, ODM_RF_CALIBRATION = BIT26, - + }ODM_ABILITY_E; //Move some non-DM enum,define, struc. form phydm.h to phydm_types.h by Dino @@ -537,7 +537,7 @@ typedef enum tag_CCA_Path //move RAInfo to Phydm_RaInfo.h -//Remove struct PATHDIV_PARA to odm_PathDiv.h +//Remove struct PATHDIV_PARA to odm_PathDiv.h //Remove struct to odm_PowerTracking.h by YuChen // @@ -557,9 +557,9 @@ typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE{ // #if(DM_ODM_SUPPORT_TYPE & ODM_WIN) #if (RT_PLATFORM != PLATFORM_LINUX) -typedef +typedef #endif - + struct DM_Out_Source_Dynamic_Mechanism_Structure #else// for AP,ADSL,CE Team typedef struct DM_Out_Source_Dynamic_Mechanism_Structure @@ -581,21 +581,21 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure // ADSL_AP_BUILD_WORKAROUND ADAPTER fake_adapter; #endif - + PHY_REG_PG_TYPE PhyRegPgValueType; u1Byte PhyRegPgVersion; u8Byte DebugComponents; u4Byte DebugLevel; - + u4Byte NumQryPhyStatusAll; //CCK + OFDM - u4Byte LastNumQryPhyStatusAll; + u4Byte LastNumQryPhyStatusAll; u4Byte RxPWDBAve; BOOLEAN MPDIG_2G; //off MPDIG u1Byte Times_2G; - + //------ ODM HANDLE, DRIVER NEEDS NOT TO HOOK------// - BOOLEAN bCckHighPower; + BOOLEAN bCckHighPower; u1Byte RFPathRxEnable; // ODM_CMNINFO_RFPATH_ENABLE u1Byte ControlChannel; //------ ODM HANDLE, DRIVER NEEDS NOT TO HOOK------// @@ -617,22 +617,22 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure // // Init Value // -//-----------HOOK BEFORE REG INIT-----------// +//-----------HOOK BEFORE REG INIT-----------// // ODM Platform info AP/ADSL/CE/MP = 1/2/3/4 - u1Byte SupportPlatform; + u1Byte SupportPlatform; // ODM Support Ability DIG/RATR/TX_PWR_TRACK/ ¡K¡K = 1/2/3/¡K u4Byte SupportAbility; // ODM PCIE/USB/SDIO = 1/2/3 - u1Byte SupportInterface; + u1Byte SupportInterface; // ODM composite or independent. Bit oriented/ 92C+92D+ .... or any other type = 1/2/3/... - u4Byte SupportICType; + u4Byte SupportICType; // Cut Version TestChip/A-cut/B-cut... = 0/1/2/3/... u1Byte CutVersion; // Fab Version TSMC/UMC = 0/1 u1Byte FabVersion; // RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... u1Byte RFType; - u1Byte RFEType; + u1Byte RFEType; // Board Type Normal/HighPower/MiniCard/SLIM/Combo/... = 0/1/2/3/4/... u1Byte BoardType; u1Byte PackageType; @@ -661,17 +661,17 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure u1Byte odm_Regulation5G; u1Byte IQKFWOffload; BOOLEAN cck_new_agc; -//-----------HOOK BEFORE REG INIT-----------// +//-----------HOOK BEFORE REG INIT-----------// // // Dynamic Value - // + // //--------- POINTER REFERENCE-----------// u1Byte u1Byte_temp; BOOLEAN BOOLEAN_temp; PADAPTER PADAPTER_temp; - + // MAC PHY Mode SMSP/DMSP/DMDP = 0/1/2 u1Byte *pMacPhyMode; //TX Unicast byte count @@ -692,7 +692,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure u1Byte *pChannel; //central channel number BOOLEAN DPK_Done; // Common info for 92D DMSP - + BOOLEAN *pbGetValueFromOtherMac; PADAPTER *pBuddyAdapter; BOOLEAN *pbMasterOfDMSP; //MAC0: master, MAC1: subordinate @@ -711,7 +711,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure BOOLEAN *pIs1Antenna; u1Byte *pRFDefaultPath; // 0:S1, 1:S0 - + //--------- POINTER REFERENCE-----------// pu2Byte pForcedDataRate; pu1Byte HubUsbMode; @@ -729,16 +729,16 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure #ifdef UNIVERSAL_REPEATER BOOLEAN VXD_bLinked; #endif -#endif // for repeater mode add by YuChen 2014.06.23 - u1Byte RSSI_Min; +#endif // for repeater mode add by YuChen 2014.06.23 + u1Byte RSSI_Min; u1Byte InterfaceIndex; /*Add for 92D dual MAC: 0--Mac0 1--Mac1*/ BOOLEAN bIsMPChip; BOOLEAN bOneEntryOnly; BOOLEAN mp_mode; u4Byte OneEntry_MACID; - u1Byte pre_number_linked_client; + u1Byte pre_number_linked_client; u1Byte number_linked_client; - u1Byte pre_number_active_client; + u1Byte pre_number_active_client; u1Byte number_active_client; // Common info for BTDM BOOLEAN bBtEnabled; // BT is enabled @@ -755,9 +755,9 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure u1Byte RSSI_B; u1Byte RSSI_C; u1Byte RSSI_D; - u8Byte RSSI_TRSW; + u8Byte RSSI_TRSW; u8Byte RSSI_TRSW_H; - u8Byte RSSI_TRSW_L; + u8Byte RSSI_TRSW_L; u8Byte RSSI_TRSW_iso; u1Byte TXAntStatus; u1Byte RXAntStatus; @@ -788,13 +788,13 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure u1Byte pre_AntType; u1Byte antdiv_period; u1Byte antdiv_select; - u1Byte path_select; + u1Byte path_select; u1Byte antdiv_evm_en; u1Byte bdc_holdstate; u1Byte NdpaPeriod; BOOLEAN H2C_RARpt_connect; BOOLEAN cck_agc_report_type; - + u1Byte dm_dig_max_TH; u1Byte dm_dig_min_TH; u1Byte print_agc; @@ -818,16 +818,16 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure u1Byte LastUSBHub; u1Byte TxBfDataRate; u1Byte CurrentAddress[6]; - + u1Byte c2h_cmd_start; - u1Byte fw_debug_trace[60]; + u1Byte fw_debug_trace[60]; u1Byte pre_c2h_seq; BOOLEAN fw_buff_is_enpty; u4Byte data_frame_num; /*for noise detection*/ BOOLEAN NoisyDecision; /*b_noisy*/ - BOOLEAN pre_b_noisy; + BOOLEAN pre_b_noisy; u4Byte NoisyDecision_Smooth; #if (DM_ODM_SUPPORT_TYPE & (ODM_CE)) @@ -873,11 +873,11 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure #if (DM_ODM_SUPPORT_TYPE & (ODM_AP)) BDC_T DM_BdcTable; #endif - + #ifdef CONFIG_HL_SMART_ANTENNA_TYPE1 SAT_T dm_sat_table; #endif - + #endif FAT_T DM_FatTable; DIG_T DM_DigTable; @@ -887,7 +887,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure #if (DM_ODM_SUPPORT_TYPE & ODM_WIN) RXHP_T DM_RXHP_Table; #endif - RA_T DM_RA_Table; + RA_T DM_RA_Table; FALSE_ALARM_STATISTICS FalseAlmCnt; FALSE_ALARM_STATISTICS FlaseAlmCntBuddyAdapter; SWAT_T DM_SWAT_Table; @@ -911,7 +911,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure #endif #if(defined(CONFIG_PATH_DIVERSITY)) PATHDIV_T DM_PathDiv; -#endif +#endif EDCA_T DM_EDCA_Table; u4Byte WMMEDCA_BE; @@ -922,7 +922,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure // //common - //u1Byte DM_Type; + //u1Byte DM_Type; //u1Byte PSD_Report_RXHP[80]; // Add By Gary //u1Byte PSD_func_flag; // Add By Gary //for DIG @@ -946,7 +946,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure //MPT DIG RT_TIMER MPT_DIGTimer; - + //for rate adaptive, in fact, 88c/92c fw will handle this u1Byte bUseRAMask; @@ -957,12 +957,12 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure #endif ODM_RF_CAL_T RFCalibrateInfo; - + // // Dynamic ATC switch // -#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) +#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) // // Power Training // @@ -1003,16 +1003,16 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE)) #if (BEAMFORMING_SUPPORT == 1) RT_BEAMFORMING_INFO BeamformingInfo; -#endif +#endif #endif #if(DM_ODM_SUPPORT_TYPE & ODM_WIN) - + #if (RT_PLATFORM != PLATFORM_LINUX) } DM_ODM_T, *PDM_ODM_T; // DM_Dynamic_Mechanism_Structure #else }; -#endif +#endif #else// for AP,ADSL,CE Team } DM_ODM_T, *PDM_ODM_T; // DM_Dynamic_Mechanism_Structure @@ -1024,7 +1024,7 @@ typedef enum _PHYDM_STRUCTURE_TYPE{ PHYDM_CFOTRACK, PHYDM_ADAPTIVITY, PHYDM_ROMINFO, - + }PHYDM_STRUCTURE_TYPE; @@ -1037,16 +1037,16 @@ typedef enum _PHYDM_STRUCTURE_TYPE{ } ODM_RF_CONTENT; typedef enum _ODM_BB_Config_Type{ - CONFIG_BB_PHY_REG, - CONFIG_BB_AGC_TAB, + CONFIG_BB_PHY_REG, + CONFIG_BB_AGC_TAB, CONFIG_BB_AGC_TAB_2G, - CONFIG_BB_AGC_TAB_5G, + CONFIG_BB_AGC_TAB_5G, CONFIG_BB_PHY_REG_PG, CONFIG_BB_PHY_REG_MP, CONFIG_BB_AGC_TAB_DIFF, } ODM_BB_Config_Type, *PODM_BB_Config_Type; -typedef enum _ODM_RF_Config_Type{ +typedef enum _ODM_RF_Config_Type{ CONFIG_RF_RADIO, CONFIG_RF_TXPWR_LMT, } ODM_RF_Config_Type, *PODM_RF_Config_Type; @@ -1206,7 +1206,7 @@ GetPSDData( #endif -#if (DM_ODM_SUPPORT_TYPE & ODM_WIN) +#if (DM_ODM_SUPPORT_TYPE & ODM_WIN) VOID ODM_DMWatchdog_LPS( IN PDM_ODM_T pDM_Odm @@ -1227,7 +1227,7 @@ ODM_SignConversion( IN u4Byte TotalBit ); -VOID +VOID ODM_DMInit( IN PDM_ODM_T pDM_Odm ); @@ -1255,14 +1255,14 @@ VOID ODM_CmnInfoInit( IN PDM_ODM_T pDM_Odm, IN ODM_CMNINFO_E CmnInfo, - IN u4Byte Value + IN u4Byte Value ); VOID ODM_CmnInfoHook( IN PDM_ODM_T pDM_Odm, IN ODM_CMNINFO_E CmnInfo, - IN PVOID pValue + IN PVOID pValue ); VOID @@ -1270,41 +1270,41 @@ ODM_CmnInfoPtrArrayHook( IN PDM_ODM_T pDM_Odm, IN ODM_CMNINFO_E CmnInfo, IN u2Byte Index, - IN PVOID pValue + IN PVOID pValue ); VOID ODM_CmnInfoUpdate( IN PDM_ODM_T pDM_Odm, IN u4Byte CmnInfo, - IN u8Byte Value + IN u8Byte Value ); #if(DM_ODM_SUPPORT_TYPE==ODM_AP) -VOID +VOID ODM_InitAllThreads( - IN PDM_ODM_T pDM_Odm + IN PDM_ODM_T pDM_Odm ); VOID ODM_StopAllThreads( - IN PDM_ODM_T pDM_Odm + IN PDM_ODM_T pDM_Odm ); #endif -VOID +VOID ODM_InitAllTimers( - IN PDM_ODM_T pDM_Odm + IN PDM_ODM_T pDM_Odm ); -VOID +VOID ODM_CancelAllTimers( - IN PDM_ODM_T pDM_Odm + IN PDM_ODM_T pDM_Odm ); VOID ODM_ReleaseAllTimers( - IN PDM_ODM_T pDM_Odm + IN PDM_ODM_T pDM_Odm ); @@ -1336,7 +1336,7 @@ PlatformDivision64( typedef enum tag_DIG_Connect_Definition { - DIG_STA_DISCONNECT = 0, + DIG_STA_DISCONNECT = 0, DIG_STA_CONNECT = 1, DIG_STA_BEFORE_CONNECT = 2, DIG_MultiSTA_DISCONNECT = 3, @@ -1408,7 +1408,7 @@ PhyDM_Get_Structure( #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) VOID -FillH2CCmd92C( +FillH2CCmd92C( IN PADAPTER Adapter, IN u1Byte ElementID, IN u4Byte CmdLen, diff --git a/network/wlan/WDI/HAL/phydm/phydm_acs.h b/network/wlan/WDI/HAL/phydm/phydm_acs.h index d7eabda84..5c8792dc8 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_acs.h +++ b/network/wlan/WDI/HAL/phydm/phydm_acs.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMACS_H__ #define __PHYDMACS_H__ @@ -38,22 +38,22 @@ typedef struct _ACS_ u1Byte CleanChannel_2G; u1Byte CleanChannel_5G; u2Byte Channel_Info_2G[2][ODM_MAX_CHANNEL_2G]; //Channel_Info[1]: Channel Score, Channel_Info[2]:Channel_Scan_Times - u2Byte Channel_Info_5G[2][ODM_MAX_CHANNEL_5G]; + u2Byte Channel_Info_5G[2][ODM_MAX_CHANNEL_5G]; -#if ( DM_ODM_SUPPORT_TYPE & ODM_AP ) +#if ( DM_ODM_SUPPORT_TYPE & ODM_AP ) u1Byte ACS_Step; // NHM Count 0-11 u1Byte NHM_Cnt[14][11]; // AC-Series, for storing previous setting - u4Byte Reg0x990; + u4Byte Reg0x990; u4Byte Reg0x994; u4Byte Reg0x998; u4Byte Reg0x99C; u1Byte Reg0x9A0; // u1Byte // N-Series, for storing previous setting - u4Byte Reg0x890; + u4Byte Reg0x890; u4Byte Reg0x894; u4Byte Reg0x898; u4Byte Reg0x89C; @@ -91,7 +91,7 @@ VOID phydm_AutoChannelSelectSettingAP( IN PVOID pDM_VOID, IN u4Byte Setting, // 0: STORE_DEFAULT_NHM_SETTING; 1: RESTORE_DEFAULT_NHM_SETTING, 2: ACS_NHM_SETTING - IN u4Byte acs_step + IN u4Byte acs_step ); VOID diff --git a/network/wlan/WDI/HAL/phydm/phydm_adaptivity.h b/network/wlan/WDI/HAL/phydm/phydm_adaptivity.h index 99b638711..8985daf2d 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_adaptivity.h +++ b/network/wlan/WDI/HAL/phydm/phydm_adaptivity.h @@ -2,7 +2,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -18,7 +18,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMADAPTIVITY_H__ #define __PHYDMADAPTIVITY_H__ @@ -32,8 +32,8 @@ typedef enum _tag_PhyDM_REGULATION_Type { REGULATION_FCC = 0, REGULATION_MKK = 1, REGULATION_ETSI = 2, - REGULATION_WW = 3, - + REGULATION_WW = 3, + MAX_REGULATION_NUM = 4 } PhyDM_REGULATION_TYPE; #endif @@ -74,7 +74,7 @@ typedef struct _ADAPTIVITY_STATISTICS { s1Byte backupL2H; s1Byte backupH2L; BOOLEAN bStopEDCCA; -#if (DM_ODM_SUPPORT_TYPE & ODM_WIN) +#if (DM_ODM_SUPPORT_TYPE & ODM_WIN) RT_WORK_ITEM phydm_pauseEDCCAWorkItem; RT_WORK_ITEM phydm_resumeEDCCAWorkItem; #endif @@ -134,7 +134,7 @@ Phydm_SetTRxMux( IN PVOID pDM_VOID, IN PhyDM_Trx_MUX_Type txMode, IN PhyDM_Trx_MUX_Type rxMode -); +); BOOLEAN Phydm_CalNHMcnt( @@ -146,7 +146,7 @@ Phydm_SearchPwdBLowerBound( IN PVOID pDM_VOID ); -VOID +VOID Phydm_AdaptivityInit( IN PVOID pDM_VOID ); @@ -175,7 +175,7 @@ Phydm_AdaptivityBSOD( #endif -VOID +VOID phydm_pauseEDCCA_WorkItemCallback( #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) IN PADAPTER Adapter @@ -184,7 +184,7 @@ phydm_pauseEDCCA_WorkItemCallback( #endif ); -VOID +VOID phydm_resumeEDCCA_WorkItemCallback( #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) IN PADAPTER Adapter diff --git a/network/wlan/WDI/HAL/phydm/phydm_antdect.h b/network/wlan/WDI/HAL/phydm/phydm_antdect.h index f3ccfad34..6a9fc33ef 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_antdect.h +++ b/network/wlan/WDI/HAL/phydm/phydm_antdect.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMANTDECT_H__ #define __PHYDMANTDECT_H__ @@ -26,11 +26,11 @@ #if(defined(CONFIG_ANT_DETECTION)) //#if( DM_ODM_SUPPORT_TYPE & (ODM_WIN |ODM_CE)) //ANT Test -#define ANTTESTALL 0x00 /*Ant A or B will be Testing*/ -#define ANTTESTA 0x01 /*Ant A will be Testing*/ +#define ANTTESTALL 0x00 /*Ant A or B will be Testing*/ +#define ANTTESTA 0x01 /*Ant A will be Testing*/ #define ANTTESTB 0x02 /*Ant B will be testing*/ -#define MAX_ANTENNA_DETECTION_CNT 10 +#define MAX_ANTENNA_DETECTION_CNT 10 typedef struct _ANT_DETECTED_INFO{ @@ -44,7 +44,7 @@ typedef struct _ANT_DETECTED_INFO{ typedef enum tag_SW_Antenna_Switch_Definition { Antenna_A = 1, - Antenna_B = 2, + Antenna_B = 2, Antenna_MAX = 3, }DM_SWAS_E; @@ -69,7 +69,7 @@ ODM_SingleDualAntennaDetection( #define SwAntDivCheckBeforeLink ODM_SwAntDivCheckBeforeLink -BOOLEAN +BOOLEAN ODM_SwAntDivCheckBeforeLink( IN PVOID pDM_VOID ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_antdiv.h b/network/wlan/WDI/HAL/phydm/phydm_antdiv.h index 95b1cee36..5675a96f2 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_antdiv.h +++ b/network/wlan/WDI/HAL/phydm/phydm_antdiv.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -26,11 +26,11 @@ /*#define ANTDIV_VERSION "2.2" 2015.01.16 Dino*/ /*#define ANTDIV_VERSION "3.1" 2015.07.29 YuChen, remove 92c 92d 8723a*/ /*#define ANTDIV_VERSION "3.2" 2015.08.11 Stanley, disable antenna diversity when BT is enable for 8723B*/ -#define ANTDIV_VERSION "3.3" /*2015.08.12 Stanley. 8723B does not need to check the antenna is control by BT, +#define ANTDIV_VERSION "3.3" /*2015.08.12 Stanley. 8723B does not need to check the antenna is control by BT, because antenna diversity only works when BT is disable or radio off*/ //1 ============================================================ -//1 Definition +//1 Definition //1 ============================================================ #define ANTDIV_INIT 0xff @@ -136,7 +136,7 @@ typedef struct _SW_Antenna_Switch_ u1Byte TestMode; u1Byte bTriggerAntennaSwitch; u1Byte SelectAntennaMap; - u1Byte RSSI_target; + u1Byte RSSI_target; u1Byte reset_idx; u2Byte Single_Ant_Counter; u2Byte Dual_Ant_Counter; @@ -151,7 +151,7 @@ typedef struct _SW_Antenna_Switch_ BOOLEAN ANTA_ON; //To indicate Ant A is or not BOOLEAN ANTB_ON; //To indicate Ant B is on or not BOOLEAN Pre_Aux_FailDetec; - BOOLEAN RSSI_AntDect_bResult; + BOOLEAN RSSI_AntDect_bResult; u1Byte Ant5G; u1Byte Ant2G; @@ -170,23 +170,23 @@ typedef struct _SW_Antenna_Switch_ u1Byte Train_time; u1Byte Train_time_flag; RT_TIMER SwAntennaSwitchTimer; -#if (RTL8723B_SUPPORT == 1)||(RTL8821A_SUPPORT == 1) +#if (RTL8723B_SUPPORT == 1)||(RTL8821A_SUPPORT == 1) RT_TIMER SwAntennaSwitchTimer_8723B; u4Byte PktCnt_SWAntDivByCtrlFrame; BOOLEAN bSWAntDivByCtrlFrame; #endif -#if (DM_ODM_SUPPORT_TYPE == ODM_WIN) +#if (DM_ODM_SUPPORT_TYPE == ODM_WIN) #if USE_WORKITEM RT_WORK_ITEM SwAntennaSwitchWorkitem; - #if (RTL8723B_SUPPORT == 1) || (RTL8821A_SUPPORT == 1) - RT_WORK_ITEM SwAntennaSwitchWorkitem_8723B; + #if (RTL8723B_SUPPORT == 1) || (RTL8821A_SUPPORT == 1) + RT_WORK_ITEM SwAntennaSwitchWorkitem_8723B; #endif #endif #endif /* CE Platform use #ifdef CONFIG_SW_ANTENNA_DIVERSITY - _timer SwAntennaSwitchTimer; + _timer SwAntennaSwitchTimer; u8Byte lastTxOkCnt; u8Byte lastRxOkCnt; u8Byte TXByteCnt_A; @@ -214,7 +214,7 @@ typedef struct _SW_Antenna_Switch_ u1Byte RxIdleAnt; #endif - + }SWAT_T, *pSWAT_T; @@ -240,12 +240,12 @@ typedef struct _BF_DIV_COEX_ u1Byte pre_num_Client; u1Byte num_BfTar; u1Byte num_DivTar; - + BOOLEAN bAll_DivSta_Idle; BOOLEAN bAll_BFSta_Idle; BOOLEAN BDC_Try_flag; BOOLEAN BF_pass; - BOOLEAN DIV_pass; + BOOLEAN DIV_pass; }BDC_T,*pBDC_T; #endif #endif @@ -264,16 +264,16 @@ typedef struct _SMART_ANTENNA_TRAINNING_ { u4Byte per_beam_training_pkt_num; u4Byte pkt_counter; u4Byte fast_training_beam_num; - u4Byte pre_fast_training_beam_num; + u4Byte pre_fast_training_beam_num; u4Byte pkt_rssi_sum[SUPPORT_RF_PATH_NUM][SUPPORT_BEAM_PATTERN_NUM]; u4Byte pkt_rssi_cnt[SUPPORT_RF_PATH_NUM][SUPPORT_BEAM_PATTERN_NUM]; u4Byte rx_idle_beam[SUPPORT_RF_PATH_NUM]; u4Byte pre_codeword; BOOLEAN force_update_beam_en; - #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) + #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) RT_WORK_ITEM hl_smart_antenna_workitem; - RT_WORK_ITEM hl_smart_antenna_decision_workitem; + RT_WORK_ITEM hl_smart_antenna_decision_workitem; #endif } SAT_T, *pSAT_T; @@ -306,7 +306,7 @@ typedef struct _FAST_ANTENNA_TRAINNING_ u1Byte idx_AntDiv_counter_5G; u1Byte AntDiv_2G_5G; u4Byte CCK_counter_main; - u4Byte CCK_counter_aux; + u4Byte CCK_counter_aux; u4Byte OFDM_counter_main; u4Byte OFDM_counter_aux; @@ -321,7 +321,7 @@ typedef struct _FAST_ANTENNA_TRAINNING_ u1Byte TargetAnt_enhance; u1Byte pre_TargetAnt_enhance; u2Byte Main_MPDU_OK_cnt; - u2Byte Aux_MPDU_OK_cnt; + u2Byte Aux_MPDU_OK_cnt; u4Byte CRC32_Ok_Cnt; u4Byte CRC32_Fail_Cnt; @@ -329,7 +329,7 @@ typedef struct _FAST_ANTENNA_TRAINNING_ u4Byte AuxCRC32_Ok_Cnt; u4Byte MainCRC32_Fail_Cnt; u4Byte AuxCRC32_Fail_Cnt; - #endif + #endif #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) u4Byte CCK_CtrlFrame_Cnt_main; u4Byte CCK_CtrlFrame_Cnt_aux; @@ -363,7 +363,7 @@ typedef enum _FAT_STATE /*Fast antenna training*/ typedef enum _ANT_DIV_TYPE { - NO_ANTDIV = 0xFF, + NO_ANTDIV = 0xFF, CG_TRX_HW_ANTDIV = 0x01, CGCS_RX_HW_ANTDIV = 0x02, FIXED_HW_ANTDIV = 0x03, @@ -391,7 +391,7 @@ ODM_SetAntConfig( #define SwAntDivRestAfterLink ODM_SwAntDivRestAfterLink -VOID ODM_SwAntDivRestAfterLink( +VOID ODM_SwAntDivRestAfterLink( IN PVOID pDM_VOID ); @@ -399,7 +399,7 @@ VOID ODM_SwAntDivRestAfterLink( VOID ODM_UpdateRxIdleAnt( - IN PVOID pDM_VOID, + IN PVOID pDM_VOID, IN u1Byte Ant ); @@ -460,7 +460,7 @@ odm_S0S1_SwAntDivByCtrlFrame_ProcessRSSI( ); -#endif +#endif #endif #ifdef ODM_EVM_ENHANCE_ANTDIV @@ -551,7 +551,7 @@ odm_AntselStatistics( ); VOID -ODM_Process_RSSIForAntDiv( +ODM_Process_RSSIForAntDiv( IN OUT PVOID pDM_VOID, IN PVOID p_phy_info_void, IN PVOID p_pkt_info_void @@ -572,7 +572,7 @@ VOID ODM_SetTxAntByTxInfo( IN PVOID pDM_VOID, IN pu1Byte pDesc, - IN u1Byte macId + IN u1Byte macId ); #elif(DM_ODM_SUPPORT_TYPE == ODM_AP) @@ -581,7 +581,7 @@ VOID ODM_SetTxAntByTxInfo( struct rtl8192cd_priv *priv, struct tx_desc *pdesc, - unsigned short aid + unsigned short aid ); #endif @@ -597,7 +597,7 @@ VOID ODM_UpdateRxIdleAnt_8723B( IN PVOID pDM_VOID, IN u1Byte Ant, - IN u4Byte DefaultAnt, + IN u4Byte DefaultAnt, IN u4Byte OptionalAnt ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_beamforming.h b/network/wlan/WDI/HAL/phydm/phydm_beamforming.h index ed472ce64..f2188faf0 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_beamforming.h +++ b/network/wlan/WDI/HAL/phydm/phydm_beamforming.h @@ -41,11 +41,11 @@ #endif typedef enum _BEAMFORMING_ENTRY_STATE { - BEAMFORMING_ENTRY_STATE_UNINITIALIZE, - BEAMFORMING_ENTRY_STATE_INITIALIZEING, - BEAMFORMING_ENTRY_STATE_INITIALIZED, - BEAMFORMING_ENTRY_STATE_PROGRESSING, - BEAMFORMING_ENTRY_STATE_PROGRESSED + BEAMFORMING_ENTRY_STATE_UNINITIALIZE, + BEAMFORMING_ENTRY_STATE_INITIALIZEING, + BEAMFORMING_ENTRY_STATE_INITIALIZED, + BEAMFORMING_ENTRY_STATE_PROGRESSING, + BEAMFORMING_ENTRY_STATE_PROGRESSED } BEAMFORMING_ENTRY_STATE, *PBEAMFORMING_ENTRY_STATE; @@ -62,8 +62,8 @@ typedef enum _BEAMFORMING_NOTIFY_STATE { typedef enum _BEAMFORMING_CAP { BEAMFORMING_CAP_NONE = 0x0, - BEAMFORMER_CAP_HT_EXPLICIT = BIT1, - BEAMFORMEE_CAP_HT_EXPLICIT = BIT2, + BEAMFORMER_CAP_HT_EXPLICIT = BIT1, + BEAMFORMEE_CAP_HT_EXPLICIT = BIT2, BEAMFORMER_CAP_VHT_SU = BIT5, /* Self has er Cap, because Reg er & peer ee */ BEAMFORMEE_CAP_VHT_SU = BIT6, /* Self has ee Cap, because Reg ee & peer er */ BEAMFORMER_CAP_VHT_MU = BIT7, /* Self has er Cap, because Reg er & peer ee */ @@ -75,11 +75,11 @@ typedef enum _BEAMFORMING_CAP { typedef enum _SOUNDING_MODE { SOUNDING_SW_VHT_TIMER = 0x0, - SOUNDING_SW_HT_TIMER = 0x1, - SOUNDING_STOP_All_TIMER = 0x2, - SOUNDING_HW_VHT_TIMER = 0x3, + SOUNDING_SW_HT_TIMER = 0x1, + SOUNDING_STOP_All_TIMER = 0x2, + SOUNDING_HW_VHT_TIMER = 0x3, SOUNDING_HW_HT_TIMER = 0x4, - SOUNDING_STOP_OID_TIMER = 0x5, + SOUNDING_STOP_OID_TIMER = 0x5, SOUNDING_AUTO_VHT_TIMER = 0x6, SOUNDING_AUTO_HT_TIMER = 0x7, SOUNDING_FW_VHT_TIMER = 0x8, @@ -87,15 +87,15 @@ typedef enum _SOUNDING_MODE { }SOUNDING_MODE, *PSOUNDING_MODE; typedef struct _RT_BEAMFORM_STAINFO { - pu1Byte RA; - u2Byte AID; + pu1Byte RA; + u2Byte AID; u2Byte MacID; WIRELESS_MODE WirelessMode; CHANNEL_WIDTH BW; BEAMFORMING_CAP BeamformCap; u1Byte HtBeamformCap; u2Byte VhtBeamformCap; - u1Byte CurBeamform; + u1Byte CurBeamform; u2Byte CurBeamformVHT; } RT_BEAMFORM_STAINFO, *PRT_BEAMFORM_STAINFO; @@ -112,7 +112,7 @@ typedef struct _RT_BEAMFORMEE_ENTRY { CHANNEL_WIDTH SoundBW; /*Sounding BandWidth*/ u2Byte SoundPeriod; BEAMFORMING_CAP BeamformEntryCap; - BEAMFORMING_ENTRY_STATE BeamformEntryState; + BEAMFORMING_ENTRY_STATE BeamformEntryState; BOOLEAN bBeamformingInProgress; /*u1Byte LogSeq; // Move to _RT_BEAMFORMER_ENTRY*/ /*u2Byte LogRetryCnt:3; // 0~4 // Move to _RT_BEAMFORMER_ENTRY*/ @@ -155,7 +155,7 @@ typedef struct _RT_BEAMFORMER_ENTRY { typedef struct _RT_SOUNDING_INFO { u1Byte SoundIdx; CHANNEL_WIDTH SoundBW; - SOUNDING_MODE SoundMode; + SOUNDING_MODE SoundMode; u2Byte SoundPeriod; } RT_SOUNDING_INFO, *PRT_SOUNDING_INFO; @@ -163,7 +163,7 @@ typedef struct _RT_SOUNDING_INFO { typedef struct _RT_BEAMFORMING_OID_INFO { u1Byte SoundOidIdx; - CHANNEL_WIDTH SoundOidBW; + CHANNEL_WIDTH SoundOidBW; SOUNDING_MODE SoundOidMode; u2Byte SoundOidPeriod; } RT_BEAMFORMING_OID_INFO, *PRT_BEAMFORMING_OID_INFO; @@ -201,9 +201,9 @@ typedef struct _RT_BEAMFORMING_INFO { typedef struct _RT_NDPA_STA_INFO { - u2Byte AID:12; + u2Byte AID:12; u2Byte FeedbackType:1; - u2Byte NcIndex:3; + u2Byte NcIndex:3; } RT_NDPA_STA_INFO, *PRT_NDPA_STA_INFO; typedef enum _PHYDM_ACTING_TYPE { @@ -276,13 +276,13 @@ BeamformingStart_FW( VOID Beamforming_CheckSoundingSuccess( IN PVOID pDM_VOID, - BOOLEAN Status + BOOLEAN Status ); VOID phydm_Beamforming_End_SW( IN PVOID pDM_VOID, - BOOLEAN Status + BOOLEAN Status ); VOID @@ -319,7 +319,7 @@ BOOLEAN phydm_BeamformingControl_V2( IN PVOID pDM_VOID, u1Byte Idx, - u1Byte Mode, + u1Byte Mode, CHANNEL_WIDTH BW, u2Byte Period ); @@ -342,7 +342,7 @@ BOOLEAN Beamforming_SendHTNDPAPacket( IN PVOID pDM_VOID, IN pu1Byte RA, - IN CHANNEL_WIDTH BW, + IN CHANNEL_WIDTH BW, IN u1Byte QIdx ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_cfotracking.h b/network/wlan/WDI/HAL/phydm/phydm_cfotracking.h index 7eca3f6e9..15ecec5f2 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_cfotracking.h +++ b/network/wlan/WDI/HAL/phydm/phydm_cfotracking.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. diff --git a/network/wlan/WDI/HAL/phydm/phydm_debug.h b/network/wlan/WDI/HAL/phydm/phydm_debug.h index 5996cc7bf..b9da7bb37 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_debug.h +++ b/network/wlan/WDI/HAL/phydm/phydm_debug.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -27,11 +27,11 @@ // Define the debug levels // // 1. DBG_TRACE and DBG_LOUD are used for normal cases. -// So that, they can help SW engineer to develope or trace states changed -// and also help HW enginner to trace every operation to and from HW, -// e.g IO, Tx, Rx. +// So that, they can help SW engineer to develope or trace states changed +// and also help HW enginner to trace every operation to and from HW, +// e.g IO, Tx, Rx. // -// 2. DBG_WARNNING and DBG_SERIOUS are used for unusual or error cases, +// 2. DBG_WARNNING and DBG_SERIOUS are used for unusual or error cases, // which help us to debug SW or HW. // //----------------------------------------------------------------------------- @@ -41,8 +41,8 @@ #define ODM_DBG_OFF 1 // -// Fatal bug. -// For example, Tx/Rx/IO locked up, OS hangs, memory access violation, +// Fatal bug. +// For example, Tx/Rx/IO locked up, OS hangs, memory access violation, // resource allocation failed, unexpected HW behavior, HW BUG and so on. // #define ODM_DBG_SERIOUS 2 @@ -54,8 +54,8 @@ #define ODM_DBG_WARNING 3 // -// Normal case with useful information about current SW or HW state. -// For example, Tx/Rx descriptor to fill, Tx/Rx descriptor completed status, +// Normal case with useful information about current SW or HW state. +// For example, Tx/Rx descriptor to fill, Tx/Rx descriptor completed status, // SW protocol state change, dynamic mechanism state change and so on. // #define ODM_DBG_LOUD 4 @@ -79,8 +79,8 @@ // //----------------------------------------------------------------------------- //BB Functions -#define ODM_COMP_DIG BIT0 -#define ODM_COMP_RA_MASK BIT1 +#define ODM_COMP_DIG BIT0 +#define ODM_COMP_RA_MASK BIT1 #define ODM_COMP_DYNAMIC_TXPWR BIT2 #define ODM_COMP_FA_CNT BIT3 #define ODM_COMP_RSSI_MONITOR BIT4 @@ -201,7 +201,7 @@ #endif -VOID +VOID PHYDM_InitDebugSetting(IN PDM_ODM_T pDM_Odm); #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) diff --git a/network/wlan/WDI/HAL/phydm/phydm_dig.h b/network/wlan/WDI/HAL/phydm/phydm_dig.h index 801369ae1..11658cbf1 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_dig.h +++ b/network/wlan/WDI/HAL/phydm/phydm_dig.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMDIG_H__ #define __PHYDMDIG_H__ @@ -34,7 +34,7 @@ typedef struct _Dynamic_Initial_Gain_Threshold_ u1Byte Dig_Enable_Flag; u1Byte Dig_Ext_Port_Stage; - + int RssiLowThresh; int RssiHighThresh; @@ -120,7 +120,7 @@ typedef enum tag_Dynamic_Init_Gain_Operation_Type_Definition DIG_TYPE_RX_GAIN_MIN = 3, DIG_TYPE_RX_GAIN_MAX = 4, DIG_TYPE_ENABLE = 5, - DIG_TYPE_DISABLE = 6, + DIG_TYPE_DISABLE = 6, DIG_OP_TYPE_MAX }DM_DIG_OP_E; @@ -143,7 +143,7 @@ typedef enum tag_DIG_EXT_PORT_ALGO_Definition typedef enum tag_DIG_Connect_Definition { - DIG_STA_DISCONNECT = 0, + DIG_STA_DISCONNECT = 0, DIG_STA_CONNECT = 1, DIG_STA_BEFORE_CONNECT = 2, DIG_MultiSTA_DISCONNECT = 3, @@ -247,7 +247,7 @@ ODM_ChangeDynamicInitGainThresh( VOID ODM_Write_DIG( - IN PVOID pDM_VOID, + IN PVOID pDM_VOID, IN u1Byte CurrentIGI ); @@ -264,7 +264,7 @@ odm_DIGInit( IN PVOID pDM_VOID ); -VOID +VOID odm_DIG( IN PVOID pDM_VOID ); @@ -274,7 +274,7 @@ odm_DIGbyRSSI_LPS( IN PVOID pDM_VOID ); -VOID +VOID odm_FalseAlarmCounterStatistics( IN PVOID pDM_VOID ); @@ -287,14 +287,14 @@ odm_PauseCCKPacketDetection( IN u1Byte CCKPDThreshold ); -VOID +VOID odm_CCKPacketDetectionThresh( IN PVOID pDM_VOID ); -VOID +VOID ODM_Write_CCK_CCA_Thres( - IN PVOID pDM_VOID, + IN PVOID pDM_VOID, IN u1Byte CurCCK_CCAThres ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_dynamicbbpowersaving.h b/network/wlan/WDI/HAL/phydm/phydm_dynamicbbpowersaving.h index 365c17181..4265f2d07 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_dynamicbbpowersaving.h +++ b/network/wlan/WDI/HAL/phydm/phydm_dynamicbbpowersaving.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMDYNAMICBBPOWERSAVING_H__ #define __PHYDMDYNAMICBBPOWERSAVING_H__ @@ -32,10 +32,10 @@ typedef struct _Dynamic_Power_Saving_ u1Byte CurRFState; int Rssi_val_min; - + u1Byte initialize; u4Byte Reg874,RegC70,Reg85C,RegA74; - + }PS_T,*pPS_T; #define dm_RF_Saving ODM_RF_Saving @@ -45,12 +45,12 @@ void ODM_RF_Saving( IN u1Byte bForceInNormal ); -VOID +VOID odm_DynamicBBPowerSavingInit( IN PVOID pDM_VOID ); -VOID +VOID odm_DynamicBBPowerSaving( IN PVOID pDM_VOID ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_dynamictxpower.h b/network/wlan/WDI/HAL/phydm/phydm_dynamictxpower.h index db61bf85d..7a3c29f92 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_dynamictxpower.h +++ b/network/wlan/WDI/HAL/phydm/phydm_dynamictxpower.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMDYNAMICTXPOWER_H__ #define __PHYDMDYNAMICTXPOWER_H__ @@ -29,7 +29,7 @@ #define TX_POWER_NEAR_FIELD_THRESH_AP 0x3F #define TX_POWER_NEAR_FIELD_THRESH_8812 60 -#define TxHighPwrLevel_Normal 0 +#define TxHighPwrLevel_Normal 0 #define TxHighPwrLevel_Level1 1 #define TxHighPwrLevel_Level2 2 #define TxHighPwrLevel_BT1 3 @@ -40,7 +40,7 @@ #define TxHighPwrLevel_70 8 #define TxHighPwrLevel_100 9 -VOID +VOID odm_DynamicTxPowerInit( IN PVOID pDM_VOID ); @@ -50,7 +50,7 @@ odm_DynamicTxPowerRestorePowerIndex( IN PVOID pDM_VOID ); -VOID +VOID odm_DynamicTxPowerNIC( IN PVOID pDM_VOID ); @@ -63,34 +63,34 @@ odm_DynamicTxPowerSavePowerIndex( VOID odm_DynamicTxPowerWritePowerIndex( - IN PVOID pDM_VOID, + IN PVOID pDM_VOID, IN u1Byte Value); -VOID +VOID odm_DynamicTxPower_92C( IN PVOID pDM_VOID ); -VOID +VOID odm_DynamicTxPower_92D( IN PVOID pDM_VOID ); -VOID +VOID odm_DynamicTxPower_8821( - IN PVOID pDM_VOID, + IN PVOID pDM_VOID, IN pu1Byte pDesc, IN u1Byte macId ); #endif -VOID +VOID odm_DynamicTxPower( IN PVOID pDM_VOID ); -VOID +VOID odm_DynamicTxPowerAP( IN PVOID pDM_VOID ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_edcaturbocheck.h b/network/wlan/WDI/HAL/phydm/phydm_edcaturbocheck.h index d4cd8d841..6d1e7cfd1 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_edcaturbocheck.h +++ b/network/wlan/WDI/HAL/phydm/phydm_edcaturbocheck.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMEDCATURBOCHECK_H__ #define __PHYDMEDCATURBOCHECK_H__ @@ -36,16 +36,16 @@ typedef struct _EDCA_TURBO_ }EDCA_T,*pEDCA_T; #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) -static u4Byte edca_setting_UL[HT_IOT_PEER_MAX] = +static u4Byte edca_setting_UL[HT_IOT_PEER_MAX] = // UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU MARVELL 92U_AP SELF_AP(DownLink/Tx) { 0x5e4322, 0xa44f, 0x5e4322, 0x5ea32b, 0x5ea422, 0x5ea322, 0x3ea430, 0x5ea42b, 0x5ea44f, 0x5e4322, 0x5e4322}; -static u4Byte edca_setting_DL[HT_IOT_PEER_MAX] = +static u4Byte edca_setting_DL[HT_IOT_PEER_MAX] = // UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU, MARVELL 92U_AP SELF_AP(UpLink/Rx) { 0xa44f, 0x5ea44f, 0x5e4322, 0x5ea42b, 0xa44f, 0xa630, 0x5ea630, 0x5ea42b, 0xa44f, 0xa42b, 0xa42b}; -static u4Byte edca_setting_DL_GMode[HT_IOT_PEER_MAX] = +static u4Byte edca_setting_DL_GMode[HT_IOT_PEER_MAX] = // UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU, MARVELL 92U_AP SELF_AP { 0x4322, 0xa44f, 0x5e4322, 0xa42b, 0x5e4322, 0x4322, 0xa42b, 0x5ea42b, 0xa44f, 0x5e4322, 0x5ea42b}; @@ -74,7 +74,7 @@ odm_IsEdcaTurboDisable( IN PVOID pDM_VOID ); //choose edca paramter for special IOT case -VOID +VOID ODM_EdcaParaSelByIot( IN PVOID pDM_VOID, OUT u4Byte *EDCA_BE_UL, @@ -82,10 +82,10 @@ ODM_EdcaParaSelByIot( ); //check if it is UL or DL VOID -odm_EdcaChooseTrafficIdx( +odm_EdcaChooseTrafficIdx( IN PVOID pDM_VOID, - IN u8Byte cur_tx_bytes, - IN u8Byte cur_rx_bytes, + IN u8Byte cur_tx_bytes, + IN u8Byte cur_rx_bytes, IN BOOLEAN bBiasOnRx, OUT BOOLEAN *pbIsCurRDLState ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_hwconfig.h b/network/wlan/WDI/HAL/phydm/phydm_hwconfig.h index a61ed3bd2..63a406653 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_hwconfig.h +++ b/network/wlan/WDI/HAL/phydm/phydm_hwconfig.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -23,7 +23,7 @@ #define __HALHWOUTSRC_H__ -/*--------------------------Define -------------------------------------------*/ +/*--------------------------Define -------------------------------------------*/ #define AGC_DIFF_CONFIG_MP(ic, band) (ODM_ReadAndConfig_MP_##ic##_AGC_TAB_DIFF(pDM_Odm, Array_MP_##ic##_AGC_TAB_DIFF_##band, \ sizeof(Array_MP_##ic##_AGC_TAB_DIFF_##band)/sizeof(u4Byte))) @@ -44,9 +44,9 @@ __PACK typedef struct _Phy_Rx_AGC_Info { - #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) - u1Byte gain:7,trsw:1; - #else + #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) + u1Byte gain:7,trsw:1; + #else u1Byte trsw:1,gain:7; #endif } __WLAN_ATTRIB_PACK__ PHY_RX_AGC_INFO_T, *pPHY_RX_AGC_INFO_T; @@ -186,7 +186,7 @@ VOID ODM_PhyStatusQuery( IN OUT PDM_ODM_T pDM_Odm, OUT PODM_PHY_INFO_T pPhyInfo, - IN pu1Byte pPhyStatus, + IN pu1Byte pPhyStatus, IN PODM_PACKET_INFO_T pPktinfo ); @@ -194,7 +194,7 @@ VOID ODM_MacStatusQuery( IN OUT PDM_ODM_T pDM_Odm, IN pu1Byte pMacStatus, - IN u1Byte MacID, + IN u1Byte MacID, IN BOOLEAN bPacketMatchBSSID, IN BOOLEAN bPacketToSelf, IN BOOLEAN bPacketBeacon @@ -204,7 +204,7 @@ HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile( IN PDM_ODM_T pDM_Odm ); - + HAL_STATUS ODM_ConfigRFWithHeaderFile( IN PDM_ODM_T pDM_Odm, @@ -231,15 +231,15 @@ ODM_ConfigFWWithHeaderFile( OUT u4Byte *pSize ); -u4Byte +u4Byte ODM_GetHWImgVersion( IN PDM_ODM_T pDM_Odm ); s4Byte -odm_SignalScaleMapping( +odm_SignalScaleMapping( IN OUT PDM_ODM_T pDM_Odm, - IN s4Byte CurrSig + IN s4Byte CurrSig ); #if (RTL8822B_SUPPORT == 1) @@ -413,7 +413,7 @@ typedef struct _Phy_Status_Rpt_Jaguar2_Type2 { /* DW0 ane DW1 */ u1Byte page_num; u1Byte pwdb[4]; -#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) +#if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE) u1Byte l_rxsc: 4; u1Byte ht_rxsc: 4; #else diff --git a/network/wlan/WDI/HAL/phydm/phydm_interface.h b/network/wlan/WDI/HAL/phydm/phydm_interface.h index e1433ffe1..850c0aaed 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_interface.h +++ b/network/wlan/WDI/HAL/phydm/phydm_interface.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -55,9 +55,9 @@ ODM_REG(DIG,_pDM_Odm) =====================================*/ -#define _reg_11N(_name) ODM_REG_##_name##_11N +#define _reg_11N(_name) ODM_REG_##_name##_11N #define _reg_11AC(_name) ODM_REG_##_name##_11AC -#define _bit_11N(_name) ODM_BIT_##_name##_11N +#define _bit_11N(_name) ODM_BIT_##_name##_11N #define _bit_11AC(_name) ODM_BIT_##_name##_11AC #ifdef __ECOS @@ -74,7 +74,7 @@ ODM_REG(DIG,_pDM_Odm) _func##_11AC(_name) \ ) #endif -/* +/* // only sample code //#define _cat(_name, _ic_type, _func) \ // ( \ @@ -88,7 +88,7 @@ ODM_REG(DIG,_pDM_Odm) */ // _name: name of register or bit. -// Example: "ODM_REG(R_A_AGC_CORE1, pDM_Odm)" +// Example: "ODM_REG(R_A_AGC_CORE1, pDM_Odm)" // gets "ODM_R_A_AGC_CORE1" or "ODM_R_A_AGC_CORE1_8192C", depends on SupportICType. #ifdef __ECOS #define ODM_REG(_name, _pDM_Odm) _rtk_cat(_name, _pDM_Odm->SupportICType, _reg) @@ -97,10 +97,10 @@ ODM_REG(DIG,_pDM_Odm) #define ODM_REG(_name, _pDM_Odm) _cat(_name, _pDM_Odm->SupportICType, _reg) #define ODM_BIT(_name, _pDM_Odm) _cat(_name, _pDM_Odm->SupportICType, _bit) #endif -typedef enum _PHYDM_H2C_CMD +typedef enum _PHYDM_H2C_CMD { ODM_H2C_RSSI_REPORT = 0, - ODM_H2C_PSD_RESULT = 1, + ODM_H2C_PSD_RESULT = 1, ODM_H2C_PathDiv = 2, ODM_H2C_WIFI_CALIBRATION = 3, ODM_H2C_IQ_CALIBRATION = 4, @@ -148,13 +148,13 @@ typedef struct tasklet_struct RT_WORKITEM_HANDLE, *PRT_WORKITEM_HANDLE; typedef struct _RT_WORK_ITEM { - + RT_WORKITEM_HANDLE Handle; // Platform-dependent handle for this workitem, e.g. Ndis Workitem object. PVOID Adapter; // Pointer to Adapter object. - PVOID pContext; // Parameter to passed to CallBackFunc(). + PVOID pContext; // Parameter to passed to CallBackFunc(). RT_WORKITEM_CALL_BACK CallbackFunc; // Callback function of the workitem. - u1Byte RefCount; // 0: driver is going to unload, 1: No such workitem scheduled, 2: one workitem is schedueled. - PVOID pPlatformExt; // Pointer to platform-dependent extension. + u1Byte RefCount; // 0: driver is going to unload, 1: No such workitem scheduled, 2: one workitem is schedueled. + PVOID pPlatformExt; // Pointer to platform-dependent extension. BOOLEAN bFree; char szID[36]; // An identity string of this workitem. }RT_WORK_ITEM, *PRT_WORK_ITEM; @@ -214,37 +214,37 @@ ODM_Write4Byte( ); VOID -ODM_SetMACReg( +ODM_SetMACReg( IN PDM_ODM_T pDM_Odm, IN u4Byte RegAddr, IN u4Byte BitMask, IN u4Byte Data ); -u4Byte -ODM_GetMACReg( +u4Byte +ODM_GetMACReg( IN PDM_ODM_T pDM_Odm, IN u4Byte RegAddr, IN u4Byte BitMask ); VOID -ODM_SetBBReg( +ODM_SetBBReg( IN PDM_ODM_T pDM_Odm, IN u4Byte RegAddr, IN u4Byte BitMask, IN u4Byte Data ); -u4Byte -ODM_GetBBReg( +u4Byte +ODM_GetBBReg( IN PDM_ODM_T pDM_Odm, IN u4Byte RegAddr, IN u4Byte BitMask ); VOID -ODM_SetRFReg( +ODM_SetRFReg( IN PDM_ODM_T pDM_Odm, IN ODM_RF_RADIO_PATH_E eRFPath, IN u4Byte RegAddr, @@ -252,8 +252,8 @@ ODM_SetRFReg( IN u4Byte Data ); -u4Byte -ODM_GetRFReg( +u4Byte +ODM_GetRFReg( IN PDM_ODM_T pDM_Odm, IN ODM_RF_RADIO_PATH_E eRFPath, IN u4Byte RegAddr, @@ -265,20 +265,20 @@ ODM_GetRFReg( // Memory Relative Function. // VOID -ODM_AllocateMemory( +ODM_AllocateMemory( IN PDM_ODM_T pDM_Odm, OUT PVOID *pPtr, IN u4Byte length ); VOID -ODM_FreeMemory( +ODM_FreeMemory( IN PDM_ODM_T pDM_Odm, OUT PVOID pPtr, IN u4Byte length ); VOID -ODM_MoveMemory( +ODM_MoveMemory( IN PDM_ODM_T pDM_Odm, OUT PVOID pDest, IN PVOID pSrc, @@ -297,18 +297,18 @@ void ODM_Memory_Set IN PVOID pbuf, IN s1Byte value, IN u4Byte length); - + // // ODM MISC-spin lock relative API. // VOID -ODM_AcquireSpinLock( +ODM_AcquireSpinLock( IN PDM_ODM_T pDM_Odm, IN RT_SPINLOCK_TYPE type ); VOID -ODM_ReleaseSpinLock( +ODM_ReleaseSpinLock( IN PDM_ODM_T pDM_Odm, IN RT_SPINLOCK_TYPE type ); @@ -318,7 +318,7 @@ ODM_ReleaseSpinLock( // ODM MISC-workitem relative API. // VOID -ODM_InitializeWorkItem( +ODM_InitializeWorkItem( IN PDM_ODM_T pDM_Odm, IN PRT_WORK_ITEM pRtWorkItem, IN RT_WORKITEM_CALL_BACK RtWorkItemCallback, @@ -327,27 +327,27 @@ ODM_InitializeWorkItem( ); VOID -ODM_StartWorkItem( +ODM_StartWorkItem( IN PRT_WORK_ITEM pRtWorkItem ); VOID -ODM_StopWorkItem( +ODM_StopWorkItem( IN PRT_WORK_ITEM pRtWorkItem ); VOID -ODM_FreeWorkItem( +ODM_FreeWorkItem( IN PRT_WORK_ITEM pRtWorkItem ); VOID -ODM_ScheduleWorkItem( +ODM_ScheduleWorkItem( IN PRT_WORK_ITEM pRtWorkItem ); VOID -ODM_IsWorkItemScheduled( +ODM_IsWorkItemScheduled( IN PRT_WORK_ITEM pRtWorkItem ); @@ -355,7 +355,7 @@ ODM_IsWorkItemScheduled( // ODM Timer relative API. // VOID -ODM_StallExecution( +ODM_StallExecution( IN u4Byte usDelay ); @@ -374,17 +374,17 @@ VOID ODM_sleep_us(IN u4Byte us); VOID -ODM_SetTimer( +ODM_SetTimer( IN PDM_ODM_T pDM_Odm, - IN PRT_TIMER pTimer, + IN PRT_TIMER pTimer, IN u4Byte msDelay ); VOID ODM_InitializeTimer( IN PDM_ODM_T pDM_Odm, - IN PRT_TIMER pTimer, - IN RT_TIMER_CALL_BACK CallBackFunc, + IN PRT_TIMER pTimer, + IN RT_TIMER_CALL_BACK CallBackFunc, IN PVOID pContext, IN const char* szID ); @@ -421,11 +421,11 @@ phydm_c2H_content_parsing( ); u8Byte -ODM_GetCurrentTime( +ODM_GetCurrentTime( IN PDM_ODM_T pDM_Odm ); u8Byte -ODM_GetProgressingTime( +ODM_GetProgressingTime( IN PDM_ODM_T pDM_Odm, IN u8Byte Start_Time ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_noisemonitor.h b/network/wlan/WDI/HAL/phydm/phydm_noisemonitor.h index 022cefe28..24e5a911c 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_noisemonitor.h +++ b/network/wlan/WDI/HAL/phydm/phydm_noisemonitor.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -27,11 +27,11 @@ struct noise_level u1Byte value[MAX_RF_PATH]; //s1Byte sval_a, sval_b; s1Byte sval[MAX_RF_PATH]; - + //s4Byte noise_a=0, noise_b=0,sum_a=0, sum_b=0; //s4Byte noise[ODM_RF_PATH_MAX]; s4Byte sum[MAX_RF_PATH]; - //u1Byte valid_cnt_a=0, valid_cnt_b=0, + //u1Byte valid_cnt_a=0, valid_cnt_b=0, u1Byte valid[MAX_RF_PATH]; u1Byte valid_cnt[MAX_RF_PATH]; @@ -41,7 +41,7 @@ struct noise_level typedef struct _ODM_NOISE_MONITOR_ { s1Byte noise[MAX_RF_PATH]; - s2Byte noise_all; + s2Byte noise_all; }ODM_NOISE_MONITOR; s2Byte ODM_InbandNoise_Monitor(PVOID pDM_VOID,u8 bPauseDIG,u8 IGIValue,u32 max_time); diff --git a/network/wlan/WDI/HAL/phydm/phydm_pathdiv.h b/network/wlan/WDI/HAL/phydm/phydm_pathdiv.h index 020288ea4..7cbac4f0b 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_pathdiv.h +++ b/network/wlan/WDI/HAL/phydm/phydm_pathdiv.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMPATHDIV_H__ #define __PHYDMPATHDIV_H__ /*#define PATHDIV_VERSION "2.0" //2014.11.04*/ @@ -27,7 +27,7 @@ #define USE_PATH_A_AS_DEFAULT_ANT //for 8814 dynamic TX path selection #define NUM_RESET_DTP_PERIOD 5 -#define ANT_DECT_RSSI_TH 3 +#define ANT_DECT_RSSI_TH 3 #define PATH_A 1 #define PATH_B 2 @@ -74,8 +74,8 @@ typedef enum path_div_type }PHYDM_PATH_DIV_TYPE; VOID -phydm_process_rssi_for_path_div( - IN OUT PVOID pDM_VOID, +phydm_process_rssi_for_path_div( + IN OUT PVOID pDM_VOID, IN PVOID p_phy_info_void, IN PVOID p_pkt_info_void ); @@ -90,7 +90,7 @@ typedef struct _ODM_PATH_DIVERSITY_ u2Byte PathB_Cnt[ODM_ASSOCIATE_ENTRY_NUM]; u1Byte path_div_type; #if RTL8814A_SUPPORT - + u4Byte path_a_sum_all; u4Byte path_b_sum_all; u4Byte path_c_sum_all; @@ -100,7 +100,7 @@ typedef struct _ODM_PATH_DIVERSITY_ u4Byte path_b_cnt_all; u4Byte path_c_cnt_all; u4Byte path_d_cnt_all; - + u1Byte dtp_period; BOOLEAN bBecomeLinked; BOOLEAN is_u3_mode; @@ -115,7 +115,7 @@ typedef struct _ODM_PATH_DIVERSITY_ BOOLEAN fix_path_bfer; u1Byte search_space_2[NUM_CHOOSE2_FROM4]; u1Byte search_space_3[NUM_CHOOSE3_FROM4]; - + u1Byte pre_tx_path; u1Byte use_path_a_as_default_ant; BOOLEAN is_pathA_exist; @@ -161,7 +161,7 @@ odm_pathdiv_debug( -#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) +#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) //#define PATHDIV_ENABLE 1 #define dm_PathDiv_RSSI_Check ODM_PathDivChkPerPktRssi @@ -192,18 +192,18 @@ typedef struct _PathDiv_Parameter_define_ u4Byte swt_2g_RegCA0; }PATHDIV_PARA,*pPATHDIV_PARA; -VOID +VOID odm_PathDiversityInit_92C( IN PADAPTER Adapter ); -VOID +VOID odm_2TPathDiversityInit_92C( IN PADAPTER Adapter ); -VOID -odm_1TPathDiversityInit_92C( +VOID +odm_1TPathDiversityInit_92C( IN PADAPTER Adapter ); @@ -212,35 +212,35 @@ odm_IsConnected_92C( IN PADAPTER Adapter ); -BOOLEAN +BOOLEAN ODM_PathDiversityBeforeLink92C( //IN PADAPTER Adapter IN PDM_ODM_T pDM_Odm ); -VOID +VOID odm_PathDiversityAfterLink_92C( IN PADAPTER Adapter ); VOID -odm_SetRespPath_92C( - IN PADAPTER Adapter, +odm_SetRespPath_92C( + IN PADAPTER Adapter, IN u1Byte DefaultRespPath ); -VOID +VOID odm_OFDMTXPathDiversity_92C( IN PADAPTER Adapter ); -VOID -odm_CCKTXPathDiversity_92C( +VOID +odm_CCKTXPathDiversity_92C( IN PADAPTER Adapter ); -VOID -odm_ResetPathDiversity_92C( +VOID +odm_ResetPathDiversity_92C( IN PADAPTER Adapter ); @@ -265,7 +265,7 @@ odm_PathDivChkAntSwitchWorkitemCallback( ); -VOID +VOID odm_PathDivChkAntSwitch( PDM_ODM_T pDM_Odm ); @@ -280,13 +280,13 @@ ODM_CCKPathDiversityChkPerPktRssi( pu1Byte pDesc ); -VOID +VOID ODM_PathDivChkPerPktRssi( PADAPTER Adapter, BOOLEAN bIsDefPort, BOOLEAN bMatchBSSID, PRT_WLAN_STA pEntry, - PRT_RFD pRfd + PRT_RFD pRfd ); VOID @@ -316,9 +316,9 @@ odm_SwAntDivConstructScanChnl( IN PADAPTER Adapter, IN u1Byte ScanChnl ); - - #endif //#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) - - + + #endif //#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) + + #endif //#ifndef __ODMPATHDIV_H__ diff --git a/network/wlan/WDI/HAL/phydm/phydm_powertracking_ap.h b/network/wlan/WDI/HAL/phydm/phydm_powertracking_ap.h index 80dbcea23..10b47c37c 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_powertracking_ap.h +++ b/network/wlan/WDI/HAL/phydm/phydm_powertracking_ap.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __PHYDMPOWERTRACKING_H__ #define __PHYDMPOWERTRACKING_H__ @@ -44,7 +44,7 @@ #define IQK_MAC_REG_NUM 4 #define IQK_ADDA_REG_NUM 16 #define IQK_BB_REG_NUM_MAX 10 -#if (RTL8192D_SUPPORT==1) +#if (RTL8192D_SUPPORT==1) #define IQK_BB_REG_NUM 10 #else #define IQK_BB_REG_NUM 9 @@ -82,7 +82,7 @@ extern u1Byte CCKSwingTable_Ch1_Ch14_88F[CCK_TABLE_SIZE_88F][16]; #define ODM_CCK_TABLE_SIZE 33 // <20140613, YuChen> In case fail to read TxPowerTrack.txt, we use the table of 88E as the default table. extern u1Byte DeltaSwingTableIdx_2GA_P_DEFAULT[DELTA_SWINGIDX_SIZE]; -extern u1Byte DeltaSwingTableIdx_2GA_N_DEFAULT[DELTA_SWINGIDX_SIZE]; +extern u1Byte DeltaSwingTableIdx_2GA_N_DEFAULT[DELTA_SWINGIDX_SIZE]; //extern u4Byte OFDMSwingTable_92E[OFDM_TABLE_SIZE_92E]; @@ -116,36 +116,36 @@ typedef struct _IQK_MATRIX_REGS_SETTING{ typedef struct ODM_RF_Calibration_Structure { //for tx power tracking - + u4Byte RegA24; // for TempCCK s4Byte RegE94; s4Byte RegE9C; s4Byte RegEB4; - s4Byte RegEBC; + s4Byte RegEBC; //u1Byte bTXPowerTracking; u1Byte TXPowercount; - BOOLEAN bTXPowerTrackingInit; + BOOLEAN bTXPowerTrackingInit; BOOLEAN bTXPowerTracking; u1Byte TxPowerTrackControl; //for mp mode, turn off txpwrtracking as default u1Byte TM_Trigger; u1Byte InternalPA5G[2]; //pathA / pathB - + u1Byte ThermalMeter[2]; // ThermalMeter, index 0 for RFIC0, and 1 for RFIC1 u1Byte ThermalValue; u1Byte ThermalValue_LCK; u1Byte ThermalValue_IQK; - u1Byte ThermalValue_DPK; + u1Byte ThermalValue_DPK; u1Byte ThermalValue_AVG[AVG_THERMAL_NUM]; - u1Byte ThermalValue_AVG_index; + u1Byte ThermalValue_AVG_index; u1Byte ThermalValue_RxGain; u1Byte ThermalValue_Crystal; u1Byte ThermalValue_DPKstore; u1Byte ThermalValue_DPKtrack; BOOLEAN TxPowerTrackingInProgress; BOOLEAN bDPKenable; - - BOOLEAN bReloadtxpowerindex; + + BOOLEAN bReloadtxpowerindex; u1Byte bRfPiEnable; u4Byte TXPowerTrackingCallbackCnt; //cosa add for debug @@ -154,9 +154,9 @@ typedef struct ODM_RF_Calibration_Structure u1Byte OFDM_index[MAX_RF_PATH]; s1Byte PowerIndexOffset; s1Byte DeltaPowerIndex; - s1Byte DeltaPowerIndexLast; + s1Byte DeltaPowerIndexLast; BOOLEAN bTxPowerChanged; - + u1Byte ThermalValue_HP[HP_THERMAL_NUM]; u1Byte ThermalValue_HP_index; IQK_MATRIX_REGS_SETTING IQKMatrixRegSetting[IQK_Matrix_Settings_NUM]; @@ -189,10 +189,10 @@ typedef struct ODM_RF_Calibration_Structure u1Byte DeltaSwingTableIdx_5GD_N[BAND_NUM][DELTA_SWINGIDX_SIZE]; u1Byte DeltaSwingTableIdx_2GA_P_8188E[DELTA_SWINGIDX_SIZE]; u1Byte DeltaSwingTableIdx_2GA_N_8188E[DELTA_SWINGIDX_SIZE]; - + u1Byte BbSwingIdxOfdm[MAX_RF_PATH]; u1Byte BbSwingIdxOfdmCurrent; -#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) +#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) u1Byte BbSwingIdxOfdmBase[MAX_RF_PATH]; #else u1Byte BbSwingIdxOfdmBase; @@ -202,11 +202,11 @@ typedef struct ODM_RF_Calibration_Structure u1Byte BbSwingIdxCckCurrent; u1Byte BbSwingIdxCckBase; u1Byte DefaultOfdmIndex; - u1Byte DefaultCckIndex; + u1Byte DefaultCckIndex; BOOLEAN BbSwingFlagCck; - - s1Byte Absolute_OFDMSwingIdx[MAX_RF_PATH]; - s1Byte Remnant_OFDMSwingIdx[MAX_RF_PATH]; + + s1Byte Absolute_OFDMSwingIdx[MAX_RF_PATH]; + s1Byte Remnant_OFDMSwingIdx[MAX_RF_PATH]; s1Byte Remnant_CCKSwingIdx; s1Byte Modify_TxAGC_Value; /*Remnat compensate value at TxAGC */ BOOLEAN Modify_TxAGC_Flag_PathA; @@ -214,12 +214,12 @@ typedef struct ODM_RF_Calibration_Structure BOOLEAN Modify_TxAGC_Flag_PathC; BOOLEAN Modify_TxAGC_Flag_PathD; BOOLEAN Modify_TxAGC_Flag_PathA_CCK; - + s1Byte KfreeOffset[MAX_RF_PATH]; - - //--------------------------------------------------------------------// - - //for IQK + + //--------------------------------------------------------------------// + + //for IQK u4Byte RegC04; u4Byte Reg874; u4Byte RegC08; @@ -228,14 +228,14 @@ typedef struct ODM_RF_Calibration_Structure u4Byte Reg870; u4Byte Reg860; u4Byte Reg864; - + BOOLEAN bIQKInitialized; BOOLEAN bLCKInProgress; BOOLEAN bAntennaDetected; u4Byte ADDA_backup[IQK_ADDA_REG_NUM]; u4Byte IQK_MAC_backup[IQK_MAC_REG_NUM]; u4Byte IQK_BB_backup_recover[9]; - u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; + u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; //for APK u4Byte APKoutput[2][2]; //path A/B; output1_1a/output1_2a @@ -279,9 +279,9 @@ odm_TXPowerTrackingCheckCE( ); -#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) +#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) -VOID +VOID odm_TXPowerTrackingCallbackThermalMeter92C( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_powertracking_ce.h b/network/wlan/WDI/HAL/phydm/phydm_powertracking_ce.h index 4d22d1c1c..7901a8ea0 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_powertracking_ce.h +++ b/network/wlan/WDI/HAL/phydm/phydm_powertracking_ce.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,14 +17,14 @@ * * ******************************************************************************/ - + #ifndef __PHYDMPOWERTRACKING_H__ #define __PHYDMPOWERTRACKING_H__ #define POWRTRACKING_VERSION "1.0" #define DPK_DELTA_MAPPING_NUM 13 -#define index_mapping_HP_NUM 15 +#define index_mapping_HP_NUM 15 #define OFDM_TABLE_SIZE 43 #define CCK_TABLE_SIZE 33 #define CCK_TABLE_SIZE_88F 21 @@ -40,7 +40,7 @@ #define IQK_MAC_REG_NUM 4 #define IQK_ADDA_REG_NUM 16 #define IQK_BB_REG_NUM_MAX 10 -#if (RTL8192D_SUPPORT==1) +#if (RTL8192D_SUPPORT==1) #define IQK_BB_REG_NUM 10 #else #define IQK_BB_REG_NUM 9 @@ -64,47 +64,47 @@ extern u4Byte TxScalingTable_Jaguar[TXSCALE_TABLE_SIZE]; // <20121018, Kordan> In case fail to read TxPowerTrack.txt, we use the table of 88E as the default table. static u1Byte DeltaSwingTableIdx_2GA_P_8188E[] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9}; -static u1Byte DeltaSwingTableIdx_2GA_N_8188E[] = {0, 0, 0, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11}; +static u1Byte DeltaSwingTableIdx_2GA_N_8188E[] = {0, 0, 0, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11}; #define dm_CheckTXPowerTracking ODM_TXPowerTrackingCheck typedef struct _IQK_MATRIX_REGS_SETTING{ BOOLEAN bIQKDone; s4Byte Value[3][IQK_Matrix_REG_NUM]; - BOOLEAN bBWIqkResultSaved[3]; + BOOLEAN bBWIqkResultSaved[3]; }IQK_MATRIX_REGS_SETTING,*PIQK_MATRIX_REGS_SETTING; typedef struct ODM_RF_Calibration_Structure { //for tx power tracking - + u4Byte RegA24; // for TempCCK s4Byte RegE94; s4Byte RegE9C; s4Byte RegEB4; - s4Byte RegEBC; + s4Byte RegEBC; u1Byte TXPowercount; - BOOLEAN bTXPowerTrackingInit; + BOOLEAN bTXPowerTrackingInit; BOOLEAN bTXPowerTracking; u1Byte TxPowerTrackControl; //for mp mode, turn off txpwrtracking as default u1Byte TM_Trigger; u1Byte InternalPA5G[2]; //pathA / pathB - + u1Byte ThermalMeter[2]; // ThermalMeter, index 0 for RFIC0, and 1 for RFIC1 u1Byte ThermalValue; u1Byte ThermalValue_LCK; u1Byte ThermalValue_IQK; - u1Byte ThermalValue_DPK; + u1Byte ThermalValue_DPK; u1Byte ThermalValue_AVG[AVG_THERMAL_NUM]; - u1Byte ThermalValue_AVG_index; + u1Byte ThermalValue_AVG_index; u1Byte ThermalValue_RxGain; u1Byte ThermalValue_Crystal; u1Byte ThermalValue_DPKstore; u1Byte ThermalValue_DPKtrack; BOOLEAN TxPowerTrackingInProgress; - - BOOLEAN bReloadtxpowerindex; + + BOOLEAN bReloadtxpowerindex; u1Byte bRfPiEnable; u4Byte TXPowerTrackingCallbackCnt; //cosa add for debug @@ -115,9 +115,9 @@ typedef struct ODM_RF_Calibration_Structure u1Byte OFDM_index[MAX_RF_PATH]; s1Byte PowerIndexOffset[MAX_RF_PATH]; s1Byte DeltaPowerIndex[MAX_RF_PATH]; - s1Byte DeltaPowerIndexLast[MAX_RF_PATH]; + s1Byte DeltaPowerIndexLast[MAX_RF_PATH]; BOOLEAN bTxPowerChanged; - + u1Byte ThermalValue_HP[HP_THERMAL_NUM]; u1Byte ThermalValue_HP_index; IQK_MATRIX_REGS_SETTING IQKMatrixRegSetting[IQK_Matrix_Settings_NUM]; @@ -149,10 +149,10 @@ typedef struct ODM_RF_Calibration_Structure u1Byte DeltaSwingTableIdx_5GD_N[BAND_NUM][DELTA_SWINGIDX_SIZE]; u1Byte DeltaSwingTableIdx_2GA_P_8188E[DELTA_SWINGIDX_SIZE]; u1Byte DeltaSwingTableIdx_2GA_N_8188E[DELTA_SWINGIDX_SIZE]; - + u1Byte BbSwingIdxOfdm[MAX_RF_PATH]; u1Byte BbSwingIdxOfdmCurrent; -#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) +#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) u1Byte BbSwingIdxOfdmBase[MAX_RF_PATH]; #else u1Byte BbSwingIdxOfdmBase; @@ -162,11 +162,11 @@ typedef struct ODM_RF_Calibration_Structure u1Byte BbSwingIdxCckCurrent; u1Byte BbSwingIdxCckBase; u1Byte DefaultOfdmIndex; - u1Byte DefaultCckIndex; + u1Byte DefaultCckIndex; BOOLEAN BbSwingFlagCck; - - s1Byte Absolute_OFDMSwingIdx[MAX_RF_PATH]; - s1Byte Remnant_OFDMSwingIdx[MAX_RF_PATH]; + + s1Byte Absolute_OFDMSwingIdx[MAX_RF_PATH]; + s1Byte Remnant_OFDMSwingIdx[MAX_RF_PATH]; s1Byte Remnant_CCKSwingIdx; s1Byte Modify_TxAGC_Value; /*Remnat compensate value at TxAGC */ BOOLEAN Modify_TxAGC_Flag_PathA; @@ -174,12 +174,12 @@ typedef struct ODM_RF_Calibration_Structure BOOLEAN Modify_TxAGC_Flag_PathC; BOOLEAN Modify_TxAGC_Flag_PathD; BOOLEAN Modify_TxAGC_Flag_PathA_CCK; - + s1Byte KfreeOffset[MAX_RF_PATH]; - - //--------------------------------------------------------------------// - - //for IQK + + //--------------------------------------------------------------------// + + //for IQK u4Byte RegC04; u4Byte Reg874; u4Byte RegC08; @@ -188,25 +188,25 @@ typedef struct ODM_RF_Calibration_Structure u4Byte Reg870; u4Byte Reg860; u4Byte Reg864; - + BOOLEAN bIQKInitialized; BOOLEAN bLCKInProgress; BOOLEAN bAntennaDetected; BOOLEAN bNeedIQK; - BOOLEAN bIQKInProgress; + BOOLEAN bIQKInProgress; u1Byte Delta_IQK; u4Byte ADDA_backup[IQK_ADDA_REG_NUM]; u4Byte IQK_MAC_backup[IQK_MAC_REG_NUM]; u4Byte IQK_BB_backup_recover[9]; - u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; + u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; u4Byte TxIQC_8723B[2][3][2]; // { {S1: 0xc94, 0xc80, 0xc4c} , {S0: 0xc9c, 0xc88, 0xc4c}} u4Byte RxIQC_8723B[2][2][2]; // { {S1: 0xc14, 0xca0} , {S0: 0xc14, 0xca0}} u4Byte TxIQC_8703B[3][2]; /* { {S1: 0xc94, 0xc80, 0xc4c} , {S0: 0xc9c, 0xc88, 0xc4c}}*/ u4Byte RxIQC_8703B[2][2]; /* { {S1: 0xc14, 0xca0} , {S0: 0xc14, 0xca0}}*/ - - // IQK time measurement + + // IQK time measurement u8Byte IQK_StartTime; u8Byte IQK_ProgressingTime; u4Byte LOK_Result; @@ -215,9 +215,9 @@ typedef struct ODM_RF_Calibration_Structure u4Byte APKoutput[2][2]; //path A/B; output1_1a/output1_2a u1Byte bAPKdone; u1Byte bAPKThermalMeterIgnore; - + // DPK - BOOLEAN bDPKFail; + BOOLEAN bDPKFail; u1Byte bDPdone; u1Byte bDPPathAOK; u1Byte bDPPathBOK; @@ -229,7 +229,7 @@ typedef struct ODM_RF_Calibration_Structure }ODM_RF_CAL_T,*PODM_RF_CAL_T; -VOID +VOID ODM_TXPowerTrackingCheck( IN PVOID pDM_VOID ); @@ -266,9 +266,9 @@ odm_TXPowerTrackingCheckCE( IN PVOID pDM_VOID ); -#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) +#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) -VOID +VOID odm_TXPowerTrackingCallbackThermalMeter92C( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/HAL/phydm/phydm_powertracking_win.h b/network/wlan/WDI/HAL/phydm/phydm_powertracking_win.h index f4eac12eb..4ad6814ef 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_powertracking_win.h +++ b/network/wlan/WDI/HAL/phydm/phydm_powertracking_win.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,14 +17,14 @@ * * ******************************************************************************/ - + #ifndef __PHYDMPOWERTRACKING_H__ #define __PHYDMPOWERTRACKING_H__ #define POWRTRACKING_VERSION "1.0" #define DPK_DELTA_MAPPING_NUM 13 -#define index_mapping_HP_NUM 15 +#define index_mapping_HP_NUM 15 #define TXSCALE_TABLE_SIZE 37 #define CCK_TABLE_SIZE_8723D 41 #define TXPWR_TRACK_TABLE_SIZE 30 @@ -42,7 +42,7 @@ #define IQK_Matrix_REG_NUM 8 #define IQK_MAC_REG_NUM 4 #define IQK_ADDA_REG_NUM 16 -#if (RTL8192D_SUPPORT==1) +#if (RTL8192D_SUPPORT==1) #define IQK_BB_REG_NUM 10 #else #define IQK_BB_REG_NUM 9 @@ -62,7 +62,7 @@ extern u4Byte TxScalingTable_Jaguar[TXSCALE_TABLE_SIZE]; // <20121018, Kordan> In case fail to read TxPowerTrack.txt, we use the table of 88E as the default table. static u1Byte DeltaSwingTableIdx_2GA_P_8188E[] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9}; -static u1Byte DeltaSwingTableIdx_2GA_N_8188E[] = {0, 0, 0, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11}; +static u1Byte DeltaSwingTableIdx_2GA_N_8188E[] = {0, 0, 0, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11}; VOID ODM_TXPowerTrackingCheck( @@ -95,7 +95,7 @@ odm_TXPowerTrackingCheckCE( IN PVOID pDM_VOID ); -#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) +#if(DM_ODM_SUPPORT_TYPE & (ODM_WIN)) VOID @@ -108,36 +108,36 @@ odm_TXPowerTrackingThermalMeterCheck( typedef struct _IQK_MATRIX_REGS_SETTING{ BOOLEAN bIQKDone; s4Byte Value[3][IQK_Matrix_REG_NUM]; - BOOLEAN bBWIqkResultSaved[3]; + BOOLEAN bBWIqkResultSaved[3]; }IQK_MATRIX_REGS_SETTING,*PIQK_MATRIX_REGS_SETTING; typedef struct ODM_RF_Calibration_Structure { //for tx power tracking - + u4Byte RegA24; // for TempCCK s4Byte RegE94; s4Byte RegE9C; s4Byte RegEB4; - s4Byte RegEBC; + s4Byte RegEBC; //u1Byte bTXPowerTracking; u1Byte TXPowercount; - BOOLEAN bTXPowerTrackingInit; + BOOLEAN bTXPowerTrackingInit; BOOLEAN bTXPowerTracking; u1Byte TxPowerTrackControl; //for mp mode, turn off txpwrtracking as default u1Byte TM_Trigger; u1Byte InternalPA5G[2]; //pathA / pathB - + u1Byte ThermalMeter[2]; // ThermalMeter, index 0 for RFIC0, and 1 for RFIC1 u1Byte ThermalValue; u1Byte ThermalValue_LCK; u1Byte ThermalValue_IQK; u1Byte ThermalValue_AVG[AVG_THERMAL_NUM]; - u1Byte ThermalValue_AVG_index; + u1Byte ThermalValue_AVG_index; u1Byte ThermalValue_RxGain; - - BOOLEAN bReloadtxpowerindex; + + BOOLEAN bReloadtxpowerindex; u1Byte bRfPiEnable; u4Byte TXPowerTrackingCallbackCnt; //cosa add for debug @@ -148,9 +148,9 @@ typedef struct ODM_RF_Calibration_Structure u1Byte OFDM_index[MAX_RF_PATH]; s1Byte PowerIndexOffset[MAX_RF_PATH]; s1Byte DeltaPowerIndex[MAX_RF_PATH]; - s1Byte DeltaPowerIndexLast[MAX_RF_PATH]; + s1Byte DeltaPowerIndexLast[MAX_RF_PATH]; BOOLEAN bTxPowerChanged; - + u1Byte ThermalValue_HP[HP_THERMAL_NUM]; u1Byte ThermalValue_HP_index; IQK_MATRIX_REGS_SETTING IQKMatrixRegSetting[IQK_Matrix_Settings_NUM]; @@ -182,10 +182,10 @@ typedef struct ODM_RF_Calibration_Structure u1Byte DeltaSwingTableIdx_5GD_N[BAND_NUM][DELTA_SWINGIDX_SIZE]; u1Byte DeltaSwingTableIdx_2GA_P_8188E[DELTA_SWINGIDX_SIZE]; u1Byte DeltaSwingTableIdx_2GA_N_8188E[DELTA_SWINGIDX_SIZE]; - + u1Byte BbSwingIdxOfdm[MAX_RF_PATH]; u1Byte BbSwingIdxOfdmCurrent; -#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) +#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) u1Byte BbSwingIdxOfdmBase[MAX_RF_PATH]; #else u1Byte BbSwingIdxOfdmBase; @@ -195,11 +195,11 @@ typedef struct ODM_RF_Calibration_Structure u1Byte BbSwingIdxCckCurrent; u1Byte BbSwingIdxCckBase; u1Byte DefaultOfdmIndex; - u1Byte DefaultCckIndex; + u1Byte DefaultCckIndex; BOOLEAN BbSwingFlagCck; - - s1Byte Absolute_OFDMSwingIdx[MAX_RF_PATH]; - s1Byte Remnant_OFDMSwingIdx[MAX_RF_PATH]; + + s1Byte Absolute_OFDMSwingIdx[MAX_RF_PATH]; + s1Byte Remnant_OFDMSwingIdx[MAX_RF_PATH]; s1Byte Remnant_CCKSwingIdx; s1Byte Modify_TxAGC_Value; /*Remnat compensate value at TxAGC */ BOOLEAN Modify_TxAGC_Flag_PathA; @@ -207,12 +207,12 @@ typedef struct ODM_RF_Calibration_Structure BOOLEAN Modify_TxAGC_Flag_PathC; BOOLEAN Modify_TxAGC_Flag_PathD; BOOLEAN Modify_TxAGC_Flag_PathA_CCK; - + s1Byte KfreeOffset[MAX_RF_PATH]; - - //--------------------------------------------------------------------// - - //for IQK + + //--------------------------------------------------------------------// + + //for IQK u4Byte RegC04; u4Byte Reg874; u4Byte RegC08; @@ -221,27 +221,27 @@ typedef struct ODM_RF_Calibration_Structure u4Byte Reg870; u4Byte Reg860; u4Byte Reg864; - + BOOLEAN bIQKInitialized; BOOLEAN bLCKInProgress; BOOLEAN bAntennaDetected; BOOLEAN bNeedIQK; - BOOLEAN bIQKInProgress; + BOOLEAN bIQKInProgress; u1Byte Delta_IQK; u4Byte ADDA_backup[IQK_ADDA_REG_NUM]; u4Byte IQK_MAC_backup[IQK_MAC_REG_NUM]; u4Byte IQK_BB_backup_recover[9]; - u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; + u4Byte IQK_BB_backup[IQK_BB_REG_NUM]; u4Byte TxIQC_8723B[2][3][2]; /* { {S1: 0xc94, 0xc80, 0xc4c} , {S0: 0xc9c, 0xc88, 0xc4c}} */ u4Byte RxIQC_8723B[2][2][2]; /* { {S1: 0xc14, 0xca0} , {S0: 0xc14, 0xca0}} */ u4Byte TxIQC_8703B[3][2]; /* { {S1: 0xc94, 0xc80, 0xc4c} , {S0: 0xc9c, 0xc88, 0xc4c}}*/ u4Byte RxIQC_8703B[2][2]; /* { {S1: 0xc14, 0xca0} , {S0: 0xc14, 0xca0}}*/ u4Byte TxIQC_8723D[3][2]; /* { {S1: 0xc94, 0xc80, 0xc4c} , {S0: 0xc9c, 0xc88, 0xc4c}}*/ u4Byte RxIQC_8723D[2][2]; /* { {S1: 0xc14, 0xca0} , {S0: 0xc14, 0xca0}}*/ - - - // IQK time measurement + + + // IQK time measurement u8Byte IQK_StartTime; u8Byte IQK_ProgressingTime; u4Byte LOK_Result; @@ -250,9 +250,9 @@ typedef struct ODM_RF_Calibration_Structure u4Byte APKoutput[2][2]; //path A/B; output1_1a/output1_2a u1Byte bAPKdone; u1Byte bAPKThermalMeterIgnore; - + // DPK - BOOLEAN bDPKFail; + BOOLEAN bDPKFail; u1Byte bDPdone; u1Byte bDPPathAOK; u1Byte bDPPathBOK; @@ -260,8 +260,8 @@ typedef struct ODM_RF_Calibration_Structure u4Byte TxLOK[2]; u4Byte DpkTxAGC; s4Byte DpkGain; - u4Byte DpkThermal[2]; - + u4Byte DpkThermal[2]; + s1Byte Modify_TxAGC_Value_OFDM; s1Byte Modify_TxAGC_Value_CCK; }ODM_RF_CAL_T,*PODM_RF_CAL_T; diff --git a/network/wlan/WDI/HAL/phydm/phydm_pre_define.h b/network/wlan/WDI/HAL/phydm/phydm_pre_define.h index f3b5733de..d0976bd0b 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_pre_define.h +++ b/network/wlan/WDI/HAL/phydm/phydm_pre_define.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -23,7 +23,7 @@ #define __PHYDMPREDEFINE_H__ //1 ============================================================ -//1 Definition +//1 Definition //1 ============================================================ //Max path of IC @@ -225,9 +225,9 @@ #else #if (RTL8192E_SUPPORT == 1) #define ODM_NUM_RATE_IDX (ODM_RATEMCS15+1) - #elif (RTL8723B_SUPPORT == 1) || (RTL8188E_SUPPORT == 1) || (RTL8188F_SUPPORT == 1) + #elif (RTL8723B_SUPPORT == 1) || (RTL8188E_SUPPORT == 1) || (RTL8188F_SUPPORT == 1) #define ODM_NUM_RATE_IDX (ODM_RATEMCS7+1) - #elif (RTL8821A_SUPPORT == 1) || (RTL8881A_SUPPORT == 1) + #elif (RTL8821A_SUPPORT == 1) || (RTL8881A_SUPPORT == 1) #define ODM_NUM_RATE_IDX (ODM_RATEVHTSS1MCS9+1) #elif (RTL8812A_SUPPORT == 1) #define ODM_NUM_RATE_IDX (ODM_RATEVHTSS2MCS9+1) @@ -266,9 +266,9 @@ typedef enum tag_ODM_Support_IC_Type_Definition ODM_RTL8188E = BIT4, ODM_RTL8812 = BIT5, ODM_RTL8821 = BIT6, - ODM_RTL8192E = BIT7, + ODM_RTL8192E = BIT7, ODM_RTL8723B = BIT8, - ODM_RTL8814A = BIT9, + ODM_RTL8814A = BIT9, ODM_RTL8881A = BIT10, ODM_RTL8821B = BIT11, ODM_RTL8822B = BIT12, @@ -304,7 +304,7 @@ typedef enum tag_ODM_Support_IC_Type_Definition #define ODM_IC_11N_SERIES_SUPPORT 1 #define ODM_CONFIG_BT_COEXIST 1 -#else +#else #if((RTL8192C_SUPPORT == 1) || (RTL8192D_SUPPORT == 1) || (RTL8723A_SUPPORT == 1) || (RTL8188E_SUPPORT == 1) ||\ (RTL8723B_SUPPORT == 1) || (RTL8192E_SUPPORT == 1) || (RTL8195A_SUPPORT == 1) || (RTL8703B_SUPPORT == 1) || \ @@ -337,7 +337,7 @@ typedef enum tag_ODM_Cut_Version_Definition ODM_CUT_I = 8, ODM_CUT_J = 9, - ODM_CUT_K = 10, + ODM_CUT_K = 10, ODM_CUT_TEST = 15, }ODM_CUT_VERSION_E; @@ -390,7 +390,7 @@ typedef enum tag_ODM_MAC_PHY_Mode_Definition typedef enum tag_BT_Coexist_Definition -{ +{ ODM_BT_BUSY = 1, ODM_BT_ON = 2, ODM_BT_OFF = 3, @@ -480,7 +480,7 @@ typedef enum tag_Security_Definition // ODM_CMNINFO_BW typedef enum tag_Bandwidth_Definition -{ +{ ODM_BW20M = 0, ODM_BW40M = 1, ODM_BW80M = 2, @@ -508,10 +508,10 @@ typedef enum tag_Board_Definition typedef enum tag_ODM_Package_Definition { - ODM_PACKAGE_DEFAULT = 0, - ODM_PACKAGE_QFN68 = BIT(0), - ODM_PACKAGE_TFBGA90 = BIT(1), - ODM_PACKAGE_TFBGA79 = BIT(2), + ODM_PACKAGE_DEFAULT = 0, + ODM_PACKAGE_QFN68 = BIT(0), + ODM_PACKAGE_TFBGA90 = BIT(1), + ODM_PACKAGE_TFBGA79 = BIT(2), }ODM_Package_TYPE_E; typedef enum tag_ODM_TYPE_GPA_Definition { diff --git a/network/wlan/WDI/HAL/phydm/phydm_precomp.h b/network/wlan/WDI/HAL/phydm/phydm_precomp.h index 7cc6ad275..c03c74e5b 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_precomp.h +++ b/network/wlan/WDI/HAL/phydm/phydm_precomp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -29,14 +29,14 @@ #define TEST_FALG___ 1 #endif -#if (DM_ODM_SUPPORT_TYPE ==ODM_CE) +#if (DM_ODM_SUPPORT_TYPE ==ODM_CE) #define RTL8192CE_SUPPORT 0 #define RTL8192CU_SUPPORT 0 -#define RTL8192C_SUPPORT 0 +#define RTL8192C_SUPPORT 0 #define RTL8192DE_SUPPORT 0 #define RTL8192DU_SUPPORT 0 -#define RTL8192D_SUPPORT 0 +#define RTL8192D_SUPPORT 0 #define RTL8723AU_SUPPORT 0 #define RTL8723AS_SUPPORT 0 @@ -61,7 +61,7 @@ #ifdef AP_BUILD_WORKAROUND #include "../8192cd_headers.h" - #include "../8192cd_debug.h" + #include "../8192cd_debug.h" #endif #elif (DM_ODM_SUPPORT_TYPE ==ODM_CE) @@ -75,8 +75,8 @@ #endif //2 OutSrc Header Files - -#include "phydm.h" + +#include "phydm.h" #include "phydm_hwconfig.h" #include "phydm_debug.h" #include "phydm_regdefine11ac.h" @@ -131,7 +131,7 @@ PHY_SetTxPowerLimit( //#include "rtl8188e/phydm_rtl8188e.h" //#include "rtl8188e/hal8188ereg.h" //#if (DM_ODM_SUPPORT_TYPE == ODM_CE) -// #include "rtl8188e_hal.h" +// #include "rtl8188e_hal.h" // #include "rtl8188e/halphyrf_8188e_ce.h" //#endif //#if (DM_ODM_SUPPORT_TYPE == ODM_WIN) @@ -141,7 +141,7 @@ PHY_SetTxPowerLimit( // #include "rtl8188e/halphyrf_8188e_ap.h" //#endif -//#if (RTL8192E_SUPPORT==1) +//#if (RTL8192E_SUPPORT==1) // // #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) // #include "rtl8192e/halphyrf_8192e_win.h" /*FOR_8192E_IQK*/ @@ -150,7 +150,7 @@ PHY_SetTxPowerLimit( // #elif (DM_ODM_SUPPORT_TYPE == ODM_CE) // #include "rtl8192e/halphyrf_8192e_ce.h" /*FOR_8192E_IQK*/ // #endif -// +// //#include "rtl8192e/phydm_rtl8192e.h" //FOR_8192E_IQK //#if (DM_ODM_SUPPORT_TYPE != ODM_AP) // #include "rtl8192e/halhwimg8192e_bb.h" @@ -244,7 +244,7 @@ PHY_SetTxPowerLimit( //#include "rtl8881a/odm_RegConfig8881A.h" //#endif -#if (RTL8723B_SUPPORT==1) +#if (RTL8723B_SUPPORT==1) #include "rtl8723b/halhwimg8723b_mac.h" #include "rtl8723b/halhwimg8723b_rf.h" #include "rtl8723b/halhwimg8723b_bb.h" @@ -261,7 +261,7 @@ PHY_SetTxPowerLimit( #endif #endif -//#if (RTL8821A_SUPPORT==1) +//#if (RTL8821A_SUPPORT==1) //#include "rtl8821a/halhwimg8821a_mac.h" //#include "rtl8821a/halhwimg8821a_rf.h" //#include "rtl8821a/halhwimg8821a_bb.h" @@ -279,7 +279,7 @@ PHY_SetTxPowerLimit( //#endif //#endif -//#if (RTL8821B_SUPPORT==1) +//#if (RTL8821B_SUPPORT==1) //#include "rtl8821b/halhwimg8821b_mac.h" //#include "rtl8821b/halhwimg8821b_rf.h" //#include "rtl8821b/halhwimg8821b_bb.h" @@ -292,7 +292,7 @@ PHY_SetTxPowerLimit( //#include "rtl8821b/halphyrf_8821b.h" //#endif - + //#include "rtl8822b/halhwimg8822b_mac.h" //#include "rtl8822b/halhwimg8822b_rf.h" //#include "rtl8822b/halhwimg8822b_bb.h" @@ -304,7 +304,7 @@ PHY_SetTxPowerLimit( //#include "rtl8822b/version_rtl8822b.h" -//#if (RTL8703B_SUPPORT==1) +//#if (RTL8703B_SUPPORT==1) //#include "rtl8703b/phydm_regconfig8703b.h" //#include "rtl8703b/halhwimg8703b_mac.h" //#include "rtl8703b/halhwimg8703b_rf.h" @@ -317,7 +317,7 @@ PHY_SetTxPowerLimit( //#endif //#endif -//#if (RTL8188F_SUPPORT == 1) +//#if (RTL8188F_SUPPORT == 1) //#include "rtl8188f/halhwimg8188f_mac.h" //#include "rtl8188f/halhwimg8188f_rf.h" //#include "rtl8188f/halhwimg8188f_bb.h" diff --git a/network/wlan/WDI/HAL/phydm/phydm_rainfo.h b/network/wlan/WDI/HAL/phydm/phydm_rainfo.h index 4f62282a6..7356042b8 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_rainfo.h +++ b/network/wlan/WDI/HAL/phydm/phydm_rainfo.h @@ -188,7 +188,7 @@ typedef struct _Rate_Adaptive_Table_ { #if (defined(CONFIG_RA_DYNAMIC_RTY_LIMIT)) u1Byte per_rate_retrylimit_20M[ODM_NUM_RATE_IDX]; - u1Byte per_rate_retrylimit_40M[ODM_NUM_RATE_IDX]; + u1Byte per_rate_retrylimit_40M[ODM_NUM_RATE_IDX]; u1Byte retry_descend_num; u1Byte retrylimit_low; u1Byte retrylimit_high; diff --git a/network/wlan/WDI/HAL/phydm/phydm_reg.h b/network/wlan/WDI/HAL/phydm/phydm_reg.h index e8424139b..e183b958a 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_reg.h +++ b/network/wlan/WDI/HAL/phydm/phydm_reg.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -120,7 +120,7 @@ // Bitmap Definition // #if(DM_ODM_SUPPORT_TYPE & (ODM_AP)) -// TX AGC +// TX AGC #define rTxAGC_A_CCK11_CCK1_JAguar 0xc20 #define rTxAGC_A_Ofdm18_Ofdm6_JAguar 0xc24 #define rTxAGC_A_Ofdm54_Ofdm24_JAguar 0xc28 diff --git a/network/wlan/WDI/HAL/phydm/phydm_regdefine11ac.h b/network/wlan/WDI/HAL/phydm/phydm_regdefine11ac.h index c8a551d1c..eed658338 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_regdefine11ac.h +++ b/network/wlan/WDI/HAL/phydm/phydm_regdefine11ac.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __ODM_REGDEFINE11AC_H__ #define __ODM_REGDEFINE11AC_H__ diff --git a/network/wlan/WDI/HAL/phydm/phydm_regdefine11n.h b/network/wlan/WDI/HAL/phydm/phydm_regdefine11n.h index 8826dfb20..76ab6856a 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_regdefine11n.h +++ b/network/wlan/WDI/HAL/phydm/phydm_regdefine11n.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -17,7 +17,7 @@ * * ******************************************************************************/ - + #ifndef __ODM_REGDEFINE11N_H__ #define __ODM_REGDEFINE11N_H__ diff --git a/network/wlan/WDI/HAL/phydm/phydm_rxhp.h b/network/wlan/WDI/HAL/phydm/phydm_rxhp.h index 98b3aa6ab..eb2f657c1 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_rxhp.h +++ b/network/wlan/WDI/HAL/phydm/phydm_rxhp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -26,7 +26,7 @@ #define AFH_PSD 1 //0:normal PSD scan, 1: only do 20 pts PSD #define MODE_40M 0 //0:20M, 1:40M -#define PSD_TH2 3 +#define PSD_TH2 3 #define PSD_CHMIN 20 // Minimum channel number for BT AFH #define SIR_STEP_SIZE 3 #define Smooth_Size_1 5 @@ -101,5 +101,4 @@ odm_PSDMonitorWorkItemCallback( #endif - #endif - \ No newline at end of file + #endif \ No newline at end of file diff --git a/network/wlan/WDI/HAL/phydm/phydm_types.h b/network/wlan/WDI/HAL/phydm/phydm_types.h index 85be00b13..bc335daed 100644 --- a/network/wlan/WDI/HAL/phydm/phydm_types.h +++ b/network/wlan/WDI/HAL/phydm/phydm_types.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -23,7 +23,7 @@ // // Define Different SW team support // -#define ODM_AP 0x01 //BIT0 +#define ODM_AP 0x01 //BIT0 #define ODM_ADSL 0x02 //BIT1 #define ODM_CE 0x04 //BIT2 #define ODM_WIN 0x08 //BIT3 @@ -71,7 +71,7 @@ typedef enum _RT_SPINLOCK_TYPE{ RT_RM_SPINLOCK = 3, RT_CAM_SPINLOCK = 4, RT_SCAN_SPINLOCK = 5, - RT_LOG_SPINLOCK = 7, + RT_LOG_SPINLOCK = 7, RT_BW_SPINLOCK = 8, RT_CHNLOP_SPINLOCK = 9, RT_RF_OPERATE_SPINLOCK = 10, @@ -84,7 +84,7 @@ typedef enum _RT_SPINLOCK_TYPE{ //Shall we define Ndis 6.2 SpinLock Here ? RT_PORT_SPINLOCK=16, RT_VNIC_SPINLOCK=17, - RT_HVL_SPINLOCK=18, + RT_HVL_SPINLOCK=18, RT_H2C_SPINLOCK = 20, // For H2C cmd. Added by tynli. 2009.11.09. RT_BTData_SPINLOCK=25, @@ -92,7 +92,7 @@ typedef enum _RT_SPINLOCK_TYPE{ RT_WAPI_OPTION_SPINLOCK=26, RT_WAPI_RX_SPINLOCK=27, - // add for 92D CCK control issue + // add for 92D CCK control issue RT_CCK_PAGEA_SPINLOCK = 28, RT_BUFFER_SPINLOCK = 29, RT_CHANNEL_AND_BANDWIDTH_SPINLOCK = 30, @@ -105,8 +105,8 @@ typedef enum _RT_SPINLOCK_TYPE{ RT_DBG_SPIN_LOCK = 37, RT_IQK_SPINLOCK = 38, RT_PENDED_OID_SPINLOCK = 39, - RT_CHNLLIST_SPINLOCK = 40, - RT_INDIC_SPINLOCK = 41, //protect indication + RT_CHNLLIST_SPINLOCK = 40, + RT_INDIC_SPINLOCK = 41, //protect indication RT_RFD_SPINLOCK = 42, RT_SYNC_IO_CNT_SPINLOCK = 43, RT_LAST_SPINLOCK, @@ -119,8 +119,8 @@ typedef enum _RT_SPINLOCK_TYPE{ #define STA_INFO_T RT_WLAN_STA #define PSTA_INFO_T PRT_WLAN_STA - #define CONFIG_HW_ANTENNA_DIVERSITY - #define CONFIG_SW_ANTENNA_DIVERSITY + #define CONFIG_HW_ANTENNA_DIVERSITY + #define CONFIG_SW_ANTENNA_DIVERSITY /*#define CONFIG_HL_SMART_ANTENNA_TYPE1*/ /*#define CONFIG_PATH_DIVERSITY*/ /*#define CONFIG_RA_DYNAMIC_RTY_LIMIT*/ @@ -138,16 +138,16 @@ typedef enum _RT_SPINLOCK_TYPE{ // To let ADSL/AP project compile ok; it should be removed after all conflict are solved. Added by Annie, 2011-10-07. #define ADSL_AP_BUILD_WORKAROUND #define AP_BUILD_WORKAROUND - + //2 [ Configure RA Debug H2C CMD ] #define CONFIG_RA_DBG_CMD - + /*#define CONFIG_PATH_DIVERSITY*/ /*#define CONFIG_RA_DYNAMIC_RTY_LIMIT*/ - + //2 [ Configure Antenna Diversity ] #if defined(CONFIG_RTL_8881A_ANT_SWITCH) || defined(CONFIG_SLOT_0_ANT_SWITCH) || defined(CONFIG_SLOT_1_ANT_SWITCH) - #define CONFIG_HW_ANTENNA_DIVERSITY + #define CONFIG_HW_ANTENNA_DIVERSITY #define ODM_EVM_ENHANCE_ANTDIV //---------- @@ -166,16 +166,16 @@ typedef enum _RT_SPINLOCK_TYPE{ #endif #if(!defined(CONFIG_NO_5G_DIVERSITY) && !defined(CONFIG_5G_CGCS_RX_DIVERSITY) && !defined(CONFIG_5G_CG_TRX_DIVERSITY) && !defined(CONFIG_2G5G_CG_TRX_DIVERSITY) && !defined(CONFIG_5G_CG_SMART_ANT_DIVERSITY)) #define CONFIG_NO_5G_DIVERSITY - #endif + #endif //---------- #if ( defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY) ) - #define CONFIG_NOT_SUPPORT_ANTDIV + #define CONFIG_NOT_SUPPORT_ANTDIV #elif( !defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY) ) #define CONFIG_2G_SUPPORT_ANTDIV #elif( defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY) ) #define CONFIG_5G_SUPPORT_ANTDIV #elif( (!defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY)) || defined(CONFIG_2G5G_CG_TRX_DIVERSITY) ) - #define CONFIG_2G5G_SUPPORT_ANTDIV + #define CONFIG_2G5G_SUPPORT_ANTDIV #endif //---------- #endif @@ -217,7 +217,7 @@ typedef enum _RT_SPINLOCK_TYPE{ #else #define PHYDM_TESTCHIP_SUPPORT 0 #endif - + #elif (DM_ODM_SUPPORT_TYPE == ODM_CE) #include @@ -237,29 +237,29 @@ typedef enum _RT_SPINLOCK_TYPE{ typedef s64 s8Byte,*ps8Byte; #else #define u1Byte u8 - #define pu1Byte u8* + #define pu1Byte u8* #define u2Byte u16 - #define pu2Byte u16* + #define pu2Byte u16* #define u4Byte u32 - #define pu4Byte u32* + #define pu4Byte u32* #define u8Byte u64 #define pu8Byte u64* #define s1Byte s8 - #define ps1Byte s8* + #define ps1Byte s8* #define s2Byte s16 - #define ps2Byte s16* + #define ps2Byte s16* #define s4Byte s32 - #define ps4Byte s32* + #define ps4Byte s32* #define s8Byte s64 - #define ps8Byte s64* - + #define ps8Byte s64* + #endif #ifdef CONFIG_USB_HCI #define DEV_BUS_TYPE RT_USB_INTERFACE @@ -270,22 +270,22 @@ typedef enum _RT_SPINLOCK_TYPE{ #elif defined(CONFIG_GSPI_HCI) #define DEV_BUS_TYPE RT_SDIO_INTERFACE #endif - - #if defined(CONFIG_LITTLE_ENDIAN) + + #if defined(CONFIG_LITTLE_ENDIAN) #define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE #elif defined (CONFIG_BIG_ENDIAN) #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG #endif - + typedef struct timer_list RT_TIMER, *PRT_TIMER; typedef void * RT_TIMER_CALL_BACK; #define STA_INFO_T struct sta_info #define PSTA_INFO_T struct sta_info * - - #define TRUE _TRUE + + #define TRUE _TRUE #define FALSE _FALSE diff --git a/network/wlan/WDI/HAL/phydm/rtchnlplan.h b/network/wlan/WDI/HAL/phydm/rtchnlplan.h index 78a31dcd1..132f27adf 100644 --- a/network/wlan/WDI/HAL/phydm/rtchnlplan.h +++ b/network/wlan/WDI/HAL/phydm/rtchnlplan.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -41,7 +41,7 @@ typedef enum _RT_CHANNEL_DOMAIN_NEW // ..... RT_CHANNEL_DOMAIN_MAX_NEW, - + }RT_CHANNEL_DOMAIN_NEW, *PRT_CHANNEL_DOMAIN_NEW; @@ -90,7 +90,7 @@ typedef enum _RT_CHANNEL_DOMAIN_NEW #define DOMAIN_CODE_5G_NCC1 \ {56,60,64,100,104,108,112,116,136,140,149,153,157,161,165}, 24 #define DOMAIN_CODE_5G_NCC2 \ - {56,60,64,149,153,157,161,165}, 8 + {56,60,64,149,153,157,161,165}, 8 #define UNDEFINED \ {0}, 0 #endif @@ -102,158 +102,158 @@ typedef enum _RT_CHANNEL_DOMAIN_NEW Countries "Country Abbreviation" Domain Code SKU's Ch# of 20MHz 2G 5G Ch# of 40MHz -"Albaniaªüº¸¤Ú¥§¨È" AL Local Test - -"Algeriaªüº¸¤Î§Q¨È" DZ CE TCF - -"Antigua & Barbuda¦w´£¥Ê®q&¤Ú¥¬¹F" AG 2G_WORLD FCC TCF - -"Argentinaªü®Ú§Ê" AR 2G_WORLD Local Test - -"Armenia¨È¬ü¥§¨È" AM 2G_WORLD ETSI - -"Arubaªü¾|¤Ú®q" AW 2G_WORLD FCC TCF - -"Australia¿D¬w" AU 2G_WORLD 5G_ETSI2 - -"Austria¶ø¦a§Q" AT 2G_WORLD 5G_ETSI1 CE - -"Azerbaijanªü¶ë«ô¾Ê" AZ 2G_WORLD CE TCF - -"Bahamas¤Ú«¢°¨" BS 2G_WORLD - -"Barbados¤Ú¤Ú¦h´µ" BB 2G_WORLD FCC TCF - -"Belgium¤ñ§Q®É" BE 2G_WORLD 5G_ETSI1 CE - -"Bermuda¦Ê¼}¹F" BM 2G_WORLD FCC TCF - -"Brazil¤Ú¦è" BR 2G_WORLD Local Test - -"Bulgaria«O¥[§Q¨È" BG 2G_WORLD 5G_ETSI1 CE - -"Canada¥[®³¤j" CA 2G_FCC1 5G_FCC7 IC / FCC IC / FCC - -"Cayman Islands¶}°Ò¸s®q" KY 2G_WORLD 5G_ETSI1 CE - -"Chile´¼§Q" CL 2G_WORLD FCC TCF - -"China¤¤°ê" CN 2G_WORLD 5G_FCC5 «H³¡?¡i2002¡j353? - -"Columbia­ô­Û¤ñ¨È" CO 2G_WORLD Voluntary - -"Costa Rica­ô´µ¹F¾¤¥[" CR 2G_WORLD FCC TCF - -"Cyprus¶ë®ú¸ô´µ" CY 2G_WORLD 5G_ETSI1 CE - -"Czech ±¶§J" CZ 2G_WORLD 5G_ETSI1 CE - -"Denmark¤¦³Á" DK 2G_WORLD 5G_ETSI1 CE - -"Dominican Republic¦h©ú¥§¥[¦@©M°ê" DO 2G_WORLD FCC TCF - -"Egypt®J¤Î" EG 2G_WORLD CE T CF - -"El SalvadorÂĺ¸¥Ë¦h" SV 2G_WORLD Voluntary - -"Estonia·R¨F¥§¨È" EE 2G_WORLD 5G_ETSI1 CE - -"FinlandªâÄõ" FI 2G_WORLD 5G_ETSI1 CE - -"Franceªk°ê" FR 5G_E TSI1 CE - -"Germany¼w°ê" DE 2G_WORLD 5G_ETSI1 CE - -"Greece §ÆÃ¾" GR 2G_WORLD 5G_ETSI1 CE - -"GuamÃö®q" GU 2G_WORLD - -"Guatemala¥Ê¦a°¨©Ô" GT 2G_WORLD - -"Haiti®ü¦a" HT 2G_WORLD FCC TCF - -"Honduras§»³£©Ô´µ" HN 2G_WORLD FCC TCF - -"Hungary¦I¤ú§Q" HU 2G_WORLD 5G_ETSI1 CE - -"Iceland¦B®q" IS 2G_WORLD 5G_ETSI1 CE - -"India¦L«×" IN 2G_WORLD 5G_FCC3 FCC/CE TCF - -"Ireland·Rº¸Äõ" IE 2G_WORLD 5G_ETSI1 CE - -"Israel¥H¦â¦C" IL 5G_F CC6 CE TCF - -"Italy¸q¤j§Q" IT 2G_WORLD 5G_ETSI1 CE - -"Japan¤é¥»" JP 2G_MKK1 5G_MKK1 MKK MKK - -"KoreaÁú°ê" KR 2G_WORLD 5G_KCC1 KCC KCC - -"Latvia©Ô²æºû¨È" LV 2G_WORLD 5G_ETSI1 CE - -"Lithuania¥ß³³©{" LT 2G_WORLD 5G_ETSI1 CE - -"Luxembourg¿c´Ë³ù" LU 2G_WORLD 5G_ETSI1 CE - -"Malaysia°¨¨Ó¦è¨È" MY 2G_WORLD Local Test - -"Malta°¨º¸¥L" MT 2G_WORLD 5G_ETSI1 CE - -"Mexico¾¥¦è­ô" MX 2G_WORLD 5G_FCC3 Local Test - -"Morocco¼¯¬¥­ô" MA CE TCF - -"Netherlands²üÄõ" NL 2G_WORLD 5G_ETSI1 CE - -"New Zealand¯Ã¦èÄõ" NZ 2G_WORLD 5G_ETSI2 - -"Norway®¿«Â" NO 2G_WORLD 5G_ETSI1 CE - -"Panama¤Ú®³°¨ " PA 2G_FCC1 Voluntary - -"Philippinesµá«ß»«" PH 2G_WORLD FCC TCF - -"PolandªiÄõ" PL 2G_WORLD 5G_ETSI1 CE - -"Portugal¸²µå¤ú" PT 2G_WORLD 5G_ETSI1 CE - -"Romaniaù°¨¥§¨È" RO 2G_WORLD 5G_ETSI1 CE - -"Russia«Xù´µ" RU 2G_WORLD 5G_ETSI3 CE TCF - -"Saudi Arabia¨F¦aªü©Ô§B" SA 2G_WORLD CE TCF - -"Singapore·s¥[©Y" SG 2G_WORLD - -"Slovakia´µ¬¥¥ï§J" SK 2G_WORLD 5G_ETSI1 CE - -"Slovenia´µ¬¥ºû¥§¨È" SI 2G_WORLD 5G_ETSI1 CE - -"South Africa«n«D" ZA 2G_WORLD CE TCF - -"Spain¦è¯Z¤ú" ES 5G_ETSI1 CE - -"Sweden·ç¨å" SE 2G_WORLD 5G_ETSI1 CE - -"Switzerland·ç¤h" CH 2G_WORLD 5G_ETSI1 CE - -"Taiwan»OÆW" TW 2G_FCC1 5G_NCC1 NCC - -"Thailand®õ°ê" TH 2G_WORLD FCC/CE TCF - -"Turkey¤g¦Õ¨ä" TR 2G_WORLD - -"Ukraine¯Q§JÄõ" UA 2G_WORLD Local Test - -"United Kingdom­^°ê" GB 2G_WORLD 5G_ETSI1 CE ETSI - -"United States¬ü°ê" US 2G_FCC1 5G_FCC7 FCC FCC - -"Venezuela©e¤º·ç©Ô" VE 2G_WORLD 5G_FCC4 FCC TCF - -"Vietnam¶V«n" VN 2G_WORLD FCC/CE TCF - +"Albania�����ڥ���" AL Local Test + +"Algeria�����ΧQ��" DZ CE TCF + +"Antigua & Barbuda�w���ʮq&�ڥ��F" AG 2G_WORLD FCC TCF + +"Argentina���ڧ�" AR 2G_WORLD Local Test + +"Armenia�Ȭ�����" AM 2G_WORLD ETSI + +"Aruba���|�ڮq" AW 2G_WORLD FCC TCF + +"Australia�D�w" AU 2G_WORLD 5G_ETSI2 + +"Austria���a�Q" AT 2G_WORLD 5G_ETSI1 CE + +"Azerbaijan�������" AZ 2G_WORLD CE TCF + +"Bahamas�ګ���" BS 2G_WORLD + +"Barbados�ڤڦh��" BB 2G_WORLD FCC TCF + +"Belgium��Q��" BE 2G_WORLD 5G_ETSI1 CE + +"Bermuda�ʼ}�F" BM 2G_WORLD FCC TCF + +"Brazil�ڦ�" BR 2G_WORLD Local Test + +"Bulgaria�O�[�Q��" BG 2G_WORLD 5G_ETSI1 CE + +"Canada�[���j" CA 2G_FCC1 5G_FCC7 IC / FCC IC / FCC + +"Cayman Islands�}�Ҹs�q" KY 2G_WORLD 5G_ETSI1 CE + +"Chile���Q" CL 2G_WORLD FCC TCF + +"China����" CN 2G_WORLD 5G_FCC5 �H��?�i2002�j353? + +"Columbia���ۤ��" CO 2G_WORLD Voluntary + +"Costa Rica�����F���[" CR 2G_WORLD FCC TCF + +"Cyprus�������" CY 2G_WORLD 5G_ETSI1 CE + +"Czech ���J" CZ 2G_WORLD 5G_ETSI1 CE + +"Denmark����" DK 2G_WORLD 5G_ETSI1 CE + +"Dominican Republic�h�����[�@�M��" DO 2G_WORLD FCC TCF + +"Egypt�J��" EG 2G_WORLD CE T CF + +"El Salvador�ĺ��˦h" SV 2G_WORLD Voluntary + +"Estonia�R�F����" EE 2G_WORLD 5G_ETSI1 CE + +"Finland����" FI 2G_WORLD 5G_ETSI1 CE + +"France�k��" FR 5G_E TSI1 CE + +"Germany�w��" DE 2G_WORLD 5G_ETSI1 CE + +"Greece ��þ" GR 2G_WORLD 5G_ETSI1 CE + +"Guam���q" GU 2G_WORLD + +"Guatemala�ʦa����" GT 2G_WORLD + +"Haiti���a" HT 2G_WORLD FCC TCF + +"Honduras�����Դ�" HN 2G_WORLD FCC TCF + +"Hungary�I���Q" HU 2G_WORLD 5G_ETSI1 CE + +"Iceland�B�q" IS 2G_WORLD 5G_ETSI1 CE + +"India�L��" IN 2G_WORLD 5G_FCC3 FCC/CE TCF + +"Ireland�R����" IE 2G_WORLD 5G_ETSI1 CE + +"Israel�H��C" IL 5G_F CC6 CE TCF + +"Italy�q�j�Q" IT 2G_WORLD 5G_ETSI1 CE + +"Japan�饻" JP 2G_MKK1 5G_MKK1 MKK MKK + +"Korea����" KR 2G_WORLD 5G_KCC1 KCC KCC + +"Latvia�Բ����" LV 2G_WORLD 5G_ETSI1 CE + +"Lithuania�߳��{" LT 2G_WORLD 5G_ETSI1 CE + +"Luxembourg�c�˳�" LU 2G_WORLD 5G_ETSI1 CE + +"Malaysia���Ӧ��" MY 2G_WORLD Local Test + +"Malta�����L" MT 2G_WORLD 5G_ETSI1 CE + +"Mexico�����" MX 2G_WORLD 5G_FCC3 Local Test + +"Morocco������" MA CE TCF + +"Netherlands����" NL 2G_WORLD 5G_ETSI1 CE + +"New Zealand���" NZ 2G_WORLD 5G_ETSI2 + +"Norway����" NO 2G_WORLD 5G_ETSI1 CE + +"Panama�ڮ��� " PA 2G_FCC1 Voluntary + +"Philippines��߻�" PH 2G_WORLD FCC TCF + +"Poland�i��" PL 2G_WORLD 5G_ETSI1 CE + +"Portugal�����" PT 2G_WORLD 5G_ETSI1 CE + +"Romaniaù������" RO 2G_WORLD 5G_ETSI1 CE + +"Russia�Xù��" RU 2G_WORLD 5G_ETSI3 CE TCF + +"Saudi Arabia�F�a���ԧB" SA 2G_WORLD CE TCF + +"Singapore�s�[�Y" SG 2G_WORLD + +"Slovakia������J" SK 2G_WORLD 5G_ETSI1 CE + +"Slovenia����������" SI 2G_WORLD 5G_ETSI1 CE + +"South Africa�n�D" ZA 2G_WORLD CE TCF + +"Spain��Z��" ES 5G_ETSI1 CE + +"Sweden���" SE 2G_WORLD 5G_ETSI1 CE + +"Switzerland��h" CH 2G_WORLD 5G_ETSI1 CE + +"Taiwan�O�W" TW 2G_FCC1 5G_NCC1 NCC + +"Thailand����" TH 2G_WORLD FCC/CE TCF + +"Turkey�g�ը�" TR 2G_WORLD + +"Ukraine�Q�J��" UA 2G_WORLD Local Test + +"United Kingdom�^��" GB 2G_WORLD 5G_ETSI1 CE ETSI + +"United States����" US 2G_FCC1 5G_FCC7 FCC FCC + +"Venezuela�e�����" VE 2G_WORLD 5G_FCC4 FCC TCF + +"Vietnam�V�n" VN 2G_WORLD FCC/CE TCF + */ @@ -261,86 +261,86 @@ Countries "Country Abbreviation" Domain Code SKU's Ch# of 20MHz // Counter abbervation. typedef enum _RT_COUNTRY_DEFINE_NUM { - RT_CTRY_AL, // "Albaniaªüº¸¤Ú¥§¨È" - RT_CTRY_DZ, // "Algeriaªüº¸¤Î§Q¨È" - RT_CTRY_AG, // "Antigua & Barbuda¦w´£¥Ê®q&¤Ú¥¬¹F" - RT_CTRY_AR, // "Argentinaªü®Ú§Ê" - RT_CTRY_AM, // "Armenia¨È¬ü¥§¨È" - RT_CTRY_AW, // "Arubaªü¾|¤Ú®q" - RT_CTRY_AU, // "Australia¿D¬w" - RT_CTRY_AT, // "Austria¶ø¦a§Q" - RT_CTRY_AZ, // "Azerbaijanªü¶ë«ô¾Ê" - RT_CTRY_BS, // "Bahamas¤Ú«¢°¨" - RT_CTRY_BB, // "Barbados¤Ú¤Ú¦h´µ" - RT_CTRY_BE, // "Belgium¤ñ§Q®É" - RT_CTRY_BM, // "Bermuda¦Ê¼}¹F" - RT_CTRY_BR, // "Brazil¤Ú¦è" - RT_CTRY_BG, // "Bulgaria«O¥[§Q¨È" - RT_CTRY_CA, // "Canada¥[®³¤j" - RT_CTRY_KY, // "Cayman Islands¶}°Ò¸s®q" - RT_CTRY_CL, // "Chile´¼§Q" - RT_CTRY_CN, // "China¤¤°ê" - RT_CTRY_CO, // "Columbia­ô­Û¤ñ¨È" - RT_CTRY_CR, // "Costa Rica­ô´µ¹F¾¤¥[" - RT_CTRY_CY, // "Cyprus¶ë®ú¸ô´µ" - RT_CTRY_CZ, // "Czech ±¶§J" - RT_CTRY_DK, // "Denmark¤¦³Á" - RT_CTRY_DO, // "Dominican Republic¦h©ú¥§¥[¦@©M°ê" - RT_CTRY_CE, // "Egypt®J¤Î" EG 2G_WORLD - RT_CTRY_SV, // "El SalvadorÂĺ¸¥Ë¦h" - RT_CTRY_EE, // "Estonia·R¨F¥§¨È" - RT_CTRY_FI, // "FinlandªâÄõ" - RT_CTRY_FR, // "Franceªk°ê" - RT_CTRY_DE, // "Germany¼w°ê" - RT_CTRY_GR, // "Greece §ÆÃ¾" - RT_CTRY_GU, // "GuamÃö®q" - RT_CTRY_GT, // "Guatemala¥Ê¦a°¨©Ô" - RT_CTRY_HT, // "Haiti®ü¦a" - RT_CTRY_HN, // "Honduras§»³£©Ô´µ" - RT_CTRY_HU, // "Hungary¦I¤ú§Q" - RT_CTRY_IS, // "Iceland¦B®q" - RT_CTRY_IN, // "India¦L«×" - RT_CTRY_IE, // "Ireland·Rº¸Äõ" - RT_CTRY_IL, // "Israel¥H¦â¦C" - RT_CTRY_IT, // "Italy¸q¤j§Q" - RT_CTRY_JP, // "Japan¤é¥»" - RT_CTRY_KR, // "KoreaÁú°ê" - RT_CTRY_LV, // "Latvia©Ô²æºû¨È" - RT_CTRY_LT, // "Lithuania¥ß³³©{" - RT_CTRY_LU, // "Luxembourg¿c´Ë³ù" - RT_CTRY_MY, // "Malaysia°¨¨Ó¦è¨È" - RT_CTRY_MT, // "Malta°¨º¸¥L" - RT_CTRY_MX, // "Mexico¾¥¦è­ô" - RT_CTRY_MA, // "Morocco¼¯¬¥­ô" - RT_CTRY_NL, // "Netherlands²üÄõ" - RT_CTRY_NZ, // "New Zealand¯Ã¦èÄõ" - RT_CTRY_NO, // "Norway®¿«Â" - RT_CTRY_PA, // "Panama¤Ú®³°¨ " - RT_CTRY_PH, // "Philippinesµá«ß»«" - RT_CTRY_PL, // "PolandªiÄõ" - RT_CTRY_PT, // "Portugal¸²µå¤ú" - RT_CTRY_RO, // "Romaniaù°¨¥§¨È" - RT_CTRY_RU, // "Russia«Xù´µ" - RT_CTRY_SA, // "Saudi Arabia¨F¦aªü©Ô§B" - RT_CTRY_SG, // "Singapore·s¥[©Y" - RT_CTRY_SK, // "Slovakia´µ¬¥¥ï§J" - RT_CTRY_SI, // "Slovenia´µ¬¥ºû¥§¨È" - RT_CTRY_ZA, // "South Africa«n«D" - RT_CTRY_ES, // "Spain¦è¯Z¤ú" - RT_CTRY_SE, // "Sweden·ç¨å" - RT_CTRY_CH, // "Switzerland·ç¤h" - RT_CTRY_TW, // "Taiwan»OÆW" - RT_CTRY_TH, // "Thailand®õ°ê" - RT_CTRY_TR, // "Turkey¤g¦Õ¨ä" - RT_CTRY_UA, // "Ukraine¯Q§JÄõ" - RT_CTRY_GB, // "United Kingdom­^°ê" - RT_CTRY_US, // "United States¬ü°ê" - RT_CTRY_VE, // "Venezuela©e¤º·ç©Ô" - RT_CTRY_VN, // "Vietnam¶V«n" - RT_CTRY_MAX, // - + RT_CTRY_AL, // "Albania�����ڥ���" + RT_CTRY_DZ, // "Algeria�����ΧQ��" + RT_CTRY_AG, // "Antigua & Barbuda�w���ʮq&�ڥ��F" + RT_CTRY_AR, // "Argentina���ڧ�" + RT_CTRY_AM, // "Armenia�Ȭ�����" + RT_CTRY_AW, // "Aruba���|�ڮq" + RT_CTRY_AU, // "Australia�D�w" + RT_CTRY_AT, // "Austria���a�Q" + RT_CTRY_AZ, // "Azerbaijan�������" + RT_CTRY_BS, // "Bahamas�ګ���" + RT_CTRY_BB, // "Barbados�ڤڦh��" + RT_CTRY_BE, // "Belgium��Q��" + RT_CTRY_BM, // "Bermuda�ʼ}�F" + RT_CTRY_BR, // "Brazil�ڦ�" + RT_CTRY_BG, // "Bulgaria�O�[�Q��" + RT_CTRY_CA, // "Canada�[���j" + RT_CTRY_KY, // "Cayman Islands�}�Ҹs�q" + RT_CTRY_CL, // "Chile���Q" + RT_CTRY_CN, // "China����" + RT_CTRY_CO, // "Columbia���ۤ��" + RT_CTRY_CR, // "Costa Rica�����F���[" + RT_CTRY_CY, // "Cyprus�������" + RT_CTRY_CZ, // "Czech ���J" + RT_CTRY_DK, // "Denmark����" + RT_CTRY_DO, // "Dominican Republic�h�����[�@�M��" + RT_CTRY_CE, // "Egypt�J��" EG 2G_WORLD + RT_CTRY_SV, // "El Salvador�ĺ��˦h" + RT_CTRY_EE, // "Estonia�R�F����" + RT_CTRY_FI, // "Finland����" + RT_CTRY_FR, // "France�k��" + RT_CTRY_DE, // "Germany�w��" + RT_CTRY_GR, // "Greece ��þ" + RT_CTRY_GU, // "Guam���q" + RT_CTRY_GT, // "Guatemala�ʦa����" + RT_CTRY_HT, // "Haiti���a" + RT_CTRY_HN, // "Honduras�����Դ�" + RT_CTRY_HU, // "Hungary�I���Q" + RT_CTRY_IS, // "Iceland�B�q" + RT_CTRY_IN, // "India�L��" + RT_CTRY_IE, // "Ireland�R����" + RT_CTRY_IL, // "Israel�H��C" + RT_CTRY_IT, // "Italy�q�j�Q" + RT_CTRY_JP, // "Japan�饻" + RT_CTRY_KR, // "Korea����" + RT_CTRY_LV, // "Latvia�Բ����" + RT_CTRY_LT, // "Lithuania�߳��{" + RT_CTRY_LU, // "Luxembourg�c�˳�" + RT_CTRY_MY, // "Malaysia���Ӧ��" + RT_CTRY_MT, // "Malta�����L" + RT_CTRY_MX, // "Mexico�����" + RT_CTRY_MA, // "Morocco������" + RT_CTRY_NL, // "Netherlands����" + RT_CTRY_NZ, // "New Zealand���" + RT_CTRY_NO, // "Norway����" + RT_CTRY_PA, // "Panama�ڮ��� " + RT_CTRY_PH, // "Philippines��߻�" + RT_CTRY_PL, // "Poland�i��" + RT_CTRY_PT, // "Portugal�����" + RT_CTRY_RO, // "Romaniaù������" + RT_CTRY_RU, // "Russia�Xù��" + RT_CTRY_SA, // "Saudi Arabia�F�a���ԧB" + RT_CTRY_SG, // "Singapore�s�[�Y" + RT_CTRY_SK, // "Slovakia������J" + RT_CTRY_SI, // "Slovenia����������" + RT_CTRY_ZA, // "South Africa�n�D" + RT_CTRY_ES, // "Spain��Z��" + RT_CTRY_SE, // "Sweden���" + RT_CTRY_CH, // "Switzerland��h" + RT_CTRY_TW, // "Taiwan�O�W" + RT_CTRY_TH, // "Thailand����" + RT_CTRY_TR, // "Turkey�g�ը�" + RT_CTRY_UA, // "Ukraine�Q�J��" + RT_CTRY_GB, // "United Kingdom�^��" + RT_CTRY_US, // "United States����" + RT_CTRY_VE, // "Venezuela�e�����" + RT_CTRY_VN, // "Vietnam�V�n" + RT_CTRY_MAX, // + }RT_COUNTRY_NAME, *PRT_COUNTRY_NAME; - + // Scan type including active and passive scan. typedef enum _RT_SCAN_TYPE_NEW { @@ -349,32 +349,32 @@ typedef enum _RT_SCAN_TYPE_NEW SCAN_PAS, SCAN_BOTH, }RT_SCAN_TYPE_NEW, *PRT_SCAN_TYPE_NEW; - + // Power table sample. typedef struct _RT_CHNL_PLAN_LIMIT { u2Byte Chnl_Start; - u2Byte Chnl_end; - + u2Byte Chnl_end; + u2Byte Freq_Start; - u2Byte Freq_end; + u2Byte Freq_end; }RT_CHNL_PLAN_LIMIT, *PRT_CHNL_PLAN_LIMIT; - -// + +// // 2.4G Regulatory Domains // typedef enum _RT_REGULATION_DOMAIN_2G { - RT_2G_NULL, + RT_2G_NULL, RT_2G_WORLD, RT_2G_ETSI1, RT_2G_FCC1, RT_2G_MKK1, - RT_2G_ETSI2 - + RT_2G_ETSI2 + }RT_REGULATION_2G, *PRT_REGULATION_2G; @@ -382,12 +382,12 @@ typedef enum _RT_REGULATION_DOMAIN_2G //{ // u1Byte Chnl; // RT_SCAN_TYPE_NEW -// +// //}RT_CHANNEL_BEHAVIOR, *PRT_CHANNEL_BEHAVIOR; //typedef struct _RT_CHANNEL_PLAN_TYPE //{ -// RT_CHANNEL_BEHAVIOR +// RT_CHANNEL_BEHAVIOR // u1Byte Chnl_num; //}RT_CHNL_PLAN_TYPE, *PRT_CHNL_PLAN_TYPE; @@ -447,17 +447,17 @@ typedef enum _RT_REGULATION_DOMAIN_2G {2457, 2472}, 1 -// +// // 5G Regulatory Domains // typedef enum _RT_REGULATION_DOMAIN_5G -{ +{ RT_5G_NULL, RT_5G_WORLD, RT_5G_ETSI1, RT_5G_ETSI2, RT_5G_ETSI3, - RT_5G_FCC1, + RT_5G_FCC1, RT_5G_FCC2, RT_5G_FCC3, RT_5G_FCC4, @@ -470,7 +470,7 @@ typedef enum _RT_REGULATION_DOMAIN_5G RT_5G_MKK2, RT_5G_MKK3, RT_5G_NCC1, - + }RT_REGULATION_5G, *PRT_REGULATION_5G; // @@ -511,7 +511,7 @@ typedef enum _RT_REGULATION_DOMAIN_5G #define CHNL_RT_5G_MKK3 \ {56,60,64,100,104,108,112,116,136,140,149,153,157,161,165}, 24 #define CHNL_RT_5G_NCC1 \ - {56,60,64,149,153,157,161,165}, 8 + {56,60,64,149,153,157,161,165}, 8 // // 5G Channel Active or passive scan. @@ -551,26 +551,26 @@ typedef enum _RT_REGULATION_DOMAIN_5G #define CHNL_RT_5G_MKK3_SCAN_TYPE \ {56,60,64,100,104,108,112,116,136,140,149,153,157,161,165}, 24 #define CHNL_RT_5G_NCC1_SCAN_TYPE \ - {56,60,64,149,153,157,161,165}, 8 + {56,60,64,149,153,157,161,165}, 8 -// +// // Global Regulation // typedef enum _RT_REGULATION_COMMON { - RT_WORLD, - RT_FCC, + RT_WORLD, + RT_FCC, RT_MKK, RT_ETSI, RT_IC, RT_CE, RT_NCC, - + }RT_REGULATION_CMN, *PRT_REGULATION_CMN; -// +// // Special requirement for different regulation domain. // For internal test or customerize special request. // @@ -580,46 +580,46 @@ typedef enum _RT_CHNLPLAN_SREQ RT_SREQ_2G_ADHOC_11N = 0x00000001, RT_SREQ_2G_ADHOC_11B = 0x00000002, RT_SREQ_2G_ALL_PASS = 0x00000004, - RT_SREQ_2G_ALL_ACT = 0x00000008, + RT_SREQ_2G_ALL_ACT = 0x00000008, RT_SREQ_5G_ADHOC_11N = 0x00000010, RT_SREQ_5G_ADHOC_11AC = 0x00000020, RT_SREQ_5G_ALL_PASS = 0x00000040, RT_SREQ_5G_ALL_ACT = 0x00000080, - RT_SREQ_C1_PLAN = 0x00000100, - RT_SREQ_C2_PLAN = 0x00000200, - RT_SREQ_C3_PLAN = 0x00000400, - RT_SREQ_C4_PLAN = 0x00000800, - RT_SREQ_NFC_ON = 0x00001000, + RT_SREQ_C1_PLAN = 0x00000100, + RT_SREQ_C2_PLAN = 0x00000200, + RT_SREQ_C3_PLAN = 0x00000400, + RT_SREQ_C4_PLAN = 0x00000800, + RT_SREQ_NFC_ON = 0x00001000, RT_SREQ_MASK = 0x0000FFFF, /* Requirements bit mask */ - + }RT_CHNLPLAN_SREQ, *PRT_CHNLPLAN_SREQ; // // RT_COUNTRY_NAME & RT_REGULATION_2G & RT_REGULATION_5G transfer table -// +// // typedef struct _RT_CHANNEL_PLAN_COUNTRY_TRANSFER_TABLE -{ +{ + // + // Define countery domain and corresponding // - // Define countery domain and corresponding - // RT_COUNTRY_NAME Country_Enum; char Country_Name[3]; - + //char Domain_Name[12]; - RT_REGULATION_2G Domain_2G; + RT_REGULATION_2G Domain_2G; - RT_REGULATION_5G Domain_5G; + RT_REGULATION_5G Domain_5G; RT_CHANNEL_DOMAIN RtChDomain; //u1Byte Country_Area; - + }RT_CHNL_CTRY_TBL, *PRT_CHNL_CTRY_TBL; - + #define RT_MAX_CHNL_NUM_2G 13 -#define RT_MAX_CHNL_NUM_5G 44 +#define RT_MAX_CHNL_NUM_5G 44 // Power table sample. @@ -640,7 +640,7 @@ typedef struct _RT_CHANNEL_PLAN_MAXPWR RT_CHNL_PWR_LIMIT Chnl[RT_MAX_BAND_NUM]; u1Byte Band_Useful_Num; - + }RT_CHANNEL_PLAN_MAXPWR, *PRT_CHANNEL_PLAN_MAXPWR; @@ -651,49 +651,49 @@ typedef struct _RT_CHANNEL_PLAN_MAXPWR typedef struct _RT_CHANNEL_PLAN_NEW -{ +{ // - // Define countery domain and corresponding + // Define countery domain and corresponding // //char Country_Name[36]; //u1Byte Country_Enum; - + //char Domain_Name[12]; - + PRT_CHNL_CTRY_TBL pCtryTransfer; - - RT_CHANNEL_DOMAIN RtChDomain; + + RT_CHANNEL_DOMAIN RtChDomain; RT_REGULATION_2G Domain_2G; - RT_REGULATION_5G Domain_5G; + RT_REGULATION_5G Domain_5G; RT_REGULATION_CMN Regulator; RT_CHNLPLAN_SREQ ChnlSreq; - + //RT_CHNL_PLAN_LIMIT RtChnl; - + u1Byte Chnl2G[MAX_CHANNEL_NUM]; // CHNL_RT_2G_WORLD u1Byte Len2G; u1Byte Chnl2GScanTp[MAX_CHANNEL_NUM]; // CHNL_RT_2G_WORLD_SCAN_TYPE //u1Byte Freq2G[2]; // FREQ_RT_2G_WORLD - u1Byte Chnl5G[MAX_CHANNEL_NUM]; + u1Byte Chnl5G[MAX_CHANNEL_NUM]; u1Byte Len5G; u1Byte Chnl5GScanTp[MAX_CHANNEL_NUM]; //u1Byte Freq2G[2]; // FREQ_RT_2G_WORLD RT_CHANNEL_PLAN_MAXPWR ChnlMaxPwr; - - + + }RT_CHANNEL_PLAN_NEW, *PRT_CHANNEL_PLAN_NEW; - - + + #endif // __RT_CHANNELPLAN_H__ - - - - - + + + + + diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/hal8723breg.h b/network/wlan/WDI/HAL/phydm/rtl8723b/hal8723breg.h index e34fe98b1..f99fcc542 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/hal8723breg.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/hal8723breg.h @@ -5,15 +5,15 @@ * * * Note: 1. Define Mac register address and corresponding bit mask map - * + * * * Export: Constants, macro, functions(API), global variables(None). * - * Abbrev: + * Abbrev: * * History: - * Data Who Remark - * + * Data Who Remark + * *****************************************************************************/ #ifndef __INC_HAL8723BREG_H #define __INC_HAL8723BREG_H @@ -159,7 +159,7 @@ #define REG_RXDMA_AGG_PG_TH_8723B 0x0280 #define REG_FW_UPD_RDPTR_8723B 0x0284 // FW shall update this register before FW write RXPKT_RELEASE_POLL to 1 #define REG_RXDMA_CONTROL_8723B 0x0286 // Control the RX DMA. -#define REG_RXPKT_NUM_8723B 0x0287 // The number of packets in RXPKTBUF. +#define REG_RXPKT_NUM_8723B 0x0287 // The number of packets in RXPKTBUF. #define REG_RXDMA_STATUS_8723B 0x0288 #define REG_RXDMA_PRO_8723B 0x0290 #define REG_EARLY_MODE_CONTROL_8723B 0x02BC @@ -173,7 +173,7 @@ // //----------------------------------------------------- #define REG_PCIE_CTRL_REG_8723B 0x0300 -#define REG_INT_MIG_8723B 0x0304 // Interrupt Migration +#define REG_INT_MIG_8723B 0x0304 // Interrupt Migration #define REG_BCNQ_DESA_8723B 0x0308 // TX Beacon Descriptor Address #define REG_HQ_DESA_8723B 0x0310 // TX High Queue Descriptor Address #define REG_MGQ_DESA_8723B 0x0318 // TX Manage Queue Descriptor Address @@ -298,7 +298,7 @@ #define REG_USTIME_TSF_8723B 0x055C #define REG_BCN_MAX_ERR_8723B 0x055D #define REG_RXTSF_OFFSET_CCK_8723B 0x055E -#define REG_RXTSF_OFFSET_OFDM_8723B 0x055F +#define REG_RXTSF_OFFSET_OFDM_8723B 0x055F #define REG_TSFTR_8723B 0x0560 #define REG_CTWND_8723B 0x0572 #define REG_SECONDARY_CCA_CTRL_8723B 0x0577 @@ -381,7 +381,7 @@ #define MSR_8723B (REG_CR_8723B + 2) // Media Status register #define ISR_8723B REG_HISR0_8723B #define TSFR_8723B REG_TSFTR_8723B // Timing Sync Function Timer Register. - + #define PBP_8723B REG_PBP_8723B // Redifine MACID register, to compatible prior ICs. @@ -405,28 +405,28 @@ #define IMR_DISABLED_8723B 0 // IMR DW0(0x00B0-00B3) Bit 0-31 #define IMR_TIMER2_8723B BIT31 // Timeout interrupt 2 -#define IMR_TIMER1_8723B BIT30 // Timeout interrupt 1 +#define IMR_TIMER1_8723B BIT30 // Timeout interrupt 1 #define IMR_PSTIMEOUT_8723B BIT29 // Power Save Time Out Interrupt -#define IMR_GTINT4_8723B BIT28 // When GTIMER4 expires, this bit is set to 1 -#define IMR_GTINT3_8723B BIT27 // When GTIMER3 expires, this bit is set to 1 -#define IMR_TXBCN0ERR_8723B BIT26 // Transmit Beacon0 Error -#define IMR_TXBCN0OK_8723B BIT25 // Transmit Beacon0 OK -#define IMR_TSF_BIT32_TOGGLE_8723B BIT24 // TSF Timer BIT32 toggle indication interrupt -#define IMR_BCNDMAINT0_8723B BIT20 // Beacon DMA Interrupt 0 -#define IMR_BCNDERR0_8723B BIT16 // Beacon Queue DMA OK0 +#define IMR_GTINT4_8723B BIT28 // When GTIMER4 expires, this bit is set to 1 +#define IMR_GTINT3_8723B BIT27 // When GTIMER3 expires, this bit is set to 1 +#define IMR_TXBCN0ERR_8723B BIT26 // Transmit Beacon0 Error +#define IMR_TXBCN0OK_8723B BIT25 // Transmit Beacon0 OK +#define IMR_TSF_BIT32_TOGGLE_8723B BIT24 // TSF Timer BIT32 toggle indication interrupt +#define IMR_BCNDMAINT0_8723B BIT20 // Beacon DMA Interrupt 0 +#define IMR_BCNDERR0_8723B BIT16 // Beacon Queue DMA OK0 #define IMR_HSISR_IND_ON_INT_8723B BIT15 // HSISR Indicator (HSIMR & HSISR is true, this bit is set to 1) -#define IMR_BCNDMAINT_E_8723B BIT14 // Beacon DMA Interrupt Extension for Win7 +#define IMR_BCNDMAINT_E_8723B BIT14 // Beacon DMA Interrupt Extension for Win7 #define IMR_ATIMEND_8723B BIT12 // CTWidnow End or ATIM Window End -#define IMR_C2HCMD_8723B BIT10 // CPU to Host Command INT Status, Write 1 clear -#define IMR_CPWM2_8723B BIT9 // CPU power Mode exchange INT Status, Write 1 clear -#define IMR_CPWM_8723B BIT8 // CPU power Mode exchange INT Status, Write 1 clear -#define IMR_HIGHDOK_8723B BIT7 // High Queue DMA OK -#define IMR_MGNTDOK_8723B BIT6 // Management Queue DMA OK -#define IMR_BKDOK_8723B BIT5 // AC_BK DMA OK -#define IMR_BEDOK_8723B BIT4 // AC_BE DMA OK -#define IMR_VIDOK_8723B BIT3 // AC_VI DMA OK -#define IMR_VODOK_8723B BIT2 // AC_VO DMA OK -#define IMR_RDU_8723B BIT1 // Rx Descriptor Unavailable +#define IMR_C2HCMD_8723B BIT10 // CPU to Host Command INT Status, Write 1 clear +#define IMR_CPWM2_8723B BIT9 // CPU power Mode exchange INT Status, Write 1 clear +#define IMR_CPWM_8723B BIT8 // CPU power Mode exchange INT Status, Write 1 clear +#define IMR_HIGHDOK_8723B BIT7 // High Queue DMA OK +#define IMR_MGNTDOK_8723B BIT6 // Management Queue DMA OK +#define IMR_BKDOK_8723B BIT5 // AC_BK DMA OK +#define IMR_BEDOK_8723B BIT4 // AC_BE DMA OK +#define IMR_VIDOK_8723B BIT3 // AC_VI DMA OK +#define IMR_VODOK_8723B BIT2 // AC_VO DMA OK +#define IMR_RDU_8723B BIT1 // Rx Descriptor Unavailable #define IMR_ROK_8723B BIT0 // Receive DMA OK // IMR DW1(0x00B4-00B7) Bit 0-31 @@ -456,7 +456,7 @@ /*=================================================================== ===================================================================== -Here the register defines are for 92C. When the define is as same with 92C, +Here the register defines are for 92C. When the define is as same with 92C, we will use the 92C's define for the consistency So the following defines for 92C is not entire!!!!!! ===================================================================== @@ -490,7 +490,7 @@ Current IOREG MAP //============================================================================ -// 8192C Regsiter Bit and Content definition +// 8192C Regsiter Bit and Content definition //============================================================================ //----------------------------------------------------- // @@ -705,7 +705,7 @@ Current IOREG MAP // For normal driver, 0x10C #define _TXDMA_HIQ_MAP(x) (((x)&0x3) << 14) #define _TXDMA_MGQ_MAP(x) (((x)&0x3) << 12) -#define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10) +#define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10) #define _TXDMA_BEQ_MAP(x) (((x)&0x3) << 8 ) #define _TXDMA_VIQ_MAP(x) (((x)&0x3) << 6 ) #define _TXDMA_VOQ_MAP(x) (((x)&0x3) << 4 ) @@ -715,7 +715,7 @@ Current IOREG MAP #define QUEUE_HIGH 3 -//2 REG_C2HEVT_CLEAR 0x01AF +//2 REG_C2HEVT_CLEAR 0x01AF #define C2H_EVT_HOST_CLOSE 0x00 // Set by driver and notify FW that the driver has read the C2H command message #define C2H_EVT_FW_CLOSE 0xFF // Set by FW indicating that FW had set the C2H command message and it's not yet read by driver. @@ -757,10 +757,10 @@ Current IOREG MAP // Write only. When this bit is set, RXDMA will decrease RX PKT counter by one. Before // this bit is polled, FW shall update RXFF_RD_PTR first. This register is write pulse and auto clear. #define RXPKT_RELEASE_POLL BIT(0) -// Read only. When RXMA finishes on-going DMA operation, RXMDA will report idle state in +// Read only. When RXMA finishes on-going DMA operation, RXMDA will report idle state in // this bit. FW can start releasing packets after RXDMA entering idle mode. -#define RXDMA_IDLE BIT(1) -// When this bit is set, RXDMA will enter this mode after on-going RXDMA packet to host +#define RXDMA_IDLE BIT(1) +// When this bit is set, RXDMA will enter this mode after on-going RXDMA packet to host // completed, and stop DMA packet to host. RXDMA will then report Default: 0; #define RW_RELEASE_EN BIT(2) */ @@ -783,7 +783,7 @@ Current IOREG MAP #define HAL92C_MSDU_LIFE_TIME_UNIT 128 // in us, said by Tim. -//2 SPEC SIFS 0x0428 +//2 SPEC SIFS 0x0428 #define _SPEC_SIFS_CCK(x) ((x) & 0xFF) #define _SPEC_SIFS_OFDM(x) (((x) & 0xFF) << 8) @@ -850,7 +850,7 @@ Current IOREG MAP //---------------------------------------------------------------------------- /* #define RCR_APPFCS BIT31 // WMAC append FCS after pauload -#define RCR_APP_MIC BIT30 // MACRX will retain the MIC at the bottom of the packet. +#define RCR_APP_MIC BIT30 // MACRX will retain the MIC at the bottom of the packet. #define RCR_APP_ICV BIT29 // MACRX will retain the ICV at the bottom of the packet. #define RCR_APP_PHYST_RXFF BIT28 // HY Status is appended before RX packet in RXFF #define RCR_APP_BA_SSN BIT27 // SSN of previous TXBA is appended as after original RXDESC as the 4-th DW of RXDESC. diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_bb.h b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_bb.h index af1700898..978fde045 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_bb.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_bb.h @@ -1,21 +1,21 @@ -/****************************************************************************** -* -* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA -* -* +/****************************************************************************** +* +* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* ******************************************************************************/ /*Image2HeaderVersion: 2.14*/ diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_fw.h b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_fw.h index 0fd2d1d2f..119a47923 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_fw.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_fw.h @@ -1,21 +1,21 @@ -/****************************************************************************** -* -* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA -* -* +/****************************************************************************** +* +* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* ******************************************************************************/ /*Image2HeaderVersion: 2.16*/ diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_mac.h b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_mac.h index 3ac3f15d1..070520e2a 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_mac.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_mac.h @@ -1,21 +1,21 @@ -/****************************************************************************** -* -* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA -* -* +/****************************************************************************** +* +* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* ******************************************************************************/ /*Image2HeaderVersion: 2.14*/ diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_rf.h b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_rf.h index 7a478c187..5f4145fa7 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_rf.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/halhwimg8723b_rf.h @@ -1,21 +1,21 @@ -/****************************************************************************** -* -* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of version 2 of the GNU General Public License as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA -* -* +/****************************************************************************** +* +* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of version 2 of the GNU General Public License as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA +* +* ******************************************************************************/ /*Image2HeaderVersion: 2.14*/ diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_ce.h b/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_ce.h index feb77d869..acc8fd7d3 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_ce.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_ce.h @@ -36,7 +36,7 @@ void ConfigureTxpowerTrack_8723B( void DoIQK_8723B( PVOID pDM_VOID, u1Byte DeltaThermalIndex, - u1Byte ThermalValue, + u1Byte ThermalValue, u1Byte Threshold ); @@ -50,8 +50,8 @@ ODM_TxPwrTrackSetPwr_8723B( //1 7. IQK -void -PHY_IQCalibrate_8723B( +void +PHY_IQCalibrate_8723B( #if (DM_ODM_SUPPORT_TYPE & ODM_AP) IN PDM_ODM_T pDM_Odm, #else @@ -75,7 +75,7 @@ ODM_SetIQCbyRFpath( // // LC calibrate // -void +void PHY_LCCalibrate_8723B( IN PVOID pDM_VOID ); @@ -83,15 +83,15 @@ PHY_LCCalibrate_8723B( // // AP calibrate // -void -PHY_APCalibrate_8723B( +void +PHY_APCalibrate_8723B( #if (DM_ODM_SUPPORT_TYPE & ODM_AP) IN PDM_ODM_T pDM_Odm, #else IN PADAPTER pAdapter, #endif IN s1Byte delta); -void +void PHY_DigitalPredistortion_8723B( IN PADAPTER pAdapter); @@ -127,8 +127,8 @@ _PHY_MACSettingCalibration_8723B( IN PADAPTER pAdapter, #endif IN pu4Byte MACReg, - IN pu4Byte MACBackup + IN pu4Byte MACBackup ); - -#endif // #ifndef __HAL_PHY_RF_8188E_H__ + +#endif // #ifndef __HAL_PHY_RF_8188E_H__ diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_win.h b/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_win.h index 8924706f3..050870242 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_win.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/halphyrf_8723b_win.h @@ -36,7 +36,7 @@ void ConfigureTxpowerTrack_8723B( void DoIQK_8723B( PVOID pDM_VOID, u1Byte DeltaThermalIndex, - u1Byte ThermalValue, + u1Byte ThermalValue, u1Byte Threshold ); @@ -50,8 +50,8 @@ ODM_TxPwrTrackSetPwr_8723B( //1 7. IQK -void -PHY_IQCalibrate_8723B( +void +PHY_IQCalibrate_8723B( #if (DM_ODM_SUPPORT_TYPE & ODM_AP) IN PDM_ODM_T pDM_Odm, #else @@ -72,7 +72,7 @@ ODM_SetIQCbyRFpath( // // LC calibrate // -void +void PHY_LCCalibrate_8723B( IN PDM_ODM_T pDM_Odm ); @@ -80,15 +80,15 @@ PHY_LCCalibrate_8723B( // // AP calibrate // -void -PHY_APCalibrate_8723B( +void +PHY_APCalibrate_8723B( #if (DM_ODM_SUPPORT_TYPE & ODM_AP) IN PDM_ODM_T pDM_Odm, #else IN PADAPTER pAdapter, #endif IN s1Byte delta); -void +void PHY_DigitalPredistortion_8723B( IN PADAPTER pAdapter); @@ -124,8 +124,8 @@ _PHY_MACSettingCalibration_8723B( IN PADAPTER pAdapter, #endif IN pu4Byte MACReg, - IN pu4Byte MACBackup + IN pu4Byte MACBackup ); - -#endif // #ifndef __HAL_PHY_RF_8188E_H__ + +#endif // #ifndef __HAL_PHY_RF_8188E_H__ diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/mp_precomp.h b/network/wlan/WDI/HAL/phydm/rtl8723b/mp_precomp.h index 4e376e797..06eeb7cc1 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/mp_precomp.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/mp_precomp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_regconfig8723b.h b/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_regconfig8723b.h index 4f2d3884e..03cb997ac 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_regconfig8723b.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_regconfig8723b.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -19,7 +19,7 @@ ******************************************************************************/ #ifndef __INC_ODM_REGCONFIG_H_8723B #define __INC_ODM_REGCONFIG_H_8723B - + #if (RTL8723B_SUPPORT == 1) void @@ -31,28 +31,28 @@ odm_ConfigRFReg_8723B( IN u4Byte RegAddr ); -void +void odm_ConfigRF_RadioA_8723B( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Data ); -void +void odm_ConfigRF_RadioB_8723B( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u4Byte Data ); -void +void odm_ConfigMAC_8723B( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, IN u1Byte Data ); -void +void odm_ConfigBB_AGC_8723B( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, @@ -71,7 +71,7 @@ odm_ConfigBB_PHY_REG_PG_8723B( IN u4Byte Data ); -void +void odm_ConfigBB_PHY_8723B( IN PDM_ODM_T pDM_Odm, IN u4Byte Addr, diff --git a/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_rtl8723b.h b/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_rtl8723b.h index a7739ef17..e398fad24 100644 --- a/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_rtl8723b.h +++ b/network/wlan/WDI/HAL/phydm/rtl8723b/phydm_rtl8723b.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BDefCom.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BDefCom.h index f32ba53a8..f58e6d675 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BDefCom.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BDefCom.h @@ -2,13 +2,13 @@ #define __REALTEK_HAL8723BDEFCOM_H__ -typedef enum _RTL8723B_SRAM_DATA +typedef enum _RTL8723B_SRAM_DATA { LOC_8723B_SRFF, - LOC_8723B_TXRPT, - LOC_8723B_BCN_RPT, - LOC_8723B_AMPDU_BU_RST_CTRL, - LOC_8723B_RA_MASK + LOC_8723B_TXRPT, + LOC_8723B_BCN_RPT, + LOC_8723B_AMPDU_BU_RST_CTRL, + LOC_8723B_RA_MASK }RTL8723B_SRAM_DATA; u1Byte @@ -152,7 +152,7 @@ GetTxBufferRsvdPageNum8723B( ); VOID -HalSetFwKeepAliveCmd8723B( +HalSetFwKeepAliveCmd8723B( IN PADAPTER pAdapter, IN BOOLEAN bFuncEn ); diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BDesc.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BDesc.h index 412b06524..76c2fd871 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BDesc.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BDesc.h @@ -105,7 +105,7 @@ // Dword 2 -#define SET_TX_DESC_PAID_8723B(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 0, 9, __Value) +#define SET_TX_DESC_PAID_8723B(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 0, 9, __Value) #define SET_TX_DESC_CCA_RTS_8723B(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 10, 2, __Value) #define SET_TX_DESC_AGG_ENABLE_8723B(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 12, 1, __Value) #define SET_TX_DESC_RDG_ENABLE_8723B(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 13, 1, __Value) @@ -224,7 +224,7 @@ typedef struct _RX_DRIVER_INFO_8723B{ s1Byte rxsnr[2]; // DW 3 byte 3 DW 4 byte 0 //DWORD 4 - u1Byte PCTS_MSK_RPT[2]; + u1Byte PCTS_MSK_RPT[2]; u1Byte pdsnr[2]; // DW 4 byte 3 DW 5 Byte 0 //DWORD 5 @@ -250,13 +250,13 @@ TxDescriptorChecksum_8723B( ); -u1Byte +u1Byte BWMapping_8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_TCB pTcb ); -u1Byte +u1Byte SCMapping_8723B( IN PADAPTER Adapter, IN PRT_TCB pTcb @@ -279,7 +279,7 @@ TranslateRxSignalStuff8723B( u4Byte RxCommandPacketHandle8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PRT_RFD pRfd ); diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BEfuse.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BEfuse.h index 699ec0828..45a11ff63 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BEfuse.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BEfuse.h @@ -1,23 +1,23 @@ /****************************************************************************** - * + * * (c) Copyright 2012, RealTEK Technologies Inc. All Rights Reserved. - * + * * Module: Hal8723BEfuse.c ( Source C File) - * + * * Note: Copy from WMAC for the first version!!!! - * * - * Function: - * - * Export: - * - * Abbrev: - * + * + * Function: + * + * Export: + * + * Abbrev: + * * History: * Data Who Remark - * + * * 07/10/2012 Kordan Set an independent files. - * + * ******************************************************************************/ #ifndef __8723B_EFUSE_H__ #define __8723B_EFUSE_H__ @@ -47,7 +47,7 @@ // EFUSE Parsing //=========================================================== -VOID +VOID Hal_EfuseParseBTCoexistInfo8723B( IN PADAPTER Adapter, IN pu1Byte hwinfo, @@ -114,7 +114,7 @@ Hal_EfuseParseXtal_8723B( VOID Hal_ReadThermalMeter_8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN pu1Byte PROMContent, IN BOOLEAN AutoloadFail ); @@ -155,7 +155,7 @@ Hal_ReadTxPowerInfo8723B( VOID Hal_ReadBoardType8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN pu1Byte PROMContent, IN BOOLEAN AutoloadFail ); @@ -171,7 +171,7 @@ Hal_EfuseSwitchToBank8723B( ); -BOOLEAN +BOOLEAN Hal_GetChnlGroup8723B( IN u1Byte Channel, OUT pu1Byte pGroup @@ -179,7 +179,7 @@ Hal_GetChnlGroup8723B( VOID Hal_ReadPROMVersion8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN pu1Byte PROMContent, IN BOOLEAN AutoloadFail ); @@ -218,4 +218,4 @@ Hal_EfuseParsePackageType_8723B( #endif - + diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BFirmware.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BFirmware.h index 867c25450..3460d4064 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BFirmware.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BFirmware.h @@ -5,7 +5,7 @@ #define IS_FW_HEADER_EXIST_8723B(_pFwHdr) ((GET_FIRMWARE_HDR_SIGNATURE(_pFwHdr) &0xFFF0) == 0x5300) //-------------------------------------------- -//3 Host Message Box +//3 Host Message Box //-------------------------------------------- // Keep Alive Control @@ -138,7 +138,7 @@ #define SET_8723B_H2CCMD_AOAC_RSVDPAGE_LOC_REALWOW_V2ACKPATTERN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+5, 0, 8, __Value) #define SET_8723B_H2CCMD_AOAC_RSVDPAGE_LOC_REALWOW_V2WAKEUPPATTERN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+6, 0, 8, __Value) -// +// // RSVDPAGE_LOC_3 #define SET_8723B_H2CCMD_RSVDPAGE_LOC_3_NLO_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 0, 8, __Value) @@ -181,7 +181,7 @@ #define GET_8723B_H2CCMD_INACTIVE_PS_PARM_FUNC_ENABLE(__pH2CCmd) LE_BITS_TO_1BYTE(__pH2CCmd, 0, 1) // Disconnect_Decision_Control -// +// // 1. The value "CHECK_PERIOD" should be larger than 5 which Fw checks beacon lost period. // 2. "TRY_OK_BCN_LOST_CNT" should be smaller than "CHECK_PERIOD". #define SET_8723B_H2CCMD_DISCONNECT_DECISION_CTRL_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value) @@ -217,7 +217,7 @@ #define GET_8723B_C2H_FCS_STATUS(_Header) LE_BITS_TO_1BYTE((_Header + 0), 0, 8) -typedef enum _RTL8723B_H2C_CMD +typedef enum _RTL8723B_H2C_CMD { H2C_8723B_RSVDPAGE = 0, H2C_8723B_MSRRPT = 1, @@ -225,24 +225,24 @@ typedef enum _RTL8723B_H2C_CMD H2C_8723B_KEEP_ALIVE_CTRL = 3, H2C_8723B_DISCONNECT_DECISION = 4, - H2C_8723B_INIT_OFFLOAD = 6, + H2C_8723B_INIT_OFFLOAD = 6, H2C_8723B_AP_OFFLOAD = 8, H2C_8723B_BCN_RSVDPAGE = 9, H2C_8723B_PROBERSP_RSVDPAGE = 10, - + H2C_8723B_FCS_LOCATION = 0x10, H2C_8723B_FCS_INFO = 0x11, H2C_8723B_FCS_UPDATE_PARAM = 0x15, H2C_8723B_FCS_MACID_BITMAP = 0x16, H2C_8723B_FCS_INFO_V2 = 0x18, - - H2C_8723B_SETPWRMODE = 0x20, + + H2C_8723B_SETPWRMODE = 0x20, H2C_8723B_PS_TUNING_PARA = 0x21, H2C_8723B_PS_TUNING_PARA2 = 0x22, H2C_8723B_PS_LPS_PARA = 0x23, H2C_8723B_P2P_PS_OFFLOAD = 0x24, H2C_8723B_INACTIVE_PS = 0x27, - + H2C_8723B_RA_MASK = 0x40, H2C_8723B_RSSI_REPORT = 0x42, diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyCfg.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyCfg.h index 997443ff2..ae6010228 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyCfg.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyCfg.h @@ -4,18 +4,18 @@ * Module: __INC_HAL8188EPHYCFG_H * * - * Note: - * + * Note: + * * * Export: Constants, macro, functions(API), global variables(None). * - * Abbrev: + * Abbrev: * * History: - * Data Who Remark + * Data Who Remark * 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h. * 2. Reorganize code architecture. - * + * *****************************************************************************/ /* Check to see if the file has been included already. */ #ifndef __INC_HAL8723BPHYCFG_H @@ -42,10 +42,10 @@ /*--------------------------Define Parameters-------------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ @@ -59,27 +59,27 @@ /*--------------------------Exported Function prototype---------------------*/ //1 1. BB register R/W API -extern u4Byte +extern u4Byte PHY_QueryBBReg8723B( IN PADAPTER Adapter, IN u4Byte RegAddr, IN u4Byte BitMask ); -VOID +VOID PHY_SetBBReg8723B( IN PADAPTER Adapter, IN u4Byte RegAddr, IN u4Byte BitMask, IN u4Byte Data ); -extern u4Byte +extern u4Byte PHY_QueryRFReg8723B( IN PADAPTER Adapter, IN u1Byte eRFPath, IN u4Byte RegAddr, IN u4Byte BitMask ); -void +void PHY_SetRFReg8723B( IN PADAPTER Adapter, IN u1Byte eRFPath, IN u4Byte RegAddr, @@ -94,14 +94,14 @@ phy_BB8723B_Config_ParaFile( RT_STATUS PHY_RFConfig8723B( - IN PADAPTER Adapter + IN PADAPTER Adapter ); // // RF Power setting // -BOOLEAN -PHY_SetRFPowerState8723B( IN PADAPTER Adapter, +BOOLEAN +PHY_SetRFPowerState8723B( IN PADAPTER Adapter, IN RT_RF_POWER_STATE eRFPowerState); //1 5. Tx Power setting API @@ -109,7 +109,7 @@ VOID PHY_SetTxPowerIndex_8723B( IN PADAPTER Adapter, IN u4Byte PowerIndex, - IN u1Byte RFPath, + IN u1Byte RFPath, IN u1Byte Rate ); @@ -117,21 +117,21 @@ u1Byte PHY_GetTxPowerIndex_8723B( IN PADAPTER pAdapter, IN u1Byte RFPath, - IN u1Byte Rate, - IN CHANNEL_WIDTH BandWidth, + IN u1Byte Rate, + IN CHANNEL_WIDTH BandWidth, IN u1Byte Channel ); -VOID -PHY_GetTxPowerLevel8723B( +VOID +PHY_GetTxPowerLevel8723B( IN PADAPTER Adapter, - OUT ps4Byte powerlevel + OUT ps4Byte powerlevel ); -VOID -PHY_SetTxPowerLevel8723B( +VOID +PHY_SetTxPowerLevel8723B( IN PADAPTER Adapter, - IN u1Byte channel + IN u1Byte channel ); BOOLEAN @@ -146,7 +146,7 @@ PHY_SetBWModeWorkItemCallback8723B( ); -VOID +VOID PHY_SetBWModeTimerCallback8723B( IN PRT_TIMER pTimer ); VOID @@ -157,14 +157,14 @@ PHY_HandleSetBWMode8723B( IN PADAPTER pAdapter, //1 6. Channel setting API -void +void PHY_SwChnlTimerCallback8723B( IN PRT_TIMER pTimer ); -void +void PHY_HandleSwChnl8723B( IN PADAPTER pAdapter, IN u1Byte channel ); -void +void PHY_SwChnlSynchronously8723B( IN PADAPTER pAdapter, IN u1Byte channel ); VOID @@ -176,37 +176,37 @@ PHY_SwChnlWorkItemCallback8723B( //1 7. IQK -void -PHY_IQCalibrate_8188E( IN PADAPTER pAdapter, +void +PHY_IQCalibrate_8188E( IN PADAPTER pAdapter, IN BOOLEAN bReCovery); // // LC calibrate // -void +void PHY_LCCalibrate_8188E( IN PADAPTER pAdapter); // // AP calibrate // -void +void PHY_APCalibrate_8188E( IN PADAPTER pAdapter, IN s1Byte delta); -void +void PHY_DigitalPredistortion_8188E( IN PADAPTER pAdapter); #endif -extern VOID +extern VOID PHY_SetRFPathSwitch_8723B( IN PADAPTER pAdapter, IN BOOLEAN bMain); -extern BOOLEAN +extern BOOLEAN PHY_QueryRFPathSwitch_8723B( IN PADAPTER pAdapter); -void +void PHY_SetMonitorMode8723B(IN PADAPTER pAdapter, IN BOOLEAN bEnableMonitorMode ); @@ -217,13 +217,13 @@ RtCheckForHangWorkItemCallback8723B( ); #endif -VOID +VOID PHY_ScanOperationBackup8723B( IN PADAPTER Adapter, IN u1Byte Operation ); -BOOLEAN +BOOLEAN HalSetIO8723B( IN PADAPTER Adapter, IN IO_TYPE IOType); @@ -234,7 +234,7 @@ PHY_HandleSwChnl8723B( // Call after initialization ); -#if USE_WORKITEM +#if USE_WORKITEM void SetIOWorkItemCallback8723B( IN PVOID pContext ); #endif void SetIOTimerCallback8723B( IN PRT_TIMER pTimer); @@ -244,7 +244,7 @@ void SetIOTimerCallback8723B( IN PRT_TIMER pTimer); BOOLEAN SetAntennaConfig8723B( IN PADAPTER Adapter, - IN u1Byte DefaultAnt + IN u1Byte DefaultAnt ); RT_STATUS diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyReg.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyReg.h index bb86cab7f..0fdd74932 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyReg.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BPhyReg.h @@ -9,18 +9,18 @@ * 3. PMAC/BB register bit mask. * 4. RF reg bit mask. * 5. Other BB/RF relative definition. - * + * * * Export: Constants, macro, functions(API), global variables(None). * - * Abbrev: + * Abbrev: * * History: - * Data Who Remark + * Data Who Remark * 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h. * 2. Reorganize code architecture. * 09/25/2008 MH 1. Add RL6052 register definition - * + * *****************************************************************************/ #ifndef __INC_HAL8723BPHYREG_H #define __INC_HAL8723BPHYREG_H @@ -171,7 +171,7 @@ // // PageB(0xB00) // -#define rPdp_AntA 0xb00 +#define rPdp_AntA 0xb00 #define rPdp_AntA_4 0xb04 #define rConfig_Pmpd_AntA 0xb28 #define rConfig_AntA 0xb68 @@ -202,7 +202,7 @@ #define rOFDM0_XDRxIQImbalance 0xc2c #define rOFDM0_RxDetector1 0xc30 //PD,BW & SBD // DM tune init gain -#define rOFDM0_RxDetector2 0xc34 //SBD & Fame Sync. +#define rOFDM0_RxDetector2 0xc34 //SBD & Fame Sync. #define rOFDM0_RxDetector3 0xc38 //Frame Sync. #define rOFDM0_RxDetector4 0xc3c //PD, SBD, Frame Sync & Short-GI @@ -382,57 +382,57 @@ // // RL6052 Register definition // -#define RF_AC 0x00 // +#define RF_AC 0x00 // -#define RF_IQADJ_G1 0x01 // -#define RF_IQADJ_G2 0x02 // +#define RF_IQADJ_G1 0x01 // +#define RF_IQADJ_G2 0x02 // -#define RF_POW_TRSW 0x05 // +#define RF_POW_TRSW 0x05 // -#define RF_GAIN_RX 0x06 // -#define RF_GAIN_TX 0x07 // +#define RF_GAIN_RX 0x06 // +#define RF_GAIN_TX 0x07 // -#define RF_TXM_IDAC 0x08 // -#define RF_IPA_G 0x09 // +#define RF_TXM_IDAC 0x08 // +#define RF_IPA_G 0x09 // #define RF_TXBIAS_G 0x0A #define RF_TXPA_AG 0x0B -#define RF_IPA_A 0x0C // +#define RF_IPA_A 0x0C // #define RF_TXBIAS_A 0x0D #define RF_BS_PA_APSET_G9_G11 0x0E -#define RF_BS_IQGEN 0x0F // +#define RF_BS_IQGEN 0x0F // -#define RF_MODE1 0x10 // -#define RF_MODE2 0x11 // +#define RF_MODE1 0x10 // +#define RF_MODE2 0x11 // -#define RF_RX_AGC_HP 0x12 // -#define RF_TX_AGC 0x13 // -#define RF_BIAS 0x14 // -#define RF_IPA 0x15 // +#define RF_RX_AGC_HP 0x12 // +#define RF_TX_AGC 0x13 // +#define RF_BIAS 0x14 // +#define RF_IPA 0x15 // #define RF_TXBIAS 0x16 -#define RF_POW_ABILITY 0x17 // +#define RF_POW_ABILITY 0x17 // #define RF_CHNLBW 0x18 // RF channel and BW switch -#define RF_TOP 0x19 // +#define RF_TOP 0x19 // -#define RF_RX_G1 0x1A // -#define RF_RX_G2 0x1B // +#define RF_RX_G1 0x1A // +#define RF_RX_G2 0x1B // -#define RF_RX_BB2 0x1C // -#define RF_RX_BB1 0x1D // +#define RF_RX_BB2 0x1C // +#define RF_RX_BB1 0x1D // -#define RF_RCK1 0x1E // -#define RF_RCK2 0x1F // +#define RF_RCK1 0x1E // +#define RF_RCK2 0x1F // -#define RF_TX_G1 0x20 // -#define RF_TX_G2 0x21 // -#define RF_TX_G3 0x22 // +#define RF_TX_G1 0x20 // +#define RF_TX_G2 0x21 // +#define RF_TX_G3 0x22 // -#define RF_TX_BB1 0x23 // +#define RF_TX_BB1 0x23 // //#if HARDWARE_TYPE_IS_RTL8192D == 1 -#define RF_T_METER_92D 0x42 // +#define RF_T_METER_92D 0x42 // //#else -#define RF_T_METER_88E 0x42 // -#define RF_T_METER 0x24 // +#define RF_T_METER_88E 0x42 // +#define RF_T_METER 0x24 // //#endif @@ -452,14 +452,14 @@ #define RF_TX_BIAS_A 0x35 #define RF_TX_BIAS_D 0x36 #define RF_LOBF_9 0x38 -#define RF_RXRF_A3 0x3C // +#define RF_RXRF_A3 0x3C // #define RF_TRSW 0x3F #define RF_TXRF_A2 0x41 -#define RF_TXPA_G4 0x46 -#define RF_TXPA_A4 0x4B +#define RF_TXPA_G4 0x46 +#define RF_TXPA_A4 0x4B #define RF_0x52 0x52 -#define RF_WE_LUT 0xEF +#define RF_WE_LUT 0xEF #define RF_S0S1 0xB0 @@ -530,7 +530,7 @@ #define bXBTxAGC 0xf00 // Reg 80c rFPGA0_TxGainStage #define bXCTxAGC 0xf000 #define bXDTxAGC 0xf0000 - + #define bPAStart 0xf0000000 // Useless now #define bTRStart 0x00f00000 #define bRFStart 0x0000f000 @@ -576,7 +576,7 @@ #define bRFSI_ANTSW 0x100 #define bRFSI_ANTSWB 0x200 #define bRFSI_PAPE 0x400 -#define bRFSI_PAPE5G 0x800 +#define bRFSI_PAPE5G 0x800 #define bBandSelect 0x1 #define bHTSIG2_GI 0x80 #define bHTSIG2_Smoothing 0x01 @@ -602,7 +602,7 @@ #define bLSSIReadBackData 0xfffff // T65 RF #define bLSSIReadOKFlag 0x1000 // Useless now -#define bCCKSampleRate 0x8 //0: 44MHz, 1:88MHz +#define bCCKSampleRate 0x8 //0: 44MHz, 1:88MHz #define bRegulator0Standby 0x1 #define bRegulatorPLLStandby 0x2 #define bRegulator1Standby 0x4 @@ -647,8 +647,8 @@ #define bAD11PowerUpAtTx 0x1 #define bDA10PSAtTx 0x10 #define bAD11PowerUpAtRx 0x100 -#define bDA10PSAtRx 0x1000 -#define bCCKRxAGCFormat 0x200 +#define bDA10PSAtRx 0x1000 +#define bCCKRxAGCFormat 0x200 #define bPSDFFTSamplepPoint 0xc000 #define bPSDAverageNum 0x3000 #define bIQPathControl 0xc00 @@ -747,9 +747,9 @@ #define bCCKRxFACounterLower 0xff #define bCCKRxFACounterUpper 0xff000000 #define bCCKRxHPAGCStart 0xe000 -#define bCCKRxHPAGCFinal 0x1c00 +#define bCCKRxHPAGCFinal 0x1c00 #define bCCKRxFalseAlarmEnable 0x8000 -#define bCCKFACounterFreeze 0x4000 +#define bCCKFACounterFreeze 0x4000 #define bCCKTxPathSel 0x10000000 #define bCCKDefaultRxPath 0xc000000 #define bCCKOptionRxPath 0x3000000 @@ -901,16 +901,16 @@ #define bRxSGI_TH 0xc0000000 #define bDFSCnt0 0xff #define bDFSCnt1 0xff00 -#define bDFSFlag 0xf0000 +#define bDFSFlag 0xf0000 #define bMFWeightSum 0x300000 -#define bMinIdxTH 0x7f000000 -#define bDAFormat 0x40000 -#define bTxChEmuEnable 0x01000000 +#define bMinIdxTH 0x7f000000 +#define bDAFormat 0x40000 +#define bTxChEmuEnable 0x01000000 #define bTRSWIsolation_A 0x7f #define bTRSWIsolation_B 0x7f00 #define bTRSWIsolation_C 0x7f0000 -#define bTRSWIsolation_D 0x7f000000 -#define bExtLNAGain 0x7c00 +#define bTRSWIsolation_D 0x7f000000 +#define bExtLNAGain 0x7c00 // 6. PageE(0xE00) #define bSTBCEn 0x4 // Useless @@ -947,7 +947,7 @@ #define bLongCFOFLength 11 #define bTailCFO 0x1fff #define bTailCFOTLength 13 -#define bTailCFOFLength 12 +#define bTailCFOFLength 12 #define bmax_en_pwdB 0xffff #define bCC_power_dB 0xffff0000 #define bnoise_pwdB 0xffff @@ -955,27 +955,27 @@ #define bPowerMeasFLength 3 #define bRx_HT_BW 0x1 #define bRxSC 0x6 -#define bRx_HT 0x8 +#define bRx_HT 0x8 #define bNB_intf_det_on 0x1 #define bIntf_win_len_cfg 0x30 -#define bNB_Intf_TH_cfg 0x1c0 +#define bNB_Intf_TH_cfg 0x1c0 #define bRFGain 0x3f #define bTableSel 0x40 -#define bTRSW 0x80 +#define bTRSW 0x80 #define bRxSNR_A 0xff #define bRxSNR_B 0xff00 #define bRxSNR_C 0xff0000 #define bRxSNR_D 0xff000000 #define bSNREVMTLength 8 -#define bSNREVMFLength 1 +#define bSNREVMFLength 1 #define bCSI1st 0xff #define bCSI2nd 0xff00 #define bRxEVM1st 0xff0000 -#define bRxEVM2nd 0xff000000 +#define bRxEVM2nd 0xff000000 #define bSIGEVM 0xff #define bPWDB 0xff00 #define bSGIEN 0x10000 - + /*--------------------------Define Parameters-------------------------------*/ diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BPwrSeq.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BPwrSeq.h index f570e384c..e8ce84786 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BPwrSeq.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BPwrSeq.h @@ -2,7 +2,7 @@ #define REALTEK_POWER_SEQUENCE_8723B -/* +/* Check document WM-20150115-JackieLau-RTL8723B_Power_Architecture v10.vsd There are 6 HW Power States: 0: POFF--Power Off @@ -19,7 +19,7 @@ TRANS_SUS_TO_CARDEMU TRANS_CARDEMU_TO_PDN TRANS_ACT_TO_LPS - TRANS_LPS_TO_ACT + TRANS_LPS_TO_ACT TRANS_END */ @@ -30,7 +30,7 @@ #define RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS 15 #define RTL8723B_TRANS_PDN_TO_CARDEMU_STEPS 15 #define RTL8723B_TRANS_ACT_TO_LPS_STEPS 15 -#define RTL8723B_TRANS_LPS_TO_ACT_STEPS 15 +#define RTL8723B_TRANS_LPS_TO_ACT_STEPS 15 #define RTL8723B_TRANS_END_STEPS 1 @@ -60,7 +60,7 @@ {0x0058, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0},/*Enable HSISR GPIO[C:0] interrupt*/\ {0x005A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1, BIT1},/*Enable HSISR GPIO9 interrupt*/\ {0x0069, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT6, BIT6},/*For GPIO9 internal pull high setting*/\ - + #define RTL8723B_TRANS_ACT_TO_CARDEMU \ /* format */ \ @@ -163,7 +163,7 @@ {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0xFF}, /*. 0x100[7:0] = 0xFF enable WMAC TRX*/\ {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1|BIT0, BIT1|BIT0}, /*. 0x02[1:0] = 2b'11 enable BB macro*/\ {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0}, /*. 0x522 = 0*/ - + #define RTL8723B_TRANS_END \ /* format */ \ /* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \ diff --git a/network/wlan/WDI/HAL/rtl8723B/Hal8723BRf.h b/network/wlan/WDI/HAL/rtl8723B/Hal8723BRf.h index a06a299b1..9f20e4686 100644 --- a/network/wlan/WDI/HAL/rtl8723B/Hal8723BRf.h +++ b/network/wlan/WDI/HAL/rtl8723B/Hal8723BRf.h @@ -1,23 +1,23 @@ /****************************************************************************** - * + * * (c) Copyright 2008, RealTEK Technologies Inc. All Rights Reserved. - * + * * Module: HalRf.h ( Header File) - * - * Note: Collect every HAL RF type exter API or constant. - * - * Function: - * - * Export: - * - * Abbrev: - * + * + * Note: Collect every HAL RF type exter API or constant. + * + * Function: + * + * Export: + * + * Abbrev: + * * History: * Data Who Remark - * + * * 09/25/2008 MHC Create initial version. - * - * + * + * ******************************************************************************/ /* Check to see if the file has been included already. */ @@ -29,9 +29,9 @@ // /*--------------------------Define Parameters-------------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ -/*------------------------------Define structure----------------------------*/ +/*------------------------------Define structure----------------------------*/ /*------------------------Export global variable----------------------------*/ @@ -42,9 +42,9 @@ // // RF RL6052 Series API // -void PHY_RF6052SetBandwidth8723B( +void PHY_RF6052SetBandwidth8723B( IN PADAPTER Adapter, - IN CHANNEL_WIDTH Bandwidth); + IN CHANNEL_WIDTH Bandwidth); RT_STATUS PHY_RF6052_Config_8723B( IN PADAPTER Adapter ); diff --git a/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioDef.h b/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioDef.h index 74726b901..1453e4e30 100644 --- a/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioDef.h +++ b/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioDef.h @@ -155,7 +155,7 @@ GetInitialTxBufferBoundary8723BS( IN PADAPTER Adapter ); -RT_STATUS +RT_STATUS InitializeAdapter8723BSdio( IN PADAPTER Adapter, IN u1Byte Channel @@ -334,7 +334,7 @@ GetRxPacketShiftBytes8723BSdio( BOOLEAN HalQueryRxDMARequest8723BSdio( IN PADAPTER Adapter, - OUT pu2Byte pRxReqLength + OUT pu2Byte pRxReqLength ); BOOLEAN @@ -373,13 +373,13 @@ HalRxAggr8723BSdio( BOOLEAN HalQueryTxBufferStatus8723BSdio( - IN PADAPTER Adapter + IN PADAPTER Adapter ); BOOLEAN HalQueryTxBufferAvailable8723BSdio( IN PADAPTER Adapter, - IN PSDIO_OUT_CONTEXT pContext + IN PSDIO_OUT_CONTEXT pContext ); BOOLEAN diff --git a/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioLed.h b/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioLed.h index 210efaaed..85d9f2dd9 100644 --- a/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioLed.h +++ b/network/wlan/WDI/HAL/rtl8723B/rtl8723bs/Hal8723BSdioLed.h @@ -5,15 +5,15 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: Hal8192CUsbLed.h - + Abstract: LED related data structure and interface to manipulate LED. - + Major Change History: When Who What ---------- --------------- ------------------------------- 2006-12-27 Rcnjko Create. - + --*/ //================================================================================ @@ -22,13 +22,13 @@ Major Change History: VOID SwLedOn_8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PLED_SDIO pLed ); VOID SwLedOff_8723B( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN PLED_SDIO pLed ); diff --git a/network/wlan/WDI/HAL/sources.list.WlanS b/network/wlan/WDI/HAL/sources.list.WlanS index 7a656f970..31812d689 100644 --- a/network/wlan/WDI/HAL/sources.list.WlanS +++ b/network/wlan/WDI/HAL/sources.list.WlanS @@ -3,7 +3,7 @@ // //: Comment at the beginning // OS: * Ebd6 Ebd7 WinXP Vista Win7 Win8 WinBlue // +: Add for OS -// -: Remove for OS +// -: Remove for OS // +(*) [..\HalEEPROM.c] @@ -156,12 +156,12 @@ +(*) [HalHWImg8723B_RF.c] +(*) [HalHWImg8723B_BB.c] +(*) [HalHWImg8723B_FW.c] -+(*) [phydm_RegConfig8723B.c] ++(*) [phydm_RegConfig8723B.c] //+(*) [HalHWImg8703B_FW.c] //+(*) [HalHWImg8703B_BB.c] //+(*) [HalHWImg8703B_MAC.c] //+(*) [HalHWImg8703B_RF.c] -//+(*) [phydm_RegConfig8703B.c] +//+(*) [phydm_RegConfig8703B.c] // //+(*) [HalHWImg8188F_FW.c] //+(*) [HalHWImg8188F_MAC.c] diff --git a/network/wlan/WDI/HAL/sources.tpl.WlanS.props b/network/wlan/WDI/HAL/sources.tpl.WlanS.props index 12645c53b..ccef58dcb 100644 --- a/network/wlan/WDI/HAL/sources.tpl.WlanS.props +++ b/network/wlan/WDI/HAL/sources.tpl.WlanS.props @@ -8,17 +8,17 @@ precomp.pch precomp.obj - .; - ..; - $(SRC_ROOT)\Header; - $(SRC_ROOT)\Common; + .; + ..; + $(SRC_ROOT)\Header; + $(SRC_ROOT)\Common; $(HAL_INC_DIRS); - + \ No newline at end of file diff --git a/network/wlan/WDI/HEADER/BssCoexistence.h b/network/wlan/WDI/HEADER/BssCoexistence.h index 9ebc017d1..58d76d145 100644 --- a/network/wlan/WDI/HEADER/BssCoexistence.h +++ b/network/wlan/WDI/HEADER/BssCoexistence.h @@ -10,7 +10,7 @@ #define SET_BSS_COEXISTENCE_ELE_FORTY_INTOLERANT(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart), 1, 1, _val) #define SET_BSS_COEXISTENCE_ELE_20_WIDTH_REQ(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart), 2, 1, _val) #define SET_BSS_COEXISTENCE_ELE_OBSS_EXEMPTION_GRT(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart), 4, 1, _val) -#define GET_BSS_COEXISTENCE_ELE_FORTY_INTOLERANT(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart), 1, 1) +#define GET_BSS_COEXISTENCE_ELE_FORTY_INTOLERANT(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart), 1, 1) #define GET_BSS_COEXISTENCE_ELE_20_WIDTH_REQ(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart), 2, 1) #define GET_BSS_COEXISTENCE_ELE_OBSS_EXEMPTION_GRT(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart), 4, 1) diff --git a/network/wlan/WDI/HEADER/CcxType.h b/network/wlan/WDI/HEADER/CcxType.h index eddc6f447..8dbd2b819 100644 --- a/network/wlan/WDI/HEADER/CcxType.h +++ b/network/wlan/WDI/HEADER/CcxType.h @@ -3,7 +3,7 @@ // CcxType.h // // Description: -// CCX related information. +// CCX related information. // //----------------------------------------------------------------------------- @@ -15,7 +15,7 @@ #endif //------------------------------------------------------------------------------ -// CCX IAPP frame. +// CCX IAPP frame. //------------------------------------------------------------------------------ #define CISCO_AIRONET_SNAP_LENGTH 8 @@ -27,11 +27,11 @@ // Dest MAC Addr 6 + Src MAC Addr 6 + dummy Adjacent Report Element 1 #define CISCO_ADJ_RPT_IAPP_LENGTH 25 -#define RT_CCX_PACKET_TYPE u4Byte +#define RT_CCX_PACKET_TYPE u4Byte #define CPT_NONE 0 // Not a CCX IAPP Packet #define CPT_UNKNOWN_IAPP 1 #define CPT_INVALID_IAPP 2 -#define CPT_ADJACENT_AP_REPORT 3 // S30, Adjacent AP Report frame. +#define CPT_ADJACENT_AP_REPORT 3 // S30, Adjacent AP Report frame. #define CPT_RM_REQUEST 4 // S36, Radio Measurement Request frame. #define CPT_NEIGHBOR_LIST_RESPONSE 5 // S51.2.2 Neighbor List Response frame. #define CPT_DIRECT_ROAM 6 // S51.2.3 Direct Roam frame. @@ -79,7 +79,7 @@ #define CCX_RM_REPORT_IAPP_SUBTYPE 0x81 // -// Definition of IappType and IappSubtype for +// Definition of IappType and IappSubtype for // Neighbor List Response and Direct Roam frames. // Ref: CCXv4 S51.2.3, S51.2.4. // @@ -133,11 +133,11 @@ typedef struct _CCX_IAPP_HEADER{ u1Byte SnapHeader[CISCO_AIRONET_SNAP_LENGTH]; // Cisco Aironet SNAP header: AAAA 0300 4096 0000 - u2Byte IappIdLen; + u2Byte IappIdLen; u1Byte IappType; u1Byte IappSubtype; - u1Byte DstAddr[6]; - u1Byte SrcAddr[6]; + u1Byte DstAddr[6]; + u1Byte SrcAddr[6]; }CCX_IAPP_HEADER, *PCCX_IAPP_HEADER; #define CCX_IAPP_HEADER_SIZE 24 @@ -168,11 +168,11 @@ static u1Byte CCKM_OUI[SIZE_OUI] = {0x00,0x40,0x96}; // typedef struct _CCX_ADJACENT_REPORT{ u1Byte SnapHeader[CISCO_AIRONET_SNAP_LENGTH]; // Cisco Aironet SNAP header: AAAA 0300 4096 0000 - u2Byte IappIdLen; + u2Byte IappIdLen; u1Byte IappType; // 0x30. u1Byte IappFunction; // 0x00. u1Byte DstAddr[6]; // MAC address of the AP. - u1Byte SrcAddr[6]; // Reporting STA's MAC address. + u1Byte SrcAddr[6]; // Reporting STA's MAC address. u1Byte Elements[1]; }CCX_ADJACENT_REPORT, *PCCX_ADJACENT_REPORT; @@ -209,7 +209,7 @@ typedef struct _CCX_ASSOC_REASON_ELEMENT{ u2Byte Tag; // 0x009C u2Byte Length; u1Byte Aironet_OUI[4]; // 0x00 0x40 0x96 0x00 - u1Byte AssocReason; + u1Byte AssocReason; }CCX_ASSOC_REASON_ELEMENT, *PCCX_ASSOC_REASON_ELEMENT; // @@ -244,9 +244,9 @@ typedef enum _CCX_ASOC_REASON{ // // Roaming related configuration. // -#define RT_DEF_MIN_RX_POWER -82 // in dBm. -#define RT_DEF_ADAPTIVE_SCAN_THRESHOLD -72 // in dBm. -#define RT_MIN_ROAM_HYSTERSIS 10 // in dBm. +#define RT_DEF_MIN_RX_POWER -82 // in dBm. +#define RT_DEF_ADAPTIVE_SCAN_THRESHOLD -72 // in dBm. +#define RT_MIN_ROAM_HYSTERSIS 10 // in dBm. #define RT_DEFAULT_ROAM_HYSTERSIS 6 #define RT_MIN_ADAPTIVE_SCAN_CHECK_INTERVAL 1 // In number of times MgntLinkStatusWatchdog invoked. #define RT_MAX_ADAPTIVE_SCAN_CHECK_INTERVAL 16 // In number of times MgntLinkStatusWatchdog invoked. @@ -282,7 +282,7 @@ typedef struct _RT_CCX_NEIGHBOR{ }RT_CCX_NEIGHBOR, *PRT_CCX_NEIGHBOR; -#define MAX_NUM_CCX_NEIGHBOR_LIST 32 +#define MAX_NUM_CCX_NEIGHBOR_LIST 32 #define CCX_NEIGHBOR_KEY_SIZE 6 // @@ -294,16 +294,16 @@ typedef enum _RT_CCX_ROAMING_STATE{ CRS_TRY_TO_ROAM, }RT_CCX_ROAMING_STATE; -#define CCX_LINK_TEST_SET_FRAME_NUM(_pEleOffset, _Value) (*((UNALIGNED pu2Byte)(_pEleOffset)) = H2N2BYTE(_Value)) -#define CCX_LINK_TEST_SET_NUM_RETRY(_pEleOffset, _Value) (*((_pEleOffset)+8) = (_Value)) -#define CCX_LINK_TEST_SET_RSSI(_pEleOffset, _Value) (*((_pEleOffset)+9) = (_Value)) +#define CCX_LINK_TEST_SET_FRAME_NUM(_pEleOffset, _Value) (*((UNALIGNED pu2Byte)(_pEleOffset)) = H2N2BYTE(_Value)) +#define CCX_LINK_TEST_SET_NUM_RETRY(_pEleOffset, _Value) (*((_pEleOffset)+8) = (_Value)) +#define CCX_LINK_TEST_SET_RSSI(_pEleOffset, _Value) (*((_pEleOffset)+9) = (_Value)) // -// 1. must <= 1600, see definition of MAX_TRANSMIT_BUFFER_SIZE. -// 2. 1534 = 1514(Eth) - 12 + 30(WLAN) + 2(QoS). +// 1. must <= 1600, see definition of MAX_TRANSMIT_BUFFER_SIZE. +// 2. 1534 = 1514(Eth) - 12 + 30(WLAN) + 2(QoS). // 3. 1536 is multiple of 4. // -#define MAX_CCX_LINK_TEST_PACKET_SIZE 1536 +#define MAX_CCX_LINK_TEST_PACKET_SIZE 1536 //------------------------------------------------------------------------------ // CCX Qos part. @@ -351,7 +351,7 @@ typedef struct _RT_CCX_CAC_PHY_RATE { #define IE_CISCO_FLAG_POSITION 0x08 // Flag byte: byte 8, numbered from 0. #define SUPPORT_CKIP_MIC 0x08 // bit3 #define SUPPORT_CKIP_PK 0x10 // bit4 -#define RT_KEEP_ALIVE_INTERVAL 20 // in seconds. +#define RT_KEEP_ALIVE_INTERVAL 20 // in seconds. #define RT_NEIGHBOR_CHECK_INTERVAL 60 // in seconds. typedef struct _CCX_TSM_COUNTER{ @@ -382,9 +382,9 @@ typedef struct _RT_LT_REP_RETRY u1Byte RetryCnt; u2Byte SeqNo; u2Byte FrameNumber; - u2Byte PacketID; // The ID of the HW Tx Desc usage. Only used under RTL819x serious. + u2Byte PacketID; // The ID of the HW Tx Desc usage. Only used under RTL819x serious. }RT_LT_REP_RETRY, *PRT_LT_REP_RETRY; -// +// // Change the size to 1 because the link test is a ping pong test and we don't need to // queue more than 1 packet. By Bruce, 2010-07-13. // @@ -417,14 +417,14 @@ typedef struct _RT_CCX_INFO{ // BOOLEAN bCCXenable; u1Byte BssCcxVerNumber; // 0: not a CCX AP, >0: CCX version of current BSS associated. - u1Byte CurrCcxVerNumber; // 0: not acting as CCX device. >0: the CCX version we are using. + u1Byte CurrCcxVerNumber; // 0: not acting as CCX device. >0: the CCX version we are using. BOOLEAN bWithAironetIE; // // 2. Security. // LEAP, PEAP, FAST, CCKM, CKIP. // - BOOLEAN bCCX8021xenable; //for fast roam enable or disable + BOOLEAN bCCX8021xenable; //for fast roam enable or disable BOOLEAN bCCXwaitCCXInfoInProgess; // For wait CCX_Info to be set or timeout call back contiune by Mars RT_TIMER SetCCXInfoTimer; BOOLEAN bCCX8021xResultenable; //for fast roam can send CCKM IE, set by meeting house only. @@ -433,7 +433,7 @@ typedef struct _RT_CCX_INFO{ BOOLEAN bAPSuportCCKM; OCTET_STRING CCKMIE; u1Byte CCKMIEBuf[64]; - + // // 3. Layer 2 roaming. // @@ -451,9 +451,9 @@ typedef struct _RT_CCX_INFO{ u1Byte NeighborCheckCount; // - // 4. Radio and link related. + // 4. Radio and link related. // - + // // For TSM. // @@ -463,11 +463,11 @@ typedef struct _RT_CCX_INFO{ BOOLEAN bEnableTSM; // Indicate enabling TSM or not. 0: disable, 1: enable. CCX_TSM_COUNTER TsmCounters[MAX_STA_TS_COUNT]; // Tsm Info according to the specified TSID. // For CCXv5 Catastrophic Roaming Scenario, 4.1.9.4/4.1.9.5 - u1Byte CatasRoamCnt; + u1Byte CatasRoamCnt; u1Byte CatasRoamLimit; // - // For keep-alive mechanism. + // For keep-alive mechanism. // u1Byte IdleCount; u8Byte LastNumTxUnicast; @@ -479,7 +479,7 @@ typedef struct _RT_CCX_INFO{ u8Byte LastRxRetryCnt; u8Byte LastRxUniCnt; u1Byte LastRetryRatio; - + // // Link Test, which are protected by RT_RM_SPINLOCK. // @@ -491,7 +491,7 @@ typedef struct _RT_CCX_INFO{ u4Byte LtRequestWaitQueueStartIdx; u4Byte LtRequestWaitQueueSize; BOOLEAN bSendingLtReply; - u1Byte LtReqQueueCheckCount; + u1Byte LtReqQueueCheckCount; u1Byte LtreplyRetryID; // The ID to determine the link test packet for Tx descriptor usage. // @@ -501,7 +501,7 @@ typedef struct _RT_CCX_INFO{ BOOLEAN SessionStartFrameRejected; BOOLEAN bFakeDecreasingSignal; s4Byte FakeRxSignalPower; - + // //7. SSIDL // @@ -528,7 +528,7 @@ typedef struct _RT_CCX_INFO{ u1Byte IhvTxIndicBuffer[sMaxMpduLng]; // CCX V5 S67 - BOOLEAN bCcxMFPEnable; // Enable MFP mode + BOOLEAN bCcxMFPEnable; // Enable MFP mode u1Byte MFPtk[MAX_KEY_LEN]; u1Byte MFPAESKeyBuf[AESCCMP_BLK_SIZE_TOTAL]; @@ -542,7 +542,7 @@ typedef struct _RT_CCX_INFO{ BOOLEAN bSendEAPStar; u1Byte SendEAPStarCount; - + // CCX v2 Send CCX report by Driver !! BOOLEAN bSendCCXReport; @@ -551,7 +551,7 @@ typedef struct _RT_CCX_INFO{ // Flag for marking the OID is coming from IHV BOOLEAN bQueryFromIHV; - + }RT_CCX_INFO, *PRT_CCX_INFO; @@ -564,8 +564,8 @@ typedef struct _RT_CCX_INFO{ #define CCX_IS_MFP_ENABLED(___pAdapter) (SUPPORT_CCX(___pAdapter) ? ((GET_CCX_INFO(&((___pAdapter)->MgntInfo)))->bCcxMFPEnable) : FALSE) -#define GET_CURR_CCX_VER(__pAdapter) ( ((PRT_CCX_INFO)((__pAdapter)->MgntInfo.pCcxInfo))->CurrCcxVerNumber ) -#define GET_HW_CCX_VER(__pAdapter) ((__pAdapter)->HalFunc.CcxVerSupported) +#define GET_CURR_CCX_VER(__pAdapter) ( ((PRT_CCX_INFO)((__pAdapter)->MgntInfo.pCcxInfo))->CurrCcxVerNumber ) +#define GET_HW_CCX_VER(__pAdapter) ((__pAdapter)->HalFunc.CcxVerSupported) // @@ -583,14 +583,14 @@ typedef struct _RT_CCX_INFO{ typedef struct _CCX_SSIDL_SSID_FIELD{ - u1Byte ExtenCapab; // bit1: 1x bit2: WPS bit2~5 :MS reserve bit6.7: Cisco reserve + u1Byte ExtenCapab; // bit1: 1x bit2: WPS bit2~5 :MS reserve bit6.7: Cisco reserve u1Byte Capability[4]; u1Byte SSIDLen; // 0x00 0x40 0x96 0x00 - u1Byte SSID[1]; + u1Byte SSID[1]; }CCX_SSIDL_SSID_ELEMENT, *PCCX_SSIDL_SSID_ELEMENT; -// SSIDL Mutilcase-Chiper +// SSIDL Mutilcase-Chiper #define CCX_IS_MCHIPER_NONE( _Capability ) ( _Capability[3] & 0x00 ?TRUE:FALSE) #define CCX_IS_MCHIPER_WEP40( _Capability ) ( _Capability[3] & 0x01 ?TRUE:FALSE) #define CCX_IS_MCHIPER_WEP104( _Capability ) ( _Capability[3] & 0x02 ?TRUE:FALSE) @@ -600,7 +600,7 @@ typedef struct _CCX_SSIDL_SSID_FIELD{ #define CCX_IS_MCHIPER_CKIP( _Capability ) ( _Capability[3] & 0x06 ?TRUE:FALSE) #define CCX_IS_MCHIPER_CMIC( _Capability ) ( _Capability[3] & 0x07 ?TRUE:FALSE) -// SSIDL Untilcase-Chiper +// SSIDL Untilcase-Chiper #define CCX_IS_UCHIPER_NONE( _Capability ) ( _Capability[3] & 0x10 ?TRUE:FALSE) #define CCX_IS_UCHIPER_WEP40( _Capability ) ( _Capability[3] & 0x20 ?TRUE:FALSE) #define CCX_IS_UCHIPER_WEP104( _Capability ) ( _Capability[3] & 0x40 ?TRUE:FALSE) diff --git a/network/wlan/WDI/HEADER/ChannelType.h b/network/wlan/WDI/HEADER/ChannelType.h index 284442341..ef0e54a7e 100644 --- a/network/wlan/WDI/HEADER/ChannelType.h +++ b/network/wlan/WDI/HEADER/ChannelType.h @@ -60,7 +60,7 @@ typedef struct _RT_CHANNEL_INFO { CHANNEL_WIDTH RegBWSetting; BOOLEAN bSwBwInProgress; - CHNLOP ChnlOp; + CHNLOP ChnlOp; u1Byte PrimaryChannelNumber; CHANNEL_WIDTH CurrentChannelBandWidth; diff --git a/network/wlan/WDI/HEADER/CustomOid.h b/network/wlan/WDI/HEADER/CustomOid.h index 5fd4a6445..341911fca 100644 --- a/network/wlan/WDI/HEADER/CustomOid.h +++ b/network/wlan/WDI/HEADER/CustomOid.h @@ -60,7 +60,7 @@ #define OID_RT_PRO_READ_EEPROM 0xFF818022 #define OID_RT_PRO_RESET_TX_PACKET_SENT 0xFF818023 #define OID_RT_PRO_QUERY_TX_PACKET_SENT 0xFF818024 -#define OID_RT_PRO_RESET_RX_PACKET_RECEIVED 0xFF818025 +#define OID_RT_PRO_RESET_RX_PACKET_RECEIVED 0xFF818025 #define OID_RT_PRO_QUERY_RX_PACKET_RECEIVED 0xFF818026 #define OID_RT_PRO_QUERY_RX_PACKET_CRC32_ERROR 0xFF818027 #define OID_RT_PRO_QUERY_CURRENT_ADDRESS 0xFF818028 @@ -74,7 +74,7 @@ #define OID_RT_PRO_SET_MODULATION 0xFF81802F // -// 200705/24 mh add for bandwitdh test of mp temporarily +// 200705/24 mh add for bandwitdh test of mp temporarily #define OID_RT_PRO_SET_BANDWIDTH 0xFF818030 #define OID_RT_PRO_QUERY_BANDWIDTH 0xFF818031 #define OID_RT_PRO_SET_TX_AGC_OFFSET 0xFF818032 @@ -100,7 +100,7 @@ #define OID_RT_PRO_DBGCMD_CHECK 0xFF818041 #define OID_RT_PRO_DBGCMD_RETURN 0xFF818042 #define OID_RT_PRO_SET_SINGLE_TONE_TX 0xFF818043 -// Add EFUSE R/W after 92S +// Add EFUSE R/W after 92S #define OID_RT_PRO_WRITE_EFUSE 0xFF818044 #define OID_RT_PRO_READ_EFUSE 0xFF818045 #define OID_RT_PRO_UPDATE_EFUSE 0xFF818046 @@ -122,7 +122,7 @@ #define OID_RT_PRO_DBG_CONTROL 0xFF81807F -//Sean +//Sean #define OID_RT_DRIVER_OPTION 0xFF818080 #define OID_RT_RF_OFF 0xFF818081 #define OID_RT_AUTH_STATUS 0xFF818082 @@ -183,7 +183,7 @@ #define OID_RT_SET_CHANNEL 0xFF010182 #define OID_RT_SET_SNIFFER_MODE 0xFF010183 #define OID_RT_GET_SIGNAL_QUALITY 0xFF010184 -#define OID_RT_GET_SMALL_PACKET_CRC 0xFF010185 +#define OID_RT_GET_SMALL_PACKET_CRC 0xFF010185 #define OID_RT_GET_MIDDLE_PACKET_CRC 0xFF010186 #define OID_RT_GET_LARGE_PACKET_CRC 0xFF010187 #define OID_RT_GET_TX_RETRY 0xFF010188 @@ -231,7 +231,7 @@ #define OID_RT_IO_READ_WRITE_INFO 0xFF0101BF #define OID_RT_IO_READ_WRITE 0xFF0101C0 // For Netgear request. -#define OID_RT_FORCED_DATA_RATE 0xFF0101C1 +#define OID_RT_FORCED_DATA_RATE 0xFF0101C1 // Auto-Config OID. #define OID_RT_WIRELESS_MODE_FOR_SCAN_LIST 0xFF0101C2 #define OID_RT_GET_BSS_WIRELESS_MODE 0xFF0101C3 @@ -422,7 +422,7 @@ #define OID_RT_AP_SET_PASSPHRASE 0xFF010305 // Set WPA-PSK passphrase into authenticator. 2005.07.08, byrcnjko. #define OID_RT_AP_WDS_MODE 0xFF010306 // 0: WDS disabled, 1: WDS enabled. 2006.06.12, by rcnjko. -#define OID_RT_AP_WDS_AP_LIST 0xFF010307 // WDS AP address list. +#define OID_RT_AP_WDS_AP_LIST 0xFF010307 // WDS AP address list. #define OID_RT_AP_GET_VWIFI_STATUS 0xFF010308 #define OID_RT_AP_GET_ASSOC_STA_COUNT 0xFF010310 #define OID_RT_AP_GET_CLOUD_KEY_EX 0xFF010313 // Get EFUSE 0x122-12F content,. @@ -450,7 +450,7 @@ #define OID_RT_SDIO_REG_CTRL 0xFF010412 -//For MacOSX 10.4.0 "Network Utility" LinkSpeed workaround +//For MacOSX 10.4.0 "Network Utility" LinkSpeed workaround #define OID_RT_SET_TIGER_WORKAROUND 0xFF010413 //For MacOSX UI #define OID_RT_COUNTRY_NOT_SUPPORT_AC 0xFF010414 @@ -462,25 +462,25 @@ #define OID_RT_SHAREDKEY_AUTHENTICATION 0xFF01041A #define OID_RT_SCAN_SSID_AND_LINK 0xFF01041B //-------------------------------------------------------------------- -// 0xFF0105xx: For Exta AP mode +// 0xFF0105xx: For Exta AP mode //-------------------------------------------------------------------- -// Star or Stop Exta AP mode -#define OID_RT_EXTAP_SWITCH_INTO_AP_MODE 0xFF010501 +// Star or Stop Exta AP mode +#define OID_RT_EXTAP_SWITCH_INTO_AP_MODE 0xFF010501 #define OID_RT_EXTAP_GET_APMODE 0xFF010502 -// Set or Get Auth mode : OPEN WPA WPA2 +// Set or Get Auth mode : OPEN WPA WPA2 #define OID_RT_EXTAP_SET_AUTHENTICATION_MODE 0xFF010503 #define OID_RT_EXTAP_GET_AUTHENTICATION_MODE 0xFF010504 // Set or Get Encrypt Mode #define OID_RT_EXTAP_SET_ENCRYPTION_ALGORITHM 0xFF010505 #define OID_RT_EXTAP_GET_ENCRYPTION_ALGORITHM 0xFF010506 -// Set WPA or WPA2 PSK +// Set WPA or WPA2 PSK #define OID_RT_EXTAP_SET_PASSPHRASE 0xFF010507 // Set Key : Just for WEP key and Transmit Key index #define OID_RT_EXTAP_SET_ADD_WEP_KEY 0xFF010508 #define OID_RT_EXTAP_SET_DEFAULT_KEY_ID 0xFF010509 // Set Exta AP SSID #define OID_RT_EXTAP_SET_SSID 0xFF01050a -// Query Exta AP Station List +// Query Exta AP Station List #define OID_RT_EXTAP_GET_ASSOCIATED_STATION_LIST 0xFF01050b @@ -504,7 +504,7 @@ // Query // Remark: // This REQ_ID supports query only. -// +// #define OID_RT_OBJ_HDR_VERSION 0xFF0106A2 // @@ -533,7 +533,7 @@ #define OID_RT_FORCED_BUG_CHECK 0xff010804 -// For LC +// For LC #define OID_RT_LC_STOP_SCAN 0xFF010901 #define OID_RT_SYSTEM_POWER_STATE_SHUTDOWN 0xFF010902 // LC S5 WoWLAN @@ -541,7 +541,7 @@ #define OID_RT_GET_CUSTOMIZE_BSS_LIST 0xFF010910 //3-------------------------------------------------------------------- -//3 0xFF8185xx: +//3 0xFF8185xx: //3-------------------------------------------------------------------- // by Owen for RTL8185 Phy Status Report Utility #define OID_RT_UTILITY_FALSE_ALARM_COUNTERS 0xFF818580 @@ -562,7 +562,7 @@ -// Start for Real WoW v2 +// Start for Real WoW v2 #define OID_RT_CUSTOMER_ID_INFO 0xFF8168FA #define OID_RT_CUSTOMER_WOW_WAKEUPCODE 0xFF8168FB #define OID_RT_CUSTOMER_WOW_S5_SUPPORT 0xFF8168FC @@ -709,7 +709,7 @@ #define MH_OID_CCX_FAST_ROAM 0xFFEDC105 #define MH_OID_CCX_FAST_ROAM_RESULT 0xFFEDC106 #define MH_OID_CCX_ADD_KRK 0xFFEDC107 -#define MH_OID_CCX_REMOVE_KRK 0xFFEDC108 +#define MH_OID_CCX_REMOVE_KRK 0xFFEDC108 #define MH_OID_CCX_VERSION 0xFFEDC109 #define MH_OID_CCX_ENABLE 0xFFEDC10A #define MH_OID_CCX_RM_ENABLE 0xFFEDC10C @@ -758,34 +758,34 @@ typedef struct _RT_DEVICE_ID_HEADER{ // // Identify which IC. // Examples of (ChipID, ChipVer): - // (0x8185, 0x1) => 8185 - // (0x8187, 0x1) => 8187 - // (0x8185, 0x2) => 8185B - // (0x8187, 0x2) => 8187B + // (0x8185, 0x1) => 8185 + // (0x8187, 0x1) => 8187 + // (0x8185, 0x2) => 8185B + // (0x8187, 0x2) => 8187B // ULONG ChipID; ULONG ChipVer; // - // BusType is used to identify BUS type of the device and corresponding data type, + // BusType is used to identify BUS type of the device and corresponding data type, // for example: // RT_PCI_DEVICE => struc _RT_PCI_ID_INFO // RT_USB_DEVICE => struc _RT_USB_ID_INFO // - ULONG BusType; + ULONG BusType; }RT_DEVICE_ID_HEADER, *PRT_DEVICE_ID_HEADER; typedef struct _RT_PCI_ID_INFO{ RT_DEVICE_ID_HEADER DevIDHeader; - // - // Vendor ID and Device ID from PCI configuration space. + // + // Vendor ID and Device ID from PCI configuration space. // USHORT VID; USHORT DID; - // - // Sub Vendor ID and Subsystem ID from PCI configuration space. + // + // Sub Vendor ID and Subsystem ID from PCI configuration space. // USHORT SVID; USHORT SMID; @@ -804,7 +804,7 @@ typedef struct _RT_PCI_ID_INFO{ typedef struct _RT_USB_ID_INFO{ RT_DEVICE_ID_HEADER DevIDHeader; - // + // // Vendor ID and Product ID from USB Device Descriptor. // USHORT VID; @@ -824,12 +824,12 @@ typedef struct _RT_USB_ID_INFO{ typedef struct _RT_SDIO_ID_INFO{ RT_DEVICE_ID_HEADER DevIDHeader; - // + // // Vendor ID and Product ID from SDIO Device. // USHORT VID; USHORT PID; - + USHORT RevID; // diff --git a/network/wlan/WDI/HEADER/DriverInterfaceDef.h b/network/wlan/WDI/HEADER/DriverInterfaceDef.h index c60c01203..9034b9904 100644 --- a/network/wlan/WDI/HEADER/DriverInterfaceDef.h +++ b/network/wlan/WDI/HEADER/DriverInterfaceDef.h @@ -29,12 +29,12 @@ // // 1. Each Platform shall provide a 2 sec timer to invoke NicIFLinkStatusWatchdog. -// 2. Currently, both MgntLinkStatusWatchdog and HalDmWatchDog are designed to -// be callbacked in 2 sec period. We might want to seperate it in future to +// 2. Currently, both MgntLinkStatusWatchdog and HalDmWatchDog are designed to +// be callbacked in 2 sec period. We might want to seperate it in future to // provide more flexible setting on callback period. // // 061010, by rcnjko. -// +// #define NicIFLinkStatusWatchdog(_Adapter) \ MgntLinkMultiPortStatusWatchdog(_Adapter); \ HalDmWatchDog(_Adapter) @@ -107,13 +107,13 @@ NicIFCheckResetOrNot( VOID NicIFCoalesceReceivedPacketAndFreeUnusedRFD( PADAPTER Adapter, - PRT_RFD pRfd + PRT_RFD pRfd ); VOID NicIFReturnPacket( PADAPTER Adapter, - PRT_RFD pRfd + PRT_RFD pRfd ); VOID diff --git a/network/wlan/WDI/HEADER/EndianFree.h b/network/wlan/WDI/HEADER/EndianFree.h index 76cd79e2e..27a75fb32 100644 --- a/network/wlan/WDI/HEADER/EndianFree.h +++ b/network/wlan/WDI/HEADER/EndianFree.h @@ -41,10 +41,10 @@ // #define WriteEF1Byte(_ptr, _val) (*((pu1Byte)(_ptr)))=EF1Byte(_val) #define WriteEF2Byte(_ptr, _val) (*((UNALIGNED pu2Byte)(_ptr)))=EF2Byte(_val) -#define WriteEF4Byte(_ptr, _val) (*((UNALIGNED pu4Byte)(_ptr)))=EF4Byte(_val) +#define WriteEF4Byte(_ptr, _val) (*((UNALIGNED pu4Byte)(_ptr)))=EF4Byte(_val) // -// Convert Host system specific byte ording (litten or big endia) to Network byte ording (big endian). +// Convert Host system specific byte ording (litten or big endia) to Network byte ording (big endian). // 20060507, by rcnjko. // #if BYTE_ORDER == __MACHINE_LITTLE_ENDIAN @@ -61,7 +61,7 @@ #define H2N4BYTE(_val) ((u4Byte)(_val)) #endif -// Read/Write Host system specific byte ording (litten or big endia) from/to Network byte ording (big endian). +// Read/Write Host system specific byte ording (litten or big endia) from/to Network byte ording (big endian). // By Bruce, 2012-03-07. #define WriteH2N1BYTE(_ptr, _val) (*((pu1Byte)(_ptr)))= H2N1BYTE(_val) #define WriteH2N2BYTE(_ptr, _val) (*((UNALIGNED pu2Byte)(_ptr)))= H2N2BYTE(_val) @@ -112,7 +112,7 @@ // BIT_OFFSET_LEN_MASK_32(16, 2) => 0x00030000 // #define BIT_OFFSET_LEN_MASK_32(__BitOffset, __BitLen) \ - (BIT_LEN_MASK_32(__BitLen) << (__BitOffset)) + (BIT_LEN_MASK_32(__BitLen) << (__BitOffset)) // // Description: @@ -136,7 +136,7 @@ // // Description: -// Mask subfield (continuous bits in little-endian) of 4-byte value in litten byte oredering +// Mask subfield (continuous bits in little-endian) of 4-byte value in litten byte oredering // and return the result in 4-byte value in host byte ordering. // #define LE_BITS_CLEARED_TO_4BYTE(__pStart, __BitOffset, __BitLen) \ @@ -148,7 +148,7 @@ // // Description: -// Set subfield of little-endian 4-byte value to specified value. +// Set subfield of little-endian 4-byte value to specified value. // #define SET_BITS_TO_LE_4BYTE(__pStart, __BitOffset, __BitLen, __Value) \ *((UNALIGNED pu4Byte)(__pStart)) = \ @@ -158,23 +158,23 @@ ( (((u4Byte)__Value) & BIT_LEN_MASK_32(__BitLen)) << (__BitOffset) ) \ ); - + #define BIT_LEN_MASK_16(__BitLen) \ (0xFFFF >> (16 - (__BitLen))) - + #define BIT_OFFSET_LEN_MASK_16(__BitOffset, __BitLen) \ (BIT_LEN_MASK_16(__BitLen) << (__BitOffset)) - + #define LE_P2BYTE_TO_HOST_2BYTE(__pStart) \ (EF2Byte(*((UNALIGNED pu2Byte)(__pStart)))) - + #define LE_BITS_TO_2BYTE(__pStart, __BitOffset, __BitLen) \ ( \ ( LE_P2BYTE_TO_HOST_2BYTE(__pStart) >> (__BitOffset) ) \ & \ BIT_LEN_MASK_16(__BitLen) \ ) - + #define LE_BITS_CLEARED_TO_2BYTE(__pStart, __BitOffset, __BitLen) \ ( \ LE_P2BYTE_TO_HOST_2BYTE(__pStart) \ @@ -189,7 +189,7 @@ | \ ( (((u2Byte)__Value) & BIT_LEN_MASK_16(__BitLen)) << (__BitOffset) ) \ ); - + #define BIT_LEN_MASK_8(__BitLen) \ (0xFF >> (8 - (__BitLen))) diff --git a/network/wlan/WDI/HEADER/GeneralDef.h b/network/wlan/WDI/HEADER/GeneralDef.h index 5b58c8889..014825c7d 100644 --- a/network/wlan/WDI/HEADER/GeneralDef.h +++ b/network/wlan/WDI/HEADER/GeneralDef.h @@ -140,9 +140,9 @@ // Use one of the following value to define the flag, HAL_CODE_BASE. //----------------------------------------------------------------------------------------- #define RTL818X BIT0 // For 8185/8187. -#define RTL818X_B BIT1 // For 8185B/8187B. +#define RTL818X_B BIT1 // For 8185B/8187B. #define RTL818X_S (BIT1 | BIT2) // For RTL8187S (PCIe & USB) -#define RTL819X BIT3 // For 819x series, 8190, 8192E, 8192U, 8192SP, 8192SU, 8193SP, 8193SU +#define RTL819X BIT3 // For 819x series, 8190, 8192E, 8192U, 8192SP, 8192SU, 8193SP, 8193SU #define RTL8190 (BIT3 | BIT4) // For 8190 PCI #define RTL8192 (BIT3 | BIT5) // For 8192 (PCI-E & USB) #define RTL8192_S (BIT3 | BIT6) // For 8192_s (PCI-E & USB) diff --git a/network/wlan/WDI/HEADER/HTType.h b/network/wlan/WDI/HEADER/HTType.h index f31f35461..9dff94168 100644 --- a/network/wlan/WDI/HEADER/HTType.h +++ b/network/wlan/WDI/HEADER/HTType.h @@ -3,7 +3,7 @@ //------------------------------------------------------------ -// The HT Capability element is present in beacons, association request, +// The HT Capability element is present in beacons, association request, // reassociation request and probe response frames //------------------------------------------------------------ @@ -78,8 +78,8 @@ typedef enum _HT_Bandwidth_40MHZ_Sub_Carrier{ //Supported MCS set #define GET_HT_CAPABILITY_ELE_MCS(_pEleStart) ((_pEleStart)+3) - -//Extended HT Capability Info + +//Extended HT Capability Info #define SET_HT_CAPABILITY_ELE_EXT_HTCAPINFO(_pEleStart, _val) WriteEF2Byte(((pu1Byte)(_pEleStart))+19, _val) #define GET_HT_CAPABILITY_ELE_EXT_HTCAPINFO(_pEleStart) ReadEF2Byte(((pu1Byte)(_pEleStart))+19) @@ -99,7 +99,7 @@ typedef enum _HT_Bandwidth_40MHZ_Sub_Carrier{ #define GET_HT_CAPABILITY_ELE_EXT_HTCAPINFO_RDR(_pEleStart) ((u1Byte)LE_BITS_TO_2BYTE( ((pu1Byte)(_pEleStart))+19, 11, 1)) #define GET_HT_CAPABILITY_ELE_EXT_HTCAPINFO_RSVD4(_pEleStart) ((u1Byte)LE_BITS_TO_2BYTE( ((pu1Byte)(_pEleStart))+19, 12, 4)) - + //TXBF Capabilities #define SET_HT_CAPABILITY_ELE_TXBF_CAP(_pEleStart, _val) WriteEF4Byte(((pu1Byte)(_pEleStart))+21, _val) #define SET_HT_CAP_TXBF_RECEIVE_NDP_CAP(_pEleStart, _val) SET_BITS_TO_LE_4BYTE( ((pu1Byte)(_pEleStart))+21, 3, 1, ((u1Byte)_val) ) @@ -197,7 +197,7 @@ typedef enum _HT_AMSDU_MODE_E{ HT_AMSDU_AUTO = 0, HT_AMSDU_ENABLE = 1, HT_AMSDU_DISABLE = 2, - HT_AMSDU_WITHIN_AMPDU = 3, + HT_AMSDU_WITHIN_AMPDU = 3, }HT_AMSDU_MODE_E, *PHT_AMSDU_MODE_E; typedef enum _SHORTGI_MODE_E{ @@ -223,8 +223,8 @@ typedef enum _SHORTGI_MODE_E{ #define BEAMFORMING_HT_BEAMFORMEE_CHNL_EST_CAP (BIT6|BIT7) //------------------------------------------------------------ -// The Data structure is used to keep HT related variables when card is -// configured as non-AP STA mode. **Note** Current_xxx should be set +// The Data structure is used to keep HT related variables when card is +// configured as non-AP STA mode. **Note** Current_xxx should be set // to default value in HTInitializeHTInfo() //------------------------------------------------------------ @@ -238,14 +238,14 @@ typedef struct _RT_HIGH_THROUGHPUT{ BOOLEAN bCurShortGI40MHz; // Tx Short GI for 40MHz BOOLEAN bCurShortGI20MHz; // Tx Short GI for 20MHz - u1Byte HtLdpcCap; // Capability combination of HT LDPC LDPC_HT_XXX + u1Byte HtLdpcCap; // Capability combination of HT LDPC LDPC_HT_XXX u1Byte HtCurLdpc; // Current target connection supports LDPC u1Byte HtStbcCap; // Capability combination of HT STBC_HT_XXX u1Byte HtCurStbc; // Current target connection support STBC - u1Byte HtBeamformCap; // Capability combination of VHT LDPC LDPC_VHT_XXX - u1Byte HtCurBeamform; // Current combination of BEAMFORMING_VHT_XXX in BSS connection + u1Byte HtBeamformCap; // Capability combination of VHT LDPC LDPC_VHT_XXX + u1Byte HtCurBeamform; // Current combination of BEAMFORMING_VHT_XXX in BSS connection BOOLEAN bRegSuppCCK; // Tx CCK rate capability BOOLEAN bCurSuppCCK; // Tx CCK rate capability @@ -266,12 +266,12 @@ typedef struct _RT_HIGH_THROUGHPUT{ u2Byte nAMSDU_MaxSize; // This indicates Tx A-MSDU capability BOOLEAN bCurrent_AMSDU_Support; // This indicates Tx A-MSDU capability u2Byte nCurrent_AMSDU_MaxSize; // This indicates Tx A-MSDU capability - + BOOLEAN bHWAMSDU_Support; // This indicates Tx A-MSDU capability // AMPDU related <2006.08.10 Emily> BOOLEAN bAMPDUEnable; // This indicate Tx A-MPDU capability - BOOLEAN bCurrentAMPDUEnable; // This indicate Tx A-MPDU capability + BOOLEAN bCurrentAMPDUEnable; // This indicate Tx A-MPDU capability u1Byte AMPDU_Factor; // This indicate Tx A-MPDU capability u1Byte CurrentAMPDUFactor; // This indicate Tx A-MPDU capability u1Byte MPDU_Density; // This indicate Tx A-MPDU capability @@ -293,7 +293,7 @@ typedef struct _RT_HIGH_THROUGHPUT{ // MIMO PS related u1Byte SelfMimoPs; u1Byte PeerMimoPs; - + // 40MHz Channel Offset settings. BOOLEAN bPeer40MHzCap; // Supported channel width set EXTCHNL_OFFSET PeerExtChnlOffset; @@ -308,7 +308,7 @@ typedef struct _RT_HIGH_THROUGHPUT{ u8Byte lastTimeSentObssRptUs; // Last system time to send the Obss report // For Realtek proprietary A-MPDU factor for aggregation - u1Byte RT2RT_HT_Mode; + u1Byte RT2RT_HT_Mode; // Rx Reorder control BOOLEAN bRegRxReorderEnable; @@ -326,7 +326,7 @@ typedef struct _RT_HIGH_THROUGHPUT{ //Added for dual band 40MHz support BOOLEAN bRegBW40MHzFor2G; - BOOLEAN bRegBW40MHzFor5G; + BOOLEAN bRegBW40MHzFor5G; BOOLEAN b40Intolerant; BOOLEAN bAMPDUManual; @@ -349,9 +349,9 @@ typedef struct _RT_HTINFO_STA_ENTRY{ u1Byte STBC; BOOLEAN bSupportCck; - + u2Byte AMSDU_MaxSize; - + u1Byte AMPDU_Factor; u1Byte MPDU_Density; @@ -359,11 +359,11 @@ typedef struct _RT_HTINFO_STA_ENTRY{ u1Byte McsRateSet[16]; u1Byte HTHighestOperaRate; - + BOOLEAN bCurRxReorderEnable; - + BOOLEAN bShortGI20M; - BOOLEAN bShortGI40M; + BOOLEAN bShortGI40M; u1Byte HtCurBeamform; }RT_HTINFO_STA_ENTRY, *PRT_HTINFO_STA_ENTRY; @@ -377,7 +377,7 @@ typedef struct _RT_HTINFO_STA_ENTRY{ typedef struct _BSS_HT{ BOOLEAN bdSupportHT; - + // HT related elements u1Byte bdHTCapBuf[32]; u2Byte bdHTCapLen; @@ -385,9 +385,9 @@ typedef struct _BSS_HT{ u2Byte bdHTInfoLen; HT_SPEC_VER bdHTSpecVer; - + u1Byte RT2RT_HT_Mode; - + BOOLEAN bd40Intolerant; BOOLEAN bdOBSSExemption; u2Byte OBSSScanInterval; diff --git a/network/wlan/WDI/HEADER/HalDef.h b/network/wlan/WDI/HEADER/HalDef.h index 5a76ec830..a3ec20201 100644 --- a/network/wlan/WDI/HEADER/HalDef.h +++ b/network/wlan/WDI/HEADER/HalDef.h @@ -2,7 +2,7 @@ #define __INC_HALDEF_H // -// General Definition for +// General Definition for // /* Common definition for all 819x series driver */ @@ -61,8 +61,8 @@ #define RTL819X_NO_SCAN_AFTER_LINK 0 -#define U1DONTCARE 0xFF -#define U2DONTCARE 0xFFFF +#define U1DONTCARE 0xFF +#define U2DONTCARE 0xFFFF #define INTEL_VENDOR_ID 0x8086 #define SIS_VENDOR_ID 0x1039 @@ -73,7 +73,7 @@ #define MIN_DESC_BUFFER_LENGTH 5 // -// 2011/09/07 MH Add for different channel plan power index offset +// 2011/09/07 MH Add for different channel plan power index offset // #define PWR_IDX_GROUP_NUM 4 // CCK/Legacyofdm/HT20/HT40 @@ -120,13 +120,13 @@ typedef enum _RT_MULTI_FUNC{ // typedef enum _RT_POLARITY_CTL{ RT_POLARITY_LOW_ACT = 0, - RT_POLARITY_HIGH_ACT = 1, + RT_POLARITY_HIGH_ACT = 1, }RT_POLARITY_CTL,*PRT_POLARITY_CTL; // For RTL8723 regulator mode. by tynli. 2011.01.14. typedef enum _RT_REGULATOR_MODE{ RT_SWITCHING_REGULATOR = 0, - RT_LDO_REGULATOR = 1, + RT_LDO_REGULATOR = 1, }RT_REGULATOR_MODE,*PRT_REGULATOR_MODE; @@ -389,7 +389,7 @@ typedef enum _RT_AMPDU_BRUST_MODE{ // BIT[0] = 1: 32k, 0: 40M #define FW_PS_CLOCK_OFF BIT0 // 32k #define FW_PS_CLOCK_ON 0 // 40M - + #define FW_PS_STATE_MASK (0x0F) #define FW_PS_STATE_HW_MASK (0x07) #define FW_PS_STATE_INT_MASK (0x3F) // ISR_ENABLE, IMR_ENABLE, and PS mode should be inherited. @@ -401,7 +401,7 @@ typedef enum _RT_AMPDU_BRUST_MODE{ #define FW_PS_IMR_MASK(x) ((x) & 0xDF) #define FW_PS_KEEP_IMR(x) ((x) & 0x20) - + #define FW_PS_STATE_S0 (FW_PS_DPS) #define FW_PS_STATE_S1 (FW_PS_LCLK) #define FW_PS_STATE_S2 (FW_PS_RF_OFF) @@ -416,14 +416,14 @@ typedef enum _RT_AMPDU_BRUST_MODE{ #define FW_PS_STATE_ALL_ON_92C (FW_PS_STATE_S4) #define FW_PS_STATE_RF_ON_92C (FW_PS_STATE_S3) #define FW_PS_STATE_RF_OFF_92C (FW_PS_STATE_S2) -#define FW_PS_STATE_RF_OFF_LOW_PWR_92C (FW_PS_STATE_S1) +#define FW_PS_STATE_RF_OFF_LOW_PWR_92C (FW_PS_STATE_S1) // For 88E H2C PwrMode Cmd ID 5. #define FW_PWR_STATE_ACTIVE ((FW_PS_RF_ON) | (FW_PS_REGISTER_ACTIVE)) #define FW_PWR_STATE_RF_OFF 0 -#define FW_PS_IS_ACK(x) ((x) & FW_PS_ACK ) +#define FW_PS_IS_ACK(x) ((x) & FW_PS_ACK ) #define FW_PS_IS_CLK_ON(x) ((x) & (FW_PS_RF_OFF |FW_PS_ALL_ON )) #define FW_PS_IS_RF_ON(x) ((x) & (FW_PS_ALL_ON)) #define FW_PS_IS_ACTIVE(x) ((x) & (FW_PS_ST_ACTIVE)) @@ -450,7 +450,7 @@ enum _Fw_Ps_State{ FW_PS_STATE_ALL_ON = 0, FW_PS_STATE_RF_ON = 1, FW_PS_STATE_RF_OFF = 2, - FW_PS_STATE_RF_OFF_LOW_PWR = 3, + FW_PS_STATE_RF_OFF_LOW_PWR = 3, }; typedef enum _LOWPWR32K_EXCEPTION @@ -481,7 +481,7 @@ typedef enum _RQPN_TYPE }RQPN_TYPE; // ------------------------------------------------------------------------------------------------ -// Specific definition depend on different chipset +// Specific definition depend on different chipset // ------------------------------------------------------------------------------------------------ #define SILENT_RESET 0 @@ -495,7 +495,7 @@ typedef enum _RQPN_TYPE // ------------------------------------------------------------------------------------------------ // The definition for FindAdapter Procedure -// (1) PCI memory mapped IO range. +// (1) PCI memory mapped IO range. // (2) Revision ID // (3) Default Hardware Type // (4) Require IO mapped IO Even if Memory Mapped IO is applied @@ -517,7 +517,7 @@ typedef enum _RQPN_TYPE #define HAL_HW_SDIO_8188FS_PID 0xF179 #define HAL_HW_SDIO_8723DS_PID 0xD723 //8723D -#define HAL_HW_TYPE_ID_8723A 0x01 +#define HAL_HW_TYPE_ID_8723A 0x01 #define HAL_HW_TYPE_ID_8188E 0x02 #define HAL_HW_TYPE_ID_8812A 0x04 #define HAL_HW_TYPE_ID_8821A 0x05 @@ -544,8 +544,8 @@ typedef enum _RQPN_TYPE // (3) Define Retry Limit for different hardware // 2007/11/12 by Emily // - -#define HAL_GET_MAXIMUN_AMSDU_SIZE(_Size) _Size // Limited by TX FIFO Size + +#define HAL_GET_MAXIMUN_AMSDU_SIZE(_Size) _Size // Limited by TX FIFO Size #define HAL_GET_DECLARED_AMSDU_SIZE(_Peer_Cap) (_Peer_Cap==0)?3839:7935; // Set diffrent retry limit in infrastructure mode and adhoc mode because if driver is set @@ -554,11 +554,11 @@ typedef enum _RQPN_TYPE // frame has higher priority which may cause starvation of data packet. 2008/05/14 by Emily // The reason to set HAL_RETRY_LIMIT_INFRA to 0x30 -// (1) Lanhsin modified 02272008 for Linksys WRT350N. Under air, if we don't retry more +// (1) Lanhsin modified 02272008 for Linksys WRT350N. Under air, if we don't retry more // times, these APs can't rx ok and the TP will be bad. -// (2) Cosa modified 02272008 for BelkinF5D(Ralink) AP, Netgear WNR854T. Under air, if +// (2) Cosa modified 02272008 for BelkinF5D(Ralink) AP, Netgear WNR854T. Under air, if // we don't retry more times, these APs can't rx ok and the TP will be bad. -#define HAL_RETRY_LIMIT_INFRA 48 +#define HAL_RETRY_LIMIT_INFRA 48 #define HAL_RETRY_LIMIT_AP_ADHOC 14 typedef u4Byte RT_INT_REG, *PRT_INT_REG; @@ -580,46 +580,46 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8192C_FW_UMC_WW_IMG "rtl8192CU\\rtl8192cfwUww.bin" #define RTL8192C_FW_UMC_B_WW_IMG "rtl8192CU\\rtl8192cfwU_Bww.bin" - #define RTL8188C_PHY_REG "rtl8192CU\\PHY_REG_1T.txt" + #define RTL8188C_PHY_REG "rtl8192CU\\PHY_REG_1T.txt" #define RTL8188C_PHY_RADIO_A "rtl8192CU\\radio_a_1T.txt" - #define RTL8188C_PHY_RADIO_B "rtl8192CU\\radio_b_1T.txt" + #define RTL8188C_PHY_RADIO_B "rtl8192CU\\radio_b_1T.txt" #define RTL8188C_AGC_TAB "rtl8192CU\\AGC_TAB_1T.txt" #define RTL8188C_PHY_MACREG "rtl8192CU\\MAC_REG.txt" #define RTL8188C_PHY_RADIO_A_mCard "rtl8192CU\\radio_a_1T_mCard.txt" - #define RTL8188C_PHY_RADIO_B_mCard "rtl8192CU\\radio_b_1T_mCard.txt" + #define RTL8188C_PHY_RADIO_B_mCard "rtl8192CU\\radio_b_1T_mCard.txt" #define RTL8188C_PHY_RADIO_A_HP "rtl8192CU\\radio_a_1T_HP.txt" - #define RTL8188C_PHY_REG_HP "rtl8192CU\\PHY_REG_1T_HP.txt" - #define RTL8188C_PHY_REG_mCard "rtl8192CU\\PHY_REG_1T_mCard.txt" + #define RTL8188C_PHY_REG_HP "rtl8192CU\\PHY_REG_1T_HP.txt" + #define RTL8188C_PHY_REG_mCard "rtl8192CU\\PHY_REG_1T_mCard.txt" #define RTL8188C_AGC_TAB_HP "rtl8192CU\\AGC_TAB_1T_HP.txt" - - #define RTL8192C_PHY_REG "rtl8192CU\\PHY_REG_2T.txt" - #define RTL8192C_PHY_REG_mCard "rtl8192CU\\PHY_REG_2T_mCard.txt" + + #define RTL8192C_PHY_REG "rtl8192CU\\PHY_REG_2T.txt" + #define RTL8192C_PHY_REG_mCard "rtl8192CU\\PHY_REG_2T_mCard.txt" #define RTL8192C_PHY_RADIO_A "rtl8192CU\\radio_a_2T.txt" - #define RTL8192C_PHY_RADIO_B "rtl8192CU\\radio_b_2T.txt" + #define RTL8192C_PHY_RADIO_B "rtl8192CU\\radio_b_2T.txt" #define RTL8192C_AGC_TAB "rtl8192CU\\AGC_TAB_2T.txt" #define RTL8192C_PHY_MACREG "rtl8192CU\\MAC_REG.txt" #define RTL819X_PHY_REG_PG "rtl8192CU\\PHY_REG_PG.txt" - #define RTL819X_PHY_REG_MP "rtl8192CU\\PHY_REG_MP.txt" + #define RTL819X_PHY_REG_MP "rtl8192CU\\PHY_REG_MP.txt" #define RTL819X_PHY_REG_PG_HP "rtl8192CU\\PHY_REG_PG_HP.txt" #define RTL819X_PHY_RADIO_A "rtl8192CU\\radio_a.txt" - #define RTL819X_PHY_RADIO_B "rtl8192CU\\radio_b.txt" - + #define RTL819X_PHY_RADIO_B "rtl8192CU\\radio_b.txt" + //--------------------------------------------------------------------- // RTL8192DU From file //--------------------------------------------------------------------- #define RTL8192D_PHY_REG "rtl8192DU\\PHY_REG.txt" #define RTL8192D_PHY_REG_PG "rtl8192DU\\PHY_REG_PG.txt" - #define RTL8192D_PHY_REG_MP "rtl8192DU\\PHY_REG_MP.txt" - + #define RTL8192D_PHY_REG_MP "rtl8192DU\\PHY_REG_MP.txt" + #define RTL8192D_AGC_TAB "rtl8192DU\\AGC_TAB.txt" #define RTL8192D_AGC_TAB_2G "rtl8192DU\\AGC_TAB_2G.txt" #define RTL8192D_AGC_TAB_5G "rtl8192DU\\AGC_TAB_5G.txt" #define RTL8192D_PHY_RADIO_A "rtl8192DU\\radio_a.txt" #define RTL8192D_PHY_RADIO_B "rtl8192DU\\radio_b.txt" #define RTL8192D_PHY_RADIO_A_intPA "rtl8192DU\\radio_a_intPA.txt" - #define RTL8192D_PHY_RADIO_B_intPA "rtl8192DU\\radio_b_intPA.txt" + #define RTL8192D_PHY_RADIO_B_intPA "rtl8192DU\\radio_b_intPA.txt" #define RTL8192D_PHY_MACREG "rtl8192DU\\MAC_REG.txt" //--------------------------------------------------------------------- @@ -628,15 +628,15 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8812_FW_IMG "rtl8812AU\\rtl8812Ufw.bin" #define RTL8812_FW_WW_IMG "rtl8812AU\\rtl8812Ufwww.bin" #define RTL8812_FW_BT_IMG "rtl8812AU\\rtl8812UfwBT.bin" - #define RTL8812_PHY_REG "rtl8812AU\\PHY_REG.txt" + #define RTL8812_PHY_REG "rtl8812AU\\PHY_REG.txt" #define RTL8812_PHY_RADIO_A "rtl8812AU\\RadioA.txt" #define RTL8812_PHY_RADIO_B "rtl8812AU\\RadioB.txt" - #define RTL8812_TXPWR_TRACK "rtl8812AU\\TxPowerTrack.txt" + #define RTL8812_TXPWR_TRACK "rtl8812AU\\TxPowerTrack.txt" #define RTL8812_AGC_TAB "rtl8812AU\\AGC_TAB.txt" #define RTL8812_PHY_MACREG "rtl8812AU\\MAC_REG.txt" #define RTL8812_PHY_REG_PG "rtl8812AU\\PHY_REG_PG.txt" - #define RTL8812_PHY_REG_MP "rtl8812AU\\PHY_REG_MP.txt" - #define RTL8812_TXPWR_LMT "rtl8812AU\\TXPWR_LMT.txt" + #define RTL8812_PHY_REG_MP "rtl8812AU\\PHY_REG_MP.txt" + #define RTL8812_TXPWR_LMT "rtl8812AU\\TXPWR_LMT.txt" //--------------------------------------------------------------------- @@ -646,14 +646,14 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8723_FW_UMC_B_IMG "rtl8723S\\rtl8723fw_B.bin" #define RTL8723_FW_UMC_WW_IMG "rtl8723S\\rtl8723fwww.bin" #define RTL8723_FW_UMC_B_WW_IMG "rtl8723S\\rtl8723fw_Bww.bin" - #define RTL8723_PHY_REG "rtl8723S\\PHY_REG_1T.txt" + #define RTL8723_PHY_REG "rtl8723S\\PHY_REG_1T.txt" #define RTL8723_PHY_RADIO_A "rtl8723S\\radio_a_1T.txt" - #define RTL8723_PHY_RADIO_B "rtl8723S\\radio_b_1T.txt" + #define RTL8723_PHY_RADIO_B "rtl8723S\\radio_b_1T.txt" #define RTL8723_AGC_TAB "rtl8723S\\AGC_TAB_1T.txt" #define RTL8723_PHY_MACREG "rtl8723S\\MAC_REG.txt" #define RTL8723_PHY_MACREG "rtl8723S\\MAC_REG.txt" #define RTL8723_PHY_REG_PG "rtl8723S\\PHY_REG_PG.txt" - #define RTL8723_PHY_REG_MP "rtl8723S\\PHY_REG_MP.txt" + #define RTL8723_PHY_REG_MP "rtl8723S\\PHY_REG_MP.txt" //--------------------------------------------------------------------- // RTL8188ES From file @@ -662,15 +662,15 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8188E_FW_T_WW_IMG "rtl8188E\\rtl8188Efwww.bin" #define RTL8188E_FW_S_IMG "rtl8188E\\rtl8188EfwS.bin" #define RTL8188E_FW_S_WW_IMG "rtl8188E\\rtl8188EfwSww.bin" - #define RTL8188E_PHY_REG "rtl8188E\\PHY_REG_1T.txt" + #define RTL8188E_PHY_REG "rtl8188E\\PHY_REG_1T.txt" #define RTL8188E_PHY_RADIO_A "rtl8188E\\RadioA_1T.txt" - #define RTL8188E_PHY_RADIO_B "rtl8188E\\RadioB_1T.txt" + #define RTL8188E_PHY_RADIO_B "rtl8188E\\RadioB_1T.txt" #define RTL8188E_AGC_TAB "rtl8188E\\AGC_TAB_1T.txt" #define RTL8188E_PHY_MACREG "rtl8188E\\MAC_REG.txt" #define RTL8188E_PHY_REG_PG "rtl8188E\\PHY_REG_PG.txt" - #define RTL8188E_PHY_REG_MP "rtl8188E\\PHY_REG_MP.txt" + #define RTL8188E_PHY_REG_MP "rtl8188E\\PHY_REG_MP.txt" #define RTL8188E_TXPWR_LMT "rtl8188E\\TXPWR_LMT.txt" - #define RTL8188E_TXPWR_TRACK "rtl8188E\\TxPowerTrack.txt" + #define RTL8188E_TXPWR_TRACK "rtl8188E\\TxPowerTrack.txt" //--------------------------------------------------------------------- // RTL8821S From file @@ -678,15 +678,15 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8821_FW_IMG "rtl8821AS\\RTL8821sFW.bin" #define RTL8821_FW_WW_IMG "rtl8821AS\\RTL8821sFWww.bin" #define RTL8821_FW_BT_IMG "rtl8821AS\\rtl8821AfwBT.bin" - #define RTL8821_PHY_REG "rtl8821AS\\PHY_REG.txt" + #define RTL8821_PHY_REG "rtl8821AS\\PHY_REG.txt" #define RTL8821_PHY_RADIO_A "rtl8821AS\\RadioA.txt" - #define RTL8821_PHY_RADIO_B "rtl8821AS\\RadioB.txt" - #define RTL8821_TXPWR_TRACK "rtl8821AS\\TxPowerTrack.txt" + #define RTL8821_PHY_RADIO_B "rtl8821AS\\RadioB.txt" + #define RTL8821_TXPWR_TRACK "rtl8821AS\\TxPowerTrack.txt" #define RTL8821_AGC_TAB "rtl8821AS\\AGC_TAB.txt" #define RTL8821_PHY_MACREG "rtl8821AS\\MAC_REG.txt" #define RTL8821_PHY_REG_PG "rtl8821AS\\PHY_REG_PG.txt" - #define RTL8821_PHY_REG_MP "rtl8821AS\\PHY_REG_MP.txt" - #define RTL8821_TXPWR_LMT "rtl8821AS\\TXPWR_LMT.txt" + #define RTL8821_PHY_REG_MP "rtl8821AS\\PHY_REG_MP.txt" + #define RTL8821_TXPWR_LMT "rtl8821AS\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8192E From file @@ -694,15 +694,15 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8192E_FW_IMG "rtl8192ES\\rtl8192ESfw.bin" #define RTL8192E_FW_WW_IMG "rtl8192ES\\rtl8192ESfwww.bin" #define RTL8192E_FW_BT_IMG "rtl8192EE\\rtl8192ESfwBT.bin" - #define RTL8192E_PHY_REG "rtl8192ES\\PHY_REG.txt" + #define RTL8192E_PHY_REG "rtl8192ES\\PHY_REG.txt" #define RTL8192E_PHY_RADIO_A "rtl8192ES\\RadioA.txt" - #define RTL8192E_PHY_RADIO_B "rtl8192ES\\RadioB.txt" + #define RTL8192E_PHY_RADIO_B "rtl8192ES\\RadioB.txt" #define RTL8192E_AGC_TAB "rtl8192ES\\AGC_TAB.txt" #define RTL8192E_PHY_MACREG "rtl8192ES\\MAC_REG.txt" #define RTL8192E_PHY_REG_PG "rtl8192ES\\PHY_REG_PG.txt" #define RTL8192E_PHY_REG_MP "rtl8192ES\\PHY_REG_MP.txt" - #define RTL8192_TXPWR_TRACK "rtl8192ES\\TxPowerTrack.txt" - #define RTL8192E_TXPWR_LMT "rtl8192ES\\TXPWR_LMT.txt" + #define RTL8192_TXPWR_TRACK "rtl8192ES\\TxPowerTrack.txt" + #define RTL8192E_TXPWR_LMT "rtl8192ES\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8723D From file @@ -710,57 +710,57 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8723D_FW_IMG "rtl8723DS\\rtl8723DSfw.bin" #define RTL8723D_FW_WW_IMG "rtl8723DS\\rtl8723DSfwww.bin" #define RTL8723D_FW_BT_IMG "rtl8723DS\\rtl8723DSfwBT.bin" - #define RTL8723D_PHY_REG "rtl8723DS\\PHY_REG.txt" + #define RTL8723D_PHY_REG "rtl8723DS\\PHY_REG.txt" #define RTL8723D_PHY_RADIO_A "rtl8723DS\\RadioA.txt" #define RTL8723D_AGC_TAB "rtl8723DS\\AGC_TAB.txt" #define RTL8723D_PHY_MACREG "rtl8723DS\\MAC_REG.txt" #define RTL8723D_PHY_REG_PG "rtl8723DS\\PHY_REG_PG.txt" #define RTL8723D_PHY_REG_MP "rtl8723DS\\PHY_REG_MP.txt" #define RTL8723D_TXPWR_TRACK "rtl8723DS\\TxPowerTrack.txt" - #define RTL8723D_TXPWR_LMT "rtl8723DS\\TXPWR_LMT.txt" + #define RTL8723D_TXPWR_LMT "rtl8723DS\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8814A From file //--------------------------------------------------------------------- #define RTL8814A_FW_IMG "rtl8814as\\rtl8814Afw.bin" - #define RTL8814A_PHY_REG "rtl8814as\\PHY_REG.txt" + #define RTL8814A_PHY_REG "rtl8814as\\PHY_REG.txt" #define RTL8814A_PHY_RADIO_A "rtl8814as\\RadioA.txt" #define RTL8814A_PHY_RADIO_B "rtl8814as\\RadioB.txt" #define RTL8814A_PHY_RADIO_C "rtl8814as\\RadioC.txt" - #define RTL8814A_PHY_RADIO_D "rtl8814as\\RadioD.txt" + #define RTL8814A_PHY_RADIO_D "rtl8814as\\RadioD.txt" #define RTL8814A_AGC_TAB "rtl8814as\\AGC_TAB.txt" #define RTL8814A_PHY_MACREG "rtl8814as\\MAC_REG.txt" #define RTL8814A_PHY_REG_PG "rtl8814as\\PHY_REG_PG.txt" #define RTL8814A_PHY_REG_MP "rtl8814as\\PHY_REG_MP.txt" #define RTL8814A_TXPWR_TRACK "rtl8814as\\TxPowerTrack.txt" - #define RTL8814A_TXPWR_LMT "rtl8814as\\TXPWR_LMT.txt" + #define RTL8814A_TXPWR_LMT "rtl8814as\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8821BS From file //--------------------------------------------------------------------- #define RTL8821B_FW_IMG "rtl8821BS\\rtl8821Bfw.bin" - #define RTL8821B_PHY_REG "rtl8821BS\\PHY_REG.txt" + #define RTL8821B_PHY_REG "rtl8821BS\\PHY_REG.txt" #define RTL8821B_PHY_RADIO_A "rtl8821BS\\RadioA.txt" - #define RTL8821B_TXPWR_TRACK "rtl8821BS\\TxPowerTrack.txt" + #define RTL8821B_TXPWR_TRACK "rtl8821BS\\TxPowerTrack.txt" #define RTL8821B_AGC_TAB "rtl8821BS\\AGC_TAB.txt" #define RTL8821B_PHY_MACREG "rtl8821BS\\MAC_REG.txt" #define RTL8821B_PHY_REG_PG "rtl8821BS\\PHY_REG_PG.txt" - #define RTL8821B_PHY_REG_MP "rtl8821BS\\PHY_REG_MP.txt" - #define RTL8821B_TXPWR_LMT "rtl8821BS\\TXPWR_LMT.txt" + #define RTL8821B_PHY_REG_MP "rtl8821BS\\PHY_REG_MP.txt" + #define RTL8821B_TXPWR_LMT "rtl8821BS\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8822BS From file //--------------------------------------------------------------------- #define RTL8822B_FW_IMG "rtl8822BS\\rtl8822Bfw.bin" - #define RTL8822B_PHY_REG "rtl8822BS\\PHY_REG.txt" + #define RTL8822B_PHY_REG "rtl8822BS\\PHY_REG.txt" #define RTL8822B_PHY_RADIO_A "rtl8822BS\\RadioA.txt" #define RTL8822B_PHY_RADIO_B "rtl8822BS\\RadioB.txt" - #define RTL8822B_TXPWR_TRACK "rtl8822BS\\TxPowerTrack.txt" + #define RTL8822B_TXPWR_TRACK "rtl8822BS\\TxPowerTrack.txt" #define RTL8822B_AGC_TAB "rtl8822BS\\AGC_TAB.txt" #define RTL8822B_PHY_MACREG "rtl8822BS\\MAC_REG.txt" #define RTL8822B_PHY_REG_PG "rtl8822BS\\PHY_REG_PG.txt" - #define RTL8822B_PHY_REG_MP "rtl8822BS\\PHY_REG_MP.txt" - #define RTL8822B_TXPWR_LMT "rtl8822BS\\TXPWR_LMT.txt" + #define RTL8822B_PHY_REG_MP "rtl8822BS\\PHY_REG_MP.txt" + #define RTL8822B_TXPWR_LMT "rtl8822BS\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8723BS From file @@ -768,10 +768,10 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8723B_FW_IMG "rtl8723BS\\rtl8723Bfw.bin" #define RTL8723B_FW_WW_IMG "rtl8723BS\\rtl8723Bfwww.bin" #define RTL8723B_FW_BT_IMG "rtl8723BS\\rtl8723BfwBT.bin" - #define RTL8723B_PHY_REG "rtl8723BS\\PHY_REG.txt" + #define RTL8723B_PHY_REG "rtl8723BS\\PHY_REG.txt" #define RTL8723B_PHY_RADIO_A "rtl8723BS\\RadioA.txt" - #define RTL8723B_PHY_RADIO_B "rtl8723BS\\RadioB.txt" - #define RTL8723B_TXPWR_TRACK "rtl8723BS\\TxPowerTrack.txt" + #define RTL8723B_PHY_RADIO_B "rtl8723BS\\RadioB.txt" + #define RTL8723B_TXPWR_TRACK "rtl8723BS\\TxPowerTrack.txt" #define RTL8723B_AGC_TAB "rtl8723BS\\AGC_TAB.txt" #define RTL8723B_PHY_MACREG "rtl8723BS\\MAC_REG.txt" #define RTL8723B_PHY_REG_PG "rtl8723BS\\PHY_REG_PG.txt" @@ -784,30 +784,30 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define RTL8703B_FW_IMG "rtl8703BS\\rtl8703Bfw.bin" #define RTL8703B_FW_WW_IMG "rtl8703BS\\rtl8703Bfwww.bin" #define RTL8703B_FW_BT_IMG "rtl8703BS\\rtl8703BfwBT.bin" - #define RTL8703B_PHY_REG "rtl8703BS\\PHY_REG.txt" + #define RTL8703B_PHY_REG "rtl8703BS\\PHY_REG.txt" #define RTL8703B_PHY_RADIO_A "rtl8703BS\\RadioA.txt" - #define RTL8703B_PHY_RADIO_B "rtl8703BS\\RadioB.txt" - #define RTL8703B_TXPWR_TRACK "rtl8703BS\\TxPowerTrack.txt" + #define RTL8703B_PHY_RADIO_B "rtl8703BS\\RadioB.txt" + #define RTL8703B_TXPWR_TRACK "rtl8703BS\\TxPowerTrack.txt" #define RTL8703B_AGC_TAB "rtl8703BS\\AGC_TAB.txt" #define RTL8703B_PHY_MACREG "rtl8703BS\\MAC_REG.txt" #define RTL8703B_PHY_REG_PG "rtl8703BS\\PHY_REG_PG.txt" #define RTL8703B_PHY_REG_MP "rtl8703BS\\PHY_REG_MP.txt" - #define RTL8703B_TXPWR_LMT "rtl8703BS\\TXPWR_LMT.txt" + #define RTL8703B_TXPWR_LMT "rtl8703BS\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8188FS From file //--------------------------------------------------------------------- #define RTL8188F_FW_IMG "rtl8188FS\\rtl8188Ffw.bin" #define RTL8188F_FW_WW_IMG "rtl8188FS\\rtl8188Ffwww.bin" #define RTL8188F_FW_BT_IMG "rtl8188FS\\rtl8188FfwBT.bin" - #define RTL8188F_PHY_REG "rtl8188FS\\PHY_REG.txt" + #define RTL8188F_PHY_REG "rtl8188FS\\PHY_REG.txt" #define RTL8188F_PHY_RADIO_A "rtl8188FS\\RadioA.txt" - #define RTL8188F_PHY_RADIO_B "rtl8188FS\\RadioB.txt" - #define RTL8188F_TXPWR_TRACK "rtl8188FS\\TxPowerTrack.txt" + #define RTL8188F_PHY_RADIO_B "rtl8188FS\\RadioB.txt" + #define RTL8188F_TXPWR_TRACK "rtl8188FS\\TxPowerTrack.txt" #define RTL8188F_AGC_TAB "rtl8188FS\\AGC_TAB.txt" #define RTL8188F_PHY_MACREG "rtl8188FS\\MAC_REG.txt" #define RTL8188F_PHY_REG_PG "rtl8188FS\\PHY_REG_PG.txt" #define RTL8188F_PHY_REG_MP "rtl8188FS\\PHY_REG_MP.txt" - #define RTL8188F_TXPWR_LMT "rtl8188FS\\TXPWR_LMT.txt" + #define RTL8188F_TXPWR_LMT "rtl8188FS\\TXPWR_LMT.txt" //--------------------------------------------------------------------- // RTL8723S From header //--------------------------------------------------------------------- @@ -816,12 +816,12 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8723_FwUMCBCutImageArray Rtl8723SFwUMCBCutImgArray #define Rtl8723_FwWWImageArray Rtl8723FwWWImgArray #define Rtl8723_FwUMCBWWCutImageArray Rtl8723FwUMCBCutWWImgArray - + // MAC/BB/PHY Array #define Rtl8723_MAC_Array Rtl8723SMAC_2T_Array #define Rtl8723_AGCTAB_2TArray Rtl8723SAGCTAB_2TArray #define Rtl8723_AGCTAB_1TArray Rtl8723SAGCTAB_1TArray - #define Rtl8723_PHY_REG_2TArray Rtl8723SPHY_REG_2TArray + #define Rtl8723_PHY_REG_2TArray Rtl8723SPHY_REG_2TArray #define Rtl8723_PHY_REG_1TArray Rtl8723SPHY_REG_1TArray #define Rtl8723_RadioA_2TArray Rtl8723SRadioA_2TArray #define Rtl8723_RadioA_1TArray Rtl8723SRadioA_1TArray @@ -829,7 +829,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8723_RadioB_1TArray Rtl8723SRadioB_1TArray #define Rtl8723_PHY_REG_Array_PG Rtl8723SPHY_REG_Array_PG #define Rtl8723_PHY_REG_Array_MP Rtl8723SPHY_REG_Array_MP - + // Array length #define Rtl8723_ImgArrayLength Rtl8723SImgArrayLength #define Rtl8723_UMCBCutImgArrayLength Rtl8723SUMCBCutImgArrayLength @@ -849,7 +849,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; // Fw Array #define Rtl8192E_FwImageArray Rtl8192ESFwImgArray #define Rtl8192E_FwWWImageArray Rtl8192EFwWWImgArray - + // MAC/BB/PHY Array #define Rtl8192E_MAC_Array Rtl8192ESMAC_1T_Array #define Rtl8192E_PHY_REG_1TArray Rtl8192ESPHY_REG_1TArray @@ -857,7 +857,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8192E_RadioA_1TArray Rtl8192ESRadioA_1TArray #define Rtl8192E_PHY_REG_Array_PG Rtl8192ESPHY_REG_Array_PG #define Rtl8192E_PHY_REG_Array_MP Rtl8192ESPHY_REG_Array_MP - + // Array length #define Rtl8192E_ImgArrayLength Rtl8192ESImgArrayLength #define Rtl8192E_MAC_ArrayLength Rtl8192ESMAC_1T_ArrayLength @@ -872,7 +872,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; -// --------------------------------------------------------------------- +// --------------------------------------------------------------------- // RTL8723 Power Configuration CMDs for PCIe interface //--------------------------------------------------------------------- #define Rtl8723_NIC_PWR_ON_FLOW rtl8723A_power_on_flow @@ -909,7 +909,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8812_NIC_RESUME_FLOW rtl8812_resume_flow #define Rtl8812_NIC_PDN_FLOW rtl8812_hwpdn_flow #define Rtl8812_NIC_LPS_ENTER_FLOW rtl8812_enter_lps_flow -#define Rtl8812_NIC_LPS_LEAVE_FLOW rtl8812_leave_lps_flow +#define Rtl8812_NIC_LPS_LEAVE_FLOW rtl8812_leave_lps_flow //--------------------------------------------------------------------- // RTL8821 Power Configuration CMDs for PCIe interface @@ -922,7 +922,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8821A_NIC_RESUME_FLOW rtl8821A_resume_flow #define Rtl8821A_NIC_PDN_FLOW rtl8821A_hwpdn_flow #define Rtl8821A_NIC_LPS_ENTER_FLOW rtl8821A_enter_lps_flow -#define Rtl8821A_NIC_LPS_LEAVE_FLOW rtl8821A_leave_lps_flow +#define Rtl8821A_NIC_LPS_LEAVE_FLOW rtl8821A_leave_lps_flow //--------------------------------------------------------------------- // RTL8821B Power Configuration CMDs for PCIe interface @@ -935,7 +935,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8821B_NIC_RESUME_FLOW rtl8821B_resume_flow #define Rtl8821B_NIC_PDN_FLOW rtl8821B_hwpdn_flow #define Rtl8821B_NIC_LPS_ENTER_FLOW rtl8821B_enter_lps_flow -#define Rtl8821B_NIC_LPS_LEAVE_FLOW rtl8821B_leave_lps_flow +#define Rtl8821B_NIC_LPS_LEAVE_FLOW rtl8821B_leave_lps_flow //--------------------------------------------------------------------- // RTL8822B Power Configuration CMDs for PCIe interface @@ -948,7 +948,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8822B_NIC_RESUME_FLOW rtl8822B_resume_flow #define Rtl8822B_NIC_PDN_FLOW rtl8822B_hwpdn_flow #define Rtl8822B_NIC_LPS_ENTER_FLOW rtl8822B_enter_lps_flow -#define Rtl8822B_NIC_LPS_LEAVE_FLOW rtl8822B_leave_lps_flow +#define Rtl8822B_NIC_LPS_LEAVE_FLOW rtl8822B_leave_lps_flow //--------------------------------------------------------------------- @@ -962,7 +962,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8192E_NIC_RESUME_FLOW rtl8192E_resume_flow #define Rtl8192E_NIC_PDN_FLOW rtl8192E_hwpdn_flow #define Rtl8192E_NIC_LPS_ENTER_FLOW rtl8192E_enter_lps_flow -#define Rtl8192E_NIC_LPS_LEAVE_FLOW rtl8192E_leave_lps_flow +#define Rtl8192E_NIC_LPS_LEAVE_FLOW rtl8192E_leave_lps_flow //--------------------------------------------------------------------- // RTL8814A Power Configuration CMDs for PCIe interface @@ -975,7 +975,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8814A_NIC_RESUME_FLOW rtl8814A_resume_flow #define Rtl8814A_NIC_PDN_FLOW rtl8814A_hwpdn_flow #define Rtl8814A_NIC_LPS_ENTER_FLOW rtl8814A_enter_lps_flow -#define Rtl8814A_NIC_LPS_LEAVE_FLOW rtl8814A_leave_lps_flow +#define Rtl8814A_NIC_LPS_LEAVE_FLOW rtl8814A_leave_lps_flow //--------------------------------------------------------------------- // RTL8723B Power Configuration CMDs @@ -988,7 +988,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8723B_NIC_RESUME_FLOW rtl8723B_resume_flow #define Rtl8723B_NIC_PDN_FLOW rtl8723B_hwpdn_flow #define Rtl8723B_NIC_LPS_ENTER_FLOW rtl8723B_enter_lps_flow -#define Rtl8723B_NIC_LPS_LEAVE_FLOW rtl8723B_leave_lps_flow +#define Rtl8723B_NIC_LPS_LEAVE_FLOW rtl8723B_leave_lps_flow //--------------------------------------------------------------------- // RTL8703B Power Configuration CMDs @@ -1026,7 +1026,7 @@ typedef u4Byte RT_INT_REG, *PRT_INT_REG; #define Rtl8723D_NIC_RESUME_FLOW rtl8723D_resume_flow #define Rtl8723D_NIC_PDN_FLOW rtl8723D_hwpdn_flow #define Rtl8723D_NIC_LPS_ENTER_FLOW rtl8723D_enter_lps_flow -#define Rtl8723D_NIC_LPS_LEAVE_FLOW rtl8723D_leave_lps_flow +#define Rtl8723D_NIC_LPS_LEAVE_FLOW rtl8723D_leave_lps_flow typedef enum _FA_CNT_TYPE{ @@ -1038,7 +1038,7 @@ typedef enum _FA_CNT_TYPE{ }FA_CNT_TYPE; // -// Forward declaration. +// Forward declaration. // typedef struct _ADAPTER ADAPTER, *PADAPTER; typedef struct _RT_RFD RT_RFD, *PRT_RFD; @@ -1075,10 +1075,10 @@ typedef enum _HARDWARE_TYPE{ HARDWARE_TYPE_RTL8192ES, HARDWARE_TYPE_RTL8814AE, HARDWARE_TYPE_RTL8814AU, - HARDWARE_TYPE_RTL8814AS, + HARDWARE_TYPE_RTL8814AS, HARDWARE_TYPE_RTL8812E, HARDWARE_TYPE_RTL8812AU, - HARDWARE_TYPE_RTL8811AU, + HARDWARE_TYPE_RTL8811AU, HARDWARE_TYPE_RTL8821E, HARDWARE_TYPE_RTL8821U, HARDWARE_TYPE_RTL8821S, @@ -1125,8 +1125,8 @@ typedef enum _LED_CTL_MODE{ LED_CTL_START_WPS = 9, LED_CTL_STOP_WPS = 10, LED_CTL_START_WPS_BOTTON = 11, //added for runtop - LED_CTL_STOP_WPS_FAIL = 12, //added for ALPHA - LED_CTL_STOP_WPS_FAIL_OVERLAP = 13, //added for BELKIN + LED_CTL_STOP_WPS_FAIL = 12, //added for ALPHA + LED_CTL_STOP_WPS_FAIL_OVERLAP = 13, //added for BELKIN LED_CTL_CONNECTION_NO_TRANSFER = 14, LED_CTL_OFF_BY_BUTTON = 15, //added for ALPHA }LED_CTL_MODE; @@ -1135,13 +1135,13 @@ typedef enum _LED_CTL_MODE{ typedef enum _HW_VARIABLES{ HW_VAR_ETHER_ADDR, - HW_VAR_MULTICAST_REG, + HW_VAR_MULTICAST_REG, HW_VAR_BASIC_RATE, HW_VAR_BSSID, // HW Port 0 BSSID HW_VAR_BSSID1, // HW Port 1 BSSID HW_VAR_MEDIA_STATUS, HW_VAR_BEACON_INTERVAL, - HW_VAR_ATIM_WINDOW, + HW_VAR_ATIM_WINDOW, HW_VAR_SIFS, HW_VAR_SLOT_TIME, HW_VAR_ACK_PREAMBLE, @@ -1156,7 +1156,7 @@ typedef enum _HW_VARIABLES{ HW_VAR_CCX_CLM_NHM, // For CCX 2 parallel channel load request and noise histogram request, 2006.05.12. HW_VAR_TURBO_MODE, // For turbo mode related settings, added by Roger, 2006.12.15. HW_VAR_RF_STATE, // For change or query RF power state, 061214, rcnjko. - HW_VAR_RF_OFF_BY_HW, // For UI to query if external HW signal disable RF, 061229, rcnjko. + HW_VAR_RF_OFF_BY_HW, // For UI to query if external HW signal disable RF, 061229, rcnjko. //1!!!!!!!!!!!!!!!!!!!!!!!!!!! //1Attention Please!!!<11n or 8190 specific code should be put below this line> //1!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -1189,7 +1189,7 @@ typedef enum _HW_VARIABLES{ HW_VAR_CORRECT_TSF, //Added by tynli. 2009.10.22. For Hw count TBTT time. HW_VAR_FWLPS_RF_ON, //Added by tynli. 2009.11.09. For checking if Fw finishs RF on sequence. HW_VAR_DUAL_TSF_RST, //Added by tynli. 2009.12.03. Suggested by TimChen. - HW_VAR_TSFR_SYNC_EN, // Synchronize HW-Port 0 TSF to HW-Port 1 TSF + HW_VAR_TSFR_SYNC_EN, // Synchronize HW-Port 0 TSF to HW-Port 1 TSF HW_VAR_DUAL_SWITCH_BAND, HW_VAR_INT_MIGRATION, //Added by Roger, 2010.03.05. HW_VAR_RX_AGGR_USBTH, @@ -1240,8 +1240,8 @@ typedef enum _HW_VARIABLES{ HW_VAR_SUPPORT_USB3, HW_VAR_USB_MODE, HW_VAR_AMPDU_MAX_TIME, - HW_VAR_AMPDU_MAX_AGG_NUM_DYNAMIC, - HW_VAR_BATCH_INDICATE_ENABLE, + HW_VAR_AMPDU_MAX_AGG_NUM_DYNAMIC, + HW_VAR_BATCH_INDICATE_ENABLE, HW_VAR_JAGUAR_PATCH, HW_VAR_ANTENNA_DETECTED_INFO, // Support for antenna detection info from each IC, added by Roger, 2012.11.27. HW_VAR_NQOS_SEQ_NUM, // Hw sequence number for non-Qos data and mgnt frame @@ -1316,20 +1316,20 @@ typedef enum _HW_VARIABLES{ /* for some IC need to set 4 TxAGC value at one times, suggest by Stanley, 2015.05.25 */ HW_VAR_TXAGC_NEED_SET_4_RATE_AT_ONCE, - + HW_VAR_FCS_NOA, HW_VAR_FCS_ADJUST_TSF, - - //--------------- START ------------------ + + //--------------- START ------------------ /*Avoid Rx DPC watchdog violation*/ - HW_VAR_RWPTR_RX_INTERRUPT_LOOP_BREAK, + HW_VAR_RWPTR_RX_INTERRUPT_LOOP_BREAK, HW_VAR_AVOID_RX_DPC_WATCHDOG_VIOLATION, //---------------- END ------------------- HW_VAR_TX_COMPLETE_LATER_SUPPORT, - //--------------- START ------------------ - // MAC Address Randomization - // True : Support MAC Address Randomization and DeviceAddress ( Support 4 or more MAC register) + //--------------- START ------------------ + // MAC Address Randomization + // True : Support MAC Address Randomization and DeviceAddress ( Support 4 or more MAC register) // Fslse : Just support One of MAC Address Randomization and DeviceAddress ( Just Support 2 MAC register ) HW_VAR_MAC_ADRESS_COX_CAP, // Just For Query !! // Write New MAC Address @@ -1337,7 +1337,7 @@ typedef enum _HW_VARIABLES{ //---------------- END ------------------- #if INTEL_RTD3_SUPPORT - HW_VAR_RTD3_SUPPORT, + HW_VAR_RTD3_SUPPORT, #endif }HW_VARIABLES; @@ -1367,7 +1367,7 @@ typedef enum _HAL_HW_TIMER_TYPE typedef enum _HAL_DEF_VARIABLE{ - HAL_DEF_LED, // Led, 0: disable, 1: enable. 061010, by rcnjko. + HAL_DEF_LED, // Led, 0: disable, 1: enable. 061010, by rcnjko. HAL_DEF_WOWLAN, HAL_DEF_ENDPOINTS, //number of endpoints HAL_DEF_MIN_TX_POWER_DBM, // The min supported Tx power in dBm. @@ -1381,7 +1381,7 @@ typedef enum _HAL_DEF_VARIABLE{ HAL_DEF_TX_PWR_PERCENTAGE, // For WNC NEC TxPwr adjustment purpose, added by Roger, 2010.03.09. HAL_DEF_USB_SELECTIVE_SUSPEND, HAL_DEF_REMOTE_WAKEUP, - HAL_DEF_TX_FEEDBACK_SUPPORT, // Determine if it supports Tx Feedback through C2H, by Hana, 2015.02.10 + HAL_DEF_TX_FEEDBACK_SUPPORT, // Determine if it supports Tx Feedback through C2H, by Hana, 2015.02.10 // 2011/01/12 MH Add for 9xp compatiable. HAL_DEF_BEACON_QUEUE, // Get the Beacon Queue ID for sending the Beacon packet. If the returned value is beacon queue, it must support HW Beacon. By Bruce, 2011-01-18. HAL_DEF_HW_BEACON_SUPPORT, // Determine if it supports HW Beacon sent in TBTT automatically. By Bruce, 2011-01-18. @@ -1392,7 +1392,7 @@ typedef enum _HAL_DEF_VARIABLE{ HAL_DEF_EFUSE_BYTES, HAL_DEF_AUTOLOAD_STATUS, //Get current autoload status, 0: autoload success, 1: autoload fail. 2008.12.19. Added by Roger. HAL_DEF_EFUSE_BT_USAGE, //Get current BT EFUSE utilization. 2008.12.19. Added by Roger. - HAL_DEF_EFUSE_BT_BYTES, + HAL_DEF_EFUSE_BT_BYTES, // 2011/09/07 MH Add for netgear requirement. HAL_DEF_GAIN_OFFSET_FCC_LOW, HAL_DEF_GAIN_OFFSET_FCC, @@ -1403,7 +1403,7 @@ typedef enum _HAL_DEF_VARIABLE{ HAL_DEF_GAIN_OFFSET_ETSI_LOW, HAL_DEF_GAIN_OFFSET_ETSI, HAL_DEF_GAIN_OFFSET_ETSI_HIGH, - HAL_DEF_AP_IBSS_INTERRUPT, // Configure the interrupt mask of AP/IBSS mode + HAL_DEF_AP_IBSS_INTERRUPT, // Configure the interrupt mask of AP/IBSS mode HAL_DEF_ENABLE_TXOK_INTERRUPT, HAL_DEF_CHECK_NIC_UNPLUG, // Check the interrupt state of NIC if it is unplugged. HAL_DEF_USE_RA_MASK, // Control RAMask @@ -1460,7 +1460,7 @@ typedef enum _HAL_INT_TYPE HAL_INT_TYPE_RX_OK, // Receive DMA OK HAL_INT_TYPE_RDU, HAL_INT_TYPE_HSISR_IND, // HSISR Indicator (HSIMR & HSISR is true, this bit is set to 1) . By YJ,120406 - HAL_INT_TYPE_SYS_PDNINT, // System Interrupt: Hardware Power Down PIN Negedge Interrupt. By YJ,120406 + HAL_INT_TYPE_SYS_PDNINT, // System Interrupt: Hardware Power Down PIN Negedge Interrupt. By YJ,120406 HAL_INT_TYPE_SYS_RONINT, // System Interrupt: Hardware Power Down PIN Negedge Interrupt. By YJ,120406 HAL_INT_TYPE_GPIO9_INT, HAL_INT_TYPE_AMPDU_BURST_TIMER, // Timer/Counter 4 interrupt. @@ -1492,8 +1492,8 @@ typedef struct _EEPROM_OFFSET{ #endif -// Power save mode configured. -typedef enum _RT_PS_MODE +// Power save mode configured. +typedef enum _RT_PS_MODE { eActive, // Active/Continuous access. eMaxPs, // Max power save mode. @@ -1583,9 +1583,9 @@ typedef enum _SCAN_OPERATION_BACKUP_OPT{ }SCAN_OPERATION_BACKUP_OPT; -// Related IO. +// Related IO. typedef enum _IO_TYPE{ - IO_CMD_PAUSE_BAND0_DM_BY_SCAN = 0, + IO_CMD_PAUSE_BAND0_DM_BY_SCAN = 0, IO_CMD_PAUSE_BAND1_DM_BY_SCAN = 1, IO_CMD_RESUME_DM_BY_SCAN = 2, }IO_TYPE,*PIO_TYPE; @@ -1725,9 +1725,9 @@ typedef struct _RT_OFFLOAD_NETWORK typedef struct _RT_NLO_INFO { ULONG NumDot11OffloadNetwork; - ULONG FastScanPeriod; - ULONG FastScanIterations; - ULONG SlowScanPeriod; + ULONG FastScanPeriod; + ULONG FastScanIterations; + ULONG SlowScanPeriod; RT_OFFLOAD_NETWORK dDot11OffloadNetworkList[NATIVE_802_11_MAX_NETWORKOFFLOAD_SIZE]; }RT_NLO_INFO, *PRT_NLO_INFO; @@ -1736,7 +1736,7 @@ typedef struct _RT_AOAC_REPORT_{ u8Byte ReplayCounterOfEapolKey; u1Byte GroupKey[32]; u1Byte KeyIndex; - u1Byte SecurityType; + u1Byte SecurityType; }RT_AOAC_REPORT, *PRT_AOAC_REPORT; #ifdef REMOVE_PACK @@ -1747,7 +1747,7 @@ typedef struct _RT_AOAC_REPORT_{ // Determine how we handle the Beacon sent, by Bruce, 2011-01-18. // By the following definition, we should schedule the timer if we use the SW beacon or handle the TBTT timing. #define BEACON_SEND_AUTO_HW 0 // (Beacon Queue) HW updates Beacon buffer automatically (by interrupts or events) and the packets can be sent in TBTT automatically. -#define BEACON_SEND_AUTO_SW 1 // (Beacon Queue) SW needs to updates the Beacon by self timer but the HW can send the Beacons in TBTT. +#define BEACON_SEND_AUTO_SW 1 // (Beacon Queue) SW needs to updates the Beacon by self timer but the HW can send the Beacons in TBTT. #define BEACON_SEND_MANUAL 2 // (AC/MGNT/HIGN Queue) SW needs to updates the Beacon and send it by self timer. In other words, we need to handle the TBTT timing. @@ -1759,7 +1759,7 @@ typedef struct _RT_AOAC_REPORT_{ ((__pAdapter)->bDriverStopped || \ (__pAdapter)->bSurpriseRemoved || \ RT_IS_FUNC_DISABLED((__pAdapter), (DF_IO_BIT | DF_IO_D3_BIT))) - + #define RT_USB_CANNOT_IO(__pAdapter) \ ((__pAdapter)->bDriverStopped || \ (__pAdapter)->bSurpriseRemoved || \ @@ -1855,23 +1855,23 @@ typedef VOID IN PADAPTER Adapter ); -typedef VOID +typedef VOID (*NicReleaseAllTimerHandler)( IN PADAPTER Adapter ); -typedef RT_STATUS +typedef RT_STATUS (*NicInitializeAdapterHandler)( IN PADAPTER Adapter, IN u1Byte Channel ); -typedef VOID +typedef VOID (*NicHalUpdateDefaultSettingHandler)( IN PADAPTER Adapter ); -typedef VOID +typedef VOID (*NicHalIntUpdateDefSetHandler)( IN PADAPTER Adapter ); @@ -2222,7 +2222,7 @@ typedef BOOLEAN typedef u4Byte (*NicGetRxPacketShiftBytesHandler)( - PRT_RFD pRfd + PRT_RFD pRfd ); typedef VOID @@ -2232,8 +2232,8 @@ typedef VOID typedef VOID (*NICUpdateHalRATRTableHandler)( - IN PADAPTER Adapter, - IN POCTET_STRING posLegcyRate, + IN PADAPTER Adapter, + IN POCTET_STRING posLegcyRate, IN pu1Byte pMcsRate, IN PRT_WLAN_STA pEntry ); @@ -2307,7 +2307,7 @@ typedef VOID typedef u4Byte (*NicRxCommandPacketHandler)( - PADAPTER Adapter, + PADAPTER Adapter, PRT_RFD pRfd ); @@ -2340,18 +2340,18 @@ typedef VOID typedef BOOLEAN (*NicGetNmodeSupportBySecCfgHandler)( - IN PADAPTER Adapter); + IN PADAPTER Adapter); typedef BOOLEAN (*NicGetNmodeSupportBySWSecHandler)( - IN PADAPTER Adapter); + IN PADAPTER Adapter); typedef VOID (*NicCountTxStatisticsHandler)( IN PADAPTER Adapter, IN PRT_TCB pTcb - + ); typedef BOOLEAN @@ -2371,13 +2371,13 @@ typedef BOOLEAN IN PDM_ODM_T pDM_Odm //IN PADAPTER Adapter ); - + typedef BOOLEAN (*NicPathDivCheckBeforeLink)( IN PDM_ODM_T pDM_Odm //IN PADAPTER Adapter ); - + typedef VOID (*NicHalSetCTSDynamicBWSelectHandler)( IN PADAPTER Adapter, @@ -2438,11 +2438,11 @@ typedef struct _HAL_INTERFACE{ // Capability. BOOLEAN bSupportTbttNotification; // TRUE if the H/W can notify S/W before TBTT. - + // CCX supported version u1Byte CcxVerSupported; // 0: means not support CCX, > 0: are the version of CCX supported by this IC. - // WLAN Device operations. + // WLAN Device operations. NicGetEEPROMSizeHandler GetEEPROMSizeHandler; NicReadAdapterInfoHandler ReadAdapterInfoHandler; @@ -2454,7 +2454,7 @@ typedef struct _HAL_INTERFACE{ NicInitializeAdapterHandler InitializeAdapterHandler; NicHalUpdateDefaultSettingHandler HalUpdateDefaultSettingHandler; NicHalIntUpdateDefSetHandler HalIntUpdateDefSetHandler; - + NicHaltAdapterHandler HaltAdapterHandler; NicShutdownAdapterHandler ShutdownHandler; NicSleepAdapterHandler SleepAdapterHandler; @@ -2466,9 +2466,9 @@ typedef struct _HAL_INTERFACE{ NicSetHalDefVarHandler SetHalDefVarHandler; NicGetInterruptHandler GetInterruptHandler; - + NicGetHwRateFromMRateHandler GetHwRateFromMRateHandler; - + NicQueryRxDescStatusHandler QueryRxDescStatusHandler; NicTxFillDescriptorHandler TxFillDescriptorHandler; NicQueryTxDescStatusHandler QueryTxDescStatusHandler; @@ -2483,30 +2483,30 @@ typedef struct _HAL_INTERFACE{ NicSetTxPowerLevelHandler SetTxPowerLevelHandler; NicGetTxPowerLevelHandler GetTxPowerLevelHandler; NicUpdateTxPowerDbmHandler UpdateTxPowerDbmHandler; - + NicSetTxAntennaHandler SetTxAntennaHandler; NicSwAntDivCheckBeforeLink SwAntDivCheckBeforeLinkHandler; NicPathDivCheckBeforeLink PathDivCheckBeforeLinkHandler; - + NicHalSetCTSDynamicBWSelectHandler HalSetCTSDynamicBWSelectHandler; - + NicEnableHWSecurityConfigHandler EnableHWSecCfgHandler; NicDisableHWSecurityConfigHandler DisableHWSecCfgHandler; NicSetKeyHandler SetKeyHandler; - + NicAllowAllDestAddrHandler AllowAllDestAddrHandler; NicAllowErrorPacketHandler AllowErrorPacketHandler; NicSetMonitorModeHandler SetMonitorModeHandler; - NicLedControlHandler LedControlHandler; - + NicLedControlHandler LedControlHandler; + NicHalEnableRxHandler HalEnableRxHandler;//Aadded by Roger, 2007.02.12. NicHalDisableRxHandler HalDisableRxHandler;//Aadded by Roger, 2007.02.12. - + NicHalDisableTxHandler HalDisableTxHandler;//Aadded by Roger, 2009.07.08. NicHalEnableTxHandler HalEnableTxHandler;//Aadded by Roger, 2009.07.08. - + NicCountTxStatisticsHandler HalCountTxStatisticsHandler; //Add for count unicast tx bytes temp 2008-04-14 NicHalResetAllTimerHandler HalResetAllTimerHandler; @@ -2516,9 +2516,9 @@ typedef struct _HAL_INTERFACE{ NicInterruptRecognizedHandler InterruptRecognizedHandler; NicDisableInterruptHandler DisableInterruptHandler; NicClearInterruptHandler ClearInterruptHandler; - NicEnableInterruptHandler EnableInterruptHandler; - NicDumpHardwareProfileHandler DumpHardwareProfileHandler; - + NicEnableInterruptHandler EnableInterruptHandler; + NicDumpHardwareProfileHandler DumpHardwareProfileHandler; + // // Runtime D3 related function handler, added by Roger, 2013.02.05. // @@ -2526,14 +2526,14 @@ typedef struct _HAL_INTERFACE{ NicHalRTD3EnterHandler HalRTD3EnterHandler; NicHalRTD3LeaveHandler HalRTD3LeaveHandler; #endif - + // HW function NicHalSetRsvdPageBndyHandler HalSetRsvdPageBndyHandler; NicHalDownloadRsvdPageHandler HalDownloadRsvdPageHandler; NicHalGetAOACReportHandler HalGetAOACReportHandler; NicHalDropRxFIFOHandler HalDropRxFIFOHandler; - + // // Bus specific operations. // @@ -2562,7 +2562,7 @@ typedef struct _HAL_INTERFACE{ NICUpdateHalRAMaskHandler UpdateHalRAMaskHandler; NICResetHalRAMaskHandler ResetHalRAMaskHandler; NICRAPostActionHandler RAPostActionHandler; - + NICUpdateLPSStatusHandler UpdateLPSStatusHandler; NICUpdateIPSStatusHandler UpdateIPSStatusHandler; NICSetBWModeHandler SetBWModeHandler; @@ -2571,7 +2571,7 @@ typedef struct _HAL_INTERFACE{ NicRxCommandPacketHandler RxCommandPacketHandler; NicCheckHWStopHandler TxCheckStuckHandler; NicCheckHWStopHandler RxCheckStuckHandler; - NicTxFillCmdDescHandler TxFillCmdDescHandler; + NicTxFillCmdDescHandler TxFillCmdDescHandler; NicGetNmodeSupportBySecCfgHandler GetNmodeSupportBySecCfgHandler; NicGetNmodeSupportBySWSecHandler GetNmodeSupportBySWSecHandler; NicScanOperationBackupHandler ScanOperationBackupHandler; @@ -2625,7 +2625,7 @@ Hal_PauseTx( // typedef enum _SIGNAL_STRENGTH_POLICY{ SIGNAL_STRENGTH_SCALE_FINE = 0, - SIGNAL_STRENGTH_SCALE_NORMAL = 1, + SIGNAL_STRENGTH_SCALE_NORMAL = 1, }SIGNAL_STRENGTH_POLICY; typedef enum _InitialGainOpType{ @@ -2639,17 +2639,17 @@ typedef enum _VERSION_8192C{ VERSION_TEST_CHIP_88C = 0x0000, VERSION_TEST_CHIP_92C = 0x0020, VERSION_TEST_UMC_CHIP_8723A = 0x0081, - VERSION_NORMAL_TSMC_CHIP_88C = 0x0008, + VERSION_NORMAL_TSMC_CHIP_88C = 0x0008, VERSION_NORMAL_TSMC_CHIP_92C = 0x0028, VERSION_NORMAL_TSMC_CHIP_92C_1T2R = 0x0018, VERSION_NORMAL_UMC_CHIP_88C_A_CUT = 0x0088, VERSION_NORMAL_UMC_CHIP_92C_A_CUT = 0x00a8, - VERSION_NORMAL_UMC_CHIP_92C_1T2R_A_CUT = 0x0098, + VERSION_NORMAL_UMC_CHIP_92C_1T2R_A_CUT = 0x0098, VERSION_NORMAL_UMC_CHIP_8723A_1T1R_A_CUT = 0x0089, - VERSION_NORMAL_UMC_CHIP_8723A_1T1R_B_CUT = 0x1089, - VERSION_NORMAL_UMC_CHIP_88C_B_CUT = 0x1088, - VERSION_NORMAL_UMC_CHIP_92C_B_CUT = 0x10a8, - VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT = 0x1090, + VERSION_NORMAL_UMC_CHIP_8723A_1T1R_B_CUT = 0x1089, + VERSION_NORMAL_UMC_CHIP_88C_B_CUT = 0x1088, + VERSION_NORMAL_UMC_CHIP_92C_B_CUT = 0x10a8, + VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT = 0x1090, VERSION_TEST_CHIP_92D_SINGLEPHY= 0x0022, VERSION_TEST_CHIP_92D_DUALPHY = 0x0002, VERSION_NORMAL_CHIP_92D_SINGLEPHY= 0x002a, @@ -2671,7 +2671,7 @@ typedef enum _VERSION_8192C{ VERSION_NORMAL_TSMC_CHIP_8821_B_CUT = 0x100d, VERSION_NORMAL_TSMC_CHIP_8821_C_CUT = 0x200d, VERSION_TEST_CHIP_1T1R_8723B = 0x0106, - VERSION_NORMAL_SMIC_CHIP_1T1R_8723B = 0x010E, + VERSION_NORMAL_SMIC_CHIP_1T1R_8723B = 0x010E, VERSION_NORMAL_SMIC_CHIP_1T1R_8723B_B_CUT = 0x110E, VERSION_NORMAL_SMIC_CHIP_1T1R_8723B_D_CUT = 0x310E, VERSION_NORMAL_SMIC_CHIP_1T1R_8723B_F_CUT = 0x410E, @@ -2690,10 +2690,10 @@ typedef enum _VERSION_8192C{ VERSION_NORMAL_TSMC_CHIP_1T1R_8821B = 0x00010009, VERSION_NORMAL_SMIC_CHIP_1T1R_8821B = 0x00011009, VERSION_NORMAL_UMC_CHIP_1T1R_8821B = 0x00012009, - + /* 8822B series */ VERSION_NORMAL_SMIC_CHIP_1T1R_8822B = 0x0001100A, - VERSION_NORMAL_SMIC_CHIP_2T2R_8822B = 0x0001100A, + VERSION_NORMAL_SMIC_CHIP_2T2R_8822B = 0x0001100A, /* 8703B series */ VERSION_NORMAL_SMIC_CHIP_1T1R_8703B = 0x0001200B, @@ -2711,7 +2711,7 @@ typedef enum _VERSION_CVID{ #define CHANNEL_MAX_NUMBER 14+24+21 // 14 + 24 + 14 + 7 #define CHANNEL_MAX_NUMBER_2G 14 #define CHANNEL_MAX_NUMBER_5G 49 // 28 + 14 + 7 = 49 -#define CHANNEL_MAX_NUMBER_5G_80M 7 +#define CHANNEL_MAX_NUMBER_5G_80M 7 #define CHANNEL_GROUP_MAX 3+9 // ch1~3, ch4~9, ch10~14 total three groups #define MAX_PG_GROUP 13 @@ -2722,12 +2722,12 @@ HAL_CmnInitPGData( IN PADAPTER Adapter ); -VOID +VOID HAL_DiffTXDummyLen( IN PADAPTER Adapter ); -VOID +VOID HAL_DiffTXRXLen( IN PADAPTER Adapter ); @@ -2737,7 +2737,7 @@ HAL_ReadTypeIDbyEfuse( IN PADAPTER Adapter ); -RT_STATUS +RT_STATUS HAL_ReadTypeID( IN PADAPTER Adapter ); @@ -2797,7 +2797,7 @@ HAL_SetTxPowerForAllRate( IN ULONG ulTxPowerData ); -VOID +VOID HAL_ReadCloudKey_Ex( IN PADAPTER Adapter, IN u1Byte Length, @@ -2861,7 +2861,7 @@ BOOLEAN HAL_IsOld8051Series( IN PADAPTER Adapter ); - + VOID EXhalcommon_CheckHang( IN PADAPTER Adapter @@ -2962,7 +2962,7 @@ typedef struct _Path_Diversity_ u1Byte Timer; u1Byte PathDiv_NoLink_State; u1Byte CCKPathDivEnable; - + }PD_T, *pPD_T; @@ -3057,7 +3057,7 @@ typedef struct _HW_REG_DEFINE{ u4Byte byteNum; } HW_REG_DEFINE, *PHW_REG_DEFINE; -typedef struct _HW_REG_PREACTION{ +typedef struct _HW_REG_PREACTION{ u4Byte writeRegOffset; u4Byte byteNum; u4Byte bitMask; diff --git a/network/wlan/WDI/HEADER/HashTable.h b/network/wlan/WDI/HEADER/HashTable.h index 67fcceda3..a0998adb2 100644 --- a/network/wlan/WDI/HEADER/HashTable.h +++ b/network/wlan/WDI/HEADER/HashTable.h @@ -6,15 +6,15 @@ // Generic hash table for kernel mode module. // // Note: -// 1. Memory allocation is a issue on kernel space for calling context -// and computation time limitation. So we don't re-hash the table even -// it is full. In short, this implementation is not a perfect hash, -// however, if user has a good guess on hash table usage to prevent -// full and colission condition, this implementation is still a +// 1. Memory allocation is a issue on kernel space for calling context +// and computation time limitation. So we don't re-hash the table even +// it is full. In short, this implementation is not a perfect hash, +// however, if user has a good guess on hash table usage to prevent +// full and colission condition, this implementation is still a // constant time on put, remove, and get operations. // -// 2. This implementation is not thread-safe, that is, user have to -// protect related resource and the function exported here by their +// 2. This implementation is not thread-safe, that is, user have to +// protect related resource and the function exported here by their // own means. // // 070606, by rcnjko. @@ -39,7 +39,7 @@ typedef unsigned int // Definition of a hash entry of an value object. // typedef struct _RT_HASH_ENTRY{ - RT_LIST_ENTRY BusyLink; // For list of all value objects in the hash table. + RT_LIST_ENTRY BusyLink; // For list of all value objects in the hash table. RT_LIST_ENTRY BucketLink; // For list of value objects in the same bucket. RT_SINGLE_LIST_ENTRY FreeLink; // For list of free objects in the hash table. RT_HASH_KEY Key; // Key associated. @@ -51,7 +51,7 @@ typedef struct _RT_HASH_ENTRY{ #define DECLARE_RT_HASH_ENTRY RT_HASH_ENTRY __HashEntry // -// Routines to translate from link list entry inside RT_HASH_ENTRY object +// Routines to translate from link list entry inside RT_HASH_ENTRY object // to pointer to the RT_HASH_ENTRY object. // #define RT_HASH_ENTRY_FROM_BUSY_LINK(__pBusyLink) (PRT_HASH_ENTRY)(__pBusyLink) @@ -75,10 +75,10 @@ typedef struct _RT_HASH_TABLE { // // Hash table stuff. // - RT_HT_HASH_FUNC pfHash; // Hash function. + RT_HT_HASH_FUNC pfHash; // Hash function. RT_LIST_ENTRY BusyValuesList; // List of all value object put in Buckets[]. unsigned int Capacity; // Number of Buckets[] allocated. - RT_LIST_ENTRY Buckets[1]; // Each entry accommodates value objects of the same hash result. + RT_LIST_ENTRY Buckets[1]; // Each entry accommodates value objects of the same hash result. }*RT_HASH_TABLE_HANDLE; @@ -122,7 +122,7 @@ RtGetValueFromHashTable( IN RT_HASH_KEY Key ); -#define RtGetAllValuesFromHashTable(__hHashTable) &((__hHashTable)->BusyValuesList) +#define RtGetAllValuesFromHashTable(__hHashTable) &((__hHashTable)->BusyValuesList) #endif diff --git a/network/wlan/WDI/HEADER/LinkList.h b/network/wlan/WDI/HEADER/LinkList.h index 5d096e134..a6040d3cf 100644 --- a/network/wlan/WDI/HEADER/LinkList.h +++ b/network/wlan/WDI/HEADER/LinkList.h @@ -168,7 +168,7 @@ typedef struct _RT_LIST_ENTRY { RTNextEntryList(RTForeEntryList(orgListHead)) = newListHead; \ RTForeEntryList(newListHead) = RTForeEntryList(orgListHead); \ RTInitializeListHead(orgListHead); \ -} +} #define RtEntryListForEach(__pListHead, __itEntry) \ for((__itEntry) = RTGetHeadList((__pListHead)); \ @@ -184,7 +184,7 @@ typedef struct _RT_LIST_ENTRY { ) // -// Singly linked list structure. +// Singly linked list structure. // Only used as link words. // typedef struct _RT_SINGLE_LIST_ENTRY { @@ -192,7 +192,7 @@ typedef struct _RT_SINGLE_LIST_ENTRY { } RT_SINGLE_LIST_ENTRY, *PRT_SINGLE_LIST_ENTRY; // -// Singly linked list structure. +// Singly linked list structure. // Only used as link head. // typedef struct _RT_SINGLE_LIST_HEAD { diff --git a/network/wlan/WDI/HEADER/PlatformDef.h b/network/wlan/WDI/HEADER/PlatformDef.h index a8f4fb550..1cee41608 100644 --- a/network/wlan/WDI/HEADER/PlatformDef.h +++ b/network/wlan/WDI/HEADER/PlatformDef.h @@ -14,7 +14,7 @@ typedef struct _ADAPTER ADAPTER, *PADAPTER; #define COPY_ANSI_LAST_STRING(__pDest, __MaxSize, __pSource) \ memcpy(__pDest, &(__pSource[(strlen(__pSource) > (__MaxSize - 1)) ? (strlen(__pSource) - (__MaxSize - 1)) : 0]), (strlen(__pSource) > (__MaxSize - 1)) ? (__MaxSize - 1) : strlen(__pSource) + 1) -// =================================================================================== +// =================================================================================== // Define RT_EVENT for all platform here // =================================================================================== typedef NDIS_EVENT RT_EVENT; @@ -27,7 +27,7 @@ typedef struct _ADAPTER ADAPTER, *PADAPTER; // =================================================================================== -// =================================================================================== +// =================================================================================== // Define RT_SPIN_LOCK for all platform here // =================================================================================== @@ -36,7 +36,7 @@ typedef struct _ADAPTER ADAPTER, *PADAPTER; #define PLATFORM_FREE_RT_SPINLOCK(__RtSpinLock) NdisFreeSpinLock(&(__RtSpinLock)) #define PLATFORM_ACQUIRE_RT_SPINLOCK(__RtSpinLock) NdisAcquireSpinLock(&(__RtSpinLock)) #define PLATFORM_RELEASE_RT_SPINLOCK(__RtSpinLock) NdisReleaseSpinLock(&(__RtSpinLock)) - + // =================================================================================== @@ -51,9 +51,9 @@ typedef struct _ADAPTER ADAPTER, *PADAPTER; #define PlatformEFIOWrite4Byte(_a,_b,_c) \ PlatformIOWrite4Byte(_a,WLAN_IOREG_DEVICE_ID,_b,EF4Byte(_c)) #define PlatformEFIOSyncWriteNByte(_a,_b,_c,_d) \ - PlatformIOSyncWriteNByte(_a,WLAN_IOREG_DEVICE_ID,_b,_c,_d) + PlatformIOSyncWriteNByte(_a,WLAN_IOREG_DEVICE_ID,_b,_c,_d) + - #define PlatformEFIORead1Byte(_a,_b) \ PlatformIORead1Byte(_a,WLAN_IOREG_DEVICE_ID,_b) #define PlatformEFIORead2Byte(_a,_b) \ @@ -62,7 +62,7 @@ typedef struct _ADAPTER ADAPTER, *PADAPTER; EF4Byte(PlatformIORead4Byte(_a,WLAN_IOREG_DEVICE_ID,_b)) #define PlatformEFIOReadNByte(_a,_b,_c,_d) \ PlatformIOReadNByte(_a,WLAN_IOREG_DEVICE_ID,_b,_c,_d) - + #define GET_SHARED_MEMORY_WITH_OFFSET(_src, _dest, _offset, _length) \ (_dest)->VirtualAddress=(_src)->VirtualAddress + (_offset); \ (_dest)->PhysicalAddressHigh=(_src)->PhysicalAddressHigh; \ @@ -107,7 +107,7 @@ typedef UCHAR RT_THREAD_LEVEL; #define RT_THREAD_LEVEL_DISPATCH BIT2 // -// PlatformSleepUs() will put the thread into wait queue for specified period +// PlatformSleepUs() will put the thread into wait queue for specified period // in us and OS can reschedule now. // So, we MUST make sure we are in proper context to use this function. // @@ -126,9 +126,9 @@ typedef UCHAR RT_THREAD_LEVEL; #define INTMAX_C(v) (v) #define UINTMAX_C(v) (v) - + #define i64fmt "I64" - + // Macro for getting Ibss Addition IEs. By Bruce, 2007-08-13. #define GetIbssAdditionalData(_pAdapter, _pOctetString) \ @@ -143,7 +143,7 @@ typedef UCHAR RT_THREAD_LEVEL; (_pOctetString)->Length = 0; \ } - #define GetIbssbJoinOnly( _pAdapter) (_pAdapter->pNdisCommon->dot11IbssParams.bDot11IbssJoinOnly) + #define GetIbssbJoinOnly( _pAdapter) (_pAdapter->pNdisCommon->dot11IbssParams.bDot11IbssJoinOnly) // // Note: // According to Ndis6 WDK, this default value should be "FALSE", and XP in DTM should be @@ -152,8 +152,8 @@ typedef UCHAR RT_THREAD_LEVEL; #define DEFAULT_HIDDEN_SSID (FALSE) #ifndef PCI_TYPE1_ADDRESS - #define PCI_CONF_ADDRESS 0x0CF8 // PCI Configuration Space Address - #define PCI_CONF_DATA 0x0CFC // PCI Configuration Space Data + #define PCI_CONF_ADDRESS 0x0CF8 // PCI Configuration Space Address + #define PCI_CONF_DATA 0x0CFC // PCI Configuration Space Data #endif @@ -166,14 +166,14 @@ typedef struct _RT_VALID_PAIR_BOOLEAN { BOOLEAN bVaild; BOOLEAN Data; - -} RT_VALID_PAIR_BOOLEAN, *PRT_VALID_PAIR_BOOLEAN; + +} RT_VALID_PAIR_BOOLEAN, *PRT_VALID_PAIR_BOOLEAN; typedef struct _RT_VALID_PAIR_U4BYTE { BOOLEAN bVaild; u4Byte Data; - + } RT_VALID_PAIR_U4BYTE, *PRT_VALID_PAIR_U4BYTE; // --------------------------------------------------------------------------- @@ -187,7 +187,7 @@ typedef struct _VIRTUAL_MEMORY{ PVOID Ptr; u4Byte Length; }VIRTUAL_MEMORY,*PVIRTUAL_MEMORY; - + typedef struct _PHYSICAL_MEMORY{ u4Byte AddressLow; u4Byte AddressHigh; @@ -222,12 +222,12 @@ typedef struct __RT_THREAD u1Byte Status; PVOID pPlatformExt; PVOID pContext; - RT_THREAD_CALL_BACK CallbackFunc; + RT_THREAD_CALL_BACK CallbackFunc; RT_THREAD_CALL_BACK PreTheradExitCb; u2Byte RefCnt; u2Byte ScheduleCnt; // only for debug information BOOLEAN bEventTriger; - char szID[36]; + char szID[36]; u1Byte Argc; u1Byte Argv[1]; }RT_THREAD, *PRT_THREAD; @@ -260,10 +260,10 @@ typedef struct _RT_WORK_ITEM { RT_WORKITEM_HANDLE Handle; // Platform-dependent handle for this workitem, e.g. Ndis Workitem object. PVOID Adapter; // Pointer to Adapter object. - PVOID pContext; // Parameter to passed to CallBackFunc(). + PVOID pContext; // Parameter to passed to CallBackFunc(). RT_WORKITEM_CALL_BACK CallbackFunc; // Callback function of the workitem. - u1Byte RefCount; // 0: driver is going to unload, 1: No such workitem scheduled, 2: one workitem is schedueled. - PVOID pPlatformExt; // Pointer to platform-dependent extension. + u1Byte RefCount; // 0: driver is going to unload, 1: No such workitem scheduled, 2: one workitem is schedueled. + PVOID pPlatformExt; // Pointer to platform-dependent extension. BOOLEAN bFree; char szID[36]; // An identity string of this workitem. }RT_WORK_ITEM, *PRT_WORK_ITEM; @@ -281,7 +281,7 @@ typedef enum _RT_SPINLOCK_TYPE{ RT_RM_SPINLOCK = 3, RT_CAM_SPINLOCK = 4, RT_SCAN_SPINLOCK = 5, - RT_LOG_SPINLOCK = 7, + RT_LOG_SPINLOCK = 7, RT_BW_SPINLOCK = 8, RT_CHNLOP_SPINLOCK = 9, RT_RF_OPERATE_SPINLOCK = 10, @@ -300,7 +300,7 @@ typedef enum _RT_SPINLOCK_TYPE{ RT_WAPI_OPTION_SPINLOCK=26, RT_WAPI_RX_SPINLOCK=27, - // add for 92D CCK control issue + // add for 92D CCK control issue RT_CCK_PAGEA_SPINLOCK = 28, RT_BUFFER_SPINLOCK = 29, RT_CHANNEL_AND_BANDWIDTH_SPINLOCK = 30, @@ -313,10 +313,10 @@ typedef enum _RT_SPINLOCK_TYPE{ RT_DBG_SPIN_LOCK = 37, RT_IQK_SPINLOCK = 38, RT_PENDED_OID_SPINLOCK = 39, - RT_CHNLLIST_SPINLOCK = 40, - RT_INDIC_SPINLOCK = 41, //protect indication + RT_CHNLLIST_SPINLOCK = 40, + RT_INDIC_SPINLOCK = 41, //protect indication RT_DRV_STATE_SPINLOCK = 42, - RT_RFD_SPINLOCK = 43, + RT_RFD_SPINLOCK = 43, RT_ACS_SPINLOCK = 44, // Auto Channel Switching RT_RX_REF_CNT_SPINLOCK = 45, RT_SYNC_IO_CNT_SPINLOCK = 46, @@ -459,7 +459,7 @@ PlatformAllocateMemoryWithTag( OUT PVOID *pPtr, IN u4Byte length ); - + VOID PlatformFreeMemory( IN PVOID ptr, @@ -478,7 +478,7 @@ PlatformAllocateMemoryWithZero( #define PlatformAllocateMemory(__Adapter, __Ptr, __Len) \ PlatformAllocateMemoryWithTag(__Adapter, GenTag(__FUNCTION__), __Ptr, __Len) #define PlatformFreeMemory(ptr, length) \ - PlatformFreeMemory(ptr, length) + PlatformFreeMemory(ptr, length) #define PlatformAllocateMemoryWithZero(__Adapter, __Ptr, __Len) \ PlatformAllocateMemoryWithZero(__Adapter, __Ptr, __Len) @@ -580,7 +580,7 @@ VOID PlatformInitializeTimer( PVOID Adapter, PRT_TIMER pTimer, - RT_TIMER_CALL_BACK CallBackFunc, + RT_TIMER_CALL_BACK CallBackFunc, PVOID pContext, const char* szID ); @@ -611,7 +611,7 @@ PlatformReleaseTimer( PVOID Adapter, PRT_TIMER pTimer ); - + BOOLEAN PlatformSuspendTimer( IN PVOID Adapter, @@ -622,7 +622,7 @@ BOOLEAN PlatformResumeTimer( IN PVOID Adapter, IN PRT_TIMER pTimer - ); + ); RT_STATUS PlatformInitializeWorkItem( @@ -648,7 +648,7 @@ PlatformFreeWorkItem( PRT_WORK_ITEM pRtWorkItem ); -BOOLEAN +BOOLEAN PlatformScheduleWorkItem( PRT_WORK_ITEM pRtWorkItem ); @@ -657,7 +657,7 @@ VOID PlatformLeaveCallbackOfWorkItem( PRT_WORK_ITEM pRtWorkItem ); - + BOOLEAN PlatformIsWorkItemScheduled( PRT_WORK_ITEM pRtWorkItem @@ -874,7 +874,7 @@ PlatformResetPciSpace( IN PADAPTER Adapter, IN u1Byte Value ); - + BOOLEAN PlatformSwitchClkReq( IN PADAPTER Adapter, @@ -893,13 +893,13 @@ PlatformSetPciConfiguration( ); -VOID +VOID PlatformBackupPciCfgSpaceReg( IN PADAPTER Adapter ); -VOID +VOID PlatformRestorePciCfgSpaceReg( IN PADAPTER Adapter ); @@ -930,12 +930,12 @@ PlatformEnable92CEDMA64( VOID PlatformSetPciPMEEnable( - IN PADAPTER Adapter + IN PADAPTER Adapter ); VOID PlatformClearPciPMEStatus( - IN PADAPTER Adapter + IN PADAPTER Adapter ); u4Byte @@ -1007,7 +1007,7 @@ RT_STATUS PlatformInitializeThread( IN PADAPTER Adapter, IN PRT_THREAD pRtThread, - IN RT_THREAD_CALL_BACK CallBackFunc, + IN RT_THREAD_CALL_BACK CallBackFunc, IN const char* szID, IN BOOLEAN EventTriger, IN u4Byte Period, @@ -1018,7 +1018,7 @@ RT_STATUS PlatformInitializeThreadEx( IN PADAPTER Adapter, IN PRT_THREAD pRtThread, - IN RT_THREAD_CALL_BACK CallBackFunc, + IN RT_THREAD_CALL_BACK CallBackFunc, IN RT_THREAD_CALL_BACK PreThreadExitCb, IN const char* szID, IN BOOLEAN EventTriger, @@ -1068,23 +1068,23 @@ PlatformReleaseThread( #define SEMA_UPBND (0x7FFFFFFF) VOID -PlatformInitializeSemaphore( +PlatformInitializeSemaphore( IN PPlatformSemaphore Sema, IN u4Byte InitCnt ); RT_STATUS -PlatformAcquireSemaphore( +PlatformAcquireSemaphore( IN PPlatformSemaphore Sema ); VOID -PlatformReleaseSemaphore( +PlatformReleaseSemaphore( IN PPlatformSemaphore Sema ); VOID -PlatformFreeSemaphore( +PlatformFreeSemaphore( IN PPlatformSemaphore Sema ); @@ -1114,8 +1114,8 @@ PlatformInitReady( // -// The following Export SDIO Commands are for IO_RW_DIRECT Command (CMD52) -// and IO_RW_EXTENDED Command (CMD53) to read or write +// The following Export SDIO Commands are for IO_RW_DIRECT Command (CMD52) +// and IO_RW_EXTENDED Command (CMD53) to read or write // corresponding offset and data for specific device ID. // 2010.12.23. // @@ -1161,7 +1161,7 @@ PlatformInitReady( PlatformSdioCmd52Write2Byte(_a,SDIO_LOCAL_DEVICE_ID,1,_b,EF2Byte(_c)) #define PlatformEFSdioLocalCmd52Write4Byte(_a,_b,_c) \ PlatformSdioCmd52Write4Byte(_a,SDIO_LOCAL_DEVICE_ID,1,_b,EF4Byte(_c)) - + // // Use CMD53 to perform SDIO Local I/O Bus domain Read/Write for Function 1 space. // We will NOT use CMD53 to access SDIO Function 0 space. @@ -1180,7 +1180,7 @@ PlatformInitReady( PlatformEFSdioCmd53Write2Byte(_a,SDIO_LOCAL_DEVICE_ID,_b,EF2Byte(_c)) #define PlatformEFSdioLocalCmd53Write4Byte(_a,_b,_c) \ PlatformEFSdioCmd53Write4Byte(_a,SDIO_LOCAL_DEVICE_ID,_b,EF4Byte(_c)) - + //20130422 KaiYuan add for 8814 available page read #define PlatformEFMacLocalCmd53ReadNByte(_a,_b,_c,_d) \ PlatformEFSdioCmd53ReadNByte(_a,WLAN_IOREG_DEVICE_ID,_b,_c,_d) @@ -1241,7 +1241,7 @@ PlatformSdioCmd52Write4Byte( // For P2P Platform-dependant Indication ------------------------------------ VOID PlatformIndicateP2PEvent( - PVOID pvP2PInfo, + PVOID pvP2PInfo, u4Byte EventID, PMEMORY_BUFFER pInformation ); diff --git a/network/wlan/WDI/HEADER/PlatformSdio.h b/network/wlan/WDI/HEADER/PlatformSdio.h index 3ea246486..41757bb0c 100644 --- a/network/wlan/WDI/HEADER/PlatformSdio.h +++ b/network/wlan/WDI/HEADER/PlatformSdio.h @@ -6,17 +6,17 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: PlatformSdio.h - + Abstract: - Prototype of PlatformSdioXXX(). - Each platform shall implement the functions exported in + Prototype of PlatformSdioXXX(). + Each platform shall implement the functions exported in this file. - + Major Change History: When Who What - ---------- --------------- ------------------------------- + ---------- --------------- ------------------------------- 2010-12-20 Roger Create. - + --*/ //================================================================================ @@ -30,13 +30,13 @@ Major Change History: // // Bulk IN. // -BOOLEAN +BOOLEAN PlatformSdioInitInContext( IN PADAPTER pAdapter, IN PSDIO_IN_CONTEXT pContext ); -VOID +VOID PlatformSdioDeInitInContext( IN PADAPTER pAdapter, IN PSDIO_IN_CONTEXT pContext @@ -46,13 +46,13 @@ PlatformSdioDeInitInContext( // // SDIO Tx Transfer // -BOOLEAN +BOOLEAN PlatformSdioInitTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext ); -VOID +VOID PlatformSdioDeInitTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext diff --git a/network/wlan/WDI/HEADER/Precomp.h b/network/wlan/WDI/HEADER/Precomp.h index 9cc1195b2..79704388e 100644 --- a/network/wlan/WDI/HEADER/Precomp.h +++ b/network/wlan/WDI/HEADER/Precomp.h @@ -8,7 +8,7 @@ // #define OS_VERSION // //=====================================================================================// #include "GeneralDef.h" // Define the RT_PLATFORM and the OS_VERSION values -#include "platform-os-version.h" +#include "platform-os-version.h" #define WPP_SOFTWARE_TRACE 1 #define SOFTWARE_TRACE_LOGGING 1 @@ -23,7 +23,7 @@ // Statistic -#define STATISTIC_SUPPORT 1 // counter caculate. +#define STATISTIC_SUPPORT 1 // counter caculate. // Auto Channel Select by NHM statistic #define AUTO_CHNL_SEL_NHM 1 @@ -55,9 +55,9 @@ #define MUTIPLE_BULK_OUT #define TX_AGGREGATION 1 // For Tx Aggregation -#define RX_AGGREGATION 1 // For Rx Aggregation +#define RX_AGGREGATION 1 // For Rx Aggregation -#define RTL8723_SDIO_IO_THREAD_ENABLE 1 +#define RTL8723_SDIO_IO_THREAD_ENABLE 1 #define MULTIPORT_SUPPORT 1 diff --git a/network/wlan/WDI/HEADER/Precomp.h.WlanS.sample b/network/wlan/WDI/HEADER/Precomp.h.WlanS.sample index 060d9e3fe..c1ee30c67 100644 --- a/network/wlan/WDI/HEADER/Precomp.h.WlanS.sample +++ b/network/wlan/WDI/HEADER/Precomp.h.WlanS.sample @@ -8,7 +8,7 @@ // #define OS_VERSION // //=====================================================================================// #include "GeneralDef.h" // Define the RT_PLATFORM and the OS_VERSION values -#include "platform-os-version.h" +#include "platform-os-version.h" #define WPP_SOFTWARE_TRACE 1 #define SOFTWARE_TRACE_LOGGING 1 @@ -23,7 +23,7 @@ // Statistic -#define STATISTIC_SUPPORT 1 // counter caculate. +#define STATISTIC_SUPPORT 1 // counter caculate. // Auto Channel Select by NHM statistic #define AUTO_CHNL_SEL_NHM 1 @@ -53,9 +53,9 @@ #define MUTIPLE_BULK_OUT #define TX_AGGREGATION 1 // For Tx Aggregation -#define RX_AGGREGATION 1 // For Rx Aggregation +#define RX_AGGREGATION 1 // For Rx Aggregation -#define RTL8723_SDIO_IO_THREAD_ENABLE 1 +#define RTL8723_SDIO_IO_THREAD_ENABLE 1 #define MULTIPORT_SUPPORT 1 diff --git a/network/wlan/WDI/HEADER/PrecompInc_sample.h b/network/wlan/WDI/HEADER/PrecompInc_sample.h index f4419080b..f48610758 100644 --- a/network/wlan/WDI/HEADER/PrecompInc_sample.h +++ b/network/wlan/WDI/HEADER/PrecompInc_sample.h @@ -6,9 +6,9 @@ Module Name: PrecompInc.h Abstract: - Header fils to include. Note that, this file is only intend to + Header fils to include. Note that, this file is only intend to be included by Precomp.h - + Major Change History: When Who What ---------- ------ ---------------------------------------------- @@ -49,7 +49,7 @@ Major Change History: #include "HashTable.h" -//Isaiah for MacOS +//Isaiah for MacOS #ifndef _MACHINE_ENDIAN_H #define __MACHINE_LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ #define __MACHINE_BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net, ppc */ @@ -62,11 +62,11 @@ Major Change History: // // Platform dependent header files. -// +// #ifndef BYTE_ORDER #define BYTE_ORDER __MACHINE_LITTLE_ENDIAN #endif - + #define USE_WORKITEM 1 // This flag shall only be turned on for DTM testing. @@ -80,10 +80,10 @@ Major Change History: #define POWER_MAN 1 // - // For SDIO compilation consideration, we should incluede system initguid.h header first before ntddsd.h is included + // For SDIO compilation consideration, we should incluede system initguid.h header first before ntddsd.h is included // to prevent unresolved external symbol _GUID_SDBUS_INTERFACE_STANDARD error occurs in linking process. // 2012.01.17. - // + // #include #include #include @@ -121,7 +121,7 @@ Major Change History: #include "WDI_Common.h" #include "ntintsafe.h" - #include "N62C_def.h" + #include "N62C_def.h" #include "N62C_Init.h" #include "N62C_Port.h" #include "N62C_QueryOid.h" @@ -130,11 +130,11 @@ Major Change History: #include "N62C_QuerySetOid.h" #include "N62C_AP_Def.h" #include "N62C_AP.h" - + #include "N63C_SendAction.h" #include "N63C_Oids.h" - - + + #include "WDI_def.h" #include "N6Sdio_WdiMain.h" #include "WDI_SendAction.h" @@ -142,9 +142,9 @@ Major Change History: #include "WDI_Extension.h" #include "WDI_Xlat.h" - + #include "Ndis_OID.h" - + #include #define MS_SUPPORT 0 @@ -318,7 +318,7 @@ Major Change History: // For ODM structure, we need to move HAL interace.h to lower position. Because // it need to use odm structure declared in odm.h // - + #include "PlatformSdio.h" @@ -334,7 +334,7 @@ Major Change History: #include "HalPhyRf_WIN.h" //#include "HalPhyRf_8188e_WIN.h" -//#include "HalPhyRf_8812A_WIN.h" +//#include "HalPhyRf_8812A_WIN.h" //#include "HalPhyRf_8821A_WIN.h" //#include "HalPhyRf_8821B.h" //#include "HalPhyRf_8192e_WIN.h" diff --git a/network/wlan/WDI/HEADER/QoSType.h b/network/wlan/WDI/HEADER/QoSType.h index 1229305f9..720e707c6 100644 --- a/network/wlan/WDI/HEADER/QoSType.h +++ b/network/wlan/WDI/HEADER/QoSType.h @@ -10,7 +10,7 @@ typedef u4Byte QOS_MODE, *PQOS_MODE; #define QOS_WMMSA 2 #define QOS_EDCA 4 #define QOS_HCCA 8 -#define QOS_WMM_UAPSD 16 //WMM Power Save, 2006-06-14 Isaiah +#define QOS_WMM_UAPSD 16 //WMM Power Save, 2006-06-14 Isaiah #define WMM_PARAM_ELE_BODY_LEN 18 @@ -125,13 +125,13 @@ typedef enum _ACK_POLICY{ #define GET_WMM_QOS_INFO_FIELD_STA_AC_BE_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 2, 1) #define SET_WMM_QOS_INFO_FIELD_STA_AC_BE_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 2, 1, _val) - + #define GET_WMM_QOS_INFO_FIELD_STA_AC_BK_UAPSD(_pStart) LE_BITS_TO_1BYTE(_pStart, 3, 1) #define SET_WMM_QOS_INFO_FIELD_STA_AC_BK_UAPSD(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 3, 1, _val) #define GET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(_pStart) LE_BITS_TO_1BYTE(_pStart, 5, 2) #define SET_WMM_QOS_INFO_FIELD_STA_MAX_SP_LEN(_pStart, _val) SET_BITS_TO_LE_1BYTE(_pStart, 5, 2, _val) - + #define WMM_INFO_ELEMENT_SIZE 7 @@ -295,7 +295,7 @@ typedef enum _ACK_POLICY{ #define QOS_RATE_TO_BPS(_rate) ( (u4Byte)( ((_rate)*1000*1000)/2 ) ) -#define QOS_BPS_TO_RATE(_bps) ( (u1Byte)( ((_bps) * 2)/(1000*1000))) +#define QOS_BPS_TO_RATE(_bps) ( (u1Byte)( ((_bps) * 2)/(1000*1000))) @@ -315,7 +315,7 @@ typedef u4Byte AC_CODING; #define AC3_VO 3 // ACI: 0x11 // Voice #define AC_MAX 4 // Max: define total number; Should not to be used as a real enum. - + #define AC_PARAM_SIZE 4 #define GET_WMM_AC_PARAM_AIFSN(_pStart) ( (u1Byte)LE_BITS_TO_4BYTE(_pStart, 0, 4) ) @@ -422,7 +422,7 @@ typedef enum _DIRECTION_VALUE{ #define GET_TSPEC_BODY_TSINFO_AGGREGATION(_TSpecBody) LE_BITS_TO_1BYTE( (_TSpecBody)+1, 1, 1) #define SET_TSPEC_BODY_TSINFO_AGGREGATION(_TSpecBody, _value) SET_BITS_TO_LE_1BYTE( (_TSpecBody)+1, 1, 1 , (_value)) - + #define GET_TSPEC_BODY_TSINFO_PSB(_TSpecBody) LE_BITS_TO_1BYTE( (_TSpecBody)+1, 2, 1) #define SET_TSPEC_BODY_TSINFO_PSB(_TSpecBody, _value) SET_BITS_TO_LE_1BYTE( (_TSpecBody)+1, 2, 1 , (_value)) @@ -479,25 +479,25 @@ typedef u1Byte AC_UAPSD, *PAC_UAPSD; #define GET_VO_UAPSD(_apsd) ((_apsd) & BIT0) #define SET_VO_UAPSD(_apsd) ((_apsd) |= BIT0) - + #define GET_VI_UAPSD(_apsd) ((_apsd) & BIT1) #define SET_VI_UAPSD(_apsd) ((_apsd) |= BIT1) - + #define GET_BK_UAPSD(_apsd) ((_apsd) & BIT2) #define SET_BK_UAPSD(_apsd) ((_apsd) |= BIT2) #define GET_BE_UAPSD(_apsd) ((_apsd) & BIT3) #define SET_BE_UAPSD(_apsd) ((_apsd) |= BIT3) - + typedef u1Byte AC_NOACK, *PAC_NOACK; // Maps of AC NoAck and Bits #define GET_VO_NOACK(_AC) ((_AC) & BIT0) #define SET_VO_NOACK(_AC) ((_AC) |= BIT0) - + #define GET_VI_NOACK(_AC) ((_AC) & BIT1) #define SET_VI_NOACK(_AC) ((_AC) |= BIT1) - + #define GET_BK_NOACK(_AC) ((_AC) & BIT2) #define SET_BK_NOACK(_AC) ((_AC) |= BIT2) @@ -512,7 +512,7 @@ typedef u1Byte AC_NOACK, *PAC_NOACK; (0 == (_UP) || 3 == (_UP)) ? BIT3 : 0) #ifdef REMOVE_PACK -#pragma pack(1) +#pragma pack(1) #endif //typedef struct _TCLASS{ @@ -570,7 +570,7 @@ typedef union _QOS_TCLAS{ } QOS_TCLAS, *PQOS_TCLAS; #ifdef REMOVE_PACK -#pragma pack() +#pragma pack() #endif // @@ -606,19 +606,19 @@ typedef struct _STA_QOS{ OCTET_STRING WMMIE; // Part 1. Self QoS Mode. - QOS_MODE QosCapability; //QoS Capability, 2006-06-14 Isaiah + QOS_MODE QosCapability; //QoS Capability, 2006-06-14 Isaiah QOS_MODE QosCapabilityBackup; //QoS CapabilityBackup QOS_MODE CurrentQosMode; - // For WMM Power Save Mode : + // For WMM Power Save Mode : // ACs are trigger/delivery enabled or legacy power save enabled. 2006-06-13 Isaiah AC_UAPSD b4ac_Uapsd; //VoUapsd(bit0), ViUapsd(bit1), BkUapsd(bit2), BeUapsd(bit3), AC_UAPSD Curr4acUapsd; BOOLEAN bInServicePeriod; BOOLEAN bWmmMoreData; // Mark as the final trigger-enabled qos data from the AP. u1Byte MaxSPLength; - + // Part 2. EDCA Parameter (perAC) pu1Byte pWMMInfoEle; u1Byte WMMParamEle[WMM_PARAM_ELEMENT_SIZE]; @@ -631,10 +631,10 @@ typedef struct _STA_QOS{ // Part 4. Per TID (Part 5: TCLASS will be described by TStream) QOS_TSTREAM StaTsArray[MAX_STA_TS_COUNT]; // Traffic Stream objects for STA mode. - RT_HASH_TABLE_HANDLE hApTsTable; // Traffic Stream objects for AP mode. + RT_HASH_TABLE_HANDLE hApTsTable; // Traffic Stream objects for AP mode. u1Byte DialogToken; WMM_TSPEC TSpec; - + u1Byte QBssWirelessMode; // No Ack Setting diff --git a/network/wlan/WDI/HEADER/RegCommon.h b/network/wlan/WDI/HEADER/RegCommon.h index 7d93fda7e..ecf51c4ee 100644 --- a/network/wlan/WDI/HEADER/RegCommon.h +++ b/network/wlan/WDI/HEADER/RegCommon.h @@ -2,25 +2,25 @@ (c) Copyright 2007, RealTEK Technologies Inc. All Rights Reserved. - Module: RegCommon.h + Module: RegCommon.h Note: The file define the initiali registry value cross the following platform (1) NDIS5 (2) NDIS6 (3) MAC OS - + Function: - + Export: Abbrev: History: Data Who Remark - + 05/0r/2007 Emily Create initial version. - + ******************************************************************************/ #ifndef __INC_REGCOMMON_H @@ -41,19 +41,19 @@ NDIS_STRING DefaultPairingKey = NDIS_STRING_CONST("12345678"); NDIS_STRING DefaultFileName = NDIS_STRING_CONST(""); NDIS_STRING gChannelPlan2G = NDIS_STRING_CONST("1,2,3,4,5,6,7,8,9,10,11,12,13,14"); - NDIS_STRING gChannelPlan5G = NDIS_STRING_CONST("36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165"); + NDIS_STRING gChannelPlan5G = NDIS_STRING_CONST("36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165"); #define REGISTRY_STR NDIS_STRING_CONST #define REGISTRY_OFFSET(field) ((u4Byte)FIELD_OFFSET(RT_NDIS_COMMON,field)) #define REGISTRY_SIZE(field) sizeof(((PRT_NDIS_COMMON)0)->field) - + static MP_REG_ENTRY CommonRegTable[] = { // Registry value name Type Offset in MP_ADAPTER Field size Default Value Min Max {REGISTRY_STR("NetworkAddress"), 0,NdisParameterInteger, REGISTRY_OFFSET(NetworkAddress), REGISTRY_SIZE(NetworkAddress), 0xFF, 0, 0xFF}, {REGISTRY_STR("SSID"), 0,NdisParameterString, REGISTRY_OFFSET(RegSSID), REGISTRY_SIZE(RegSSID), (ADDR2DATA)&DefaultSSID,0, 32}, - {REGISTRY_STR("Bssid"), 0,NdisParameterString, REGISTRY_OFFSET(RegBssidBuf), REGISTRY_SIZE(RegBssidBuf), 0, 0, 13}, + {REGISTRY_STR("Bssid"), 0,NdisParameterString, REGISTRY_OFFSET(RegBssidBuf), REGISTRY_SIZE(RegBssidBuf), 0, 0, 13}, {REGISTRY_STR("Locale"), 0,NdisParameterString, REGISTRY_OFFSET(RegLocale), REGISTRY_SIZE(RegLocale), (ADDR2DATA)&DefaultFileName, 0, 4}, {REGISTRY_STR("bConcurrentMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegConcurrent), REGISTRY_SIZE(bRegConcurrent), 0, 0, 1}, //---------------------------------------------------------------------------- @@ -62,7 +62,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- {REGISTRY_STR("ChannelPlan"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegChannelPlan), REGISTRY_SIZE(RegChannelPlan), 0x7f, 0, 0x7f}, {REGISTRY_STR("ChannelPlan2G"), 0,NdisParameterString, REGISTRY_OFFSET(RegChannelPlan2G), REGISTRY_SIZE(RegChannelPlan2G), (ADDR2DATA)&gChannelPlan2G, 0, 255}, - {REGISTRY_STR("ChannelPlan5G"), 0,NdisParameterString, REGISTRY_OFFSET(RegChannelPlan5G), REGISTRY_SIZE(RegChannelPlan5G), (ADDR2DATA)&gChannelPlan5G, 0, 255}, + {REGISTRY_STR("ChannelPlan5G"), 0,NdisParameterString, REGISTRY_OFFSET(RegChannelPlan5G), REGISTRY_SIZE(RegChannelPlan5G), (ADDR2DATA)&gChannelPlan5G, 0, 255}, {REGISTRY_STR("WirelessMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWirelessMode), REGISTRY_SIZE(RegWirelessMode), WIRELESS_MODE_AUTO, WIRELESS_MODE_A, WIRELESS_MODE_MAX}, {REGISTRY_STR("HTMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegHTMode), REGISTRY_SIZE(RegHTMode), 0, 0, 4}, {REGISTRY_STR("Channel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegChannel), REGISTRY_SIZE(RegChannel), 1, 1, 200}, @@ -72,13 +72,13 @@ static MP_REG_ENTRY CommonRegTable[] = { // Efuse value get from registry {REGISTRY_STR("bEfusePriorityAuto"), 0,NdisParameterInteger, REGISTRY_OFFSET(bEfusePriorityAuto), REGISTRY_SIZE(bEfusePriorityAuto), 1, 0, 1}, // 0: Registry-Priority Auto 1: EFUSE-Priority Auto {REGISTRY_STR("AntennaDivType"), 0,NdisParameterInteger, REGISTRY_OFFSET(AntDivType), REGISTRY_SIZE(AntDivType), 2, 1, 3}, // 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) - {REGISTRY_STR("AmplifierType2G"), 0,NdisParameterInteger, REGISTRY_OFFSET(AmplifierType_2G), REGISTRY_SIZE(AmplifierType_2G), 0, 0, 24}, + {REGISTRY_STR("AmplifierType2G"), 0,NdisParameterInteger, REGISTRY_OFFSET(AmplifierType_2G), REGISTRY_SIZE(AmplifierType_2G), 0, 0, 24}, {REGISTRY_STR("AmplifierType5G"), 0,NdisParameterInteger, REGISTRY_OFFSET(AmplifierType_5G), REGISTRY_SIZE(AmplifierType_5G), 0, 0, 192}, - {REGISTRY_STR("TxBBSwing2G"), 0,NdisParameterInteger, REGISTRY_OFFSET(TxBBSwing_2G), REGISTRY_SIZE(TxBBSwing_2G), 0, 0, 9}, + {REGISTRY_STR("TxBBSwing2G"), 0,NdisParameterInteger, REGISTRY_OFFSET(TxBBSwing_2G), REGISTRY_SIZE(TxBBSwing_2G), 0, 0, 9}, {REGISTRY_STR("TxBBSwing5G"), 0,NdisParameterInteger, REGISTRY_OFFSET(TxBBSwing_5G), REGISTRY_SIZE(TxBBSwing_5G), 0, 0, 9}, - {REGISTRY_STR("bTurnOffEfuseMask"), 0,NdisParameterInteger, REGISTRY_OFFSET(bTurnOffEfuseMask), REGISTRY_SIZE(bTurnOffEfuseMask), 0, 0, 1}, // 0: EFUSE Mask ON 1: EFUSE Mask OFF + {REGISTRY_STR("bTurnOffEfuseMask"), 0,NdisParameterInteger, REGISTRY_OFFSET(bTurnOffEfuseMask), REGISTRY_SIZE(bTurnOffEfuseMask), 0, 0, 1}, // 0: EFUSE Mask ON 1: EFUSE Mask OFF {REGISTRY_STR("RFEType"), 0,NdisParameterInteger, REGISTRY_OFFSET(RFE_Type), REGISTRY_SIZE(RFE_Type), 64, 0, 64}, // 0-4: User define RFE Type 64: Efuse define RFE Type - {REGISTRY_STR("bTFBGA"), 0,NdisParameterInteger, REGISTRY_OFFSET(bTFBGA), REGISTRY_SIZE(bTFBGA), 0, 0, 1}, // 0: Others(e.g., QFN) 1: TFBGA + {REGISTRY_STR("bTFBGA"), 0,NdisParameterInteger, REGISTRY_OFFSET(bTFBGA), REGISTRY_SIZE(bTFBGA), 0, 0, 1}, // 0: Others(e.g., QFN) 1: TFBGA //---------------------------------------------------------------------------- // For Sercomm UI, 2005.01.13, by rcnjko. @@ -102,11 +102,11 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("DefaultKeyId"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDefaultKeyId), REGISTRY_SIZE(RegDefaultKeyId), 0, 0, 3}, {REGISTRY_STR("NetworkType"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegNetworkType), REGISTRY_SIZE(RegNetworkType), NI_Infrastructure, NI_ADHOC, NI_AUTO}, //---------------------------------------------------------------------------- - // For pre-authentication default setting. By Annie. + // For pre-authentication default setting. By Annie. {REGISTRY_STR("EnablePreAuth"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEnablePreAuthentication),REGISTRY_SIZE(RegEnablePreAuthentication), 1, 0, 1}, //---------------------------------------------------------------------------- // For power save mode. 2005.02.15, by rcnjko. - {REGISTRY_STR("PowerSaveMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPowerSaveMode), REGISTRY_SIZE(RegPowerSaveMode), 0, 0, 2}, // 0: Ndis802_11PowerModeCAM, 1: Ndis802_11PowerModeMAX_PSP MAX_PS 2: Ndis802_11PowerModeFast_PSP. + {REGISTRY_STR("PowerSaveMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPowerSaveMode), REGISTRY_SIZE(RegPowerSaveMode), 0, 0, 2}, // 0: Ndis802_11PowerModeCAM, 1: Ndis802_11PowerModeMAX_PSP MAX_PS 2: Ndis802_11PowerModeFast_PSP. //---------------------------------------------------------------------------- // IBSS beacon behavior. 2005.12.16, by rcnjko. {REGISTRY_STR("IbssBeacon"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEnableSwBeacon), REGISTRY_SIZE(RegEnableSwBeacon), 0, 0, 2}, // 0: BEACON_SEND_AUTO_HW, 1: BEACON_SEND_AUTO_SW, 2: BEACON_SEND_MANUAL @@ -131,9 +131,9 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("MaxSPLength"), 0,NdisParameterInteger, REGISTRY_OFFSET(MaxSPLength), REGISTRY_SIZE(MaxSPLength), 0, 0, 3}, //default 0 //---------------------------------------------------------------------------- // For CCX RM, 2006.05.15, by rcnjko. - {REGISTRY_STR("CcxEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCcx), REGISTRY_SIZE(RegCcx), 0, 0, 1}, // 1: Support CCX, 0: not support it. + {REGISTRY_STR("CcxEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCcx), REGISTRY_SIZE(RegCcx), 0, 0, 1}, // 1: Support CCX, 0: not support it. {REGISTRY_STR("CcxRm"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCcxRm), REGISTRY_SIZE(RegCcxRm), 0, 0, 1}, // 1: Support CCX Radio Measurement, 0: not support it. - {REGISTRY_STR("CcxOffLineDurUpLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCcxOffLineDurUpLimit), REGISTRY_SIZE(RegCcxOffLineDurUpLimit),0, 0, 0xffff}, // 0: Unlimited >0: Max non-serving channel measurement duration (in TU) + {REGISTRY_STR("CcxOffLineDurUpLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCcxOffLineDurUpLimit), REGISTRY_SIZE(RegCcxOffLineDurUpLimit),0, 0, 0xffff}, // 0: Unlimited >0: Max non-serving channel measurement duration (in TU) {REGISTRY_STR("CcxUpdateTxCellPwr"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCcxUpdateTxCellPwr), REGISTRY_SIZE(RegCcxUpdateTxCellPwr),0, 0, 1}, // 0: Disable, 1: Enable //---------------------------------------------------------------------------- // For CCX CAC @@ -143,7 +143,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- {REGISTRY_STR("bHwParaFile"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegHwParaFile), REGISTRY_SIZE(bRegHwParaFile), 1, 0, 2}, // 0: (Default) use parameters hardcoded, 1: read from file, 2: load default first, and then partial modify from file. //---------------------------------------------------------------------------- - + // For TX Power Level asked by Lenovo, 2009.03.06 by Mars {REGISTRY_STR("TxPowerLevel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxPowerLevel), REGISTRY_SIZE(RegTxPowerLevel), 0, 0, 4}, // 0:Default 1:25% 2:50% 3:75% 4:100% //---------------------------------------------------------------------------- @@ -160,7 +160,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // For HCT test. 061010, by rcnjko. {REGISTRY_STR("HctTest"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegHctTest), REGISTRY_SIZE(bRegHctTest), 0, 0, 1}, - {REGISTRY_STR("Chaos"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegChaos), REGISTRY_SIZE(bRegChaos), 0, 0, 1}, + {REGISTRY_STR("Chaos"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegChaos), REGISTRY_SIZE(bRegChaos), 0, 0, 1}, // For OID_GEN_VENDOR_DESCRIPTION, 2006.03.10, by rcnjko. {REGISTRY_STR("DriverDesc"), 0,NdisParameterString, REGISTRY_OFFSET(RegDriverDesc), REGISTRY_SIZE(RegDriverDesc), (ADDR2DATA)&DefaultDeviceDesc, 0, 255}, @@ -172,7 +172,7 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("TurboMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTurboModeSelect), REGISTRY_SIZE(RegTurboModeSelect), 2, 0, 2}, // 0: Disable, 1: Enable, 2: Auto Turbo by 8186 (following 8186 beacon). //---------------------------------------------------------------------------- // 070208, rcnjko: 802.11d - {REGISTRY_STR("Dot11dEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDot11dEnable), REGISTRY_SIZE(bRegDot11dEnable), 0, 0, 1}, // 0: disable, 1: enable. + {REGISTRY_STR("Dot11dEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDot11dEnable), REGISTRY_SIZE(bRegDot11dEnable), 0, 0, 1}, // 0: disable, 1: enable. //---------------------------------------------------------------------------- // For AP mode auto select channel. 2005.12.27, by rcnjko. {REGISTRY_STR("AutoSelChnl"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAutoSelChnl), REGISTRY_SIZE(RegAutoSelChnl), 0, 0, 1}, // Default: Disable. @@ -182,45 +182,45 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("LiveTime"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLiveTime), REGISTRY_SIZE(RegLiveTime), 1200, 0, 2147483647}, // in second. (Set "600" = 10 minutes, "86400" = 24hr.) //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- - // WDS, 2006.06.11, by rcnjko. - {REGISTRY_STR("WdsMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWdsMode), REGISTRY_SIZE(RegWdsMode), 0, 0, 1}, // 0: WDS disabled, 1: AP+WDS + // WDS, 2006.06.11, by rcnjko. + {REGISTRY_STR("WdsMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWdsMode), REGISTRY_SIZE(RegWdsMode), 0, 0, 1}, // 0: WDS disabled, 1: AP+WDS //---------------------------------------------------------------------------- - // CustomerID, see RT_CUSTOMER_ID for its definition. 2006.07.03, by rcnjko. - {REGISTRY_STR("CustomerID"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCustomerID), REGISTRY_SIZE(RegCustomerID), 0, 0, 0x7FFFFFFF}, // 0: allow EEPROM to determine pMgntInfo->CustomerID , >0: overwrite pMgntInfo->CustomerID. + // CustomerID, see RT_CUSTOMER_ID for its definition. 2006.07.03, by rcnjko. + {REGISTRY_STR("CustomerID"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCustomerID), REGISTRY_SIZE(RegCustomerID), 0, 0, 0x7FFFFFFF}, // 0: allow EEPROM to determine pMgntInfo->CustomerID , >0: overwrite pMgntInfo->CustomerID. //fragmentation threshold 2007.03.05 by David - {REGISTRY_STR("FragThresh"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFragThreshold), REGISTRY_SIZE(RegFragThreshold), 2347, 256, 2347}, // + {REGISTRY_STR("FragThresh"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFragThreshold), REGISTRY_SIZE(RegFragThreshold), 2347, 256, 2347}, // //---------------------------------------------------------------------------- // Default EDCA parameter for AP mode - {REGISTRY_STR("ApEDCAParamBE"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamBE), REGISTRY_SIZE(RegApEDCAParamBE), 0x00006403, 0, 0xffffffff}, - {REGISTRY_STR("ApEDCAParamBK"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamBK), REGISTRY_SIZE(RegApEDCAParamBK), 0x0000A427, 0, 0xffffffff}, - {REGISTRY_STR("ApEDCAParamVI"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamVI), REGISTRY_SIZE(RegApEDCAParamVI), 0x005E4341, 0, 0xffffffff}, - {REGISTRY_STR("ApEDCAParamVO"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamVO), REGISTRY_SIZE(RegApEDCAParamVO), 0x002F3261, 0, 0xffffffff}, + {REGISTRY_STR("ApEDCAParamBE"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamBE), REGISTRY_SIZE(RegApEDCAParamBE), 0x00006403, 0, 0xffffffff}, + {REGISTRY_STR("ApEDCAParamBK"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamBK), REGISTRY_SIZE(RegApEDCAParamBK), 0x0000A427, 0, 0xffffffff}, + {REGISTRY_STR("ApEDCAParamVI"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamVI), REGISTRY_SIZE(RegApEDCAParamVI), 0x005E4341, 0, 0xffffffff}, + {REGISTRY_STR("ApEDCAParamVO"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegApEDCAParamVO), REGISTRY_SIZE(RegApEDCAParamVO), 0x002F3261, 0, 0xffffffff}, //---------------------------------------------------------------------------- // Default EDCA parameter for STA mode - {REGISTRY_STR("StaEDCAParamBE"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamBE), REGISTRY_SIZE(RegStaEDCAParamBE), 0x0000A403, 0, 0xffffffff}, + {REGISTRY_STR("StaEDCAParamBE"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamBE), REGISTRY_SIZE(RegStaEDCAParamBE), 0x0000A403, 0, 0xffffffff}, - {REGISTRY_STR("StaEDCAParamBK"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamBK), REGISTRY_SIZE(RegStaEDCAParamBK), 0x0000A427, 0, 0xffffffff}, - {REGISTRY_STR("StaEDCAParamVI"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamVI), REGISTRY_SIZE(RegStaEDCAParamVI), 0x005E4342, 0, 0xffffffff}, + {REGISTRY_STR("StaEDCAParamBK"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamBK), REGISTRY_SIZE(RegStaEDCAParamBK), 0x0000A427, 0, 0xffffffff}, + {REGISTRY_STR("StaEDCAParamVI"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamVI), REGISTRY_SIZE(RegStaEDCAParamVI), 0x005E4342, 0, 0xffffffff}, - {REGISTRY_STR("StaEDCAParamVO"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamVO), REGISTRY_SIZE(RegStaEDCAParamVO), 0x002F3262, 0, 0xffffffff}, + {REGISTRY_STR("StaEDCAParamVO"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStaEDCAParamVO), REGISTRY_SIZE(RegStaEDCAParamVO), 0x002F3262, 0, 0xffffffff}, //---------------------------------------------------------------------------- // No Ack Setting - {REGISTRY_STR("AcNoAck"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcNoAck), REGISTRY_SIZE(RegAcNoAck), 0, 0, 0xFF}, + {REGISTRY_STR("AcNoAck"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcNoAck), REGISTRY_SIZE(RegAcNoAck), 0, 0, 0xFF}, //---------------------------------------------------------------------------- // For inactive power save feature. // If this mode is enabled, NIC will go into rf off state when disconnected. 2006.07.16, by shien chang. - {REGISTRY_STR("InactivePs"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegInactivePsMode), REGISTRY_SIZE(RegInactivePsMode), 2, 0, 2}, // 0: disable, 1: enable. + {REGISTRY_STR("InactivePs"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegInactivePsMode), REGISTRY_SIZE(RegInactivePsMode), 2, 0, 2}, // 0: disable, 1: enable. //---------------------------------------------------------------------------- // For inactive power save feature. // If this mode is enabled, NIC will go into 802.11 power save mode at leisure . - {REGISTRY_STR("bLeisurePs"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLeisurePsMode), REGISTRY_SIZE(RegLeisurePsMode), 1, 0, 2}, // 0: disable, 1: enable. - {REGISTRY_STR("bAdvancedLPs"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAdvancedLPs), REGISTRY_SIZE(RegAdvancedLPs), 0, 0, 1}, // 0: disable, 1: enable. + {REGISTRY_STR("bLeisurePs"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLeisurePsMode), REGISTRY_SIZE(RegLeisurePsMode), 1, 0, 2}, // 0: disable, 1: enable. + {REGISTRY_STR("bAdvancedLPs"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAdvancedLPs), REGISTRY_SIZE(RegAdvancedLPs), 0, 0, 1}, // 0: disable, 1: enable. //---------------------------------------------------------------------------- // LPS Listen Interval. // 0x0 - eFastPs, 0xFF -DTIM, 0xNN - 0xNN * BeaconIntvl - {NDIS_STRING_CONST("LPSIntvl"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLPSMaxIntvl), REGISTRY_SIZE(RegLPSMaxIntvl), 5, 0, 0xFF}, + {NDIS_STRING_CONST("LPSIntvl"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLPSMaxIntvl), REGISTRY_SIZE(RegLPSMaxIntvl), 5, 0, 0xFF}, //---------------------------------------------------------------------------- // FW control LPS mode. Added by tynli. // 0=False, 1=MinPS, 2=MaxPS, 3=Manually setting wakeup bcn interval (refer to RegLPSMaxIntvl). @@ -232,7 +232,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // Keep-Alive mechanism. 2008-08-16 Isaiah. // Send Null-Function Data in period in order to tell AP that we are alive. - {REGISTRY_STR("KeepAliveLevel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegKeepAliveLevel), REGISTRY_SIZE(RegKeepAliveLevel), 1, 0, 2}, // 0: disable, 1: default(depend on Tx/Rx). 2. Force + {REGISTRY_STR("KeepAliveLevel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegKeepAliveLevel), REGISTRY_SIZE(RegKeepAliveLevel), 1, 0, 2}, // 0: disable, 1: default(depend on Tx/Rx). 2. Force //---------------------------------------------------------------------------- // Roam Sensitive Level : 0x7F: Disable raoming {NDIS_STRING_CONST("RegROAMSensitiveLevel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegROAMSensitiveLevel), REGISTRY_SIZE(RegROAMSensitiveLevel), 127, 30, 127}, @@ -242,11 +242,11 @@ static MP_REG_ENTRY CommonRegTable[] = { // Roaming Accept Time, in sec. {NDIS_STRING_CONST("RegRoamingLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRoamingLimit), REGISTRY_SIZE(RegRoamingLimit), 4, 0, 30}, //---------------------------------------------------------------------------- - // For Disable CCK rate - {REGISTRY_STR("DisableCck"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDisableCck), REGISTRY_SIZE(bRegDisableCck), 0, 0, 1}, // 1: CCK disable, 0: CCK enable . + // For Disable CCK rate + {REGISTRY_STR("DisableCck"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDisableCck), REGISTRY_SIZE(bRegDisableCck), 0, 0, 1}, // 1: CCK disable, 0: CCK enable . //---------------------------------------------------------------------------- // For CCK rate support - {REGISTRY_STR("HT_EnableCck"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegHT_EnableCck), REGISTRY_SIZE(bRegHT_EnableCck), 1, 0, 1}, // 1: HT CCK enable, 0: HT CCK disable . + {REGISTRY_STR("HT_EnableCck"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegHT_EnableCck), REGISTRY_SIZE(bRegHT_EnableCck), 1, 0, 1}, // 1: HT CCK enable, 0: HT CCK disable . //---------------------------------------------------------------------------- {REGISTRY_STR("AdhocUseHWSec"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegAdhocUseHWSec), REGISTRY_SIZE(bRegAdhocUseHWSec), 0, 0, 1}, // 1: Adhoc use HW encrypt/decrypt for FPGA verification, 0: Adhoc use HW encrypt/decrypt as default. @@ -255,7 +255,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- {REGISTRY_STR("IOTBcm256QAM"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegIOTBcm256QAM), REGISTRY_SIZE(bRegIOTBcm256QAM), 0, 0, 1}, // 1: Bcm IOT 256QAM support // 2013/10/04 MH Add for 2.4G VHT mode support. - {REGISTRY_STR("Vht24g"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegVht24g), REGISTRY_SIZE(bRegVht24g), 0, 0, 1}, // 1: support 2.4G 256Q VHT mode 0: disable + {REGISTRY_STR("Vht24g"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegVht24g), REGISTRY_SIZE(bRegVht24g), 0, 0, 1}, // 1: support 2.4G 256Q VHT mode 0: disable //---------------------------------------------------------------------------- // For A-MSDU {REGISTRY_STR("AMSDU"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAMSDU), REGISTRY_SIZE(RegAMSDU), 0, 0, 1}, @@ -264,7 +264,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // For 802.11n A-MPDU <2006.08.08 Emily> {REGISTRY_STR("AMPDUEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegAMPDUEnable), REGISTRY_SIZE(bRegAMPDUEnable), 1, 0, 1}, // 0:Disable A-MPDU, 2: Enable A-MPDU - {REGISTRY_STR("AMPDU_Factor"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAMPDU_Factor), REGISTRY_SIZE(RegAMPDU_Factor), 3, 0, VHT_AGG_SIZE_1024K}, // 0: 2n13(8K), 1:2n14(16K), 2:2n15(32K), 3:2n16(64k) + {REGISTRY_STR("AMPDU_Factor"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAMPDU_Factor), REGISTRY_SIZE(RegAMPDU_Factor), 3, 0, VHT_AGG_SIZE_1024K}, // 0: 2n13(8K), 1:2n14(16K), 2:2n15(32K), 3:2n16(64k) {REGISTRY_STR("MPDU_Density"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegMPDU_Density), REGISTRY_SIZE(RegMPDU_Density), 0, 0, HT_DENSITY_16US}, // 0: No restriction, 1: 1/8usec, 2: 1/4usec, 3: 1/2usec, 4: 1usec, 5: 2usec, 6: 4usec, 7:8usec //---------------------------------------------------------------------------- // 11N No Protection. Turn on this registry to disable all protection in 11N condition @@ -273,14 +273,14 @@ static MP_REG_ENTRY CommonRegTable[] = { // For Rx Reorder Control {REGISTRY_STR("RxReorder"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRxReorder), REGISTRY_SIZE(RegRxReorder), 1, 0, 0xf}, // 0: disable, 1: enable, 2: switch by throughput {REGISTRY_STR("RxReorder_WinSize"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRxReorder_WinSize), REGISTRY_SIZE(RegRxReorder_WinSize), 64, 1, 256}, - {REGISTRY_STR("RxReorder_PendTime"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRxReorder_PendTime), REGISTRY_SIZE(RegRxReorder_PendTime), 30, 1, 10000}, + {REGISTRY_STR("RxReorder_PendTime"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRxReorder_PendTime), REGISTRY_SIZE(RegRxReorder_PendTime), 30, 1, 10000}, //---------------------------------------------------------------------------- // RTL8192C USB Tx/Rx Aggregation //---------------------------------------------------------------------------- #if TX_AGGREGATION {REGISTRY_STR("UsbTxAggMode"), 0, NdisParameterInteger, REGISTRY_OFFSET(UsbTxAggMode), REGISTRY_SIZE(UsbTxAggMode), 1, 0, 1}, - {REGISTRY_STR("UsbTxAggTotalNum"), 0,NdisParameterInteger, REGISTRY_OFFSET(UsbTxAggTotalNum), REGISTRY_SIZE(UsbTxAggTotalNum), 6, 1, 31}, + {REGISTRY_STR("UsbTxAggTotalNum"), 0,NdisParameterInteger, REGISTRY_OFFSET(UsbTxAggTotalNum), REGISTRY_SIZE(UsbTxAggTotalNum), 6, 1, 31}, {REGISTRY_STR("UsbTxAggDescNum"), 0, NdisParameterInteger, REGISTRY_OFFSET(UsbTxAggDescNum), REGISTRY_SIZE(UsbTxAggDescNum), 6, 1, 15}, //{REGISTRY_STR("UsbTxAggPerBulkNum"), 0,NdisParameterInteger, REGISTRY_OFFSET(UsbTxAggPerBulkNum), REGISTRY_SIZE(UsbTxAggPerBulkNum), 6, 1, 15}, #endif @@ -293,7 +293,7 @@ static MP_REG_ENTRY CommonRegTable[] = { #endif //---------------------------------------------------------------------------- // Accept ADDBA Request - {REGISTRY_STR("AcceptAddbaReq"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegAcceptAddbaReq), REGISTRY_SIZE(bRegAcceptAddbaReq), 1, 0, 1}, + {REGISTRY_STR("AcceptAddbaReq"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegAcceptAddbaReq), REGISTRY_SIZE(bRegAcceptAddbaReq), 1, 0, 1}, {REGISTRY_STR("SupportPNPCapabilities"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegPnpCapabilities), REGISTRY_SIZE(bRegPnpCapabilities), 1, 0, 1}, // 1 support pnp set oid, 0 unload driver when s3,s4 //---------------------------------------------------------------------------- {REGISTRY_STR("CloEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegClevoDriver), REGISTRY_SIZE(bRegClevoDriver), 0, 0, 1}, // 0:Other customers' driver 1: Clevo driver version @@ -303,7 +303,7 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("GTKOffloadEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegGTKOffloadEnable), REGISTRY_SIZE(bRegGTKOffloadEnable), 0, 0, 1}, // 0: disable, 1: enable {REGISTRY_STR("ProtocolOffloadDecision"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegProtocolOffloadDecision), REGISTRY_SIZE(RegProtocolOffloadDecision), 0, 0, 1}, // 0: disable, 1: enable - {REGISTRY_STR("DMInitialGain"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDMInitialGain), REGISTRY_SIZE(bRegDMInitialGain), 1, 0, 1}, // 1 support pnp set oid, 0 unload driver when s3,s4 + {REGISTRY_STR("DMInitialGain"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDMInitialGain), REGISTRY_SIZE(bRegDMInitialGain), 1, 0, 1}, // 1 support pnp set oid, 0 unload driver when s3,s4 //---------------------------------------------------------------------------- {REGISTRY_STR("GPIORFSW"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegGpioRfSw), REGISTRY_SIZE(bRegGpioRfSw), 1, 0, 1}, @@ -313,7 +313,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // Indicate event when receiving deauth/disassoc packet. If this registry is set false, the disconnected state shall be recovered by roaming. Impact on XP/MacOS // 0: Not indicate, 1: Indicate - {REGISTRY_STR("IndicateByDeauth"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegIndicateByDeauth), REGISTRY_SIZE(RegIndicateByDeauth), 0, 0, 1}, + {REGISTRY_STR("IndicateByDeauth"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegIndicateByDeauth), REGISTRY_SIZE(RegIndicateByDeauth), 0, 0, 1}, //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // Show Tx/Rx rate setting @@ -333,7 +333,7 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("WakeOnDisconnect"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegWakeOnDisconnect), REGISTRY_SIZE(bRegWakeOnDisconnect), 1, 0, 1}, {REGISTRY_STR("WoWLANS5Support"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWoWLANS5Support), REGISTRY_SIZE(RegWoWLANS5Support), 0, 0, 1}, // 0: disable, 1: enable // Connected standby LPS Listen Interval. 0xNN = 0xNN * BeaconIntvl - {NDIS_STRING_CONST("D2ListenIntvl"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegD2ListenIntvl), REGISTRY_SIZE(RegD2ListenIntvl), 5, 1, 0xFF}, + {NDIS_STRING_CONST("D2ListenIntvl"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegD2ListenIntvl), REGISTRY_SIZE(RegD2ListenIntvl), 5, 1, 0xFF}, {NDIS_STRING_CONST("bFakeWoWLAN"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegFakeWoWLAN), REGISTRY_SIZE(bRegFakeWoWLAN), 0, 0, 1}, // 0: disable, 1: enable {REGISTRY_STR("NLOEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegNLOEnable), REGISTRY_SIZE(RegNLOEnable), 0, 0, 1}, // 0: disable, 1: enable @@ -342,9 +342,9 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("btHsMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegbtHsMode), REGISTRY_SIZE(RegbtHsMode), 2, 0, 2}, // 0: Force to disable HS mode, 1: Force to enable HS mode, 2: auto mode //---------------------------------------------------------------------------- {REGISTRY_STR("Velocity"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegVelocity), REGISTRY_SIZE(bRegVelocity), 1, 0, 1}, // 0:disable, 1: enable - // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. + // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. {REGISTRY_STR("DongleSS"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDongleSS), REGISTRY_SIZE(bRegDongleSS), 0, 0, 1}, // 0:power down disable, 1:Power down enable,. - // 2011/02/16 MH Add for CU selective suspend workaroud temporarily. This is used to prevent CU GPIO HW floating. + // 2011/02/16 MH Add for CU selective suspend workaroud temporarily. This is used to prevent CU GPIO HW floating. {REGISTRY_STR("SSWakeCnt"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegSSWakeCnt), REGISTRY_SIZE(bRegSSWakeCnt), 60, 30, 2000}, // 30~2000=GPIO detect rounds. {REGISTRY_STR("*PacketCoalescing"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegPacketCoalescing), REGISTRY_SIZE(bRegPacketCoalescing), 1, 0, 1}, // 0: disable, 1: enable @@ -357,10 +357,10 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("DMDPMAC0VWifiSupport"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDMDPMAC0VWifiSupport), REGISTRY_SIZE(bRegDMDPMAC0VWifiSupport), 0, 0, 1}, // 0:Disabl Virtual Wifi support, 1:Enable {REGISTRY_STR("UseRxInterruptWorkItem"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegUseRxInterruptWorkItem), REGISTRY_SIZE(bRegUseRxInterruptWorkItem), 0, 0, 1}, // 0:Disable DisableRxInterruptWorkitem, 1:Enable DisableRxInterruptWorkitem. - {REGISTRY_STR("bRegDefaultAntenna"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDefaultAntenna), REGISTRY_SIZE(bRegDefaultAntenna), 1, 0, 1}, // 0 : Using Aux Antenna , 1 : Using Main Antenna - {REGISTRY_STR("AntDiv"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAntDiv), REGISTRY_SIZE(RegAntDiv), 2, 0, 2}, // 0:OFF , 1:ON, 2:From Efuse - {REGISTRY_STR("AntDetection"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAntDetection), REGISTRY_SIZE(RegAntDetection), 1, 0, 4}, // BIT0: Antenna Detection by Single Tone, BIT1: Antenna Detection by RSSI// TCP offload - {REGISTRY_STR("RegTCPOffloadMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTCPOffloadMode), REGISTRY_SIZE(RegTCPOffloadMode), 0, 0, 256}, // bit0 : IPV4 Tx, bit1 : IPV4 RX, bit5 : IPV6 Tx, bit6 : IPV6 RX + {REGISTRY_STR("bRegDefaultAntenna"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDefaultAntenna), REGISTRY_SIZE(bRegDefaultAntenna), 1, 0, 1}, // 0 : Using Aux Antenna , 1 : Using Main Antenna + {REGISTRY_STR("AntDiv"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAntDiv), REGISTRY_SIZE(RegAntDiv), 2, 0, 2}, // 0:OFF , 1:ON, 2:From Efuse + {REGISTRY_STR("AntDetection"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAntDetection), REGISTRY_SIZE(RegAntDetection), 1, 0, 4}, // BIT0: Antenna Detection by Single Tone, BIT1: Antenna Detection by RSSI// TCP offload + {REGISTRY_STR("RegTCPOffloadMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTCPOffloadMode), REGISTRY_SIZE(RegTCPOffloadMode), 0, 0, 256}, // bit0 : IPV4 Tx, bit1 : IPV4 RX, bit5 : IPV6 Tx, bit6 : IPV6 RX //---------------------------------------------------------------------------- @@ -376,25 +376,25 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("TimerGPIO"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegTimerGPIO), REGISTRY_SIZE(bRegTimerGPIO), 0, 0, 1}, // 0:Disable GPIO timer detect, 1:Enable GPIO timer detect,. {REGISTRY_STR("GPIODelay"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegGPIODelay), REGISTRY_SIZE(bRegGPIODelay), 500, 100, 5000}, //100~5000 ms delay for GPIO detect scheme delay timer {REGISTRY_STR("GPIOBack"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegGPIOBack), REGISTRY_SIZE(bRegGPIOBack), 250, 10, 5000}, //10~5000 ms delay for GPIO detect return callback timer delay - + // 2015/07/29 Gary For customized LEDStrategy. {REGISTRY_STR("LedStrategy"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegLedStrategy), REGISTRY_SIZE(bRegLedStrategy), 64, 0, 64}, //0~63 led MODE, 64: Default LED Mode - - // 2010/08/25 MH According to PM's request, we support inf to switch power down mode. + + // 2010/08/25 MH According to PM's request, we support inf to switch power down mode. {REGISTRY_STR("PDNMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegPDNMode), REGISTRY_SIZE(bRegPDNMode), 1, 0, 1}, // 0:power down disable, 1:Power down enable,. - // 2010/09/13 MH According to PM's request, we support different SS power seave level. + // 2010/09/13 MH According to PM's request, we support different SS power seave level. {REGISTRY_STR("SSPwrLvl"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegSSPwrLvl), REGISTRY_SIZE(bRegSSPwrLvl), 2, 0, 2}, // 0:~2=different SS power save level. Level 2 is the best one now. - // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. - {REGISTRY_STR("AggDMEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegAggDMEnable), REGISTRY_SIZE(bRegAggDMEnable), 1, 0, 2}, // 0/1/2=disable/enable/auto. + // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. + {REGISTRY_STR("AggDMEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegAggDMEnable), REGISTRY_SIZE(bRegAggDMEnable), 1, 0, 2}, // 0/1/2=disable/enable/auto. // use another thread to send packets. prevent BSOD by stack overflow {REGISTRY_STR("SendPacketByTimer"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSendPacketByTimer), REGISTRY_SIZE(RegSendPacketByTimer), 0, 0, 1}, // 1: use timer to send packet, 0 : off - // 2010/12/31 MH Add for UPHY dynamic chaneg. - {REGISTRY_STR("UPDMEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegUPDMEnable), REGISTRY_SIZE(bRegUPDMEnable), 1, 0, 2}, // 0/1/2=disable/enable/auto. + // 2010/12/31 MH Add for UPHY dynamic chaneg. + {REGISTRY_STR("UPDMEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegUPDMEnable), REGISTRY_SIZE(bRegUPDMEnable), 1, 0, 2}, // 0/1/2=disable/enable/auto. //---------------------------------------------------------------------------- // Earlymode ctrl. 0=Disable, 1=Enable. by wl 20101012. {REGISTRY_STR("bEarlymodeEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEarlymodeEnable), REGISTRY_SIZE(RegEarlymodeEnable), 0, 0, 1}, @@ -408,18 +408,18 @@ static MP_REG_ENTRY CommonRegTable[] = { //Two STA Concurrent Mode: 0: Disable(MAC 0 5G/2.4G 2*2), 1: Enable(MAC 0 5G MAC 1 2.4G 1*1), 2: Auto(MAC 0 can upto 2*2 5G if MAC 1 disconnect) {REGISTRY_STR("TwoStaConcurrentMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTwoStaConcurrentMode), REGISTRY_SIZE(RegTwoStaConcurrentMode), 0, 0, 2}, //---------------------------------------------------------------------------- - // 2011/07/08 MH Add for Link Speed display for different customer. + // 2011/07/08 MH Add for Link Speed display for different customer. {REGISTRY_STR("LinkSpeedLevel"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegLinkSpeedLevel), REGISTRY_SIZE(bRegLinkSpeedLevel), 0, 0, 0xff}, // 0/~N= For different speed display. // 0: default, 1: real signal strength (Acer request), 2: HP special mode {REGISTRY_STR("RSSI2GridMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRSSI2GridMode), REGISTRY_SIZE(RegRSSI2GridMode), 0, 0, 4}, - // 2011/07/14 MH Add for rx short. + // 2011/07/14 MH Add for rx short. {REGISTRY_STR("RxSC"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegRxSC), REGISTRY_SIZE(bRegRxSC), 1, 0, 1}, // 0/1=disable/enable - // 2011/07/15 Sinda Add for tx short cut. + // 2011/07/15 Sinda Add for tx short cut. {REGISTRY_STR("TxSC"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegTxSC), REGISTRY_SIZE(bRegTxSC), 1, 0, 1}, // 0/1=disable/enable - {REGISTRY_STR("PAMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPAMode), REGISTRY_SIZE(RegPAMode), PA_MODE_INTERNAL_SP3T, PA_MODE_EXTERNAL, PA_MODE_INTERNAL_SPDT}, + {REGISTRY_STR("PAMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPAMode), REGISTRY_SIZE(RegPAMode), PA_MODE_INTERNAL_SP3T, PA_MODE_EXTERNAL, PA_MODE_INTERNAL_SPDT}, // 2011/09/15 MH Add registry for switching packet compete method. {REGISTRY_STR("TxMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxMode), REGISTRY_SIZE(RegTxMode), 0, 0x0, 0xF}, // 0x0~0xF. Different TX mode. @@ -452,8 +452,8 @@ static MP_REG_ENTRY CommonRegTable[] = { //2011.09.23 LukeLee add for path diversity {REGISTRY_STR("PathDiv"), 0,NdisParameterInteger, REGISTRY_OFFSET(bPathDivEnable), REGISTRY_SIZE(bPathDivEnable), 0, 0, 2}, // 0: disable PathDiv, 1: 1T PathDiv, 2: 2T PathDiv - {REGISTRY_STR("DbgZone"), 0,NdisParameterString, REGISTRY_OFFSET(RegDbgZone), REGISTRY_SIZE(RegDbgZone), 0, 0, 128}, // 1 = Fix tx power - {REGISTRY_STR("DbgMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDbgMode), REGISTRY_SIZE(bRegDbgMode), 0, 0, 1}, // 1 = Fix tx power + {REGISTRY_STR("DbgZone"), 0,NdisParameterString, REGISTRY_OFFSET(RegDbgZone), REGISTRY_SIZE(RegDbgZone), 0, 0, 128}, // 1 = Fix tx power + {REGISTRY_STR("DbgMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegDbgMode), REGISTRY_SIZE(bRegDbgMode), 0, 0, 1}, // 1 = Fix tx power //---------------------------------------------------------------------------- // 2011/12/08 hpfan Add for Tcp Reorder {REGISTRY_STR("TcpReorder"), 0,NdisParameterInteger, REGISTRY_OFFSET(bTcpReorderEnable), REGISTRY_SIZE(bTcpReorderEnable), 0, 0, 1}, // 0: disable TcpReorder, 1: enable TcpReorder @@ -463,8 +463,8 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("BW40MHzFor5G"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegBW40MHzFor5G), REGISTRY_SIZE(bRegBW40MHzFor5G), 1, 0, 1}, // 1: 40MHz support, 0: 20MHz support. //---------------------------------------------------------------------------- - //2012.01.04 Sherry Add for support txpacketbuffer coleose - {REGISTRY_STR("SupportTxPacketBufferColease"), 0,NdisParameterInteger, REGISTRY_OFFSET(bSupportTxPacketBufferColease), REGISTRY_SIZE(bSupportTxPacketBufferColease), 0, 0, 1}, + //2012.01.04 Sherry Add for support txpacketbuffer coleose + {REGISTRY_STR("SupportTxPacketBufferColease"), 0,NdisParameterInteger, REGISTRY_OFFSET(bSupportTxPacketBufferColease), REGISTRY_SIZE(bSupportTxPacketBufferColease), 0, 0, 1}, //2012.02.06 Sherry Add for Belkin to switch band by end-user {REGISTRY_STR("WirelessBand"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWirelessBand), REGISTRY_SIZE(RegWirelessBand), 2, 0, 2}, // 0:2.4G 1:5G, 2:Both @@ -487,15 +487,15 @@ static MP_REG_ENTRY CommonRegTable[] = { // BIT0: Enable VHT STBC Rx, BIT1: Enable VHT STBC Tx, BIT4: Enable HT STBC Rx, BIT5: Enable HT STBC Tx {REGISTRY_STR("StbcCap"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStbc), REGISTRY_SIZE(RegStbc), 0x33, 0, 0x33}, //---------------------------------------------------------------------------- - // 0:undefined, 1:USB2, 2:USB3 3: USB switch can detect RSSI 4: USB switch + long range 5: VL/VS/VN always USB20 + // 0:undefined, 1:USB2, 2:USB3 3: USB switch can detect RSSI 4: USB switch + long range 5: VL/VS/VN always USB20 // 6: Reserve 8: Can U3 to U2, but forbid U2 to U3. {REGISTRY_STR("UsbMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbMode), REGISTRY_SIZE(RegUsbMode), 0, 0, 2}, // 0:undefined, 1:USB2, 2:USB3 {REGISTRY_STR("ForcedUsbMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegForcedUsbMode), REGISTRY_SIZE(RegForcedUsbMode),0, 0, 0xf}, // 0:undefined, 1:USB2, 2:USB3 - {REGISTRY_STR("UsbCurMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbCurMode), REGISTRY_SIZE(RegUsbCurMode), 0, 0, 2}, + {REGISTRY_STR("UsbCurMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbCurMode), REGISTRY_SIZE(RegUsbCurMode), 0, 0, 2}, {REGISTRY_STR("UsbMode3To2Cnt"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbMode3To2Cnt), REGISTRY_SIZE(RegUsbMode3To2Cnt), 0, 0, 0xffff}, // 0:undefined, USB 3 transfer to 2 mode counter. {REGISTRY_STR("UsbMode2To3Cnt"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbMode2To3Cnt), REGISTRY_SIZE(RegUsbMode2To3Cnt), 0, 0, 0xffff}, // 0:undefined, USB 2 transfer to 3 mode counter. - {REGISTRY_STR("UsbMode2To3CntFail"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbMode2To3CntFail), REGISTRY_SIZE(RegUsbMode2To3CntFail), 0, 0, 0xffff}, // 0:undefined, USB 2 transfer to 3 mode fail counter. + {REGISTRY_STR("UsbMode2To3CntFail"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbMode2To3CntFail), REGISTRY_SIZE(RegUsbMode2To3CntFail), 0, 0, 0xffff}, // 0:undefined, USB 2 transfer to 3 mode fail counter. {REGISTRY_STR("UsbSwFast"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbSwFast), REGISTRY_SIZE(RegUsbSwFast),0, 0, 1}, // USB switch speed level //20130523 MH add for NEC WPS check condition. @@ -517,16 +517,16 @@ static MP_REG_ENTRY CommonRegTable[] = { // 2012/10/26 MH Add for 8812/8821 AC series dynamic switch. for USB3.0 // 2013/04/18 MH According to YX's test the below parameters will be better in iperf/chariot test. - {REGISTRY_STR("AcUsbDmaTime"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaTime), REGISTRY_SIZE(RegAcUsbDmaTime), 0x1a, 0, 0xff}, - {REGISTRY_STR("AcUsbDmaSize"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaSize), REGISTRY_SIZE(RegAcUsbDmaSize), 0x07, 0, 0xff}, + {REGISTRY_STR("AcUsbDmaTime"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaTime), REGISTRY_SIZE(RegAcUsbDmaTime), 0x1a, 0, 0xff}, + {REGISTRY_STR("AcUsbDmaSize"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaSize), REGISTRY_SIZE(RegAcUsbDmaSize), 0x07, 0, 0xff}, // 2013/04/18 MH Add USB2.0 Aggregation parameters - {REGISTRY_STR("AcUsbDmaTime2"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaTime2), REGISTRY_SIZE(RegAcUsbDmaTime2), 0x10, 0, 0xff}, - {REGISTRY_STR("AcUsbDmaSize2"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaSize2), REGISTRY_SIZE(RegAcUsbDmaSize2), 0x06, 0, 0xff}, + {REGISTRY_STR("AcUsbDmaTime2"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaTime2), REGISTRY_SIZE(RegAcUsbDmaTime2), 0x10, 0, 0xff}, + {REGISTRY_STR("AcUsbDmaSize2"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAcUsbDmaSize2), REGISTRY_SIZE(RegAcUsbDmaSize2), 0x06, 0, 0xff}, // 2012/10/31 MH Add for power limit table constraint. {REGISTRY_STR("TxPwrLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxPwrLimit), REGISTRY_SIZE(RegTxPwrLimit), 0xFFFFFFFF, 0, 0xFFFFFFFF}, // Limit different Rate power index. // 0x10080604 ==> HT40/HT20/LegyctOFDM/CCK for example, HT40 max + 0x10 power index HT20 max +0x8 power index - {REGISTRY_STR("DecryptCustomFile"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDecryptCustomFile), REGISTRY_SIZE(RegDecryptCustomFile), 0, 0, 1}, + {REGISTRY_STR("DecryptCustomFile"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDecryptCustomFile), REGISTRY_SIZE(RegDecryptCustomFile), 0, 0, 1}, // Win8 FSS mode detection. 2012.09.13, by tynli. {REGISTRY_STR("FSSDetection"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFSSDetection), REGISTRY_SIZE(RegFSSDetection), 0, 0, 1}, // 0: disable, 1: enable @@ -542,10 +542,10 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- //2013/02/05 zhiyuan add for Lenovo AMD Platform, wake up on lan need twice push power button (sleep mode) to go to sleep. need clear wake up status after wake up. {REGISTRY_STR("ClearAMDWakeUpStatus"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegClearAMDWakeUpStatus), REGISTRY_SIZE(RegClearAMDWakeUpStatus), 0, 0, 1}, // 0/1 = disable/enable clear AMD wake up status. - + //20130415 For BT coexist with single antenna. - {REGISTRY_STR("DisableBTCoexist"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDisableBTCoexist), REGISTRY_SIZE(RegDisableBTCoexist), 0, 0, 1}, - + {REGISTRY_STR("DisableBTCoexist"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDisableBTCoexist), REGISTRY_SIZE(RegDisableBTCoexist), 0, 0, 1}, + //20130606 MH For passive scan control dynamic switch after meeting with RF/FAE team. {REGISTRY_STR("PassiveScan"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPassiveScan), REGISTRY_SIZE(RegPassiveScan), 0, 0, 0xFF}, // 0= by channel plan, 1=5g all passive scan / 2= 24g passive scan /3= 2/5g all passive scan @@ -553,18 +553,18 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("WFDOpChannel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWFDOpChannel), REGISTRY_SIZE(RegWFDOpChannel), 0, 0, 11}, // 0: driver default value, 1~11: channel number {REGISTRY_STR("WFDPeerOpChannel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWFDPeerOpChannel), REGISTRY_SIZE(RegWFDPeerOpChannel), 0, 0, 11}, // 0: driver default value, 1~11: channel number {REGISTRY_STR("WFDTest"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegWFDTest), REGISTRY_SIZE(bRegWFDTest), 0, 0, 1}, - + // Add for v3006.0.0320.2014 WHQL submission. {REGISTRY_STR("FixBTTdma"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFixBTTdma), REGISTRY_SIZE(RegFixBTTdma), 1, 0, 1}, // 0: disable, 1: enable //---------------------------------------------------------------------------- // Device WHQL test "DPC ISR" for SDIO. Added by tynli, 2014.09.11. {REGISTRY_STR("SdioDpcIsr"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSdioDpcIsr), REGISTRY_SIZE(RegSdioDpcIsr), 0, 0, 1}, // 0: disable, 1: enable - + //---------------------------------------------------------------------------- // For Intel low power platform. 2013.11.18, by tynli. {REGISTRY_STR("IntelPatchPNP"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegIntelPatchPNP), REGISTRY_SIZE(RegIntelPatchPNP), 0, 0, 1}, // 0: disable, 1: enable - + //---------------------------------------------------------------------------- // For PCIE Gen1 to Gen 2. 2013.12.24, by gw. {REGISTRY_STR("ForcePCIeRate"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegForcePCIeRate), REGISTRY_SIZE(RegForcePCIeRate), 1, 0, 2},// 0: Auto 1:Gen1 24G 2:Gen2 5G @@ -581,31 +581,31 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("WaitBeforeGoSkipScan"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWaitBeforeGoSkipScan), REGISTRY_SIZE(RegWaitBeforeGoSkipScan), 0x0, 0, 0xFF}, // 2012/11/07 Awk add PowerBase for customers to define their power base. - {REGISTRY_STR("PowerBase"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPowerBase), REGISTRY_SIZE(RegPowerBase), 14, 0, 0xFF}, - + {REGISTRY_STR("PowerBase"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPowerBase), REGISTRY_SIZE(RegPowerBase), 14, 0, 0xFF}, + // 2012/11/23 Awk add for enabling/disabling power limit - {REGISTRY_STR("EnableTxPowerLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEnableTxPowerLimit), REGISTRY_SIZE(RegEnableTxPowerLimit), 2, 0, 2}, - {REGISTRY_STR("EnableTxPowerByRate"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEnableTxPowerByRate), REGISTRY_SIZE(RegEnableTxPowerByRate), 2, 0, 2}, + {REGISTRY_STR("EnableTxPowerLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEnableTxPowerLimit), REGISTRY_SIZE(RegEnableTxPowerLimit), 2, 0, 2}, + {REGISTRY_STR("EnableTxPowerByRate"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegEnableTxPowerByRate), REGISTRY_SIZE(RegEnableTxPowerByRate), 2, 0, 2}, {REGISTRY_STR("TxPowerTraining"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxPowerTraining), REGISTRY_SIZE(RegTxPowerTraining), 1, 0, 1}, // 2015/02/11 VincentL Add for primary/secondary power limit table selection (used as initial one) - {REGISTRY_STR("TxPowerLimitTableSel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxPowerLimitTableSel), REGISTRY_SIZE(RegTxPowerLimitTableSel), 0, 0, 4}, + {REGISTRY_STR("TxPowerLimitTableSel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxPowerLimitTableSel), REGISTRY_SIZE(RegTxPowerLimitTableSel), 0, 0, 4}, {REGISTRY_STR("TxPwrLmtDynamicLoading"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxPwrLmtDynamicLoading), REGISTRY_SIZE(RegTxPwrLmtDynamicLoading), 0, 0, 1}, // 2015/04/27 VincentL Add for Toggle Support for TxPwrTable Dump Feature - {REGISTRY_STR("SupportTxPwrTableDump"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSupportTxPwrTableDump), REGISTRY_SIZE(RegSupportTxPwrTableDump), 0, 0, 1}, + {REGISTRY_STR("SupportTxPwrTableDump"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSupportTxPwrTableDump), REGISTRY_SIZE(RegSupportTxPwrTableDump), 0, 0, 1}, // 2015/02/25 VincentL Add for UEFI method - {REGISTRY_STR("LoadSystemSKUfromUEFI"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLoadSystemSKUfromUEFI), REGISTRY_SIZE(RegLoadSystemSKUfromUEFI), 0, 0, 1}, - {REGISTRY_STR("UEFIProfile"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUEFIProfile), REGISTRY_SIZE(RegUEFIProfile), 0, 0, 100}, + {REGISTRY_STR("LoadSystemSKUfromUEFI"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLoadSystemSKUfromUEFI), REGISTRY_SIZE(RegLoadSystemSKUfromUEFI), 0, 0, 1}, + {REGISTRY_STR("UEFIProfile"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUEFIProfile), REGISTRY_SIZE(RegUEFIProfile), 0, 0, 100}, // 2015/07/07 VincentL Add for SMBIOS method - {REGISTRY_STR("LoadSystemSKUfromSMBIOS"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLoadSystemSKUfromSMBIOS), REGISTRY_SIZE(RegLoadSystemSKUfromSMBIOS), 0, 0, 1}, + {REGISTRY_STR("LoadSystemSKUfromSMBIOS"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLoadSystemSKUfromSMBIOS), REGISTRY_SIZE(RegLoadSystemSKUfromSMBIOS), 0, 0, 1}, {REGISTRY_STR("LoadProcessorIDfromSMBIOS"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLoadProcessorIDfromSMBIOS), REGISTRY_SIZE(RegLoadProcessorIDfromSMBIOS), 0, 0, 1}, - {REGISTRY_STR("PwrByRateFile"), 0,NdisParameterString, REGISTRY_OFFSET(RegPwrByRateFile), REGISTRY_SIZE(RegPwrByRateFile), (ADDR2DATA)&DefaultFileName, 0, 32}, - {REGISTRY_STR("PwrLimitFile"), 0,NdisParameterString, REGISTRY_OFFSET(RegPwrLimitFile), REGISTRY_SIZE(RegPwrLimitFile), (ADDR2DATA)&DefaultFileName, 0, 32}, - {REGISTRY_STR("SecondaryPwrLimitFile"), 0,NdisParameterString, REGISTRY_OFFSET(RegSecondaryPwrLimitFile), REGISTRY_SIZE(RegSecondaryPwrLimitFile), (ADDR2DATA)&DefaultFileName, 0, 32}, + {REGISTRY_STR("PwrByRateFile"), 0,NdisParameterString, REGISTRY_OFFSET(RegPwrByRateFile), REGISTRY_SIZE(RegPwrByRateFile), (ADDR2DATA)&DefaultFileName, 0, 32}, + {REGISTRY_STR("PwrLimitFile"), 0,NdisParameterString, REGISTRY_OFFSET(RegPwrLimitFile), REGISTRY_SIZE(RegPwrLimitFile), (ADDR2DATA)&DefaultFileName, 0, 32}, + {REGISTRY_STR("SecondaryPwrLimitFile"), 0,NdisParameterString, REGISTRY_OFFSET(RegSecondaryPwrLimitFile), REGISTRY_SIZE(RegSecondaryPwrLimitFile), (ADDR2DATA)&DefaultFileName, 0, 32}, // 2013/01/23 VincentLan add for enabling/disabling IQK Firmware Offload {REGISTRY_STR("IQKFWOffload"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegIQKFWOffload), REGISTRY_SIZE(RegIQKFWOffload), 0, 0, 1}, @@ -628,7 +628,7 @@ static MP_REG_ENTRY CommonRegTable[] = { // BT FW patched ROM Code control, added by Roger, 2011.11.23. {REGISTRY_STR("BtFwSupport"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegBtFwSupport), REGISTRY_SIZE(bRegBtFwSupport), 0, 0, 1}, //0: Not support BT FW Download, 1: Support BT FW Download - + // For WHCK USB WFD test channel switch time. {REGISTRY_STR("WfdTime"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWfdTime), REGISTRY_SIZE(RegWfdTime), 150, 0, 0xff}, // Multi Channel switch time // For WHCK USB WFD Channel switch pattern. @@ -646,29 +646,29 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // 2012/11/06 Page Add for Power by rate DW/NByte access switch // 0: disable, means Byte by Byte access BB reg, 1: enable, means DW access BB reg while set power by rate 2: enable, means N Byte access BB reg - {REGISTRY_STR("NByteAccess"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegNByteAccess), REGISTRY_SIZE(RegNByteAccess), 0, 0, 2}, + {REGISTRY_STR("NByteAccess"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegNByteAccess), REGISTRY_SIZE(RegNByteAccess), 0, 0, 2}, //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // 2012/11/13 Page Add for Intial Offload by FW. 2012/11/27, page revise the definition: add FWOffload = 2 to indicate FW SW Channel offload // 0: disable, means driver do the whole intial work by itself 1: enable, means FW will do some initial offload work for driver to save time - {REGISTRY_STR("FWOffload"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFWOffload), REGISTRY_SIZE(RegFWOffload), 0, 0, 2}, + {REGISTRY_STR("FWOffload"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFWOffload), REGISTRY_SIZE(RegFWOffload), 0, 0, 2}, //---------------------------------------------------------------------------- // 0: download FW from file, 1: download FW from header - {REGISTRY_STR("DownloadFW"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDownloadFW), REGISTRY_SIZE(RegDownloadFW), 1, 0, 1}, + {REGISTRY_STR("DownloadFW"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDownloadFW), REGISTRY_SIZE(RegDownloadFW), 1, 0, 1}, // 0: Disable, 1: Enable - {REGISTRY_STR("FWQC"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFWQC), REGISTRY_SIZE(RegFWQC), 0, 0, 1}, + {REGISTRY_STR("FWQC"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFWQC), REGISTRY_SIZE(RegFWQC), 0, 0, 1}, // 2012/11/21 Sinda add for Scan time per channel - {REGISTRY_STR("ScanLarge"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanLarge), REGISTRY_SIZE(RegScanLarge), 0, 0, 1000}, - {REGISTRY_STR("ScanMiddle"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanMiddle), REGISTRY_SIZE(RegScanMiddle), 0, 0, 1000}, - {REGISTRY_STR("ScanNormal"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanNormal), REGISTRY_SIZE(RegScanNormal), 0, 0, 1000}, - {REGISTRY_STR("ScanActive"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanActive), REGISTRY_SIZE(RegScanActive), 0, 0, 1000}, + {REGISTRY_STR("ScanLarge"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanLarge), REGISTRY_SIZE(RegScanLarge), 0, 0, 1000}, + {REGISTRY_STR("ScanMiddle"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanMiddle), REGISTRY_SIZE(RegScanMiddle), 0, 0, 1000}, + {REGISTRY_STR("ScanNormal"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanNormal), REGISTRY_SIZE(RegScanNormal), 0, 0, 1000}, + {REGISTRY_STR("ScanActive"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegScanActive), REGISTRY_SIZE(RegScanActive), 0, 0, 1000}, {REGISTRY_STR("ForcedScanPeriod"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegForcedScanPeriod), REGISTRY_SIZE(RegForcedScanPeriod), 0, 0, 1000}, // 0: No Preference, 1: 2.4G first, 2: 5G first - {REGISTRY_STR("PreferBand"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPreferBand), REGISTRY_SIZE(RegPreferBand), 0, 0, 2}, + {REGISTRY_STR("PreferBand"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPreferBand), REGISTRY_SIZE(RegPreferBand), 0, 0, 2}, // 2012/11/28 MH Add for BB team AMDPU test requiremtn. {REGISTRY_STR("AMfactor"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAMfactor), REGISTRY_SIZE(RegAMfactor), 7, 0, 0xff}, // AMPDU factor for HT/VHT. @@ -682,7 +682,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // 2012/12/06 Page Add for BW setting on Advanced Settings // 0: 20 MHz only, 1: 20_40 MHz only, 2: 20_40_80 MHz - {REGISTRY_STR("BWSetting"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegBWSetting), REGISTRY_SIZE(RegBWSetting), 0, 0, 2}, + {REGISTRY_STR("BWSetting"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegBWSetting), REGISTRY_SIZE(RegBWSetting), 0, 0, 2}, //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -696,7 +696,7 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // 2013/02/05 MH Add registry for Disable scan ability when linked with AP. - {REGISTRY_STR("StreamMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStreamMode), REGISTRY_SIZE(RegStreamMode), 0, 0, 1}, + {REGISTRY_STR("StreamMode"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegStreamMode), REGISTRY_SIZE(RegStreamMode), 0, 0, 1}, //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- @@ -746,10 +746,10 @@ static MP_REG_ENTRY CommonRegTable[] = { //20130614 MH add for Edimax firmware load fail workaround~!.. {REGISTRY_STR("Fwload"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFwload), REGISTRY_SIZE(RegFwload), 1, 0, 0xf}, // 0=original location, 1=the last block use 4 bytes! - //20151013 Sean moidy "ViaU3" to "UsbSafetySwitch"as a bit-oriented registry for USB workaround switch + //20151013 Sean moidy "ViaU3" to "UsbSafetySwitch"as a bit-oriented registry for USB workaround switch {REGISTRY_STR("UsbSafetySwitch"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegUsbSafetySwitch), REGISTRY_SIZE(RegUsbSafetySwitch), 0, 0, 0xf}, //See RT_UsbSafetySwitch_Bits - {REGISTRY_STR("IsAMDIOIC"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegIsAMDIOIC), REGISTRY_SIZE(RegIsAMDIOIC), 0, 0, 1}, // 0: disable, 1: enable + {REGISTRY_STR("IsAMDIOIC"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegIsAMDIOIC), REGISTRY_SIZE(RegIsAMDIOIC), 0, 0, 1}, // 0: disable, 1: enable //20130822 MH add for response ack power tx agc offset for 8811au DNI case. It may be used for other IC {REGISTRY_STR("RspPwr"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRspPwr), REGISTRY_SIZE(RegRspPwr), 0, 0, 0xf}, // Default response ack power offset. @@ -765,30 +765,30 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("bScanTimeCheck"), 0,NdisParameterInteger, REGISTRY_OFFSET(bRegScanTimeCheck), REGISTRY_SIZE(bRegScanTimeCheck), 0, 0, 1}, // Set retry limit - {REGISTRY_STR("RetryTimes"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRetryTimes), REGISTRY_SIZE(RegRetryTimes), 0, 0, 48}, + {REGISTRY_STR("RetryTimes"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRetryTimes), REGISTRY_SIZE(RegRetryTimes), 0, 0, 48}, //20131004 MH add for driver indicate packet to OS layer. But in fact, this should be zero. Only OS after win7 support the feature. {REGISTRY_STR("PktIndicate"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPktIndicate), REGISTRY_SIZE(RegPktIndicate), 0, 0, 0xffffffff}, // Default Rx packet filter indicate type. - //21031018 Sean add for 8812 performance mode page size adjustment, format: pubQ:HQ:LQ:NQ + //21031018 Sean add for 8812 performance mode page size adjustment, format: pubQ:HQ:LQ:NQ {REGISTRY_STR("WmmPage"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegWmmPage), REGISTRY_SIZE(RegWmmPage), 0xDB101000, 0, 0xffffffff}, //page size for each queue, each in one byte, pubQ:HQ:LQ:NQ . {REGISTRY_STR("DisableAC"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegDisableAC), REGISTRY_SIZE(RegDisableAC), 0, 0, 1}, // 1: to disable AC wirlessmode {REGISTRY_STR("LedInterval"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegLedInterval), REGISTRY_SIZE(RegLedInterval), 1000, 0, 0xffffffff}, // LED blink interval in ms for Alpha - {REGISTRY_STR("8814auEfuse"), 0,NdisParameterInteger, REGISTRY_OFFSET(Reg8814auEfuse), REGISTRY_SIZE(Reg8814auEfuse), 0, 0, 1}, // 1 to used to update 8814au efuse 0x0E bit 4 to 1 - // 8814A TX: 3/2/1/0/AUX=BIT7/6/5/4 RX: 3/2/1/0/AUX=BIT3/2/1/0 + {REGISTRY_STR("8814auEfuse"), 0,NdisParameterInteger, REGISTRY_OFFSET(Reg8814auEfuse), REGISTRY_SIZE(Reg8814auEfuse), 0, 0, 1}, // 1 to used to update 8814au efuse 0x0E bit 4 to 1 + // 8814A TX: 3/2/1/0/AUX=BIT7/6/5/4 RX: 3/2/1/0/AUX=BIT3/2/1/0 // For example RF= 3T4R = 0xEF=239, RF= 3T3R = 0xEE = 238 RF=2T2R = b01100110 = 0x66 = 102. RF = 1T1R = 0x22 = 34 //8814aValidRFPath BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0 HEX Decimal Remark - //RF-TX RF-RX - // 3 2 1 AUX 3 2 1 AUX + //RF-TX RF-RX + // 3 2 1 AUX 3 2 1 AUX // 3T4R 1 1 1 0 1 1 1 1 0xEF 239 3T4R default setting - // 3T3R 1 1 1 0 1 1 1 0 0xEE 238 - // 2T2R 0 1 1 0 0 1 1 0 0x66 102 - // 1T1R 0 0 1 0 0 0 1 0 0x22 34 - + // 3T3R 1 1 1 0 1 1 1 0 0xEE 238 + // 2T2R 0 1 1 0 0 1 1 0 0x66 102 + // 1T1R 0 0 1 0 0 0 1 0 0x22 34 + // 4T4R 1 1 1 1 1 1 1 1 0xFF 255 Revise Reg to support - // Use WlanCLI_20150326 to execute write reg dowrd 93c 003c0642 / write reg dword 940 093f93f0 + // Use WlanCLI_20150326 to execute write reg dowrd 93c 003c0642 / write reg dword 940 093f93f0 // 2T4R 0 1 1 0 1 1 1 1 0x6F 111 sample - // ?T?R + // ?T?R {REGISTRY_STR("ValidRFPath"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegValidRFPath), REGISTRY_SIZE(RegValidRFPath), 0, 0, 0xff}, {REGISTRY_STR("PreInitMem"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegPreInitMem), REGISTRY_SIZE(RegPreInitMem), 0, 0, 1}, {REGISTRY_STR("88EIOTAction"), 0,NdisParameterInteger, REGISTRY_OFFSET(Reg88EIOTAction), REGISTRY_SIZE(Reg88EIOTAction), 0, 0, 1}, @@ -797,10 +797,10 @@ static MP_REG_ENTRY CommonRegTable[] = { {REGISTRY_STR("bcndelay"), 0,NdisParameterInteger, REGISTRY_OFFSET(Regbcndelay), REGISTRY_SIZE(Regbcndelay), 0, 0, 0xffffffff}, // For beacon delay mechanism, //---------------------------------------------------------------------------- // Download Fw by ROM. - {REGISTRY_STR("RomDLFwEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRomDLFwEnable), REGISTRY_SIZE(RegRomDLFwEnable), 0, 0, 1}, // 0: disable, 1: enable + {REGISTRY_STR("RomDLFwEnable"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegRomDLFwEnable), REGISTRY_SIZE(RegRomDLFwEnable), 0, 0, 1}, // 0: disable, 1: enable //---------------------------------------------------------------------------- // Power off by Fw. RF on/off and IPS in 32K - {REGISTRY_STR("bFwCtrlPwrOff"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFwCtrlPwrOff), REGISTRY_SIZE(RegFwCtrlPwrOff), 0, 0, 1}, // 0: disable, 1: enable + {REGISTRY_STR("bFwCtrlPwrOff"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegFwCtrlPwrOff), REGISTRY_SIZE(RegFwCtrlPwrOff), 0, 0, 1}, // 0: disable, 1: enable // Card disable, shutdown in 32K {REGISTRY_STR("CardDisableInLowClk"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegCardDisableInLowClk), REGISTRY_SIZE(RegCardDisableInLowClk), 0, 0, 1}, // 0: disable, 1: enable // FW IPS level. 0: not enter 32K, 1: enter 32K @@ -809,7 +809,7 @@ static MP_REG_ENTRY CommonRegTable[] = { // For P2P auto channel selection mechanism, added by Roger, 2014.05.15. #if(AUTO_CHNL_SEL_NHM == 1) {REGISTRY_STR("AutoChnlSel"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegAutoChnlSel), REGISTRY_SIZE(RegAutoChnlSel), 0, 0, 1}, // 0: disable, 1: enable -#endif +#endif // WDI LE Hang Detection and Recovery, added by Roger. @@ -827,31 +827,31 @@ static MP_REG_ENTRY CommonRegTable[] = { //---------------------------------------------------------------------------- // SDIO polling interrupt in interrupt handler. Added by tynli, 2015.01.16. - {REGISTRY_STR("SdioPollIntrHandler"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSdioPollIntrHandler), REGISTRY_SIZE(RegSdioPollIntrHandler), 0, 0, 1}, // 0: disable, 1: enable - {REGISTRY_STR("SdioIntrPollingLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSdioIntrPollingLimit), REGISTRY_SIZE(RegSdioIntrPollingLimit), 50, 0, 0xffff}, // polling count + {REGISTRY_STR("SdioPollIntrHandler"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSdioPollIntrHandler), REGISTRY_SIZE(RegSdioPollIntrHandler), 0, 0, 1}, // 0: disable, 1: enable + {REGISTRY_STR("SdioIntrPollingLimit"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSdioIntrPollingLimit), REGISTRY_SIZE(RegSdioIntrPollingLimit), 50, 0, 0xffff}, // polling count //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // Specifies whether to disable P2P_SUPPORT_STATE_RTK_SUPPORT, default is 2 (auto) - // 0: not to disable rtk supported p2p, + // 0: not to disable rtk supported p2p, // 1: to disable rtk supported p2p, // 2: auto - {REGISTRY_STR("DisableRtkSupportedP2P"), 0, NdisParameterInteger, REGISTRY_OFFSET(RegDisableRtkSupportedP2P), REGISTRY_SIZE(RegDisableRtkSupportedP2P), 2, 0, 2}, + {REGISTRY_STR("DisableRtkSupportedP2P"), 0, NdisParameterInteger, REGISTRY_OFFSET(RegDisableRtkSupportedP2P), REGISTRY_SIZE(RegDisableRtkSupportedP2P), 2, 0, 2}, //---------------------------------------------------------------------------- // 20150715 MH N6 Send packet complete immediately for small each TX packet like multicast RTP script. // Bit15 = enable=1 or disable=0 biit 0~14 copy for local buffer number // According to 8192EU test in XP/win7 with multicast small each send packet, the performance can improve as USB-559 description. - //The registry is the ratio to send packet by copy packet after receivein the NDIS packet or NBL buffer. + //The registry is the ratio to send packet by copy packet after receivein the NDIS packet or NBL buffer. {REGISTRY_STR("TxSendAsap"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegTxSendAsap), REGISTRY_SIZE(RegTxSendAsap), 0x0000, 0, 0xffff}, // Bit15 = enable=1 or disable=0 biit 0~14 copy for local buffer number - // MAC Address Randomization WDI - {REGISTRY_STR("SupportMACRandom"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSupportMACRandom), REGISTRY_SIZE(RegSupportMACRandom), 0, 0, 1}, + // MAC Address Randomization WDI + {REGISTRY_STR("SupportMACRandom"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSupportMACRandom), REGISTRY_SIZE(RegSupportMACRandom), 0, 0, 1}, // Cancel and suspend programmed Timer before entering Dx low power state to resolve premature wake from Mobile SoC off, added by Roger, 2016.01.15 - {REGISTRY_STR("SuspendTimerInLowPwr"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSuspendTimerInLowPwr), REGISTRY_SIZE(RegSuspendTimerInLowPwr), 0, 0, 1}, + {REGISTRY_STR("SuspendTimerInLowPwr"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSuspendTimerInLowPwr), REGISTRY_SIZE(RegSuspendTimerInLowPwr), 0, 0, 1}, - // eCSA support WDI + // eCSA support WDI {REGISTRY_STR("SupportECSA"), 0,NdisParameterInteger, REGISTRY_OFFSET(RegSupportECSA), REGISTRY_SIZE(RegSupportECSA), 0, 0, 1}, // Fast transition 11r WDI diff --git a/network/wlan/WDI/HEADER/RmDef.h b/network/wlan/WDI/HEADER/RmDef.h index ed5cdddeb..b0cd4a36c 100644 --- a/network/wlan/WDI/HEADER/RmDef.h +++ b/network/wlan/WDI/HEADER/RmDef.h @@ -29,16 +29,16 @@ typedef struct _RT_RM_REQUESTS{ // Source address from the request u1Byte SrcAddr[6]; - - // Destination of the Radio Measurement Request frame. - u1Byte DestAddr[6]; + + // Destination of the Radio Measurement Request frame. + u1Byte DestAddr[6]; // Maximal measurement duration in these requests, in TU. u2Byte MaxDuration; - // Relative start time in us. + // Relative start time in us. u4Byte StartTime; - + // Dialog Token. u2Byte DialogToken; @@ -54,7 +54,7 @@ typedef struct _RT_RM_REQUESTS{ // // Radio Measurement Reports. // -#define MAX_RM_RPT_ELES_BUF 1500 +#define MAX_RM_RPT_ELES_BUF 1500 typedef struct _RT_RM_REPORTS{ // This rm report is valid BOOLEAN bValid; @@ -73,7 +73,7 @@ typedef struct _RT_RM_REPORTS{ typedef struct _TSM_INFO{ u1Byte State; // 1: Enable, 0: disable. u2Byte MeasurementInterval; // in TU. - u2Byte TimeOutTickNum; // # of tick before timeout, unit of tick is TSM_TIMER_PERIOD. + u2Byte TimeOutTickNum; // # of tick before timeout, unit of tick is TSM_TIMER_PERIOD. u2Byte TickCounter; // A counter to keep tick passed since last timeout event. }TSM_INFO, *PTSM_INFO; @@ -83,27 +83,27 @@ typedef struct _TSM_INFO{ typedef struct _RT_RM_INFO{ DECLARE_RT_OBJECT(RT_RM_INFO); - // TRUE if we are CCX RM capable, FALSE o.w.. + // TRUE if we are CCX RM capable, FALSE o.w.. BOOLEAN bRegCcxRm; - // TRUE if current BSS is CCX Radio Measurement Enable, FALSE o.w.. + // TRUE if current BSS is CCX Radio Measurement Enable, FALSE o.w.. BOOLEAN bBssCcxRmEnable; - // TRUE if we are doing one of request in RmRequests, FALSE otherwise. + // TRUE if we are doing one of request in RmRequests, FALSE otherwise. // Note that, it is protected by RT_RM_SPINLOCK. - BOOLEAN bGoingOn; + BOOLEAN bGoingOn; // Postive value means upper limit of non-serving channel measurment duration, - // in unit of TU. 0 means unlimited, postive value + // in unit of TU. 0 means unlimited, postive value u2Byte OffLineDurUpLimit; // Radio Measurement Requests to handle. - RT_RM_REQUESTS RmRequests; + RT_RM_REQUESTS RmRequests; // Radio Measurement Reports to RmRequests. RT_RM_REPORTS RmReports; - + // Hash table to keep frame report result. // Note that, hFrameReportTable and related operation are protected by RT_RM_SPINLOCK. RT_HASH_TABLE_HANDLE hFrameReportTable; @@ -114,7 +114,7 @@ typedef struct _RT_RM_INFO{ // Traffic Stream Metrics related. TSM_INFO TsmInfo[MAX_STA_TS_COUNT]; // Information about TSM for each TS. RT_TIMER TsmTimer; // TSM timer, see TSM_TIMER_PERIOD for its timeout period. - u1Byte TsmTimerRefCnt; // Number of TS using TsmTimer. + u1Byte TsmTimerRefCnt; // Number of TS using TsmTimer. RT_RM_REPORTS TsmReport; // Buffer and setting for the IAPP frame with TSM report. // CCX Radio Measurement /dot11k RM workitem @@ -130,7 +130,7 @@ typedef struct _RT_RM_INFO{ typedef struct _RT_RM_REQ_PARAM{ // TRUE to clear previous result before starting measurement; // FALSE to accumulate measurement result. - BOOLEAN bToClear; + BOOLEAN bToClear; // Measurement duration in TU. u1Byte Duration; @@ -163,11 +163,11 @@ typedef struct _BEACON_REQUEST{ // // Max number of STA to monitor, it is bound to size of frame report: -// (1514 - 12 - 24 - 8 - 4) / 14 = 104.14. +// (1514 - 12 - 24 - 8 - 4) / 14 = 104.14. // I pick 64 for computaion time and memory space consideration. // 070608, by rcnjko. // -#define MAX_NUM_FRPT_ELEMENT 64 +#define MAX_NUM_FRPT_ELEMENT 64 // Ref: CCX 2 spec, Figure S36-14. @@ -196,14 +196,14 @@ typedef struct _FRAME_REPORT{ // // Signal strength of a STA. -// It is a value object used in the hash table, hFrameReportTable. +// It is a value object used in the hash table, hFrameReportTable. // typedef struct _RT_RM_STA_POWER{ // // We will use TA and BSSID as key to hash. // DECLARE_RT_HASH_ENTRY; - + int RxSignalSum; // in dBm, sum of signal power of frames received. int NumFrames; // number of frames received. }RT_RM_STA_POWER, *PRT_RM_STA_POWER; @@ -262,7 +262,7 @@ typedef struct _NOISE_HISTOGRAM_REPORT{ }NOISE_HISTOGRAM_REPORT, *PNOISE_HISTOGRAM_REPORT; -// Ref: CCX 2 spec, Figure S36-5 +// Ref: CCX 2 spec, Figure S36-5 #define RM_REQ_MODE_PARALLEL BIT0 #define RM_REQ_MODE_ENABLE BIT1 #define RM_REQ_MODE_REPORT BIT3 @@ -292,7 +292,7 @@ typedef struct _MEASUREMENT_REQUEST_ELEMENT{ }MEASUREMENT_REQUEST_ELEMENT, *PMEASUREMENT_REQUEST_ELEMENT; -// Ref: CCX 2 spec, Figure S36-12 +// Ref: CCX 2 spec, Figure S36-12 #define RM_RPT_MODE_PARALLEL BIT0 #define RM_RPT_MODE_INCAPABLE BIT1 #define RM_RPT_MODE_REFUSED BIT2 @@ -341,7 +341,7 @@ typedef struct _RM_CCX_REQUEST_PACKET{ u2Byte DialogToken; // Non-zero value to identify request/report transaction. u1Byte ActivationDelay; // # of TBTTs until the interval specified by the Measurement Offset field starts. u1Byte MeasurementOffset; // TUs after the Activation Delay. - u1Byte Elements[1]; // Actual length is ((IappIdLen & 0x0FFF) - 20) + u1Byte Elements[1]; // Actual length is ((IappIdLen & 0x0FFF) - 20) }RM_CCX_REQUEST_PACKET, *PRM_CCX_REQUEST_PACKET; @@ -355,9 +355,9 @@ typedef struct _RM_REPORT_PACKET{ u1Byte IappType; // 0x32 indicates Radio Measurement. u1Byte IappSubtype; // 0x81 indicates response. u1Byte DstAddr[6]; // Unused, it should be all zeros. - u1Byte SrcAddr[6]; // Reporting STA's MAC address. + u1Byte SrcAddr[6]; // Reporting STA's MAC address. u2Byte DialogToken; // Non-zero value to identify request/report transaction. - u1Byte Elements[1]; // Actual length is ((IappIdLen & 0x0FFF) - 18) + u1Byte Elements[1]; // Actual length is ((IappIdLen & 0x0FFF) - 18) }RM_REPORT_PACKET, *PRM_REPORT_PACKET; // diff --git a/network/wlan/WDI/HEADER/SecurityType.h b/network/wlan/WDI/HEADER/SecurityType.h index e3cab0ca2..100b3146d 100644 --- a/network/wlan/WDI/HEADER/SecurityType.h +++ b/network/wlan/WDI/HEADER/SecurityType.h @@ -5,7 +5,7 @@ #define KEY_BUF_SIZE 5 -#define TKIP_ENC_KEY_LEN 16 // Added by Annie, 2005-07-05. +#define TKIP_ENC_KEY_LEN 16 // Added by Annie, 2005-07-05. #define TKIP_MIC_KEY_LEN 8 #define TKIP_MIC_LEN 8 #define TKIP_KEY_LEN (TKIP_ENC_KEY_LEN+TKIP_MIC_KEY_LEN*2) @@ -193,12 +193,12 @@ typedef enum _RT_AUTH_MODE RT_802_11AuthModeWPA2PSK, RT_802_11AuthModeCCKM, RT_802_11AuthModeWAPI, - RT_802_11AuthModeCertificateWAPI, + RT_802_11AuthModeCertificateWAPI, //===== Add new Mode above this line=====// RT_802_11AuthModeMax, RT_NETWORK_EAP = 0x80, - + } RT_AUTH_MODE, *PRT_AUTH_MODE; typedef enum _RT_802_11_WEP_STATUS @@ -211,9 +211,9 @@ typedef enum _RT_802_11_WEP_STATUS RT802_11Encryption1KeyAbsent = RT802_11WEPKeyAbsent, RT802_11WEPNotSupported, RT802_11EncryptionNotSupported = RT802_11WEPNotSupported, - RT802_11Encryption2Enabled, + RT802_11Encryption2Enabled, RT802_11Encryption2KeyAbsent, - RT802_11Encryption3Enabled, + RT802_11Encryption3Enabled, RT802_11Encryption3KeyAbsent, Wapi_Encryption, Wapi_Certificate @@ -354,7 +354,7 @@ typedef struct _RT_SECURITY_T{ //The pointer of Pairwise Key, it always points to KeyBuf[4] pu1Byte PairwiseKey; - + u1Byte TxMICKey[TKIP_MIC_KEY_LEN]; // Tx MIC Key u1Byte RxMICKey[TKIP_MIC_KEY_LEN]; // Rx MIC Key @@ -382,13 +382,13 @@ typedef struct _RT_SECURITY_T{ RT_SECURITY_LEVEL SecLvl; u1Byte AssocInfo[512]; - + //--------------------------------------------------------------------------- // For MIC failure. //--------------------------------------------------------------------------- u8Byte LastPairewiseTKIPMICErrorTime; // Last pairewise key TKIP MIC error happen time or 0 if it has not happed in 60 seconds. BOOLEAN bToDisassocAfterMICFailureReportSend; // Disassociate from the AP for twice MIC failure in 60 seconds. - RT_DENY_BSSID DenyBssidList[MAX_DENY_BSSID_LIST_CNT]; // List of BSS denied by us for MIC failure. + RT_DENY_BSSID DenyBssidList[MAX_DENY_BSSID_LIST_CNT]; // List of BSS denied by us for MIC failure. //--------------------------------------------------------------------------- @@ -407,7 +407,7 @@ typedef struct _RT_SECURITY_T{ AESCCMP_PACKET AESCCMP_Packet; AESCCMP_PACKET RX_AESCCMP_Packet; u4Byte AESCCMPMicLen ; - + // // For CKIP. Revised by Annie, 2006-08-14. // @@ -420,16 +420,16 @@ typedef struct _RT_SECURITY_T{ u1Byte CCKMReqIEBuf[MAX_CCKM_IE_REQ_LEN]; OCTET_STRING CCKMIE; u1Byte CCKMIEBuf[MAX_CCKM_IE_LEN]; - + //-------------------------------------- // For NDIS6 RSNA, by CCW //-------------------------------------- // TODO: remvoe our group key from PerStaDefKeyTable[] PER_STA_DEFAULT_KEY_ENTRY PerStaDefKeyTable[MAX_NUM_PER_STA_KEY]; // Keep group key of each STA in the IBSS. PER_STA_MPAKEY_ENTRY MAPKEYTable[MAX_NUM_PER_STA_KEY]; // Keep pairwise key of each STA in the IBSS. - + // - // For Check IV + // For Check IV // u8Byte RXMutiIV; // Rx multicast IV for IV replay check, and 0 means do not check IV replay. u8Byte RXUntiIV; // Rx unicast IV for IV replay check, and 0 means do not check IV replay. @@ -520,7 +520,7 @@ typedef struct _RT_SECURITY_T{ // // Definition of events in ASM (Authenticator state machine) -typedef enum _ASM_EVENT_ID { +typedef enum _ASM_EVENT_ID { ASMEID_NoEvent, ASMEID_AssociationRequest, ASMEID_ReAssociationRequest, @@ -548,7 +548,7 @@ typedef enum _ASM_PAIRWISEKEY_STATE { ASMPS_DISCONNECTED, ASMPS_AUTHENTICATION, ASMPS_AUTHENTICATION2, // described on Fig.53. 802.11i D3.0. - ASMPS_INITPMK, + ASMPS_INITPMK, ASMPS_INITPSK, ASMPS_PTKSTART, ASMPS_PTKINITNEGOTIATING, @@ -557,7 +557,7 @@ typedef enum _ASM_PAIRWISEKEY_STATE { ASMPS_MICFAILURE, ASMPS_INTEGRITYFAILURE, // Added by Annie, 2005-07-18. ASMPS_KEYUPDATE, - ASMPS_ERRORHANDLE, // Added states + ASMPS_ERRORHANDLE, // Added states }ASM_PAIRWISEKEY_STATE, *PASM_PAIRWISEKEY_STATE; @@ -595,7 +595,7 @@ typedef enum _PORT_SECURE_TYPE { typedef struct _AUTH_PKEY_MGNT_TAG{ - + //2 machine state ASM_PAIRWISEKEY_STATE PrState; @@ -617,7 +617,7 @@ typedef struct _AUTH_PKEY_MGNT_TAG{ RT_ENC_ALG PairwiseCipherSuite[MAX_CIPHER_SUITE_NUM]; u2Byte PairwiseCipherCount; AKM_SUITE_TYPE AuthSuite[MAX_AUTH_SUITE_NUM]; - u2Byte AuthSuiteCount; + u2Byte AuthSuiteCount; BOOLEAN bPreAuth; u1Byte NumOfPTKReplayCounter; @@ -650,14 +650,14 @@ typedef struct _AUTH_PKEY_MGNT_TAG{ pu1Byte TempEncKey; // Temporal Encryption Key pu1Byte TxMICKey; // Tx MIC Key pu1Byte RxMICKey; // Rx MIC Key - + #if 1 //Added by Jay 0712 for security IV u8Byte TxIV; u8Byte RxIV; u8Byte KeyRSC; #endif #if 1//Added by Jay 0713 for processing integrity failure - u8Byte TimeSlot_lastIntegrityFailed; + u8Byte TimeSlot_lastIntegrityFailed; #endif int MicErrorCnt; // Added by Annie for debug, 2005-07-25. @@ -677,7 +677,7 @@ typedef struct _AUTH_GLOBAL_KEY_TAG int currentId; // Id for current authentication session int receivedId; - + OCTET_STRING EAPOLMsgRecvd; //The Overall 802.1x message OCTET_STRING EapolKeyMsgRecvd; //The start point of eapol-key payload @@ -690,14 +690,14 @@ typedef struct _AUTH_GLOBAL_KEY_TAG pu1Byte TxMICKey; // Group Tx MIC Key // Added by Annie, 2005-07-06. pu1Byte RxMICKey; // Group Rx MIC Key u1Byte AESGTK[AESCCMP_BLK_SIZE_TOTAL]; - + // AUTH_GKEY_MGNT_TAG groupKeyInfo; //marked by Annie: It seems not necessary. u1Byte ANonce[KEY_NONCE_LEN]; u1Byte GNonce[KEY_NONCE_LEN]; // u8Byte GroupReplayCounter; // Added by Annie, 2005-07-02. u8Byte KeyRSC; // Added by Annie, 2005-07-02 // End of Annie add. - + u1Byte MaxRetryCounts; u1Byte EventId; @@ -716,7 +716,7 @@ typedef struct _AUTH_GLOBAL_KEY_TAG // struct _Dot1x_Authenticator *auth; //End Added WPA #if 1 //Added by Jay 0713 for processing integrity failure - u8Byte TimeSlot_IntegrityFail2; + u8Byte TimeSlot_IntegrityFail2; #endif } AUTH_GLOBAL_KEY_TAG, *PAUTH_GLOBAL_KEY_TAG; @@ -730,7 +730,7 @@ typedef struct _AUTH_GLOBAL_KEY_TAG ) // -// Higher layer meaning and related context information for security purpose. +// Higher layer meaning and related context information for security purpose. // 2006.01.08, by rcnjko. // typedef u4Byte RT_SEC_PROT_INFO; diff --git a/network/wlan/WDI/HEADER/TDLSType.h b/network/wlan/WDI/HEADER/TDLSType.h index d81c45681..8733625e5 100644 --- a/network/wlan/WDI/HEADER/TDLSType.h +++ b/network/wlan/WDI/HEADER/TDLSType.h @@ -144,11 +144,11 @@ enum _TDLS_AGGR_RATIO{ TDLS_AGGR_RATIO_20MHZ = 1, TDLS_AGGR_RATIO_40MHZ = 2 }; - + enum _TDLSSecurityState{ TDLSStateSuccess = 0, TDLSStateDiscard = 1, - TDLSStateFail = 2 + TDLSStateFail = 2 }; enum _TDLS_CS_STAGE{ @@ -300,7 +300,7 @@ typedef struct _TDLS_LINK_INFO{ BOOLEAN BssbShortGIEnabled; LINK_CAP BssCapInfo; RT_ENC_ALG BssEncAlgorithm; - + // Link maintenance u2Byte KeepConnectCount; @@ -329,7 +329,7 @@ typedef struct _TDLS_BLOCKED_RECORD{ ReadEF2Byte((pu1Byte)(_pStart)) #define GET_TDLS_RSNIE_PAIRWISESUITECOUNT(_pStart)\ ReadEF2Byte((pu1Byte)(_pStart)+6) - + typedef struct _FAST_BSS_TRANSITION{ u1Byte MICControl[2]; @@ -408,7 +408,7 @@ typedef struct _TDLS_RECORD{ u1Byte PTICount; BOOLEAN bEnableCS; u1Byte RejectCnt; // For marvell - BOOLEAN bSupportChnlSwitch; // Support Channel Switch + BOOLEAN bSupportChnlSwitch; // Support Channel Switch TDLS_CHNLSWITCH_INFO ChnlSwitchInfo; u2Byte CSstate; u1Byte TargetState; @@ -422,7 +422,7 @@ typedef struct _TDLS_RECORD{ typedef struct _TDLS_TINFO{ DECLARE_RT_OBJECT(_TDLS_TINFO); - + BOOLEAN bTDLSEnable; BOOLEAN bDMEnable; BOOLEAN bEnableHT; @@ -462,12 +462,12 @@ typedef struct _TDLS_TINFO{ BOOLEAN bKeepTPKTimer; u1Byte SwitchChannel; BOOLEAN SwitchBandwidth40MHz; - + RT_LIST_ENTRY TDLS_Admit_List; RT_LIST_ENTRY TDLS_Unused_List; TDLS_RECORD TDLSRecord[MAX_TDLS_PAIR]; u1Byte NumInAdmitList; - + BOOLEAN bAcceptWeakSec; }TDLS_TINFO, *PTDLS_TINFO; diff --git a/network/wlan/WDI/HEADER/TSType.h b/network/wlan/WDI/HEADER/TSType.h index 70e2c2bd2..94d99bc43 100644 --- a/network/wlan/WDI/HEADER/TSType.h +++ b/network/wlan/WDI/HEADER/TSType.h @@ -10,7 +10,7 @@ // This define the Tx/Rx directions typedef enum _TR_SELECT { - TX_DIR = 0, + TX_DIR = 0, RX_DIR = 1, } TR_SELECT, *PTR_SELECT; @@ -46,7 +46,7 @@ typedef struct _RX_TS_RECORD { u2Byte RxLastSeqNum; u1Byte RxLastFragNum; u4Byte RxBatchCount; - u4Byte RxTotalSubframeCount; //for AMSDU subframe + u4Byte RxTotalSubframeCount; //for AMSDU subframe // QOS_DL_RECORD DLRecord; } RX_TS_RECORD, *PRX_TS_RECORD; diff --git a/network/wlan/WDI/HEADER/TypeDef.h b/network/wlan/WDI/HEADER/TypeDef.h index acdcea3c3..e56c2211f 100644 --- a/network/wlan/WDI/HEADER/TypeDef.h +++ b/network/wlan/WDI/HEADER/TypeDef.h @@ -6,7 +6,7 @@ // MAX_TX_QUEUE Should be the MAX Tx queue number //============================================================================= -#define MAX_TX_QUEUE 9 // BK, BE, VI, VO, HCCA, MANAGEMENT, COMMAND, HIGH, BEACON. +#define MAX_TX_QUEUE 9 // BK, BE, VI, VO, HCCA, MANAGEMENT, COMMAND, HIGH, BEACON. #define MAX_RX_QUEUE 1 // MSDU packet queue, After C serie no Rx Command Queue // @@ -28,12 +28,12 @@ #define MAX_TX_REG_NUM 20 #define MAX_RX_REG_NUM 20 //============================================================= -// TCB buffer management related definition +// TCB buffer management related definition //============================================================= #define MAX_FIRMWARE_INFORMATION_SIZE 32 //2006/04/30 by Emily forRTL8190 // TODO: MAX_802_11_HEADER_LENGTH should be hardware platform independent -// Emily: The reason to set this value differently on different hardware platform -// is because if we set this value more than 40 , and use 8187b with TKIP mode, +// Emily: The reason to set this value differently on different hardware platform +// is because if we set this value more than 40 , and use 8187b with TKIP mode, // system crash for some unknown reason. 2006.10.20. After we fix this bug, we // should modify this definition @@ -57,7 +57,7 @@ #define ASSOCIATE_ENTRY_NUM 64 // Max size of AsocEntry[]. #define MAX_LOCKED_STA_LIST_NUM 32 // Max size of LockedSTAList. -#define MAX_STA_DATARATE_LIST_NUM ASSOCIATE_ENTRY_NUM // Max size of ForcedDataRateStaList[]. +#define MAX_STA_DATARATE_LIST_NUM ASSOCIATE_ENTRY_NUM // Max size of ForcedDataRateStaList[]. // Excluded MAC address list. @@ -105,8 +105,8 @@ #define BATCH_INDICATION_STABLE_NUM 4 #define BATCH_INDICATION_START_POINT 5000//3000 //YJ,mod for 88E,111229 #define BATCH_INDICATION_PERCENTAGE_OF_DATA_RATE 38 -#define MAX_BATCH_INDICATION_NUMBER 24 -#define MAX_BATCH_INDICATION_NUMBER_8814A 127 //add by ylb 20130729 +#define MAX_BATCH_INDICATION_NUMBER 24 +#define MAX_BATCH_INDICATION_NUMBER_8814A 127 //add by ylb 20130729 #define MAX_TCP_SEQ_ENTRY_NUM 512 @@ -188,7 +188,7 @@ typedef enum _PS_BBREGBACKUP{ typedef enum _PA_MODE { PA_MODE_EXTERNAL = 0x00, PA_MODE_INTERNAL_SP3T = 0x01, - PA_MODE_INTERNAL_SPDT = 0x02 + PA_MODE_INTERNAL_SPDT = 0x02 } PA_MODE; // Added for different registry settings to adjust TxPwr index. added by Roger, 2010.03.09. @@ -196,7 +196,7 @@ typedef enum _TX_PWR_PERCENTAGE{ TX_PWR_PERCENTAGE_0 = 0x01, // 12.5% TX_PWR_PERCENTAGE_1 = 0x02, // 25% TX_PWR_PERCENTAGE_2 = 0x04, // 50% - TX_PWR_PERCENTAGE_3 = 0x08, //100%, default target output power. + TX_PWR_PERCENTAGE_3 = 0x08, //100%, default target output power. } TX_PWR_PERCENTAGE; @@ -239,7 +239,7 @@ typedef enum _TX_PWR_PERCENTAGE{ // Auto channel selection mechanism for P2P GO, i.e., Operation channel // 2015.05.15. // -#if (AUTO_CHNL_SEL_NHM ==1) +#if (AUTO_CHNL_SEL_NHM ==1) #define IS_AUTO_CHNL_SUPPORT(_Adapter) (GetDefaultAdapter(_Adapter)->MgntInfo.AutoChnlSel.bAutoChnlSel) #define IS_AUTO_CHNL_IN_PROGRESS(_Adapter) (_Adapter->MgntInfo.AutoChnlSel.AutoChnlSelCalInProgress) #define GET_AUTO_CHNL_SELECTED_NUM(_Adapter) (GetDefaultAdapter(_Adapter)->MgntInfo.AutoChnlSel.AutoChnlNumberSelected) @@ -287,11 +287,11 @@ typedef enum _AUTO_CHNL_SEL_STATE{ } AUTO_CHNL_SEL_STATE, *PAUTO_CHNL_SEL_STATE; typedef struct _RT_AUTO_CHNL_SEL -{ - BOOLEAN bAutoChnlSel; +{ + BOOLEAN bAutoChnlSel; RT_WORK_ITEM AutoChnlSelWorkitem; u1Byte AutoChnlSelCalInProgress; - u1Byte AutoChnlStep; + u1Byte AutoChnlStep; u2Byte AutoChnlSelPeriod; // NHM measured period u1Byte AutoChnlNumberSelected; // Channel number selected by NHM }RT_AUTO_CHNL_SEL, *PRT_AUTO_CHNL_SEL; @@ -341,7 +341,7 @@ typedef enum _RT_JOIN_ACTION{ typedef enum _RT_LED_ASSOC_STATE{ LED_ASSOC_SECURITY_BEGIN = 1, - LED_ASSOC_SECURITY_END = 2, + LED_ASSOC_SECURITY_END = 2, LED_ASSOC_SECURITY_NONE = 3, }RT_LED_ASSOC_STATE; @@ -372,7 +372,7 @@ typedef enum{ // Indication of roaming status, by Bruce, 2008-05-16. // typedef enum _RT_ROAM_TYPE{ - RT_ROAMING_NONE = 0, // Non-roaming. + RT_ROAMING_NONE = 0, // Non-roaming. RT_ROAMING_NORMAL, // Standard 802.11 roaming procedure. (= bRoaming) RT_ROAMING_BY_DEAUTH, // Not real 802.11 roaming, just for Ndis event to keep re-connecting to the original AP. ( = bRoamingByDeauth) RT_ROAMING_BY_SLEEP, // Not real 802.11 roaming, just for Ndis event to keep re-connecting to the original AP after S3/S4. ( = bRoamingbySleep) @@ -404,7 +404,7 @@ typedef enum _IO_READ_WRITE_TYPE{ typedef enum _IO_READ_WITE_OPERATION{ IO_READ_WRITE_OPERATION_READ = 0, IO_READ_WRITE_OPERATION_WRITE = 1, -}IO_READ_WRITE_OPERATION, *PIO_READ_WRITE_OPERATION; +}IO_READ_WRITE_OPERATION, *PIO_READ_WRITE_OPERATION; //end test joseph typedef enum _MAC_FILTER_TYPE{ @@ -448,8 +448,8 @@ typedef enum _RT_NDIS_VERSION{ RT_NDIS_VERSION_6_1, RT_NDIS_VERSION_6_20, RT_NDIS_VERSION_6_30, - RT_NDIS_VERSION_6_40, - RT_NDIS_VERSION_6_50, + RT_NDIS_VERSION_6_40, + RT_NDIS_VERSION_6_50, }RT_NDIS_VERSION, *PRT_NDIS_VERSION; typedef enum _RT_STA_INDICATE_STATE @@ -491,13 +491,13 @@ typedef struct _RT_GEN_TEMP_BUFFER{ typedef enum _TWO_PORT_STATUS { - TWO_PORT_STATUS__DEFAULT_ONLY, // Win7, XP - TWO_PORT_STATUS__EXTENSION_ONLY, // Win7, XP(AP) - TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT, // Win7, XP + TWO_PORT_STATUS__DEFAULT_ONLY, // Win7, XP + TWO_PORT_STATUS__EXTENSION_ONLY, // Win7, XP(AP) + TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT, // Win7, XP TWO_PORT_STATUS__DEFAULT_G_EXTENSION_N20, // Win7, XP TWO_PORT_STATUS__DEFAULT_A_EXTENSION_N20, // Win7, XP - TWO_PORT_STATUS__ADHOC, // Win7, XP - TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE // Win7, XP + TWO_PORT_STATUS__ADHOC, // Win7, XP + TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE // Win7, XP }TWO_PORT_STATUS; typedef enum _TWO_PORT_SHARED_OBJECT @@ -524,13 +524,13 @@ enum _TX_IPTYPE{ typedef struct _RT_RFD_STATUS{ // // The section must be the same as _ODM_Phy_Status_Info_ If someone add one - // element in ODM structure you need to update the element in the RFD status + // element in ODM structure you need to update the element in the RFD status // structure and in the end of the relative area. // // _ODM_Phy_Status_Info_ Start // - u4Byte RxPWDBAll; - u1Byte SignalQuality; // in 0-100 index. + u4Byte RxPWDBAll; + u1Byte SignalQuality; // in 0-100 index. s1Byte RxMIMOSignalQuality[4]; //per-path's EVM u1Byte RxMIMOEVMdbm[4]; //per-path's EVM dbm u1Byte RxMIMOSignalStrength[4];// in 0~100 index @@ -540,11 +540,11 @@ typedef struct _RT_RFD_STATUS{ s1Byte RxPower; // in dBm Translate from PWdB s1Byte RecvSignalPower; // Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures. - u1Byte BTRxRSSIPercentage; + u1Byte BTRxRSSIPercentage; u1Byte SignalStrength; // in 0-100 index. s1Byte RxPwr[4]; //per-path's pwdb - s1Byte RxSNR[4]; //per-path's SNR + s1Byte RxSNR[4]; //per-path's SNR #if ((RTL8822B_SUPPORT == 1) || (RTL8723D_SUPPORT == 1)) u1Byte RxCount:2; /* RX path counter---*/ u1Byte BandWidth:2; @@ -564,11 +564,11 @@ typedef struct _RT_RFD_STATUS{ // // The section must be the same as _ODM_Per_Pkt_Info_ If someone add one - // element in ODM structure you need to update the element in the RFD status + // element in ODM structure you need to update the element in the RFD status // structure and in the end of the relative area. // // _ODM_Per_Pkt_Info_ Start - // + // u1Byte RawData; // Accordign Luke, ODM want to use raw data. u1Byte StationID; BOOLEAN bPacketMatchBSSID; @@ -583,7 +583,7 @@ typedef struct _RT_RFD_STATUS{ u1Byte DataRate; BOOLEAN bIsCCK; - + u2Byte bHwError:1; u2Byte bCRC:1; u2Byte bICV:1; @@ -608,14 +608,14 @@ typedef struct _RT_RFD_STATUS{ u1Byte RxDrvInfoSize; u1Byte RxBufShift; - u1Byte PacketReportType; - + u1Byte PacketReportType; + u2Byte Seq_Num; PRX_TS_RECORD pRxTS; - + u4Byte MacID; u1Byte WakeMatch; - + u4Byte MacIDValidEntry[2]; // 64 bits present 64 entry. BOOLEAN bForward; @@ -681,7 +681,7 @@ typedef struct _RT_TCB{ //add by ylb for ExtTxBD BOOLEAN isUseExtTxBDBlock; - RT_LIST_ENTRY ExtTxBDBlockUsedQueue; + RT_LIST_ENTRY ExtTxBDBlockUsedQueue; //2004/07/22, kcwu STA_ENC_INFO_T EncInfo; @@ -738,11 +738,11 @@ typedef struct _RT_TCB{ u1Byte SubHdrIndexAry[AMSDU_MAX_NUM]; // TxFeedback Tcb Context Place Holder for Private Data: ----------------------------- - // + Only access this private data inside the module by TxFeedbackGetTcbZone() + // + Only access this private data inside the module by TxFeedbackGetTcbZone() PRIVATE_DATA_ZONE TxFeedbackTcbZone[TX_FEEDBACK_SIZE_OF_TCB_ZONE]; // ---------------------------------------------------------------------------- -//1 The section is used for shortcut entry. +//1 The section is used for shortcut entry. /******************************************************************************************* Sinda 2011/12/09 1. All of these variable used by RT_TCB and TXSC_TCB_ENTRY. @@ -763,18 +763,18 @@ Sinda 2011/12/09 u1Byte bLDPC:1; u1Byte bSTBC:1; u1Byte bEncrypt:1; - u1Byte bUseShortPreamble:1; + u1Byte bUseShortPreamble:1; u1Byte bUseShortGI:1; //This Match "SHORT" field in TxFwInfo in datasheet. u1Byte bSpecifShortGI:1; u1Byte bTxDisableRateFallBack:1; u1Byte bTxUseDriverAssingedRate:1; u1Byte bBroadcast:1; - u1Byte bMulticast:1; + u1Byte bMulticast:1; u1Byte bBTTxPacket:1; u1Byte bFromUpperLayer:1; u1Byte bNeedAckReply:1; - u1Byte bNeedCRCAppend:1; + u1Byte bNeedCRCAppend:1; u1Byte bTxEnableSwCalcDur:1; u1Byte bTxCalculatedSwDur:1; @@ -782,7 +782,7 @@ Sinda 2011/12/09 u1Byte RTSSC; u1Byte RTSCCA; u1Byte RTSBW; - u2Byte RTSRate; + u2Byte RTSRate; u1Byte bHwProtection:1; u1Byte bCTSEnable:1; u1Byte bRTSEnable:1; @@ -804,26 +804,26 @@ Sinda 2011/12/09 u1Byte macId; u1Byte OdmAid; // For ODM Luke's requirement for antenna switch. u2Byte P_AID; - u1Byte G_ID; + u1Byte G_ID; u1Byte RATRIndex; // BT u1Byte BT_macId; - + BOOLEAN bTDLPacket; BOOLEAN bNeedTxReport; BOOLEAN bSendPTIRsp; BOOLEAN bSleepPkt; // Add for TCpChecksum - u4Byte TcpOffloadMode; + u4Byte TcpOffloadMode; u4Byte MACHeardLen; -//1 The section is used for shortcut entry. +//1 The section is used for shortcut entry. s1Byte SNForShortcut; CHANNEL_WIDTH BWOfPacket; - + u2Byte CurrentWritePoint; u8Byte sysTime[4]; @@ -854,7 +854,7 @@ typedef enum _RX_IPVER{ IPV6 = 1, } RX_IPVER, *PRX_IPVER; -typedef enum _RX_MAC_PACKET_TYPE { +typedef enum _RX_MAC_PACKET_TYPE { RXPacketTypeUndefined = 0, RXPacketTypeUnicast = 1, RXPacketTypeMulticast = 2, @@ -867,18 +867,18 @@ typedef struct _RX_FILTER_INFO{ pu1Byte pDA; pu1Byte pSA; u1Byte PacketType; // RX_PACKET_TYPE - pu1Byte pEtherType; // 2 bytes : IPv4 , IPv6 , ARP ... + pu1Byte pEtherType; // 2 bytes : IPv4 , IPv6 , ARP ... // IP - pu1Byte ARPOption; // 2 bytes Request or Response - pu1Byte ARPSPA; // 4 bytes ARP Sender IP - pu1Byte ARPTPA; // 4 bytes ARP Target IP + pu1Byte ARPOption; // 2 bytes Request or Response + pu1Byte ARPSPA; // 4 bytes ARP Sender IP + pu1Byte ARPTPA; // 4 bytes ARP Target IP u1Byte Protocol; // UDP : 0x11 , TCP : 0x06 //UDP pu1Byte pDestinationPort; // 2 bytes }RX_FILTER_INFO,*PRX_FILTER_INFO; -typedef struct _RT_RFD{ - RT_LIST_ENTRY List; +typedef struct _RT_RFD{ + RT_LIST_ENTRY List; u2Byte PacketLength; // Total packet length: Must equal to sum of all FragLength u2Byte FragLength; // FragLength should equal to PacketLength in non-fragment case u2Byte FragOffset; // Data offset for this fragment @@ -892,7 +892,7 @@ typedef struct _RT_RFD{ PVOID DriverReserved; // 2007/01/12 MH add a element to record RX queue ID for test u2Byte queue_id; - struct _RT_RFD *NextRfd; + struct _RT_RFD *NextRfd; // If this flag is set, this RFD must contain bad data; therefore, insert into its own RFD queue BOOLEAN bReturnDirectly; @@ -914,7 +914,7 @@ typedef struct _RT_RFD{ u1Byte WapiSrcAddr[6]; BOOLEAN bWapiCheckPNInDecrypt; - // TCP Offload + // TCP Offload BOOLEAN bHWChecksum; RX_IPVER IPver; RX_IPTYPE IPType; @@ -933,7 +933,7 @@ typedef struct _RT_RFD{ // Data Buffer -------------------------------- MEMORY_BUFFER mbCloneRfdDataBuffer; // ------------------------------------------ - + #endif @@ -1050,12 +1050,12 @@ typedef enum _RATE_INDEX{ RATE_MCS_30 = 42, RATE_MCS_31 = 43, RATE_VHT_1SS_MCS_0 = 44, - RATE_VHT_1SS_MCS_1 = 45, + RATE_VHT_1SS_MCS_1 = 45, RATE_VHT_1SS_MCS_2 = 46, RATE_VHT_1SS_MCS_3 = 47, RATE_VHT_1SS_MCS_4 = 48, RATE_VHT_1SS_MCS_5 = 49, - RATE_VHT_1SS_MCS_6 = 50, + RATE_VHT_1SS_MCS_6 = 50, RATE_VHT_1SS_MCS_7 = 51, RATE_VHT_1SS_MCS_8 = 52, RATE_VHT_1SS_MCS_9 = 53, @@ -1090,7 +1090,7 @@ typedef enum _RATE_INDEX{ RATE_VHT_4SS_MCS_8 = 82, RATE_VHT_4SS_MCS_9 = 83, RATE_MCS_32 = 84, - RATE_UNKNOWN = 85, + RATE_UNKNOWN = 85, PKT_MGNT = 86, PKT_CTRL = 87, PKT_UNKNOWN = 88, @@ -1135,14 +1135,14 @@ typedef struct _RT_TX_STATISTICS { u4Byte NumTxFeedBackOk; u4Byte NumTxFeedBackFail; - u4Byte TransmittedRateHistogram[RATE_MAX]; - u4Byte AllTransmittedRateHistogram[RATE_MAX]; - u4Byte TransmittedRateRetry[RATE_MAX]; + u4Byte TransmittedRateHistogram[RATE_MAX]; + u4Byte AllTransmittedRateHistogram[RATE_MAX]; + u4Byte TransmittedRateRetry[RATE_MAX]; u4Byte AllTransmittedRateRetry[RATE_MAX]; u4Byte TxAMSDUSizeHistogram[5]; // level: (<1k), (1k~2k), (2k~4k), (4k~6k), (6K~8K) u4Byte TxAMSDUNumHistogram[5]; // level: (<3), (3~5), (6~9), (10~19), (>20) - + // For AMSDU efficiency, added by Emily, 2007.10.01 u4Byte AMSDUTxBufferNotAvaliable; u4Byte AMSDUTxDescNotAvaliable; @@ -1150,7 +1150,7 @@ typedef struct _RT_TX_STATISTICS { u1Byte LastPacketRate; //cosa add for debug 11/19/2007 // 2008/03/35 MH Collect all transmit rate history for 9x series. - RT_TX_RAHIS_T TxRate; + RT_TX_RAHIS_T TxRate; //for show Tx DataRate , by Jacken 2008/03/28 u1Byte CurrentInitTxRate; @@ -1159,14 +1159,14 @@ typedef struct _RT_TX_STATISTICS { //Added for remember last tx ok packet for every adapter 20130116 //by sherry - u4Byte LastNumTxOkBytesTotal; + u4Byte LastNumTxOkBytesTotal; u8Byte StartNumTxOkBytesTotal; }RT_TX_STATISTICS, *PRT_TX_STATISTICS; typedef struct _TX_GENERAL{ RT_THREAD txGenThread; PlatformSemaphore txGenSemaphore; - + }TX_GENERAL, *PTX_GENERAL; @@ -1209,7 +1209,7 @@ typedef struct _RT_RX_STATISTICS { u8Byte NumRxWEPICVErrorUnicast; u8Byte NumRxWEPICVErrorMulticast; u8Byte NumRxWEPICVErrorBroadcast; - u8Byte NumRxWEPUndecryptableUnicast; + u8Byte NumRxWEPUndecryptableUnicast; u8Byte NumRxWEPUndecryptableMulticast; u8Byte NumRxWEPUndecryptableBroadcast; u8Byte NumRxTKIPReplayMulticast; @@ -1218,7 +1218,7 @@ typedef struct _RT_RX_STATISTICS { u8Byte NumRxCCMPReplayUnicast; u8Byte NumRxDecryptSuccessUnicast; //fake, for Ndistest u8Byte NumRxDecryptSuccessMulticast; //fake, for Ndistest - u8Byte NumRxDecryptSuccessBroadcast; //fake, for Ndistest + u8Byte NumRxDecryptSuccessBroadcast; //fake, for Ndistest u8Byte NumRxDecryptFailureUnicast; //fake, for Ndistest u8Byte NumRxDecryptFailureMulticast; //fake, for Ndistest u8Byte NumRxDecryptFailureBroadcast; //fake, for Ndistest @@ -1242,7 +1242,7 @@ typedef struct _RT_RX_STATISTICS { u4Byte RssiCalculateCnt; // counter for RSSI calculation for Antenna lock test u4Byte PWDBAllCnt; u4Byte PWDBAllOldCnt; - + RT_SMOOTH_DATA ui_rssi; RT_SMOOTH_DATA ui_link_quality; @@ -1250,16 +1250,16 @@ typedef struct _RT_RX_STATISTICS { s4Byte LastSignalQualityInPercent; // In percentange, used for smoothing, e.g. Moving Average. u1Byte LastLinkQuality; s4Byte SignalQuality; // Transformed. - u1Byte QueryAfterFirstReset; //20061208 for ndistest by David. + u1Byte QueryAfterFirstReset; //20061208 for ndistest by David. u8Byte NumRxFramgment; u4Byte ReceivedRateHistogram[RATE_MAX]; //2013/05/16 revised by cosa u4Byte ReceivedRateHwErr[RATE_MAX]; //2013/08/14 cosa added for bt coex BOOLEAN RxRateHistory; - + // used for bt coex, cosa add 2013/08/15 u4Byte ReceivedRateHistogramBtCoex[RATE_MAX]; u4Byte ReceivedRateHwErrBtCoex[RATE_MAX]; - + u4Byte RxAMPDUSizeHistogram[5]; // level: (<4K), (4K~8K), (8K~16K), (16K~32K), (32K~64K) u4Byte RxAMPDUNumHistogram[5]; // level: (<5), (5~10), (10~20), (20~40), (>40) u4Byte RxAMSDUSizeHistogram[5]; // level: (<1k), (1k~2k), (2k~4k), (4k~6k), (6K~8K) @@ -1269,8 +1269,8 @@ typedef struct _RT_RX_STATISTICS { s4Byte RxSNRdB[4]; u1Byte RxRSSIPercentage[4]; - - u1Byte RxEVMdbm[4]; + + u1Byte RxEVMdbm[4]; u1Byte RxEVMPercentage[2]; s2Byte RxCfoShort[4]; @@ -1282,7 +1282,7 @@ typedef struct _RT_RX_STATISTICS { u4Byte NumRxInterrupt; u4Byte NumRxDescFilled[MAX_RX_QUEUE]; u4Byte NumRxDescReturn[MAX_RX_QUEUE]; - + u8Byte NumQryPhyStatus; // debug use only. u8Byte NumQryPhyStatusCCK; // debug use only. u8Byte NumQryPhyStatusHT; // debug use only. @@ -1305,7 +1305,7 @@ typedef struct _RT_RX_STATISTICS { u4Byte CurrentRxTP; u4Byte CurrentRxTP_Kbps; - + //Added for remember last rx ok packet for every adapter 20130116 //by sherry u4Byte LastNumRxOkBytesTotal; @@ -1349,7 +1349,7 @@ typedef struct _RT_LINK_DETECT_T{ u4Byte NumRecvBcnInPeriod; u4Byte NumRecvDataInPeriod; - BOOLEAN bClientAskForFCS; //When Client is asking for FCS, GO shall skip scanning. + BOOLEAN bClientAskForFCS; //When Client is asking for FCS, GO shall skip scanning. u4Byte ClientAskForFCSNum; // number of Client asking for FCS u4Byte RxNullDataNum; // number of Rx Null Data @@ -1383,7 +1383,7 @@ typedef struct _RT_LINK_DETECT_T{ BOOLEAN bRxBusyTrafficAccordingTP; u1Byte LastConnectedCenterFrequency; - CHANNEL_WIDTH LastConnectedBandwidth; + CHANNEL_WIDTH LastConnectedBandwidth; u4Byte ConnectButNoBcnInPeriodCnt; //debug only u4Byte ConnectButNoDataInPeriodCnt; //debug only u4Byte OnBeaconCnt_OnBeacon; //debug only @@ -1423,7 +1423,7 @@ typedef struct _RT_STA_DATARATE{ // // 2010/12/09 MH When merging the linux code from SC, we find that the XP linker pop -// up error information. OnBeacon_Join can not be refernced in mgntengine.c object. It is +// up error information. OnBeacon_Join can not be refernced in mgntengine.c object. It is // caused by the linker stack limitation. We declare too much local variable in the function. // To solve the problem temporarily we decrease the max BSS_IE_BUF_LEN to 1024. Because // linux declare two buffer as 256+256. The right way is not to use so much local buffer in stack @@ -1450,7 +1450,7 @@ typedef struct _ChnlSwitchAnnouncement{ BOOLEAN bWithCSA; u1Byte channelSwtichMode; u1Byte NewChnlNum; - u1Byte channelSwitchCnt; + u1Byte channelSwitchCnt; }ChnlSwitchAnnouncement, *PChnlSwitchAnnouncement; @@ -1488,14 +1488,14 @@ typedef struct _RT_WLAN_BSS{ // Our TSF when receving thisp packet. u4Byte RecvTsfLow; u4Byte RecvTsfHigh; - + u2Byte SecVersion; RT_ENC_ALG GroupCipherSuite; RT_ENC_ALG PairwiseCipherSuite[MAX_CIPHER_SUITE_NUM]; u2Byte PairwiseCipherCount; AKM_SUITE_TYPE AuthSuite[MAX_AUTH_SUITE_NUM]; - u2Byte AuthSuiteCount; + u2Byte AuthSuiteCount; u2Byte PMKIDCount; RT_PMKID_TYPE PMKIDList[1]; @@ -1521,7 +1521,7 @@ typedef struct _RT_WLAN_BSS{ u1Byte IEBuf[BSS_IE_BUF_LEN]; OCTET_STRING IE; RT_SECURITY_LEVEL SecLvl; - + u1Byte WpaIeBuf[MAX_WPA_IE_BUF_LEN]; OCTET_STRING WpaIe; @@ -1549,7 +1549,7 @@ typedef struct _RT_WLAN_BSS{ OCTET_STRING bdCountryIE; // - // WMM parameter IE + // WMM parameter IE // OCTET_STRING osWmmAcParaIE; u1Byte WmmAcParaBuf[WMM_PARAM_ELEMENT_SIZE]; // Max WMM parameter size is 24 octets. @@ -1563,11 +1563,11 @@ typedef struct _RT_WLAN_BSS{ // HT Related, by Emily, 2006.08.14 BSS_HT BssHT; BSS_VHT BssVHT; - u1Byte Vender; + u1Byte Vender; u1Byte SubTypeOfVender; u8Byte HistoryTime; - u1Byte HistoryCount; - + u1Byte HistoryCount; + // // For Chiper check !! add by CCW 2008/0918 // @@ -1595,7 +1595,7 @@ typedef struct _RT_WLAN_RSSI{ u1Byte bdSsIdLen; s4Byte CumRecvSignalPower; // In dBm. (Cumulate with weighted ratio and a small in/decrease) - + }RT_WLAN_RSSI, *PRT_WLAN_RSSI; #pragma pack(4) @@ -1613,9 +1613,9 @@ typedef struct _RT_WLAN_BSS_Customized{ #pragma pack() // -// 061122, rcnjko: -// We SHALL use this macro to change RT_WLA_BSS's IE to -// prevent malicious buffer overflow attack. +// 061122, rcnjko: +// We SHALL use this macro to change RT_WLA_BSS's IE to +// prevent malicious buffer overflow attack. // #define CopyRtWlanBssIE(__pRtWlanBss, __pBuf, __BufLen) \ (__pRtWlanBss)->IE.Octet = (__pRtWlanBss)->IEBuf; \ @@ -1623,7 +1623,7 @@ typedef struct _RT_WLAN_BSS_Customized{ CopyMem((__pRtWlanBss)->IE.Octet, (__pBuf), (__pRtWlanBss)->IE.Length) typedef struct _SW_CAM_TABLE{ - + u1Byte macAddress[6]; BOOLEAN bUsed; u1Byte pucKey[PTK_LEN]; @@ -1631,7 +1631,7 @@ typedef struct _SW_CAM_TABLE{ u4Byte ulUseDK; u4Byte ulKeyId; // CAM entry in CAM u1Byte portNumber; //vivi added for new cam search flow, 20091028...ID different port - + }SW_CAM_TABLE,*PSW_CAM_TABLE; typedef struct _RSSI_STA{ @@ -1646,7 +1646,7 @@ typedef struct _RSSI_STA{ s4Byte RSSI_CCK_Path_cnt[4]; u4Byte OFDM_Pkt_Cnt; u4Byte CCK_Pkt_Cnt; - + }RSSI_STA, *PRSSI_STA; typedef enum _RT_STA_EOSP_STATE @@ -1661,7 +1661,7 @@ typedef struct _RT_WLAN_STA{ BOOLEAN bLocked; // TRUE if this STA MAC Address is locked. u1Byte Sum; // Sum of MacAddr, used for hash purpose. u1Byte MacAddr[6]; // Mac address of this STA. - AUTH_ALGORITHM AuthAlg; // AuthAlg of the STA. + AUTH_ALGORITHM AuthAlg; // AuthAlg of the STA. RT_AUTH_MODE AuthMode; u1Byte AuthPassSeq; // 0: Not yet authenticated / 2: STA has receive an successful Auth2. / 4: STA has received an successful Auth4. BOOLEAN bAssociated; // TRUE if this STA is associated to this BSS. @@ -1673,13 +1673,13 @@ typedef struct _RT_WLAN_STA{ // -------------------------------------------------- u1Byte MultiPortStationIdx; - - u8Byte LastActiveTime; // Last active time in ms. + + u8Byte LastActiveTime; // Last active time in ms. u1Byte WmmStaQosInfo; // Qos Info field when sent from WMM STA in the (re-)association packet. BOOLEAN bPowerSave; // TRUE if the STA is in power save mode, FALSE is for active one. RT_LIST_ENTRY PsQueue; // Packet queued for this STA if it is in legacy power save mode. RT_LIST_ENTRY WmmPsQueue; // Packets belong to WMM APSD ACs queued. - RT_STA_EOSP_STATE WmmEosp; // If true, the USP is end now for this STA. + RT_STA_EOSP_STATE WmmEosp; // If true, the USP is end now for this STA. AUTH_PKEY_MGNT_TAG perSTAKeyInfo; // WPA-PSK related variable @@ -1699,7 +1699,7 @@ typedef struct _RT_WLAN_STA{ //add for HW enc ,By CCW u4Byte keyindex; - // add to Clear PS tcb + // add to Clear PS tcb u1Byte PSIdleCunt; @@ -1707,7 +1707,7 @@ typedef struct _RT_WLAN_STA{ RT_VHTINFO_STA_ENTRY VHTInfo; u1Byte ratr_index; u1Byte Ratr_State; - u4Byte IOTAction; + u4Byte IOTAction; u2Byte IOTMaxMpduLen; @@ -1716,10 +1716,10 @@ typedef struct _RT_WLAN_STA{ u4Byte AP_RecvAsocReqLength; pu1Byte AP_SendAsocResp; u4Byte AP_SendAsocRespLength; - + pu1Byte AP_AsocRspIEFromOS; u4Byte AP_AsocRspIEFromOSLength; - + u2Byte Capability; u2Byte usListenInterval; u8Byte AssociationUpTime; @@ -1727,8 +1727,8 @@ typedef struct _RT_WLAN_STA{ BOOLEAN bOsDecisionMade; BOOLEAN bNotAcceptedByOs; // Use "NotAccepted" instead of "Accepted" because 0 is the default value we want after reset. u2Byte OsReasonCode; - - RT_STA_INDICATE_STATE_MACHINE IndicationEngine; + + RT_STA_INDICATE_STATE_MACHINE IndicationEngine; RSSI_STA rssi_stat; @@ -1736,7 +1736,7 @@ typedef struct _RT_WLAN_STA{ u1Byte LastRxUniFragNum; u2Byte LastRxUniSeqNum; // ------------------------------------------ - + #if (P2P_SUPPORT == 1) BOOLEAN bP2PClient; P2P_CLIENT_INFO_DISCRIPTOR P2PClientInfoDesc; @@ -1756,11 +1756,11 @@ typedef struct _RT_WLAN_STA{ // ODM Write //1 PHY_STATUS_INFO - UINT8 RSSI_Path[4]; // + UINT8 RSSI_Path[4]; // UINT8 RSSI_Ave; UINT8 RXEVM[4]; UINT8 RXSNR[4]; - + }RT_WLAN_STA,*PRT_WLAN_STA; typedef struct _RT_802_11_BSSID_LIST @@ -1780,9 +1780,9 @@ typedef struct _RT_802_11_BSSID_LIST_Customized #define WDS_AP_MODE 1 // -// Customer ID, note that: -// This variable is initiailzed through EEPROM or registry, -// however, its definition may be different with that in EEPROM for +// Customer ID, note that: +// This variable is initiailzed through EEPROM or registry, +// however, its definition may be different with that in EEPROM for // EEPROM size consideration. So, we have to perform proper translation between them. // Besides, CustomerID of registry has precedence of that of EEPROM. // defined below. 060703, by rcnjko. @@ -1791,7 +1791,7 @@ typedef enum _RT_CUSTOMER_ID { RT_CID_DEFAULT = 0, RT_CID_WHQL = 5, - + }RT_CUSTOMER_ID, *PRT_CUSTOMER_ID; //---------------------------------------- @@ -1878,30 +1878,30 @@ typedef struct _RT_TURBO_CA u4Byte CheckCnt; // Min: 1, Max: CheckInterVal. u4Byte CheckInterval; - // Per-packet contention window for TCA on. - // Note that, this is one of means of TCA, + // Per-packet contention window for TCA on. + // Note that, this is one of means of TCA, // we also can information of other means here. //u1Byte ECWMin; // For Restore. //u1Byte ECWMax;//For Restore. - // Statistics in last TCA_CHECK_INTERVAL. + // Statistics in last TCA_CHECK_INTERVAL. RT_TX_STATISTICS LastTxStats; RT_RX_STATISTICS LastRxStats; u4Byte LastTxRetryCnt; - u4Byte TxThroughput; // in KBps. - u4Byte RxThroughput; // in KBps. + u4Byte TxThroughput; // in KBps. + u4Byte RxThroughput; // in KBps. u4Byte TotalThroughput; //in MBps - // Statistics in last nomal channel access setting. + // Statistics in last nomal channel access setting. RT_TX_STATISTICS LastNormalTxStats; RT_RX_STATISTICS LastNormalRxStats; - u4Byte NormalTotalThroughput; // in KBps. + u4Byte NormalTotalThroughput; // in KBps. }RT_TURBO_CA, *PRT_TURBO_CA; -// Add for Real WOW +// Add for Real WOW #define MAX_RS_PACKET_LEN 1024 -#define MAX_RealWoW_KCP_SIZE 124 //(100 + 24) +#define MAX_RealWoW_KCP_SIZE 124 //(100 + 24) #define MAX_RealWoW_KAP_SIZE 48 #define MAX_RealWoW_Payload 64 #pragma pack (1) // Set our value. @@ -1919,7 +1919,7 @@ typedef struct _TEREDOINFO typedef struct _KCPInfo{ - u4Byte nId; // = id + u4Byte nId; // = id int destAddr; u1Byte MacID[6]; u2Byte desPort; @@ -1927,27 +1927,27 @@ typedef struct _KCPInfo{ }KCPInfo, *PKCPInfo; typedef struct _KCPContent{ - u4Byte id; // = id - u4Byte mSec; // = msec + u4Byte id; // = id + u4Byte mSec; // = msec u4Byte size; // =size u1Byte bPacket[MAX_RealWoW_KCP_SIZE]; // put packet here } KCPContent, *PKCPContent; -typedef struct _RealWoWAckPktInfo { +typedef struct _RealWoWAckPktInfo { u2Byte ackLostCnt; u2Byte patterntSize; u1Byte pattern[MAX_RealWoW_Payload]; }RealWoWAckPktInfo,*PRealWoWAckPktInfo; -typedef struct _RealWoWWPInfo { +typedef struct _RealWoWWPInfo { u2Byte patterntSize; u1Byte pattern[MAX_RealWoW_Payload]; -}RealWoWWPInfo,*PRealWoWWPInfo; +}RealWoWWPInfo,*PRealWoWWPInfo; -typedef struct _RT_S5WakeUPInfo { +typedef struct _RT_S5WakeUPInfo { u1Byte PSK[PASSPHRASE_LEN]; u4Byte PSKLen; -}RT_S5WakeUPInfo,*PRT_S5WakeUPInfo; +}RT_S5WakeUPInfo,*PRT_S5WakeUPInfo; #pragma pack() @@ -1956,12 +1956,12 @@ typedef struct _RT_S5WakeUPInfo { typedef struct _WIRELESS_SETTING_BEFORE_SCAN { /*WirelessModeScanInProgress is designed for driver to keep the previous band(2.4G/5G) - during scan. It is only meaningful for a/b/g device which require to switch band twice + during scan. It is only meaningful for a/b/g device which require to switch band twice during scan (either 2.4->5->2.4 or 5->2.4->5*/ - WIRELESS_MODE WirelessModeScanInProgress; + WIRELESS_MODE WirelessModeScanInProgress; /*WirelessMode is designed to keep the original wireless mode setting before scan*/ - WIRELESS_MODE WirelessMode; + WIRELESS_MODE WirelessMode; /*ChannelNumber is designd to keep the original channel number before scan*/ u1Byte ChannelNumber; @@ -2005,7 +2005,7 @@ typedef struct _TXBBGain_Struct } TXBBGain_Struct, *PTXBBGain_Struct; typedef struct _CCKTXBBGain_Struct { - //The Value is from a22 to a29 one Byte one time is much Safer + //The Value is from a22 to a29 one Byte one time is much Safer u1Byte CCKTXBBValueArray[8]; } CCKTXBBGain_Struct,*PCCKTXBBGain_Struct; /*---------------------End Define--------------------------------------*/ @@ -2023,7 +2023,7 @@ typedef enum _Fsync_State{ Default_Fsync, HW_Fsync, SW_Fsync -}Fsync_State; +}Fsync_State; typedef enum _RT_AP_TYPE { @@ -2133,7 +2133,7 @@ typedef u4Byte RT_CUSTOM_EVENT, *PRT_CUSTOM_EVENT; #if 0 #define MAX_SUPPORT_WOL_PATTERN_NUM_COMM \ ((MAX_SUPPORT_WOL_PATTERN_NUM_88E > MAX_SUPPORT_WOL_PATTERN_NUM_92C)? (MAX_SUPPORT_WOL_PATTERN_NUM_88E) : (MAX_SUPPORT_WOL_PATTERN_NUM_92C)) -#else +#else #define MAX2(a, b) (a>b?a:b) #define MAX4(a,b,c,d) (MAX2(MAX2(a,b), MAX2(c,d))) #define MAX_SUPPORT_WOL_PATTERN_NUM_COMM (MAX4(MAX_SUPPORT_WOL_PATTERN_NUM_88E,MAX_SUPPORT_WOL_PATTERN_NUM_8723A,MAX_SUPPORT_WOL_PATTERN_NUM_92C,MAX_SUPPORT_WOL_PATTERN_NUM_8814A)) @@ -2155,7 +2155,7 @@ typedef u4Byte RT_CUSTOM_EVENT, *PRT_CUSTOM_EVENT; #define USE_FW_PATTERN_MATCH(_pAdapter) \ (IS_HARDWARE_TYPE_8723A(_pAdapter) ? ((GET_POWER_SAVE_CONTROL(&(_pAdapter->MgntInfo))->WoLPatternNum > MAX_HW_PATTERN_MATCH_NUM_8723A) ? TRUE: FALSE): FALSE) #else -#define USE_FW_PATTERN_MATCH(_pAdapter) FALSE +#define USE_FW_PATTERN_MATCH(_pAdapter) FALSE #endif typedef enum _WOLPATTERN_TYPE { @@ -2211,7 +2211,7 @@ typedef struct _RT_POWER_SAVE_CONTROL { // // Inactive Power Save(IPS) : Disable RF when disconnected - // + // BOOLEAN bInactivePs; // When AP mode stop in DC mode, STA mode will return to IPS enable by this backup. BOOLEAN bIPSModeBackup; @@ -2225,7 +2225,7 @@ typedef struct _RT_POWER_SAVE_CONTROL // Return point for join action IPS_CALLBACK_FUNCION ReturnPoint; - + // Recored Parameters for rescheduled JoinRequest PADAPTER ptmpAdapter;// for reschedule reason, need to use original port, 2015.01.07 hsiao_ho // because we need to use the correct port to restart JOIN / MGNTLINK Request @@ -2254,16 +2254,16 @@ typedef struct _RT_POWER_SAVE_CONTROL // // Leisre Poswer Save : Disable RF if connected but traffic is not busy - // + // BOOLEAN bLeisurePs; // When AP mode stop in DC mode, STA mode will return to LPS enable by this backup. BOOLEAN bLeisurePsModeBackup; u1Byte LpsIdleCount; u1Byte PowerSetting; - u1Byte PowerPolicy; + u1Byte PowerPolicy; u4Byte PowerProfile; - u4Byte PowerSaveLevel; - u4Byte ConnectionQuality; + u4Byte PowerSaveLevel; + u4Byte ConnectionQuality; u1Byte PowerMode; u1Byte RegMaxLPSAwakeIntvl; u1Byte LPSAwakeIntvl; @@ -2275,7 +2275,7 @@ typedef struct _RT_POWER_SAVE_CONTROL u4Byte CurPsLevel; u4Byte RegRfPsLevel; u1Byte RegAMDPciASPM; - + // 2009/10/28 MH Add for DMA 64 bit support switch u1Byte RegDMA64Support; @@ -2328,7 +2328,7 @@ typedef struct _RT_POWER_SAVE_CONTROL BOOLEAN bInDxFwIPSPeriod; // IPS during device state in Dx (x=1~3) BOOLEAN CardDisableInLowClk; u1Byte FwIPSLevel; - + // Record wake up frame for WoWLAN. by tynli. 2009.06.10. RT_PM_WOL_PATTERN_INFO PmWoLPatternInfo[MAX_SUPPORT_WOL_PATTERN_NUM_COMM]; //by tynli. To keep the WoWLAN wake up pattern information, ex: pattern Id, bit mask. u1Byte WoLPatternNum; @@ -2431,10 +2431,10 @@ typedef enum _RT_RECEIVE_FILTER_TEST typedef struct _RT_DO_COALESICING_FIELD_INFO { - u1Byte Heard[8]; // Resvad for ndis + u1Byte Heard[8]; // Resvad for ndis RT_FRAME_HEADER FrameHead; RT_RECEIVE_FILTER_TEST FilterTest; - + union { RT_MAC_HEADER_FIELD MacHeaderField; @@ -2443,8 +2443,8 @@ typedef struct _RT_DO_COALESICING_FIELD_INFO RT_IPV6_HEADER_FIELD IPv6HeaderField; RT_UDP_HEADER_FIELD UdpHeaderField; }HeaderField; - - union + + union { u1Byte FieldByteValue; u2Byte FieldShortValue; @@ -2461,25 +2461,25 @@ typedef struct _RT_DO_COALESICING_FIELD_INFO ULONGLONG ResultLong64Value; u1Byte ResultByteArrayValue[16]; }ResultValue; - - + + }RT_DO_COALESICING_FIELD_INFO,*PRT_DO_COALESICING_FIELD_INFO; typedef struct _RT_DO_COALESICING_FILTER_PARAMETER { u4Byte FilterID; // != 0 : in used !! - u4Byte Delaytime; // how long to flush packet + u4Byte Delaytime; // how long to flush packet u4Byte NumOfElem; // For keep number of field !! - RT_DO_COALESICING_FIELD_INFO dFieldArry[5]; // We define in 5 in windows 8.1 !! - + RT_DO_COALESICING_FIELD_INFO dFieldArry[5]; // We define in 5 in windows 8.1 !! + }RT_DO_COALESICING_FILTER_PARAMETER,*PRT_DO_COALESICING_FILTER_PARAMETER; typedef struct _RT_DO_COALESICING_FILTER_INFO { BOOLEAN bEnable; // Do or not !! - RT_DO_COALESICING_FILTER_PARAMETER dFilterArry[10]; // We define in 10 in windows 8.1 !! - + RT_DO_COALESICING_FILTER_PARAMETER dFilterArry[10]; // We define in 10 in windows 8.1 !! + }RT_DO_COALESICING_FILTER_INFO,*PRT_DO_COALESICING_FILTER_INFO; typedef struct _RT_DBG_CONTROL @@ -2592,7 +2592,7 @@ typedef struct _MGNT_INFO{ BOOLEAN bMediaConnect; BOOLEAN init_adpt_in_progress; - + BOOLEAN bFlushScanList; // If this flag is set true when querying scan list, it means the OS has flushed the scan list. @@ -2602,7 +2602,7 @@ typedef struct _MGNT_INFO{ BOOLEAN bRoamRequest; BOOLEAN bPrepareRoaming; RT_PREPARE_ROAM_TYPE PrepareRoamState; - + // Set when authentication type, capability changes. // Refered in MgntActSet_802_11_SSID(). RT_MLMESTARTREQ_RSN bMlmeStartReqRsn; @@ -2630,7 +2630,7 @@ typedef struct _MGNT_INFO{ BOOLEAN bSetWatchDogTimerByDriver; // --------------------------------------------------------------- -#if (DFS_SUPPORT == 1) +#if (DFS_SUPPORT == 1) DFS_MGNT DFSMgnt; #endif WIRELESS_SETTING_BEFORE_SCAN SettingBeforeScan; @@ -2722,7 +2722,7 @@ typedef struct _MGNT_INFO{ OCTET_STRING mBrates; u1Byte HighestBasicRate; - u1Byte LowestBasicRate; + u1Byte LowestBasicRate; u1Byte HighestOperaRate; u1Byte CurrentBasicRate; u1Byte CurrentOperaRate; @@ -2733,7 +2733,7 @@ typedef struct _MGNT_INFO{ u1Byte Regdot11OperationalRateBuf[MAX_NUM_RATES]; // -- Supported Rate -- - OCTET_STRING SupportedRates; + OCTET_STRING SupportedRates; u1Byte SupportedRatesBuf[MAX_NUM_RATES]; OCTET_STRING RegSuppRateSets[MAX_WIRELESS_MODE_CNT]; u1Byte RegSuppRateSetsBuf[MAX_WIRELESS_MODE_CNT][MAX_NUM_RATES]; @@ -2746,13 +2746,13 @@ typedef struct _MGNT_INFO{ u1Byte VHTHighestOperaRate; u1Byte RegVHTHighestOperaRate; u1Byte RegVHTSuppRateSet[2]; - u1Byte dot11VHTOperationalRateSet[2]; - u1Byte Regdot11VHTOperationalRateSet[2]; + u1Byte dot11VHTOperationalRateSet[2]; + u1Byte Regdot11VHTOperationalRateSet[2]; // For basic rate set maintain. 2010.11.03. by tynli. u1Byte SupportRatesfromBCNBuf[MAX_NUM_RATES]; OCTET_STRING SupportRatesfromBCN; - + // For Min spacing configurations, Added by Roger, 2008.08.30. u1Byte MinSpaceCfg; @@ -2780,18 +2780,18 @@ typedef struct _MGNT_INFO{ // For AP mode delay mechanism test ,. BOOLEAN bDelayApBeaconMode; u4Byte DelayApBeaconCnt; - + RT_WORK_ITEM IbssStartRequestWorkItem; RT_WORK_ITEM ApStartRequestWorkItem; - RT_WORK_ITEM ApSendDisassocWithOldChnlWorkitem; + RT_WORK_ITEM ApSendDisassocWithOldChnlWorkitem; // To protect drop packet progress BOOLEAN bDropPktInProgress; RT_WORK_ITEM DropPacketWorkItem; - + IbssParms mIbssParms; // empty if infrastructure BSS - + u1Byte dot11CurrentPreambleMode; // It represents current preamble mode. 2005.01.06, by rcnjko. BOOLEAN bDisableUseProtection; // TRUE if protection mode forced disabled by User. @@ -2827,9 +2827,9 @@ typedef struct _MGNT_INFO{ RT_TIMER SwBeaconTimer; BEACON_SEND_STATE BeaconState; // The current sending state of Beacon RT_WORK_ITEM TbttPollingWorkItem; // Workitem to simulate TBTT notification by polling MAC.TSF, 070124, by rcnjko. - + u4Byte MaxBeaconSize; //2010.06.23. Added by tynli. To observe the max beacon size. - + // Roaming flags // ----------------------------------------- RT_ROAM_TYPE RoamingType; @@ -2841,7 +2841,7 @@ typedef struct _MGNT_INFO{ // // When wake up, AP would be reset by MgntActSet_802_11_SSID(). - // We should not restart beaconning under win7. + // We should not restart beaconning under win7. // This flag is for AP_StartAPRequest() to determine whether to start beaconning. // BOOLEAN bStartApDueToWakeup; @@ -2853,11 +2853,11 @@ typedef struct _MGNT_INFO{ u1Byte Regdot11DtimPeriod; //Set when load default value and MgntActSet_802_11_INFRASTRUCTURE_MODE() - u1Byte Regdot11networktype; + u1Byte Regdot11networktype; u2Byte RegmCap; - - u1Byte RegPreambleMode; // It represents default setting about preamble mode. 2006.01.06, by rcnjko. + + u1Byte RegPreambleMode; // It represents default setting about preamble mode. 2006.01.06, by rcnjko. // Power Save Ralated BOOLEAN RegRfOff; @@ -2885,7 +2885,7 @@ typedef struct _MGNT_INFO{ BOOLEAN bPSPXlinkMode; // Current enable XLink mode (promicuous mode). BOOLEAN bDefaultPSPXlinkMode; // Enable XLink mode (promicuous mode) for default settings, i.e., from registry or UI. BOOLEAN bNetMonitorMode; // 2007.08.06, by shien chang. - + //---------------------------------------------------------------------------- // Power save mode, 070104, by rcnjko. //---------------------------------------------------------------------------- @@ -2903,7 +2903,7 @@ typedef struct _MGNT_INFO{ // AP mode related, 2005.05.27, by rcnjko. //---------------------------------------------------------------------------- - u1Byte arChalng[128]; // Challenge text for shared-key authenticatin. + u1Byte arChalng[128]; // Challenge text for shared-key authenticatin. #if 1//(AP_MODE_SUPPORT == 1) // 2012/01/12 MH Add one RT_WLAN_STA for ODM default port conpatiable with other SW team. @@ -2912,7 +2912,7 @@ typedef struct _MGNT_INFO{ RT_WLAN_STA AsocEntry[ASSOCIATE_ENTRY_NUM]; // Information of STAs. Revise the data type name and its variables. #endif u2Byte AvailableAsocEntryNum; // # of entries of AsocEntry[] available. - u2Byte PowerSaveStationNum; // # of STA in PS mode. + u2Byte PowerSaveStationNum; // # of STA in PS mode. RT_LIST_ENTRY GroupPsQueue; // Mcst/Bcst packet queued for one or more STA is in power-save mode. OCTET_STRING Tim; // A octet string for TIM IE. u1Byte TimBuf[254]; // 254=3+251, Buffer for TIM IE. @@ -2926,7 +2926,7 @@ typedef struct _MGNT_INFO{ // Annie TOADD: VirtualCAM // for indication - PRT_WLAN_STA pCurrentSta; // the STA we are dealing with for indication. we get the state machine through here, similar as pMgntInfo->AsocInfo + PRT_WLAN_STA pCurrentSta; // the STA we are dealing with for indication. we get the state machine through here, similar as pMgntInfo->AsocInfo // Additonal IEs for beacon u4Byte AdditionalBeaconIESize; @@ -2934,7 +2934,7 @@ typedef struct _MGNT_INFO{ //Additonal IEs for probe response u4Byte AdditionalResponseIESize; - PVOID AdditionalResponseIEData; + PVOID AdditionalResponseIEData; u4Byte AdditionalAssocReqIESize; PVOID AdditionalAssocReqIEData; @@ -2951,7 +2951,7 @@ typedef struct _MGNT_INFO{ // For Turbo mode. Added by Roger, 2006.12.07. // RT_TURBO_CA TurboChannelAccess; - + // Security Information RT_SECURITY_T SecurityInfo; @@ -2976,7 +2976,7 @@ typedef struct _MGNT_INFO{ // Qos related. Added by Annie, 2005-11-01. PSTA_QOS pStaQos; - + BOOLEAN bUpdateTxPowerInProgress; // TRUE if the operation to update all tx power of all channel is in progress. s4Byte PowerToUpdateInDbm; // Tx power to update in dBm. s4Byte ClientConfigPwrInDbm; // Client configured power in dbm for CCX @@ -3018,15 +3018,15 @@ typedef struct _MGNT_INFO{ // WDS, 2006.06.11, by rcnjko. u1Byte WdsMode; u1Byte WdsApAddr[6]; - + // // For RF state maintance. // - RT_RF_CHANGE_SOURCE RfOffReason; - BOOLEAN ClkReqState; + RT_RF_CHANGE_SOURCE RfOffReason; + BOOLEAN ClkReqState; CHANNEL_ACCESS_SETTING ChannelAccessSetting; - + //ADD for AP HW ENC ,CCW BOOLEAN bAPGlobRest; SW_CAM_TABLE SWCamTable[32]; @@ -3055,7 +3055,7 @@ typedef struct _MGNT_INFO{ u1Byte NumRejectedAsocAP; BOOLEAN bExcludeUnencrypted; - BOOLEAN SafeModeEnabled; + BOOLEAN SafeModeEnabled; //For NDIS6 RSNA ,by CCW BOOLEAN bRSNAPSKMode; @@ -3063,7 +3063,7 @@ typedef struct _MGNT_INFO{ // For turbo mode. Added by Roger, 2006.12.07. // ----------------------------------------- BOOLEAN bAutoTurboBy8186; // 8186 "AutoTurbo" mode switch. - BOOLEAN bSupportTurboMode; // 8187 Turbo mode switch. + BOOLEAN bSupportTurboMode; // 8187 Turbo mode switch. BOOLEAN bRealtekAggCapExist; //The following variables have NOT checked yet....Roger, 2006.12.07 BOOLEAN bRealtekCapType1Exist ; // 8186 "AutoTurbo" mode: 8186 IE exists or not in current association. @@ -3071,20 +3071,20 @@ typedef struct _MGNT_INFO{ RT_RF_POWER_STATE eSwRfPowerState; // SW RF power state, 2006.12.18, by shien chang. - // disable tx power+ by rate + // disable tx power+ by rate BOOLEAN bDisableTXPowerByRate; // disable tx power training BOOLEAN bDisableTXPowerTraining; BOOLEAN bSetTXPowerTrainingByOid; BOOLEAN bDecreaseTXPowerTraining; - + // // For simple config. by CCW - copy from 818x // -#if (WPS_SUPPORT == 1) +#if (WPS_SUPPORT == 1) PVOID pSimpleConfig; #endif - BOOLEAN bPbcPressed; + BOOLEAN bPbcPressed; //For alpha LED control u1Byte CustomizedPbcPressTimer; @@ -3100,15 +3100,15 @@ typedef struct _MGNT_INFO{ // // For 802.11d. // - PVOID pDot11dInfo; + PVOID pDot11dInfo; + + PVOID pChannelList; - PVOID pChannelList; - // // IHV Support Type // IHV_SUPPORT_TYPE IhvType; - + // // For CCX related information. // @@ -3118,7 +3118,7 @@ typedef struct _MGNT_INFO{ //For generic parser. PVOID pGenericParser; - + // For AP mode information #if 1//(AP_MODE_SUPPORT == 1) PVOID pApModeInfo; @@ -3134,9 +3134,9 @@ typedef struct _MGNT_INFO{ // For 802.11z PVOID pTDLSTInfo; - + #if (MULTICHANNEL_SUPPORT == 1) - PVOID pMultiChnl; + PVOID pMultiChnl; #endif PVOID pCustomScanInfo; @@ -3146,7 +3146,7 @@ typedef struct _MGNT_INFO{ //1 if sniffer mode. 0 turn off sniffer mode BOOLEAN SnifferTurnOnFlag; u4Byte SnifferSavedRCR; - + // Protection mode related u1Byte ForcedProtectionMode; u1Byte ForcedProtectRate; @@ -3155,14 +3155,14 @@ typedef struct _MGNT_INFO{ u1Byte ForcedProtectCCA; BOOLEAN bForcedProtectRTSFrame; BOOLEAN bForcedProtectCTSFrame; - + // for HT operation rate set. we use this one for HT data rate to seperate different descriptors //the way fill this is the same as in the IE BOOLEAN bReg11nAdhoc; BOOLEAN bRegIOTBcm256QAM; u1Byte bRegVht24g; - + BOOLEAN bScan_20MHz; //For Backup Initial Gain @@ -3173,7 +3173,7 @@ typedef struct _MGNT_INFO{ u1Byte DM_Type; //Dynamic Tx power for near/far range enable/Disable , by Jacken , 2008-03-06 - BOOLEAN bDynamicTxPowerEnable; + BOOLEAN bDynamicTxPowerEnable; //2008-05-09 indicate set power progress BOOLEAN bSetPnpPwrInProgress; @@ -3188,7 +3188,7 @@ typedef struct _MGNT_INFO{ u2Byte FirmwareVersionRev; u2Byte FirmwareSubVersion; u2Byte FirmwareSignature; - + // For IOT issue. u1Byte IOTPeer; u1Byte IOTPeerSubtype; @@ -3201,10 +3201,10 @@ typedef struct _MGNT_INFO{ // 2008/05/20 MH For verification console. #if DBG_CMD RT_WORK_ITEM NICVerify; -#endif +#endif BOOLEAN bNicVerifyPkt; - // Roam Sensitive Level + // Roam Sensitive Level s1Byte RegROAMSensitiveLevel; // Roam Hysteresis @@ -3212,7 +3212,7 @@ typedef struct _MGNT_INFO{ // For leisure power save in connection state, 2007-12-17 by Isaiah u1Byte LPSDelayCnt; - + // Keep Alive mechanism u1Byte keepAliveLevel; @@ -3230,7 +3230,7 @@ typedef struct _MGNT_INFO{ // dm control initial gain flag BOOLEAN bDMInitialGainEnable; - //Record NDIS Version For Compatibile + //Record NDIS Version For Compatibile RT_NDIS_VERSION NdisVersion; RT_TIMER PnpWakeUpJoinTimer; @@ -3247,7 +3247,7 @@ typedef struct _MGNT_INFO{ // 2009/08/05 MH To protect halt adapter process. BOOLEAN bHaltInProgress; - + //2009/08/10 This is asked by AzWava Mr. Six. To Make TKIP in N mode BOOLEAN bTKIPinNmodeFromReg; BOOLEAN bWEPinNmodeFromReg; @@ -3266,17 +3266,17 @@ typedef struct _MGNT_INFO{ u8Byte TSFValue; //by tynli, from Rx beacon u8Byte NowTSF; - u8Byte NextBeacon; + u8Byte NextBeacon; BOOLEAN bUseRxInterruptWorkItem; BOOLEAN bWakeupAutoLinkInProgressing; - u4Byte uLastDecryptedErrorSeqNum; + u4Byte uLastDecryptedErrorSeqNum; BOOLEAN bDisableCck; BOOLEAN bRegVelocity; - u4Byte AcceptFirstEAPOLPacket; + u4Byte AcceptFirstEAPOLPacket; BOOLEAN bAPTimExtend; BOOLEAN bConcurrentMode; @@ -3288,7 +3288,7 @@ typedef struct _MGNT_INFO{ // 2010/05/11 MH Add a timer for GPIO detect. // 2011/11/03 MH Use the same GPIO timer. - RT_TIMER GpioDetectTimer; + RT_TIMER GpioDetectTimer; BOOLEAN GpioDetectTimerStart; BOOLEAN HwPBCDetectTimerStart; @@ -3299,32 +3299,32 @@ typedef struct _MGNT_INFO{ // 2010/08/25 MH Add to support pdn mode switch. u1Byte bRegPDNMode; - - // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. + + // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. u1Byte bRegDongleSS; - - // 2010/09/13 MH According to PM's request, we support different SS power seave level. + + // 2010/09/13 MH According to PM's request, we support different SS power seave level. u1Byte bRegSSPwrLvl; - + // 2011/02/16 MH Add for SS HW radio detect workaround temporarily. u1Byte bRegSSWakeCnt; - - // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. + + // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. u1Byte bRegAggDMEnable; - BOOLEAN bSendPacketByTimer; + BOOLEAN bSendPacketByTimer; - // 2010/12/31 MH Add for UPHY dynamic chaneg. + // 2010/12/31 MH Add for UPHY dynamic chaneg. u1Byte bRegUPDMEnable; // 2011/07/08 MH Add for different link speed display. - u1Byte bRegLinkSpeedLevel; + u1Byte bRegLinkSpeedLevel; u1Byte RSSI2GridMode; - - // 2011/07/14 MH Add for rx short cut. + + // 2011/07/14 MH Add for rx short cut. u1Byte bRegRxSC; - // 2011/07/15 Sinda Add for tx short cut. + // 2011/07/15 Sinda Add for tx short cut. u1Byte bRegTxSC; // 2011/09/15 MH Add registry for switching packet compete method. @@ -3347,7 +3347,7 @@ typedef struct _MGNT_INFO{ u4Byte RegTxPwrLimit; // 2012/11/28 MH Add for BB team AMPDU test. - u1Byte RegAMfactor; + u1Byte RegAMfactor; u1Byte RegVHTRSec; // 2012/11/07 Awk add PowerBase for customers to define their power base. @@ -3376,7 +3376,7 @@ typedef struct _MGNT_INFO{ OCTET_STRING RegPwrLimitFile; OCTET_STRING RegSecondaryPwrLimitFile; OCTET_STRING RegChannelPlan2G; - OCTET_STRING RegChannelPlan5G; + OCTET_STRING RegChannelPlan5G; u1Byte RegDecryptCustomFile; // 2013/04/16 VincentLan Add to switch Spur Calibration Method @@ -3386,40 +3386,40 @@ typedef struct _MGNT_INFO{ // 2013/11/23 VincentLan add for for KFree Feature Requested by RF David u1Byte RegRfKFreeEnable; - - + + u1Byte RegTxDutyEnable; - + // 2011/11/15 MH Add for user can select different region and map to dedicated power gain offset table. u1Byte RegPwrTblSel; u1Byte RegTxPwrLevel; // 2011/11/15 MH Add for user can select different tx power by rate switch by default value and registry value. - u1Byte RegPwrByRate; - u4Byte RegPwrRaTbl1; - u4Byte RegPwrRaTbl2; - u4Byte RegPwrRaTbl3; - u4Byte RegPwrRaTbl4; - u4Byte RegPwrRaTbl5; - u4Byte RegPwrRaTbl6; - u4Byte RegPwrRaTbl7; - u4Byte RegPwrRaTbl8; - u4Byte RegPwrRaTbl9; - u4Byte RegPwrRaTbl10; - u4Byte RegPwrRaTbl11; - u4Byte RegPwrRaTbl12; - u4Byte RegPwrRaTbl13; - u4Byte RegPwrRaTbl14; - u4Byte RegPwrRaTbl15; - u4Byte RegPwrRaTbl16; + u1Byte RegPwrByRate; + u4Byte RegPwrRaTbl1; + u4Byte RegPwrRaTbl2; + u4Byte RegPwrRaTbl3; + u4Byte RegPwrRaTbl4; + u4Byte RegPwrRaTbl5; + u4Byte RegPwrRaTbl6; + u4Byte RegPwrRaTbl7; + u4Byte RegPwrRaTbl8; + u4Byte RegPwrRaTbl9; + u4Byte RegPwrRaTbl10; + u4Byte RegPwrRaTbl11; + u4Byte RegPwrRaTbl12; + u4Byte RegPwrRaTbl13; + u4Byte RegPwrRaTbl14; + u4Byte RegPwrRaTbl15; + u4Byte RegPwrRaTbl16; // 2012/07/24 MH Add for win8 usb whql tst & WFD multi channel. u1Byte RegUseDefaultCID; u1Byte RegWfdTime; u1Byte RegWfdChnl; - + #if 1//HARDWARE_TYPE_IS_RTL8192D == 1 // Disable by MH //for checkEDCATurbo u8Byte lastTxOkCnt ; @@ -3430,7 +3430,7 @@ typedef struct _MGNT_INFO{ // Justin: Timer for Tx/Rx LED blinking RT_TIMER LedTimer; - + // Add for USB/PCIE rx packetr indicate header. u1Byte header[100][(sMacHdrLng+N6_LLC_SIZE)]; @@ -3441,7 +3441,7 @@ typedef struct _MGNT_INFO{ // Do not access this variable outside of WFD_xxx() functoions. PVOID pWFDInfo; - // Just for need report power save state to OS or not ( Win8 )!! + // Just for need report power save state to OS or not ( Win8 )!! BOOLEAN bInAutoPowerSavemode; u1Byte RegFakeRoamSignal[3]; // For testing only, RegFakeRoamSignal[0] = initial signal, RegFakeRoamSignal[1] = reducing signal @@ -3450,7 +3450,7 @@ typedef struct _MGNT_INFO{ u4Byte targetAKMSuite; FT_INFO_ENTRY FtEntryList[MAX_FT_ENTRY_NUM]; - + OCTET_STRING TIE; u1Byte TIEBuff[8]; @@ -3459,7 +3459,7 @@ typedef struct _MGNT_INFO{ BOOLEAN bCustomizedAsocIE; u2Byte CustomizedAsocIELength; u1Byte CustomizedAsocIEBuf[MAX_IE_LEN]; -#endif +#endif // For 92D CCK hang issue when dual band. BOOLEAN bDisableCCKForDualBand; @@ -3488,9 +3488,9 @@ typedef struct _MGNT_INFO{ // For memory management to record the objects allocation info. RT_LIST_ENTRY ObjectList; - // add for stable traffic check + // add for stable traffic check Check_Stable_Traffic CheckTraffic; - + BOOLEAN bDisableCCKRateForVWIFIChangeChannel; //For GTK/ARP offload. by tynli. @@ -3498,7 +3498,7 @@ typedef struct _MGNT_INFO{ RT_PM_IPV4_ARP_PARAMETERS PMIPV4ARPPara; RT_PM_IPV6_NS_PARAMETERS PMIPV6NSPara[2]; RT_PM_DOT11_RSN_REKEY_PARAMETERS PMDot11RSNRekeyPara; - + // Add for TCP_CHECK RT_SUPPORT_TCPOFFLOAD_CAP TCPOffloadCap; RT_SUPPORT_TCPOFFLOAD_CAP CurrTCPOffloadCap; @@ -3539,7 +3539,7 @@ typedef struct _MGNT_INFO{ u1Byte mbS5PMK[PMK_LEN]; u1Byte mbS5PTK[PTK_LEN_TKIP]; - // Add for D0 filter coalesci + // Add for D0 filter coalesci RT_DO_COALESICING_FILTER_INFO mRtD0ColesFilterInfo; BOOLEAN bEDCCASupport; @@ -3549,7 +3549,7 @@ typedef struct _MGNT_INFO{ u1Byte RegDownloadFW; CHANNEL_WIDTH currentRABw; - + u2Byte RegScanLarge; u2Byte RegScanMiddle; u2Byte RegScanNormal; @@ -3562,19 +3562,19 @@ typedef struct _MGNT_INFO{ BOOLEAN bPreTransPnP; BOOLEAN bDisconnectInProgress; //indicate disconnect in progress 20130117 - + //20130117 Used for Invitation No/After to Pass, with skip scan when Go is connected u1Byte bGoSkipScanForWFD; u1Byte bClientSkipScanForWFD; - + BOOLEAN bForceGoTxData20MBw; u1Byte bWaitBeforeGoSkipScan; - + BOOLEAN bHWRTSEnable; u1Byte ScanOffloadType; - + // 2013/02/05 MH Add for streamMode switch. u1Byte RegStreamMode; // 2013/02/06 MH Add Transmit power control level for all customer in the future. @@ -3597,8 +3597,8 @@ typedef struct _MGNT_INFO{ u1Byte EnableResetTxStuck; u1Byte RegSifsThresh; - - u1Byte RegFwload; + + u1Byte RegFwload; u1Byte RegUsbSafetySwitch; @@ -3612,7 +3612,7 @@ typedef struct _MGNT_INFO{ u1Byte Reg8822BFPGAVerification; BOOLEAN RegClearAMDWakeUpStatus; // zhiyuan add for 88ee Lenovo AMD platform - + BOOLEAN RegbCustomizedScanPeriod; u2Byte RegIntelCustomizedScanPeriod; u2Byte RegAMDCustomizedScanPeriod; @@ -3627,18 +3627,18 @@ typedef struct _MGNT_INFO{ u1Byte RegPassiveScan; BOOLEAN bSupportPacketCoalescing; - BOOLEAN IsAMDIOIC; - + BOOLEAN IsAMDIOIC; + BOOLEAN bPendScanOID; BOOLEAN bCheckScanTime; - u8Byte ScanOnlyStartTime; + u8Byte ScanOnlyStartTime; u1Byte RegMultiChannelFcsMode; BOOLEAN bFcsUpdateTSF; u1Byte WFDOpChannel; u4Byte RegWmmPage; u1Byte WFDPeerOpChannel; - u2Byte ConnectionConfigTimeIntv; + u2Byte ConnectionConfigTimeIntv; u4Byte Regbcndelay; BOOLEAN bWPSProcess; u1Byte RetryTimes; @@ -3670,7 +3670,7 @@ typedef struct _MGNT_INFO{ // SDIO polling interrupt mode BOOLEAN bSdioPollIntrHandler; u2Byte SdioIntrPollingLimit; - + // For Rx Reorder Control u1Byte RegRxReorder; u1Byte RegRxReorder_WinSize; @@ -3682,7 +3682,7 @@ typedef struct _MGNT_INFO{ u2Byte RegTxSendAsap; u2Byte CurTxSendAsap; - // MAC Address Randomization + // MAC Address Randomization u1Byte RegSupportMACRandom; //ECSA @@ -3716,7 +3716,7 @@ typedef struct _RT_NDIS_DBG_CONTEXT { BOOLEAN bDbgDrvUnload; - // Work Item for debugging. + // Work Item for debugging. RT_WORK_ITEM DbgWorkItem; PlatformEvent DbgWorkItemEvent; NDIS_SPIN_LOCK DbgWorkItemSpinLock; // To protect the following variables. @@ -3726,20 +3726,20 @@ typedef struct _RT_NDIS_DBG_CONTEXT // Variable needed in each implementation of CurrDbgAct. ULONG DbgActType; // Type of action performed in CurrDbgAct. - ULONG DbgIoOffset; // The type of IO operation is depend of DbgActType. + ULONG DbgIoOffset; // The type of IO operation is depend of DbgActType. ULONG DbgIoValue; // The type of IO operation is depend of DbgActType. ULONG DbgOutLen; u1Byte DbgOutBuf[100]; UCHAR DbgIoBuf[64]; ULONG DbgRfPath; // The RF path of IO operation. Added by Roger, 2008.09.10. - //cosa add for bt control + //cosa add for bt control // Event used to sync H2c for BT control PlatformEvent dbgH2cRspEvent; PlatformEvent dbgBtC2hEvent; PlatformEvent dbgBtCoexEvent; u1Byte h2cReqNum; - u1Byte btInBuf[100]; + u1Byte btInBuf[100]; } RT_NDIS_DBG_CONTEXT, *PRT_NDIS_DBG_CONTEXT; // // Reason code for surprisely removing. @@ -3851,10 +3851,10 @@ typedef struct _DUAL_MAC_EASY_CONCURRENT_CONTROL{ BOOLEAN bChangeToDMSP; BOOLEAN bSwitchInProcess; u1Byte JoinAction; - RT_WLAN_BSS BssDesc; + RT_WLAN_BSS BssDesc; BOOLEAN bTmpBssDesc; BOOLEAN bLinkWithNAP; - BOOLEAN bRestartAPForMac0ConnectOnDmsp; + BOOLEAN bRestartAPForMac0ConnectOnDmsp; BOOLEAN bLinkInProgress; BOOLEAN bDynamicSwitchToDmspInProgress; BOOLEAN bDynamicSwitchToDmspRetry; @@ -3918,8 +3918,8 @@ typedef struct _PORT_COMMON_INFO // ================================================================================================ - PPORT_HELPER pPortHelper; - + PPORT_HELPER pPortHelper; + // MacId Context Place Holder for Private Data: ------------------------------------ // + Only access this private data inside the module by MacIdGetCommonContext() PRIVATE_DATA_ZONE MacIdCommon[HAL_MAC_ID_SIZE_OF_COMMON_CONTEXT]; @@ -3930,7 +3930,7 @@ typedef struct _PORT_COMMON_INFO PRIVATE_DATA_ZONE ActionTimerCommon[ACTION_TIMER_SIZE_OF_COMMON_CONTEXT]; // ------------------------------------------------------------------------------- - + #if (MULTIPORT_SUPPORT == 1) // MultiPort Common Context Place Holder for Private Data: ---------------------------- @@ -3945,7 +3945,7 @@ typedef struct _PORT_COMMON_INFO // + Only access this private data inside the module by MultiChannelGetCommonContext() PRIVATE_DATA_ZONE MultiChannelCommon[MULTICHANNEL_SIZE_OF_COMMON_CONTEXT]; // ------------------------------------------------------------------------------- - + #endif #endif @@ -3957,7 +3957,7 @@ typedef struct _PORT_COMMON_INFO RT_LIST_ENTRY TimerResourceList; // Timer resource list for further handling u4Byte uNumberOfInsertedTimerRes; // Number of Timer resource has been inserted for handling - + } PORT_COMMON_INFO, * PPORT_COMMON_INFO; typedef enum @@ -3988,7 +3988,7 @@ typedef struct _ADAPTER{ PRT_NDIS_COMMON pNdisCommon; PRT_NDIS62_COMMON pNdis62Common; - + //===================================================== // Please put tx related variables in TX_GENERAL. //===================================================== @@ -4012,10 +4012,10 @@ typedef struct _ADAPTER{ #if (MULTICHANNEL_SUPPORT == 1) // MultiChannel Port Context Place Holder for Private Data: --------------------------- - // + Only access this private data inside the module by MultiChannelGetPortContext() + // + Only access this private data inside the module by MultiChannelGetPortContext() PRIVATE_DATA_ZONE MultiChannel[MULTICHANNEL_SIZE_OF_PORT_CONTEXT]; // -------------------------------------------------------------------------- - + #endif #endif @@ -4031,7 +4031,7 @@ typedef struct _ADAPTER{ BOOLEAN bIMRDisable; - BOOLEAN bvWifiStopBeforeSleep; + BOOLEAN bvWifiStopBeforeSleep; BOOLEAN bDriverStopped; BOOLEAN bSurpriseRemoved; u4Byte SurpriseRemovedReason; @@ -4042,7 +4042,7 @@ typedef struct _ADAPTER{ u2Byte MAX_NUM_RFD; - u2Byte MAX_NUM_RX_DESC; + u2Byte MAX_NUM_RX_DESC; u2Byte MAX_RECEIVE_BUFFER_SIZE; u2Byte MAX_SUBFRAME_TOTAL_COUNT; @@ -4063,7 +4063,7 @@ typedef struct _ADAPTER{ u2Byte MAX_TRANSMIT_BUFFER_SIZE; BOOLEAN bEarlyQueueTimeout; // - // Union of functions disabled. + // Union of functions disabled. // Each bit indicated one function that is disabled, such as Tx, Rx, IO. // See DF_XX_BIT and related operation defined above. // @@ -4081,9 +4081,9 @@ typedef struct _ADAPTER{ WIRELESS_MODE RegOrigWirelessMode; WIRELESS_MODE RegWirelessMode; HT_MODE RegHTMode; - + BOOLEAN bFWReady; - BOOLEAN bHWInitReady; + BOOLEAN bHWInitReady; BOOLEAN bSWInitReady; BOOLEAN bInitializeInProgress; BOOLEAN bInitComplete; @@ -4107,7 +4107,7 @@ typedef struct _ADAPTER{ u8Byte updateBeQReadPointTime[10]; u8Byte latestUpdatedTxDescTime; u4Byte wrongrwTxpointCnt; - + u4Byte abnormalAvaiDescLogIndex[MAX_TX_QUEUE]; u2Byte abnormalCurrentTXWritePoint[MAX_TX_QUEUE][10]; //======================================= @@ -4124,9 +4124,9 @@ typedef struct _ADAPTER{ u2Byte NextTxDescToCheck[MAX_TX_QUEUE]; u2Byte nBufInTxDesc[MAX_TX_QUEUE]; u1Byte nFragDescUsed; - + // For WIN7 Context switch - LIST_ENTRY HVLContextLinked; + LIST_ENTRY HVLContextLinked; //2 Receive related variables BOOLEAN bRxLocked; // For debugging RT_RX_SPINLOCK. Note that! we SHOULD ONLY change it at PlatformXXXSpinLock(). 2005.11.17, by rcnjko. @@ -4141,7 +4141,7 @@ typedef struct _ADAPTER{ PNDIS_RECEIVE_THROTTLE_PARAMETERS pThrottle; BOOLEAN bFirstMpduOfInterrupt; #endif - + u2Byte NextRxDescToFill[MAX_RX_QUEUE]; u2Byte NextRxDescToCheck[MAX_RX_QUEUE]; u2Byte nBufInRxDesc[MAX_RX_QUEUE]; @@ -4159,7 +4159,7 @@ typedef struct _ADAPTER{ u2Byte NumLocalFWBufferIdle; //tynli_test VIRTUAL_MEMORY LocalBufferArray; VIRTUAL_MEMORY LocalFWBufferArray; // For download Firmware - RT_LIST_ENTRY LocalBufferQueue; + RT_LIST_ENTRY LocalBufferQueue; RT_LIST_ENTRY LocalFWBufferQueue; // For download Firmware //2 Receive local buffer @@ -4178,7 +4178,7 @@ typedef struct _ADAPTER{ //2 General Templorary Buffer VIRTUAL_MEMORY GenTempBufferArray; // for General Templorary Buffer - RT_LIST_ENTRY GenTempBufferQueue; + RT_LIST_ENTRY GenTempBufferQueue; u4Byte NumGenTempBufferIdle; u1Byte TempBufferforcoalsece[2000]; @@ -4190,7 +4190,7 @@ typedef struct _ADAPTER{ u4Byte AP_EDCA_PARAM[4]; u4Byte STA_EDCA_PARAM[4]; - // MISC. + // MISC. u8Byte DriverUpTime; // Yves: Driver up time. u8Byte lastscantime;//lastscantime u8Byte LastScanCompleteTime; // Last scan complete time. @@ -4204,19 +4204,19 @@ typedef struct _ADAPTER{ LARGE_INTEGER PnPIOTime; // For HCT test, 2005.07.15, by rcnjko. - BOOLEAN bInHctTest; - BOOLEAN bInWFDTest; - BOOLEAN bScanTimeCheck; + BOOLEAN bInHctTest; + BOOLEAN bInWFDTest; + BOOLEAN bScanTimeCheck; BOOLEAN bFixedMacAddr; - + BOOLEAN bReduceImr; - + BOOLEAN bInChaosTest; BOOLEAN bDisable11ac; // For USB IF test, 060505, by rcnjko. BOOLEAN bInUsbIfTest; - + //2 System Reset RESET_TYPE ResetProgress; u4Byte ResetCount; @@ -4233,11 +4233,11 @@ typedef struct _ADAPTER{ // // Pointer to the memory block storing pointers to DRV_LOG_POOL_T objects. // Each log pool is corresponding to one type of log. - // Use GET_DRV_LOG_POOL() and SET_DRV_LOG_POOL() to manipulate log pool, + // Use GET_DRV_LOG_POOL() and SET_DRV_LOG_POOL() to manipulate log pool, // see LogMgnt.c for details. // #if DRV_LOG - VOID** ppLogPools; + VOID** ppLogPools; #endif @@ -4256,7 +4256,7 @@ typedef struct _ADAPTER{ BOOLEAN bInWoWLANPowerState; BOOLEAN bReInitHW; // record - // Interrupt debug message + // Interrupt debug message u4Byte handleIntFailCnt; u8Byte lastHandleIntFailTime[10]; u8Byte preHandlIntTime; @@ -4264,7 +4264,7 @@ typedef struct _ADAPTER{ u4Byte intLogTimeIndex; u8Byte handleIntTime[10]; - // Tx hang debug info + // Tx hang debug info HW_REG_VALUE txMacReg[MAX_TX_REG_NUM]; HW_REG_VALUE txBbReg[MAX_TX_REG_NUM]; BOOLEAN bTxHangCheck; @@ -4293,7 +4293,7 @@ typedef struct _ADAPTER{ BOOLEAN bStartVwifi; - //Rx reorder related Reference variables + //Rx reorder related Reference variables u4Byte rxReorderRefCount; u4Byte rxReorderIndEnterCnt; u4Byte rxReorderIndAllowCnt; @@ -4311,10 +4311,10 @@ typedef struct _ADAPTER{ u4Byte IntrInterruptRefCount; u4Byte RxPktPendingTimeoutRefCount; - + BOOLEAN bIntInProgress; // Interrupt handling is in progress PlatformSemaphore InterruptSema; //For interrupt sync flow control - + // Interrupt Thread BOOLEAN bUseThreadHandleInterrupt; @@ -4328,7 +4328,7 @@ typedef struct _ADAPTER{ // 2010/12/25 MH Add for _DFS support flag. // 2010/12/27 MH Add for Dual Mode switch support flag // 2010/12/28 MH Add for Dual Mode smart concurrent support flag - // 2010/12/30 MH Add WAPI and other fucuter support support flag. + // 2010/12/30 MH Add WAPI and other fucuter support support flag. #ifdef REMOVE_PACK #pragma pack(1) #endif @@ -4343,7 +4343,7 @@ typedef struct _ADAPTER{ UINT32 DebugPhase:2; // Free build/chk build/ debug module. UINT32 MpSupport:1; // Normal or MP driver UINT32 MsiSupport:2; // PCIE different interrupt type support traditional/ MIS/ MSI_X based on different PCIE spec - UINT32 EthSupport:1; // Ethner simulation switch. for 8715 in the future.or IC verification + UINT32 EthSupport:1; // Ethner simulation switch. for 8715 in the future.or IC verification UINT32 TDLSSupport:1; #ifdef REMOVE_PACK #pragma pack() @@ -4354,7 +4354,7 @@ typedef struct _ADAPTER{ UINT32 TXSCSupport:1; UINT32 RXSCSupport:1; UINT32 RASupport:1; - UINT32 Reserve:7; + UINT32 Reserve:7; //2 92D related variables u1Byte MacPhyModeFor8192D; @@ -4363,11 +4363,11 @@ typedef struct _ADAPTER{ u1Byte EarlyMode_Threshold; u1Byte EarlyMode_QueueNum[8]; //The tid from 0--7 u1Byte EarlyModebuf[1600]; - - // 2010/12/27 MH We need to reduce the declareation to prevent occupying too much memory + + // 2010/12/27 MH We need to reduce the declareation to prevent occupying too much memory // The better way is to ise the union structure for bit declaration in the future. RT_LIST_ENTRY List; - //PADAPTER BuddyAdapter; + //PADAPTER BuddyAdapter; //BOOLEAN bMasterOfDMSP; //BOOLEAN bSlaveOfDMSP; @@ -4384,19 +4384,19 @@ typedef struct _ADAPTER{ u4Byte PS_BBRegBackup[PSBBREG_MAX]; RT_LIST_ENTRY ListEntry; - + u1Byte ShortcutIndex; //record entry index of array for shortcut and it's 1 based s1Byte SNForShortcut; - + BOOLEAN bNeedToTriggerLA; - + BOOLEAN bBtFwSupport; BOOLEAN bNromalRQPN; #if USB_TX_THREAD_ENABLE BOOLEAN bUseUsbTxThread; // Dynamically enable USB Tx thread. 2012.06.18. by tynli. -#endif +#endif BOOLEAN bRemoveTsInRxPath; @@ -4410,7 +4410,7 @@ typedef struct _ADAPTER{ // 2013.1213 // #if DRV_LOG_REGISTRY - u4Byte DrvState; + u4Byte DrvState; u4Byte WriteRegRefCount; BOOLEAN bDrvStateError; #endif @@ -4423,8 +4423,8 @@ typedef struct _ADAPTER{ BOOLEAN bFixBTTdma; u4Byte CPWMTimeoutCount; BOOLEAN bRxPsWorkAround; - - RT_THREAD RxNotifyThread; + + RT_THREAD RxNotifyThread; // Rx queue. RT_SINGLE_LIST_HEAD RxPeerQueue[MAX_PEER_NUM]; diff --git a/network/wlan/WDI/HEADER/WiDiType.h b/network/wlan/WDI/HEADER/WiDiType.h index b33f18f32..2bf8b969c 100644 --- a/network/wlan/WDI/HEADER/WiDiType.h +++ b/network/wlan/WDI/HEADER/WiDiType.h @@ -10,7 +10,7 @@ #define __INC_WIDI_TYPE_H #define WFD_OUI_TYPE 0x0A -#define WFD_MAX_SCAN_LIST_NUM 128 +#define WFD_MAX_SCAN_LIST_NUM 128 #define WFD_SUB_ID_LEN 1 // 1 Byte #define WFD_SUB_LEN_LEN 2 // 2 Byte @@ -127,7 +127,7 @@ typedef enum _WFD_SUB_ID{ WFD_SUB_ID_DEVICE_INFORMATION =0, WFD_SUB_ID_ASSOC_BSSID =1, WFD_SUB_ID_AUDIO_FORMATS =2, - WFD_SUB_ID_VIDEO_FORMATS =3, + WFD_SUB_ID_VIDEO_FORMATS =3, WFD_SUB_ID_3D_VIDEO_FORMATS =4, WFD_SUB_ID_CONTENT_PROTECTION =5, WFD_SUB_ID_COUPLED_SINK_INFORMATION =6, @@ -233,7 +233,7 @@ typedef struct _WFD_CLIENT_ENTRY_INFO { BOOLEAN bWfdClient; // If TRUE, it is a WFD client. PVOID pEntry; // The entry of RT_WLAN_STA. - WFD_DEVICE_INFO_DESC deviceDesc; // WFD_DEVICE_INFO_DESC + WFD_DEVICE_INFO_DESC deviceDesc; // WFD_DEVICE_INFO_DESC }WFD_CLIENT_ENTRY_INFO, *PWFD_CLIENT_ENTRY_INFO; #define WFD_DEFAULT_CONTROL_PORT 8554 @@ -247,7 +247,7 @@ typedef struct _WFD_INFO RT_SPIN_LOCK wfdSpinLock; u2Byte deviceInfo; // WFD Device Information field u2Byte controlPort; // Session Management Control Port - u2Byte maxTP; // WFD DEvice Maximum Throughput + u2Byte maxTP; // WFD DEvice Maximum Throughput u1Byte coupledSinkStatus; // Coupled Sink Status u1Byte coupledSinkAddr[6]; // Mac Address of Coupled Sink u2Byte extCapability; // Extended Capabilities @@ -273,7 +273,7 @@ typedef struct _WFD_INFO #define WFD_REQ_ID u4Byte #define WFD_REQ_ID_MIN_SUPPORT_VERSION (WFD_REQ_ID)0x00000001 #define WFD_REQ_ID_MAX_SUPPORT_VERSION (WFD_REQ_ID)0x00000002 -#define WFD_REQ_ID_CURRENT_VERSION (WFD_REQ_ID)0x00000003 +#define WFD_REQ_ID_CURRENT_VERSION (WFD_REQ_ID)0x00000003 #define WFD_REQ_ID_WFD_MODE (WFD_REQ_ID)0x00000010 #define WFD_REQ_ID_DEVICE_TYPE (WFD_REQ_ID)0x00000011 diff --git a/network/wlan/WDI/HEADER/WlanDriverEvents.h b/network/wlan/WDI/HEADER/WlanDriverEvents.h index e51f22497..337f75bd7 100644 --- a/network/wlan/WDI/HEADER/WlanDriverEvents.h +++ b/network/wlan/WDI/HEADER/WlanDriverEvents.h @@ -24,7 +24,7 @@ extern "C" { #ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION #if !defined(McGenDebug) #define McGenDebug(a,b) -#endif +#endif #if !defined(MCGEN_TRACE_CONTEXT_DEF) @@ -37,7 +37,7 @@ typedef struct _MCGEN_TRACE_CONTEXT ULONGLONG MatchAllKeyword; ULONG Flags; ULONG IsEnabled; - UCHAR Level; + UCHAR Level; UCHAR Reserve; USHORT EnableBitsCount; PULONG EnableBitMask; @@ -128,22 +128,22 @@ Routine Description: Arguments: - SourceId - The GUID that identifies the session that enabled the provider. + SourceId - The GUID that identifies the session that enabled the provider. - ControlCode - The parameter indicates whether the provider + ControlCode - The parameter indicates whether the provider is being enabled or disabled. Level - The level at which the event is enabled. - MatchAnyKeyword - The bitmask of keywords that the provider uses to + MatchAnyKeyword - The bitmask of keywords that the provider uses to determine the category of events that it writes. - MatchAllKeyword - This bitmask additionally restricts the category - of events that the provider writes. + MatchAllKeyword - This bitmask additionally restricts the category + of events that the provider writes. FilterData - The provider-defined data. - CallbackContext - The context of the callback that is defined when the provider + CallbackContext - The context of the callback that is defined when the provider called EtwRegister to register itself. Remarks: @@ -189,7 +189,7 @@ Routine Description: RtlZeroMemory(Ctx->EnableBitMask, (((Ctx->EnableBitsCount - 1) / 32) + 1) * sizeof(ULONG)); } break; - + default: break; } @@ -208,7 +208,7 @@ Routine Description: CallbackContext ); #endif - + return; } @@ -260,13 +260,13 @@ EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR RxReturnToDriver = {0x6, 0 // // Note on Generate Code from Manifest Windows Vista and above // -//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra +//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra //parameter for the size in bytes of the structure. Make sure that your structures have no extra padding. // -//Strings: There are several cases that can be described in the manifest. For array of variable length -//strings, the generated code will take the count of characters for the whole array as an input parameter. +//Strings: There are several cases that can be described in the manifest. For array of variable length +//strings, the generated code will take the count of characters for the whole array as an input parameter. // -//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate +//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate //GetLengthSid function to get the length. // @@ -276,7 +276,7 @@ EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR RxReturnToDriver = {0x6, 0 #ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION // -// Globals +// Globals // @@ -332,7 +332,7 @@ Routine Description: return STATUS_SUCCESS; } - Error = EtwRegister( ProviderId, EnableCallback, CallbackContext, RegHandle); + Error = EtwRegister( ProviderId, EnableCallback, CallbackContext, RegHandle); return Error; } @@ -364,14 +364,14 @@ Routine Description: return STATUS_SUCCESS; } - Error = EtwUnregister(*RegHandle); + Error = EtwUnregister(*RegHandle); *RegHandle = (REGHANDLE)0; - + return Error; } #endif -// +// // Tx Events // #define ETW_TX_FRAME_RECV_FROM_OS_EN BIT0 @@ -379,7 +379,7 @@ Routine Description: #define ETW_TX_COMPLETE_BY_NIC_EN BIT2 #define ETW_TX_COMPLETE_TO_OS BIT3 -// +// // Rx Events // #define ETW_RX_INDIC_FROM_NIC BIT4 @@ -391,14 +391,14 @@ Routine Description: // Register with ETW Vista + // #ifndef EventRegisterMicrosoft_Windows_WLAN_Driver -#define EventRegisterMicrosoft_Windows_WLAN_Driver() McGenEventRegister(&MICROSOFT_WINDOWS_WLAN_DRIVER_PROVIDER_GUID, McGenControlCallbackV2, &MICROSOFT_WINDOWS_WLAN_DRIVER_PROVIDER_GUID_Context, &Microsoft_Windows_WLAN_DriverHandle) +#define EventRegisterMicrosoft_Windows_WLAN_Driver() McGenEventRegister(&MICROSOFT_WINDOWS_WLAN_DRIVER_PROVIDER_GUID, McGenControlCallbackV2, &MICROSOFT_WINDOWS_WLAN_DRIVER_PROVIDER_GUID_Context, &Microsoft_Windows_WLAN_DriverHandle) #endif // // UnRegister with ETW // #ifndef EventUnregisterMicrosoft_Windows_WLAN_Driver -#define EventUnregisterMicrosoft_Windows_WLAN_Driver() McGenEventUnregister(&Microsoft_Windows_WLAN_DriverHandle) +#define EventUnregisterMicrosoft_Windows_WLAN_Driver() McGenEventUnregister(&Microsoft_Windows_WLAN_DriverHandle) #endif // @@ -501,7 +501,7 @@ Routine Description: #ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION // -// Template Functions +// Template Functions // // //Template from manifest : TxFrameReceivedFromOS diff --git a/network/wlan/WDI/HEADER/platform-os-version.h b/network/wlan/WDI/HEADER/platform-os-version.h index ebdbdfbf6..358e5cc01 100644 --- a/network/wlan/WDI/HEADER/platform-os-version.h +++ b/network/wlan/WDI/HEADER/platform-os-version.h @@ -1,2 +1,2 @@ -#define RT_PLATFORM PLATFORM_WINDOWS -#define OS_VERSION OS_WIN_10 +#define RT_PLATFORM PLATFORM_WINDOWS +#define OS_VERSION OS_WIN_10 diff --git a/network/wlan/WDI/PLATFORM/DIRS.NDIS6 b/network/wlan/WDI/PLATFORM/DIRS.NDIS6 index 72d694168..ff7768456 100644 --- a/network/wlan/WDI/PLATFORM/DIRS.NDIS6 +++ b/network/wlan/WDI/PLATFORM/DIRS.NDIS6 @@ -1,4 +1,4 @@ DIRS=\ NdisComm\ - NDIS6 - + NDIS6 + diff --git a/network/wlan/WDI/PLATFORM/NDIS6/CCX_Extension.h b/network/wlan/WDI/PLATFORM/NDIS6/CCX_Extension.h index 9b4fdb49d..c6c010f7b 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/CCX_Extension.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/CCX_Extension.h @@ -17,7 +17,7 @@ typedef struct _OCTET_STRING OCTET_STRING, *POCTET_STRING; //Edit by Mars 2008/02/21 //------------------------------------------------------------------------------- //=========================================================================== -VOID +VOID CcxIndicateStatusIndication ( IN PADAPTER pAdapter, IN u4Byte StatusCode, diff --git a/network/wlan/WDI/PLATFORM/NDIS6/CCX_Predef.h b/network/wlan/WDI/PLATFORM/NDIS6/CCX_Predef.h index 0226ef7ef..4352af250 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/CCX_Predef.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/CCX_Predef.h @@ -113,7 +113,7 @@ typedef struct _CCX_ADAPTER_INFO { CCXGUID guid; //Guid which identifies the WLAN adapter CCXUINT8 ccxVer; //Version of CCX the adapter supports -} CCX_ADAPTER_INFO, *PCCX_ADAPTER_INFO; +} CCX_ADAPTER_INFO, *PCCX_ADAPTER_INFO; typedef enum _CCX_AUTH_RESULT { @@ -218,7 +218,7 @@ typedef struct _TX_CHARACTERISTICS CCXUINT32 frequency; CCXUINT16 numMPDU; CCXUINT32 dataRate; - CCXUINT64 tsf; + CCXUINT64 tsf; CCXUINT8 retryCount; } TX_CHARACTERISTICS, *PTX_CHARACTERISTICS; @@ -280,7 +280,7 @@ typedef struct _CCX_EAP_RESULTS PCCXUINT8 pMPPRecvKey; } CCX_EAP_RESULTS, *PCCX_EAP_RESULTS; -//Why nic is roaming +//Why nic is roaming typedef enum _CCX_TRANS_REASON { CCX_TRANS_UNSPECIFIED, // 0 @@ -291,9 +291,9 @@ typedef enum _CCX_TRANS_REASON CCX_TRANS_FIRST_ASSOCIATION, // 5 CCX_TRANS_INTO_WLAN, // 6 CCX_TRANS_OUT_OF_WLAN, // 7 - CCX_TRANS_BETTER_AP_FOUND, // 8 + CCX_TRANS_BETTER_AP_FOUND, // 8 CCX_TRANS_AP_DISASSOCIATED, // 9 - CCX_TRANS_FAILED_8021X_EAP_AUTHEN, // 10 + CCX_TRANS_FAILED_8021X_EAP_AUTHEN, // 10 CCX_TRANS_FAILED_8021X_4WAY_HANDSHAKE, // 11 CCX_TRANS_REPLAY_COUNTER_FAILURES, // 12 CCX_TRANS_MIC_DATA_FAILURES, // 13 @@ -450,7 +450,7 @@ typedef struct _CCX_STATUS_ADAPTER_CONFIG typedef struct _CCX_STATUS_EAP_AUTHENTICATED { - CCX_802_11_MAC_ADDRESS ccxBSSID; + CCX_802_11_MAC_ADDRESS ccxBSSID; CCX_EAP_RESULTS ccxEapKeys; } CCX_STATUS_EAP_AUTHENTICATED, *PCCX_STATUS_EAP_AUTHENTICATED; @@ -459,7 +459,7 @@ typedef struct _CCX_STATUS_EAP_AUTHENTICATED typedef struct _CCX_STATUS_PMKID_LIST { CCXUINT32 uPMKIDListSize; - CCXUINT32 uPMKIDListOffset; + CCXUINT32 uPMKIDListOffset; } CCX_STATUS_PMKID_LIST, *PCCX_STATUS_PMKID_LIST; @@ -482,18 +482,18 @@ typedef struct _CCX_STATUS_DIAG_DATA // Here we define the predefine Parameter in ccxRM.h in Vsita CCX Header file // //-------------------------------------------------------------------- -// +// // Measurement report mode field bit definitions. -// +// typedef enum _CCX_RM_RESULT { CCX_RM_RESULT_ACCEPTED = 0, CCX_RM_RESULT_INCAPABLE, CCX_RM_RESULT_REFUSED } CCX_RM_RESULT, *PCCX_RM_RESULT; -// +// // Measurement type definitions (used for both requests and reports). -// +// typedef enum _CCX_RM_TYPE { CCX_RM_TYPE_CHANNEL_LOAD = 1, CCX_RM_TYPE_NOISE_HISTOGRAM, @@ -501,9 +501,9 @@ typedef enum _CCX_RM_TYPE { CCX_RM_TYPE_FRAME } CCX_RM_TYPE, *PCCX_RM_TYPE; -// +// // Scan mode definitions for beacon request element -// +// typedef enum _CCX_RM_SCAN_MODE { CCX_RM_MODE_PASSIVE = 0, CCX_RM_MODE_ACTIVE, @@ -519,20 +519,20 @@ typedef struct _CCX_RM_REQUEST { } CCX_RM_REQUEST, *PCCX_RM_REQUEST; //------------------------------------------------------------------------------ -// Header struct for RM request +// Header struct for RM request //------------------------------------------------------------------------------ typedef struct _CCX_RM_REQ_IE_HDR { - CCXUINT16 Token; + CCXUINT16 Token; CCX_RM_TYPE Type; } CCX_RM_REQ_IE_HDR, *PCCX_RM_REQ_IE_HDR; //------------------------------------------------------------------------------ -// The RM requests +// The RM requests //------------------------------------------------------------------------------ typedef struct _CCX_RM_CCA_REQ_IE { CCX_RM_REQ_IE_HDR Header; // type 1 CCXUINT8 Channel; - CCXUINT16 Duration; + CCXUINT16 Duration; } CCX_RM_CCA_REQ_IE, *PCCX_RM_CCA_REQ_IE; typedef struct _CCX_RM_RPI_REQ_IE { @@ -594,9 +594,9 @@ typedef struct _CCX_RM_BEACON_RPT_IE { CCXUINT16 Duration; } CCX_RM_BEACON_RPT_IE, *PCCX_RM_BEACON_RPT_IE; -// +// // Frame report data -// +// typedef struct _CCX_RM_FRAME_RPT_QUAD { CCX_802_11_MAC_ADDRESS SA; CCX_802_11_MAC_ADDRESS BSSID; @@ -643,7 +643,7 @@ typedef struct _CCX_STA_STATS_GRP_2 { // Here we define the predefine Parameter in ccxDiag.h in Vsita CCX Header file // //-------------------------------------------------------------------- -typedef struct _CCX_FRAME_LOGGING_MODE +typedef struct _CCX_FRAME_LOGGING_MODE { CCXBOOLEAN bEnabled; } CCX_FRAME_LOGGING_MODE, *PCCX_FRAME_LOGGING_MODE; @@ -722,7 +722,7 @@ typedef struct _CCX_NOTIFY_DIAG_MSG { DIAG_NOTIFICATION_ID msgId; CCXUINT32 msgLen; - CCXUINT32 msgOffset; + CCXUINT32 msgOffset; } CCX_NOTIFY_DIAG_MSG, *PCCX_NOTIFY_DIAG_MSG; //-------------------------------------------------------------------- @@ -733,8 +733,8 @@ typedef struct _CCX_NOTIFY_DIAG_MSG // Index values for neighbor list entry subelements // These are used to index into the subElemOffset array to retreive the -// data offsets for each subelement type. -// Note: These values do not match the subelement type values used in the +// data offsets for each subelement type. +// Note: These values do not match the subelement type values used in the // TLV's received in the IAPP message. typedef enum _CCX_NL_SUBELEM_INDEX { @@ -776,7 +776,7 @@ typedef struct _CCX_NL_SUBELEM_ACE CCXUINT8 loadFactor; } CCX_NL_SUBELEM_ACE, *PCCX_NL_SUBELEM_ACE; -// Neighbor list entry format. +// Neighbor list entry format. // This is the format of the data for each entry in the neighbor list typedef struct _CCX_NL_ELEMENT { @@ -786,10 +786,10 @@ typedef struct _CCX_NL_ELEMENT CCXUINT8 channelBand; // channel band being used by AP CCX_PHY_TYPE phyType; // phy type of AP - // subelem offsets are the offset from the start of this structure - // where the data for each subelement type is located. Each - // subelement's data is formatted in it's struct type defined - // below. If the offset for a subelement is 0, there is no + // subelem offsets are the offset from the start of this structure + // where the data for each subelement type is located. Each + // subelement's data is formatted in it's struct type defined + // below. If the offset for a subelement is 0, there is no // data for that particular subelement. CCXUINT32 subElemOffset[CCX_NL_SUBELEM_INDEX_MAX]; } CCX_NL_ELEMENT, *PCCX_NL_ELEMENT; @@ -938,7 +938,7 @@ typedef struct _IHV_SET_INFO // Note - This definition machtes the CCX_REQUEST_DATA's QUERY_INFO structure //--------------------------------------------------------------------------- typedef struct _IHV_QUERY_INFO -{ +{ UINT32 Oid; UINT32 BytesWritten; UINT32 BytesNeeded; @@ -977,7 +977,7 @@ typedef struct _IHV_CCX_PACKET { //--------------------------------------------------------------------------- typedef struct _TLV_STRUCT { - ULONG type; + ULONG type; ULONG length; PVOID value; } TLV_STRUCT, *PTLV_STRUCT; @@ -989,19 +989,19 @@ typedef DOT11_EXTSTA_RECV_CONTEXT IHV_RX_CHARACTERISTICS, *PIHV_RX_CHARACTERIS //--------------------------------------------------------------------------- // Completion reason codes for packets passed from IHV service to driver for transmission. -// +// // IHV_TX_COMPL_REASON_SUCCESS // -packet was successfully sent -// -// IHV_TX_COMPL_REASON_FAILED +// +// IHV_TX_COMPL_REASON_FAILED // -MPSendNetBufferLists() failed to submit the packet for transmission -// -// IHV_TX_COMPL_REASON_CANCELLED +// +// IHV_TX_COMPL_REASON_CANCELLED // -send was cancelled due to pause, reset, surprise removal. -// -// IHV_TX_COMPL_REASON_NDIS_CANCELLED +// +// IHV_TX_COMPL_REASON_NDIS_CANCELLED // -send was cancelled due to NDIS calling MPCancelSendNetBufferLists() -// +// // IHV_TX_COMPL_REASON_ADAPTER_NOT_READY // -MPSendNetBufferLists() determined that it could not perform the send. // i.e. MP_ADAPTER_CANNOT_SEND_PACKETS() macro returns TRUE. @@ -1019,7 +1019,7 @@ typedef DOT11_EXTSTA_RECV_CONTEXT IHV_RX_CHARACTERISTICS, *PIHV_RX_CHARACTERIS //--------------------------------------------------------------------------- // Transmit characteristics //--------------------------------------------------------------------------- -typedef struct _IHV_TX_CHARACTERISTICS +typedef struct _IHV_TX_CHARACTERISTICS { HANDLE hSrvLibCompletion; ULONG txFlags; @@ -1045,15 +1045,15 @@ typedef struct _STA_EAP_SESSION { //unencrypted } STA_EAP_SESSION, *PEAP_SESSION; -// +// // Maximum number of request element we allow in a single request. -// +// #define MAX_RM_REQUEST_ELEMENTS 16 // // MFP MIB variables. // -typedef struct _MFP_MIB_VARS +typedef struct _MFP_MIB_VARS { LONG dot11RSNAMgmtStatsTKIPICVErrors; LONG dot11RSNAMgmtStatsTKIPLocalMICFailures; @@ -1084,7 +1084,7 @@ typedef struct _STA_CCX_RM_CONTEXT { LONG timerSync; ULONG rmReqLen; PUCHAR rmReq; - + ULONG beaconCount; // temporary ULONG probeCount; // temporary ULONG frameCount; // temporary @@ -1096,7 +1096,7 @@ typedef struct _STA_CCX_RM_CONTEXT { /** * Maintains CCX diagnostics context */ -typedef struct _STA_CCX_DIAG_CONTEXT +typedef struct _STA_CCX_DIAG_CONTEXT { // PDIAG_CONTROLS DiagCapCtl; // Various settings for diag/capture mode Mark For Compile BOOLEAN diagMode; // if TRUE then diag mode is enabled. @@ -1106,12 +1106,12 @@ typedef struct _STA_CCX_DIAG_CONTEXT /** * Maintains CCX MFP context */ -typedef struct _STA_CCX_MFP_CONTEXT +typedef struct _STA_CCX_MFP_CONTEXT { BOOLEAN mfpActive; // if TRUE then protect/validate class 3 management frames. ULONGLONG mfpReplayCounter; // watch for management frame replays MFP_MIB_VARS mfpStats; // MFP related counters. -// DOT11_MGMT_HEADER fragHeader; // store header from first fragment so we can MFP validate +// DOT11_MGMT_HEADER fragHeader; // store header from first fragment so we can MFP validate // subsequent fragments against it. // PDOT11_MGMT_HEADER pFirstFragHeader; // non-NULL when there are more frags of an MSDU to come. } STA_CCX_MFP_CONTEXT, *PSTA_CCX_MFP_CONTEXT; @@ -1119,11 +1119,11 @@ typedef struct _STA_CCX_MFP_CONTEXT /** * Maintains CCX diagnostics context */ -typedef struct _STA_CCX_ASSOC_CONTEXT +typedef struct _STA_CCX_ASSOC_CONTEXT { BOOLEAN Assoc_OID_Set; //For set oid by DLL and go Normal assoc process NDIS_MINIPORT_TIMER OKToAssocTimeoutTimer; // timer to timeout OK to assoc event from IHV service. - LONG OKToAssocTimerSync; // + LONG OKToAssocTimerSync; // ULONG AssocReqIESize; // size of AssocReqIE buffer. PUCHAR AssocReqIE; // array of IE to include in association request. ULONG txPowerLevel; // Power level controlled by the AP. @@ -1132,7 +1132,7 @@ typedef struct _STA_CCX_ASSOC_CONTEXT /** * Maintains roam context */ -typedef struct _STA_CCX_ROAM_CONTEXT +typedef struct _STA_CCX_ROAM_CONTEXT { BOOLEAN roamingActive; // are we actively roaming? ULONG txFailsInRow; // counter tracking successive TX failures @@ -1155,21 +1155,21 @@ typedef struct _IAPP_NET_BUFFER_QUEUE { PNET_BUFFER_LIST FreeTxNBL; UINT FreeTxNBLCount; NDIS_SPIN_LOCK TxQlock; - + PADAPTER pAdapter; } IAPP_BUFQUEUE, *PIAPP_BUFQUEUE; /** * Maintains all CCX station specific state information */ -typedef struct _Cisco_CCX_CONTEXT +typedef struct _Cisco_CCX_CONTEXT { STA_EAP_SESSION eapSession; // Structure containing info about EAP session PIAPP_BUFQUEUE RecycleQueue; // used for pool of unused NET_BUFFER_LISTS (IAPP handling) - STA_CCX_ASSOC_CONTEXT AssocContext; // context infor for association + STA_CCX_ASSOC_CONTEXT AssocContext; // context infor for association STA_CCX_DIAG_CONTEXT DiagContext; // context info for diagnostics diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.c index ccbef0b87..5cb957782 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.c @@ -15,7 +15,7 @@ Routine Description: Arguments: Table: The MAC hash table, must not be NULL. MacKey: The MAC address - + Return Value: The found entry NULL Not found @@ -31,7 +31,7 @@ Return Value: head = &Table->Buckets[hash]; entry = head->Flink; while(head != entry) { - macEntry = CONTAINING_RECORD(entry, MAC_HASH_ENTRY, Linkage); + macEntry = CONTAINING_RECORD(entry, MAC_HASH_ENTRY, Linkage); if (memcmp(macEntry->MacKey, *MacKey, sizeof(DOT11_MAC_ADDRESS)) == 0) { hashEntry = macEntry; break; @@ -62,7 +62,7 @@ Routine Description: Return Value: None - + --*/ { int i; @@ -75,7 +75,7 @@ Return Value: entry = head->Flink; while(entry != head) { - macEntry = CONTAINING_RECORD(entry, MAC_HASH_ENTRY, Linkage); + macEntry = CONTAINING_RECORD(entry, MAC_HASH_ENTRY, Linkage); // Get the next entry before calling CallbackFn. // @@ -132,13 +132,13 @@ N62CStopApMode( SecSetSwEncryptionDecryption(Adapter, FALSE, FALSE); MgntActSet_ApType(Adapter, FALSE); - AP_Reset(Adapter); + AP_Reset(Adapter); SetAPState(Adapter, AP_STATE_STOPPED); PlatformZeroMemory(&Adapter->pNdisCommon->dot11DesiredSSIDList, sizeof(DOT11_SSID_LIST)); - AP_AllPowerSaveReturn(Adapter); + AP_AllPowerSaveReturn(Adapter); } MgntActSet_AdditionalBeaconIE(Adapter, NULL, 0); @@ -147,9 +147,9 @@ N62CStopApMode( //if(pDot11ResetRequest->bSetDefaultMIB) // N6InitializeNative80211MIBs(Adapter); - + // - // DDK: The NIC shall clear privacy exemption list on every reset + // DDK: The NIC shall clear privacy exemption list on every reset // regardless of the rest requests parameters. // 2008.10.17, haich // @@ -161,7 +161,7 @@ N62CStopApMode( //pNdis62Common->bAPBeaconMode = FALSE; // - // Reset network type. + // Reset network type. // pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; @@ -184,12 +184,12 @@ N62CStartApMode( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; FunctionIn(COMP_AP); - + if(!ACTING_AS_AP(Adapter)) - { + { AP_AllPowerSaveDisable(Adapter); } - + MgntActSet_ApType(Adapter, TRUE); if( pSecInfo->SecLvl > RT_SEC_LVL_NONE && !Adapter->bInHctTest) @@ -202,16 +202,16 @@ N62CStartApMode( } SetAPState(Adapter, AP_STATE_STARTING); - + N6InitializeIndicateStateMachine(Adapter); - + // // This is for Win7 DTM. // { PDOT11_SSID_LIST pSsidList = &(Adapter->pNdisCommon->dot11DesiredSSIDList); CopyMem(pMgntInfo->Ssid.Octet, pSsidList->SSIDs[0].ucSSID, pSsidList->SSIDs[0].uSSIDLength); - pMgntInfo->Ssid.Length =(u1Byte) pSsidList->SSIDs[0].uSSIDLength; + pMgntInfo->Ssid.Length =(u1Byte) pSsidList->SSIDs[0].uSSIDLength; } #if 0 @@ -223,7 +223,7 @@ N62CStartApMode( while(pTargetAdapter != NULL) { pTargetAdapter->MgntInfo.bStartApDueToWakeup=FALSE; - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } @@ -258,7 +258,7 @@ Neo Test 123 FunctionOut(COMP_AP); - + return ndisStatus; } @@ -286,10 +286,10 @@ N62CApIndicateStatus( StatusIndication.PortNumber = pAdapter->pNdis62Common->PortNumber; StatusIndication.SourceHandle = MiniportAdapterHandle; StatusIndication.StatusCode = GeneralStatus; - + StatusIndication.DestinationHandle = NULL; - StatusIndication.RequestId = RequestID; - + StatusIndication.RequestId = RequestID; + StatusIndication.StatusBuffer = StatusBuffer; StatusIndication.StatusBufferSize = StatusBufferSize; @@ -298,7 +298,7 @@ N62CApIndicateStatus( NdisMIndicateStatusEx(MiniportAdapterHandle, &StatusIndication); } -VOID +VOID N62CApIndicateStopAp( IN PADAPTER Adapter ) @@ -306,7 +306,7 @@ N62CApIndicateStopAp( DOT11_STOP_AP_PARAMETERS dot11StopApParameters; RT_TRACE((COMP_AP|COMP_INDIC), DBG_LOUD, ("===> N62CApIndicateStopAp()\n")); - + NdisZeroMemory(&dot11StopApParameters, sizeof(DOT11_STOP_AP_PARAMETERS)); N6_ASSIGN_OBJECT_HEADER( @@ -316,7 +316,7 @@ N62CApIndicateStopAp( sizeof(DOT11_STOP_AP_PARAMETERS)); dot11StopApParameters.ulReason = DOT11_STOP_AP_REASON_CHANNEL_NOT_AVAILABLE; - + N62CApIndicateStatus( Adapter, NDIS_STATUS_DOT11_STOP_AP, @@ -327,7 +327,7 @@ N62CApIndicateStopAp( RT_TRACE((COMP_AP|COMP_INDIC), DBG_LOUD, ("<=== N62CApIndicateStopAp()\n")); } -VOID +VOID N62CApIndicateCanSustainAp( IN PADAPTER Adapter ) @@ -335,7 +335,7 @@ N62CApIndicateCanSustainAp( DOT11_CAN_SUSTAIN_AP_PARAMETERS dot11CanSustainApParameters; RT_TRACE((COMP_AP|COMP_INDIC), DBG_LOUD, ("===> N62CApIndicateCanSustainAp()\n")); - + NdisZeroMemory(&dot11CanSustainApParameters, sizeof(DOT11_CAN_SUSTAIN_AP_PARAMETERS)); N6_ASSIGN_OBJECT_HEADER( @@ -345,7 +345,7 @@ N62CApIndicateCanSustainAp( sizeof(DOT11_CAN_SUSTAIN_AP_PARAMETERS)); dot11CanSustainApParameters.ulReason = DOT11_CAN_SUSTAIN_AP_REASON_IHV_START; - + N62CApIndicateStatus( Adapter, NDIS_STATUS_DOT11_CAN_SUSTAIN_AP, @@ -359,19 +359,19 @@ N62CApIndicateCanSustainAp( /* *2008/08/22 Add by Mars - * + * * Indicate Channel to NDIS for Win7 V3 * - * @param pAdapter is driver main strucutre. + * @param pAdapter is driver main strucutre. */ -VOID +VOID N62CAPIndicateFrequencyAdopted( IN PADAPTER Adapter ) { DOT11_PHY_FREQUENCY_ADOPTED_PARAMETERS params; PRT_NDIS62_COMMON pN62COMMON = Adapter->pNdis62Common; - + // send out the NDIS_STATUS_DOT11_PHY_FREQUENCY_ADOPTED status indication NdisZeroMemory(¶ms, sizeof(DOT11_PHY_FREQUENCY_ADOPTED_PARAMETERS)); @@ -384,12 +384,12 @@ N62CAPIndicateFrequencyAdopted( params.ulChannel = Adapter->MgntInfo.dot11CurrentChannelNumber; params.ulPhyId = 0; - + N62CApIndicateStatus( - Adapter, - NDIS_STATUS_DOT11_PHY_FREQUENCY_ADOPTED, + Adapter, + NDIS_STATUS_DOT11_PHY_FREQUENCY_ADOPTED, NULL, // no request ID - ¶ms, + ¶ms, sizeof(params) ); } @@ -416,19 +416,19 @@ N62CAPIndicateIncomAssocStart( if(PlatformAllocateMemory(Adapter, &pAssoStartParam, AllocSize) != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INDIC, DBG_WARNING, + RT_TRACE(COMP_INDIC, DBG_WARNING, ("N62CAPIndicateIncomAssocStart() failed to allocate memory for DOT11_INCOMING_ASSOC_STARTED_PARAMETERS\n")); return; } - + PlatformZeroMemory(pAssoStartParam, sizeof(DOT11_INCOMING_ASSOC_STARTED_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pAssoStartParam->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_INCOMING_ASSOC_STARTED_PARAMETERS_REVISION_1, sizeof(DOT11_INCOMING_ASSOC_STARTED_PARAMETERS)); - + PlatformMoveMemory( (pAssoStartParam->PeerMacAddr), pCurrentSta->MacAddr, @@ -442,7 +442,7 @@ N62CAPIndicateIncomAssocStart( sizeof(DOT11_INCOMING_ASSOC_STARTED_PARAMETERS)); PlatformFreeMemory(pAssoStartParam, AllocSize); - RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== N62CAPIndicateIncomAssocStart ()\n")); + RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== N62CAPIndicateIncomAssocStart ()\n")); } // @@ -469,14 +469,14 @@ N62CAPIndicateIncomAssocComplete( pu1Byte pInfoStart = NULL; int nInfoOffset = 0; - - RT_TRACE(COMP_INDIC, DBG_LOUD, ("===> N62CAPIndicateIncomAssocComplete ()\n")); + + RT_TRACE(COMP_INDIC, DBG_LOUD, ("===> N62CAPIndicateIncomAssocComplete ()\n")); RT_PRINT_ADDR(COMP_INDIC, DBG_LOUD, "", pCurrentSta->MacAddr); // // Allocate memory for Phy IE, Asoc req and Asoc rsp. // Note that if we don't have Asoc req or Asoc rsp, the spaces for them are not allocated. - // + // AllocSize = sizeof(DOT11_INCOMING_ASSOC_COMPLETION_PARAMETERS) + // The structure itself. sizeof(u4Byte) + // PHY ID. MMPDU_BODY_LEN(pCurrentSta->AP_RecvAsocReqLength) + // Asoc Req. @@ -487,11 +487,11 @@ N62CAPIndicateIncomAssocComplete( // Note that in NDISTest, we should not indicate pAssoCompleteParam with size greater than 1024. // 2008.11.21, haich. // - //RT_ASSERT(AllocSize <= 1024, + //RT_ASSERT(AllocSize <= 1024, // ("N62CAPIndicateIncomAssocComplete(): Indicate a buffer with size greater than 1024.\n")); if(AllocSize > 1024) {// ignore this indication. - RT_TRACE(COMP_MLME, DBG_WARNING, + RT_TRACE(COMP_MLME, DBG_WARNING, ("<=== DrvIFIndicateAssociationComplete(): AllocSize > 1024, ignore indication.\n")); return; } @@ -502,7 +502,7 @@ N62CAPIndicateIncomAssocComplete( AllocSize); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_MLME, DBG_WARNING, + RT_TRACE(COMP_MLME, DBG_WARNING, ("<=== DrvIFIndicateAssociationComplete(): failed to allocate memory for indication.\n")); return; } @@ -511,7 +511,7 @@ N62CAPIndicateIncomAssocComplete( // Clear all fields. // PlatformZeroMemory(pAssoCompleteParam, AllocSize); - + // // Fill Header. // @@ -533,14 +533,14 @@ N62CAPIndicateIncomAssocComplete( // // Fill status. // - pAssoCompleteParam->uStatus = (status == RT_STATUS_SUCCESS) ? - (DOT11_ASSOC_STATUS_SUCCESS) : + pAssoCompleteParam->uStatus = (status == RT_STATUS_SUCCESS) ? + (DOT11_ASSOC_STATUS_SUCCESS) : (DOT11_ASSOC_STATUS_FAILURE); if(status == RT_STATUS_SUCCESS) {// fill fields that are valid only when association succeed in this code section. // - // Is Re association req/rsp. + // Is Re association req/rsp. // We may get here because we received a Deauth. // For this case, AP_RecvAsocReq and AP_SendAsocResp are all NULL since // they are released right before we get out of AP_OnAsocReq(). @@ -551,14 +551,14 @@ N62CAPIndicateIncomAssocComplete( OCTET_STRING osResvAssocReq; osResvAssocReq.Length = (u2Byte)pCurrentSta->AP_RecvAsocReqLength; osResvAssocReq.Octet = pCurrentSta->AP_RecvAsocReq; - pAssoCompleteParam->bReAssocReq = + pAssoCompleteParam->bReAssocReq = (PacketGetType(osResvAssocReq) == Type_Reasoc_Req) ? (TRUE) : (FALSE); } else { pAssoCompleteParam->bReAssocReq = FALSE; } - + if(pCurrentSta->AP_SendAsocRespLength) { OCTET_STRING osResvAssocReq; @@ -567,11 +567,11 @@ N62CAPIndicateIncomAssocComplete( pAssoCompleteParam->bReAssocResp = (PacketGetType(osResvAssocReq) == Type_Reasoc_Req) ? (TRUE) : (FALSE); } - else + else { pAssoCompleteParam->bReAssocResp = FALSE; } - + // DOT11_AUTH_ALGORITHM AuthAlgo; // MgntActQuery_802_11_AUTHENTICATION_MODE( Adapter, &authmode ); // pAssoCompleteParam->AuthAlgo = N6CAuthModeToDot11( &authmode ); @@ -591,30 +591,30 @@ N62CAPIndicateIncomAssocComplete( nInfoOffset = sizeof(DOT11_INCOMING_ASSOC_COMPLETION_PARAMETERS); // - // PHY ID. Filled after DOT11_INCOMING_ASSOC_COMPLETION_PARAMETERS structure. + // PHY ID. Filled after DOT11_INCOMING_ASSOC_COMPLETION_PARAMETERS structure. // pAssoCompleteParam->uActivePhyListSize = sizeof(u4Byte); pAssoCompleteParam->uActivePhyListOffset = nInfoOffset; { PULONG pLong = (PULONG)((PUCHAR)pAssoCompleteParam + sizeof(DOT11_INCOMING_ASSOC_COMPLETION_PARAMETERS)); *pLong = 0; - } + } nInfoOffset += pAssoCompleteParam->uActivePhyListSize; - + // // Association Request, filled immediately after PHY ID. // if(pCurrentSta->AP_RecvAsocReqLength) { pAssoCompleteParam->uAssocReqOffset = nInfoOffset; - pAssoCompleteParam->uAssocReqSize = MMPDU_BODY_LEN(pCurrentSta->AP_RecvAsocReqLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pCurrentSta->AP_RecvAsocReq), + pAssoCompleteParam->uAssocReqSize = MMPDU_BODY_LEN(pCurrentSta->AP_RecvAsocReqLength); + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pCurrentSta->AP_RecvAsocReq), pAssoCompleteParam->uAssocReqSize); nInfoOffset += pAssoCompleteParam->uAssocReqSize; - RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "AsocReq", - MMPDU_BODY(pCurrentSta->AP_RecvAsocReq), + RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "AsocReq", + MMPDU_BODY(pCurrentSta->AP_RecvAsocReq), MMPDU_BODY_LEN(pCurrentSta->AP_RecvAsocReqLength)); } else @@ -622,7 +622,7 @@ N62CAPIndicateIncomAssocComplete( pAssoCompleteParam->uAssocReqOffset = 0; pAssoCompleteParam->uAssocReqSize = 0; } - + // // Association Response. // @@ -630,13 +630,13 @@ N62CAPIndicateIncomAssocComplete( { pAssoCompleteParam->uAssocRespOffset = nInfoOffset; pAssoCompleteParam->uAssocRespSize = MMPDU_BODY_LEN(pCurrentSta->AP_SendAsocRespLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pCurrentSta->AP_SendAsocResp), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pCurrentSta->AP_SendAsocResp), pAssoCompleteParam->uAssocRespSize); nInfoOffset += pAssoCompleteParam->uAssocRespSize; - RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "AsocRsp", - MMPDU_BODY(pCurrentSta->AP_SendAsocResp), + RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "AsocRsp", + MMPDU_BODY(pCurrentSta->AP_SendAsocResp), MMPDU_BODY_LEN(pCurrentSta->AP_SendAsocRespLength)); } else @@ -653,29 +653,29 @@ N62CAPIndicateIncomAssocComplete( //vivi add this for vitrual ap.as pcie add 8 byte before mac header as early mode, 20101130 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); if( pHalData->AMPDUBurstMode && IS_NEED_OFFSET_ON_AMPDU(Adapter)) - { + { pAssoCompleteParam->uBeaconOffset = nInfoOffset; pAssoCompleteParam->uBeaconSize = MMPDU_BODY_LEN(pMgntInfo->beaconframe.Length-8); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->beaconframe.Octet+8), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->beaconframe.Octet+8), pAssoCompleteParam->uBeaconSize-8); nInfoOffset += (pAssoCompleteParam->uBeaconSize-8); - RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "Beacon", - MMPDU_BODY(pMgntInfo->beaconframe.Octet+8), - MMPDU_BODY_LEN(pMgntInfo->beaconframe.Length-8)); - } + RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "Beacon", + MMPDU_BODY(pMgntInfo->beaconframe.Octet+8), + MMPDU_BODY_LEN(pMgntInfo->beaconframe.Length-8)); + } else { pAssoCompleteParam->uBeaconOffset = nInfoOffset; pAssoCompleteParam->uBeaconSize = MMPDU_BODY_LEN(pMgntInfo->beaconframe.Length); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->beaconframe.Octet), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->beaconframe.Octet), pAssoCompleteParam->uBeaconSize); nInfoOffset += pAssoCompleteParam->uBeaconSize; - RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "Beacon", - MMPDU_BODY(pMgntInfo->beaconframe.Octet), + RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "Beacon", + MMPDU_BODY(pMgntInfo->beaconframe.Octet), MMPDU_BODY_LEN(pMgntInfo->beaconframe.Length)); } } @@ -690,7 +690,7 @@ N62CAPIndicateIncomAssocComplete( // TODO: Win7 error source. pAssoCompleteParam->ucErrorSource = DOT11_ASSOC_ERROR_SOURCE_OS; } - + N62CApIndicateStatus( Adapter, NDIS_STATUS_DOT11_INCOMING_ASSOC_COMPLETION, @@ -700,8 +700,8 @@ N62CAPIndicateIncomAssocComplete( //2 NOTE: Do NOT access pAssoCompleteParam hereafter. PlatformFreeMemory(pAssoCompleteParam, AllocSize); - - RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== N62CAPIndicateIncomAssocComplete (): status(%u)\n", status)); + + RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== N62CAPIndicateIncomAssocComplete (): status(%u)\n", status)); } // @@ -710,7 +710,7 @@ N62CAPIndicateIncomAssocComplete( // VOID N62CAPIndicateIncomAssocReqRecv( - IN PADAPTER Adapter + IN PADAPTER Adapter ) { PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; @@ -722,16 +722,16 @@ N62CAPIndicateIncomAssocReqRecv( RT_STATUS rtStatus = RT_STATUS_SUCCESS; PDOT11_INCOMING_ASSOC_REQUEST_RECEIVED_PARAMETERS pAssoReqRecvParam; ULONG requiredAssocReqParaSize = 0; - + RT_TRACE(COMP_INDIC, DBG_LOUD, ("===> N62CAPIndicateIncomAssocReqRecv ()\n")); RT_PRINT_ADDR(COMP_INDIC, DBG_LOUD, "", pCurrentSta->MacAddr); - FrameSize = MMPDU_BODY_LEN(pCurrentSta->AP_RecvAsocReqLength); + FrameSize = MMPDU_BODY_LEN(pCurrentSta->AP_RecvAsocReqLength); requiredAssocReqParaSize = sizeof(DOT11_INCOMING_ASSOC_REQUEST_RECEIVED_PARAMETERS)+FrameSize; if(requiredAssocReqParaSize > 1024) {// not to indicate with a too large buffer. 2008.11.21, haich. - RT_TRACE(COMP_INDIC, DBG_LOUD, + RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== DrvIFIndicateAssociationComplete(): requiredAssocReqParaSize > 1024, ignore indication.\n")); return; } @@ -742,13 +742,13 @@ N62CAPIndicateIncomAssocReqRecv( requiredAssocReqParaSize); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INDIC, DBG_LOUD, + RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== DrvIFIndicateAssociationComplete(): failed to allocate memory for indication.\n")); return; } PlatformZeroMemory(pAssoReqRecvParam,requiredAssocReqParaSize); - + N6_ASSIGN_OBJECT_HEADER( pAssoReqRecvParam->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -767,7 +767,7 @@ N62CAPIndicateIncomAssocReqRecv( pCurrentSta->MacAddr, sizeof(DOT11_MAC_ADDRESS)); - + pAssoReqRecvParam->uAssocReqSize = FrameSize; pAssoReqRecvParam->uAssocReqOffset = sizeof(DOT11_INCOMING_ASSOC_REQUEST_RECEIVED_PARAMETERS); @@ -775,13 +775,13 @@ N62CAPIndicateIncomAssocReqRecv( Add2Ptr(pAssoReqRecvParam, pAssoReqRecvParam->uAssocReqOffset), MMPDU_BODY(pCurrentSta->AP_RecvAsocReq), FrameSize); - + //RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "Peer:", pAsocInfo->PeerAddr); //RT_PRINT_STR(COMP_MLME, DBG_LOUD, "SSID", pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length); - //RT_PRINT_DATA(COMP_INDIC, - // DBG_LOUD, - // "Indicated data:", - // pAssoReqRecvParam, + //RT_PRINT_DATA(COMP_INDIC, + // DBG_LOUD, + // "Indicated data:", + // pAssoReqRecvParam, // (int)(sizeof(DOT11_INCOMING_ASSOC_REQUEST_RECEIVED_PARAMETERS)+FrameSize)); // N62CApIndicateStatus( @@ -792,7 +792,7 @@ N62CAPIndicateIncomAssocReqRecv( sizeof(DOT11_INCOMING_ASSOC_REQUEST_RECEIVED_PARAMETERS)+FrameSize); PlatformFreeMemory(pAssoReqRecvParam, requiredAssocReqParaSize); - RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== N62CAPIndicateIncomAssocReqRecv ()\n")); + RT_TRACE(COMP_INDIC, DBG_LOUD, ("<=== N62CAPIndicateIncomAssocReqRecv ()\n")); } @@ -806,21 +806,21 @@ N62CAPIndicateDisassociation( PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PMGNT_INFO pDefMgntInfo = GetDefaultMgntInfo(Adapter); - + PRT_WLAN_STA pCurrentSta = pMgntInfo->pCurrentSta; ULONG i; RT_TRACE(COMP_INDIC, DBG_LOUD, ("===> N62CAPIndicateDisassociation()\n")); PlatformZeroMemory(&DisAssoParam, sizeof(DOT11_DISASSOCIATION_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( DisAssoParam.Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_DISASSOCIATION_PARAMETERS_REVISION_1, sizeof(DOT11_DISASSOCIATION_PARAMETERS)); - RT_ASSERT(pMgntInfo->OpMode == RT_OP_MODE_AP, + RT_ASSERT(pMgntInfo->OpMode == RT_OP_MODE_AP, ("N62CAPIndicateDisassociation(): not in AP mode.")); if(pCurrentSta) @@ -858,13 +858,13 @@ N62CAPIndicateDisassociation( BOOLEAN N62CAPInComingAssocDecsion( IN PADAPTER Adapter, - IN OCTET_STRING asocpdu + IN OCTET_STRING asocpdu ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); BOOLEAN allowed=TRUE; u4Byte idx=0; - + if( pMgntInfo->LockedSTACount != 0 ) { allowed = TRUE; @@ -895,13 +895,13 @@ N62CResetAPVariables( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); int i; - + // Added by Annie, 2006-01-26. MgntCancelAllTimer(Adapter); RemoveAllTS(Adapter); pMgntInfo->dot11CurrentChannelNumber = pMgntInfo->Regdot11ChannelNumber; - // We shall randomize it? + // We shall randomize it? for(i = 0; i < 128; i++) { pMgntInfo->arChalng[i] = (u1Byte)i; @@ -919,20 +919,20 @@ N62CResetAPVariables( static u1Byte DummySta[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; // - // step 1. Indicate wildcard disassocation event to + // step 1. Indicate wildcard disassocation event to // disassociate all STA associated before. // /***************************************************************** - 20150416 Sinda. + 20150416 Sinda. We need to delete peer in WDI architecture, but peer had been deleted before. pass NULL to skip this case to avoid delete incorrect peer. *****************************************************************/ - DrvIFIndicateDisassociation(Adapter, unspec_reason, NULL); + DrvIFIndicateDisassociation(Adapter, unspec_reason, NULL); // // step 2. Indicate dummy STA assocation event. // - // 061228, rcnjko: UI need fake AP mode to enter connected + // 061228, rcnjko: UI need fake AP mode to enter connected // state immediate for ICS easy implementation. // MgntUpdateAsocInfo(Adapter, UpdateAsocPeerAddr, DummySta, 6); @@ -964,20 +964,20 @@ N62CAPClearStateBeforeSleep( SetAPState(pAdapter, AP_STATE_STOPPING); AP_DisassociateAllStation(pAdapter, unspec_reason); SecSetSwEncryptionDecryption(pAdapter, FALSE, FALSE); - MgntActSet_ApType(pAdapter, FALSE); - AP_Reset(pAdapter); + MgntActSet_ApType(pAdapter, FALSE); + AP_Reset(pAdapter); SetAPState(pAdapter, AP_STATE_STOPPED); pAdapter->pNdis62Common->CurrentOpState=INIT_STATE; PlatformZeroMemory(&pAdapter->pNdisCommon->dot11DesiredSSIDList, sizeof(DOT11_SSID_LIST)); - } - + } + if(pAdapter->MgntInfo.AdditionalBeaconIEData) { PlatformFreeMemory(pAdapter->MgntInfo.AdditionalBeaconIEData, pAdapter->MgntInfo.AdditionalBeaconIESize); pAdapter->MgntInfo.AdditionalBeaconIEData = NULL; pAdapter->MgntInfo.AdditionalBeaconIESize=0; } - + if(pAdapter->MgntInfo.AdditionalResponseIEData) { PlatformFreeMemory(pAdapter->MgntInfo.AdditionalResponseIEData, pAdapter->MgntInfo.AdditionalResponseIESize); @@ -985,7 +985,7 @@ N62CAPClearStateBeforeSleep( pAdapter->MgntInfo.AdditionalResponseIESize=0; } pAdapter = GetNextExtAdapter(pAdapter); - } + } } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.h index 5b396b212..8e0461983 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP.h @@ -6,18 +6,18 @@ Module Name: N62C_AP.h Abstract: - Win 7 AP mode releated - + Win 7 AP mode releated + Revision History: When What ---------- ---------------------------------------------- 04-22-2008 Created - + Notes: --*/ #pragma once - + #ifndef _N62_AP__H #define _N62_AP__H @@ -66,15 +66,15 @@ N62CApIndicateStatus( IN PVOID StatusBuffer, IN UINT StatusBufferSize ); -VOID +VOID N62CApIndicateStopAp( IN PADAPTER Adapter ); -VOID +VOID N62CApIndicateCanSustainAp( IN PADAPTER Adapter ); -VOID +VOID N62CAPIndicateFrequencyAdopted( IN PADAPTER Adapter ); @@ -103,7 +103,7 @@ N62CAPIndicateDisassociation( BOOLEAN N62CAPInComingAssocDecsion( IN PADAPTER Adapter, - IN OCTET_STRING asocpdu + IN OCTET_STRING asocpdu ); NDIS_STATUS diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP_Def.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP_Def.h index 382a18db6..63d68c2c9 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP_Def.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_AP_Def.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains AP Define and Structure - + Revision History: When What ---------- ---------------------------------------------- @@ -58,7 +58,7 @@ Revision History: #define AP_DEFAULT_ENABLE_WPS FALSE -/** +/** * ExtAP default registy info settings, with their ranges * a default setting is used if the registry is not present or has invalid value */ @@ -66,7 +66,7 @@ Revision History: #define AP_DEFAULT_ALLOWED_ASSOCIATION_COUNT 128 #define AP_MIN_ALLOWED_ASSOCIATION_COUNT 0 #define AP_MAX_ALLOWED_ASSOCIATION_COUNT 255 - + #define AP_DEFAULT_ENABLE_5GHZ FALSE #define AP_DEFAULT_CHANNEL 11 @@ -124,11 +124,11 @@ Revision History: /** Time in which the station has no activity we assume we have lost connectivity to that station (in number of seconds) */ #define AP_NO_ACTIVITY_TIME 1800 /** The interval of the station inactive timer, in milliseconds */ -#define AP_STA_INACTIVE_TIMER_INTERVAL 1000 +#define AP_STA_INACTIVE_TIMER_INTERVAL 1000 #define AP_MAX_AID 2007 #define AP_INVALID_AID 0xFFFF -#define AP_AID_TABLE_UNIT_SIZE 8 +#define AP_AID_TABLE_UNIT_SIZE 8 #define AP_AID_TABLE_UNIT_MASK 0xFF #define AP_AID_TABLE_SIZE (AP_MAX_AID/AP_AID_TABLE_UNIT_SIZE + 1) #define AP_AID_HEADER 0xC000 @@ -144,7 +144,7 @@ Revision History: -/** +/** * Get access to the MP_EXTSTA_PORT from the MP_PORT */ #define MP_GET_AP_PORT(_Port) ((PMP_EXTAP_PORT)(_Port->ChildPort)) @@ -166,7 +166,7 @@ Revision History: * Get access to AP settings */ -/** Settings maintained by association manager */ +/** Settings maintained by association manager */ #define AP_GET_SSID(_ApPort) (AP_GET_ASSOC_MGR(_ApPort)->Ssid) #define AP_GET_BSSID(_ApPort) (AP_GET_ASSOC_MGR(_ApPort)->Bssid) #define AP_GET_CAPABILITY_INFO(_ApPort) (AP_GET_ASSOC_MGR(_ApPort)->Capability) @@ -228,7 +228,7 @@ typedef enum _STA_PORT_STATE STA_PORT_STATE_CLOSED } STA_PORT_STATE, *PSTA_PORT_STATE; -/** +/** * DOT11 Frame Class * See definitions in 802.11 standard. */ @@ -305,15 +305,15 @@ typedef struct _AP_CAPABIITY /** Maximum number of associations the NIC can support */ ULONG AssociationTableSize; - + // TODO: add other capabilities } AP_CAPABIITY, *PAP_CAPABIITY; /** * Settings read from the registry */ -typedef struct _AP_REG_INFO -{ +typedef struct _AP_REG_INFO +{ /** number of allowed associations */ ULONG AllowedAssociationCount; @@ -365,19 +365,19 @@ typedef struct _AP_ASSOC_MGR { /** ExtAP port */ PMP_EXTAP_PORT ApPort; - + /** state of Association Manager */ AP_ASSOC_MGR_STATE State; - + /** * Hash table for the stations */ MAC_HASH_TABLE MacHashTable; - /** - * Lock we need before we adding/removing entries from the + /** + * Lock we need before we adding/removing entries from the * hash table. This will be acquired for read by - * routines that are not modifying the table and acquired + * routines that are not modifying the table and acquired * for write by routines that will be removing entries or * adding entries to the table. */ @@ -385,8 +385,8 @@ typedef struct _AP_ASSOC_MGR /** AID table, a bit for each AID */ UCHAR AidTable[AP_AID_TABLE_SIZE]; - - /** + + /** * Association related configurations * A lock is NOT required when updating/querying these configurations */ @@ -399,15 +399,15 @@ typedef struct _AP_ASSOC_MGR /** Capability information */ DOT11_CAPABILITY Capability; - + /** Currently enabled authentication algorithm */ - DOT11_AUTH_ALGORITHM AuthAlgorithm; + DOT11_AUTH_ALGORITHM AuthAlgorithm; /** Currently enabled unicast cipher algorithm */ - DOT11_CIPHER_ALGORITHM UnicastCipherAlgorithm; + DOT11_CIPHER_ALGORITHM UnicastCipherAlgorithm; /** Currently enabled multicast cipher algorithm */ - DOT11_CIPHER_ALGORITHM MulticastCipherAlgorithm; + DOT11_CIPHER_ALGORITHM MulticastCipherAlgorithm; /** Use default auth cipher algorithms **/ BOOLEAN bUseDefaultAlgorithms; @@ -431,9 +431,9 @@ typedef struct _AP_ASSOC_MGR /** Scan request ID */ PVOID ScanRequestId; - - /** - * Station inactive timer + + /** + * Station inactive timer * When the timer fires, the inactive time of each * station is incremented by 1. */ @@ -441,7 +441,7 @@ typedef struct _AP_ASSOC_MGR /** * This is actually the count of the associated - * stations because each station is going to + * stations because each station is going to * increase the counter by 1 when it is associated * and decrement by 1 when it is disassociated. */ @@ -454,7 +454,7 @@ typedef struct _AP_ASSOC_MGR NDIS_STATUS SetChannelCompletionStatus; NDIS_EVENT SetChannelCompletionEvent; - + } AP_ASSOC_MGR, *PAP_ASSOC_MGR; /** @@ -462,18 +462,18 @@ typedef struct _AP_ASSOC_MGR */ typedef struct _AP_STA_ENTRY { - /** + /** * MAC hash entry. * This is used for hash table operations. */ MAC_HASH_ENTRY MacHashEntry; - /** + /** * Pointer to the association manager * where the station is managed. */ PAP_ASSOC_MGR AssocMgr; - + /** Capability information */ DOT11_CAPABILITY CapabilityInformation; @@ -482,7 +482,7 @@ typedef struct _AP_STA_ENTRY /** Supported rates */ DOT11_RATE_SET SupportedRateSet; - + /** Current association state of the station */ DOT11_ASSOCIATION_STATE AssocState; @@ -491,7 +491,7 @@ typedef struct _AP_STA_ENTRY /** Power mode */ DOT11_POWER_MODE PowerMode; - + /** Auth algorithm */ DOT11_AUTH_ALGORITHM AuthAlgo; @@ -503,14 +503,14 @@ typedef struct _AP_STA_ENTRY /** WPS enabled */ BOOLEAN WpsEnabled; - + /** Association timer */ NDIS_HANDLE AssocTimer; /** Waiting for association request */ LONG WaitingForAssocReq; - /** + /** * Association up time, i.e. timestamp at which association is completed with success. * Timestamp value is returned by NdisGetCurrentSystemTime */ @@ -519,9 +519,9 @@ typedef struct _AP_STA_ENTRY /** Statistics */ DOT11_PEER_STATISTICS Statistics; - /** - * Station reference count. - * Indicate the number of external functions + /** + * Station reference count. + * Indicate the number of external functions * that are accessing the station entry. * The reference count is 1 when an entry is created. * It is deleted when the reference count reaches zero. @@ -541,37 +541,37 @@ typedef struct _AP_STA_ENTRY BOOLEAN AcceptAssoc; USHORT Reason; - /** - * Inactive time. + /** + * Inactive time. * Indicates how long the station has been inactive, in seconds. */ LONG InactiveTime; - - /** + + /** * Port state * This is used to decide whether a non-forced scan * shall be allowed or not. */ - STA_PORT_STATE PortState; + STA_PORT_STATE PortState; } AP_STA_ENTRY, *PAP_STA_ENTRY; /** * Holds current ExtAP configuration of the miniport that - * are not managed by association manager. - * These configurations can be updated and/or queried via OIDs request from the OS. + * are not managed by association manager. + * These configurations can be updated and/or queried via OIDs request from the OS. * A lock is NOT needed when updating/querying these configurations. * This data is stateless so we don't need a flag to indicate whether it is initialized or not. */ -typedef struct _AP_CONFIG +typedef struct _AP_CONFIG { /** ExtAP port */ PMP_EXTAP_PORT ApPort; /** The types of auto configuration for 802.11 parameters that are enabled */ ULONG AutoConfigEnabled; - + /** Beacon period, in TUs */ ULONG BeaconPeriod; @@ -592,18 +592,18 @@ typedef struct _AP_CONFIG /** Current operating frequency channel list for the DSSS/HRDSSS/ERP PHY */ ULONG CurrentChannel; - + /** Current operating frequency channel list for the OFDM PHY */ ULONG CurrentFrequency; - + /** Current PHY ID */ ULONG CurrentPhyId; - + #endif - + /** Default key ID */ ULONG CipherDefaultKeyId; - + /** Desired PHY ID list */ ULONG DesiredPhyList[AP_DESIRED_PHY_MAX_COUNT]; ULONG DesiredPhyCount; @@ -621,10 +621,10 @@ typedef struct _MP_EXTAP_PORT /** Registry settings */ AP_REG_INFO RegInfo; - - /** - * AP reference count. - * Indicate the number of external functions + + /** + * AP reference count. + * Indicate the number of external functions * that are accessing the AP port. * The AP port cannot be terminated * until it reaches zero. diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.c index bcc879468..360baca55 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.c @@ -9,52 +9,52 @@ N62CCopyDefaultVariablesToExt( IN PADAPTER Adapter ) { - Adapter->HWDescHeadLength = + Adapter->HWDescHeadLength = GetDefaultAdapter(Adapter)->HWDescHeadLength; - - Adapter->TXPacketShiftBytes = + + Adapter->TXPacketShiftBytes = GetDefaultAdapter(Adapter)->TXPacketShiftBytes; - Adapter->MAX_TRANSMIT_BUFFER_SIZE = + Adapter->MAX_TRANSMIT_BUFFER_SIZE = GetDefaultAdapter(Adapter)->MAX_TRANSMIT_BUFFER_SIZE; Adapter->RT_TCB_NUM = GetDefaultAdapter(Adapter)->RT_TCB_NUM; - - Adapter->RT_LOCAL_BUF_NUM = + + Adapter->RT_LOCAL_BUF_NUM = GetDefaultAdapter(Adapter)->RT_LOCAL_BUF_NUM; - - Adapter->RT_LOCAL_FW_BUF_NUM = + + Adapter->RT_LOCAL_FW_BUF_NUM = GetDefaultAdapter(Adapter)->RT_LOCAL_FW_BUF_NUM; - + Adapter->RT_TXDESC_NUM = GetDefaultAdapter(Adapter)->RT_TXDESC_NUM; - - Adapter->RT_TXDESC_NUM_BE_QUEUE = + + Adapter->RT_TXDESC_NUM_BE_QUEUE = GetDefaultAdapter(Adapter)->RT_TXDESC_NUM_BE_QUEUE; - Adapter->MAX_RECEIVE_BUFFER_SIZE = + Adapter->MAX_RECEIVE_BUFFER_SIZE = GetDefaultAdapter(Adapter)->MAX_RECEIVE_BUFFER_SIZE; Adapter->MAX_NUM_RFD = GetDefaultAdapter(Adapter)->MAX_NUM_RFD; - Adapter->MAX_NUM_RX_DESC = GetDefaultAdapter(Adapter)->MAX_NUM_RX_DESC; + Adapter->MAX_NUM_RX_DESC = GetDefaultAdapter(Adapter)->MAX_NUM_RX_DESC; } NDIS_STATUS N62CInitializeExtAdapter( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN NDIS_HANDLE MiniportAdapterHandle, IN PNDIS_MINIPORT_INIT_PARAMETERS MiniportInitParameters ) { - // return this status + // return this status NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); RT_STATUS RtStatus = NDIS_STATUS_FAILURE; PMGNT_INFO pMgntInfo = NULL; PRT_NDIS6_COMMON pNdisCommon = NULL; - + // N62C Specific Resource Elements -------------------------- BOOLEAN bMgntVariableInitialized = FALSE, bRxVariableInitialized = FALSE, @@ -64,17 +64,17 @@ N62CInitializeExtAdapter( RES_MON_OBJ ResMonObj; PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(pAdapter); PRT_SDIO_DEVICE Defualtsdiodevice = GET_RT_SDIO_DEVICE(pDefaultAdapter); - + RT_TRACE(COMP_DBG, DBG_TRACE, ("===> N62CInitializeExtAdapter() SDIO\n")); INIT_RES_MON_OBJ(ResMonObj); - + pAdapter->HardwareType = pDefaultAdapter->HardwareType; - - sdiodevice->pAdapter = pAdapter; + + sdiodevice->pAdapter = pAdapter; sdiodevice->hNdisAdapter = MiniportAdapterHandle; pMgntInfo = &(pAdapter->MgntInfo); - pNdisCommon = pAdapter->pNdisCommon; + pNdisCommon = pAdapter->pNdisCommon; pNdisCommon->NdisVersion = pDefaultAdapter->pNdisCommon->NdisVersion; RT_TRACE_F(COMP_INIT, DBG_LOUD, ("NdisVersion direct get 0x%x\n", pNdisCommon->NdisVersion)); @@ -93,14 +93,14 @@ N62CInitializeExtAdapter( pAdapter->pNdisCommon->WDISupport = pDefaultAdapter->pNdisCommon->WDISupport; - N62CCopyDefaultVariablesToExt(pAdapter); - + N62CCopyDefaultVariablesToExt(pAdapter); + // Initialize event. NdisInitializeEvent(&(sdiodevice->evtSendingNBLCompleted)); - // SyncIo Method 2. + // SyncIo Method 2. KeInitializeEvent( &(sdiodevice->SyncIoEvent), NotificationEvent, TRUE); - + //To avoid allociate pfirmware again. pAdapter->bInitByExtPort=TRUE; //For debug by Maddest @@ -111,26 +111,26 @@ N62CInitializeExtAdapter( // Read the registry parameters ndisStatus= N6SdioReadRegParameters(sdiodevice); - if (ndisStatus != NDIS_STATUS_SUCCESS) + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6SdioReadRegParameters(X): Read Registry Parameter Failed!\n")); ndisStatus = NDIS_STATUS_FAILURE; goto error; - } + } InitializeTxVariables(pAdapter); InitializeRxVariables(pAdapter); bRxVariableInitialized = TRUE; - + InitializeMgntVariables(pAdapter); bMgntVariableInitialized = TRUE; - - + + //---------------------------------------------------------------------------- // Update the parameter read from registery to coresponding ones in MGNT_INFO. - // NOTE! These modification should be after InitializeMgntVariables() which is called by + // NOTE! These modification should be after InitializeMgntVariables() which is called by // NicIFAssociateNIC(). // 2005.01.13, by rcnjko. // @@ -145,7 +145,7 @@ N62CInitializeExtAdapter( // Read adapter information such as MAC address from EEPROM // - // Read data from EEPROM and do some customization + // Read data from EEPROM and do some customization // according to custermer ID read from EEPROM. // //NicIFReadAdapterInfo(pAdapter); @@ -159,7 +159,7 @@ N62CInitializeExtAdapter( PMGNT_INFO pDefaultMgntInfo = &(pDefaultAdapter->MgntInfo); PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); - + pAdapter->EepromAddressSize = pDefaultAdapter->EepromAddressSize; PlatformMoveMemory(pAdapter->PermanentAddress, pDefaultAdapter->PermanentAddress, 6); @@ -212,14 +212,14 @@ N62CInitializeExtAdapter( ndisStatus = NDIS_STATUS_FAILURE; goto error; } - + ADD_RES_TO_MON(ResMonObj, InitRM_AllocNWifi); N6InitializeNative80211MIBs(pAdapter); // Initialize common NDIS resource in PRT_NDIS6_COMMON. 2006.05.07, by rcnjko. - InitNdis6CommonResources(pAdapter); + InitNdis6CommonResources(pAdapter); ADD_RES_TO_MON(ResMonObj, InitRM_CommonRS); @@ -230,11 +230,11 @@ N62CInitializeExtAdapter( #endif // - // Mark the miniport driver as paused state. + // Mark the miniport driver as paused state. // Note that, please keep this action as last one in MiniportInitializeEx(). // N6C_SET_MP_DRIVER_STATE(pAdapter, MINIPORT_PAUSED); - + RT_TRACE(COMP_DBG, DBG_TRACE, ("<=== N62CInitializeExtAdapter(), Initialized Successfully!\n")); return ndisStatus; @@ -246,8 +246,8 @@ N62CInitializeExtAdapter( if(bMgntVariableInitialized) DeInitializeMgntVariables(pAdapter); if(bRxVariableInitialized) DeInitializeRxVariables(pAdapter); - CLEANUP_RES_IN_MON(ResMonObj, pAdapter); - return ndisStatus; + CLEANUP_RES_IN_MON(ResMonObj, pAdapter); + return ndisStatus; } @@ -258,12 +258,12 @@ N62CInitializeExtAdapter( * Win 7 Initialize Here, for tell N62 initial process we use compile flag * Here Initialize everything releated N62 * - * @param pAdapter is driver main strucutre. + * @param pAdapter is driver main strucutre. */ NDIS_STATUS N62CInitialize( - IN PADAPTER pAdapter, + IN PADAPTER pAdapter, IN NDIS_HANDLE MiniportAdapterHandle, IN PNDIS_MINIPORT_INIT_PARAMETERS MiniportInitParameters ) @@ -272,8 +272,8 @@ N62CInitialize( u1Byte i; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pExtAdapter = NULL; - - + + RT_TRACE(COMP_INIT, DBG_LOUD, ("===>N62CInitialize()\n")); @@ -301,7 +301,7 @@ N62CInitialize( // Initialize variables for Ndis 6.20+ --- N62CInitVariable(pDefaultAdapter); // ------------------------------- - + // Prepare Each Extension Port ------------------------------------------------------------------------ for( i = 1; i < MP_DEFAULT_NUMBER_OF_PORT; i++) @@ -312,17 +312,17 @@ N62CInitialize( { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("%s: N62CAllocateExtAdapter: Failure!\n", __FUNCTION__)); - break; + break; } cpMacAddr(pExtAdapter->CurrentAddress,pDefaultAdapter->CurrentAddress); PlatformMoveMemory( - pExtAdapter->pNdis62Common, - pDefaultAdapter->pNdis62Common, + pExtAdapter->pNdis62Common, + pDefaultAdapter->pNdis62Common, sizeof(RT_NDIS62_COMMON) ); - + pExtAdapter->pNdis62Common->PortNumber= 0; pExtAdapter->bHWInitReady = pDefaultAdapter->bHWInitReady; RT_TRACE(COMP_INIT, DBG_LOUD, ("N62CInitialize(), set pExtAdapter->bHWInitReady=pDefaultAdapter->bHWInitReady = %d\n", @@ -330,13 +330,13 @@ N62CInitialize( pExtAdapter->bSWInitReady = FALSE; ndisStatus = N62CInitializeExtAdapter( - pExtAdapter, - MiniportAdapterHandle, + pExtAdapter, + MiniportAdapterHandle, MiniportInitParameters ); - + if(ndisStatus != NDIS_STATUS_SUCCESS) - { + { // Release the resource allocated in N62CAllocateExtAdapter N62CFreePortSpecificComponent(pExtAdapter); N6FreeAdapter(pExtAdapter); @@ -368,9 +368,9 @@ N62CInitialize( } else { - RT_TRACE(COMP_INIT, DBG_LOUD, ("%d Adapters have been allocated <===N62CInitialize ()\n", i)); + RT_TRACE(COMP_INIT, DBG_LOUD, ("%d Adapters have been allocated <===N62CInitialize ()\n", i)); } - + return ndisStatus; } @@ -384,14 +384,14 @@ N62CAllocateExtAdapter( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; RT_STATUS rtStatus = RT_STATUS_SUCCESS; - do + do { // // Allocate the adapter structure. // rtStatus = PlatformAllocateMemory( - pDefaultAdapter, - (PVOID*)&(*ppHelperAdapter), + pDefaultAdapter, + (PVOID*)&(*ppHelperAdapter), sizeof(ADAPTER) ); if (rtStatus != RT_STATUS_SUCCESS) @@ -404,13 +404,13 @@ N62CAllocateExtAdapter( { PlatformZeroMemory((*ppHelperAdapter), sizeof(ADAPTER)); } - + // // Allocate RT_NDIS6_COMMON. // rtStatus = PlatformAllocateMemory( - pDefaultAdapter, - (PVOID)&((*ppHelperAdapter)->pNdisCommon), + pDefaultAdapter, + (PVOID)&((*ppHelperAdapter)->pNdisCommon), sizeof(RT_NDIS6_COMMON) ); if (rtStatus != RT_STATUS_SUCCESS) @@ -426,7 +426,7 @@ N62CAllocateExtAdapter( PlatformZeroMemory((*ppHelperAdapter)->pNdisCommon, sizeof(RT_NDIS6_COMMON)); } - + // // Store Handle to the ext adapter. // @@ -446,23 +446,23 @@ N62CAllocateExtAdapter( rtStatus = MgntAllocMemory((*ppHelperAdapter)); if(rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N62CAllocateExtAdapter(): failed to allocate MGNT_INFO for the ExtAdapter!!!\n")); PlatformFreeMemory((*ppHelperAdapter)->pNdisCommon, sizeof(RT_NDIS6_COMMON)); - + PlatformFreeMemory((*ppHelperAdapter), sizeof(ADAPTER)); - + ndisStatus = NDIS_STATUS_FAILURE; break; } - + ndisStatus = N62CAllocatePortSpecificComponent(*ppHelperAdapter); if (ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N62CAllocateExtAdapter(): failed to allocate RT_NDIS6_COMMON for the ExtAdapter!!!\n")); MgntFreeMemory((*ppHelperAdapter)); @@ -470,15 +470,15 @@ N62CAllocateExtAdapter( PlatformFreeMemory((*ppHelperAdapter)->pNdisCommon, sizeof(RT_NDIS6_COMMON)); PlatformFreeMemory((*ppHelperAdapter), sizeof(ADAPTER)); - + ndisStatus = NDIS_STATUS_FAILURE; break; } - + }while(FALSE); return ndisStatus; - + } // @@ -494,9 +494,9 @@ N62CFreeExtAdapter( PRT_NDIS6_COMMON pNdisCommon = pExtAdapter->pNdisCommon; RT_TRACE(COMP_INIT, DBG_LOUD, ("===> N62CFreeExtAdapter()\n")); - + pExtAdapter->bDriverStopped = TRUE; - + // For AP mode. 2005.06.30, by rcnjko. if(ACTING_AS_AP(pExtAdapter)) { @@ -504,14 +504,14 @@ N62CFreeExtAdapter( NdisMSleep(500); // Sleep for a while here to allow disasoc completed sending out. } - + // Release common NDIS resource ReleaseNdis6CommonResources(pExtAdapter); N6SdioFreeNative80211MIBs(pExtAdapter); DeInitializeMgntVariables(pExtAdapter); - + DeInitializeRxVariables(pExtAdapter); @@ -525,11 +525,11 @@ N62CFreeExtAdapter( PlatformReleaseSpinLock(pExtAdapter, RT_TX_SPINLOCK); PlatformReleaseSpinLock(pExtAdapter, RT_RX_SPINLOCK); - + N62CFreePortSpecificComponent(pExtAdapter); - + N6FreeAdapter(pExtAdapter); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("<=== N62CFreeExtAdapter()\n")); } @@ -539,29 +539,29 @@ N62CAllocatePortCommonComponent( ) { // Allocate Port Common Component for Ndis 6.20+ - + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; RT_STATUS rtStatus = RT_STATUS_SUCCESS; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; - + do { // Allocate the helper structure that is shared by every adapter ------------------------------------------------------------------------ rtStatus = PlatformAllocateMemory( pAdapter, - &(pPortCommonInfo->pPortHelper), + &(pPortCommonInfo->pPortHelper), sizeof(PORT_HELPER) ); - + if (rtStatus != RT_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N62CAllocatePortCommonComponent(): failed to allocate memory for the HELPER structure.\n")); ndisStatus = NDIS_STATUS_FAILURE; break; } - else - { + else + { PlatformZeroMemory(pPortCommonInfo->pPortHelper, sizeof(PORT_HELPER)); } // --------------------------------------------------------------------------------------------------------------------------- @@ -569,19 +569,19 @@ N62CAllocatePortCommonComponent( // Allocate the WorkItem to Create and Delete Ports ------------------------------------------------------------------------ - rtStatus = PlatformInitializeWorkItem(pAdapter, + rtStatus = PlatformInitializeWorkItem(pAdapter, &(pPortCommonInfo->pPortHelper->CreateDeleteMacWorkitem), ( RT_WORKITEM_CALL_BACK) N62CCreateDeleteMacWorkItemCallback, - (PVOID) pAdapter, + (PVOID) pAdapter, "Ndis62CreateDeleteWorkitem" ); PlatformInitializeTimer( - pAdapter, - &(pPortCommonInfo->pPortHelper->CreateDeleteMacTimer), - (RT_TIMER_CALL_BACK)N62CCreateDeleteMacTimerCallback, - NULL, + pAdapter, + &(pPortCommonInfo->pPortHelper->CreateDeleteMacTimer), + (RT_TIMER_CALL_BACK)N62CCreateDeleteMacTimerCallback, + NULL, "CreateDeleteMacTimer"); @@ -594,7 +594,7 @@ N62CAllocatePortCommonComponent( } // ------------------------------------------------------------------------------------------------------------------ } while(FALSE); - + return ndisStatus; } @@ -607,7 +607,7 @@ N62CFreePortCommonComponent( PlatformFreeWorkItem( &(pPortCommonInfo->pPortHelper->CreateDeleteMacWorkitem)); PlatformReleaseTimer(pAdapter, &(pPortCommonInfo->pPortHelper->CreateDeleteMacTimer)); - PlatformFreeMemory(pPortCommonInfo->pPortHelper, sizeof(PORT_HELPER)); + PlatformFreeMemory(pPortCommonInfo->pPortHelper, sizeof(PORT_HELPER)); } NDIS_STATUS @@ -617,31 +617,31 @@ N62CAllocatePortSpecificComponent( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + do { // // Allocate Ndis62Common // rtStatus = PlatformAllocateMemory( - pAdapter, - &(pAdapter->pNdis62Common), + pAdapter, + &(pAdapter->pNdis62Common), sizeof(RT_NDIS62_COMMON) ); - + if (rtStatus != RT_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N62CAllocatePortSpecificComponent(): failed to allocate memory for pNdis62Common.\n")); ndisStatus = NDIS_STATUS_FAILURE; break; } - else - { + else + { PlatformZeroMemory(pAdapter->pNdis62Common, sizeof(RT_NDIS62_COMMON)); } - + } while(FALSE); - + return ndisStatus; } @@ -651,22 +651,22 @@ N62CFreePortSpecificComponent( ) { PRT_NDIS62_COMMON pNdis62Common = pAdapter->pNdis62Common; - + RT_TRACE(COMP_INIT, DBG_LOUD, ("===>N62CFreePortSpecificComponent()\n")); PlatformFreeMemory(pAdapter->pNdis62Common, sizeof(RT_NDIS62_COMMON)); pAdapter->pNdis62Common = NULL; - + RT_TRACE(COMP_INIT, DBG_LOUD, ("<===N62CFreePortSpecificComponent()\n")); } /* *2008/05/09 Add by Mars - * - * To Register the AP and Ndis 6.2 Releated Attribute * - * @param pAdapter is driver main strucutre. + * To Register the AP and Ndis 6.2 Releated Attribute + * + * @param pAdapter is driver main strucutre. */ NDIS_STATUS @@ -685,9 +685,9 @@ N62CSet80211Attributes( u1Byte tempAuthType = 0; ULONG vwifiAttrSize = 0; - PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter); + PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter); BOOLEAN bStartVwifi = TRUE; - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PlatformZeroMemory(&Dot11Attributes, sizeof(NDIS_MINIPORT_ADAPTER_ATTRIBUTES)); @@ -697,38 +697,38 @@ N62CSet80211Attributes( Dot11Attributes.Native_802_11_Attributes.Header.Type=NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_NATIVE_802_11_ATTRIBUTES; //NDIS 6 Dot11Attributes.Native_802_11_Attributes.Header.Revision=NDIS_MINIPORT_ADAPTER_802_11_ATTRIBUTES_REVISION_2; - Dot11Attributes.Native_802_11_Attributes.Header.Size=NDIS_SIZEOF_MINIPORT_ADAPTER_NATIVE_802_11_ATTRIBUTES_REVISION_2; + Dot11Attributes.Native_802_11_Attributes.Header.Size=NDIS_SIZEOF_MINIPORT_ADAPTER_NATIVE_802_11_ATTRIBUTES_REVISION_2; Dot11Attributes.Native_802_11_Attributes.OpModeCapability = pNdisCommon->dot11OperationModeCapability.uOpModeCapability; Dot11Attributes.Native_802_11_Attributes.NumOfTXBuffers = pNdisCommon->dot11OperationModeCapability.uNumOfTXBuffers; Dot11Attributes.Native_802_11_Attributes.NumOfRXBuffers = pNdisCommon->dot11OperationModeCapability.uNumOfRXBuffers; Dot11Attributes.Native_802_11_Attributes.MultiDomainCapabilityImplemented = pNdisCommon->dot11MultiDomainCapabilityImplemented; Dot11Attributes.Native_802_11_Attributes.NumSupportedPhys = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries;//NATIVE_802_11_CURR_NUM_PHY_TYPES;//pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries; - + // // SupportedPhyAttributes attributes. // if (Dot11Attributes.Native_802_11_Attributes.NumSupportedPhys) { rtStatus = PlatformAllocateMemory( - pAdapter, + pAdapter, &(Dot11Attributes.Native_802_11_Attributes.SupportedPhyAttributes), Dot11Attributes.Native_802_11_Attributes.NumSupportedPhys * sizeof(DOT11_PHY_ATTRIBUTES) ); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6usbSet80211Attributes(): failed to allocate memory for SupportedPhyAttributes\n")); ndisStatus = NDIS_STATUS_FAILURE; goto Exit; } - PlatformZeroMemory(Dot11Attributes.Native_802_11_Attributes.SupportedPhyAttributes, + PlatformZeroMemory(Dot11Attributes.Native_802_11_Attributes.SupportedPhyAttributes, Dot11Attributes.Native_802_11_Attributes.NumSupportedPhys * sizeof(DOT11_PHY_ATTRIBUTES)); N6SdioFill80211PhyAttributes(pAdapter, &(Dot11Attributes.Native_802_11_Attributes)); } - vwifiAttrSize = sizeof(DOT11_VWIFI_ATTRIBUTES) + + vwifiAttrSize = sizeof(DOT11_VWIFI_ATTRIBUTES) + (NUM_SUPPORTED_VWIFI_COMBINATIONS) * sizeof(DOT11_VWIFI_COMBINATION); rtStatus = PlatformAllocateMemory( @@ -745,12 +745,12 @@ N62CSet80211Attributes( } //pVWiFiAttribs = (PDOT11_VWIFI_ATTRIBUTES)&(Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes); - + PlatformZeroMemory(Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes, vwifiAttrSize); - - + + N6_ASSIGN_OBJECT_HEADER( - Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Header, + Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_VWIFI_ATTRIBUTES_REVISION_1, sizeof(DOT11_VWIFI_ATTRIBUTES)); @@ -759,24 +759,24 @@ N62CSet80211Attributes( // support for Infra-Infra N6_ASSIGN_OBJECT_HEADER( - Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[0].Header, + Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[0].Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_VWIFI_COMBINATION_REVISION_1, sizeof(DOT11_VWIFI_COMBINATION)); Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[0].uNumInfrastructure = 1; - + // support for Infra-SoftAP // TODO: Sample Driver do this, but a little weird N6_ASSIGN_OBJECT_HEADER( - Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[0].Header, + Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[0].Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_VWIFI_COMBINATION_REVISION_1, sizeof(DOT11_VWIFI_COMBINATION)); Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[1].uNumInfrastructure = 1; Dot11Attributes.Native_802_11_Attributes.VWiFiAttributes->Combinations[1].uNumSoftAP = 1; - + // // ExtSTAAttributes attributes. @@ -796,7 +796,7 @@ N62CSet80211Attributes( PlatformZeroMemory(Dot11Attributes.Native_802_11_Attributes.ExtSTAAttributes, sizeof(DOT11_EXTSTA_ATTRIBUTES)); - + // // Get the supported authentication and cipher algorithm. // @@ -804,10 +804,10 @@ N62CSet80211Attributes( // Store current mode and switch to infrastructure mode. // - + tempAuthType = pAdapter->MgntInfo.Regdot11networktype; pAdapter->MgntInfo.Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; - + // Unicast & Infrastructure. ndisStatus = N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( pAdapter, @@ -816,17 +816,17 @@ N62CSet80211Attributes( &BytesWritten, &BytesNeeded); rtStatus = PlatformAllocateMemory( - pAdapter, - &(SupportedAuthCipherAlgs.pInfraUcastAuthCipherList), + pAdapter, + &(SupportedAuthCipherAlgs.pInfraUcastAuthCipherList), BytesNeeded); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6usbSet80211Attributes(): no buffer for N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR under infra mode\n")); ndisStatus = NDIS_STATUS_FAILURE; goto Exit; } - + PlatformZeroMemory(SupportedAuthCipherAlgs.pInfraUcastAuthCipherList, BytesNeeded); ndisStatus = N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( @@ -888,17 +888,17 @@ N62CSet80211Attributes( &BytesWritten, &BytesNeeded); rtStatus = PlatformAllocateMemory( - pAdapter, - &(SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList), + pAdapter, + &(SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList), BytesNeeded); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6usbSet80211Attributes(): no buffer for N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR under adhoc mode\n")); ndisStatus = NDIS_STATUS_FAILURE; goto Exit; } - + PlatformZeroMemory(SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList, BytesNeeded); ndisStatus = N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( @@ -956,16 +956,16 @@ N62CSet80211Attributes( N6Fill80211ExtStaAttributes(pAdapter, &(Dot11Attributes.Native_802_11_Attributes), &SupportedAuthCipherAlgs); // - // Register Ndis 6.2 AP Mode + // Register Ndis 6.2 AP Mode // //Set Extension AP Mode - + if(bStartVwifi) { Dot11Attributes.Native_802_11_Attributes.OpModeCapability |= DOT11_OPERATION_MODE_EXTENSIBLE_AP; - PlatformAllocateMemory(pAdapter, - &(Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes), + PlatformAllocateMemory(pAdapter, + &(Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes), sizeof(DOT11_EXTAP_ATTRIBUTES)); if(Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes == NULL) @@ -978,7 +978,7 @@ N62CSet80211Attributes( PlatformZeroMemory(Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes, sizeof(DOT11_EXTAP_ATTRIBUTES)); N6_ASSIGN_OBJECT_HEADER( - Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->Header, + Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_EXTAP_ATTRIBUTES_REVISION_1, sizeof(DOT11_EXTAP_ATTRIBUTES)); @@ -987,7 +987,7 @@ N62CSet80211Attributes( Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uPrivacyExemptionListSize = NATIVE_802_11_MAX_PRIVACY_EXEMPTION; // TODO: Get the real Size Some day Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uDefaultKeyTableSize = DOT11_MAX_NUM_DEFAULT_KEY;//VNic11DefaultKeyTableSize(vnic); - Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uWEPKeyValueMaxLength = ( 104 / 8);//VNic11WEP104Implemented(vnic) ? + Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uWEPKeyValueMaxLength = ( 104 / 8);//VNic11WEP104Implemented(vnic) ? // 104 / 8 : (VNic11WEP40Implemented(vnic) ? 40 / 8 : 0); Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uDesiredSSIDListSize = AP_DESIRED_SSID_LIST_MAX_SIZE; @@ -999,7 +999,7 @@ N62CSet80211Attributes( // Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uNumSupportedCountryOrRegionStrings = 0; Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->pSupportedCountryOrRegionStrings = NULL; - + // In Ndis 6.0 We use Ad hoc to simulize AP mode So the Ad hoc Security will be the security we support // TODO: Win 7 , We should support more security in here for Win 7 V3 AP Mode if(pAdapter->bInHctTest) @@ -1016,24 +1016,24 @@ N62CSet80211Attributes( else { // In Ndis 6.0 We use Ad hoc to simulize AP mode So the Ad hoc Security will be the security we support - Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uInfraNumSupportedUcastAlgoPairs = + Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uInfraNumSupportedUcastAlgoPairs = SupportedAuthCipherAlgs.pInfraUcastAuthCipherList ->uNumOfEntries; Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->pInfraSupportedUcastAlgoPairs = SupportedAuthCipherAlgs.pInfraUcastAuthCipherList->AuthCipherPairs; - Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uInfraNumSupportedMcastAlgoPairs = + Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->uInfraNumSupportedMcastAlgoPairs = SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->uNumOfEntries; Dot11Attributes.Native_802_11_Attributes.ExtAPAttributes->pInfraSupportedMcastAlgoPairs = SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->AuthCipherPairs; } - + } // // Ok, now egister the attributes. // ndisStatus = NdisMSetMiniportAttributes(pAdapter->pNdisCommon->hNdisAdapter, (PNDIS_MINIPORT_ADAPTER_ATTRIBUTES)&Dot11Attributes - ); + ); Exit: // Memory cleanup. @@ -1042,7 +1042,7 @@ N62CSet80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pInfraUcastAuthCipherList, - SupportedAuthCipherAlgs.pInfraUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pInfraUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -1050,15 +1050,15 @@ N62CSet80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pInfraMcastAuthCipherList, - SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); - } + } if (SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList != NULL) { PlatformFreeMemory( SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList, - SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -1066,7 +1066,7 @@ N62CSet80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pAdhocMcastAuthCipherList, - SupportedAuthCipherAlgs.pAdhocMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pAdhocMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -1107,7 +1107,7 @@ N62CInitVariable( PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PPORT_HELPER pPortHelper =pDefaultAdapter->pPortCommonInfo->pPortHelper; PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); - + //===================Default Adapter variable initialize=================== pNdisCommon->dot11CurrentOperationMode.uCurrentOpMode=DOT11_OPERATION_MODE_UNKNOWN; pNdis62Common->PortNumber=0; @@ -1121,27 +1121,27 @@ N62CInitVariable( //===================initialize VWiFi AP variable======================== GetDefaultMgntInfo(pAdapter)->ApType = RT_AP_TYPE_NONE; - + } PADAPTER GetAdapterByPortNum( - PADAPTER Adapter, + PADAPTER Adapter, u1Byte PortNum ) { PADAPTER pAdapter = GetDefaultAdapter((Adapter)); - while(pAdapter!=NULL) + while(pAdapter!=NULL) { if(pAdapter->pNdis62Common->PortNumber == PortNum) break; pAdapter = GetNextExtAdapter(pAdapter); } - + if(pAdapter == NULL) pAdapter = GetDefaultAdapter(Adapter); - + return pAdapter; } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.h index aacaf1260..0ab0872be 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Init.h @@ -7,7 +7,7 @@ #define MP_BSS_ENTRY_MAX_ENTRIES_MAX 512 /** - * Time duration after it was created at which a BSS entry is + * Time duration after it was created at which a BSS entry is * considered to have expired */ #define MP_BSS_ENTRY_EXPIRE_TIME_DEFAULT 750000000 // 75 seconds @@ -53,16 +53,16 @@ #define STA_ADHOC_STA_MAX_ENTRIES_MAX 512 /** - * Time duration after it was created at which an BSS entry is + * Time duration after it was created at which an BSS entry is * considered to have expired */ #define STA_BSS_ENTRY_EXPIRE_TIME_DEFAULT 750000000 // 75 seconds #define STA_BSS_ENTRY_EXPIRE_TIME_MIN 150000000 // 15 seconds #define STA_BSS_ENTRY_EXPIRE_TIME_MAX 2000000000 // 200 seconds -/** - * Number of beacon intervals after which if we havent - * received a beacon from the AP we assume we have +/** + * Number of beacon intervals after which if we havent + * received a beacon from the AP we assume we have * lost connectivity */ #define STA_INFRA_ROAM_NO_BEACON_COUNT_DEFAULT 20 @@ -84,16 +84,16 @@ #define MP_ASSIGN_NDIS_OBJECT_HEADER(_header, _type, _revision, _size) \ (_header).Type = _type; \ (_header).Revision = _revision; \ - (_header).Size = _size; + (_header).Size = _size; -VOID +VOID N62CUpdateRegSetting( PADAPTER pAdapter ); NDIS_STATUS N62CInitialize( - IN PADAPTER pHelperAdapter, + IN PADAPTER pHelperAdapter, IN NDIS_HANDLE MiniportAdapterHandle, IN PNDIS_MINIPORT_INIT_PARAMETERS MiniportInitParameters ); @@ -137,7 +137,7 @@ N62CSet80211Attributes( /* NDIS_STATUS N62CStartMP( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); */ diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.c index 9f8796b32..d35676d35 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.c @@ -1,27 +1,27 @@ #include "Mp_Precomp.h" -/* We use this OID table structure to check if the OID is supported at this point & what the +/* We use this OID table structure to check if the OID is supported at this point & what the * size should */ typedef struct PORT_QUERY_SET_OID_ENTRY { NDIS_OID Oid; // Oid value - + BOOLEAN InitSettable:1; // Settable in Init state (for atleast one op mode) - + BOOLEAN OpSettable:1; // Settable in Op state (for atleast one op mode) - + BOOLEAN Queryable:1; // Queryable in Init/Op state - + BOOLEAN ExtSTASupported:1; // Valid in ExtSTA - + BOOLEAN ExtAPSupported:1; // Valid in ExtAP - + BOOLEAN NetmonSupported:1; // Valid in Netmon mode BOOLEAN PhySpecific:1; // Is this OID only acceptable for certain phys ULONG MinBufferSize; // Minimum size required for the buffer (query & set) - + } PORT_QUERY_SET_OID_ENTRY, * PPORT_QUERY_SET_OID_ENTRY; @@ -599,7 +599,7 @@ PORT_QUERY_SET_OID_ENTRY OidQuerySetTable[] = { sizeof(DOT11_DIVERSITY_SELECTION_RX_LIST) // MinBufferSize }, { - OID_DOT11_DIVERSITY_SUPPORT, // Oid: dot11DiversitySupport + OID_DOT11_DIVERSITY_SUPPORT, // Oid: dot11DiversitySupport FALSE, // InitSettable FALSE, // OpSettable TRUE, // Queryable @@ -1360,7 +1360,7 @@ PORT_QUERY_SET_OID_ENTRY OidQuerySetTable[] = { FALSE, // PhySpecific 0 // MinBufferSize }, -/* +/* { OID_DOT11_AP_BEACON_MODE, // Oid TRUE, // InitSettable @@ -1372,7 +1372,7 @@ PORT_QUERY_SET_OID_ENTRY OidQuerySetTable[] = { FALSE, // PhySpecific sizeof(BOOLEAN) // MinBufferSize }, -*/ +*/ { OID_DOT11_ASSOCIATION_PARAMS, // Oid TRUE, // InitSettable @@ -1462,7 +1462,7 @@ PORT_QUERY_SET_OID_ENTRY OidQuerySetTable[] = { sizeof(NDIS_PM_PROTOCOL_OFFLOAD) // MinBufferSize }, - + { OID_RECEIVE_FILTER_SET_FILTER, // Oid TRUE, // InitSettable @@ -1473,7 +1473,7 @@ PORT_QUERY_SET_OID_ENTRY OidQuerySetTable[] = { FALSE, // NetmonSupported FALSE, // PhySpecific sizeof(NDIS_RECEIVE_FILTER_PARAMETERS) // MinBufferSize - }, + }, { OID_RECEIVE_FILTER_CLEAR_FILTER, // Oid TRUE, // InitSettable @@ -1550,7 +1550,7 @@ N62CValidateOIDCorrectness( case EXTSTA_PORT: if (!oidTableEntry->ExtSTASupported) { - RT_TRACE((COMP_OID_QUERY | COMP_OID_SET), DBG_SERIOUS, + RT_TRACE((COMP_OID_QUERY | COMP_OID_SET), DBG_SERIOUS, ("OID 0x%08x not supported in ExtSTA mode\n", oid)); return NDIS_STATUS_INVALID_STATE; } @@ -1573,7 +1573,7 @@ N62CValidateOIDCorrectness( // Currently we assume this is AP mode if (!oidTableEntry->ExtAPSupported) { - RT_TRACE((COMP_OID_QUERY | COMP_OID_SET), DBG_SERIOUS, + RT_TRACE((COMP_OID_QUERY | COMP_OID_SET), DBG_SERIOUS, ("OID 0x%08x not supported in ExtAP mode\n", oid)); return NDIS_STATUS_INVALID_STATE; } @@ -1601,7 +1601,7 @@ N62CValidateOIDCorrectness( {// INIT_STATE if (!oidTableEntry->InitSettable) { - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("Set of OID 0x%08x not supported in INIT state.\n", oid)); return NDIS_STATUS_INVALID_STATE; } @@ -1610,7 +1610,7 @@ N62CValidateOIDCorrectness( {// OP_STATE if (!oidTableEntry->OpSettable) { - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("Set of OID 0x%08x not supported in OP state.\n", oid)); return NDIS_STATUS_INVALID_STATE; } @@ -1638,11 +1638,11 @@ N62CValidateOIDCorrectness( // Larger of the two buffer lengths infoBufferLength = MAX(NdisRequest->DATA.METHOD_INFORMATION.InputBufferLength, - NdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength); + NdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength); break; default: - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("NDIS_OID_REQUEST contains unknown request type %d\n", NdisRequest->RequestType) ); return NDIS_STATUS_NOT_SUPPORTED; @@ -1658,7 +1658,7 @@ N62CValidateOIDCorrectness( if(pTargetAdapter->bInHctTest) currentPhy = dot11_phy_type_erp; - else + else currentPhy=pNdisCommon->pDot11SelectedPhyMIB->PhyType; //dot11_phy_type_erp; //temp add by Maddest switch (oid) @@ -1672,7 +1672,7 @@ N62CValidateOIDCorrectness( case OID_DOT11_SHORT_SLOT_TIME_OPTION_IMPLEMENTED: if (currentPhy != dot11_phy_type_erp) { - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on ERP phy. Current phy type is %d\n", + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on ERP phy. Current phy type is %d\n", oid, currentPhy)); return NDIS_STATUS_INVALID_DATA; @@ -1685,7 +1685,7 @@ N62CValidateOIDCorrectness( case OID_DOT11_CHANNEL_AGILITY_ENABLED: if ((currentPhy != dot11_phy_type_erp) && (currentPhy != dot11_phy_type_hrdsss)) { - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on ERP or HRDSS phy. Current phy type is %d\n", + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on ERP or HRDSS phy. Current phy type is %d\n", oid, currentPhy)); @@ -1700,7 +1700,7 @@ N62CValidateOIDCorrectness( case OID_DOT11_ED_THRESHOLD: if ((currentPhy != dot11_phy_type_erp) && (currentPhy != dot11_phy_type_hrdsss) && (currentPhy != dot11_phy_type_dsss)) { - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on ERP, HRDSS or DSS phy. Current phy type is %d\n", + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on ERP, HRDSS or DSS phy. Current phy type is %d\n", oid, currentPhy)); @@ -1712,18 +1712,18 @@ N62CValidateOIDCorrectness( case OID_DOT11_CURRENT_FREQUENCY: if ((currentPhy != dot11_phy_type_ofdm) && (currentPhy != dot11_phy_type_ht )) { - RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on OFDM phy. Current phy type is %d\n", + RT_TRACE(COMP_OID_QUERY | COMP_OID_SET, DBG_LOUD, ("OID 0x%08x only valid on OFDM phy. Current phy type is %d\n", oid, currentPhy)); return NDIS_STATUS_INVALID_DATA; } - + default: break; } } - + return NDIS_STATUS_SUCCESS; } @@ -1735,7 +1735,7 @@ N62C_OID_DOT11_INCOMING_ASSOCIATION_DECISION( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1756,7 +1756,7 @@ N62C_OID_DOT11_INCOMING_ASSOCIATION_DECISION( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( @@ -1767,7 +1767,7 @@ N62C_OID_DOT11_INCOMING_ASSOCIATION_DECISION( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1792,7 +1792,7 @@ N62C_OID_DOT11_WPS_ENABLED( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1817,10 +1817,10 @@ N62C_OID_DOT11_WPS_ENABLED( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_DOT11_WPS_ENABLED( @@ -1831,7 +1831,7 @@ N62C_OID_DOT11_WPS_ENABLED( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1856,7 +1856,7 @@ N62C_OID_DOT11_ADDITIONAL_IE( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1881,10 +1881,10 @@ N62C_OID_DOT11_ADDITIONAL_IE( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_DOT11_ADDITIONAL_IE( @@ -1895,7 +1895,7 @@ N62C_OID_DOT11_ADDITIONAL_IE( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1920,7 +1920,7 @@ N62C_OID_DOT11_ENUM_PEER_INFO( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1945,10 +1945,10 @@ N62C_OID_DOT11_ENUM_PEER_INFO( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1976,7 +1976,7 @@ N62C_OID_DOT11_AVAILABLE_CHANNEL_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2001,10 +2001,10 @@ N62C_OID_DOT11_AVAILABLE_CHANNEL_LIST( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -2032,7 +2032,7 @@ N62C_OID_DOT11_AVAILABLE_FREQUENCY_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2057,10 +2057,10 @@ N62C_OID_DOT11_AVAILABLE_FREQUENCY_LIST( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -2088,7 +2088,7 @@ N62C_OID_DOT11_START_AP_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2109,7 +2109,7 @@ N62C_OID_DOT11_START_AP_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_DOT11_START_AP_REQUEST( @@ -2120,7 +2120,7 @@ N62C_OID_DOT11_START_AP_REQUEST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2145,7 +2145,7 @@ N62C_OID_DOT11_DISASSOCIATE_PEER_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2166,7 +2166,7 @@ N62C_OID_DOT11_DISASSOCIATE_PEER_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( @@ -2177,7 +2177,7 @@ N62C_OID_DOT11_DISASSOCIATE_PEER_REQUEST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2202,7 +2202,7 @@ N62C_OID_PM_GET_PROTOCOL_OFFLOAD( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2215,7 +2215,7 @@ N62C_OID_PM_GET_PROTOCOL_OFFLOAD( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -2223,7 +2223,7 @@ N62C_OID_PM_GET_PROTOCOL_OFFLOAD( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -2240,7 +2240,7 @@ N62C_OID_PM_GET_PROTOCOL_OFFLOAD( NdisRequest->DATA.METHOD_INFORMATION.MethodId, (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesWritten, (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesRead, - (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded ); break; @@ -2261,7 +2261,7 @@ N62C_OID_DOT11_ASSOCIATION_PARAMS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2282,7 +2282,7 @@ N62C_OID_DOT11_ASSOCIATION_PARAMS( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_DOT11_ASSOCIATION_PARAMS( @@ -2293,7 +2293,7 @@ N62C_OID_DOT11_ASSOCIATION_PARAMS( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2318,7 +2318,7 @@ N62C_OID_PM_ADD_WOL_PATTERN( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2339,7 +2339,7 @@ N62C_OID_PM_ADD_WOL_PATTERN( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_PM_ADD_WOL_PATTERN( @@ -2350,7 +2350,7 @@ N62C_OID_PM_ADD_WOL_PATTERN( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2375,7 +2375,7 @@ N62C_OID_PM_REMOVE_WOL_PATTERN( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2396,7 +2396,7 @@ N62C_OID_PM_REMOVE_WOL_PATTERN( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_PM_REMOVE_WOL_PATTERN( @@ -2407,7 +2407,7 @@ N62C_OID_PM_REMOVE_WOL_PATTERN( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2432,7 +2432,7 @@ N62C_OID_PM_PARAMETERS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2457,10 +2457,10 @@ N62C_OID_PM_PARAMETERS( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_PM_PARAMETERS( @@ -2471,7 +2471,7 @@ N62C_OID_PM_PARAMETERS( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2496,7 +2496,7 @@ N62C_OID_PM_ADD_PROTOCOL_OFFLOAD( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2517,7 +2517,7 @@ N62C_OID_PM_ADD_PROTOCOL_OFFLOAD( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( @@ -2528,7 +2528,7 @@ N62C_OID_PM_ADD_PROTOCOL_OFFLOAD( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2553,7 +2553,7 @@ N62C_OID_PM_REMOVE_PROTOCOL_OFFLOAD( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2574,7 +2574,7 @@ N62C_OID_PM_REMOVE_PROTOCOL_OFFLOAD( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( @@ -2585,7 +2585,7 @@ N62C_OID_PM_REMOVE_PROTOCOL_OFFLOAD( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2611,7 +2611,7 @@ N62C_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2634,7 +2634,7 @@ N62C_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( @@ -2645,7 +2645,7 @@ N62C_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2671,7 +2671,7 @@ N62C_OID_GEN_INTERRUPT_MODERATION( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2696,10 +2696,10 @@ N62C_OID_GEN_INTERRUPT_MODERATION( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -2727,7 +2727,7 @@ N62C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2752,10 +2752,10 @@ N62C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -2784,7 +2784,7 @@ N62C_OID_RECEIVE_FILTER_CLEAR_FILTER( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2805,7 +2805,7 @@ N62C_OID_RECEIVE_FILTER_CLEAR_FILTER( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( @@ -2816,7 +2816,7 @@ N62C_OID_RECEIVE_FILTER_CLEAR_FILTER( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -2841,7 +2841,7 @@ N62C_OID_RECEIVE_FILTER_SET_FILTER( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2860,7 +2860,7 @@ N62C_OID_RECEIVE_FILTER_SET_FILTER( case NdisRequestQueryInformation: case NdisRequestQueryStatistics: case NdisRequestSetInformation: - ndisStatus = NDIS_STATUS_NOT_SUPPORTED; + ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; // Method @@ -2874,7 +2874,7 @@ N62C_OID_RECEIVE_FILTER_SET_FILTER( NdisRequest->DATA.METHOD_INFORMATION.MethodId, (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesWritten, (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesRead, - (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded ); break; @@ -2895,7 +2895,7 @@ N62C_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2920,10 +2920,10 @@ N62C_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: break; @@ -2950,7 +2950,7 @@ N62C_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -2975,10 +2975,10 @@ N62C_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: break; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.h index 88a002ac7..4f9fde485 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Oids.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains Port specific defines - + Revision History: When What ---------- ---------------------------------------------- diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.c index 44398048f..f1e5912bf 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.c @@ -38,7 +38,7 @@ N62CCompletePendingCreateDeleteMacOidRequest( else PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK); #endif - + // 20130917 Joseph: // Pending OID is restore in 2 different place. // This shall be revised and add a new OID pending queue for OID completion. @@ -52,7 +52,7 @@ N62CCompletePendingCreateDeleteMacOidRequest( { bCompleteStatus = WDI_CompleteCreateDeleteMac(pAdapter, NdisStatus); } - + pPortHelper->pCreateDeleteOID = NULL; PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); @@ -77,7 +77,7 @@ N62C_OID_DOT11_CREATE_MAC( PPORT_HELPER pPortHelper = pAdapter->pPortCommonInfo->pPortHelper; PNDIS_OID_REQUEST OidRequest = (PNDIS_OID_REQUEST)NdisRequest; KIRQL irql = NDIS_CURRENT_IRQL(); - u4Byte createPollingCnt=0x0; + u4Byte createPollingCnt=0x0; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_CREATE_MAC(): Oid(%#x)--->\n", NdisRequest->DATA.METHOD_INFORMATION.Oid)); N6C_DOT11_DUMP_OID(NdisRequest->DATA.METHOD_INFORMATION.Oid); @@ -85,7 +85,7 @@ N62C_OID_DOT11_CREATE_MAC( #if DRV_LOG_REGISTRY // Reset all MAC deletion registry settings RT_CLEAR_DRV_STATE(pAdapter, (DrvStateMacDeleting|DrvStateMacDeleted)); - + // Reset all MAC creation registry settings RT_CLEAR_DRV_STATE(pAdapter, (DrvStateMacCreating|DrvStateMacCreated)); @@ -103,7 +103,7 @@ N62C_OID_DOT11_CREATE_MAC( { PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); createPollingCnt++; - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_CREATE_MAC(): pollCnt/bCreateMac/bDeleteMac= %d/ %d/ %d\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_CREATE_MAC(): pollCnt/bCreateMac/bDeleteMac= %d/ %d/ %d\n", createPollingCnt, pPortHelper->bCreateMac, pPortHelper->bDeleteMac)); if(createPollingCnt >= 1000) break; @@ -132,7 +132,7 @@ N62C_OID_DOT11_CREATE_MAC( NdisRequest->DATA.METHOD_INFORMATION.BytesWritten = 0; NdisRequest->DATA.METHOD_INFORMATION.BytesRead = 0; NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded = 0; - + if(!pAdapter->bInHctTest && !pDefaultAdapter->pNdisCommon->bRegVWifiSupport) { ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -149,7 +149,7 @@ N62C_OID_DOT11_CREATE_MAC( if (NdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength < sizeof(DOT11_MAC_INFO)) { - RT_TRACE(COMP_OID_SET, DBG_WARNING, ("The buffer being passed into OID_DOT11_CREATE_MAC is too small(%d)\n", + RT_TRACE(COMP_OID_SET, DBG_WARNING, ("The buffer being passed into OID_DOT11_CREATE_MAC is too small(%d)\n", NdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength)); NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded = sizeof(DOT11_MAC_INFO); RT_SET_DRV_STATE(pAdapter, DrvStateMacCreate_NO_DO); @@ -159,14 +159,14 @@ N62C_OID_DOT11_CREATE_MAC( // // Since OID calls are serialized, we do not expect the NumberOfPorts to change - // while we are checking the following until this OID is completed. So we do not need + // while we are checking the following until this OID is completed. So we do not need // to protect the NumberOfPorts in any way // - + // The default port should be considered -------------------------------------------- if (MultiPortGetNumberOfActiveExtAdapters(pAdapter) + 1 >= MP_MAX_NUMBER_OF_PORT) { - RT_TRACE(COMP_OID_SET, DBG_WARNING, ("Number of existing ports exceed max supported. Failing new port creation\n")); + RT_TRACE(COMP_OID_SET, DBG_WARNING, ("Number of existing ports exceed max supported. Failing new port creation\n")); ndisStatus = NDIS_STATUS_OPEN_LIST_FULL; RT_SET_DRV_STATE(pAdapter, DrvStateMacCreate_NO_DO); break; @@ -174,9 +174,9 @@ N62C_OID_DOT11_CREATE_MAC( PlatformAcquireSpinLock(pAdapter, RT_PORT_SPINLOCK); if(pPortHelper->pCreateDeleteOID != NULL) - {// Another CreateDeleteOID has already pended, maybe from another port number + {// Another CreateDeleteOID has already pended, maybe from another port number PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); - + // RT_ASSERT(FALSE, ("N62C_OID_DOT11_CREATE_MAC(): Another CreateDeleteOID has already pended!!\n")); RT_TRACE(COMP_OID_SET, DBG_SERIOUS, ("N62C_OID_DOT11_CREATE_MAC(): Another CreateDeleteOID has already pended!!\n")); ndisStatus = NDIS_STATUS_FAILURE; // Need to check this return status @@ -189,7 +189,7 @@ N62C_OID_DOT11_CREATE_MAC( pPortHelper->pCreateDot11MacInfo = (PDOT11_MAC_INFO)OidRequest->DATA.METHOD_INFORMATION.InformationBuffer; NdisMoveMemory(pPortHelper->pCreateDot11MacInfo->MacAddr, pAdapter->CurrentAddress, sizeof(DOT11_MAC_ADDRESS)); OidRequest->DATA.METHOD_INFORMATION.BytesWritten = sizeof(DOT11_MAC_INFO); - + // Save corresponding NdisRequest for MAC Creation and Deletion pPortHelper->bCreateMac=TRUE; pPortHelper->pCreateDeleteOID = NdisRequest; @@ -214,20 +214,20 @@ N62C_OID_DOT11_CREATE_MAC( // { // ndisStatus = NDIS_STATUS_PENDING; // } - - PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); + + PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); } - + RT_ASSERT(pPortHelper->pCreateDeleteOID, ("N62C_OID_DOT11_CREATE_MAC(): pCreateDeleteOID has already completed!!\n")); - + } while(FALSE); - + if( irql < DISPATCH_LEVEL ){ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_CREATE_MAC(): Restore IRQL!!\n")); - KeLowerIrql(irql); + KeLowerIrql(irql); } #if DRV_LOG_REGISTRY @@ -237,9 +237,9 @@ N62C_OID_DOT11_CREATE_MAC( RT_CLEAR_DRV_STATE_ERROR(pAdapter); } #endif - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_CREATE_MAC(): <---\n")); - + return ndisStatus; } @@ -279,7 +279,7 @@ N62C_OID_DOT11_DELETE_MAC( { PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); deletePollingCnt++; - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_DELETE_MAC(): pollCnt/bCreateMac/bDeleteMac= %d/ %d/ %d\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_DELETE_MAC(): pollCnt/bCreateMac/bDeleteMac= %d/ %d/ %d\n", deletePollingCnt, pPortHelper->bCreateMac, pPortHelper->bDeleteMac)); if(deletePollingCnt >= 1000) break; @@ -295,7 +295,7 @@ N62C_OID_DOT11_DELETE_MAC( if( irql < DISPATCH_LEVEL ){ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_DELETE_MAC(): Raise IRQL!!\n")); - KeRaiseIrql(DISPATCH_LEVEL, &irql); + KeRaiseIrql(DISPATCH_LEVEL, &irql); } do @@ -311,7 +311,7 @@ N62C_OID_DOT11_DELETE_MAC( if (NdisRequest->RequestType != NdisRequestSetInformation) { - RT_TRACE(COMP_OID_SET, DBG_WARNING, ("Invalid request type %d for OID_DOT11_DELETE_MAC\n", + RT_TRACE(COMP_OID_SET, DBG_WARNING, ("Invalid request type %d for OID_DOT11_DELETE_MAC\n", NdisRequest->RequestType)); RT_SET_DRV_STATE(pAdapter, DrvStateMacDelete_NO_DO); ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -320,7 +320,7 @@ N62C_OID_DOT11_DELETE_MAC( if (NdisRequest->DATA.SET_INFORMATION.InformationBufferLength < sizeof(DOT11_MAC_INFO)) { - RT_TRACE(COMP_OID_SET, DBG_WARNING, ("The buffer being passed into OID_DOT11_DELETE_MAC is too small(%d)", + RT_TRACE(COMP_OID_SET, DBG_WARNING, ("The buffer being passed into OID_DOT11_DELETE_MAC is too small(%d)", NdisRequest->DATA.SET_INFORMATION.InformationBufferLength)); NdisRequest->DATA.SET_INFORMATION.BytesNeeded = sizeof(DOT11_MAC_INFO); ndisStatus = NDIS_STATUS_INVALID_LENGTH; @@ -346,7 +346,7 @@ N62C_OID_DOT11_DELETE_MAC( {// Another CreateDeleteOID has already pended, maybe from another port number PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); - + // RT_ASSERT(FALSE, ("N62C_OID_DOT11_DELETE_MAC(): Another CreateDeleteOID has already pended!!\n")); RT_TRACE(COMP_OID_SET, DBG_SERIOUS, ("N62C_OID_DOT11_DELETE_MAC(): Another CreateDeleteOID has already pended!!\n")); ndisStatus = NDIS_STATUS_FAILURE; // Need to check this return status @@ -356,8 +356,8 @@ N62C_OID_DOT11_DELETE_MAC( else { pPortHelper->bDeleteMac=TRUE; - pPortHelper->pCreateDot11MacInfo= (PDOT11_MAC_INFO)NdisRequest->DATA.SET_INFORMATION.InformationBuffer; - NdisRequest->DATA.SET_INFORMATION.BytesRead = sizeof(DOT11_MAC_INFO); + pPortHelper->pCreateDot11MacInfo= (PDOT11_MAC_INFO)NdisRequest->DATA.SET_INFORMATION.InformationBuffer; + NdisRequest->DATA.SET_INFORMATION.BytesRead = sizeof(DOT11_MAC_INFO); // Save corresponding NdisRequest for MAC Creation and Deletion pPortHelper->pCreateDeleteOID = NdisRequest; @@ -383,17 +383,17 @@ N62C_OID_DOT11_DELETE_MAC( // ndisStatus = NDIS_STATUS_PENDING; // } - PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); + PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); } RT_ASSERT(pPortHelper->pCreateDeleteOID, ("N62C_OID_DOT11_DELETE_MAC(): pCreateDeleteOID is not completed!!\n")); }while (FALSE); - + if( irql < DISPATCH_LEVEL ){ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_DELETE_MAC(): Restore IRQL!!\n")); - KeLowerIrql(irql); + KeLowerIrql(irql); } #if DRV_LOG_REGISTRY @@ -403,9 +403,9 @@ N62C_OID_DOT11_DELETE_MAC( RT_CLEAR_DRV_STATE_ERROR(pAdapter); } #endif - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62C_OID_DOT11_DELETE_MAC():< ---\n")); - + return ndisStatus; } @@ -429,14 +429,14 @@ N62CCreateDeleteMacTimerCallback( } else PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK); - + // debug if workitem scheduled successfully or not //pPortHelper->CreateDeleteMacWorkitem.bWriteRegistry = TRUE; if( !PlatformScheduleWorkItem( &(pPortHelper->CreateDeleteMacWorkitem)) ) { RT_SET_DRV_STATE(pAdapter, DrvStateMacCreDel_WI_FAIL); - RT_TRACE(COMP_OID_SET, DBG_WARNING, ("N62CCreateDeleteMacTimerCallback():(): Fail to schedule WI!!\n")); + RT_TRACE(COMP_OID_SET, DBG_WARNING, ("N62CCreateDeleteMacTimerCallback():(): Fail to schedule WI!!\n")); N62CCompletePendingCreateDeleteMacOidRequest(pAdapter, NDIS_STATUS_REQUEST_ABORTED); } @@ -450,8 +450,8 @@ N62CCreateDeleteMacWorkItemCallback( { PADAPTER pAdapter = (PADAPTER)pContext; PRT_NDIS62_COMMON pNdis62Common = pAdapter->pNdis62Common; - PPORT_HELPER pPortHelper = pAdapter->pPortCommonInfo->pPortHelper; - NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; + PPORT_HELPER pPortHelper = pAdapter->pPortCommonInfo->pPortHelper; + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("====> N62CCreateDeleteMacWorkItemCallback()\n")); PlatformAcquireSpinLock(pAdapter, RT_PORT_SPINLOCK); @@ -461,12 +461,12 @@ N62CCreateDeleteMacWorkItemCallback( ndisStatus=N62CCreateMac(pAdapter); RT_SET_DRV_STATE(pAdapter, DrvStateMacCreated); - + pPortHelper->bCreateMac=FALSE; if(ndisStatus !=NDIS_STATUS_SUCCESS) { RT_SET_DRV_STATE(pAdapter, DrvStateMacCreate_Fail); - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("bCreateMac Fail\n")); + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("bCreateMac Fail\n")); } else { @@ -483,13 +483,13 @@ N62CCreateDeleteMacWorkItemCallback( ndisStatus=N62CDeleteMac(pAdapter); RT_SET_DRV_STATE(pAdapter, DrvStateMacDeleted); - + pPortHelper->bDeleteMac=FALSE; if(ndisStatus !=NDIS_STATUS_SUCCESS) { RT_SET_DRV_STATE(pAdapter, DrvStateMacDelete_Fail); - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("bdeleteMac Fail\n")); - } + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("bdeleteMac Fail\n")); + } else { // Re-hook association entry to keep fresh when delete port. @@ -502,7 +502,7 @@ N62CCreateDeleteMacWorkItemCallback( else { PlatformReleaseSpinLock(pAdapter, RT_PORT_SPINLOCK); - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("UnKnow Operation\n")); + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("UnKnow Operation\n")); } RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<==== N62CCreateDeleteMacWorkItemCallback()\n")); @@ -517,7 +517,7 @@ N62CCreateMac( { PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); PRT_NDIS62_COMMON Ndis62Common = pDefaultAdapter->pNdis62Common; - PPORT_HELPER pPortHelper = pDefaultAdapter->pPortCommonInfo->pPortHelper; + PPORT_HELPER pPortHelper = pDefaultAdapter->pPortCommonInfo->pPortHelper; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; BOOLEAN ndisPortAllocated = FALSE, ndisPortActivated = FALSE; NDIS_PORT_NUMBER portNumber = DEFAULT_NDIS_PORT_NUMBER; @@ -525,28 +525,28 @@ N62CCreateMac( PADAPTER pTargetAdapter = NULL; PADAPTER pAllocFailAdapter = NULL; BOOLEAN bCompleteStatus = FALSE; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("====> N62CCreateMac()\n")); logCnt++; if(logCnt >= 10) logCnt = 10; logValue[logCnt-1] |= BIT1; - + /* - Pause the miniport before we modify the adapter's port list. + Pause the miniport before we modify the adapter's port list. This is an expensive way to achieve this but it is simple to implement */ do { - ndisStatus = N62CHandleMiniportPause(pAdapter, NULL); - + ndisStatus = N62CHandleMiniportPause(pAdapter, NULL); + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_LOUD, (" N62CCreateMac(), N62CHandleMiniportPause() FAIL!!!\n")); break; - } - + } + pAdapter = GetNextExtAdapter(pAdapter); } while(pAdapter!=NULL); @@ -592,9 +592,9 @@ N62CCreateMac( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Allocate Ndis Port fail\n")); break; } - + pTargetAdapter = pAdapter; - pPortHelper->pCreateDot11MacInfo->uNdisPortNumber = portNumber; + pPortHelper->pCreateDot11MacInfo->uNdisPortNumber = portNumber; ndisPortAllocated = TRUE; pAdapter->pNdisCommon->dot11CurrentOperationMode.uCurrentOpMode = DOT11_OPERATION_MODE_EXTENSIBLE_STATION; @@ -614,20 +614,20 @@ N62CCreateMac( pAdapter->CamBtStartIndex = pDefaultAdapter->CamBtStartIndex; pAdapter->BtHwCamStart = pDefaultAdapter->BtHwCamStart; SetAPState(pAdapter, AP_STATE_STOPPED); - + if(IS_WIRELESS_MODE_N(pAdapter)) pAdapter->MgntInfo.pHTInfo->bEnableHT = TRUE; else pAdapter->MgntInfo.pHTInfo->bEnableHT = FALSE; - + MgntRefreshSuppRateSet( pAdapter ); - + N6C_SET_MP_DRIVER_STATE(pAdapter, MINIPORT_PAUSED); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Created a new Port \n" )); - + } while (FALSE); - + pAdapter = pDefaultAdapter; // Restart the miniport driver @@ -638,7 +638,7 @@ N62CCreateMac( { RT_TRACE(COMP_INIT, DBG_LOUD, (" N62CCreateMac(), N62CHelperHandleMiniportRestart() FAIL!!!\n")); break; - } + } } pAdapter = GetNextExtAdapter(pAdapter); }while(pAdapter!=NULL); @@ -654,10 +654,10 @@ N62CCreateMac( bCompleteStatus = N62CCompletePendingCreateDeleteMacOidRequest(Adapter, ndisStatus); RT_TRACE(COMP_INIT, DBG_LOUD, (" N62CCreateMac(), N62CCompletePendingCreateDeleteMacOidRequest() bCompleteStatus=%d.\n", bCompleteStatus)); - + // // We can now activate/deactivate the port. We cannot do this while we are processing - // the OID, else the OS would deadlock. + // the OID, else the OS would deadlock. // if (ndisStatus == NDIS_STATUS_SUCCESS && bCompleteStatus) { @@ -712,13 +712,13 @@ N62CDeleteMac( PMP_PORT destinationPort = NULL; NDIS_PORT_NUMBER portNumber; BOOLEAN destroyPortNumber = FALSE; - PRT_NDIS62_COMMON pNdis62Common = pAdapter->pNdis62Common; + PRT_NDIS62_COMMON pNdis62Common = pAdapter->pNdis62Common; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PPORT_HELPER pPortHelper = pAdapter->pPortCommonInfo->pPortHelper; PADAPTER pTargetAdapter = NULL; PADAPTER pLoopAdapter = NULL; BOOLEAN bCompleteStatus = FALSE; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("====> N62CDeleteMac()\n")); do { @@ -744,33 +744,33 @@ N62CDeleteMac( if(!IsDefaultAdapter(pTargetAdapter)) { /* - Pause the miniport before we modify the adapter's port list. + Pause the miniport before we modify the adapter's port list. This is an expensive way to achieve this but it is simple to implement */ pLoopAdapter = GetDefaultAdapter(pAdapter); - + do { N6C_SET_MP_DRIVER_STATE_BACKUP(pLoopAdapter, N6C_GET_MP_DRIVER_STATE(pLoopAdapter)); - + if(N6C_GET_MP_DRIVER_STATE(pLoopAdapter) == MINIPORT_RUNNING) - { - ndisStatus = N62CHandleMiniportPause(pLoopAdapter, NULL); + { + ndisStatus = N62CHandleMiniportPause(pLoopAdapter, NULL); if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("HelperPortHandleMiniportPause failed 0x%x\n", ndisStatus)); break; - } + } } pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } while(pLoopAdapter!=NULL); - + // MultiPort Disable the Port ---------------------------------------- MultiPortChangeExtAdapterActiveState(pTargetAdapter, FALSE); - + //sherry added for revise to default for fix wlk1.6 error pTargetAdapter->pNdis62Common->CurrentOpState = INIT_STATE; SetAPState(pTargetAdapter, AP_STATE_STOPPED); @@ -795,7 +795,7 @@ N62CDeleteMac( PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); PlatformReleaseDataFrameQueued(pTargetAdapter); PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); - + pTargetAdapter->bSWInitReady = FALSE; /* @@ -803,7 +803,7 @@ N62CDeleteMac( */ // TODO: should do deactive port. pLoopAdapter = GetDefaultAdapter(pAdapter); - + do{ if(N6C_GET_MP_DRIVER_STATE_BACKUP(pLoopAdapter) == MINIPORT_RUNNING) { @@ -812,7 +812,7 @@ N62CDeleteMac( { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("HelperPortHandleMiniportRestart failed 0x%x", ndisStatus)); break; - } + } } pLoopAdapter = GetNextExtAdapter(pLoopAdapter); }while(pLoopAdapter!=NULL); @@ -825,14 +825,14 @@ N62CDeleteMac( PlatformReleaseDataFrameQueued(pTargetAdapter); PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } - + } while (FALSE); - bCompleteStatus = N62CCompletePendingCreateDeleteMacOidRequest(pAdapter, NDIS_STATUS_SUCCESS); + bCompleteStatus = N62CCompletePendingCreateDeleteMacOidRequest(pAdapter, NDIS_STATUS_SUCCESS); // // We can now deactivate the port. We cannot do this while we are processing - // the OID, else the OS would deadlock. + // the OID, else the OS would deadlock. // if ((ndisStatus == NDIS_STATUS_SUCCESS) && (destroyPortNumber == TRUE) && bCompleteStatus) { @@ -841,7 +841,7 @@ N62CDeleteMac( if(!OS_SUPPORT_WDI) { N62CHelperDeactivateNdisPort(pTargetAdapter, portNumber); - N62CHelperFreeNdisPort(pTargetAdapter, portNumber); + N62CHelperFreeNdisPort(pTargetAdapter, portNumber); } #endif } @@ -884,7 +884,7 @@ N62CHelperAllocateNdisPort( } else { - RT_TRACE(COMP_INIT, DBG_LOUD, ("Associated Port Number %d with allocated port\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("Associated Port Number %d with allocated port\n", portChar.PortNumber)); // Return the NDIS port number that has been allocated to this port @@ -895,7 +895,7 @@ N62CHelperAllocateNdisPort( } // MiniportOidRequest - Called from MP layer to Port -NDIS_STATUS +NDIS_STATUS N62CStaOidHandler( IN PADAPTER pAdapter, IN PMP_PORT Port, @@ -908,7 +908,7 @@ N62CStaOidHandler( } /* See prototype for documentation */ -NDIS_STATUS +NDIS_STATUS N62CStaSendEventHandler( IN PMP_PORT Port, // IN PMP_TX_MSDU PacketList, @@ -968,7 +968,7 @@ Return Value: N6C_MP_DRIVER_STATE CurrDriverState; UNREFERENCED_PARAMETER(MiniportRestartParameters); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("==> N62CHelperHandleMiniportRestart(), DriverState(%d)\n", N6C_GET_MP_DRIVER_STATE(pAdapter))); // @@ -1047,7 +1047,7 @@ N62CHelperActivateNdisPort( // Refill the characteristics structure for the port portChar = &(ndisPort.PortCharacteristics); - + N6_ASSIGN_OBJECT_HEADER(portChar->Header, NDIS_OBJECT_TYPE_DEFAULT, NDIS_PORT_CHARACTERISTICS_REVISION_1, sizeof(NDIS_PORT_CHARACTERISTICS)); @@ -1069,17 +1069,17 @@ N62CHelperActivateNdisPort( // We need to save a pointer to the NDIS_PORT in the NetPnPEvent::Buffer field netPnpEventNotification.NetPnPEvent.Buffer = (PVOID)&ndisPort; netPnpEventNotification.NetPnPEvent.BufferLength = sizeof(NDIS_PORT); - + ndisStatus = NdisMNetPnPEvent(pAdapter->pNdisCommon->hNdisAdapter, &netPnpEventNotification); if (ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_LOUD, ("Failed to activate NDIS port %d. Status = 0x%08x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("Failed to activate NDIS port %d. Status = 0x%08x\n", PortNumberToActivate, ndisStatus)); } else { RT_TRACE(COMP_INIT, DBG_LOUD, ("Activated Port Number %d\n", PortNumberToActivate)); - } + } return ndisStatus; } @@ -1102,20 +1102,20 @@ N62CHelperDeactivateNdisPort( netPnpEventNotification.NetPnPEvent.NetEvent = NetEventPortDeactivation; // We need to save a pointer to the NDIS_PORT_NUMBER in the NetPnPEvent::Buffer field - portNumberArray[0] = PortNumberToDeactivate; + portNumberArray[0] = PortNumberToDeactivate; netPnpEventNotification.NetPnPEvent.Buffer = (PVOID)portNumberArray; netPnpEventNotification.NetPnPEvent.BufferLength = sizeof(NDIS_PORT_NUMBER); ndisStatus = NdisMNetPnPEvent(pAdapter->pNdisCommon->hNdisAdapter, &netPnpEventNotification); if (ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_LOUD, ("Failed to deactivate NDIS port %d. Status = 0x%08x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("Failed to deactivate NDIS port %d. Status = 0x%08x\n", PortNumberToDeactivate, ndisStatus)); } else { RT_TRACE(COMP_INIT, DBG_LOUD, ("Deactivated Port Number %d\n", PortNumberToDeactivate)); - } + } } VOID @@ -1159,7 +1159,7 @@ N62CHandleMiniportPause( RT_TRACE(COMP_INIT, DBG_LOUD, ("<== N62CHandleMiniportPause(), DriverState(%d)\n", N6C_GET_MP_DRIVER_STATE(pAdapter))); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } @@ -1179,7 +1179,7 @@ N62CGetPortTypeByOpMode( case DOT11_OPERATION_MODE_EXTENSIBLE_AP: return EXTAP_PORT; - + case DOT11_OPERATION_MODE_WFD_DEVICE: return EXT_P2P_DEVICE_PORT; case DOT11_OPERATION_MODE_WFD_GROUP_OWNER: @@ -1269,9 +1269,9 @@ N62CChangePortTypeByOpMode( { PRT_NDIS62_COMMON pNdis62Common = pAdapter->pNdis62Common; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - MP_PORT_TYPE newPortType = N62CGetPortTypeByOpMode(dot11OpMode->uCurrentOpMode); + MP_PORT_TYPE newPortType = N62CGetPortTypeByOpMode(dot11OpMode->uCurrentOpMode); PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===>N62CChangePortTypeByOpMode(): Port Number: %d\n", pNdis62Common->PortNumber)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===>N62CChangePortTypeByOpMode(): MP_PORT_TYPE: newPortType %d, DOT11_CURRENT_OPERATION_MODE: newOpMode %d\n", newPortType, dot11OpMode->uCurrentOpMode)); @@ -1284,16 +1284,16 @@ N62CChangePortTypeByOpMode( ndisStatus = N62CHandleMiniportPause(pAdapter, NULL); if (ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("Failed to pause port %d to change Op Mode. Status = 0x%08x\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("Failed to pause port %d to change Op Mode. Status = 0x%08x\n", pNdis62Common->PortNumber, ndisStatus)); return ndisStatus; } - + // ExtAP and ExtSTA are handled here N62CChangePortType(pAdapter, pNdis62Common->PortType, newPortType); - + pNdis62Common->PortType = newPortType; @@ -1313,15 +1313,15 @@ N62CChangePortTypeByOpMode( break; default: - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("Unknown Port Type Observed: dot11OpMode->uCurrentOpMode %d!\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("Unknown Port Type Observed: dot11OpMode->uCurrentOpMode %d!\n", dot11OpMode->uCurrentOpMode) ); break; } if(PortRole != P2P_NONE) - { + { ndisStatus = N63CResetWifiDirectPorts(pAdapter, PortRole, RESET_LEVEL_FULL); } } @@ -1332,8 +1332,8 @@ N62CChangePortTypeByOpMode( ndisStatus = N62CHelperHandleMiniportRestart(pAdapter, NULL); if (ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_LOUD, - ("Failed to restart port %d after change of Op Mode. Status = 0x%08x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, + ("Failed to restart port %d after change of Op Mode. Status = 0x%08x\n", pNdis62Common->PortNumber, ndisStatus)); } @@ -1359,7 +1359,7 @@ N62CChangePortType( { if(OldPortType==NewPortType) { - break; + break; } switch(NewPortType) @@ -1379,7 +1379,7 @@ N62CChangePortType( MgntActSet_P2PMode(pAdapter, FALSE, FALSE, 0, 0, 0); } #endif - + break; } case EXTAP_PORT: @@ -1396,14 +1396,14 @@ N62CChangePortType( MgntActSet_P2PMode(pAdapter, FALSE, FALSE, 0, 0, 0); } #endif - + break; } default: break; } }while(FALSE); - return ; + return ; } VOID @@ -1423,7 +1423,7 @@ N62CExtAdapterHandleNBLInWaitQueue( if(PlatformAtomicExchange(&pAdapter->IntrNBLRefCount, TRUE)==TRUE) return; - + // // Send NBL in wait queue. // @@ -1450,7 +1450,7 @@ N62CExtAdapterHandleNBLInWaitQueue( } if( !N6SdioSendSingleNetBufferList( - pAdapter, + pAdapter, pNetBufferList, TRUE)) // bFromQueue { diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.h index d51905766..a0ef46148 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_Port.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains Port specific defines - + Revision History: When What ---------- ---------------------------------------------- @@ -40,7 +40,7 @@ typedef struct _MP_PORT MP_PORT, *PMP_PORT; // If any of these flags are set, we cannot scan #define MP_PORT_CANNOT_SCAN_MASK (MP_PORT_PAUSED | MP_PORT_PAUSING | MP_PORT_HALTING | \ MP_PORT_IN_RESET) - + #define MP_SET_PORT_STATUS(_Port, _Flag) \ ((_Port->Status) |= (_Flag)) @@ -60,7 +60,7 @@ typedef struct _MP_PORT MP_PORT, *PMP_PORT; #define HELPER_PORT_PORT_NUMBER 0xFFFFFFFF #define MP_MAX_NUMBER_OF_PORT 0x8 -// 0x05 is enough: ExtSTA + ExtAP + ExtDevice + ExtRoleGO + ExtRoleClient +// 0x05 is enough: ExtSTA + ExtAP + ExtDevice + ExtRoleGO + ExtRoleClient #define MP_DEFAULT_NUMBER_OF_PORT 0x5 @@ -123,11 +123,11 @@ N62CDeinitPacketQueue( typedef struct _PORT_HELPER { - RT_WORK_ITEM CreateDeleteMacWorkitem; + RT_WORK_ITEM CreateDeleteMacWorkitem; RT_TIMER CreateDeleteMacTimer; BOOLEAN bCreateMac; - BOOLEAN bDeleteMac; - PDOT11_MAC_INFO pCreateDot11MacInfo; + BOOLEAN bDeleteMac; + PDOT11_MAC_INFO pCreateDot11MacInfo; PNDIS_OID_REQUEST pCreateDeleteOID; } PORT_HELPER, *PPORT_HELPER; @@ -135,8 +135,8 @@ typedef struct _RT_NDIS62_COMMON { MP_PORT_OP_STATE CurrentOpState; // Indicate to Win7. - MP_PORT_TYPE PortType; // Used by Port, ChildPort & MP - NDIS_PORT_NUMBER PortNumber; // NDIS allocate port number + MP_PORT_TYPE PortType; // Used by Port, ChildPort & MP + NDIS_PORT_NUMBER PortNumber; // NDIS allocate port number BOOLEAN bWPSEnable; // AP Port for OID_DOT11_WPS_ENABLED BOOLEAN bIsDot11PhyIdSet[MAX_PHY_ID]; BOOLEAN bDot11SetPhyIdReady; @@ -165,7 +165,7 @@ typedef struct _MP_HELPER_REG_INFO ULONG ScanRescheduleTime; // MP_SCAN_RESCHEDULE_TIME_MS ULONG InterScanTime; // MP_INTER_SCAN_TIME - + } MP_HELPER_REG_INFO, *PMP_HELPER_REG_INFO; @@ -199,8 +199,8 @@ typedef struct _MP_PORT_REG_INFO /** * State read from the registry */ -typedef struct _STA_REG_INFO -{ +typedef struct _STA_REG_INFO +{ /** Max number of adhoc station entries to maintain */ ULONG AdhocStationMaxCount; @@ -218,36 +218,36 @@ typedef struct _STA_REG_INFO typedef struct _STA_ADHOC_STA_INFO { - /** + /** * Linked list of discovered access points - * This list must not be modified/read without acquiring the + * This list must not be modified/read without acquiring the * ListLock */ LIST_ENTRY StaList; ULONG StaCount; ULONG DeauthStaCount; - /** - * Lock we need before we adding/removing entries from the + /** + * Lock we need before we adding/removing entries from the * discovered AP list. This will be acquired for read by - * routines that are not modifying the chain and acquired + * routines that are not modifying the chain and acquired * for write by routines that will be removing entries or * adding entries to the chain */ // TODO: Win 7 - // MP_READ_WRITE_LOCK StaListLock; + // MP_READ_WRITE_LOCK StaListLock; - /** - * Lock for changing state, protecting connection variables, etc. + /** + * Lock for changing state, protecting connection variables, etc. * - * When acquiring both this lock and StaListLock, StaListLock + * When acquiring both this lock and StaListLock, StaListLock * must be acquired FIRST to ensure consistency throughout the code * and avoid deadlock */ NDIS_SPIN_LOCK StaInfoLock; ULONG AdHocState; - + /** Watchdog timer used in AdHoc mode */ NDIS_HANDLE WatchdogTimer; LONG TimerCounter; @@ -271,7 +271,7 @@ typedef struct _STA_ADHOC_STA_INFO * is updated on OIDs request from the OS. One place this * is used is for selecting the access points for making a conneciton */ -typedef struct _STA_CURRENT_CONFIG +typedef struct _STA_CURRENT_CONFIG { /** BSS type configured by the OS */ DOT11_BSS_TYPE BSSType; @@ -300,15 +300,15 @@ typedef struct _STA_CURRENT_CONFIG ULONG PMKIDCount; /** Currently enabled authentication algorithm */ - DOT11_AUTH_ALGORITHM AuthAlgorithm; + DOT11_AUTH_ALGORITHM AuthAlgorithm; /** Currently enabled unicast cipher algorithm */ - DOT11_CIPHER_ALGORITHM UnicastCipherAlgorithm; + DOT11_CIPHER_ALGORITHM UnicastCipherAlgorithm; /** Currently enabled multicast cipher algorithm */ DOT11_CIPHER_ALGORITHM MulticastCipherAlgorithmList[STA_MULTICAST_CIPHER_MAX_COUNT]; ULONG MulticastCipherAlgorithmCount; - DOT11_CIPHER_ALGORITHM MulticastCipherAlgorithm; + DOT11_CIPHER_ALGORITHM MulticastCipherAlgorithm; /** Current setting of unreachable detection threshold */ ULONG UnreachableDetectionThreshold; @@ -340,7 +340,7 @@ typedef struct _STA_CURRENT_CONFIG /** Current hidden OID setting */ BOOLEAN HiddenNetworkEnabled; - + /** check for use protection bit in beacon ERP IE after a successful connection or scan */ BOOLEAN CheckForProtectionInERP; }STA_CURRENT_CONFIG, *PSTA_CURRENT_CONFIG; @@ -352,7 +352,7 @@ typedef struct _STA_CURRENT_CONFIG * receive handler. A linked list of these entries is maintained * by the station to keep track of the discovered BSS */ -typedef struct _MP_BSS_ENTRY +typedef struct _MP_BSS_ENTRY { /** List entry linkage */ LIST_ENTRY Link; @@ -381,7 +381,7 @@ typedef struct _MP_BSS_ENTRY ULONG LinkQuality; ULONG ChannelCenterFrequency; - + DOT11_BSS_TYPE Dot11BSSType; DOT11_MAC_ADDRESS Dot11BSSID; @@ -395,11 +395,11 @@ typedef struct _MP_BSS_ENTRY ULONGLONG HostTimestamp; DOT11_CAPABILITY Dot11Capability; - + ULONG MaxBeaconFrameSize; PUCHAR pDot11BeaconFrame; // Beacon frame starting after management header ULONG BeaconFrameSize; - + PUCHAR pDot11InfoElemBlob; // Pointer to the information elements in the beacon frame ULONG InfoElemBlobSize; // Length of information element blob @@ -409,22 +409,22 @@ typedef struct _MP_BSS_ENTRY // separately since probe buffer may get overwritten // by beacons and we may lose the SSID from probe - /** - * The OS needs to be given the association request - * packet information on a association completion. This + /** + * The OS needs to be given the association request + * packet information on a association completion. This * information is cached in this structure */ - __field_ecount(AssocRequestLength) + __field_ecount(AssocRequestLength) PUCHAR pAssocRequest; USHORT AssocRequestLength; // Includes header - /** + /** * The OS needs to be given the association response - * packet information on a association completion. This + * packet information on a association completion. This * information is cached in this structure */ USHORT AssocResponseLength; // Includes header - __field_ecount(AssocResponseLength) + __field_ecount(AssocResponseLength) PUCHAR pAssocResponse; /** Association ID */ @@ -436,9 +436,9 @@ typedef struct _MP_BSS_ENTRY /** Timestamp when we obtained the association */ LARGE_INTEGER AssociationUpTime; - /** + /** * Cost for roaming purpose. A lower number is better. We dont - * rank of APs based on this, but use higher number this for rejecting + * rank of APs based on this, but use higher number this for rejecting * some AP */ LONG AssocCost; @@ -474,7 +474,7 @@ typedef struct _MP_BSS_DESCRIPTION /* When true the hardware wont beacon */ BOOLEAN NoBeaconMode; - + ULONG PhyId; UCHAR Channel; // Valid only if it is non-zero @@ -488,11 +488,11 @@ typedef struct _MP_BSS_DESCRIPTION */ typedef struct _STA_INFRA_CONNECT_CONTEXT { - /** + /** * Used to keep track of number of asynchronous functions pending to - * complete the connection attempt. This is used in CONN_STATE_IN_RESET + * complete the connection attempt. This is used in CONN_STATE_IN_RESET * to wait for the connection process to complete before reseting the - * adapter. Reset waits for this to go to zero. This structure is + * adapter. Reset waits for this to go to zero. This structure is * modified using interlocked operations. */ LONG AsyncFuncCount; @@ -503,19 +503,19 @@ typedef struct _STA_INFRA_CONNECT_CONTEXT * routines */ NDIS_MUTEX DisconnectGate; - - /** - * Lock for changing state, protecting connection variables, etc. + + /** + * Lock for changing state, protecting connection variables, etc. * This is used for connecting and during scanning * - * When acquiring both this lock and lock on the AP entry, the AP entry + * When acquiring both this lock and lock on the AP entry, the AP entry * lock must be acquired second to ensure consistency throughout the code * and avoid deadlock */ NDIS_SPIN_LOCK Lock; - /** - * Current association state of the station. This variable is + /** + * Current association state of the station. This variable is * normally modified by the various association routines. The Reset/Disconnect * routines will modify this once they are sure no association routine is using * this. The Connect routine would initialize this. This is modified @@ -528,17 +528,17 @@ typedef struct _STA_INFRA_CONNECT_CONTEXT */ USHORT DeAuthReason; - /** - * This field is only meaningful when AssociateState is - * ASSOC_STATE_WAITING_FOR_AUTHENTICATE. It specifies the sequence + /** + * This field is only meaningful when AssociateState is + * ASSOC_STATE_WAITING_FOR_AUTHENTICATE. It specifies the sequence * number of the authenticate response we are expecting. */ USHORT ExpectedAuthSeqNumber; - /** - * Tracks whether or not we are allowed to connect. This is only + /** + * Tracks whether or not we are allowed to connect. This is only * modified by the Connect/Reset/Disconnect routines. The various - * functions that handle associate would read this to check if they + * functions that handle associate would read this to check if they * should continue with the association. This is modified * with the Lock held */ @@ -549,13 +549,13 @@ typedef struct _STA_INFRA_CONNECT_CONTEXT * etc in the middle of a connect. */ STA_CONNECT_STATE PreviousConnectState; - - /** - * BSSEntry that we are currently using for association, are associated with. + + /** + * BSSEntry that we are currently using for association, are associated with. * This is modified with the Lock held */ PMP_BSS_ENTRY ActiveAP; - + /** * The candidate access points we will attempt to associate with. */ @@ -573,13 +573,13 @@ typedef struct _STA_INFRA_CONNECT_CONTEXT */ PUCHAR pAssocFailBuffer; - /** + /** * Timer object used when waiting for authentication process to complete. * The timer will be set when the authentication process begins */ NDIS_HANDLE Timer_AuthenticateTimeout; - /** + /** * Timer object used when waiting for association process to complete. * The timer will be set when the association process begins */ @@ -595,7 +595,7 @@ typedef struct _STA_INFRA_CONNECT_CONTEXT }STA_INFRA_CONNECT_CONTEXT, *PSTA_INFRA_CONNECT_CONTEXT; /** - * State we maintain for holding + * State we maintain for holding */ typedef struct _STA_SCAN_CONTEXT { @@ -621,7 +621,7 @@ typedef struct _STA_SCAN_CONTEXT * periodic scans shouldnt happen */ ULONG PeriodicScanDisableCount; - + /** * Number of times that the periodic scan timer has run, but * did has not done any scanning @@ -647,9 +647,9 @@ typedef struct _STA_SCAN_CONTEXT */ BOOLEAN MustRoam; - /** + /** * This is generally true and we would be adding the SSID of the network in - * our probe requests. When we go to sleep, this becomes false, causing us to + * our probe requests. When we go to sleep, this becomes false, causing us to * stop putting the SSID in our probe requests until we wake up */ BOOLEAN SSIDInProbeRequest; @@ -657,7 +657,7 @@ typedef struct _STA_SCAN_CONTEXT }STA_SCAN_CONTEXT, *PSTA_SCAN_CONTEXT; typedef struct _STA_PMKID_CACHE { - + /** The time at which we checked for PMKID candidate */ ULONGLONG CheckingTime; @@ -677,7 +677,7 @@ typedef struct _STA_STATS { ULONGLONG ullUcastWEPExcludedCount; ULONGLONG ullMcastWEPExcludedCount; - + }STA_STATS, *PSTA_STATS; /* @@ -689,7 +689,7 @@ typedef struct _MP_MINIPORT_PAUSE_PARAMETERS { /** The pause parameters provided by NDIS */ PNDIS_MINIPORT_PAUSE_PARAMETERS NdisParameters; - + /** The event that is fired when the pause is completed */ NDIS_EVENT CompleteEvent; @@ -701,7 +701,7 @@ typedef struct _MP_NDIS_RESET_PARAMETERS { PBOOLEAN AddressingReset; - NDIS_STATUS ResetStatus; + NDIS_STATUS ResetStatus; /** The event that is fired when the reset is completed */ NDIS_EVENT CompleteEvent; @@ -713,7 +713,7 @@ typedef struct _MP_POWER_PARAMETERS { /** The device state to transition to */ NDIS_DEVICE_POWER_STATE NewDeviceState; - + /** The event that is fired when the oid processing is completed */ NDIS_EVENT CompleteEvent; @@ -838,14 +838,14 @@ N62CStaInitializePort( IN PVOID RegistryInformation ); -NDIS_STATUS +NDIS_STATUS N62CStaOidHandler( IN PADAPTER pAdapter, IN PMP_PORT Port, IN PNDIS_OID_REQUEST OidRequest ); -NDIS_STATUS +NDIS_STATUS N62CStaSendEventHandler( IN PMP_PORT Port, //IN PMP_TX_MSDU PacketList, @@ -903,7 +903,7 @@ N62CGetPortTypeByOpMode( //NDIS_STATUS //N62CSetCurrentPortOperationMode( // IN PADAPTER pAdapter, -// IN PNDIS_OID_REQUEST NdisRequest +// IN PNDIS_OID_REQUEST NdisRequest // ); NDIS_STATUS @@ -940,6 +940,6 @@ NDIS_STATUS N62CChangePortTypeByOpMode( IN PADAPTER pAdapter, IN PDOT11_CURRENT_OPERATION_MODE dot11OpMode -); +); #endif //_N62_PORT__H diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.c index 74c3fb992..18408e474 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.c @@ -8,20 +8,20 @@ N62CQueryInterruptModerationSettings( IN ULONG InformationBufferLength ) { - + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PNDIS_INTERRUPT_MODERATION_PARAMETERS intModParams; - + UNREFERENCED_PARAMETER(Adapter); - - NdisZeroMemory(InformationBuffer, InformationBufferLength); - intModParams = (PNDIS_INTERRUPT_MODERATION_PARAMETERS)InformationBuffer; + NdisZeroMemory(InformationBuffer, InformationBufferLength); + + intModParams = (PNDIS_INTERRUPT_MODERATION_PARAMETERS)InformationBuffer; intModParams->Header.Type=NDIS_OBJECT_TYPE_DEFAULT; intModParams->Header.Revision=NDIS_INTERRUPT_MODERATION_PARAMETERS_REVISION_1; intModParams->Header.Size=sizeof(NDIS_INTERRUPT_MODERATION_PARAMETERS); - + intModParams->Flags = 0; intModParams->InterruptModeration = NdisInterruptModerationNotSupported; @@ -39,7 +39,7 @@ N62CQueryLinkParameters( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PNDIS_LINK_PARAMETERS linkParams; - + NdisZeroMemory(InformationBuffer, InformationBufferLength); linkParams = (PNDIS_LINK_PARAMETERS)InformationBuffer; @@ -64,7 +64,7 @@ N62CQueryAdditionalIE( OUT PDOT11_ADDITIONAL_IE AdditionalIe, IN u4Byte InformationBufferLength, OUT pu4Byte BytesWritten, - OUT pu4Byte BytesNeeded + OUT pu4Byte BytesNeeded ) { u4Byte AdditionalBeaconIESize = 0; @@ -74,7 +74,7 @@ N62CQueryAdditionalIE( ULONG beaconIeOffset = sizeof(DOT11_ADDITIONAL_IE); ULONG responseIeOffset = 0; NDIS_STATUS Status = NDIS_STATUS_SUCCESS; - + do { // @@ -83,28 +83,28 @@ N62CQueryAdditionalIE( MgntActQuery_AdditionalBeaconIE(Adapter, NULL, &AdditionalBeaconIESize); MgntActQuery_AdditionalProbeRspIE(Adapter, NULL, &AdditionalResponseIESize); - RT_TRACE(COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N62CQueryAdditionalIE: BeaconIELen = %u, ProbeRspIELen = %u.\n", AdditionalBeaconIESize, AdditionalResponseIESize)); - - // + + // // add required size for beacon IEs // if (RtlULongAdd(beaconIeOffset, AdditionalBeaconIESize, &responseIeOffset) != NDIS_STATUS_SUCCESS) { - // + // // This shall not happen because we validated the IEs before // Status = NDIS_STATUS_INVALID_DATA; break; } - // + // // add required size for response IEs // if (RtlULongAdd(responseIeOffset, AdditionalResponseIESize, &requiredSize) != NDIS_STATUS_SUCCESS) { - // + // // This shall not happen because we validated the IEs before // Status = NDIS_STATUS_INVALID_DATA; @@ -113,7 +113,7 @@ N62CQueryAdditionalIE( if (InformationBufferLength < requiredSize) { - // + // // the buffer is not big enough // *BytesNeeded = (requiredSize); @@ -121,20 +121,20 @@ N62CQueryAdditionalIE( break; } - // + // // the buffer is big enough, copy the IEs // - MgntActQuery_AdditionalBeaconIE(Adapter, - (pu1Byte)AdditionalIe + beaconIeOffset, + MgntActQuery_AdditionalBeaconIE(Adapter, + (pu1Byte)AdditionalIe + beaconIeOffset, (pu4Byte)&AdditionalBeaconIESize); AdditionalIe->uBeaconIEsLength = AdditionalBeaconIESize; AdditionalIe->uBeaconIEsOffset = beaconIeOffset; - - MgntActQuery_AdditionalProbeRspIE(Adapter, + + MgntActQuery_AdditionalProbeRspIE(Adapter, (pu1Byte)AdditionalIe + responseIeOffset, (pu4Byte)&AdditionalResponseIESize); AdditionalIe->uResponseIEsLength = AdditionalResponseIESize; - AdditionalIe->uResponseIEsOffset = responseIeOffset; + AdditionalIe->uResponseIEsOffset = responseIeOffset; *BytesWritten = requiredSize; @@ -144,11 +144,11 @@ N62CQueryAdditionalIE( NDIS_OBJECT_TYPE_DEFAULT, DOT11_ADDITIONAL_IE_REVISION_1, sizeof(DOT11_ADDITIONAL_IE) - ); + ); }while(FALSE); return Status; - + } NDIS_STATUS @@ -162,7 +162,7 @@ N62CApEnumPeerInfo( { PRT_NDIS62_COMMON pNdis62Common = Adapter->pNdis62Common; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - NDIS_STATUS Status = NDIS_STATUS_SUCCESS; + NDIS_STATUS Status = NDIS_STATUS_SUCCESS; ULONG ulBufRequired; u4Byte i; PRT_WLAN_STA pCurrAsocEntry; @@ -188,13 +188,13 @@ N62CApEnumPeerInfo( // // Verify given buffer length. // - if(InformationBufferLength < ulBufRequired) + if(InformationBufferLength < ulBufRequired) { *BytesNeeded = ulBufRequired; *BytesWritten = 0; // Prefast warning ignore for false positive #pragma warning( disable:6273 ) - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_DOT11_ENUM_PEER_INFO: BytesNeeded: %u !!!\n", BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } @@ -214,9 +214,9 @@ N62CApEnumPeerInfo( // PeerListInfo->uNumOfEntries = 0; PeerListInfo->uTotalNumOfEntries = staEntryCount; - + for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) - { + { // // Report each STA that has been successfully authenticated to NDIS. // @@ -227,22 +227,22 @@ N62CApEnumPeerInfo( PeerListInfo->uNumOfEntries++; PlatformZeroMemory(pPeerInfo, sizeof(DOT11_PEER_INFO)); - RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, + RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "Report STA:", pCurrAsocEntry->MacAddr); - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("bAssociated = %u.\n", pCurrAsocEntry->bAssociated)); // // Fields for ALL authenticated STAs. // - + //mac addr - PlatformMoveMemory(pPeerInfo->MacAddress, - pCurrAsocEntry->MacAddr, + PlatformMoveMemory(pPeerInfo->MacAddress, + pCurrAsocEntry->MacAddr, 6); - + // association state - pPeerInfo->AssociationState = (pCurrAsocEntry->bAssociated) ? + pPeerInfo->AssociationState = (pCurrAsocEntry->bAssociated) ? dot11_assoc_state_auth_assoc : dot11_assoc_state_auth_unassoc; @@ -260,20 +260,20 @@ N62CApEnumPeerInfo( if(pCurrAsocEntry->bAssociated) { // capability - pPeerInfo->usCapabilityInformation = + pPeerInfo->usCapabilityInformation = (USHORT)pCurrAsocEntry->Capability; // auth/cipher, report that of the SoftAP instead of the STA. { RT_AUTH_MODE authmode; PRT_SECURITY_T pSecInfo = &(Adapter->MgntInfo.SecurityInfo); - + MgntActQuery_802_11_AUTHENTICATION_MODE( Adapter, &authmode ); pPeerInfo->AuthAlgo = N6CAuthModeToDot11(&authmode); - pPeerInfo->MulticastCipherAlgo = + pPeerInfo->MulticastCipherAlgo = N6CEncAlgorithmToDot11(&(pSecInfo->GroupEncAlgorithm)); - pPeerInfo->UnicastCipherAlgo = + pPeerInfo->UnicastCipherAlgo = N6CEncAlgorithmToDot11(&(pSecInfo->PairwiseEncAlgorithm)); } @@ -282,7 +282,7 @@ N62CApEnumPeerInfo( // listen interval pPeerInfo->usListenInterval = pCurrAsocEntry->usListenInterval; - + // supported rates PlatformMoveMemory( pPeerInfo->ucSupportedRates, @@ -294,9 +294,9 @@ N62CApEnumPeerInfo( pPeerInfo->usAssociationID = pCurrAsocEntry->AID; // association up time - pPeerInfo->liAssociationUpTime.QuadPart = + pPeerInfo->liAssociationUpTime.QuadPart = pCurrAsocEntry->AssociationUpTime; - //PlatformMoveMemory(&pPeerInfo->liAssociationUpTime, + //PlatformMoveMemory(&pPeerInfo->liAssociationUpTime, // &pCurrAsocEntry->AssociationUpTime, // sizeof(LARGE_INTEGER)); @@ -305,9 +305,9 @@ N62CApEnumPeerInfo( } } } - + PeerListInfo->uTotalNumOfEntries = staEntryCount; - *BytesWritten = ulBufRequired; + *BytesWritten = ulBufRequired; } while (FALSE); @@ -357,7 +357,7 @@ N62C_QUERY_OID_DOT11_WPS_ENABLED( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; BOOLEAN bEnabled = FALSE; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -372,10 +372,10 @@ N62C_QUERY_OID_DOT11_WPS_ENABLED( return NDIS_STATUS_BUFFER_TOO_SHORT; } - bEnabled = pTargetAdapter->pNdis62Common->bWPSEnable; + bEnabled = pTargetAdapter->pNdis62Common->bWPSEnable; PlatformMoveMemory(InformationBuffer, &bEnabled, sizeof(BOOLEAN)); *BytesWritten = sizeof(BOOLEAN); - + RT_TRACE(COMP_OID_QUERY | COMP_AP, DBG_LOUD, ("<===Query AP mode OID_DOT11_WPS_ENABLED: %d\n", bEnabled)); return ndisStatus; @@ -392,14 +392,14 @@ N62C_QUERY_OID_DOT11_ADDITIONAL_IE( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query AP mode OID_DOT11_ADDITIONAL_IE:\n")); - + ndisStatus = N62CQueryAdditionalIE( pTargetAdapter, (PDOT11_ADDITIONAL_IE)InformationBuffer, @@ -407,7 +407,7 @@ N62C_QUERY_OID_DOT11_ADDITIONAL_IE( BytesWritten, BytesNeeded ); - + return ndisStatus; } @@ -422,7 +422,7 @@ N62C_QUERY_OID_DOT11_ENUM_PEER_INFO( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -433,13 +433,13 @@ N62C_QUERY_OID_DOT11_ENUM_PEER_INFO( // let the strong type API check buffer size // because the size of association info list is not known in advance ndisStatus = N62CApEnumPeerInfo( - pTargetAdapter, + pTargetAdapter, (PDOT11_PEER_INFO_LIST)InformationBuffer, InformationBufferLength, BytesWritten, BytesNeeded - ); - + ); + return ndisStatus; } @@ -457,7 +457,7 @@ N62C_QUERY_OID_DOT11_AVAILABLE_CHANNEL_LIST( ULONG ulInfo = 0; PVOID pInfo = (PVOID) &ulInfo; ULONG ulInfoLen = sizeof(ulInfo); - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -467,7 +467,7 @@ N62C_QUERY_OID_DOT11_AVAILABLE_CHANNEL_LIST( *BytesWritten = ulInfoLen; PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); - + return ndisStatus; } @@ -485,7 +485,7 @@ N62C_QUERY_OID_DOT11_AVAILABLE_FREQUENCY_LIST( ULONG ulInfo = 0; PVOID pInfo = (PVOID) &ulInfo; ULONG ulInfoLen = sizeof(ulInfo); - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -495,7 +495,7 @@ N62C_QUERY_OID_DOT11_AVAILABLE_FREQUENCY_LIST( *BytesWritten = ulInfoLen; PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); - + return ndisStatus; } @@ -516,21 +516,21 @@ N62C_QUERY_OID_PM_PARAMETERS( ULONG ulInfo = 0; PVOID pInfo = (PVOID) &ulInfo; ULONG ulInfoLen = sizeof(ulInfo); - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- FunctionIn(COMP_OID_QUERY); - + if(InformationBufferLength < sizeof(NDIS_PM_PARAMETERS)) { *BytesNeeded = sizeof(NDIS_PM_PARAMETERS); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } - + } + FillPmCapabilities(pTargetAdapter, &PmCapabilities); #if NDIS_SUPPORT_NDIS630 @@ -542,11 +542,11 @@ N62C_QUERY_OID_PM_PARAMETERS( PMParameters.Header.Revision = NDIS_PM_CAPABILITIES_REVISION_1; PMParameters.Header.Size = NDIS_SIZEOF_NDIS_PM_CAPABILITIES_REVISION_1; #endif - + PMParameters.EnabledWoLPacketPatterns = PmCapabilities.SupportedWoLPacketPatterns; PMParameters.EnabledProtocolOffloads = PmCapabilities.SupportedProtocolOffloads; - PMParameters.WakeUpFlags = + PMParameters.WakeUpFlags = /*NDIS_PM_WAKE_ON_LINK_CHANGE_ENABLED | NDIS_PM_WAKE_ON_MEDIA_DISCONNECT_ENABLED |*/ 0; @@ -554,10 +554,10 @@ N62C_QUERY_OID_PM_PARAMETERS( #if NDIS_SUPPORT_NDIS630 PMParameters.MediaSpecificWakeUpEvents = PmCapabilities.MediaSpecificWakeUpEvents; #endif - + pInfo = (PVOID)&PMParameters; ulInfoLen = sizeof(PMParameters); - + if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -573,10 +573,10 @@ N62C_QUERY_OID_PM_PARAMETERS( *BytesNeeded = ulInfoLen; ndisStatus = NDIS_STATUS_BUFFER_TOO_SHORT; } - - RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY OID_PM_PARAMETERS: "), + + RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY OID_PM_PARAMETERS: "), InformationBuffer, InformationBufferLength ); - + return ndisStatus; } @@ -591,7 +591,7 @@ N62C_QUERY_OID_GEN_INTERRUPT_MODERATION( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -607,13 +607,13 @@ N62C_QUERY_OID_GEN_INTERRUPT_MODERATION( } ndisStatus = N62CQueryInterruptModerationSettings( - pTargetAdapter, - InformationBuffer, + pTargetAdapter, + InformationBuffer, InformationBufferLength - ); + ); *BytesWritten = sizeof(NDIS_INTERRUPT_MODERATION_PARAMETERS); - + return ndisStatus; } @@ -628,7 +628,7 @@ N62C_QUERY_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -653,23 +653,23 @@ N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PNDIS_RECEIVE_FILTER_CAPABILITIES pRxFilterCapabilities = (PNDIS_RECEIVE_FILTER_CAPABILITIES)InformationBuffer; - - + + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- FunctionIn(COMP_OID_QUERY); - + if(InformationBufferLength < sizeof(NDIS_RECEIVE_FILTER_CAPABILITIES)) { *BytesNeeded = sizeof(NDIS_RECEIVE_FILTER_CAPABILITIES); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } - - + } + + #if (NDIS_SUPPORT_NDIS630) N6_ASSIGN_OBJECT_HEADER( @@ -685,7 +685,7 @@ N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( NDIS_SIZEOF_RECEIVE_FILTER_CAPABILITIES_REVISION_1); #endif - + pRxFilterCapabilities->Flags = 0; pRxFilterCapabilities->SupportedHeaders = NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED; @@ -694,7 +694,7 @@ N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( pRxFilterCapabilities->EnabledFilterTypes = NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED; pRxFilterCapabilities->SupportedQueueProperties = NDIS_RECEIVE_FILTER_PACKET_COALESCING_SUPPORTED_ON_DEFAULT_QUEUE; - + pRxFilterCapabilities->SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED | NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED| NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_NOT_EQUAL_SUPPORTED; //0; @@ -703,33 +703,33 @@ N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( NDIS_RECEIVE_FILTER_IPV4_HEADER_SUPPORTED| NDIS_RECEIVE_FILTER_IPV6_HEADER_SUPPORTED| NDIS_RECEIVE_FILTER_UDP_HEADER_SUPPORTED); - + pRxFilterCapabilities->SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PACKET_TYPE_SUPPORTED; - + pRxFilterCapabilities->SupportedARPHeaderFields = NDIS_RECEIVE_FILTER_ARP_HEADER_OPERATION_SUPPORTED| NDIS_RECEIVE_FILTER_ARP_HEADER_SPA_SUPPORTED| NDIS_RECEIVE_FILTER_ARP_HEADER_TPA_SUPPORTED ; - + pRxFilterCapabilities->SupportedIPv4HeaderFields = NDIS_RECEIVE_FILTER_IPV4_HEADER_PROTOCOL_SUPPORTED; - + pRxFilterCapabilities->SupportedIPv6HeaderFields = NDIS_RECEIVE_FILTER_IPV6_HEADER_PROTOCOL_SUPPORTED; - + pRxFilterCapabilities->SupportedUdpHeaderFields = NDIS_RECEIVE_FILTER_UDP_HEADER_DEST_PORT_SUPPORTED; - - pRxFilterCapabilities->MaxFieldTestsPerPacketCoalescingFilter = 5; // should be >= 5 - + + pRxFilterCapabilities->MaxFieldTestsPerPacketCoalescingFilter = 5; // should be >= 5 + pRxFilterCapabilities->MaxPacketCoalescingFilters = 10; // should be >= 10 //pRxFilterCapabilities->NidsReserved = 0; #else pRxFilterCapabilities->EnabledFilterTypes = 0; pRxFilterCapabilities->SupportedQueueProperties = 0; - + pRxFilterCapabilities->SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED | NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED; - + pRxFilterCapabilities->SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED; #endif @@ -742,9 +742,9 @@ N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES( pRxFilterCapabilities->MinLookaheadSplitSize = 0; pRxFilterCapabilities->MaxLookaheadSplitSize = 0; - RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES: "), + RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES: "), InformationBuffer, InformationBufferLength ); - + return ndisStatus; } @@ -761,23 +761,23 @@ N62C_QUERY_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PNDIS_RECEIVE_FILTER_CAPABILITIES pRxFilterCapabilities = (PNDIS_RECEIVE_FILTER_CAPABILITIES)InformationBuffer; - - + + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- FunctionIn(COMP_OID_QUERY); - + if(InformationBufferLength < sizeof(NDIS_RECEIVE_FILTER_CAPABILITIES)) { *BytesNeeded = sizeof(NDIS_RECEIVE_FILTER_CAPABILITIES); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } - - + } + + #if (NDIS_SUPPORT_NDIS630) N6_ASSIGN_OBJECT_HEADER( @@ -793,7 +793,7 @@ N62C_QUERY_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( NDIS_SIZEOF_RECEIVE_FILTER_CAPABILITIES_REVISION_1); #endif - + pRxFilterCapabilities->Flags = 0; pRxFilterCapabilities->SupportedHeaders = NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED; @@ -802,7 +802,7 @@ N62C_QUERY_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( pRxFilterCapabilities->EnabledFilterTypes = NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED; pRxFilterCapabilities->SupportedQueueProperties = NDIS_RECEIVE_FILTER_PACKET_COALESCING_SUPPORTED_ON_DEFAULT_QUEUE; - + pRxFilterCapabilities->SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED | NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED| NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_NOT_EQUAL_SUPPORTED; //0; @@ -811,33 +811,33 @@ N62C_QUERY_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( NDIS_RECEIVE_FILTER_IPV4_HEADER_SUPPORTED| NDIS_RECEIVE_FILTER_IPV6_HEADER_SUPPORTED| NDIS_RECEIVE_FILTER_UDP_HEADER_SUPPORTED); - + pRxFilterCapabilities->SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PACKET_TYPE_SUPPORTED; - + pRxFilterCapabilities->SupportedARPHeaderFields = NDIS_RECEIVE_FILTER_ARP_HEADER_OPERATION_SUPPORTED| NDIS_RECEIVE_FILTER_ARP_HEADER_SPA_SUPPORTED| NDIS_RECEIVE_FILTER_ARP_HEADER_TPA_SUPPORTED ; - + pRxFilterCapabilities->SupportedIPv4HeaderFields = NDIS_RECEIVE_FILTER_IPV4_HEADER_PROTOCOL_SUPPORTED; - + pRxFilterCapabilities->SupportedIPv6HeaderFields = NDIS_RECEIVE_FILTER_IPV6_HEADER_PROTOCOL_SUPPORTED; - + pRxFilterCapabilities->SupportedUdpHeaderFields = NDIS_RECEIVE_FILTER_UDP_HEADER_DEST_PORT_SUPPORTED; - - pRxFilterCapabilities->MaxFieldTestsPerPacketCoalescingFilter = 5; // should be >= 5 - + + pRxFilterCapabilities->MaxFieldTestsPerPacketCoalescingFilter = 5; // should be >= 5 + pRxFilterCapabilities->MaxPacketCoalescingFilters = 10; // should be >= 10 //pRxFilterCapabilities->NidsReserved = 0; #else pRxFilterCapabilities->EnabledFilterTypes = 0; pRxFilterCapabilities->SupportedQueueProperties = 0; - + pRxFilterCapabilities->SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED | NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED; - + pRxFilterCapabilities->SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED; #endif @@ -850,9 +850,9 @@ N62C_QUERY_OID_RECEIVE_FILTER_CURRENT_CAPABILITIES( pRxFilterCapabilities->MinLookaheadSplitSize = 0; pRxFilterCapabilities->MaxLookaheadSplitSize = 0; - RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES: "), + RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY N62C_QUERY_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES: "), InformationBuffer, InformationBufferLength ); - + return ndisStatus; } // \ No newline at end of file diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.h index c42006e67..2bf4ee185 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QueryOID.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains Port specific defines - + Revision History: When What ---------- ---------------------------------------------- @@ -42,7 +42,7 @@ N62CQueryAdditionalIE( OUT PDOT11_ADDITIONAL_IE AdditionalIe, IN u4Byte InformationBufferLength, OUT pu4Byte BytesWritten, - OUT pu4Byte BytesNeeded + OUT pu4Byte BytesNeeded ); NDIS_STATUS diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.c index 80eb29156..26bd7986a 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.c @@ -17,7 +17,7 @@ N62CAPResetRequest( PDOT11_RESET_REQUEST pDot11ResetRequest = InformationBuffer; PDOT11_STATUS_INDICATION pDot11StatusIndication = InformationBuffer; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + RT_TRACE( (COMP_OID_QUERY | COMP_OID_SET | COMP_MLME | COMP_AP), DBG_LOUD, ("===>AP mode Query/Set OID_DOT11_RESET_REQUEST: \n")); // @@ -25,13 +25,13 @@ N62CAPResetRequest( // if(pDot11ResetRequest->dot11ResetType != dot11_reset_type_phy_and_mac) { - RT_TRACE( (COMP_OID_QUERY | COMP_OID_SET | COMP_MLME | COMP_AP), DBG_LOUD, + RT_TRACE( (COMP_OID_QUERY | COMP_OID_SET | COMP_MLME | COMP_AP), DBG_LOUD, ("Invalid reset type: %u.\n", pDot11ResetRequest->dot11ResetType)); return NDIS_STATUS_INVALID_DATA; } // - // Fail the query request if the value of this InformationBufferLength member of the MiniportOidRequest function + // Fail the query request if the value of this InformationBufferLength member of the MiniportOidRequest function // is less than the length of the DOT11_STATUS_INDICATION structure // if ( OutputBufferLength < sizeof(DOT11_STATUS_INDICATION) ) @@ -43,7 +43,7 @@ N62CAPResetRequest( // // Validate the buffer length - // + // if ( InputBufferLength < sizeof(DOT11_RESET_REQUEST) ) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("InputBufferLength too short\n")); @@ -53,10 +53,10 @@ N62CAPResetRequest( // - // When the reset operation is complete, the miniport driver must return a DOT11_STATUS_INDICATION + // When the reset operation is complete, the miniport driver must return a DOT11_STATUS_INDICATION //structure to confirm the reset operation, so do NOT return ndisStatus immediately without status indication. // 2014.05.02. - // + // do { pMgntInfo->bResetInProgress = TRUE; @@ -66,18 +66,18 @@ N62CAPResetRequest( SetAPState(Adapter, AP_STATE_STOPPING); AP_DisassociateAllStation(Adapter, unspec_reason); - + SecSetSwEncryptionDecryption(Adapter, FALSE, FALSE); - + MgntActSet_ApType(Adapter, FALSE); - AP_Reset(Adapter); + AP_Reset(Adapter); SetAPState(Adapter, AP_STATE_STOPPED); PlatformZeroMemory(&Adapter->pNdisCommon->dot11DesiredSSIDList, sizeof(DOT11_SSID_LIST)); - - AP_AllPowerSaveReturn(Adapter); - } + + AP_AllPowerSaveReturn(Adapter); + } MgntActSet_AdditionalBeaconIE(Adapter, NULL, 0); MgntActSet_AdditionalProbeRspIE(Adapter, NULL, 0); @@ -92,34 +92,34 @@ N62CAPResetRequest( //if(pDot11ResetRequest->bSetDefaultMIB) // N6InitializeNative80211MIBs(Adapter); - + // - // DDK: The NIC shall clear privacy exemption list on every reset + // DDK: The NIC shall clear privacy exemption list on every reset // regardless of the rest requests parameters. // 2008.10.17, haich // Adapter->pNdisCommon->PrivacyExemptionEntrieNum = 0; }while(FALSE); - + // - // After reset completed, return the status indication. The miniport driver must not set the value + // After reset completed, return the status indication. The miniport driver must not set the value // of the BytesWritten member of the OidRequest parameter, such set operation has been removed by me, 2014.05.02. - // + // PlatformZeroMemory(pDot11StatusIndication, sizeof(DOT11_STATUS_INDICATION)); pDot11StatusIndication->uStatusType = DOT11_STATUS_RESET_CONFIRM; - pDot11StatusIndication->ndisStatus = ndisStatus; + pDot11StatusIndication->ndisStatus = ndisStatus; *BytesRead = sizeof(DOT11_RESET_REQUEST); *BytesWritten = sizeof(DOT11_STATUS_INDICATION); - + // - // Reset network type. + // Reset network type. // pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; pMgntInfo->bResetInProgress = FALSE; - - RT_TRACE( (COMP_OID_QUERY | COMP_OID_SET | COMP_MLME | COMP_AP), DBG_LOUD, + + RT_TRACE( (COMP_OID_QUERY | COMP_OID_SET | COMP_MLME | COMP_AP), DBG_LOUD, ("<===AP mode Query/Set OID_DOT11_RESET_REQUEST: %u\n", ndisStatus)); return ndisStatus; } @@ -150,15 +150,15 @@ N62C_METHOD_OID_PM_GET_PROTOCOL_OFFLOAD( // DbgPrint("OutputBufferLength = %d < sizeof(NDIS_PM_PROTOCOL_OFFLOAD\n", OutputBufferLength); return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PMProtocolOffload.ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter = pAOACReport->ReplayCounterOfEapolKey; PlatformMoveMemory(InformationBuffer, &PMProtocolOffload, sizeof(NDIS_PM_PROTOCOL_OFFLOAD)); - RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, + RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("QUERY/SET OID_PM_GET_PROTOCOL_OFFLOAD: "), InformationBuffer, InputBufferLength ); - - *BytesWritten = sizeof(NDIS_PM_PROTOCOL_OFFLOAD); + + *BytesWritten = sizeof(NDIS_PM_PROTOCOL_OFFLOAD); return ndisStatus; -} +} diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.h index fe94386ed..88cd0a1ed 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_QuerySetOID.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains Port specific defines - + Revision History: When What ---------- ---------------------------------------------- diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.c b/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.c index 13f705ad1..c6a6eceea 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.c @@ -4,7 +4,7 @@ #include "N62C_SetOID.tmh" #endif -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -16,7 +16,7 @@ N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PRT_WLAN_STA pEntry = NULL; - + // OS-given structure PDOT11_INCOMING_ASSOC_DECISION_V2 pIncomAssocDecision = (PDOT11_INCOMING_ASSOC_DECISION_V2) InformationBuffer; @@ -32,21 +32,21 @@ N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) RT_TRACE( COMP_OID_SET, DBG_LOUD, - ("Set OID_DOT11_INCOMING_ASSOCIATION_DECISION: (DOT11_INCOMING_ASSOC_DECISION_V2) Invalid Length %d right length v2 %d right length %d\n", + ("Set OID_DOT11_INCOMING_ASSOCIATION_DECISION: (DOT11_INCOMING_ASSOC_DECISION_V2) Invalid Length %d right length v2 %d right length %d\n", InformationBufferLength, sizeof(DOT11_INCOMING_ASSOC_DECISION_V2), sizeof(DOT11_INCOMING_ASSOC_DECISION))); ndisStatus = NDIS_STATUS_INVALID_LENGTH; if(!GetDefaultAdapter(pTargetAdapter)->bInHctTest) return ndisStatus; } - } + } if (GetAPState(pTargetAdapter) != AP_STATE_STARTED) { ndisStatus = NDIS_STATUS_INVALID_STATE; return ndisStatus; } - + pEntry = AsocEntry_GetEntry(&pTargetAdapter->MgntInfo, pIncomAssocDecision->PeerMacAddr); if(pEntry) @@ -56,9 +56,9 @@ N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( pEntry->OsReasonCode = (u2Byte)pIncomAssocDecision->usReasonCode; } - RT_PRINT_DATA(COMP_MLME|COMP_AP, DBG_LOUD, - "AsocRsp IE from OS:\n", - ((pu1Byte)pIncomAssocDecision)+pIncomAssocDecision->uAssocResponseIEsOffset, + RT_PRINT_DATA(COMP_MLME|COMP_AP, DBG_LOUD, + "AsocRsp IE from OS:\n", + ((pu1Byte)pIncomAssocDecision)+pIncomAssocDecision->uAssocResponseIEsOffset, pIncomAssocDecision->uAssocResponseIEsLength ); @@ -79,15 +79,15 @@ N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( GET_P2P_INFO(pTargetAdapter)->Status = pIncomAssocDecision->WFDStatus; RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("Wifi-Direct: pIncomAssocDecision->WFDStatus: %d\n", pIncomAssocDecision->WFDStatus)); } - + *BytesRead = InformationBufferLength; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION accept %d\n", pIncomAssocDecision->bAccept) ); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_WPS_ENABLED( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -98,7 +98,7 @@ N62C_SET_OID_DOT11_WPS_ENABLED( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // OS-given structure // Output variables (Currently no use) @@ -116,14 +116,14 @@ N62C_SET_OID_DOT11_WPS_ENABLED( } pTargetAdapter->pNdis62Common->bWPSEnable = *((PBOOLEAN)InformationBuffer); - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<===Set AP mode OID_DOT11_WPS_ENABLED: %d\n", pTargetAdapter->pNdis62Common->bWPSEnable)); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_ADDITIONAL_IE( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -134,12 +134,12 @@ N62C_SET_OID_DOT11_ADDITIONAL_IE( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - PVOID newBeaconIeData = NULL; + PVOID newBeaconIeData = NULL; PVOID newResponseIeData = NULL; - + // OS-given structure PDOT11_ADDITIONAL_IE AdditionalIe = (PDOT11_ADDITIONAL_IE)InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -158,25 +158,25 @@ N62C_SET_OID_DOT11_ADDITIONAL_IE( ndisStatus = NDIS_STATUS_INVALID_DATA; return ndisStatus; } - - // + + // // allocate memory for the new IE data and copy the IEs // - MgntActSet_AdditionalBeaconIE(pTargetAdapter, - (pu1Byte)((pu1Byte)AdditionalIe + AdditionalIe->uBeaconIEsOffset), + MgntActSet_AdditionalBeaconIE(pTargetAdapter, + (pu1Byte)((pu1Byte)AdditionalIe + AdditionalIe->uBeaconIEsOffset), AdditionalIe->uBeaconIEsLength); - - MgntActSet_AdditionalProbeRspIE(pTargetAdapter, - (pu1Byte)((pu1Byte)AdditionalIe + AdditionalIe->uResponseIEsOffset), + + MgntActSet_AdditionalProbeRspIE(pTargetAdapter, + (pu1Byte)((pu1Byte)AdditionalIe + AdditionalIe->uResponseIEsOffset), AdditionalIe->uResponseIEsLength); - - RT_TRACE(COMP_OID_SET, DBG_LOUD, + + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set AP mode OID_DOT11_ADDITIONAL_IE: BeaconIELen = %u, ProbeRspIELen = %u.\n", AdditionalIe->uBeaconIEsLength, AdditionalIe->uResponseIEsLength)); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_START_AP_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -189,7 +189,7 @@ N62C_SET_OID_DOT11_START_AP_REQUEST( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; RT_RF_POWER_STATE eRfPowerState; PADAPTER pDefaultAdapter = GetDefaultAdapter(pTargetAdapter); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -213,7 +213,7 @@ N62C_SET_OID_DOT11_START_AP_REQUEST( ndisStatus = NDIS_STATUS_DOT11_POWER_STATE_INVALID; return ndisStatus; } - + ndisStatus=N62CStartApMode(pTargetAdapter); pTargetAdapter->pNdis62Common->CurrentOpState = OP_STATE; @@ -223,7 +223,7 @@ N62C_SET_OID_DOT11_START_AP_REQUEST( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -237,7 +237,7 @@ N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( PDOT11_DISASSOCIATE_PEER_REQUEST pDisassociationRequest = NULL; PRT_WLAN_STA pEntry = NULL; PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -245,7 +245,7 @@ N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( FunctionIn(COMP_OID_SET); pDisassociationRequest = (PDOT11_DISASSOCIATE_PEER_REQUEST)InformationBuffer; - + if (!MP_VERIFY_NDIS_OBJECT_HEADER_DEFAULT( pDisassociationRequest->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -278,8 +278,8 @@ N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( if(MacAddr_isBcst(pDisassociationRequest->PeerMacAddr)) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Disassociate all peers.\n")); - - AP_DisassociateAllStation(pTargetAdapter, unspec_reason); + + AP_DisassociateAllStation(pTargetAdapter, unspec_reason); AsocEntry_ResetAll(pTargetAdapter); } else @@ -296,21 +296,21 @@ N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( // If an STA is disassociated because of this OID, it shall not be reported when // OID_DOT11_ENUM_PEER_INFO is requested. // In the sample code, deauth is sent and the STA entry is removed. - // We remove the STA entry so that it won't be reported when OID_DOT11_ENUM_PEER_INFO + // We remove the STA entry so that it won't be reported when OID_DOT11_ENUM_PEER_INFO // is requested. // RT_TRACE_F(COMP_AP, DBG_TRACE, ("AsocEntry_RemoveStation\n")); - + AsocEntry_RemoveStation(pTargetAdapter, pDisassociationRequest->PeerMacAddr); } } - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set AP mode OID_DOT11_DISASSOCIATE_PEER_REQUEST:\n")); + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set AP mode OID_DOT11_DISASSOCIATE_PEER_REQUEST:\n")); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_ASSOCIATION_PARAMS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -322,13 +322,13 @@ N62C_SET_OID_DOT11_ASSOCIATION_PARAMS( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PDOT11_ASSOCIATION_PARAMS pAssocParams = (PDOT11_ASSOCIATION_PARAMS)InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; FunctionIn(COMP_OID_SET); - + if (!MP_VERIFY_NDIS_OBJECT_HEADER_DEFAULT( pAssocParams->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -340,24 +340,24 @@ N62C_SET_OID_DOT11_ASSOCIATION_PARAMS( ndisStatus = NDIS_STATUS_INVALID_DATA; return ndisStatus; } - - // + + // // allocate memory for the new IE data and copy the IEs // - MgntActSet_AdditionalAssocReqIE(pTargetAdapter, - (pu1Byte)((pu1Byte)pAssocParams + pAssocParams->uAssocRequestIEsOffset), + MgntActSet_AdditionalAssocReqIE(pTargetAdapter, + (pu1Byte)((pu1Byte)pAssocParams + pAssocParams->uAssocRequestIEsOffset), pAssocParams->uAssocRequestIEsLength ); - //RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, "AssocReqIE", + //RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, "AssocReqIE", // (pu1Byte)((pu1Byte)pAssocParams + pAssocParams->uAssocRequestIEsOffset), pAssocParams->uAssocRequestIEsLength); - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_DOT11_ASSOCIATION_PARAMS.\n")); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_ADD_WOL_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -376,7 +376,7 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PRT_PM_WOL_PATTERN_INFO pPmWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -392,17 +392,17 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( { if(WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskSize <= MAX_WOL_BIT_MASK_SIZE) { - PlatformMoveMemory(WoLBitMapPatternMask, (pu1Byte)InformationBuffer+WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskOffset, WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskSize); - RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: WoLBitMapPatternMask...\n"), + PlatformMoveMemory(WoLBitMapPatternMask, (pu1Byte)InformationBuffer+WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskOffset, WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskSize); + RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: WoLBitMapPatternMask...\n"), WoLBitMapPatternMask, sizeof(WoLBitMapPatternMask)); - } + } if(WOLPatternStructure.WoLPattern.WoLBitMapPattern.PatternSize <= MAX_WOL_PATTERN_SIZE) { PlatformMoveMemory(WoLBitMapPatternContent, (pu1Byte)InformationBuffer+WOLPatternStructure.WoLPattern.WoLBitMapPattern.PatternOffset, WOLPatternStructure.WoLPattern.WoLBitMapPattern.PatternSize); - RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: WoLBitMapPatternContent...\n"), + RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: WoLBitMapPatternContent...\n"), WoLBitMapPatternContent, sizeof(WoLBitMapPatternContent)); } - + //Find the index of the first empty entry. for(Index=0; Index= MAX_SUPPORT_WOL_PATTERN_NUM(pTargetAdapter)) { ndisStatus = NDIS_STATUS_RESOURCES; RT_TRACE(COMP_POWER, DBG_LOUD, - ("SET OID_PNP_ADD_WOL_PATTERN: Return status(%#X). The number of wake up pattern is more than %d or the pattern Id is exist.\n", + ("SET OID_PNP_ADD_WOL_PATTERN: Return status(%#X). The number of wake up pattern is more than %d or the pattern Id is exist.\n", ndisStatus, MAX_SUPPORT_WOL_PATTERN_NUM(pTargetAdapter))); return ndisStatus; } @@ -440,9 +440,9 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( //Skip IPv4/IPv6 TCP SYN pattern because it will hit HW bug for the CRC. // We offload this pattern to FW. pPmWoLPatternInfo[Index].PatternType = eUnicastPattern; - RT_TRACE(COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("OID_PM_ADD_WOL_PATTERN: IPv4/IPv6 TCP SYN pattern.\n")); - + } else if(PlatformCompareMemory(WoLBitMapPatternContent, MULTICAST_ADDR, sizeof(MULTICAST_ADDR)) == 0) { //Multicast @@ -457,12 +457,12 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( pPmWoLPatternInfo[Index].PatternType = eDontCareDA; } //DbgPrint("PatternType = %d\n", pPmWoLPatternInfo[Index].PatternType); - + { - GetWOLWakeUpPattern(pTargetAdapter, - (pu1Byte)&WoLBitMapPatternMask, - WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskSize, - (pu1Byte)&WoLBitMapPatternContent, + GetWOLWakeUpPattern(pTargetAdapter, + (pu1Byte)&WoLBitMapPatternMask, + WOLPatternStructure.WoLPattern.WoLBitMapPattern.MaskSize, + (pu1Byte)&WoLBitMapPatternContent, WOLPatternStructure.WoLPattern.WoLBitMapPattern.PatternSize, (u1Byte)Index, FALSE @@ -475,7 +475,7 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( else if(WOLPatternStructure.WoLPacketType == NdisPMWoLPacketEapolRequestIdMessage) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: Support EapolRequestIdMessage.\n")); - + if(!pPSC->EapolRequestIdMessagePatternId) { pPSC->EapolRequestIdMessagePatternId = WOLPatternStructure.PatternId; @@ -490,19 +490,19 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( { pPSC->MagicPacketPatternId = WOLPatternStructure.PatternId; pPSC->WoLPktNoPtnNum++; - + // OS adds magic packet pattern to present that the user picks up the check box "Allow // this device to wake the computer", so we could according to the pattern to support // some patch functions, ex. Enable PME_En before S5. // 2013.06.28. by tynli. //pPSC->bSupportWakeUp = TRUE; } - + } else if(WOLPatternStructure.WoLPacketType == NdisPMWoLPacketIPv4TcpSyn) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: Support IPv4 TCP SYN.\n")); - + if(!pPSC->IPv4TcpSynPatternId) { pPSC->IPv4TcpSynPatternId = WOLPatternStructure.PatternId; @@ -512,7 +512,7 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( else if(WOLPatternStructure.WoLPacketType == NdisPMWoLPacketIPv6TcpSyn) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: Support IPv6 TCP SYN.\n")); - + if(!pPSC->IPv6TcpSynPatternId) { pPSC->IPv6TcpSynPatternId = WOLPatternStructure.PatternId; @@ -523,15 +523,15 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: Unspecified type(%#X).\n", WOLPatternStructure.WoLPacketType)); } - - RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: \n"), + + RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: \n"), InformationBuffer, InformationBufferLength ); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_REMOVE_WOL_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -547,47 +547,47 @@ N62C_SET_OID_PM_REMOVE_WOL_PATTERN( PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PRT_PM_WOL_PATTERN_INFO pPmWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; FunctionIn(COMP_OID_SET); - + if(RemovePatternId == pPSC->EapolRequestIdMessagePatternId) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove EapolRequestIdMessage.\n")); - + pPSC->EapolRequestIdMessagePatternId = 0; pPSC->WoLPktNoPtnNum--; } else if(RemovePatternId == pPSC->MagicPacketPatternId) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove MagicPacket.\n")); - + pPSC->MagicPacketPatternId = 0; pPSC->WoLPktNoPtnNum--; - + // Clear PME enable support because OS removes it. //pPSC->bSupportWakeUp = FALSE; - + //RT_TRACE_F(COMP_POWER, DBG_LOUD, ("Do not allow PME_En by the upper layer!\n")); } else if(RemovePatternId == pPSC->IPv4TcpSynPatternId) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove IPv4TcpSyn.\n")); - + pPSC->IPv4TcpSynPatternId = 0; pPSC->WoLPktNoPtnNum--; } else if(RemovePatternId == pPSC->IPv6TcpSynPatternId) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove IPv6TcpSyn.\n")); - + pPSC->IPv6TcpSynPatternId = 0; pPSC->WoLPktNoPtnNum--; } - + for(Index=0; IndexWoLPatternNum--; - - pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); - pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); + + pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); + pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); pPmWoLPatternInfo[Index].HwWFMIndex = 0xff; // reset the value after clear HW/CAM entry. } - //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("SET OID_PM_REMOVE_WOL_PATTERN: "), + //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("SET OID_PM_REMOVE_WOL_PATTERN: "), //InformationBuffer, InformationBufferLength ); if(pPSC->WoLPktNoPtnNum + pPSC->WoLPatternNum) @@ -626,7 +626,7 @@ N62C_SET_OID_PM_REMOVE_WOL_PATTERN( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_PARAMETERS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -641,17 +641,17 @@ N62C_SET_OID_PM_PARAMETERS( PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); BOOLEAN bSupportARPOffload=FALSE, bSupportGTKOffload=FALSE; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; FunctionIn(COMP_OID_SET); - - RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_PARAMETERS: "), + + RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_PARAMETERS: "), InformationBuffer, InformationBufferLength ); - - + + if(pPMParameters->EnabledProtocolOffloads & NDIS_PM_PROTOCOL_OFFLOAD_ARP_ENABLED) { bSupportARPOffload = TRUE; @@ -661,8 +661,8 @@ N62C_SET_OID_PM_PARAMETERS( } else { - // We should not disable ARPOffloadEable flag besides HCT test, because we need to support - // ARP offload in RealWoW. Our service will set ARP info to driver instead of NDIS OID, so + // We should not disable ARPOffloadEable flag besides HCT test, because we need to support + // ARP offload in RealWoW. Our service will set ARP info to driver instead of NDIS OID, so // we do not accord to NIDS OID to decide whether we support ARP offload. 2013.10.08. by tynli. if(pTargetAdapter->bInHctTest) pPSC->ARPOffloadEnable = FALSE; @@ -677,8 +677,8 @@ N62C_SET_OID_PM_PARAMETERS( } else { - // We should not disable ARPOffloadEable flag besides HCT test, because we need to support - // ARP offload in RealWoW. Our service will set ARP info to driver instead of NDIS OID, so + // We should not disable ARPOffloadEable flag besides HCT test, because we need to support + // ARP offload in RealWoW. Our service will set ARP info to driver instead of NDIS OID, so // we do not accord to NIDS OID to decide whether we support ARP offload. 2013.10.08. by tynli. if(pTargetAdapter->bInHctTest) pPSC->NSOffloadEnable = FALSE; @@ -693,9 +693,9 @@ N62C_SET_OID_PM_PARAMETERS( } else { - // We should not disable GTKOffloadEable flag besides HCT test, because we need to support + // We should not disable GTKOffloadEable flag besides HCT test, because we need to support // GTK offload in RealWoW and S5 wake up. We do not accord to NIDS OID to decide whether - // we support GTK offload. 2013.10.08. by tynli. + // we support GTK offload. 2013.10.08. by tynli. if(pTargetAdapter->bInHctTest) pPSC->GTKOffloadEnable = FALSE; } @@ -717,18 +717,18 @@ N62C_SET_OID_PM_PARAMETERS( else { pPSC->bOSSupportProtocolOffload = TRUE; - } + } pPSC->bSetPMParameters = TRUE; - + *BytesRead = InformationBufferLength; - //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("SET OID_PM_PARAMETERS: pPMParameters "), + //RT_PRINT_DATA( (COMP_OID_QUERY|COMP_AP), DBG_LOUD, ("SET OID_PM_PARAMETERS: pPMParameters "), //pPMParameters->EnabledProtocolOffloads , sizeof(NDIS_PM_PARAMETERS) ); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -750,11 +750,11 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( *BytesNeeded = 0; FunctionIn(COMP_OID_SET); - + PlatformZeroMemory(&PmPO, sizeof(RT_PM_PROTOCOL_OFFLOAD)); //DbgPrint("pPMProtocolOffload->ProtocolOffloadType = 0x%x\n", pPMProtocolOffload->ProtocolOffloadType); - //DbgPrint("pPMProtocolOffload->ProtocolOffloadId = 0x%x\n", pPMProtocolOffload->ProtocolOffloadId); + //DbgPrint("pPMProtocolOffload->ProtocolOffloadId = 0x%x\n", pPMProtocolOffload->ProtocolOffloadId); // Grab the information from Informationbuffer. do{ @@ -763,36 +763,36 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( if(pPMProtocolOffload->ProtocolOffloadType == NdisPMProtocolOffload80211RSNRekey) { pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eGTKOffloadIdx] = pPMProtocolOffload->ProtocolOffloadId; - + //Copy kck, kek - PlatformMoveMemory(&PmPO, (pu1Byte)InformationBuffer+mPOoffset, 36); - PmPO.ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter = + PlatformMoveMemory(&PmPO, (pu1Byte)InformationBuffer+mPOoffset, 36); + PmPO.ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter = pPMProtocolOffload->ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter; - PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara), (pu1Byte)&PmPO, sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS)); + PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara), (pu1Byte)&PmPO, sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS)); } else if(pPMProtocolOffload->ProtocolOffloadType == NdisPMProtocolOffloadIdIPv4ARP) { pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eARPOffloadIdx] = pPMProtocolOffload->ProtocolOffloadId; - - PlatformMoveMemory(&PmPO, (pu1Byte)InformationBuffer+mPOoffset, sizeof(PmPO.ProtocolOffloadParameters.IPv4ARPParameters)); - - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv4Address:\n"), + + PlatformMoveMemory(&PmPO, (pu1Byte)InformationBuffer+mPOoffset, sizeof(PmPO.ProtocolOffloadParameters.IPv4ARPParameters)); + + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv4Address:\n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv4ARPParameters.RemoteIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv4Address:\n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv4Address:\n"), PmPO.ProtocolOffloadParameters.IPv4ARPParameters.RemoteIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM HostIPv4Address:\n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM HostIPv4Address:\n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv4ARPParameters.HostIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("HostIPv4Address:\n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("HostIPv4Address:\n"), PmPO.ProtocolOffloadParameters.IPv4ARPParameters.HostIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress:\n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress:\n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv4ARPParameters.MacAddress, 6); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress:\n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress:\n"), PmPO.ProtocolOffloadParameters.IPv4ARPParameters.MacAddress, 6); - PlatformMoveMemory(&(pMgntInfo->PMIPV4ARPPara), &PmPO, sizeof(RT_PM_IPV4_ARP_PARAMETERS)); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("==> HostIPv4Address:\n"), + PlatformMoveMemory(&(pMgntInfo->PMIPV4ARPPara), &PmPO, sizeof(RT_PM_IPV4_ARP_PARAMETERS)); + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("==> HostIPv4Address:\n"), pMgntInfo->PMIPV4ARPPara.HostIPv4Address, 4); } else if(pPMProtocolOffload->ProtocolOffloadType == NdisPMProtocolOffloadIdIPv6NS) @@ -819,29 +819,29 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( IPv6NSIndex = 1; RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==> eNSOffloadIdx2: \n")); } - + pMgntInfo->PMIPV6NSPara[IPv6NSIndex].Flags = pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.Flags; - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].RemoteIPv6Address, + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].RemoteIPv6Address, pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.RemoteIPv6Address, 16); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].SolicitedNodeIPv6Address, + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].SolicitedNodeIPv6Address, pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.SolicitedNodeIPv6Address, 16); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].MacAddress, + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].MacAddress, pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.MacAddress, 6); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[0], + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[0], pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[0], 16); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[1], + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[1], pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[1], 16); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv6Address: \n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv6Address: \n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.RemoteIPv6Address ,16); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM SolicitedNodeIPv6Address: \n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM SolicitedNodeIPv6Address: \n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.SolicitedNodeIPv6Address ,16); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: \n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: \n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.MacAddress ,6); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[0]: \n"), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[0]: \n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[0] ,16); - - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[1]: \n"), + + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[1]: \n"), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[1] ,16); } } @@ -852,18 +852,18 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( bNextPMEntryExit = TRUE; // Point to Next Entry !! pPMProtocolOffload = (PNDIS_PM_PROTOCOL_OFFLOAD)((pu1Byte)InformationBuffer + pPMProtocolOffload->NextProtocolOffloadOffset); - + } - + }while(bNextPMEntryExit); - - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD: \n"), + + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD: \n"), InformationBuffer, InformationBufferLength ); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -877,7 +877,7 @@ N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; u4Byte ProtocolOffloadId = 0, MatchId=0; BOOLEAN bMatch=FALSE; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -898,14 +898,14 @@ N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( { if(MatchId == eGTKOffloadIdx) { - PlatformZeroMemory(&(pMgntInfo->PMDot11RSNRekeyPara), sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS)); + PlatformZeroMemory(&(pMgntInfo->PMDot11RSNRekeyPara), sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS)); } else if(MatchId == eARPOffloadIdx) { - PlatformZeroMemory(&(pMgntInfo->PMIPV4ARPPara), sizeof(RT_PM_IPV4_ARP_PARAMETERS)); + PlatformZeroMemory(&(pMgntInfo->PMIPV4ARPPara), sizeof(RT_PM_IPV4_ARP_PARAMETERS)); } else if(MatchId == eNSOffloadIdx1 ) - { + { // Disable eNSOffloadIdx1 , set ID = 0 !! pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx1] = 0; RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==>REMOVE eNSOffloadIdx1: \n")); @@ -925,7 +925,7 @@ N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -946,12 +946,12 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( *BytesNeeded = 0; FunctionIn(COMP_OID_SET); - + PlatformZeroMemory(&PmPO, sizeof(RT_PM_PROTOCOL_OFFLOAD)); //DbgPrint("pPMProtocolOffload->ProtocolOffloadType = 0x%x\n", pPMProtocolOffload->ProtocolOffloadType); - //DbgPrint("pPMProtocolOffload->ProtocolOffloadId = 0x%x\n", pPMProtocolOffload->ProtocolOffloadId); - RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, ("SET N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD: "), + //DbgPrint("pPMProtocolOffload->ProtocolOffloadId = 0x%x\n", pPMProtocolOffload->ProtocolOffloadId); + RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, ("SET N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD: "), InformationBuffer, InformationBufferLength ); // Grab the information from Informationbuffer. @@ -961,36 +961,36 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( if(pPMProtocolOffload->ProtocolOffloadType == NdisPMProtocolOffload80211RSNRekey) { pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eGTKOffloadIdx] = pPMProtocolOffload->ProtocolOffloadId; - + //Copy kck, kek - PlatformMoveMemory(&PmPO, (pu1Byte)pPMProtocolOffload+NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1, 36); - PmPO.ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter = + PlatformMoveMemory(&PmPO, (pu1Byte)pPMProtocolOffload+NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1, 36); + PmPO.ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter = pPMProtocolOffload->ProtocolOffloadParameters.Dot11RSNRekeyParameters.KeyReplayCounter; - PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara), (pu1Byte)&PmPO, sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS)); + PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara), (pu1Byte)&PmPO, sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS)); } else if(pPMProtocolOffload->ProtocolOffloadType == NdisPMProtocolOffloadIdIPv4ARP) { pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eARPOffloadIdx] = pPMProtocolOffload->ProtocolOffloadId; - - PlatformMoveMemory(&PmPO, (pu1Byte)pPMProtocolOffload+NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1, sizeof(PmPO.ProtocolOffloadParameters.IPv4ARPParameters)); - - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv4Address: "), + + PlatformMoveMemory(&PmPO, (pu1Byte)pPMProtocolOffload+NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1, sizeof(PmPO.ProtocolOffloadParameters.IPv4ARPParameters)); + + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv4Address: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv4ARPParameters.RemoteIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv4Address: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv4Address: "), PmPO.ProtocolOffloadParameters.IPv4ARPParameters.RemoteIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM HostIPv4Address: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM HostIPv4Address: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv4ARPParameters.HostIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("HostIPv4Address: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("HostIPv4Address: "), PmPO.ProtocolOffloadParameters.IPv4ARPParameters.HostIPv4Address, 4); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv4ARPParameters.MacAddress, 6); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress: "), PmPO.ProtocolOffloadParameters.IPv4ARPParameters.MacAddress, 6); - PlatformMoveMemory(&(pMgntInfo->PMIPV4ARPPara), &PmPO, sizeof(RT_PM_IPV4_ARP_PARAMETERS)); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("==> HostIPv4Address: "), + PlatformMoveMemory(&(pMgntInfo->PMIPV4ARPPara), &PmPO, sizeof(RT_PM_IPV4_ARP_PARAMETERS)); + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("==> HostIPv4Address: "), pMgntInfo->PMIPV4ARPPara.HostIPv4Address, 4); } else if(pPMProtocolOffload->ProtocolOffloadType == NdisPMProtocolOffloadIdIPv6NS) @@ -1009,63 +1009,63 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( pMgntInfo->PMIPV6NSPara[IPv6NSIndex].Flags = pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.Flags; - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].RemoteIPv6Address, + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].RemoteIPv6Address, pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.RemoteIPv6Address, 16); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].SolicitedNodeIPv6Address, + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].SolicitedNodeIPv6Address, pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.SolicitedNodeIPv6Address, 16); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].MacAddress, + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].MacAddress, pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.MacAddress, 6); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[0], + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[0], pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[0], 16); - PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[1], + PlatformMoveMemory(pMgntInfo->PMIPV6NSPara[IPv6NSIndex].TargetIPv6Addresses[1], pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[1], 16); - + //PlatformMoveMemory(&PmPO, (pu1Byte)pPMProtocolOffload+NDIS_SIZEOF_NDIS_PM_PROTOCOL_OFFLOAD_REVISION_1, sizeof(PmPO.ProtocolOffloadParameters.IPv6NSParameters)); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv6Address: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv6Address: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.RemoteIPv6Address ,16); - //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv6Address: "), + //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv6Address: "), // PmPO.ProtocolOffloadParameters.IPv6NSParameters.RemoteIPv6Address ,16); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM SolicitedNodeIPv6Address: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM SolicitedNodeIPv6Address: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.SolicitedNodeIPv6Address ,16); - //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SolicitedNodeIPv6Address: "), + //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SolicitedNodeIPv6Address: "), // PmPO.ProtocolOffloadParameters.IPv6NSParameters.SolicitedNodeIPv6Address ,16); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.MacAddress ,6); - //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress: "), + //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress: "), // PmPO.ProtocolOffloadParameters.IPv6NSParameters.MacAddress ,6); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[0]: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[0]: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[0] ,16); - //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("TargetIPv6Addresses[0]: "), + //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("TargetIPv6Addresses[0]: "), // PmPO.ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[0] ,16); - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[1]: "), + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[1]: "), pPMProtocolOffload->ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[1] ,16); - //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("TargetIPv6Addresses[1]: "), + //RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("TargetIPv6Addresses[1]: "), // PmPO.ProtocolOffloadParameters.IPv6NSParameters.TargetIPv6Addresses[1] ,16); - + //PlatformMoveMemory(&(pMgntInfo->PMIPV6NSPara[IPv6NSIndex]), &PmPO, sizeof(RT_PM_IPV6_NS_PARAMETERS) ); - + } // Check Next entry !! - + if(pPMProtocolOffload->NextProtocolOffloadOffset != 0) { bNextPMEntryExit = TRUE; // Point to Next Entry !! pPMProtocolOffload = (PNDIS_PM_PROTOCOL_OFFLOAD)((pu1Byte)InformationBuffer + pPMProtocolOffload->NextProtocolOffloadOffset); - + } - + }while(bNextPMEntryExit); - - RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD: "), + + RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD: "), InformationBuffer, InformationBufferLength ); return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -1093,9 +1093,9 @@ N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( ndisStatus = NDIS_STATUS_INVALID_LENGTH; return ndisStatus; } - + Removeid = pFilterClear->FilterId; - + for(CurrIndex = 0 ; CurrIndex < 10 ; CurrIndex++) { pCurrRTCoPa = &(pMgntInfo->mRtD0ColesFilterInfo.dFilterArry[CurrIndex]); @@ -1106,7 +1106,7 @@ N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( RT_TRACE(COMP_POWER, DBG_LOUD, ("====>Remove Currindex (%d)\n",CurrIndex)); break; } - + } if( CurrIndex == 10 ) @@ -1118,7 +1118,7 @@ N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -1128,7 +1128,7 @@ N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( IN ULONG MethodId, OUT PULONG BytesWritten, OUT PULONG BytesRead, - OUT PULONG BytesNeeded + OUT PULONG BytesNeeded ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; @@ -1159,7 +1159,7 @@ N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( ndisStatus = NDIS_STATUS_INVALID_LENGTH; return ndisStatus; } - + #if (NDIS_SUPPORT_NDIS630) // Check filter type !! if(pRxFilterPara->FilterType != NdisReceiveFilterTypePacketCoalescing) @@ -1176,7 +1176,7 @@ N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( ndisStatus = NDIS_STATUS_INVALID_PARAMETER; return ndisStatus; } - + // Get Free Entry of FILTER_PARAMETER for(Currindex = 0 ; Currindex < 10 ; Currindex++) @@ -1208,18 +1208,18 @@ N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( RT_PRINT_DATA(COMP_POWER, DBG_LOUD, "===> N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER :\n ", InformationBuffer, InputBufferLength); - // Save Filed + // Save Filed Currindex = 0; while( Currindex < pCurrRTCoPa->NumOfElem ) { // Get entry !! pRxFilterFieldPara = (PNDIS_RECEIVE_FILTER_FIELD_PARAMETERS)(pFieldParametersArray + (FieldElementSize*Currindex)); pCurrRTCoField = &(pCurrRTCoPa->dFieldArry[Currindex]); - + // Save data PlatformMoveMemory(pCurrRTCoField, pRxFilterFieldPara, FieldElementSize); /* - // For Dbg show message !! + // For Dbg show message !! RT_TRACE(COMP_POWER, DBG_LOUD, ("====>Filed Currindex (%d)\n",Currindex)); if( pRxFilterFieldPara->FrameHeader == NdisFrameHeaderArp) { @@ -1238,7 +1238,7 @@ N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( */ Currindex++; } - + pMgntInfo->mRtD0ColesFilterInfo.bEnable = TRUE; return ndisStatus; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.h index b28db43ad..9926a1f81 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_SetOID.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains Port specific defines - + Revision History: When What ---------- ---------------------------------------------- @@ -22,7 +22,7 @@ Revision History: #ifndef _N62_SETOID__H #define _N62_SETOID__H -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -32,7 +32,7 @@ N62C_SET_OID_DOT11_INCOMING_ASSOCIATION_DECISION( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_WPS_ENABLED( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -42,7 +42,7 @@ N62C_SET_OID_DOT11_WPS_ENABLED( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_ADDITIONAL_IE( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -52,7 +52,7 @@ N62C_SET_OID_DOT11_ADDITIONAL_IE( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_START_AP_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -62,7 +62,7 @@ N62C_SET_OID_DOT11_START_AP_REQUEST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -72,7 +72,7 @@ N62C_SET_OID_DOT11_DISASSOCIATE_PEER_REQUEST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_DOT11_ASSOCIATION_PARAMS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -82,7 +82,7 @@ N62C_SET_OID_DOT11_ASSOCIATION_PARAMS( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_ADD_WOL_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -92,7 +92,7 @@ N62C_SET_OID_PM_ADD_WOL_PATTERN( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_REMOVE_WOL_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -102,7 +102,7 @@ N62C_SET_OID_PM_REMOVE_WOL_PATTERN( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_PARAMETERS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -112,7 +112,7 @@ N62C_SET_OID_PM_PARAMETERS( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -122,7 +122,7 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -132,7 +132,7 @@ N62C_SET_OID_PM_REMOVE_PROTOCOL_OFFLOAD( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -142,7 +142,7 @@ N62C_SET_OID_PM_ADD_PROTOCOL_OFFLOAD_LIST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -152,7 +152,7 @@ N62C_SET_OID_RECEIVE_FILTER_CLEAR_FILTER( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -162,7 +162,7 @@ N62C_QUERYSET_OID_RECEIVE_FILTER_SET_FILTER( IN ULONG MethodId, OUT PULONG BytesWritten, OUT PULONG BytesRead, - OUT PULONG BytesNeeded + OUT PULONG BytesNeeded ); #endif //_N62_SETOID__H diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N62C_def.h b/network/wlan/WDI/PLATFORM/NDIS6/N62C_def.h index 4aa9dad9f..7f6926fd4 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N62C_def.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N62C_def.h @@ -7,7 +7,7 @@ Module Name: Abstract: Contains Port specific defines - + Revision History: When What ---------- ---------------------------------------------- @@ -22,7 +22,7 @@ Revision History: #ifndef _N62_DEF__H #define _N62_DEF__H -/** +/** * Gets access to the MP_EXTSTA_PORT from the MP_PORT */ #define IS_ALLOCATED_PORT_NUMBER(_PortNumber) (_PortNumber != DEFAULT_NDIS_PORT_NUMBER && _PortNumber != HELPER_PORT_PORT_NUMBER) @@ -31,7 +31,7 @@ Revision History: // -// (Ported from MS's code, Maddest, 2008-06-13.) +// (Ported from MS's code, Maddest, 2008-06-13.) // Macros for assigning and verifying NDIS_OBJECT_HEADER // #define MP_VERIFY_NDIS_OBJECT_HEADER_DEFAULT(_header, _type, _revision, _size) \ @@ -59,115 +59,115 @@ typedef enum _MP_PORT_TYPE } MP_PORT_TYPE, *PMP_PORT_TYPE; -/** +/** * Keeps tracks of the current state of association attempt by the driver. Note * the some states are set just before we start an action to avoid timing windows. */ typedef enum _STA_ASSOC_STATE { - /** - * Start state when we are not associated and have not started association process + /** + * Start state when we are not associated and have not started association process */ ASSOC_STATE_NOT_ASSOCIATED = 0, - - /** + + /** * When set we are ready to start the association process and are either - * about to start the association or have failed a previous association and + * about to start the association or have failed a previous association and * would be restarting the association. Roaming and connect request code * are synchronized after this state. */ ASSOC_STATE_READY_TO_ASSOCIATE, - /** + /** * Have started the association process. This is set just after we have selected * an access point to start the association attempt. This would only be set for * the duration of the association process */ ASSOC_STATE_STARTED_ASSOCIATION, - - /** - * Have asked the hardware functions to synchronize with the access point + + /** + * Have asked the hardware functions to synchronize with the access point * and are waiting for hardware functions to return - */ + */ ASSOC_STATE_WAITING_FOR_JOIN, - + /** * Hardware functions have returned after successful synchronization * with the access point */ ASSOC_STATE_JOINED, - - /** - * Special state set when we get deauthenticate packet from + + /** + * Special state set when we get deauthenticate packet from * the access point while we still havent completed association. This is - * not set on normal code path. It is used to ensure that we dont + * not set on normal code path. It is used to ensure that we dont * complete the association successfully even if we received a * deauth packet from the access point */ ASSOC_STATE_REMOTELY_DEAUTHENTICATED, - - /** + + /** * We are waiting for an authentication packet from the accesspoint. * Currently driver only uses open authentication or shared key authentication * so this is set when we are waiting for packet with sequence number 2 or 4 */ ASSOC_STATE_WAITING_FOR_AUTHENTICATE, - /** + /** * Received successful authentication response from the access point */ ASSOC_STATE_RECEIVED_AUTHENTICATE, - - /** - * Special state set when we get disassociate request from + + /** + * Special state set when we get disassociate request from * the access point while we still havent completed association. This * is again not set on normal code paths. It is used to ensure that * we dont complete the association successfully even if we received * a disassociate packet from the access point */ ASSOC_STATE_REMOTELY_DISASSOCIATED, - - /** + + /** * Waiting for Association response from the access point */ ASSOC_STATE_WAITING_FOR_ASSOCIATE, - - /** - * Received successful association response from the access point + + /** + * Received successful association response from the access point */ ASSOC_STATE_RECEIVED_ASSOCIATE, - - /** + + /** * Associated process completed successfully & status indicated. After this * is set, any disassociate/deauthenticate packet from the accesspoint * would case disassociation status indication */ ASSOC_STATE_ASSOCIATED - + } STA_ASSOC_STATE, *PSTA_ASSOC_STATE ; -/** - * State of the connection attempt as per the operating system. This is +/** + * State of the connection attempt as per the operating system. This is * used to keep track of what the operating system is expecting the driver * to do with regards to connection to an 802.11 network */ typedef enum _STA_CONNECT_STATE{ - /** + /** * Disconnected: Driver should not attempt to associate and if associated * should disconnect cleanly. This is set on receiving DISCONNECT OID and the * driver terminates any existing connection. */ CONN_STATE_DISCONNECTED, - /** - * In reset. Operating system is reseting the adapter (either by OID or + /** + * In reset. Operating system is reseting the adapter (either by OID or * NdisReset) or halting the adapter, etc. The driver waits - * for on going connection to complete and then resets back to + * for on going connection to complete and then resets back to * disconnected state */ CONN_STATE_IN_RESET, - /** + /** * Okay to connect. The operating system expects the driver to start connecting. The * driver would attempt to find and associate with candidate access point. This * is set on receiving CONNECT OID and is maintained until we have made a connection @@ -175,13 +175,13 @@ typedef enum _STA_CONNECT_STATE{ */ CONN_STATE_READY_TO_CONNECT, - /** + /** * Okay to roam. The operating system expects the driver to stay connected a * and if connection is lost for some reason, to roam to a new access point. * In this state, any connection attempt is because we want to roam */ CONN_STATE_READY_TO_ROAM - + } STA_CONNECT_STATE, *PSTA_CONNECT_STATE; // diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.c b/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.c index 263648b9e..1d29c9f9f 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.c @@ -51,9 +51,9 @@ n63c_SendP2pActionFrameComplete( OFF_CHNL_TX_STATUS_FLAG txStatusFlag; NDIS_STATUS status = NDIS_STATUS_SUCCESS; FRAME_BUF *buf = OffChnlTx_GetTxFrameBuf(ctx->req); - + FunctionIn(COMP_OID_SET); - + txStatusFlag = OffChnlTx_GetTxStatusFlag(ctx->req); status = (TEST_FLAG(txStatusFlag.perTxAttemptFlag, OFF_CHNL_TX_PER_TX_ATTEMPT_FLAG_FRAME_SENT) ? NDIS_STATUS_SUCCESS : NDIS_STATUS_FAILURE); @@ -61,12 +61,12 @@ n63c_SendP2pActionFrameComplete( RT_ASSERT(buf, ("%s(): buf is NULL!!!n", __FUNCTION__)); RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("indicate frame sent with token: %u\n", ctx->token)); - + // Change dialog token to make sure the token is the same as the previous query. - p2p_IndicateActionFrameSendCompleteWithToken(info, - ctx->compEvent, - (NDIS_STATUS_SUCCESS == status) ? RT_STATUS_SUCCESS : RT_STATUS_FAILURE, - FrameBuf_MHead(buf), + p2p_IndicateActionFrameSendCompleteWithToken(info, + ctx->compEvent, + (NDIS_STATUS_SUCCESS == status) ? RT_STATUS_SUCCESS : RT_STATUS_FAILURE, + FrameBuf_MHead(buf), FrameBuf_Length(buf), ctx->token); @@ -88,7 +88,7 @@ n63c_Construct_FakeInvitationRsp( OCTET_STRING osWFDIE, osProbeRspPkt; FunctionIn(COMP_OID_SET); - + // MAC Header p2p_add_ActionFrameMacHdr(fbuf, info->DeviceAddress, dev->mac, info->DeviceAddress); @@ -101,11 +101,11 @@ n63c_Construct_FakeInvitationRsp( // WFD IE, from probe rsp if(dev->rxFrames[P2P_FID_PROBE_RSP] && dev->rxFrames[P2P_FID_PROBE_RSP]->frameLen) { - FillOctetString(osProbeRspPkt, - dev->rxFrames[P2P_FID_PROBE_RSP]->frame, + FillOctetString(osProbeRspPkt, + dev->rxFrames[P2P_FID_PROBE_RSP]->frame, dev->rxFrames[P2P_FID_PROBE_RSP]->frameLen ); - + osWFDIE = PacketGetElement(osProbeRspPkt, EID_Vendor, OUI_SUB_WIFI_DISPLAY, OUI_SUB_DONT_CARE); if(osWFDIE.Length > 0) @@ -117,13 +117,13 @@ n63c_Construct_FakeInvitationRsp( RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("a fake invitation rsp constructed\n")); FrameBuf_Dump(fbuf, 0, DBG_LOUD, __FUNCTION__); - N6CWriteEventLogEntry(pAdapter, NDIS_STATUS_SUCCESS, - FrameBuf_Length(fbuf), FrameBuf_MHead(fbuf), + N6CWriteEventLogEntry(pAdapter, NDIS_STATUS_SUCCESS, + FrameBuf_Length(fbuf), FrameBuf_MHead(fbuf), L"A fake invitation rsp constructed" ); FunctionOut(COMP_OID_SET); - + return TRUE; } @@ -138,13 +138,13 @@ n63c_Construct_FakePdRsp( { P2P_INFO *info = GET_P2P_INFO(pAdapter); OCTET_STRING osPdReq, osTmpIe; - + FunctionIn(COMP_OID_SET); if(dev->txFrames[P2P_FID_PD_REQ] && dev->txFrames[P2P_FID_PD_REQ]->frameLen) { - FillOctetString(osPdReq, - dev->txFrames[P2P_FID_PD_REQ]->frame, + FillOctetString(osPdReq, + dev->txFrames[P2P_FID_PD_REQ]->frame, dev->txFrames[P2P_FID_PD_REQ]->frameLen ); } @@ -153,7 +153,7 @@ n63c_Construct_FakePdRsp( RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("no corresp. pd req\n")); FillOctetString(osPdReq, NULL, 0); } - + // MAC Header p2p_add_ActionFrameMacHdr(fbuf, info->DeviceAddress, dev->mac, dev->mac); @@ -162,14 +162,14 @@ n63c_Construct_FakePdRsp( // WPS IE, getting from the original PD request if(osPdReq.Length) - { + { osTmpIe = PacketGetElement(osPdReq, EID_Vendor, OUI_SUB_SimpleConfig, OUI_SUB_DONT_CARE); if(osTmpIe.Length) { PacketMakeElement(&fbuf->os, EID_Vendor, osTmpIe); } } - + // WFD IE if(osPdReq.Length) { @@ -177,14 +177,14 @@ n63c_Construct_FakePdRsp( if(osTmpIe.Length) { PacketMakeElement(&fbuf->os, EID_Vendor, osTmpIe); - } + } } - + RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("a fake pd rsp constructed\n")); FrameBuf_Dump(fbuf, 0, DBG_LOUD, __FUNCTION__); - N6CWriteEventLogEntry(pAdapter, NDIS_STATUS_SUCCESS, - FrameBuf_Length(fbuf), FrameBuf_MHead(fbuf), + N6CWriteEventLogEntry(pAdapter, NDIS_STATUS_SUCCESS, + FrameBuf_Length(fbuf), FrameBuf_MHead(fbuf), L"A fake pd rsp constructed" ); @@ -202,15 +202,15 @@ n63c_IndicateRxP2pRspActionFrame( ) { typedef VOID (*N63C_INDIC_RX_P2P_RSP_ACTION_FRAME_PFN)(P2P_INFO *, const N63C_SEND_ACTION_CTX *, u4Byte, u1Byte *); - + P2P_INFO *info = GET_P2P_INFO(pAdapter); - N63C_INDIC_RX_P2P_RSP_ACTION_FRAME_PFN pfn = NULL; + N63C_INDIC_RX_P2P_RSP_ACTION_FRAME_PFN pfn = NULL; u4Byte eid = P2P_EVENT_NONE; P2P_FRAME_TYPE ft = P2P_FID_MAX; RT_GEN_TEMP_BUFFER *pGenBuf = NULL; FRAME_BUF fbuf; - + P2P_DEV_LIST_ENTRY *dev = NULL; u4Byte ieOffset = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; @@ -227,7 +227,7 @@ n63c_IndicateRxP2pRspActionFrame( } FrameBuf_Init(GEN_TEMP_BUFFER_SIZE, 0, (u1Byte *)pGenBuf->Buffer.Ptr, &fbuf); - + // get corresp. types if(N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE == ctx->rspType) { @@ -293,7 +293,7 @@ n63c_IndicateRxP2pRspActionFrame( else { break; - } + } } bIndicate = TRUE; @@ -335,18 +335,18 @@ n63c_SendP2pActionFrameStateCb( { if(OFF_CHNL_TX_STATE_CHNL_HIT == state) { - RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("on chnl\n")); + RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("on chnl\n")); bHandled = TRUE; break; } if(OFF_CHNL_TX_STATE_COMPLETE == state) { - RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("complete\n")); + RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("complete\n")); bHandled = TRUE; break; } - + if(OFF_CHNL_TX_STATE_FRAME_SENT == state) { RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("frame sent\n")); @@ -369,15 +369,15 @@ n63c_SendP2pRspActionFrameStateCb( N63C_SEND_ACTION_CTX *ctx = (N63C_SEND_ACTION_CTX *)pCtx; ADAPTER *pAdapter = ctx->pAdapter; P2P_INFO *info = GET_P2P_INFO(pAdapter); - + n63c_SendP2pActionFrameStateCb(req, state, pCtx); - + if(OFF_CHNL_TX_STATE_COMPLETE == state) { n63c_SendP2pActionFrameComplete(pAdapter, ctx); - // restore Dialog Token in P2PInfo since we are sending - // response action frame, self dialog token shall not be + // restore Dialog Token in P2PInfo since we are sending + // response action frame, self dialog token shall not be // modified RT_TRACE_F(COMP_P2P, DBG_LOUD, ("restore token from %u to %u\n", info->DialogToken, ctx->oldToken)); info->DialogToken = ctx->oldToken; @@ -394,7 +394,7 @@ n63c_SendP2pRspActionFrameStateCb( { RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("retry with token: %u, reqType: %u\n", ctx->token, ctx->reqType)); } - + return; } @@ -408,13 +408,13 @@ n63c_SendP2pReqActionFrameStateCb( { N63C_SEND_ACTION_CTX *ctx = (N63C_SEND_ACTION_CTX *)pCtx; ADAPTER *pAdapter = ctx->pAdapter; - + n63c_SendP2pActionFrameStateCb(req, state, pCtx); - + if(OFF_CHNL_TX_STATE_COMPLETE == state) { P2P_INFO *info = GET_P2P_INFO(pAdapter); - + n63c_SendP2pActionFrameComplete(pAdapter, ctx); RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("restore StateBeforeScan to initialized\n")); @@ -454,22 +454,22 @@ n63c_SendP2pReqActionFrameStateCb( if(pAdapter->bInHctTest) { - // Not to skip probing under HCT test, because it wastes time + // Not to skip probing under HCT test, because it wastes time // sending action frame to peer on its Listen Channel when peer // is not doing extended listen bSkip = FALSE; } - + if(bSkip) { N63C_SendAction_SkipProbeTemporarilly(req); } - + RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("retry with token: %u, reqType: %u, skip probe: %u\n", newToken, ctx->reqType, bSkip)); bSkip = !bSkip; } - + return; } @@ -506,23 +506,23 @@ N63CValidateRoleOfWifiDirectPorts( pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } - if(uNumberOfDevicePort > 2) + if(uNumberOfDevicePort > 2) { - RT_TRACE((COMP_OID_QUERY | COMP_OID_SET | COMP_P2P), DBG_SERIOUS, + RT_TRACE((COMP_OID_QUERY | COMP_OID_SET | COMP_P2P), DBG_SERIOUS, ("Wifi-Direct Port Failure: %s: uNumberOfDevicePort > 2\n", __FUNCTION__) ); } - if(uNumberOfGoPort > 2) + if(uNumberOfGoPort > 2) { - RT_TRACE((COMP_OID_QUERY | COMP_OID_SET | COMP_P2P), DBG_SERIOUS, + RT_TRACE((COMP_OID_QUERY | COMP_OID_SET | COMP_P2P), DBG_SERIOUS, ("Wifi-Direct Port Failure: %s: uNumberOfGoPort > 2)\n", __FUNCTION__) ); } - - if(uNumberOfClientPort > 1) + + if(uNumberOfClientPort > 1) { - RT_TRACE((COMP_OID_QUERY | COMP_OID_SET | COMP_P2P), DBG_SERIOUS, + RT_TRACE((COMP_OID_QUERY | COMP_OID_SET | COMP_P2P), DBG_SERIOUS, ("Wifi-Direct Port Failure: %s: uNumberOfClientPort > 1\n", __FUNCTION__) ); } @@ -559,7 +559,7 @@ N63CResetWifiDirectPorts( u1Byte uOpChannel = 0; u4Byte BoostInitGainValue = 0; u1Byte uAutoChnl = P2P_DEFAULT_OPERATING_CHANNEL; - + PADAPTER pDevicePort = NULL; FunctionIn(COMP_P2P); @@ -597,19 +597,19 @@ N63CResetWifiDirectPorts( } else if(PortRole == P2P_DEVICE) { -#if (AUTO_CHNL_SEL_NHM ==1) +#if (AUTO_CHNL_SEL_NHM ==1) if(IS_AUTO_CHNL_SUPPORT(pAdapter)) { pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_AUTO_CHNL_SEL, (pu1Byte)(&uAutoChnl)); - uOpChannel = P2PIsSocialChannel(uAutoChnl)? uAutoChnl : P2P_DEFAULT_OPERATING_CHANNEL; - pDefaultAdapter->MgntInfo.AutoChnlSel.AutoChnlNumberSelected= uAutoChnl; + uOpChannel = P2PIsSocialChannel(uAutoChnl)? uAutoChnl : P2P_DEFAULT_OPERATING_CHANNEL; + pDefaultAdapter->MgntInfo.AutoChnlSel.AutoChnlNumberSelected= uAutoChnl; RT_TRACE(COMP_P2P, DBG_LOUD, ("===> [ACS] N63CResetWifiDirectPorts(): uOpChannel(%d)\n", uOpChannel)); - } -#endif - } + } +#endif + } if(P2PIsSocialChannel(uOpChannel)) - { + { uListenChannel = uOpChannel; if(GetFirstDevicePort(pAdapter)) { @@ -618,9 +618,9 @@ N63CResetWifiDirectPorts( } RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Set from Role=%d to Role=%d, listenChnl = %d, OpChnl = %d\n", pP2PInfo->Role, PortRole, uListenChannel, uOpChannel)); - + if(PortRole == P2P_DEVICE) - { + { RT_TRACE((COMP_OID_QUERY | COMP_OID_SET), DBG_LOUD, ("(Win8 Reset to WFD Device Port)\n")); // Win8: Let the device port use the locally-adminitered MAC address ---------------------------------------------- @@ -628,7 +628,7 @@ N63CResetWifiDirectPorts( pAdapter->CurrentAddress[0] |= BIT1; RT_PRINT_ADDR((COMP_OID_QUERY | COMP_OID_SET), DBG_LOUD, "Device Port Address: ", pAdapter->CurrentAddress); // ------------------------------------------------------------------------------------------------------- - + pNdis62Common->CurrentOpState = INIT_STATE; if(ResetLevel == RESET_LEVEL_FULL) @@ -636,12 +636,12 @@ N63CResetWifiDirectPorts( MgntActSet_ApType(pAdapter, FALSE); N62CResetAPVariables(pAdapter, FALSE); } - + // Stop the Device Port mode: Last 3 parameters are don't care MgntActSet_P2PMode(pAdapter, FALSE, FALSE, 0, 0, 0); // Start the Device Port mode MgntActSet_P2PMode(pAdapter, TRUE, FALSE, uListenChannel, uOpChannel, P2P_DEFAULT_GO_INTENT); - + // Win8: Let the device port do not conduct the extended listening. // + When the OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY is issued, start listening. pP2PInfo->ExtListenTimingPeriod = 0; @@ -666,8 +666,8 @@ N63CResetWifiDirectPorts( if(PortRole == P2P_GO) { pP2PDevInfo = (PP2P_INFO)(pDevicePort->MgntInfo.pP2PInfo); - - if(pP2PDevInfo != NULL) + + if(pP2PDevInfo != NULL) { RT_TRACE((COMP_OID_QUERY | COMP_OID_SET|COMP_P2P), DBG_LOUD, ("(Win8 Reset to WFD Group Owner Port): Device port State(%d)\n", pP2PDevInfo->State)); @@ -682,7 +682,7 @@ N63CResetWifiDirectPorts( } - // Reset the AP parameters + // Reset the AP parameters pNdis62Common->CurrentOpState = INIT_STATE; if(ResetLevel == RESET_LEVEL_FULL) @@ -695,12 +695,12 @@ N63CResetWifiDirectPorts( } // Restart the Role Port mode: Last 3 parameters are don't care MgntActSet_P2PMode(pAdapter, FALSE, FALSE, 0, 0, 0); - MgntActSet_P2PMode(pAdapter, TRUE, FALSE, uListenChannel, uOpChannel, P2P_DEFAULT_GO_INTENT); + MgntActSet_P2PMode(pAdapter, TRUE, FALSE, uListenChannel, uOpChannel, P2P_DEFAULT_GO_INTENT); pP2PInfo->Role = P2P_GO; pP2PInfo->State = P2P_STATE_OPERATING; - - // Clause 3.1.4.3: Group Formation bit in the P2P Group Cap shall be set to 1 until Provisioning succeeds. + + // Clause 3.1.4.3: Group Formation bit in the P2P Group Cap shall be set to 1 until Provisioning succeeds. pP2PInfo->GroupCapability |= gcGroupFormation; } else if(PortRole == P2P_CLIENT) @@ -719,7 +719,7 @@ N63CResetWifiDirectPorts( // Restart the Role Port mode: Last 3 parameters are don't care MgntActSet_P2PMode(pAdapter, FALSE, FALSE, 0, 0, 0); MgntActSet_P2PMode(pAdapter, TRUE, FALSE, uListenChannel, uOpChannel, P2P_DEFAULT_GO_INTENT); - + pP2PInfo->Role = P2P_CLIENT; pP2PInfo->State = P2P_STATE_OPERATING; } @@ -735,7 +735,7 @@ N63CResetWifiDirectPorts( GET_P2P_INFO(pDevicePort)->ScanListSize ); } - + } else { @@ -744,7 +744,7 @@ N63CResetWifiDirectPorts( } FunctionOut(COMP_P2P); - + return NDIS_STATUS_SUCCESS; } @@ -760,10 +760,10 @@ N63CComputeRequiredDeviceEntriesSize( { u4Byte i = 0; u4Byte requiredMemory = 0; - + // Skip the MAC header and the first three fields (non-IE) in the beacon and the probe response - u4Byte skippedBytes = sMacHdrLng + 12; - + u4Byte skippedBytes = sMacHdrLng + 12; + for(i = 0; i < pP2PInfo->DeviceListForQuery.uNumberOfDevices; i++) { requiredMemory += sizeof(DOT11_WFD_DEVICE_ENTRY); // Entry Size @@ -794,8 +794,8 @@ N63CConstruct_DOT11_WFD_DEVICE_ENTRY( OUT pu4Byte bytesWritten ) { -#if 0 - typedef struct _DOT11_WFD_DEVICE_ENTRY +#if 0 + typedef struct _DOT11_WFD_DEVICE_ENTRY { ULONG uPhyId; DOT11_BSS_ENTRY_PHY_SPECIFIC_INFO PhySpecificInfo; @@ -832,7 +832,7 @@ N63CConstruct_DOT11_WFD_DEVICE_ENTRY( header = p2pEntry->BeaconPacket.Buffer; } - if(header == NULL) + if(header == NULL) { RT_TRACE(COMP_P2P, DBG_LOUD, ("%s() : Not a Good Header!\n", __FUNCTION__)); return; @@ -846,7 +846,7 @@ N63CConstruct_DOT11_WFD_DEVICE_ENTRY( wfdEntry->PhySpecificInfo.uChCenterFrequency = MgntGetChannelFrequency(p2pEntry->ChannelNumber); GET_80211_HDR_ADDRESS3(header, wfdEntry->dot11BSSID); - + wfdEntry->dot11BSSType = dot11_BSS_type_infrastructure; GET_80211_HDR_ADDRESS2(header, wfdEntry->TransmitterAddress); @@ -868,7 +868,7 @@ N63CConstruct_DOT11_WFD_DEVICE_ENTRY( // for OID_DOT11_WFD_ENUM_DEVICE_LIST request. Micfosoft would check this indicated probe response/beacon timestamp from ver9477. // The unit in ullBeaconHostTimestamp and ullProbeResponseHostTimestamp must be 100-nanosecond, 2013.08.21. // - + // Beacon Related if(RUNTIME_OS_WIN_FROM_WINBLUE(pAdapter)) @@ -877,13 +877,13 @@ N63CConstruct_DOT11_WFD_DEVICE_ENTRY( wfdEntry->ullBeaconHostTimestamp = p2pEntry->BeaconHostTimestamp; wfdEntry->uBeaconIEsOffset = sizeof(DOT11_WFD_DEVICE_ENTRY); - // Only consider the valid packet + // Only consider the valid packet if(p2pEntry->BeaconPacket.Length >= skippedBytes) { wfdEntry->uBeaconIEsLength = p2pEntry->BeaconPacket.Length - skippedBytes; PlatformMoveMemory( - (pu1Byte) wfdEntry + wfdEntry->uBeaconIEsOffset, + (pu1Byte) wfdEntry + wfdEntry->uBeaconIEsOffset, (pu1Byte) p2pEntry->BeaconPacket.Buffer + skippedBytes, wfdEntry->uBeaconIEsLength ); @@ -892,31 +892,31 @@ N63CConstruct_DOT11_WFD_DEVICE_ENTRY( wfdEntry->uBeaconIEsOffset = 0; // Probe Response Related - + if(RUNTIME_OS_WIN_FROM_WINBLUE(pAdapter)) wfdEntry->ullProbeResponseHostTimestamp = p2pEntry->ProbeResponseHostTimestamp*10;// Convert to 100-nanosecond units else - wfdEntry->ullProbeResponseHostTimestamp = p2pEntry->ProbeResponseHostTimestamp; + wfdEntry->ullProbeResponseHostTimestamp = p2pEntry->ProbeResponseHostTimestamp; wfdEntry->uProbeResponseIEsOffset = sizeof(DOT11_WFD_DEVICE_ENTRY) + wfdEntry->uBeaconIEsLength; - - // Only consider the valid packet + + // Only consider the valid packet if(p2pEntry->ProbeResponsePacket.Length >= skippedBytes) { wfdEntry->uProbeResponseIEsLength =p2pEntry->ProbeResponsePacket.Length - skippedBytes; PlatformMoveMemory( - (pu1Byte) wfdEntry + wfdEntry->uProbeResponseIEsOffset, + (pu1Byte) wfdEntry + wfdEntry->uProbeResponseIEsOffset, (pu1Byte) p2pEntry->ProbeResponsePacket.Buffer + skippedBytes, wfdEntry->uProbeResponseIEsLength ); - } + } else wfdEntry->uProbeResponseIEsOffset = 0; // Return the size of the total DOT11_WFD_DEVICE_ENTRY *bytesWritten = sizeof(DOT11_WFD_DEVICE_ENTRY) + wfdEntry->uBeaconIEsLength + wfdEntry->uProbeResponseIEsLength; - + } @@ -926,22 +926,22 @@ DumpN63CConstruct_DOT11_WFD_DEVICE_ENTRY( u4Byte length ) { - + RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "WFD_DEVICE_ENTRY:===========================================\n", wfdEntry, sizeof(DOT11_WFD_DEVICE_ENTRY) ); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "wfdEntry->dot11BSSID:", wfdEntry->dot11BSSID); - RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "wfdEntry->TransmitterAddress:", wfdEntry->TransmitterAddress); - + RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "wfdEntry->TransmitterAddress:", wfdEntry->TransmitterAddress); + RT_TRACE(COMP_P2P, DBG_LOUD, ("(wfdEntry->uBeaconIEsOffset, wfdEntry->uBeaconIEsLength) = (0x%X, 0x%X)\n", wfdEntry->uBeaconIEsOffset, wfdEntry->uBeaconIEsLength)); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "Beacon IE:-----------\n", ((pu1Byte)wfdEntry) + wfdEntry->uBeaconIEsOffset, wfdEntry->uBeaconIEsLength); RT_TRACE(COMP_P2P, DBG_LOUD, ("(wfdEntry->uProbeResponseIEsOffset, wfdEntry->uProbeResponseIEsLength) = (0x%X, 0x%X)\n", wfdEntry->uProbeResponseIEsOffset, wfdEntry->uProbeResponseIEsLength)); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ProbeResponse IE:-----------\n", ((pu1Byte)wfdEntry) + wfdEntry->uProbeResponseIEsOffset, wfdEntry->uProbeResponseIEsLength); } - - + + static VOID N63CIndicateDeviceDiscoveryComplete( PP2P_INFO pP2PInfo @@ -952,7 +952,7 @@ N63CIndicateDeviceDiscoveryComplete( #define DOT11_WFD_DISCOVER_COMPLETE_PARAMETERS_REVISION_1 1 #define DOT11_WFD_DISCOVER_COMPLETE_MAX_LIST_SIZE 128 - typedef struct _DOT11_WFD_DISCOVER_COMPLETE_PARAMETERS + typedef struct _DOT11_WFD_DISCOVER_COMPLETE_PARAMETERS { NDIS_OBJECT_HEADER Header; NDIS_STATUS Status; @@ -969,12 +969,12 @@ N63CIndicateDeviceDiscoveryComplete( PDOT11_WFD_DISCOVER_COMPLETE_PARAMETERS pParameters = NULL; PDOT11_WFD_DEVICE_ENTRY wfdEntry = NULL; MEMORY_BUFFER mbObject = {NULL, 0}; - + // Compute the requried memory length ------------------------------------------------------------------ mbObject.Length += sizeof(DOT11_WFD_DISCOVER_COMPLETE_PARAMETERS); // Parameter Structure Size mbObject.Length += N63CComputeRequiredDeviceEntriesSize(pP2PInfo); //------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -986,7 +986,7 @@ N63CIndicateDeviceDiscoveryComplete( pParameters = (PDOT11_WFD_DISCOVER_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_WFD_DISCOVER_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1007,7 +1007,7 @@ N63CIndicateDeviceDiscoveryComplete( { wfdEntry = (PDOT11_WFD_DEVICE_ENTRY)((pu1Byte) wfdEntry + bytesWritten); - N63CConstruct_DOT11_WFD_DEVICE_ENTRY( + N63CConstruct_DOT11_WFD_DEVICE_ENTRY( pP2PInfo, &pP2PInfo->DeviceListForQuery.DeviceEntry[i], wfdEntry, @@ -1029,11 +1029,11 @@ N63CIndicateDeviceDiscoveryComplete( RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: N63CComputeRequiredMemoryForDeviceList value mismatch!\n", __FUNCTION__)); } //----------------------------------------------------------------------------------------------------- - + N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_DISCOVER_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_DISCOVER_COMPLETE, + mbObject.Buffer, mbObject.Length ); @@ -1053,7 +1053,7 @@ N63CIndicateInvitationRequestSendComplete( { #if 0 #define DOT11_INVITATION_REQUEST_SEND_COMPLETE_PARAMETERS_REVISION_1 1 - + typedef struct _DOT11_INVITATION_REQUEST_SEND_COMPLETE_PARAMETERS { NDIS_OBJECT_HEADER Header; @@ -1071,20 +1071,20 @@ N63CIndicateInvitationRequestSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_INVITATION_REQUEST_SEND_COMPLETE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1096,7 +1096,7 @@ N63CIndicateInvitationRequestSendComplete( pParameters = (PDOT11_INVITATION_REQUEST_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_INVITATION_REQUEST_SEND_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1105,7 +1105,7 @@ N63CIndicateInvitationRequestSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -1115,31 +1115,31 @@ N63CIndicateInvitationRequestSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->PeerDeviceAddress); GET_80211_HDR_ADDRESS1(header, pParameters->ReceiverAddress); - + pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_INVITATION_REQUEST_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_INVITATION_REQUEST_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_INVITATION_REQUEST_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); @@ -1158,7 +1158,7 @@ N63CIndicateReceivedInvitationRequest( { #if 0 #define DOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS + typedef struct _DOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS TransmitterDeviceAddress; @@ -1175,20 +1175,20 @@ N63CIndicateReceivedInvitationRequest( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1200,7 +1200,7 @@ N63CIndicateReceivedInvitationRequest( pParameters = (PDOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1209,34 +1209,34 @@ N63CIndicateReceivedInvitationRequest( ); header = pEventData->Packet.Buffer; - + GET_80211_HDR_ADDRESS2(header, pParameters->TransmitterDeviceAddress); - + GET_80211_HDR_ADDRESS3(header, pParameters->BSSID); pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); pParameters->RequestContext = NULL; - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_INVITATION_REQUEST_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - - // Indicate the status to the OS ------------------------------------------------------------- + + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_INVITATION_REQUEST, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_INVITATION_REQUEST, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -1270,20 +1270,20 @@ N63CIndicateInvitationResponseSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_INVITATION_RESPONSE_SEND_COMPLETE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1295,7 +1295,7 @@ N63CIndicateInvitationResponseSendComplete( pParameters = (PDOT11_INVITATION_RESPONSE_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_INVITATION_RESPONSE_SEND_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1304,7 +1304,7 @@ N63CIndicateInvitationResponseSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -1315,30 +1315,30 @@ N63CIndicateInvitationResponseSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->ReceiverDeviceAddress); pParameters->DialogToken = pP2PInfo->ProvisionResponseDialogToken; - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_INVITATION_RESPONSE_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } - + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - + } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_INVITATION_RESPONSE_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_INVITATION_RESPONSE_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -1358,7 +1358,7 @@ N63CIndicateReceivedInvitationResponse( { #if 0 #define DOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS + typedef struct _DOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS TransmitterDeviceAddress; @@ -1373,22 +1373,22 @@ N63CIndicateReceivedInvitationResponse( PDOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS pParameters = NULL; MEMORY_BUFFER mbObject = {NULL, 0}; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; FunctionIn(COMP_OID_SET); - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(frameLen >= skippedBytes) { mbObject.Length += frameLen - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1400,7 +1400,7 @@ N63CIndicateReceivedInvitationResponse( pParameters = (PDOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1409,32 +1409,32 @@ N63CIndicateReceivedInvitationResponse( ); header = frameBuf; - + GET_80211_HDR_ADDRESS2(header, pParameters->TransmitterDeviceAddress); - + GET_80211_HDR_ADDRESS3(header, pParameters->BSSID); pParameters->DialogToken = ctx->token; - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_INVITATION_RESPONSE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(frameLen >= skippedBytes) { pParameters->uIEsLength = frameLen - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_INVITATION_RESPONSE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_INVITATION_RESPONSE, + mbObject.Buffer, mbObject.Length ); @@ -1456,7 +1456,7 @@ N63CIndicateProvisionDiscoveryRequestSendComplete( #if 0 #define DOT11_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE_PARAMETERS_REVISION_1 1 - + typedef struct _DOT11_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE_PARAMETERS { NDIS_OBJECT_HEADER Header; @@ -1474,20 +1474,20 @@ N63CIndicateProvisionDiscoveryRequestSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += DOT11_SIZEOF_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE_PARAMETERS_REVISION_1; // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1499,7 +1499,7 @@ N63CIndicateProvisionDiscoveryRequestSendComplete( pParameters = (PDOT11_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, DOT11_SIZEOF_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE_PARAMETERS_REVISION_1); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1508,7 +1508,7 @@ N63CIndicateProvisionDiscoveryRequestSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -1518,31 +1518,31 @@ N63CIndicateProvisionDiscoveryRequestSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->PeerDeviceAddress); GET_80211_HDR_ADDRESS1(header, pParameters->ReceiverAddress); - + pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); @@ -1562,8 +1562,8 @@ N63CIndicateReceivedProvisionDiscoveryRequest( { #if 0 #define DOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS_REVISION_1 1 - - typedef struct _DOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS + + typedef struct _DOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS TransmitterDeviceAddress; @@ -1580,20 +1580,20 @@ N63CIndicateReceivedProvisionDiscoveryRequest( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1605,7 +1605,7 @@ N63CIndicateReceivedProvisionDiscoveryRequest( pParameters = (PDOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1614,34 +1614,34 @@ N63CIndicateReceivedProvisionDiscoveryRequest( ); header = pEventData->Packet.Buffer; - + GET_80211_HDR_ADDRESS2(header, pParameters->TransmitterDeviceAddress); - + GET_80211_HDR_ADDRESS3(header, pParameters->BSSID); pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); pParameters->RequestContext = NULL; - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_PROVISION_DISCOVERY_REQUEST_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - - // Indicate the status to the OS ------------------------------------------------------------- + + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_PROVISION_DISCOVERY_REQUEST, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_PROVISION_DISCOVERY_REQUEST, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -1667,7 +1667,7 @@ N63CIndicateProvisionDiscoveryResponseSendComplete( NDIS_STATUS Status; ULONG uIEsOffset; ULONG uIEsLength; - } DOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS, * PDOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS; + } DOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS, * PDOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS; #endif RT_STATUS rtStatus = RT_STATUS_FAILURE; @@ -1675,20 +1675,20 @@ N63CIndicateProvisionDiscoveryResponseSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1700,7 +1700,7 @@ N63CIndicateProvisionDiscoveryResponseSendComplete( pParameters = (PDOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1709,7 +1709,7 @@ N63CIndicateProvisionDiscoveryResponseSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -1720,30 +1720,30 @@ N63CIndicateProvisionDiscoveryResponseSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->ReceiverDeviceAddress); pParameters->DialogToken = pP2PInfo->ProvisionResponseDialogToken; - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } - + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - + } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -1762,7 +1762,7 @@ N63CIndicateReceivedProvisionDiscoveryResponse( { #if 0 #define DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS + typedef struct _DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS TransmitterDeviceAddress; @@ -1770,29 +1770,29 @@ N63CIndicateReceivedProvisionDiscoveryResponse( DOT11_DIALOG_TOKEN DialogToken; ULONG uIEsOffset; ULONG uIEsLength; - } DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS, * PDOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS; + } DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS, * PDOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS; #endif RT_STATUS rtStatus = RT_STATUS_FAILURE; PDOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS pParameters = NULL; MEMORY_BUFFER mbObject = {NULL, 0}; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; FunctionIn(COMP_OID_SET); - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(frameLen >= skippedBytes) { mbObject.Length += frameLen - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1804,7 +1804,7 @@ N63CIndicateReceivedProvisionDiscoveryResponse( pParameters = (PDOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1813,32 +1813,32 @@ N63CIndicateReceivedProvisionDiscoveryResponse( ); header = frameBuf; - + GET_80211_HDR_ADDRESS2(header, pParameters->TransmitterDeviceAddress); - + GET_80211_HDR_ADDRESS3(header, pParameters->BSSID); pParameters->DialogToken = ctx->token; - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_PROVISION_DISCOVERY_RESPONSE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(frameLen >= skippedBytes) { pParameters->uIEsLength = frameLen - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_PROVISION_DISCOVERY_RESPONSE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_PROVISION_DISCOVERY_RESPONSE, + mbObject.Buffer, mbObject.Length ); @@ -1860,7 +1860,7 @@ N63CIndicateNegotiationRequestSendComplete( { #if 0 #define DOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS + typedef struct _DOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS PeerDeviceAddress; @@ -1876,20 +1876,20 @@ N63CIndicateNegotiationRequestSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successful ------------------------------------------------------------------------ rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -1901,7 +1901,7 @@ N63CIndicateNegotiationRequestSendComplete( pParameters = (PDOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1910,7 +1910,7 @@ N63CIndicateNegotiationRequestSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -1919,32 +1919,32 @@ N63CIndicateNegotiationRequestSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->PeerDeviceAddress); - + pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_GO_NEGOTIATION_REQUEST_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } - + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - + } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_GO_NEGOTIATION_REQUEST_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_GO_NEGOTIATION_REQUEST_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -1961,7 +1961,7 @@ N63CIndicateReceivedGONegotiationRequest( { #if 0 #define DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS + typedef struct _DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS PeerDeviceAddress; @@ -1969,7 +1969,7 @@ N63CIndicateReceivedGONegotiationRequest( PVOID RequestContext; ULONG uIEsOffset; ULONG uIEsLength; - } DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS, * PDOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS; + } DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS, * PDOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS; #endif RT_STATUS rtStatus = RT_STATUS_FAILURE; @@ -1977,20 +1977,20 @@ N63CIndicateReceivedGONegotiationRequest( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -2002,7 +2002,7 @@ N63CIndicateReceivedGONegotiationRequest( pParameters = (PDOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -2011,30 +2011,30 @@ N63CIndicateReceivedGONegotiationRequest( ); header = pEventData->Packet.Buffer; - + GET_80211_HDR_ADDRESS2(header, pParameters->PeerDeviceAddress); pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_GO_NEGOTIATION_REQUEST_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_GO_NEGOTIATION_REQUEST, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_GO_NEGOTIATION_REQUEST, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -2050,10 +2050,10 @@ N63CIndicateNegotiationResponseSendComplete( PMEMORY_BUFFER pInformation ) { -#if 0 +#if 0 #define DOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS_REVISION_1 1 - - typedef struct _DOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS + + typedef struct _DOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS PeerDeviceAddress; @@ -2069,20 +2069,20 @@ N63CIndicateNegotiationResponseSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successful ------------------------------------------------------------------------ rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -2094,7 +2094,7 @@ N63CIndicateNegotiationResponseSendComplete( pParameters = (PDOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -2103,7 +2103,7 @@ N63CIndicateNegotiationResponseSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -2112,32 +2112,32 @@ N63CIndicateNegotiationResponseSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->PeerDeviceAddress); - + pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } - + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - + } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -2158,7 +2158,7 @@ N63CIndicateReceivedGONegotiationResponse( #if 0 #define DOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS + typedef struct _DOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS PeerDeviceAddress; @@ -2173,22 +2173,22 @@ N63CIndicateReceivedGONegotiationResponse( PDOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS pParameters = NULL; MEMORY_BUFFER mbObject = {NULL, 0}; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; FunctionIn(COMP_OID_SET); - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(frameLen >= skippedBytes) { mbObject.Length += frameLen - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successfull ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -2200,7 +2200,7 @@ N63CIndicateReceivedGONegotiationResponse( pParameters = (PDOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -2209,30 +2209,30 @@ N63CIndicateReceivedGONegotiationResponse( ); header = frameBuf; - + GET_80211_HDR_ADDRESS2(header, pParameters->PeerDeviceAddress); pParameters->DialogToken = ctx->token; - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_GO_NEGOTIATION_RESPONSE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(frameLen >= skippedBytes) { pParameters->uIEsLength = frameLen - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_GO_NEGOTIATION_RESPONSE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_GO_NEGOTIATION_RESPONSE, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -2252,8 +2252,8 @@ N63CIndicateNegotiationConfirmSendComplete( { #if 0 #define DOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS_REVISION_1 1 - - typedef struct _DOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS + + typedef struct _DOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS PeerDeviceAddress; @@ -2269,20 +2269,20 @@ N63CIndicateNegotiationConfirmSendComplete( MEMORY_BUFFER mbObject = {NULL, 0}; PP2P_EVENT_DATA pEventData = (PP2P_EVENT_DATA) pInformation->Buffer; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { mbObject.Length += pEventData->Packet.Length - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successful ------------------------------------------------------------------------ rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -2294,7 +2294,7 @@ N63CIndicateNegotiationConfirmSendComplete( pParameters = (PDOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -2303,7 +2303,7 @@ N63CIndicateNegotiationConfirmSendComplete( ); if(pEventData->rtStatus == RT_STATUS_FAILURE) - { + { pParameters->Status = NDIS_STATUS_FAILURE; } else @@ -2312,32 +2312,32 @@ N63CIndicateNegotiationConfirmSendComplete( GET_80211_HDR_ADDRESS1(header, pParameters->PeerDeviceAddress); - + pParameters->DialogToken = *(header + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN); - + pParameters->Status = NDIS_STATUS_SUCCESS; pParameters->uIEsOffset = sizeof(DOT11_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE_PARAMETERS); - // Only the valid packet + // Only the valid packet if(pEventData->Packet.Length >= skippedBytes) { pParameters->uIEsLength = pEventData->Packet.Length - skippedBytes; } - + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - + } - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_GO_NEGOTIATION_CONFIRMATION_SEND_COMPLETE, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -2356,8 +2356,8 @@ N63CIndicateReceivedGONegotiationConfirm( ) { #if 0 - #define DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS_REVISION_1 1 - typedef struct _DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS + #define DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS_REVISION_1 1 + typedef struct _DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_MAC_ADDRESS PeerDeviceAddress; @@ -2371,22 +2371,22 @@ N63CIndicateReceivedGONegotiationConfirm( PDOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS pParameters = NULL; MEMORY_BUFFER mbObject = {NULL, 0}; pu1Byte header = NULL; - + // Skip the mac header (24) and the fields from Category to Dialog Token (8) u2Byte skippedBytes = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS; FunctionIn(COMP_OID_SET); - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS); // Parameter Structure Size - // + Only the valid packet + // + Only the valid packet if(frameLen >= skippedBytes) { mbObject.Length += frameLen - skippedBytes; } //---------------------------------------------------------------------------------------------------------- - + // This must be successful ----------------------------------------------------------------------- rtStatus = PlatformAllocateMemory(pP2PInfo->pAdapter, &mbObject.Buffer, mbObject.Length); if(rtStatus == RT_STATUS_FAILURE) @@ -2398,7 +2398,7 @@ N63CIndicateReceivedGONegotiationConfirm( pParameters = (PDOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( pParameters->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -2407,30 +2407,30 @@ N63CIndicateReceivedGONegotiationConfirm( ); header = frameBuf; - + GET_80211_HDR_ADDRESS2(header, pParameters->PeerDeviceAddress); pParameters->DialogToken = ctx->token; - + pParameters->uIEsOffset = sizeof(DOT11_RECEIVED_GO_NEGOTIATION_CONFIRMATION_PARAMETERS); - // Only the valid packet + // Only the valid packet if(frameLen >= skippedBytes) { pParameters->uIEsLength = frameLen - skippedBytes; - } - + } + PlatformMoveMemory( - (pu1Byte) pParameters + pParameters->uIEsOffset, - header + skippedBytes, + (pu1Byte) pParameters + pParameters->uIEsOffset, + header + skippedBytes, pParameters->uIEsLength ); - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_RECEIVED_GO_NEGOTIATION_CONFIRMATION, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_RECEIVED_GO_NEGOTIATION_CONFIRMATION, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -2450,7 +2450,7 @@ N63CIndicateGOOperatingChannel( RT_STATUS rtStatus = RT_STATUS_FAILURE; PDOT11_WFD_CHANNEL pParameters = NULL; MEMORY_BUFFER mbObject = {NULL, 0}; - + // Compute the requried memory length -------------------------------------------------------------------------- mbObject.Length += sizeof(DOT11_WFD_CHANNEL); // Parameter Structure Size @@ -2465,16 +2465,16 @@ N63CIndicateGOOperatingChannel( pParameters = (PDOT11_WFD_CHANNEL) mbObject.Buffer; PlatformZeroMemory(pParameters, sizeof(DOT11_WFD_CHANNEL)); - + PlatformMoveMemory((pu1Byte)pParameters->CountryRegionString, pP2PInfo->CountryString, 3); pParameters->OperatingClass = pP2PInfo->RegulatoryClass; pParameters->ChannelNumber = pP2PInfo->OperatingChannel; - // Indicate the status to the OS ------------------------------------------------------------- + // Indicate the status to the OS ------------------------------------------------------------- N6IndicateStatus( - pP2PInfo->pAdapter, - NDIS_STATUS_DOT11_WFD_GROUP_OPERATING_CHANNEL, - mbObject.Buffer, + pP2PInfo->pAdapter, + NDIS_STATUS_DOT11_WFD_GROUP_OPERATING_CHANNEL, + mbObject.Buffer, mbObject.Length ); //--------------------------------------------------------------------------------------- @@ -2485,23 +2485,23 @@ N63CIndicateGOOperatingChannel( static NDIS_STATUS N63CValidateOIDCorrectnessGetReturnStatus( - OID_CORRECT_STATE correctState, + OID_CORRECT_STATE correctState, MP_PORT_TYPE portType, P2P_ROLE portRole, MP_PORT_OP_STATE portState ) { -// +// // Return Value: // NDIS_STATUS_INVALID_STATE: That port can process that OID in other state // NDIS_STATUS_SUCCESS: Correct port in the correct state // - NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; + NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; if(portType == EXT_P2P_DEVICE_PORT) { - if(portState == INIT_STATE) + if(portState == INIT_STATE) { if(correctState & STATE_DEVICE_INIT) { @@ -2572,16 +2572,16 @@ N63CValidateQueryOIDCorrectness( PNDIS_OID_REQUEST NdisRequest ) { - NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; + NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; NDIS_OID oid = NdisRequest->DATA.QUERY_INFORMATION.Oid; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); - + MP_PORT_TYPE portType = pTargetAdapter->pNdis62Common->PortType; - P2P_ROLE portRole = pP2PInfo->Role; + P2P_ROLE portRole = pP2PInfo->Role; MP_PORT_OP_STATE portState = pTargetAdapter->pNdis62Common->CurrentOpState; - + switch (oid) { case OID_DOT11_WFD_ENUM_DEVICE_LIST: @@ -2590,12 +2590,12 @@ N63CValidateQueryOIDCorrectness( case OID_DOT11_WFD_GET_DIALOG_TOKEN: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_DEVICE_INIT, - portType, - portRole, + portType, + portRole, portState ); break; - + default: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; @@ -2610,16 +2610,16 @@ N63CValidateSetOIDCorrectness( PNDIS_OID_REQUEST NdisRequest ) { - NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; + NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; NDIS_OID oid = NdisRequest->DATA.QUERY_INFORMATION.Oid; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); - + MP_PORT_TYPE portType = pTargetAdapter->pNdis62Common->PortType; - P2P_ROLE portRole = pP2PInfo->Role; + P2P_ROLE portRole = pP2PInfo->Role; MP_PORT_OP_STATE portState = pTargetAdapter->pNdis62Common->CurrentOpState; - + switch (oid) { case OID_DOT11_WFD_DEVICE_CAPABILITY: @@ -2627,26 +2627,26 @@ N63CValidateSetOIDCorrectness( case OID_DOT11_WFD_ADDITIONAL_IE: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_DEVICE_INIT | STATE_GO_INIT | STATE_GO_OP | STATE_CLIENT_INIT | STATE_CLIENT_OP, - portType, - portRole, + portType, + portRole, portState ); break; - + case OID_DOT11_WFD_GROUP_OWNER_CAPABILITY: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_GO_INIT | STATE_GO_OP | STATE_DEVICE_INIT, - portType, - portRole, + portType, + portRole, portState ); break; - + case OID_DOT11_WFD_DEVICE_INFO: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_DEVICE_INIT | STATE_GO_INIT | STATE_CLIENT_INIT, - portType, - portRole, + portType, + portRole, portState ); break; @@ -2665,46 +2665,46 @@ N63CValidateSetOIDCorrectness( case OID_DOT11_WFD_STOP_DISCOVERY: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_DEVICE_INIT, - portType, - portRole, + portType, + portRole, portState ); break; - + case OID_DOT11_WFD_DESIRED_GROUP_ID: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_GO_INIT | STATE_CLIENT_INIT, - portType, - portRole, + portType, + portRole, portState ); break; - + case OID_DOT11_WFD_START_GO_REQUEST: case OID_DOT11_WFD_GROUP_START_PARAMETERS: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_GO_INIT, - portType, - portRole, + portType, + portRole, portState ); break; - + case OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST: case OID_DOT11_WFD_GROUP_JOIN_PARAMETERS: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_CLIENT_INIT, - portType, - portRole, + portType, + portRole, portState ); break; - + case OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST: ndisStatus = N63CValidateOIDCorrectnessGetReturnStatus( STATE_CLIENT_OP, - portType, - portRole, + portType, + portRole, portState ); break; @@ -2737,18 +2737,18 @@ N63CValidateOIDCorrectness( PNDIS_OID_REQUEST NdisRequest ) { - NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; + NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_STATE; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); MP_PORT_TYPE portType = pTargetAdapter->pNdis62Common->PortType; - P2P_ROLE portRole = pP2PInfo->Role; + P2P_ROLE portRole = pP2PInfo->Role; MP_PORT_OP_STATE portState = pTargetAdapter->pNdis62Common->CurrentOpState; - RT_TRACE(COMP_OID_SET | COMP_OID_QUERY | COMP_P2P, DBG_LOUD, - ("MP_PORT_TYPE: %d, P2P_ROLE: %d, MP_PORT_OP_STATE: %d\n", portType, portRole, portState)); - + RT_TRACE(COMP_OID_SET | COMP_OID_QUERY | COMP_P2P, DBG_LOUD, + ("MP_PORT_TYPE: %d, P2P_ROLE: %d, MP_PORT_OP_STATE: %d\n", portType, portRole, portState)); + do { // Currently, only handle these OIDs in the Wi-Fi Driect ports (Device Port or Role Port) since these ports are the upmost port type @@ -2757,7 +2757,7 @@ N63CValidateOIDCorrectness( ndisStatus = NDIS_STATUS_INVALID_STATE; break; } - + switch (NdisRequest->RequestType) { // Query @@ -2765,7 +2765,7 @@ N63CValidateOIDCorrectness( case NdisRequestQueryStatistics: ndisStatus = N63CValidateQueryOIDCorrectness(pAdapter, NdisRequest); break; - + // Set case NdisRequestSetInformation: ndisStatus = N63CValidateSetOIDCorrectness(pAdapter, NdisRequest); @@ -2775,7 +2775,7 @@ N63CValidateOIDCorrectness( case NdisRequestMethod: ndisStatus = N63CValidateMethodOIDCorrectness(pAdapter, NdisRequest); break; - + default: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; @@ -2787,7 +2787,7 @@ N63CValidateOIDCorrectness( // Set operation for OID_DOT11_WFD_DEVICE_CAPABILITY -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_DEVICE_CAPABILITY( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -2801,11 +2801,11 @@ N63C_SET_OID_DOT11_WFD_DEVICE_CAPABILITY( PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); // OS-given structure - PDOT11_WFD_DEVICE_CAPABILITY_CONFIG deviceCapability = + PDOT11_WFD_DEVICE_CAPABILITY_CONFIG deviceCapability = (PDOT11_WFD_DEVICE_CAPABILITY_CONFIG) InformationBuffer; #if 0 // Implementation Status - typedef struct _DOT11_WFD_DEVICE_CAPABILITY_CONFIG + typedef struct _DOT11_WFD_DEVICE_CAPABILITY_CONFIG { NDIS_OBJECT_HEADER Header; // SKIP BOOLEAN bServiceDiscoveryEnabled; // OK @@ -2821,10 +2821,10 @@ N63C_SET_OID_DOT11_WFD_DEVICE_CAPABILITY( // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; - + // Set the device capability - pP2PInfo->DeviceCapability = - 0x00 | + pP2PInfo->DeviceCapability = + 0x00 | (deviceCapability->bServiceDiscoveryEnabled ? dcServiceDiscovery : 0) | (deviceCapability->bClientDiscoverabilityEnabled ? dcP2PClientDiscoverability : 0) | (deviceCapability->bConcurrentOperationSupported ? dcConcurrentOperation : 0) | @@ -2836,17 +2836,17 @@ N63C_SET_OID_DOT11_WFD_DEVICE_CAPABILITY( // Currently, do not know how to implement this ------- // Represent the WPS versions that are currently enabled for the Wi-Fi Direct Device RT_TRACE(COMP_P2P, DBG_LOUD, ("deviceCapability->WPSVersionsEnabled: %d\n", deviceCapability->WPSVersionsEnabled)); - + #if 0 // Possible Solution Currently, this may be ignored since our driver does not necessarily process the WPS IE. #endif // --------------------------------------------- - + return ndisStatus; } // Set operation for OID_DOT11_WFD_GROUP_OWNER_CAPABILITY -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -2859,13 +2859,13 @@ N63C_SET_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); P2P_ROLE portRole = pP2PInfo->Role; - + // OS-given structure - PDOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG groupCapability = + PDOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG groupCapability = (PDOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG) InformationBuffer; #if 0 // Implementation Status - typedef struct _DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG + typedef struct _DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG { NDIS_OBJECT_HEADER Header; // SKIP BOOLEAN bPersistentGroupEnabled; // OK @@ -2876,14 +2876,14 @@ N63C_SET_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( ULONG uMaximumGroupLimit; // TODO } DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG, *PDOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG; #endif - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; // Set the group capability - pP2PInfo->GroupCapability = - 0x00 | + pP2PInfo->GroupCapability = + 0x00 | (portRole == P2P_GO ? gcP2PGroupOwner : 0) | (groupCapability->bPersistentGroupEnabled ? gcPersistentP2PGroup : 0) | (P2PClientInfoGetCount(pP2PInfo) >= P2P_MAX_P2P_CLIENT ? gcP2PGroupLimit : 0) | @@ -2893,7 +2893,7 @@ N63C_SET_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( (groupCapability->bGroupFormationEnabled ? gcGroupFormation : 0) ; RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: pP2PInfo->GroupCapability: 0x%0X\n", __FUNCTION__, pP2PInfo->GroupCapability)); - + // Currently, do not know how to implement this ------- // We use the P2P_MAX_P2P_CLIENT macro, while the OS uses the following statement groupCapability->uMaximumGroupLimit; @@ -2902,14 +2902,14 @@ N63C_SET_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( Since our driver uses the macro P2P_MAX_P2P_CLIENT to set the maximum value, we may be able to omit this setting. The default value will be set in the DOT11_WFD_ATTRIBUTES.uGORoleClientTableSize during the initialization. #endif - + // --------------------------------------------- - + return ndisStatus; } // Set operation for OID_DOT11_WFD_DEVICE_INFO -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_DEVICE_INFO( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -2921,13 +2921,13 @@ N63C_SET_OID_DOT11_WFD_DEVICE_INFO( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); - + // OS-given structure - PDOT11_WFD_DEVICE_INFO deviceInfo = + PDOT11_WFD_DEVICE_INFO deviceInfo = (PDOT11_WFD_DEVICE_INFO) InformationBuffer; #if 0 // Implementation Status - typedef struct _DOT11_WFD_DEVICE_INFO + typedef struct _DOT11_WFD_DEVICE_INFO { NDIS_OBJECT_HEADER Header; // SKIP DOT11_MAC_ADDRESS DeviceAddress; // OK @@ -2936,56 +2936,56 @@ N63C_SET_OID_DOT11_WFD_DEVICE_INFO( DOT11_WPS_DEVICE_NAME DeviceName; // OK } DOT11_WFD_DEVICE_INFO, *PDOT11_WFD_DEVICE_INFO; #endif - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; // Start to set the device information - + // Set the device address: Should we set the interface address based on the role of the port? cpMacAddr(pP2PInfo->DeviceAddress, deviceInfo->DeviceAddress); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "Set pP2PInfo->DeviceAddress: ", pP2PInfo->DeviceAddress); - + // Set the config method for WPS pP2PInfo->WpsAttributes.ConfigMethod = deviceInfo->ConfigMethods; RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->WpsAttributes.ConfigMethod: 0x%X\n", pP2PInfo->WpsAttributes.ConfigMethod)); - - // Set the primary device type for WPS + + // Set the primary device type for WPS pP2PInfo->WpsAttributes.PrimaryDeviceType.CategoryId = deviceInfo->PrimaryDeviceType.CategoryID; RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->WpsAttributes.PrimaryDeviceType.CategoryId : %d\n", pP2PInfo->WpsAttributes.PrimaryDeviceType.CategoryId )); - + pP2PInfo->WpsAttributes.PrimaryDeviceType.SubCategoryId = deviceInfo->PrimaryDeviceType.SubCategoryID; RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->WpsAttributes.PrimaryDeviceType.SubCategoryId: %d\n", pP2PInfo->WpsAttributes.PrimaryDeviceType.SubCategoryId)); - + PlatformMoveMemory( - pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui, - deviceInfo->PrimaryDeviceType.OUI, + pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui, + deviceInfo->PrimaryDeviceType.OUI, 4 - ); - RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui: %02X-%02X-%02X-%02X\n", + ); + RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui: %02X-%02X-%02X-%02X\n", pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui[0], pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui[1], pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui[2], pP2PInfo->WpsAttributes.PrimaryDeviceType.Oui[3]) ); - + // Set the device name for WPS pP2PInfo->WpsAttributes.DeviceNameLength = (u1Byte) deviceInfo->DeviceName.uDeviceNameLength; PlatformMoveMemory( - pP2PInfo->WpsAttributes.DeviceName, - deviceInfo->DeviceName.ucDeviceName, + pP2PInfo->WpsAttributes.DeviceName, + deviceInfo->DeviceName.ucDeviceName, deviceInfo->DeviceName.uDeviceNameLength ); RT_PRINT_STR(COMP_P2P, DBG_LOUD, "DeviceName: ", pP2PInfo->WpsAttributes.DeviceName, pP2PInfo->WpsAttributes.DeviceNameLength); P2P_CorrectDeviceCategory(pTargetAdapter); - + return ndisStatus; } // Set operation for OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3000,20 +3000,20 @@ N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( // Loop iteration variables ULONG i = 0; - + // OS-given structure - PDOT11_WFD_SECONDARY_DEVICE_TYPE_LIST secondaryDeviceTypeList = + PDOT11_WFD_SECONDARY_DEVICE_TYPE_LIST secondaryDeviceTypeList = (PDOT11_WFD_SECONDARY_DEVICE_TYPE_LIST) InformationBuffer; #if 0 // Implementation Status - typedef struct _DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST { + typedef struct _DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST { NDIS_OBJECT_HEADER Header; // SKIP ULONG uNumOfEntries; // OK ULONG uTotalNumOfEntries; // TODO DOT11_WFD_DEVICE_TYPE SecondaryDeviceTypes[1]; // OK } DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST, * PDOT11_WFD_SECONDARY_DEVICE_TYPE_LIST; #endif - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -3021,7 +3021,7 @@ N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( // Start to set the secondary device type list // Set the number of secondary device type list entries - pP2PInfo->WpsAttributes.SecondaryDeviceTypeLength = + pP2PInfo->WpsAttributes.SecondaryDeviceTypeLength = (u1Byte) secondaryDeviceTypeList->uNumOfEntries; RT_TRACE_F(COMP_P2P, DBG_LOUD, ("secondaryDeviceType number = %d\n", secondaryDeviceTypeList->uNumOfEntries)); @@ -3029,15 +3029,15 @@ N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( // Set each secondary device type from the OS-given structure for(i = 0; i < secondaryDeviceTypeList->uNumOfEntries; i++) { - pP2PInfo->WpsAttributes.SecondaryDeviceTypeList[i].CategoryId = + pP2PInfo->WpsAttributes.SecondaryDeviceTypeList[i].CategoryId = secondaryDeviceTypeList->SecondaryDeviceTypes[i].CategoryID; - - pP2PInfo->WpsAttributes.SecondaryDeviceTypeList[i].SubCategoryId = + + pP2PInfo->WpsAttributes.SecondaryDeviceTypeList[i].SubCategoryId = secondaryDeviceTypeList->SecondaryDeviceTypes[i].SubCategoryID; PlatformMoveMemory( - pP2PInfo->WpsAttributes.SecondaryDeviceTypeList[i].Oui, - secondaryDeviceTypeList->SecondaryDeviceTypes[i].OUI, + pP2PInfo->WpsAttributes.SecondaryDeviceTypeList[i].Oui, + secondaryDeviceTypeList->SecondaryDeviceTypes[i].OUI, 4 ); @@ -3046,7 +3046,7 @@ N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( } // Currently, do not know how to implement this ------- - // The maximum number of entries that the SecondaryDeviceTypes array can contain. + // The maximum number of entries that the SecondaryDeviceTypes array can contain. // The default value is 0. secondaryDeviceTypeList->uTotalNumOfEntries; @@ -3054,14 +3054,14 @@ N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( This variable may be used to limit the maximum number of elements in SecondaryDeviceTypeList. Currently, the struct _P2P_WPS_ATTRIBUTES accepts 8 emements for SecondaryDeviceTypeList. #endif - + // --------------------------------------------- - + return ndisStatus; } // Set operation for OID_DOT11_WFD_ADDITIONAL_IE -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_ADDITIONAL_IE( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3075,13 +3075,13 @@ N63C_SET_OID_DOT11_WFD_ADDITIONAL_IE( RT_STATUS rtStatus = RT_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); MEMORY_BUFFER mbOidIe = {NULL, 0}; - + // OS-given structure - PDOT11_WFD_ADDITIONAL_IE additionalIEs = + PDOT11_WFD_ADDITIONAL_IE additionalIEs = (PDOT11_WFD_ADDITIONAL_IE) InformationBuffer; #if 0 // Implementation Status - typedef struct _DOT11_WFD_ADDITIONAL_IE + typedef struct _DOT11_WFD_ADDITIONAL_IE { NDIS_OBJECT_HEADER Header; // SKIP ULONG uBeaconIEsOffset; // OK @@ -3092,19 +3092,19 @@ N63C_SET_OID_DOT11_WFD_ADDITIONAL_IE( ULONG uDefaultRequestIEsLength; // OK } DOT11_WFD_ADDITIONAL_IE, *PDOT11_WFD_ADDITIONAL_IE; #endif - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; - + // Additional Beacon IEs ------------------------------------------------------ mbOidIe.Buffer = (PVOID) ((pu1Byte) additionalIEs + additionalIEs->uBeaconIEsOffset); mbOidIe.Length = additionalIEs->uBeaconIEsLength; P2P_AddIe_Set( - &pP2PInfo->AdditionalIEs, - P2P_ADD_IE_BEACON, - additionalIEs->uBeaconIEsLength, + &pP2PInfo->AdditionalIEs, + P2P_ADD_IE_BEACON, + additionalIEs->uBeaconIEsLength, (u1Byte *) additionalIEs + additionalIEs->uBeaconIEsOffset ); @@ -3116,22 +3116,22 @@ N63C_SET_OID_DOT11_WFD_ADDITIONAL_IE( mbOidIe.Length = additionalIEs->uProbeResponseIEsLength; P2P_AddIe_Set( - &pP2PInfo->AdditionalIEs, + &pP2PInfo->AdditionalIEs, P2P_ADD_IE_PROBE_RESPONSE, additionalIEs->uProbeResponseIEsLength, (u1Byte *) additionalIEs + additionalIEs->uProbeResponseIEsOffset ); RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ProbeResponse Additional IE: ====\n", mbOidIe.Buffer, mbOidIe.Length); - + // ------------------------------------------------------------------------------- - + // Additional Default Probe Request IEs -------------------------------------------------- mbOidIe.Buffer = (PVOID) ((pu1Byte) additionalIEs + additionalIEs->uDefaultRequestIEsOffset); mbOidIe.Length = additionalIEs->uDefaultRequestIEsLength; P2P_AddIe_Set( - &pP2PInfo->AdditionalIEs, + &pP2PInfo->AdditionalIEs, P2P_ADD_IE_DEFAULT_REQUEST, additionalIEs->uDefaultRequestIEsLength, (u1Byte *) additionalIEs + additionalIEs->uDefaultRequestIEsOffset @@ -3141,12 +3141,12 @@ N63C_SET_OID_DOT11_WFD_ADDITIONAL_IE( //---------------------------------------------------------------------------------- P2P_CorrectDeviceCategory(pTargetAdapter); - + return ndisStatus; } // Set operation for OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3160,7 +3160,7 @@ N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( PADAPTER pDefaultAdapter = GetDefaultAdapter(pTargetAdapter); PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); BOOLEAN bFilterOutNonAssociatedBSSID = FALSE; - + // OS-given data ULONG deviceDiscoverability = *((PULONG) InformationBuffer); @@ -3175,7 +3175,7 @@ N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( #endif FunctionIn(COMP_P2P); - + // Set the the corresponding variable in the structure pP2PInfo->uListenStateDiscoverability = deviceDiscoverability; RT_TRACE(COMP_OID_SET|COMP_P2P, DBG_LOUD, ("pP2PInfo->uListenStateDiscoverability: %d\n", pP2PInfo->uListenStateDiscoverability)); @@ -3191,7 +3191,7 @@ N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( case DOT11_WFD_DEVICE_AUTO_AVAILABILITY: case DOT11_WFD_DEVICE_HIGH_AVAILABILITY: - default: + default: { pP2PInfo->ExtListenTimingPeriod = 3 * P2P_MGNT_PERIOD; // In the unit of P2P_MGNT_PERIOD pP2PInfo->ExtListenTimingDuration = 150; @@ -3201,7 +3201,7 @@ N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( bFilterOutNonAssociatedBSSID = FALSE; pDefaultAdapter->HalFunc.SetHwRegHandler(pDefaultAdapter, HW_VAR_CHECK_BSSID, (pu1Byte)(&bFilterOutNonAssociatedBSSID)); // ------------------------------------------------------------------------------------------------------------- - + // Device Port is Open -------------------------------------------- //DM_DIG_WifiDirectBoostStart(GetDefaultAdapter(pTargetAdapter)); // ------------------------------------------------------------- @@ -3209,21 +3209,21 @@ N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( if(P2P_STATE_INITIALIZED == pP2PInfo->State) { PlatformCancelTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer); - PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); + PlatformSetTimer(pP2PInfo->pAdapter, &pP2PInfo->P2PMgntTimer, 0); RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("start extended listen immediately\n")); } } break; } - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->ExtListenTimingPeriod: %d\n", pP2PInfo->ExtListenTimingPeriod)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->ExtListenTimingDuration: %d\n", pP2PInfo->ExtListenTimingDuration)); - + return ndisStatus; } // Set operation for OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3235,7 +3235,7 @@ N63C_SET_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); - + // OS-given data PDOT11_WFD_DEVICE_LISTEN_CHANNEL pListenChannel = (PDOT11_WFD_DEVICE_LISTEN_CHANNEL) InformationBuffer; @@ -3261,12 +3261,12 @@ N63C_SET_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( pP2PInfo->ListenChannel = pListenChannel->ChannelNumber; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->ListenChannel: %d\n", pP2PInfo->ListenChannel)); // -------------------------------------------------------------------------------------- - + return ndisStatus; } // Set operation for OID_DOT11_WFD_DISCOVER_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3285,25 +3285,25 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( BOOLEAN bStartDiscovery = TRUE; PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; PP2P_DEVICE_LIST_ENTRY pP2PDeviceListEntry = NULL; - PADAPTER pDefaultAdapter = GetDefaultAdapter(pTargetAdapter); + PADAPTER pDefaultAdapter = GetDefaultAdapter(pTargetAdapter); // Loop iteration variables ULONG i = 0; u8Byte curTime = PlatformGetCurrentTime(); - + // OS-given structure - PDOT11_WFD_DISCOVER_REQUEST discoverRequest = + PDOT11_WFD_DISCOVER_REQUEST discoverRequest = (PDOT11_WFD_DISCOVER_REQUEST) InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; FunctionIn(COMP_OID_SET); - + // Save the Oid Issue time for speeding up the Go Negotiation ---------------- pP2PInfo->LastDeviceDiscoveryOidIssueTime = PlatformGetCurrentTime(); // ------------------------------------------------------------------ - + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: uDiscoverTimeout: %d\n", __FUNCTION__, discoverRequest->uDiscoverTimeout)); // Discover Type @@ -3323,7 +3323,7 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( pP2PInfo->DiscoverSequence = P2P_DISCOVERY_FIND_PHASE; RT_TRACE(COMP_P2P, DBG_LOUD, ("discoverRequest->DiscoverType: dot11_wfd_discover_type_auto\n")); break; - + case dot11_wfd_discover_type_scan_social_channels: pP2PInfo->DiscoverSequence = P2P_DISCOVERY_FIND_PHASE; RT_TRACE(COMP_P2P, DBG_LOUD, ("discoverRequest->DiscoverType: dot11_wfd_discover_type_auto\n")); @@ -3343,12 +3343,12 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( pP2PInfo->ScanType = SCAN_ACTIVE; RT_TRACE(COMP_P2P, DBG_LOUD, ("discoverRequest->ScanType: dot11_wfd_scan_type_auto\n")); break; - + case dot11_wfd_scan_type_active: pP2PInfo->ScanType = SCAN_ACTIVE; RT_TRACE(COMP_P2P, DBG_LOUD, ("discoverRequest->ScanType: dot11_wfd_scan_type_active\n")); break; - + case dot11_wfd_scan_type_passive: default: pP2PInfo->ScanType = SCAN_PASSIVE; @@ -3374,15 +3374,15 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( } } - if(discoverRequest->uNumDeviceFilters == 1) + if(discoverRequest->uNumDeviceFilters == 1) {// specific peer search P2P_DEV_LIST_ENTRY *dev = NULL; u1Byte chnl = 0; - + p2p_DevList_Lock(&pP2PInfo->devList); pP2PInfo->uNumberOfDiscoverForSpecificChannels = 0; - + if(NULL != (dev = p2p_DevList_GetGo(&pP2PInfo->devList, pP2PInfo->ScanDeviceIDs.DeviceIDs[0]))) {// go if(0 != (chnl = p2p_DevList_GetDevChnl(dev))) @@ -3425,7 +3425,7 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( { pP2PInfo->bDiscoverForSpecificChannels = TRUE; pP2PInfo->uNumberOfDiscoverRounds = 10; - RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, "to scan following channels to find specific peer:\n", + RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, "to scan following channels to find specific peer:\n", pP2PInfo->DiscoverForSpecificChannels, pP2PInfo->uNumberOfDiscoverForSpecificChannels); if( pP2PInfo->DeviceListForQuery.uNumberOfDevices != 0 && // If empty device list, force to scan @@ -3439,23 +3439,23 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( { pP2PInfo->bDiscoverForSpecificChannels = FALSE; pP2PInfo->uNumberOfDiscoverRounds = 0; - + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("device entry not found\n")); - + P2PDeviceListActionInterface( - pP2PInfo, + pP2PInfo, P2P_DEVICE_LIST_ACTION_DUMP, - &pP2PInfo->DeviceList, + &pP2PInfo->DeviceList, NULL, NULL ); - + P2PDumpScanList(pP2PInfo->ScanList, pP2PInfo->ScanListSize); } p2p_DevList_Unlock(&pP2PInfo->devList); } else - { + { RT_TRACE(COMP_P2P, DBG_LOUD, ("devicelist empty\n")); if(curTime < MultiportGetLastConnectionActionTime(pTargetAdapter) + P2P_BLOCK_NORMAL_SCAN_PERIOD) @@ -3464,16 +3464,16 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( bStartDiscovery = FALSE; } } - + //---------------------------------------------------------------------------- - + // Additional Probe Request IEs --------------------------------------------------- mbOidIe.Buffer = (PVOID) ((pu1Byte) discoverRequest + discoverRequest->uIEsOffset); mbOidIe.Length = discoverRequest->uIEsLength; P2P_AddIe_Set( - &pP2PInfo->AdditionalIEs, + &pP2PInfo->AdditionalIEs, P2P_ADD_IE_PROBE_REQUEST, discoverRequest->uIEsLength, (u1Byte *) discoverRequest + discoverRequest->uIEsOffset @@ -3482,12 +3482,12 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "ProbeRequest Additional IE:\n", mbOidIe.Buffer, mbOidIe.Length); //---------------------------------------------------------------------------- - + // Set the legacy network scanning ------------------------------------------------ pP2PInfo->bForceScanLegacyNetworks = discoverRequest->bForceScanLegacyNetworks; RT_TRACE(COMP_OID_SET | COMP_P2P, DBG_LOUD, ("%s: pP2PInfo->bForceScanLegacyNetworks: %d\n", __FUNCTION__, pP2PInfo->bForceScanLegacyNetworks)); //---------------------------------------------------------------------------- - + if(bStartDiscovery) { // Win8: Guarantee the packet transmission in the right channel since the this OID will switch channel -------------------------------------------------------------------------------------------- @@ -3505,25 +3505,25 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( RT_TRACE(COMP_OID_SET | COMP_P2P, DBG_LOUD, ("Delay 50 ms to guranatee the action frame transmission in the right channel!\n")); delay_ms(50); - + for(i = 0; MgntScanInProgress(&pP2PInfo->pAdapter->MgntInfo); i++) { RT_TRACE(COMP_OID_SET | COMP_P2P, DBG_LOUD, ("Delay 10 ms to guranatee the packet transmission in the right channel!\n")); delay_ms(10); if(i == 2) // Wait for 30 ms - { + { // Stop scan imediately to wait for new action P2PScanListCeaseScan(pP2PInfo); break; } } - + for(i = 0; pP2PInfo->State != P2P_STATE_INITIALIZED; i++) { RT_TRACE(COMP_OID_SET | COMP_P2P, DBG_LOUD, ("Delay 10 ms to update the P2P state machine!\n")); delay_ms(10); - + if(i == 50) break; } @@ -3534,16 +3534,16 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( &pP2PInfo->DeviceList, NULL, NULL ); - + // Clear the device list for query P2PDeviceListActionInterface( pP2PInfo, P2P_DEVICE_LIST_ACTION_CLEAR, &pP2PInfo->DeviceListForQuery, NULL, NULL - ); - - // Simply do the device discovery since the device discovery may be used as the method to guarantee the common channel + ); + + // Simply do the device discovery since the device discovery may be used as the method to guarantee the common channel P2PResetCommonChannelArrivingProcess(pP2PInfo); // Start the device discovery @@ -3556,7 +3556,7 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( //RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Delay 3000 ms to get additional time to scan!\n")); //delay_ms(3000); // ------------------------------------------------------------------------------------------------------------- - + // Set the indication to OS when the discovery completes pP2PInfo->bDeviceDiscoveryIndicateToOS = TRUE; } @@ -3566,11 +3566,11 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Delay 50 ms to guranatee the packet transmission in the right channel and also update the P2P state machine!\n")); delay_ms(50); // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - + // Let this OID routine run faster than the P2POidPostProcessWorkItemCallback ------ pP2PInfo->bPostoneP2POidPostProcessWorkItem = TRUE; // ---------------------------------------------------------------------- - + // Scheduling the sending of the provision discovery response -------------------------------------- pP2PInfo->OidOperation = OID_OPERATION_INDICATE_DISCOVERY_COMPLETE; #if 1 @@ -3580,13 +3580,13 @@ N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( #endif //---------------------------------------------------------------------------------------- } - + // OS needs this status code ndisStatus = NDIS_STATUS_INDICATION_REQUIRED; // Let the P2POidPostProcessWorkItem Run pP2PInfo->bPostoneP2POidPostProcessWorkItem = FALSE; - + FunctionOut(COMP_OID_SET); return ndisStatus; @@ -3614,10 +3614,10 @@ N63C_QUERY_OID_DOT11_WFD_GET_DIALOG_TOKEN( // Preidict the next token generated by the marco of IncreaseDialogToken(pP2PInfo->DialogToken) : Non-Zero ---------- nextToken = (pP2PInfo->DialogToken + 1 == 0) ? (pP2PInfo->DialogToken + 2) : (pP2PInfo->DialogToken + 1); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("%s: nextToken: %d\n", __FUNCTION__, nextToken)); // -------------------------------------------------------------------------------------------------------- - + *BytesWritten = 1; *((pu1Byte) InformationBuffer) = nextToken; @@ -3648,7 +3648,7 @@ N63C_QUERY_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( *BytesWritten = sizeof(pP2PInfo->uListenStateDiscoverability); *((PULONG) InformationBuffer) = pP2PInfo->uListenStateDiscoverability; RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->uListenStateDiscoverability: %d\n", pP2PInfo->uListenStateDiscoverability)); - + return NDIS_STATUS_SUCCESS; } @@ -3664,17 +3664,17 @@ N63C_QUERY_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( ) { PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); - PDOT11_WFD_DEVICE_LISTEN_CHANNEL + PDOT11_WFD_DEVICE_LISTEN_CHANNEL pListenChannel = (PDOT11_WFD_DEVICE_LISTEN_CHANNEL) InformationBuffer; #if 0 - #define DOT11_WFD_DEVICE_LISTEN_CHANNEL_REVISION_1 - #define DOT11_SIZEOF_WFD_DEVICE_LISTEN_CHANNEL_REVISION_1 + #define DOT11_WFD_DEVICE_LISTEN_CHANNEL_REVISION_1 + #define DOT11_SIZEOF_WFD_DEVICE_LISTEN_CHANNEL_REVISION_1 - typedef struct _DOT11_WFD_DEVICE_LISTEN_CHANNEL { - NDIS_OBJECT_HEADER Header; - UCHAR ChannelNumber; - } DOT11_WFD_DEVICE_LISTEN_CHANNEL, *PDOT11_WFD_DEVICE_LISTEN_CHANNEL; + typedef struct _DOT11_WFD_DEVICE_LISTEN_CHANNEL { + NDIS_OBJECT_HEADER Header; + UCHAR ChannelNumber; + } DOT11_WFD_DEVICE_LISTEN_CHANNEL, *PDOT11_WFD_DEVICE_LISTEN_CHANNEL; #endif // Clean output variables ----------------------------------- @@ -3688,11 +3688,11 @@ N63C_QUERY_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( DOT11_WFD_DEVICE_LISTEN_CHANNEL_REVISION_1, sizeof(DOT11_WFD_DEVICE_LISTEN_CHANNEL) ); - + pListenChannel->ChannelNumber = pP2PInfo->ListenChannel; *BytesWritten = sizeof(DOT11_WFD_DEVICE_LISTEN_CHANNEL); - + RT_TRACE(COMP_P2P, DBG_LOUD, ("pP2PInfo->ListenChannel: %d\n", pP2PInfo->ListenChannel)); return NDIS_STATUS_SUCCESS; @@ -3723,13 +3723,13 @@ N63C_QUERY_OID_DOT11_WFD_ENUM_DEVICE_LIST( MEMORY_BUFFER mbObject = {NULL, 0}; PDOT11_WFD_DEVICE_ENTRY wfdEntry = NULL; u4Byte usedBytes = 0; - + // Skip the MAC header and the first three fields (non-IE) in the beacon and the probe response u4Byte skippedBytes = sMacHdrLng + 12; - + // OS-given data PDOT11_BYTE_ARRAY pByteArray = (PDOT11_BYTE_ARRAY) InformationBuffer; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -3741,20 +3741,20 @@ N63C_QUERY_OID_DOT11_WFD_ENUM_DEVICE_LIST( // Update the device list for the OS query ---------------------- P2PDeviceListActionInterface( - pP2PInfo, + pP2PInfo, P2P_DEVICE_LIST_ACTION_COPY_TO_QUERY_LIST, NULL, NULL, NULL ); // ------------------------------------------------------- - - + + N6_ASSIGN_OBJECT_HEADER( pByteArray->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_DEVICE_ENTRY_BYTE_ARRAY_REVISION_1, sizeof(DOT11_BYTE_ARRAY) ); - + // Compute the requried memory length ------------------------------------------------------------------ *BytesNeeded += FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer); *BytesNeeded += N63CComputeRequiredDeviceEntriesSize(pP2PInfo); @@ -3767,7 +3767,7 @@ N63C_QUERY_OID_DOT11_WFD_ENUM_DEVICE_LIST( return NDIS_STATUS_BUFFER_OVERFLOW; } //----------------------------------------- - + // Fill the device entries ------------------------------------------------------------------------------- wfdEntry = (PDOT11_WFD_DEVICE_ENTRY)((pu1Byte) pByteArray + FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer)); @@ -3775,17 +3775,17 @@ N63C_QUERY_OID_DOT11_WFD_ENUM_DEVICE_LIST( { wfdEntry = (PDOT11_WFD_DEVICE_ENTRY)((pu1Byte) wfdEntry + usedBytes); - N63CConstruct_DOT11_WFD_DEVICE_ENTRY( + N63CConstruct_DOT11_WFD_DEVICE_ENTRY( pP2PInfo, &pP2PInfo->DeviceListForQuery.DeviceEntry[i], wfdEntry, &usedBytes ); - + pByteArray->uNumOfBytes += usedBytes; } //-------------------------------------------------------------------------------------------------- - + // Assertion -------------------------------------------------------------------------------------------- if(pByteArray->uNumOfBytes != N63CComputeRequiredDeviceEntriesSize(pP2PInfo)) { @@ -3804,7 +3804,7 @@ N63C_QUERY_OID_DOT11_WFD_ENUM_DEVICE_LIST( // Set operation for OID_DOT11_WFD_FLUSH_DEVICE_LIST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_FLUSH_DEVICE_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3817,15 +3817,15 @@ N63C_SET_OID_DOT11_WFD_FLUSH_DEVICE_LIST( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); PMGNT_INFO pTargetMgntInfo = &pTargetAdapter->MgntInfo; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; // Clear the scan list PlatformZeroMemory( pTargetMgntInfo->bssDesc, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC ); - pTargetMgntInfo->NumBssDesc = 0; - + pTargetMgntInfo->NumBssDesc = 0; + // Clear the device list P2PDeviceListActionInterface( pP2PInfo, @@ -3833,20 +3833,20 @@ N63C_SET_OID_DOT11_WFD_FLUSH_DEVICE_LIST( &pP2PInfo->DeviceList, NULL, NULL ); - + // Clear the device list for Query P2PDeviceListActionInterface( pP2PInfo, P2P_DEVICE_LIST_ACTION_CLEAR, &pP2PInfo->DeviceListForQuery, NULL, NULL - ); - + ); + return ndisStatus; } // Set operation for OID_DOT11_WFD_STOP_DISCOVERY -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_STOP_DISCOVERY( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3858,7 +3858,7 @@ N63C_SET_OID_DOT11_WFD_STOP_DISCOVERY( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -3868,12 +3868,12 @@ N63C_SET_OID_DOT11_WFD_STOP_DISCOVERY( P2PScanListCeaseScan(pP2PInfo); P2PDeviceDiscoveryComplete(pP2PInfo, TRUE); } - + return ndisStatus; } // Set operation for OID_DOT11_WFD_SEND_INVITATION_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_INVITATION_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3894,7 +3894,7 @@ N63C_SET_OID_DOT11_WFD_SEND_INVITATION_REQUEST( do { DOT11_SEND_INVITATION_REQUEST_PARAMETERS *param = (DOT11_SEND_INVITATION_REQUEST_PARAMETERS *)InformationBuffer; - + if(NULL == (req = N63C_SendAction_InvitationReq(pTargetAdapter, param, n63c_SendP2pReqActionFrameStateCb))) { status = NDIS_STATUS_FAILURE; @@ -3905,12 +3905,12 @@ N63C_SET_OID_DOT11_WFD_SEND_INVITATION_REQUEST( }while(FALSE); FunctionOut(COMP_OID_SET); - + return status; } // Set operation for OID_DOT11_WFD_SEND_INVITATION_RESPONSE -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3936,12 +3936,12 @@ N63C_SET_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( }while(FALSE); FunctionOut(COMP_OID_SET); - + return status; } // Set operation for OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3962,7 +3962,7 @@ N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( do { DOT11_SEND_PROVISION_DISCOVERY_REQUEST_PARAMETERS *param = (DOT11_SEND_PROVISION_DISCOVERY_REQUEST_PARAMETERS *)InformationBuffer; - + if(NULL == (req = N63C_SendAction_PdReq(pTargetAdapter, param, n63c_SendP2pReqActionFrameStateCb))) { status = NDIS_STATUS_FAILURE; @@ -3971,15 +3971,15 @@ N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( status = NDIS_STATUS_INDICATION_REQUIRED; }while(FALSE); - + FunctionOut(COMP_OID_SET); - + return status; } // Set operation for OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4003,14 +4003,14 @@ N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( status = NDIS_STATUS_INDICATION_REQUIRED; }while(FALSE); - + FunctionOut(COMP_OID_SET); - + return status; } // Set operation for OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4022,12 +4022,12 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( { NDIS_STATUS status = NDIS_STATUS_SUCCESS; VOID *req = NULL; - + PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); PADAPTER pDefaultAdapter = GetDefaultAdapter(pTargetAdapter); - + // OS-given structure - PDOT11_SEND_GO_NEGOTIATION_REQUEST_PARAMETERS pParameters = + PDOT11_SEND_GO_NEGOTIATION_REQUEST_PARAMETERS pParameters = (PDOT11_SEND_GO_NEGOTIATION_REQUEST_PARAMETERS) InformationBuffer; // Clear output variables ----- @@ -4042,7 +4042,7 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( if(MgntLinkStatusQuery(GetDefaultAdapter(pP2PInfo->pAdapter)) == RT_MEDIA_CONNECT) { pP2PInfo->OperatingChannel = MultiChannelGetPortConnected20MhzChannel(GetDefaultAdapter(pP2PInfo->pAdapter)); - RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Change op ch to default port connected channel: %d\n", pP2PInfo->OperatingChannel)); + RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Change op ch to default port connected channel: %d\n", pP2PInfo->OperatingChannel)); } else { @@ -4054,7 +4054,7 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( // Shall not change OP channel after the GO has started or the channels for all P2P roles have been defined. #if 0 // (AUTO_CHNL_SEL_NHM ==1) if(IS_AUTO_CHNL_SUPPORT(pDefaultAdapter)) - pP2PInfo->OperatingChannel = P2PIsSocialChannel(GET_AUTO_CHNL_SELECTED_NUM(pDefaultAdapter)) ? + pP2PInfo->OperatingChannel = P2PIsSocialChannel(GET_AUTO_CHNL_SELECTED_NUM(pDefaultAdapter)) ? GET_AUTO_CHNL_SELECTED_NUM(pDefaultAdapter) : P2P_DEFAULT_OPERATING_CHANNEL; else #endif @@ -4063,7 +4063,7 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( pP2PInfo->OperatingChannel = P2P_DEFAULT_OPERATING_CHANNEL; } } - RT_TRACE_F(COMP_P2P, DBG_LOUD, (" [ACS] Change op ch to P2P_DEFAULT_OPERATING_CHANNEL channel: %d\n", pP2PInfo->OperatingChannel)); + RT_TRACE_F(COMP_P2P, DBG_LOUD, (" [ACS] Change op ch to P2P_DEFAULT_OPERATING_CHANNEL channel: %d\n", pP2PInfo->OperatingChannel)); } // ----------------------------------------------------------------------------------------------------------------------------------------------- #endif @@ -4071,7 +4071,7 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( do { DOT11_SEND_GO_NEGOTIATION_REQUEST_PARAMETERS *param = (DOT11_SEND_GO_NEGOTIATION_REQUEST_PARAMETERS *)InformationBuffer; - + if(NULL == (req = N63C_SendAction_GoNegReq(pTargetAdapter, param, n63c_SendP2pReqActionFrameStateCb))) { status = NDIS_STATUS_FAILURE; @@ -4080,14 +4080,14 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( status = NDIS_STATUS_INDICATION_REQUIRED; }while(FALSE); - + FunctionOut(COMP_OID_SET); - + return status; } // Set operation for OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4111,16 +4111,16 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( status = NDIS_STATUS_INDICATION_REQUIRED; }while(FALSE); - + FunctionOut(COMP_OID_SET); - + return status; } // Set operation for OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRM -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRM( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4137,7 +4137,7 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRM( *BytesRead = 0; *BytesNeeded = 0; - + do { PlatformMoveMemory(InfoBuf, InformationBuffer, InformationBufferLength); @@ -4153,7 +4153,7 @@ N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRM( // Set operation for OID_DOT11_WFD_START_GO_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4169,8 +4169,8 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); PADAPTER pDevicePort = GetFirstDevicePort(pDefaultAdapter); PP2P_INFO pDeviceP2PInfo = GET_P2P_INFO(pDevicePort); - - + + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4200,8 +4200,8 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( //{ // Postpone the extended listening for a while // P2PExtendedListenResetCounter(pDeviceP2PInfo); - - // Stop potential device port extended listening + + // Stop potential device port extended listening // P2PScanListCeaseScan(pDeviceP2PInfo); // Delay for a while for running ScanTimer callback by context switch @@ -4220,7 +4220,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( P2PScanListCeaseScan(pDeviceP2PInfo); P2PExtendedListenComplete(pDeviceP2PInfo); } - else if(MgntScanInProgress(&pDefaultAdapter->MgntInfo)) + else if(MgntScanInProgress(&pDefaultAdapter->MgntInfo)) {// Doing normal scan //msDelayStart += 10; // if scan in progress, we have to wait until ScanComplete() finishes P2PScanListCeaseScan(pDeviceP2PInfo); @@ -4249,7 +4249,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( if(0 == pP2PInfo->OperatingChannel) pP2PInfo->OperatingChannel = P2P_DEFAULT_OPERATING_CHANNEL; - + // Note: // Do not change operating channel here becuase the OP channel has been negotiated from the previous // handshake or set by OS. @@ -4264,7 +4264,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( pP2PInfo->OperatingChannel = MultiChannelGetPortConnected20MhzChannel(pDefaultAdapter); #endif - + RT_TRACE((COMP_OID_QUERY | COMP_OID_SET), DBG_LOUD, ("Use Default Port Channel: Channel %d\n", pP2PInfo->OperatingChannel)); } else @@ -4290,7 +4290,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( { PADAPTER pDevicePort = GetFirstDevicePort(pDefaultAdapter); PP2P_INFO pDeviceP2PInfo = GET_P2P_INFO(pDevicePort); - + pDeviceP2PInfo->OperatingChannel = pP2PInfo->OperatingChannel; } @@ -4300,43 +4300,43 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( RT_TRACE_F(COMP_MLME, DBG_LOUD, ("MgntActSet_802_11_CHANNEL_AND_BANDWIDTH\n")); if(pDefaultAdapter->MgntInfo.mAssoc) - { + { HalChangeWirelessMode(pDefaultAdapter, pP2PInfo->OperatingChannel); // Set the operating channel MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - pTargetAdapter, - pP2PInfo->OperatingChannel, - pDefaultAdapter->MgntInfo.pChannelInfo->CurrentChannelBandWidth, - pDefaultAdapter->MgntInfo.pChannelInfo->Ext20MHzChnlOffsetOf40MHz, - pDefaultAdapter->MgntInfo.pChannelInfo->Ext40MHzChnlOffsetOf80MHz, + pTargetAdapter, + pP2PInfo->OperatingChannel, + pDefaultAdapter->MgntInfo.pChannelInfo->CurrentChannelBandWidth, + pDefaultAdapter->MgntInfo.pChannelInfo->Ext20MHzChnlOffsetOf40MHz, + pDefaultAdapter->MgntInfo.pChannelInfo->Ext40MHzChnlOffsetOf80MHz, 0 ); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("Default port is conencted, switch to channel (%d), Bandwidth (%d), 20/40M_Offset (%d), 40/80M_Offset (%d)\n", - pDefaultAdapter->MgntInfo.dot11CurrentChannelNumber, - pDefaultAdapter->MgntInfo.pChannelInfo->CurrentChannelBandWidth, - pDefaultAdapter->MgntInfo.pChannelInfo->Ext20MHzChnlOffsetOf40MHz, + pDefaultAdapter->MgntInfo.dot11CurrentChannelNumber, + pDefaultAdapter->MgntInfo.pChannelInfo->CurrentChannelBandWidth, + pDefaultAdapter->MgntInfo.pChannelInfo->Ext20MHzChnlOffsetOf40MHz, pDefaultAdapter->MgntInfo.pChannelInfo->Ext40MHzChnlOffsetOf80MHz)); } else { - // Set the operating channel + // Set the operating channel MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - pTargetAdapter, - pP2PInfo->OperatingChannel, - CHANNEL_WIDTH_20, - EXTCHNL_OFFSET_NO_EXT, - EXTCHNL_OFFSET_NO_EXT, + pTargetAdapter, + pP2PInfo->OperatingChannel, + CHANNEL_WIDTH_20, + EXTCHNL_OFFSET_NO_EXT, + EXTCHNL_OFFSET_NO_EXT, 0 ); } - + // Resolve the Wrong GO active channel ----------------------------------------------------------------------- { PADAPTER pLoopAdapter = GetDefaultAdapter(pTargetAdapter); RT_TRACE(COMP_P2P, DBG_LOUD, ("Set All SettingBeforeScan.ChannelNumber = %d\n", pP2PInfo->OperatingChannel)); - + while(pLoopAdapter !=NULL) { pLoopAdapter->MgntInfo.dot11CurrentChannelNumber = pP2PInfo->OperatingChannel; @@ -4344,7 +4344,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( pLoopAdapter->MgntInfo.SettingBeforeScan.CenterFrequencyIndex1 = CHNL_GetCenterFrequency(pP2PInfo->OperatingChannel,pLoopAdapter->MgntInfo.SettingBeforeScan.ChannelBandwidth, pLoopAdapter->MgntInfo.SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz); pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } - + pLoopAdapter = GetDefaultAdapter(pTargetAdapter); // Prefast warning 6011 Dereferencing NULL pointer 'pLoopAdapter'. if (pLoopAdapter != NULL) @@ -4354,7 +4354,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( pLoopAdapter->MgntInfo.SettingBeforeScan.ChannelNumber, pLoopAdapter->MgntInfo.SettingBeforeScan.CenterFrequencyIndex1)); } - + } // -------------------------------------------------------------------------------------------------------- @@ -4371,11 +4371,11 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( { RT_TRACE(COMP_P2P, DBG_LOUD, ("pAdapter->pNdis62Common->PortNumber: %d\n", pAdapter->pNdis62Common->PortNumber)); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "pAdapter->MgntInfo.Bssid: ", pAdapter->MgntInfo.Bssid); - + pAdapter = GetNextExtAdapter(pAdapter); } } - + if(ndisStatus == NDIS_STATUS_SUCCESS) { PlatformIndicateP2PEvent(pP2PInfo, P2P_EVENT_GO_OPERATING_CHANNEL, NULL); @@ -4387,7 +4387,7 @@ N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( } // Set operation for OID_DOT11_WFD_GROUP_START_PARAMETERS -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_GROUP_START_PARAMETERS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4399,13 +4399,13 @@ N63C_SET_OID_DOT11_WFD_GROUP_START_PARAMETERS( { #if 0 #define DOT11_WFD_GROUP_START_PARAMETERS_REVISION_1 1 - - typedef struct _DOT11_WFD_GROUP_START_PARAMETERS { + + typedef struct _DOT11_WFD_GROUP_START_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_WFD_CHANNEL AdvertisedOperatingChannel; } DOT11_WFD_GROUP_START_PARAMETERS, * PDOT11_WFD_GROUP_START_PARAMETERS; - typedef struct _DOT11_WFD_CHANNEL + typedef struct _DOT11_WFD_CHANNEL { DOT11_COUNTRY_OR_REGION_STRING CountryRegionString; UCHAR OperatingClass; @@ -4416,29 +4416,29 @@ N63C_SET_OID_DOT11_WFD_GROUP_START_PARAMETERS( PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); // OS-given structure - PDOT11_WFD_GROUP_START_PARAMETERS pParameters = + PDOT11_WFD_GROUP_START_PARAMETERS pParameters = (PDOT11_WFD_GROUP_START_PARAMETERS) InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; - + FunctionIn(COMP_OID_SET | COMP_OID_QUERY); - + // Only consider the channel number - pP2PInfo->OperatingChannel = pParameters->AdvertisedOperatingChannel.ChannelNumber; + pP2PInfo->OperatingChannel = pParameters->AdvertisedOperatingChannel.ChannelNumber; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pParameters->AdvertisedOperatingChannel.ChannelNumber: %d\n", pParameters->AdvertisedOperatingChannel.ChannelNumber)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->OperatingChannel: %d\n", pP2PInfo->OperatingChannel)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return NDIS_STATUS_SUCCESS; } - + // Set operation for OID_DOT11_WFD_GROUP_JOIN_PARAMETERS -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4449,8 +4449,8 @@ N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( ) { #if 0 - typedef - struct _DOT11_WFD_GROUP_JOIN_PARAMETERS { + typedef + struct _DOT11_WFD_GROUP_JOIN_PARAMETERS { NDIS_OBJECT_HEADER Header; DOT11_WFD_CHANNEL GOOperatingChannel; ULONG GOConfigTime; @@ -4466,24 +4466,24 @@ N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( PP2P_DEVICE_LIST_ENTRY pP2PDeviceListEntry = NULL; // OS-given structure - PDOT11_WFD_GROUP_JOIN_PARAMETERS pParameters = + PDOT11_WFD_GROUP_JOIN_PARAMETERS pParameters = (PDOT11_WFD_GROUP_JOIN_PARAMETERS) InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; - + FunctionIn(COMP_OID_SET | COMP_OID_QUERY); - + // Only consider the channel number RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pParameters->GOConfigTime: %d\n", pParameters->GOConfigTime)); - pP2PInfo->OperatingChannel = pParameters->GOOperatingChannel.ChannelNumber; + pP2PInfo->OperatingChannel = pParameters->GOOperatingChannel.ChannelNumber; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->OperatingChannel: %d\n", pP2PInfo->OperatingChannel)); pP2PInfo->ClientJoinGroupContext.bInGroupFormation = pParameters->bInGroupFormation; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->ClientJoinGroupContext.bInGroupFormation: %d\n", pP2PInfo->ClientJoinGroupContext.bInGroupFormation)); - + pP2PInfo->ClientJoinGroupContext.WpsState = (pParameters->bWaitForWPSReady) ? P2P_CLIETN_JOIN_GROUP_WPS_STATE_SCANNING : P2P_CLIETN_JOIN_GROUP_WPS_STATE_NONE; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("pP2PInfo->ClientJoinGroupContext.WpsState: %d\n", pP2PInfo->ClientJoinGroupContext.WpsState)); @@ -4492,10 +4492,10 @@ N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( if(pP2PInfo->OperatingChannel == 0) { RT_PRINT_ADDR(COMP_OID_SET, DBG_LOUD, "pP2PInfo->DesiredTargetMacAddress: ", pP2PInfo->DesiredTargetMacAddress); - - // From Win8 Specific Device Information Pool + + // From Win8 Specific Device Information Pool pP2PDeviceListEntry = P2PDeviceListFind(&pDeviceP2PInfo->DeviceList, pP2PInfo->DesiredTargetMacAddress); - + // From Common Device Information Pool: Use Interface Address pP2PDeviceDesc = P2PScanListFind(pDeviceP2PInfo->ScanList, pDeviceP2PInfo->ScanListSize, NULL, pP2PInfo->DesiredTargetMacAddress, NULL); @@ -4514,9 +4514,9 @@ N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("No Peer Observed: pP2PInfo->OperatingChannel: %d\n", pP2PInfo->OperatingChannel)); P2PDeviceListActionInterface( - pDeviceP2PInfo, + pDeviceP2PInfo, P2P_DEVICE_LIST_ACTION_DUMP, - &pDeviceP2PInfo->DeviceList, + &pDeviceP2PInfo->DeviceList, NULL, NULL ); @@ -4527,14 +4527,14 @@ N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return NDIS_STATUS_SUCCESS; } // Set operation for OID_DOT11_WFD_DESIRED_GROUP_ID -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_DESIRED_GROUP_ID( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4545,10 +4545,10 @@ N63C_SET_OID_DOT11_WFD_DESIRED_GROUP_ID( ) { #if 0 - typedef struct _DOT11_WFD_GROUP_ID + typedef struct _DOT11_WFD_GROUP_ID { DOT11_MAC_ADDRESS DeviceAddress; - DOT11_SSID SSID; + DOT11_SSID SSID; } DOT11_WFD_GROUP_ID, * PDOT11_WFD_GROUP_ID; typedef struct _DOT11_SSID @@ -4572,11 +4572,11 @@ N63C_SET_OID_DOT11_WFD_DESIRED_GROUP_ID( // OS-given structure PDOT11_WFD_GROUP_ID pParameters = (PDOT11_WFD_GROUP_ID) InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; - + FunctionIn(COMP_OID_SET); RT_PRINT_ADDR(COMP_OID_SET, DBG_LOUD, "Target GO MAC Address: ", pParameters->DeviceAddress); @@ -4591,29 +4591,29 @@ N63C_SET_OID_DOT11_WFD_DESIRED_GROUP_ID( { return NDIS_STATUS_INVALID_LENGTH; } - + N6_ASSIGN_OBJECT_HEADER( SsidList.Header, - NDIS_OBJECT_TYPE_DEFAULT, - DOT11_SSID_LIST_REVISION_1, + NDIS_OBJECT_TYPE_DEFAULT, + DOT11_SSID_LIST_REVISION_1, sizeof(DOT11_SSID_LIST) ); - + SsidList.uNumOfEntries = 1; SsidList.SSIDs[0] = pParameters->SSID; pNdisCommon->dot11DesiredSSIDList = SsidList; - - + + FunctionOut(COMP_OID_SET); - + return ndisStatus; } // Set operation for OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4629,9 +4629,9 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( PADAPTER pDevicePort = GetFirstDevicePort(pTargetAdapter); PP2P_INFO pDeviceP2PInfo = GET_P2P_INFO(pDevicePort); PP2P_DEVICE_DISCRIPTOR pP2PDeviceDesc = NULL; - PP2P_DEVICE_LIST_ENTRY pP2PDeviceListEntry = NULL; + PP2P_DEVICE_LIST_ENTRY pP2PDeviceListEntry = NULL; u1Byte i = 0; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4647,9 +4647,9 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( { RT_PRINT_ADDR(COMP_OID_SET, DBG_LOUD, "pP2PInfo->DesiredTargetMacAddress: ", pP2PInfo->DesiredTargetMacAddress); - // From Win8 Specific Device Information Pool + // From Win8 Specific Device Information Pool pP2PDeviceListEntry = P2PDeviceListFind(&pDeviceP2PInfo->DeviceList, pP2PInfo->DesiredTargetMacAddress); - + // From Common Device Information Pool: Use Interface Address pP2PDeviceDesc = P2PScanListFind(pDeviceP2PInfo->ScanList, pDeviceP2PInfo->ScanListSize, NULL, pP2PInfo->DesiredTargetMacAddress, NULL); @@ -4668,9 +4668,9 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("No Peer Observed: pP2PInfo->OperatingChannel: %d\n", pP2PInfo->OperatingChannel)); P2PDeviceListActionInterface( - pDeviceP2PInfo, + pDeviceP2PInfo, P2P_DEVICE_LIST_ACTION_DUMP, - &pDeviceP2PInfo->DeviceList, + &pDeviceP2PInfo->DeviceList, NULL, NULL ); @@ -4683,7 +4683,7 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( if(IS_DUAL_BAND_SUPPORT(pTargetAdapter)) { WIRELESS_MODE wirelessmode; - + if(IS_WIRELESS_MODE_5G(pTargetAdapter)) { if(pP2PInfo->OperatingChannel < 14) @@ -4703,21 +4703,21 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( } } } -#else +#else RT_TRACE_F(COMP_MLME, DBG_LOUD, ("ChangeWirelessModeHandler\n")); HalChangeWirelessMode(pTargetAdapter, pP2PInfo->OperatingChannel); -// SetupWirelessMode(pTargetAdapter, pP2PInfo->OperatingChannel); +// SetupWirelessMode(pTargetAdapter, pP2PInfo->OperatingChannel); #endif // Swith to the Right Target Channel specified in OID_DOT11_WFD_GROUP_JOIN_PARAMETERS -- MgntActSet_802_11_CHANNEL_AND_BANDWIDTH( - pTargetAdapter, - pP2PInfo->OperatingChannel, - CHANNEL_WIDTH_20, - EXTCHNL_OFFSET_NO_EXT, - EXTCHNL_OFFSET_NO_EXT, + pTargetAdapter, + pP2PInfo->OperatingChannel, + CHANNEL_WIDTH_20, + EXTCHNL_OFFSET_NO_EXT, + EXTCHNL_OFFSET_NO_EXT, 0 - ); + ); // ------------------------------------------------------------------------------- if(P2P_CLIETN_JOIN_GROUP_WPS_STATE_NONE == pP2PInfo->ClientJoinGroupContext.WpsState) @@ -4738,7 +4738,7 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( VOID *customScanInfo = GET_CUSTOM_SCAN_INFO(pTargetAdapter); ADAPTER *pDevAdapter = NULL; P2P_INFO *pDevP2PInfo = NULL; - + pP2PInfo->ClientJoinGroupContext.uWaitForWpsSlotCount = 50; // Wait for Connection : 5 sec PlatformSetTimer(pTargetAdapter, &pP2PInfo->ClientJoinGroupContext.P2PWaitForWpsReadyTimer, 120); @@ -4747,22 +4747,22 @@ N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( && NULL != (customScanReq = CustomScan_AllocReq(customScanInfo, NULL, NULL)) ) { - CustomScan_AddScanChnl(customScanReq, pDevP2PInfo->ListenChannel, + CustomScan_AddScanChnl(customScanReq, pDevP2PInfo->ListenChannel, 1, SCAN_PASSIVE, 100, P2P_LOWEST_RATE, NULL); - + CustomScan_IssueReq(customScanInfo, customScanReq, CUSTOM_SCAN_SRC_TYPE_P2P, "make cli dev discoverable by GO"); } } FunctionOut(COMP_OID_SET); - + return ndisStatus; } - + // Set operation for OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST -static NDIS_STATUS +static NDIS_STATUS N63C_SET_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4775,10 +4775,10 @@ N63C_SET_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( PP2P_INFO pP2PInfo = GET_P2P_INFO(pTargetAdapter); NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // OS-given structure //PDOT11_WFD_GROUP_ID pParameters = (PDOT11_WFD_GROUP_ID) InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4798,9 +4798,9 @@ N63C_SET_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( // Reset the variable in OID_DOT11_WFD_GROUP_START_PARAMETERS ------------------ P2PResetClientJoinGroupContext(pP2PInfo); // --------------------------------------------------------------------------- - + FunctionOut(COMP_OID_SET); - + return ndisStatus; } @@ -4816,7 +4816,7 @@ N63C_QUERY_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -4828,15 +4828,15 @@ N63C_QUERY_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( } //====================================================================================== -// Public Functions +// Public Functions //====================================================================================== VOID N63CIndicateP2PEvent( - PVOID pvP2PInfo, + PVOID pvP2PInfo, u4Byte EventID, PMEMORY_BUFFER pInformation -) +) { PP2P_INFO pP2PInfo = (PP2P_INFO) pvP2PInfo; PADAPTER pAdapter = pP2PInfo->pAdapter; @@ -4873,12 +4873,12 @@ N63CIndicateP2PEvent( RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_DEVICE_DISCOVERY_COMPLETE\n")); N63CIndicateDeviceDiscoveryComplete(pP2PInfo); break; - + case P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE: RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE\n")); N63CIndicateProvisionDiscoveryRequestSendComplete(pP2PInfo, pInformation); break; - + case P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_REQUEST: { RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_REQUEST\n")); @@ -4895,17 +4895,17 @@ N63CIndicateP2PEvent( } } break; - + case P2P_EVENT_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE: RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE\n")); N63CIndicateProvisionDiscoveryResponseSendComplete(pP2PInfo, pInformation); break; - + case P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE: RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE\n")); //N63CIndicateReceivedProvisionDiscoveryResponse(pP2PInfo, pInformation); break; - + case P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE: RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE\n")); N63CIndicateNegotiationRequestSendComplete(pP2PInfo, pInformation); @@ -4929,7 +4929,7 @@ N63CIndicateP2PEvent( } } break; - + case P2P_EVENT_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE: { RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE\n")); @@ -4937,7 +4937,7 @@ N63CIndicateP2PEvent( } break; - case P2P_EVENT_RECEIVED_GO_NEGOTIATION_RESPONSE: + case P2P_EVENT_RECEIVED_GO_NEGOTIATION_RESPONSE: RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_RECEIVED_GO_NEGOTIATION_RESPONSE\n")); //N63CIndicateReceivedGONegotiationResponse(pP2PInfo, pInformation); break; @@ -4983,12 +4983,12 @@ N63CIndicateP2PEvent( RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_RECEIVED_INVITATION_RESPONSE\n")); //N63CIndicateReceivedInvitationResponse(pP2PInfo, pInformation); break; - + case P2P_EVENT_GO_OPERATING_CHANNEL: RT_TRACE_F(COMP_INDIC | COMP_P2P, DBG_LOUD, ("P2P_EVENT_GO_OPERATING_CHANNEL\n")); N63CIndicateGOOperatingChannel(pP2PInfo, pInformation); break; - + case P2P_EVENT_NONE: default: RT_TRACE_F(COMP_P2P, DBG_TRACE, ("EventID (0x%08X) Unrecognized!\n", EventID)); @@ -5017,7 +5017,7 @@ N63C_OID_DOT11_WFD_DEVICE_CAPABILITY( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5025,7 +5025,7 @@ N63C_OID_DOT11_WFD_DEVICE_CAPABILITY( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_DEVICE_CAPABILITY( @@ -5073,7 +5073,7 @@ N63C_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5081,7 +5081,7 @@ N63C_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_GROUP_OWNER_CAPABILITY( @@ -5129,7 +5129,7 @@ N63C_OID_DOT11_WFD_DEVICE_INFO( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5137,7 +5137,7 @@ N63C_OID_DOT11_WFD_DEVICE_INFO( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_DEVICE_INFO( @@ -5185,7 +5185,7 @@ N63C_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5193,7 +5193,7 @@ N63C_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST( @@ -5249,7 +5249,7 @@ N63C_OID_DOT11_WFD_DISCOVER_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_DISCOVER_REQUEST( @@ -5284,7 +5284,7 @@ N63C_OID_DOT11_WFD_GET_DIALOG_TOKEN( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5297,7 +5297,7 @@ N63C_OID_DOT11_WFD_GET_DIALOG_TOKEN( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5309,10 +5309,10 @@ N63C_OID_DOT11_WFD_GET_DIALOG_TOKEN( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -5340,7 +5340,7 @@ N63C_OID_DOT11_WFD_ENUM_DEVICE_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5353,7 +5353,7 @@ N63C_OID_DOT11_WFD_ENUM_DEVICE_LIST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5365,10 +5365,10 @@ N63C_OID_DOT11_WFD_ENUM_DEVICE_LIST( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -5409,7 +5409,7 @@ N63C_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5421,10 +5421,10 @@ N63C_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( @@ -5448,7 +5448,7 @@ N63C_OID_DOT11_WFD_LISTEN_STATE_DISCOVERABILITY( } }while(FALSE); - + return ndisStatus; } @@ -5472,7 +5472,7 @@ N63C_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5484,10 +5484,10 @@ N63C_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( @@ -5511,11 +5511,11 @@ N63C_OID_DOT11_WFD_DEVICE_LISTEN_CHANNEL( } }while(FALSE); - + return ndisStatus; } - + NDIS_STATUS N63C_OID_DOT11_WFD_ADDITIONAL_IE( PADAPTER pAdapter, @@ -5536,7 +5536,7 @@ N63C_OID_DOT11_WFD_ADDITIONAL_IE( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5544,7 +5544,7 @@ N63C_OID_DOT11_WFD_ADDITIONAL_IE( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_ADDITIONAL_IE( @@ -5568,7 +5568,7 @@ N63C_OID_DOT11_WFD_ADDITIONAL_IE( } }while(FALSE); - + return ndisStatus; } @@ -5579,7 +5579,7 @@ N63C_OID_DOT11_WFD_FLUSH_DEVICE_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5592,7 +5592,7 @@ N63C_OID_DOT11_WFD_FLUSH_DEVICE_LIST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5600,7 +5600,7 @@ N63C_OID_DOT11_WFD_FLUSH_DEVICE_LIST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_FLUSH_DEVICE_LIST( @@ -5624,7 +5624,7 @@ N63C_OID_DOT11_WFD_FLUSH_DEVICE_LIST( } }while(FALSE); - + return ndisStatus; } @@ -5635,7 +5635,7 @@ N63C_OID_DOT11_WFD_STOP_DISCOVERY( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5648,7 +5648,7 @@ N63C_OID_DOT11_WFD_STOP_DISCOVERY( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5656,7 +5656,7 @@ N63C_OID_DOT11_WFD_STOP_DISCOVERY( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_STOP_DISCOVERY( @@ -5680,7 +5680,7 @@ N63C_OID_DOT11_WFD_STOP_DISCOVERY( } }while(FALSE); - + return ndisStatus; } @@ -5691,7 +5691,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5704,7 +5704,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5712,7 +5712,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST( @@ -5747,11 +5747,11 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); - + do { // Validate if the OID is issued in the correct state and mode @@ -5760,7 +5760,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5768,7 +5768,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( @@ -5792,7 +5792,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_RESPONSE( } }while(FALSE); - + return ndisStatus; } @@ -5803,7 +5803,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRMATION( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5816,7 +5816,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRMATION( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5824,7 +5824,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRMATION( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus =N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRM( @@ -5848,7 +5848,7 @@ N63C_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRMATION( } }while(FALSE); - + return ndisStatus; } @@ -5859,7 +5859,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5872,7 +5872,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5880,7 +5880,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SEND_INVITATION_REQUEST( @@ -5915,7 +5915,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5928,7 +5928,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5936,7 +5936,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( @@ -5960,7 +5960,7 @@ N63C_OID_DOT11_WFD_SEND_INVITATION_RESPONSE( } }while(FALSE); - + return ndisStatus; } @@ -5971,7 +5971,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -5984,7 +5984,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -5992,7 +5992,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST( @@ -6027,7 +6027,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6040,7 +6040,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6048,7 +6048,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( @@ -6072,7 +6072,7 @@ N63C_OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE( } }while(FALSE); - + return ndisStatus; } @@ -6083,7 +6083,7 @@ N63C_OID_DOT11_WFD_DESIRED_GROUP_ID( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6098,7 +6098,7 @@ N63C_OID_DOT11_WFD_DESIRED_GROUP_ID( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6106,7 +6106,7 @@ N63C_OID_DOT11_WFD_DESIRED_GROUP_ID( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_DESIRED_GROUP_ID( @@ -6134,7 +6134,7 @@ N63C_OID_DOT11_WFD_DESIRED_GROUP_ID( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6146,7 +6146,7 @@ N63C_OID_DOT11_WFD_START_GO_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6161,7 +6161,7 @@ N63C_OID_DOT11_WFD_START_GO_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6169,7 +6169,7 @@ N63C_OID_DOT11_WFD_START_GO_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_START_GO_REQUEST( @@ -6195,9 +6195,9 @@ N63C_OID_DOT11_WFD_START_GO_REQUEST( }while(FALSE); RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); - + FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6208,7 +6208,7 @@ N63C_OID_DOT11_WFD_GROUP_START_PARAMETERS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6223,7 +6223,7 @@ N63C_OID_DOT11_WFD_GROUP_START_PARAMETERS( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6231,7 +6231,7 @@ N63C_OID_DOT11_WFD_GROUP_START_PARAMETERS( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_GROUP_START_PARAMETERS( @@ -6259,7 +6259,7 @@ N63C_OID_DOT11_WFD_GROUP_START_PARAMETERS( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6270,7 +6270,7 @@ N63C_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6282,10 +6282,10 @@ N63C_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( // Validate if the OID is issued in the correct state and mode ndisStatus = N63CValidateOIDCorrectness(pAdapter, NdisRequest); if(ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); + RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6293,7 +6293,7 @@ N63C_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( @@ -6321,7 +6321,7 @@ N63C_OID_DOT11_WFD_CONNECT_TO_GROUP_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6332,7 +6332,7 @@ N63C_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6347,7 +6347,7 @@ N63C_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6355,7 +6355,7 @@ N63C_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( @@ -6383,7 +6383,7 @@ N63C_OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6394,7 +6394,7 @@ N63C_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6406,10 +6406,10 @@ N63C_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( // Validate if the OID is issued in the correct state and mode ndisStatus = N63CValidateOIDCorrectness(pAdapter, NdisRequest); if(ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); + RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); break; } - + switch (NdisRequest->RequestType) { // Query @@ -6417,7 +6417,7 @@ N63C_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( @@ -6445,13 +6445,13 @@ N63C_OID_DOT11_WFD_GROUP_JOIN_PARAMETERS( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } // // Note : This OID not define in NDIS_63 . -// It may support in Vista or Win7 futher. +// It may support in Vista or Win7 futher. // So it may remove to N6CSet_ , if N6 support !! // // @@ -6474,7 +6474,7 @@ N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( PDOT11_OFFLOAD_NETWORK pONList; u4Byte ChannelIndex = 0; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + pONLInfo = (PDOT11_OFFLOAD_NETWORK_LIST_INFO) InformationBuffer; RT_TRACE( (COMP_MLME|COMP_OID_SET), DBG_LOUD , (" ===>N63CSet_OID_DOT11_OFFLOAD_NETWORK_LIST\n") ); @@ -6511,7 +6511,7 @@ N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( pNLOInfo->FastScanPeriod = 0; pNLOInfo->SlowScanPeriod = 0; pNdisCommon->ScanPeriod = 0; - + RT_TRACE( (COMP_MLME|COMP_OID_SET), DBG_LOUD , (" ===>pONLInfo->uNumOfEntries == 0 \n") ); return NDIS_STATUS_SUCCESS; } @@ -6545,11 +6545,11 @@ N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( pONList = pONLInfo->offloadNetworkList; - + for( Index = 0 ; Index < pONLInfo->uNumOfEntries ; Index++ ) { - // Copy SSID - CopySsid( pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf , + // Copy SSID + CopySsid( pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf , pNLOInfo->dDot11OffloadNetworkList[Index].ssidlen, pONList[Index].Ssid.ucSSID , pONList[Index].Ssid.uSSIDLength); @@ -6571,15 +6571,15 @@ N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy = TRUE; pNLOInfo->dDot11OffloadNetworkList[Index].chiper = 0x0; break; - case DOT11_CIPHER_ALGO_TKIP : - if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_WPA || + case DOT11_CIPHER_ALGO_TKIP : + if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_WPA || pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_WPA_PSK ) { pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA; pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy = TRUE; pNLOInfo->dDot11OffloadNetworkList[Index].chiper = WPA_TKIP; } - else if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_RSNA || + else if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_RSNA || pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_RSNA_PSK ) { pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA2; @@ -6594,14 +6594,14 @@ N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( } break; case DOT11_CIPHER_ALGO_CCMP : - if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_WPA || + if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_WPA || pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_WPA_PSK ) { pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA; pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy = TRUE; pNLOInfo->dDot11OffloadNetworkList[Index].chiper = WPA_AES; } - else if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_RSNA || + else if( pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_RSNA || pONList[Index].AuthAlgo == DOT11_AUTH_ALGO_RSNA_PSK ) { pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA2; @@ -6628,18 +6628,18 @@ N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( RT_TRACE(COMP_MLME , DBG_LOUD , (" bPrivacy : %d\n", pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy) ); RT_TRACE(COMP_MLME , DBG_LOUD , (" chiper : %d\n", pNLOInfo->dDot11OffloadNetworkList[Index].chiper) ); - // Save channel info + // Save channel info // DOT11_MAX_CHANNEL_HINTS 4 for( ChannelIndex = 0 ; ChannelIndex < 4 ; ChannelIndex++ ) { pNLOInfo->dDot11OffloadNetworkList[Index].channelNumberHit[ChannelIndex] = pONList[Index].Dot11ChannelHints[ChannelIndex].uChannelNumber; } - - // Show Entry information !! + + // Show Entry information !! RT_TRACE( (COMP_MLME|COMP_OID_SET), DBG_LOUD , (" ===> Show NLO info Index (%x):\n",Index) ); RT_PRINT_STR((COMP_MLME|COMP_OID_SET), DBG_LOUD, (" SSID :\n"), pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf, pNLOInfo->dDot11OffloadNetworkList[Index].ssidlen); RT_TRACE( (COMP_MLME|COMP_OID_SET) , DBG_LOUD , ( "chiper : %x \n", pNLOInfo->dDot11OffloadNetworkList[Index].chiper) ) - + } return ndisStatus; @@ -6652,7 +6652,7 @@ N63C_OID_DOT11_OFFLOAD_NETWORK_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6664,10 +6664,10 @@ N63C_OID_DOT11_OFFLOAD_NETWORK_LIST( // Validate if the OID is issued in the correct state and mode //ndisStatus = N63CValidateOIDCorrectness(pAdapter, NdisRequest); //if(ndisStatus != NDIS_STATUS_SUCCESS) { - // RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); + // RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); // break; //} - + switch (NdisRequest->RequestType) { // Query @@ -6675,7 +6675,7 @@ N63C_OID_DOT11_OFFLOAD_NETWORK_LIST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_OFFLOAD_NETWORK_LIST( @@ -6703,7 +6703,7 @@ N63C_OID_DOT11_OFFLOAD_NETWORK_LIST( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6718,12 +6718,12 @@ N63C_SET_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( ) { /* - #define DOT11_POWER_MGMT_AUTO_MODE_ENABLED_REVISION_1 - #define DOT11_SIZEOF_POWER_MGMT_AUTO_MODE_ENABLED_REVISION_1 - typedef struct _ DOT11_POWER_MGMT_MODE_AUTO_INFO { - NDIS_OBJECT_HEADER Header; - BOOLEAN bEnabled; - } DOT11_POWER_MGMT_AUTO_MODE_ENABLED_INFO, * PDOT11_POWER_MGMT_AUTO_MODE_ENABLED_INFO; + #define DOT11_POWER_MGMT_AUTO_MODE_ENABLED_REVISION_1 + #define DOT11_SIZEOF_POWER_MGMT_AUTO_MODE_ENABLED_REVISION_1 + typedef struct _ DOT11_POWER_MGMT_MODE_AUTO_INFO { + NDIS_OBJECT_HEADER Header; + BOOLEAN bEnabled; + } DOT11_POWER_MGMT_AUTO_MODE_ENABLED_INFO, * PDOT11_POWER_MGMT_AUTO_MODE_ENABLED_INFO; */ PDOT11_POWER_MGMT_AUTO_MODE_ENABLED_INFO pPMGAuModInf; PADAPTER pDefaultAdapter = GetDefaultAdapter(pTargetAdapter); @@ -6734,9 +6734,9 @@ N63C_SET_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( { *BytesNeeded = DOT11_SIZEOF_POWER_MGMT_AUTO_MODE_ENABLE_INFO_REVISION_1; return NDIS_STATUS_INVALID_LENGTH; - + } - + pPMGAuModInf = (PDOT11_POWER_MGMT_AUTO_MODE_ENABLED_INFO)InformationBuffer; @@ -6754,7 +6754,7 @@ N63C_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6766,10 +6766,10 @@ N63C_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( // Validate if the OID is issued in the correct state and mode //ndisStatus = N63CValidateOIDCorrectness(pAdapter, NdisRequest); //if(ndisStatus != NDIS_STATUS_SUCCESS) { - // RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); + // RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); // break; //} - + switch (NdisRequest->RequestType) { // Query @@ -6777,7 +6777,7 @@ N63C_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N63C_SET_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( @@ -6805,7 +6805,7 @@ N63C_OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6825,7 +6825,7 @@ N63C_QUERY_OID_DOT11_POWER_MGMT_MODE_STATUS( PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -6833,18 +6833,18 @@ N63C_QUERY_OID_DOT11_POWER_MGMT_MODE_STATUS( - // This has errors. Please contact CCW. + // This has errors. Please contact CCW. return NDIS_STATUS_FAILURE; - + if( !pMgntInfo->bInAutoPowerSavemode ) { pDot11PMStaInfo->PowerSaveMode = dot11_power_mode_active; pDot11PMStaInfo->uPowerSaveLevel = DOT11_POWER_SAVING_NO_POWER_SAVING; pDot11PMStaInfo->Reason = dot11_power_mode_reason_no_change; } - else + else { if(pMgntInfo->dot11PowerSaveMode == eActive) //if( pPSC->PowerSaveLevel == POWER_SAVING_NO_POWER_SAVING) @@ -6873,7 +6873,7 @@ N63C_QUERY_OID_DOT11_POWER_MGMT_MODE_STATUS( // pDot11PMStaInfo->uPowerSaveLevel = DOT11_POWER_SAVING_MAXIMUM_LEVEL; // pDot11PMStaInfo->Reason = dot11_power_mode_reason_compliant_AP; //} - else + else { pDot11PMStaInfo->PowerSaveMode = dot11_power_mode_powersave; pDot11PMStaInfo->uPowerSaveLevel = DOT11_POWER_SAVING_FAST_PSP; @@ -6882,7 +6882,7 @@ N63C_QUERY_OID_DOT11_POWER_MGMT_MODE_STATUS( } RT_TRACE( COMP_TEST, DBG_LOUD , ("===>_DOT11_POWER_MGMT_MODE_STATUS \n") ); - + return ndisStatus; } @@ -6894,7 +6894,7 @@ N63C_OID_DOT11_POWER_MGMT_MODE_STATUS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6906,10 +6906,10 @@ N63C_OID_DOT11_POWER_MGMT_MODE_STATUS( // Validate if the OID is issued in the correct state and mode //ndisStatus = N63CValidateOIDCorrectness(pAdapter, NdisRequest); //if(ndisStatus != NDIS_STATUS_SUCCESS) { - // RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); + // RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("%s: State Error!\n", __FUNCTION__)); // break; //} - + switch (NdisRequest->RequestType) { // Query @@ -6921,10 +6921,10 @@ N63C_OID_DOT11_POWER_MGMT_MODE_STATUS( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -6945,7 +6945,7 @@ N63C_OID_DOT11_POWER_MGMT_MODE_STATUS( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; } @@ -6956,7 +6956,7 @@ N63C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -6965,7 +6965,7 @@ N63C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( do { - + switch (NdisRequest->RequestType) { // Query @@ -6977,10 +6977,10 @@ N63C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -7001,7 +7001,7 @@ N63C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT( RT_TRACE((COMP_OID_SET | COMP_OID_QUERY), DBG_LOUD, ("ndisStatus: %d\n", ndisStatus)); FunctionOut(COMP_OID_SET | COMP_OID_QUERY); - + return ndisStatus; - + } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.h b/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.h index 116c8bc80..ffce573d0 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N63C_Oids.h @@ -5,7 +5,7 @@ #define _N63C_OIDS_H // ------------------------------------------------------------------------------------------------ -// Definitions +// Definitions // ------------------------------------------------------------------------------------------------ // Set the correct state which the OID can be accepted @@ -52,7 +52,7 @@ N63CResetWifiDirectPorts( VOID N63CIndicateP2PEvent( - PVOID pP2PInfo, + PVOID pP2PInfo, u4Byte EventID, PMEMORY_BUFFER pInformation ); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.c b/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.c index 0d15aee05..02f205013 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.c @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: N63C_SendAction.c -// Description: +// Description: // // Author: haich // @@ -118,12 +118,12 @@ n63c_SendAction_PrepareReq( OffChnlTx_SetProbeEnabled(req, TRUE); OffChnlTx_SetTxChnl(req, chnl); OffChnlTx_SetTxAttemptCount(req, N63C_SEND_ACTION_RETRY_COUNT); - OffChnlTx_SetRetryIntermittentTime(req, - pAdapter->bInHctTest - ? N63C_SEND_ACTION_RETRY_INTERMITTENT_TIME_HCT_MS + OffChnlTx_SetRetryIntermittentTime(req, + pAdapter->bInHctTest + ? N63C_SEND_ACTION_RETRY_INTERMITTENT_TIME_HCT_MS : N63C_SEND_ACTION_RETRY_INTERMITTENT_TIME_MS ); - + return req; } @@ -254,8 +254,8 @@ n63c_SendAction_PdReq_PrepareData( // ssid info->uProvisionRequestGroupIDSSIDLength = (u1Byte)param->GroupID.SSID.uSSIDLength; PlatformMoveMemory( - info->ProvisionRequestGroupIDSSID, - param->GroupID.SSID.ucSSID, + info->ProvisionRequestGroupIDSSID, + param->GroupID.SSID.ucSSID, param->GroupID.SSID.uSSIDLength ); } @@ -267,7 +267,7 @@ n63c_SendAction_PdReq_PrepareData( if(param->uIEsLength) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_PROVISION_DISCOVERY_REQUEST, param->uIEsLength, (u1Byte *)param + param->uIEsOffset @@ -315,7 +315,7 @@ n63c_SendAction_PdRsp_PrepareData( if(param->uIEsLength) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_PROVISION_DISCOVERY_RESPONSE, param->uIEsLength, (u1Byte *)param + param->uIEsOffset @@ -340,12 +340,12 @@ n63c_SendAction_InvitationReq_PrepareData( { NDIS_STATUS status = NDIS_STATUS_SUCCESS; P2P_INFO *info = GET_P2P_INFO(pAdapter); - + // // ref: N63C_SET_OID_DOT11_WFD_SEND_INVITATION_REQUEST // ref: Wdi_Xlat_AllocSendInvitationReqOid // - + info->InvitationContext.InvitorRole = (param->bLocalGO) ? P2P_GO : P2P_DEVICE; info->InvitationContext.bPersistentInvitation = (1 == param->InvitationFlags.InvitationType); info->InvitationContext.DialogToken = param->DialogToken; @@ -355,7 +355,7 @@ n63c_SendAction_InvitationReq_PrepareData( info->InvitationContext.Status = 0; info->InvitationContext.bInvitor = TRUE; PlatformMoveMemory( - info->InvitationContext.SsidBuf, + info->InvitationContext.SsidBuf, param->GroupID.SSID.ucSSID, param->GroupID.SSID.uSSIDLength ); @@ -363,7 +363,7 @@ n63c_SendAction_InvitationReq_PrepareData( cpMacAddr(info->InvitationContext.GroupBssid, param->GroupBSSID); cpMacAddr(info->InvitationContext.GODeviceAddress, param->GroupID.DeviceAddress); info->InvitationContext.OpChannel = info->OperatingChannel; - + // config timeout info->GOConfigurationTimeout = (u1Byte)param->MinimumConfigTimeout.GOTimeout; info->ClientConfigurationTimeout = (u1Byte)param->MinimumConfigTimeout.ClientTimeout; @@ -384,8 +384,8 @@ n63c_SendAction_InvitationReq_PrepareData( if(param->bUseSpecifiedOperatingChannel) { info->bInvitationRequestUseSpecifiedOperatingChannel = TRUE; - info->uInvitationRequestOperatingChannelNumber = (u1Byte)param->OperatingChannel.ChannelNumber; - + info->uInvitationRequestOperatingChannelNumber = (u1Byte)param->OperatingChannel.ChannelNumber; + //RT_TRACE(COMP_OID_SET, DBG_LOUD, ("use specific chnl: %u\n", info->uInvitationRequestOperatingChannelNumber)); } else @@ -404,13 +404,13 @@ n63c_SendAction_InvitationReq_PrepareData( if(param->uIEsOffset) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_INVITATION_REQUEST, param->uIEsLength, (u1Byte *)param + param->uIEsOffset ); } - + // clear scan dev id so the req won't be terminated in P2P_OnProbeRsp P2PClearScanDeviceID(&info->ScanDeviceIDs); @@ -459,7 +459,7 @@ n63c_SendAction_InvitationRsp_PrepareData( if(param->bUseSpecifiedOperatingChannel) { info->bInvitationResponseUseSpecifiedOperatingChannel = TRUE; - info->uInvitationResponseOperatingChannelNumber = (u1Byte)param->OperatingChannel.ChannelNumber; + info->uInvitationResponseOperatingChannelNumber = (u1Byte)param->OperatingChannel.ChannelNumber; } else { @@ -471,7 +471,7 @@ n63c_SendAction_InvitationRsp_PrepareData( if(param->uIEsLength) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_INVITATION_RESPONSE, param->uIEsLength, (u1Byte *)param + param->uIEsOffset @@ -491,23 +491,23 @@ n63c_SendAction_GoNegReq_PrepareData( NDIS_STATUS status = NDIS_STATUS_SUCCESS; P2P_INFO *info = GET_P2P_INFO(pAdapter); OCTET_STRING osWpsAttr, osDpid; - + // // ref: N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST // ref: wdi_SendAction_GoNegReq_PrepareData // - + // config timeout info->GOConfigurationTimeout = param->MinimumConfigTimeout.GOTimeout; info->ClientConfigurationTimeout = param->MinimumConfigTimeout.ClientTimeout; - + // capability info->NegotiationRequestGroupCapability = param->GroupCapability; info->NegotiationRequestGroupCapability = param->GroupCapability & ((u1Byte)(~gcP2PGroupOwner)); // Workaround since the pParameters->GroupCapability is wrong // go intent - info->GOIntent = - ((param->GroupOwnerIntent.Intent << 1) + info->GOIntent = + ((param->GroupOwnerIntent.Intent << 1) | param->GroupOwnerIntent.TieBreaker); // intf addr @@ -517,7 +517,7 @@ n63c_SendAction_GoNegReq_PrepareData( if(param->uIEsLength) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_GO_NEGOTIATION_REQUEST, param->uIEsLength, (u1Byte *)param + param->uIEsOffset @@ -527,10 +527,10 @@ n63c_SendAction_GoNegReq_PrepareData( // Update the internal WPS Device Password ID attribute ---------------------------------------------------------- osWpsAttr.Octet = (u1Byte *)param + param->uIEsOffset + 6; // Skip (0xDD, 0x??, 0x00, 0x50, 0xF2, 0x04) 6-Byte Header osWpsAttr.Length = (u2Byte)param->uIEsLength - 6; // Skip (0xDD, 0x??, 0x00, 0x50, 0xF2, 0x04) 6-Byte Header - + osDpid = P2PWpsIEGetAttribute(osWpsAttr, TRUE, P2P_WPS_ATTR_TAG_DEVICE_PASSWORD_ID); - if(osDpid.Length == 2) + if(osDpid.Length == 2) { info->WpsDevPasswdId = (WPS_DEVICE_PASSWD_ID) N2H2BYTE(*((pu2Byte)(osDpid.Octet))); } @@ -577,8 +577,8 @@ n63c_SendAction_GoNegRsp_PrepareData( info->NegotiationResponseStatus = param->Status; // go intent - info->GOIntent = - ((param->GroupOwnerIntent.Intent << 1) + info->GOIntent = + ((param->GroupOwnerIntent.Intent << 1) | param->GroupOwnerIntent.TieBreaker); // intf addr @@ -598,7 +598,7 @@ n63c_SendAction_GoNegRsp_PrepareData( // ssid info->uNegotiationResponseGroupIDSSIDLength = (u1Byte)param->GroupID.SSID.uSSIDLength; PlatformMoveMemory( - info->NegotiationResponseGroupIDSSID, + info->NegotiationResponseGroupIDSSID, param->GroupID.SSID.ucSSID, param->GroupID.SSID.uSSIDLength ); @@ -607,19 +607,19 @@ n63c_SendAction_GoNegRsp_PrepareData( { info->bNegotiationResponseUseGroupID = FALSE; } - + // add ie if(param->uIEsLength) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_GO_NEGOTIATION_RESPONSE, param->uIEsLength, (u1Byte *)param + param->uIEsOffset ); } - // Update the state machine immediately + // Update the state machine immediately if(P2P_SC_SUCCESS == param->Status) { info->State = P2P_STATE_GO_NEGO_RSP_SEND; @@ -631,7 +631,7 @@ n63c_SendAction_GoNegRsp_PrepareData( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("update P2P state to 0x%x\n", info->State)); PlatformCancelTimer(info->pAdapter, &info->P2PMgntTimer); - PlatformSetTimer(info->pAdapter, &info->P2PMgntTimer, 0); + PlatformSetTimer(info->pAdapter, &info->P2PMgntTimer, 0); return status; } @@ -646,7 +646,7 @@ n63c_SendAction_GoNegConfirm_PrepareData( NDIS_STATUS status = NDIS_STATUS_SUCCESS; P2P_INFO *info = GET_P2P_INFO(pAdapter); OCTET_STRING osWpsAttr, osDpid; - + // // ref: N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_CONFIRM // @@ -664,8 +664,8 @@ n63c_SendAction_GoNegConfirm_PrepareData( cpMacAddr(info->NegotiationConfirmGroupIDDeviceAddress, param->GroupID.DeviceAddress); info->uNegotiationConfirmGroupIDSSIDLength = (u1Byte)param->GroupID.SSID.uSSIDLength; PlatformMoveMemory( - info->NegotiationConfirmGroupIDSSID, - param->GroupID.SSID.ucSSID, + info->NegotiationConfirmGroupIDSSID, + param->GroupID.SSID.ucSSID, info->uNegotiationConfirmGroupIDSSIDLength ); } @@ -678,7 +678,7 @@ n63c_SendAction_GoNegConfirm_PrepareData( if(param->uIEsLength) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_GO_NEGOTIATION_CONFIRM, param->uIEsLength, (u1Byte *)param + param->uIEsOffset @@ -719,7 +719,7 @@ N63C_SendAction_UpdateTxFrameDialogToken( P2P_DEV_TYPE devType = P2P_DEV_TYPE_LEGACY; RT_ASSERT(frame, ("%s(): buf is NULL!!!\n", __FUNCTION__)); - RT_ASSERT(FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN + 1 <= FrameBuf_Length(frame), + RT_ASSERT(FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN + 1 <= FrameBuf_Length(frame), ("%s(): invalid frame length: %u\n", __FUNCTION__, FrameBuf_Length(frame))); // determine dev type @@ -745,7 +745,7 @@ N63C_SendAction_UpdateTxFrameDialogToken( // update to the p2p dev list devAddr = Frame_Addr1(frame->os); - + if(P2P_DEV_TYPE_GO == devType && NULL != (pDev = p2p_DevList_GetGo(&info->devList, devAddr))) { mac = pDev->mac; @@ -756,16 +756,16 @@ N63C_SendAction_UpdateTxFrameDialogToken( { RT_TRACE(COMP_OID_SET, DBG_WARNING, ("bProvisionRequestUseGroupID is set but can't find the GO in dev list\n")); } - + mac = devAddr; } - - p2p_DevList_TxUpdate(&info->devList, - n63c_SendAction_XlatFrameType(frameType), - mac, - devType, - frame, - token, + + p2p_DevList_TxUpdate(&info->devList, + n63c_SendAction_XlatFrameType(frameType), + mac, + devType, + frame, + token, OffChnlTx_GetTxChnl(req)); info->DialogToken = token; @@ -779,9 +779,9 @@ N63C_SendAction_SkipProbeTemporarilly( ) { RT_STATUS status = RT_STATUS_SUCCESS; - + RT_ASSERT(req, ("%s(): req is NULL!!!\n", __FUNCTION__)); - + status = OffChnlTx_SkipProbeTemporarilly(req); return status; @@ -846,37 +846,37 @@ N63C_SendAction_PdReq( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_REQUEST, - N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, - pAdapter, - pDev->mac, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_REQUEST, + N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, + pAdapter, + pDev->mac, (P2P_DEV_TYPE_GO == devType) ? TRUE : FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE ); // flush action frames in dev list so we don't drop frames because of dialog token mismatch p2p_DevList_FlushActionFrames(&info->devList, pDev->mac, pDev->type); - + // construct pd req frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_PDReq(info, frame, param->PeerDeviceAddress, param->DialogToken, 0); // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_REQ, - pDev->mac, - pDev->type, - frame, + p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_REQ, + pDev->mac, + pDev->type, + frame, ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-frame-pd-req"); - + return req; } @@ -911,9 +911,9 @@ N63C_SendAction_PdRsp( } // prepare off chnl tx req - if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->uSendTimeout))) { return NULL; @@ -926,34 +926,34 @@ N63C_SendAction_PdRsp( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, - N63C_P2P_ACTION_FRAME_MAX_VALUE, - pAdapter, - param->ReceiverDeviceAddress, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, + N63C_P2P_ACTION_FRAME_MAX_VALUE, + pAdapter, + param->ReceiverDeviceAddress, FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_PDRsp(info, param->DialogToken, NULL, 0, frame, txMac); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_RSP, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_RSP, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-pd-rsp"); - + return req; } @@ -994,19 +994,19 @@ N63C_SendAction_InvitationReq( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_INVITATION_REQUEST, - N63C_P2P_ACTION_FRAME_INVITATION_RESPONSE, - pAdapter, - param->PeerDeviceAddress, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_INVITATION_REQUEST, + N63C_P2P_ACTION_FRAME_INVITATION_RESPONSE, + pAdapter, + param->PeerDeviceAddress, FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_INVITATION_REQUEST_SEND_COMPLETE ); - + // construct pd req frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_InvitationReq(info, frame, param->PeerDeviceAddress, param->DialogToken); @@ -1015,16 +1015,16 @@ N63C_SendAction_InvitationReq( p2p_DevList_FlushActionFrames(&info->devList, param->PeerDeviceAddress, P2P_DEV_TYPE_DEV); // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_REQ, - param->PeerDeviceAddress, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_REQ, + param->PeerDeviceAddress, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-frame-invitation-req"); - + return req; } @@ -1059,9 +1059,9 @@ N63C_SendAction_InvitationRsp( } // prepare off chnl tx req - if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->uSendTimeout))) { return NULL; @@ -1074,34 +1074,34 @@ N63C_SendAction_InvitationRsp( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_INVITATION_RESPONSE, - N63C_P2P_ACTION_FRAME_MAX_VALUE, - pAdapter, - param->ReceiverDeviceAddress, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_INVITATION_RESPONSE, + N63C_P2P_ACTION_FRAME_MAX_VALUE, + pAdapter, + param->ReceiverDeviceAddress, FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_INVITATION_RESPONSE_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_InvitationRsp(info, param->DialogToken, frame, txMac); // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_RSP, - txMac, + p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_RSP, + txMac, P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-frame-invitation-rsp"); - + return req; } @@ -1142,34 +1142,34 @@ N63C_SendAction_GoNegReq( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, - N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, - pAdapter, - param->PeerDeviceAddress, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, + N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, + pAdapter, + param->PeerDeviceAddress, FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE ); - + // construct pd req frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_GoNegReq(info, frame, param->PeerDeviceAddress, param->DialogToken); // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_REQ, - param->PeerDeviceAddress, - P2P_DEV_TYPE_DEV, - frame, + p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_REQ, + param->PeerDeviceAddress, + P2P_DEV_TYPE_DEV, + frame, ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-frame-go-neg-req"); - + return req; } @@ -1204,9 +1204,9 @@ N63C_SendAction_GoNegRsp( } // prepare off chnl tx req - if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->uSendTimeout))) { return NULL; @@ -1217,34 +1217,34 @@ N63C_SendAction_GoNegRsp( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, - N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, - pAdapter, - param->PeerDeviceAddress, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, + N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, + pAdapter, + param->PeerDeviceAddress, FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_GoNegRsp(info, param->DialogToken, frame, txMac); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_RSP, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_RSP, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-frame-go-rsp"); - + return req; } @@ -1287,9 +1287,9 @@ N63C_SendAction_GoNegConfirm( } // prepare off chnl tx req - if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = n63c_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->uSendTimeout))) { return NULL; @@ -1302,34 +1302,34 @@ N63C_SendAction_GoNegConfirm( // setup cb ctx = (N63C_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - n63c_SendAction_InitCtx(ctx, - N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, - N63C_P2P_ACTION_FRAME_MAX_VALUE, - pAdapter, - param->PeerDeviceAddress, + n63c_SendAction_InitCtx(ctx, + N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, + N63C_P2P_ACTION_FRAME_MAX_VALUE, + pAdapter, + param->PeerDeviceAddress, FALSE, - param->DialogToken, + param->DialogToken, oldToken, - param->uSendTimeout, - req, + param->uSendTimeout, + req, P2P_EVENT_GO_NEGOTIATION_CONFIRM_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_GoNegConf(info, txToken, frame, txMac); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_CONF, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_CONF, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req n63c_SendAction_IssueReq(pAdapter, req, "n63c-send-p2p-action-frame-go-confirm"); - + return req; } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.h b/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.h index 427e6865f..c11724d1d 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N63C_SendAction.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: N63C_SendAction.h -// Description: +// Description: // // Author: haich // @@ -24,14 +24,14 @@ VOID ); typedef enum _N63C_P2P_ACTION_FRAME_TYPE -{ +{ N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST = 1, N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE = 2, N63C_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM = 3, N63C_P2P_ACTION_FRAME_INVITATION_REQUEST = 4, N63C_P2P_ACTION_FRAME_INVITATION_RESPONSE = 5, N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_REQUEST = 6, - N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE = 7, + N63C_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE = 7, N63C_P2P_ACTION_FRAME_MAX_VALUE = 0xFFFFFFFF }N63C_P2P_ACTION_FRAME_TYPE; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.c b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.c index afbfb4f0a..f6d91872c 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.c @@ -15,27 +15,27 @@ #endif NDIS_STATUS -CopyFromUnicodeToOS( +CopyFromUnicodeToOS( UCHAR *pointer, UNICODE_STRING *uniStr, USHORT copyLen) { int s; OCTET_STRING *os = (OCTET_STRING *)pointer; - + for(s=0; sOctet[s] = (UCHAR)uniStr->Buffer[s]; } - - + + os->Length = copyLen; - + return NDIS_STATUS_SUCCESS; } NDIS_STATUS -CopyFromUnicodeToString( +CopyFromUnicodeToString( UCHAR *pointer, UNICODE_STRING *uniStr, USHORT copyLen) @@ -49,11 +49,11 @@ CopyFromUnicodeToString( } // for Decoding WEP key -VOID +VOID RegistryDecode( - unsigned char *in, + unsigned char *in, unsigned char *out, - int maxdecode) + int maxdecode) { int len; int i,j=2; @@ -96,7 +96,7 @@ StringToHex( { return out; } -*/ +*/ if(IsNum) { for(i=inlen-1,j=0;i>=0 && jRegLocale.Octet = &(pNdisCommon->RegLocaleBuf[0]); pNdisCommon->RegDriverDesc.Octet = &(pNdisCommon->RegDriverDescBuf[0]); - // For 818x UI and WPA Verify. 2004.11.30, by rcnjko. + // For 818x UI and WPA Verify. 2004.11.30, by rcnjko. for(i = 0; i < 4; i++) { pNdisCommon->RegDefaultKey[i].Octet = pNdisCommon->RegDefaultKeyBuf[i]; @@ -274,7 +274,7 @@ Return Value: pNdisCommon->RegPwrLimitFile.Octet = &(pNdisCommon->RegPwrLimitFileBuf[0]); pNdisCommon->RegSecondaryPwrLimitFile.Octet = &(pNdisCommon->RegSecondaryPwrLimitFileBuf[0]); pNdisCommon->RegChannelPlan2G.Octet = pNdisCommon->RegChannelPlan2GBuf; - pNdisCommon->RegChannelPlan5G.Octet = pNdisCommon->RegChannelPlan5GBuf; + pNdisCommon->RegChannelPlan5G.Octet = pNdisCommon->RegChannelPlan5GBuf; //---------------------------------------------------------------------------- @@ -301,14 +301,14 @@ Return Value: { RT_PRINT_UUID(COMP_INIT, DBG_LOUD, "The current adapter GUID is:", pNdisCommon->NetCfgInstanceId); } - } + } } //---------------------------------------------------------------------------- // Read all the registry values. - for(i = 0, pRegEntry = CommonRegTable; i < COM_NUM_REG_PARAMS; i++, pRegEntry++) + for(i = 0, pRegEntry = CommonRegTable; i < COM_NUM_REG_PARAMS; i++, pRegEntry++) { RT_TRACE(COMP_INIT, DBG_TRACE, ("RegName: [%ws]\n", (pRegEntry->RegName).Buffer)); - + pointer = (PUCHAR) pNdisCommon + pRegEntry->FieldOffset; // Get the configuration value for a specific parameter. Under NT the @@ -419,8 +419,8 @@ Return Value: // For 818x UI, 2004.11.30, by rcnjko. for(i = 0; i < 4; i++) // Decode WEP key { - unsigned char temp[30]; - + unsigned char temp[30]; + if(pNdisCommon->RegDefaultKey[i].Length > 0) { pNdisCommon->RegDefaultKey[i].Octet[pNdisCommon->RegDefaultKey[i].Length] = 0; @@ -440,7 +440,7 @@ Return Value: // Convert bssid string to hex. StringToHex((char *)pNdisCommon->RegBssidBuf, 12, pNdisCommon->RegBssid, 6,0); - // Read NetworkAddress registry value + // Read NetworkAddress registry value // Use it as the current address if any if(Status == NDIS_STATUS_SUCCESS) { @@ -451,14 +451,14 @@ Return Value: ConfigurationHandle); RT_TRACE(COMP_INIT, DBG_LOUD, ("NdisReadNetworkAddress, Status=%x\n", Status)); - - // If there is a NetworkAddress override in registry, use it + + // If there is a NetworkAddress override in registry, use it if ((Status == NDIS_STATUS_SUCCESS) && (Length == ETH_LENGTH_OF_ADDRESS)) { if(ETH_IS_MULTICAST(NetworkAddress) || ETH_IS_BROADCAST(NetworkAddress) || ((NetworkAddress[0]&0x02)==0)) { - RT_TRACE(COMP_INIT,DBG_LOUD, - ("Overriding NetworkAddress is invalid - %02x-%02x-%02x-%02x-%02x-%02x\n", + RT_TRACE(COMP_INIT,DBG_LOUD, + ("Overriding NetworkAddress is invalid - %02x-%02x-%02x-%02x-%02x-%02x\n", NetworkAddress[0], NetworkAddress[1], NetworkAddress[2], NetworkAddress[3], NetworkAddress[4], NetworkAddress[5])); } @@ -469,18 +469,18 @@ Return Value: (NetworkAddress[2]==0x00) && (NetworkAddress[3]==0x00) && (NetworkAddress[4]==0x00) && - (NetworkAddress[5]==0x00) ) - { + (NetworkAddress[5]==0x00) ) + { // Network addr = 00 00 00 00 00 00 pNdisCommon->bOverrideAddress = FALSE; } - else + else { - RT_TRACE(COMP_INIT,DBG_LOUD, - ("Overriding NetworkAddress - %02x-%02x-%02x-%02x-%02x-%02x\n", + RT_TRACE(COMP_INIT,DBG_LOUD, + ("Overriding NetworkAddress - %02x-%02x-%02x-%02x-%02x-%02x\n", NetworkAddress[0], NetworkAddress[1], NetworkAddress[2], NetworkAddress[3], NetworkAddress[4], NetworkAddress[5])); - + ETH_COPY_NETWORK_ADDRESS(pNdisCommon->CurrentAddress, NetworkAddress); pNdisCommon->bOverrideAddress = TRUE; } @@ -505,37 +505,37 @@ N6UpdateDefaultSetting( /*++ Routine Description: - Update the parameter read from registery to coresponding ones in MGNT_INFO + Update the parameter read from registery to coresponding ones in MGNT_INFO or ADAPTER. Arguments: - pAdapter Pointer to ADAPTER. + pAdapter Pointer to ADAPTER. Return Value: TRUE if succeeded, FALSE otherwise. -Assumption: - These modification should be after InitializeMgntVariables() which is called by +Assumption: + These modification should be after InitializeMgntVariables() which is called by NicIFAssociateNIC(). --*/ { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(pMgntInfo); PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pDefaultMgntInfo = &(pDefaultAdapter->MgntInfo); PRT_FIRMWARE pFirmware = GET_FIRMWARE(pAdapter); - HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); s1Byte i = 0, diff = 0; u1Byte IndicationNumber, tempNumber = 0; BOOLEAN bFcsCapable = FALSE; u4Byte result=0; PWCHAR registryName; - + // Workaround for HCT. pAdapter->bInHctTest = pNdisCommon->bRegHctTest ? 1: (pDefaultAdapter->bInHctTest); //YJ,mod,120626 pAdapter->bInWFDTest = pNdisCommon->bRegWFDTest ? 1: (pDefaultAdapter->bInWFDTest); //YJ,mod,120626 @@ -544,8 +544,8 @@ Return Value: // For EQC require to fix the Mac Address. pAdapter->bFixedMacAddr = pNdisCommon->bRegFixedMacAddr; - pAdapter->bDPCISRTest = pNdisCommon->bRegDPCISRTest; - pAdapter->bUseThreadHandleInterrupt = pNdisCommon->bRegUseThreadHandleInterrupt; + pAdapter->bDPCISRTest = pNdisCommon->bRegDPCISRTest; + pAdapter->bUseThreadHandleInterrupt = pNdisCommon->bRegUseThreadHandleInterrupt; pAdapter->bInChaosTest = pNdisCommon->bRegChaos; pAdapter->interfaceIndex = pDefaultAdapter->interfaceIndex; pMgntInfo->ChannelPlan = pDefaultMgntInfo->ChannelPlan; @@ -562,7 +562,7 @@ Return Value: pMgntInfo->ForcedBstDataRate = pNdisCommon->RegForcedBstDataRate; - // For power save mode. 2005.02.15, by rcnjko. + // For power save mode. 2005.02.15, by rcnjko. pMgntInfo->dot11PowerSaveMode = (RT_PS_MODE)TranslateNdisPsToRtPs((NDIS_802_11_POWER_MODE)pNdisCommon->RegPowerSaveMode); @@ -587,27 +587,27 @@ Return Value: // pMgntInfo->bWiFiConfg = pNdisCommon->bRegWiFi; - // 2010/05/18 MH For GPIO detect timer delay setting. + // 2010/05/18 MH For GPIO detect timer delay setting. pMgntInfo->bRegTimerGPIO=pNdisCommon->bRegTimerGPIO; pMgntInfo->bRegGPIODelay=pNdisCommon->bRegGPIODelay; pMgntInfo->bRegGPIOBack=pNdisCommon->bRegGPIOBack; - // 2010/08/25 MH support power down mode switch + // 2010/08/25 MH support power down mode switch pMgntInfo->bRegPDNMode = pNdisCommon->bRegPDNMode; - // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. + // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. pMgntInfo->bRegDongleSS = pNdisCommon->bRegDongleSS; - // 2010/09/13 MH According to PM's request, we support different SS power seave level. + // 2010/09/13 MH According to PM's request, we support different SS power seave level. pMgntInfo->bRegSSPwrLvl = pNdisCommon->bRegSSPwrLvl; // 2011/02/16 MH Add for SS HW radio detect workaround temporarily. pMgntInfo->bRegSSWakeCnt = pNdisCommon->bRegSSWakeCnt; - - // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. + + // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. pMgntInfo->bRegAggDMEnable = pNdisCommon->bRegAggDMEnable; - // 2010/12/31 MH Add for UPHY dynamic chaneg. + // 2010/12/31 MH Add for UPHY dynamic chaneg. pMgntInfo->bRegUPDMEnable = pNdisCommon->bRegUPDMEnable; // 2011/07/08 MH Add for different link speed display. @@ -616,10 +616,10 @@ Return Value: // Update Signal Bar settings pMgntInfo->RSSI2GridMode = pNdisCommon->RegRSSI2GridMode; - // 2011/07/14 MH Add for rx short cut. + // 2011/07/14 MH Add for rx short cut. pMgntInfo->bRegRxSC = pNdisCommon->bRegRxSC; - // 2011/07/15 Sinda Add for tx short cut. + // 2011/07/15 Sinda Add for tx short cut. pAdapter->TXSCSupport = (pNdisCommon->bRegTxSC) ? TRUE : FALSE; // 2011/12/08 hpfan Add for Tcp Reorder @@ -661,7 +661,7 @@ Return Value: pMgntInfo->bClientSkipScanForWFD = pNdisCommon->RegClientSkipScanForWFDTest; pMgntInfo->bForceGoTxData20MBw = pNdisCommon->RegForceGoTxData20MBw; - if(IS_HARDWARE_TYPE_8821U(pAdapter)) + if(IS_HARDWARE_TYPE_8821U(pAdapter)) { pMgntInfo->RegFWOffload = FALSE; pNdisCommon->RegFWOffload =FALSE; @@ -676,7 +676,7 @@ Return Value: pMgntInfo->RegTxPwrLmtDynamicLoading = pNdisCommon->RegTxPwrLmtDynamicLoading; pMgntInfo->RegSupportTxPwrTableDump = pNdisCommon->RegSupportTxPwrTableDump; - + pMgntInfo->bDisableTXPowerTraining = !pNdisCommon->RegTxPowerTraining; pMgntInfo->RegLoadSystemSKUfromUEFI = pNdisCommon->RegLoadSystemSKUfromUEFI; @@ -690,7 +690,7 @@ Return Value: pMgntInfo->RegSecondaryPwrLimitFile.Octet = pNdisCommon->RegSecondaryPwrLimitFile.Octet; pMgntInfo->RegChannelPlan2G.Octet = pNdisCommon->RegChannelPlan2GBuf; - pMgntInfo->RegChannelPlan5G.Octet = pNdisCommon->RegChannelPlan5GBuf; + pMgntInfo->RegChannelPlan5G.Octet = pNdisCommon->RegChannelPlan5GBuf; pMgntInfo->RegChannelPlan2G.Length = pNdisCommon->RegChannelPlan2G.Length; pMgntInfo->RegChannelPlan5G.Length = pNdisCommon->RegChannelPlan5G.Length; pMgntInfo->RegChannelPlan2G.bDefaultStr = pNdisCommon->RegChannelPlan2G.bDefaultStr; @@ -712,7 +712,7 @@ Return Value: pMgntInfo->RegPwrTblSel = pNdisCommon->RegPwrTblSel; pMgntInfo->RegTxPwrLevel = pNdisCommon->RegTxPwrLevel; - + // 2011/11/15 MH Add for user can select different tx power by rate switch by default value and registry value. pMgntInfo->RegPwrByRate = pNdisCommon->RegPwrByRate; pMgntInfo->RegPwrRaTbl1 = pNdisCommon->RegPwrRaTbl1; @@ -738,13 +738,13 @@ Return Value: //Isaiah 2006-06-13 if(pNdisCommon->bRegSupportQoS) //WMM { - pMgntInfo->pStaQos->QosCapability = QOS_WMM; + pMgntInfo->pStaQos->QosCapability = QOS_WMM; pMgntInfo->pStaQos->b4ac_Uapsd=pNdisCommon->StaUapsd & 0x0F; pMgntInfo->pStaQos->MaxSPLength=pNdisCommon->MaxSPLength; if(pMgntInfo->pStaQos->b4ac_Uapsd & 0x0F) //UAPSD - { + { pMgntInfo->pStaQos->QosCapability |= QOS_WMM_UAPSD; } else // 8xB disable WMM Power Save @@ -753,9 +753,9 @@ Return Value: pMgntInfo->pStaQos->b4ac_Uapsd=0; pMgntInfo->pStaQos->MaxSPLength=0; } - + pMgntInfo->pStaQos->QosCapabilityBackup = pMgntInfo->pStaQos->QosCapability; - + // EDCA Parameters for QAP pAdapter->AP_EDCA_PARAM[0] = pNdisCommon->RegApEDCAParamBE; pAdapter->AP_EDCA_PARAM[1] = pNdisCommon->RegApEDCAParamBK; @@ -771,7 +771,7 @@ Return Value: // No Ack Setting pMgntInfo->pStaQos->AcNoAck = pNdisCommon->RegAcNoAck; } - + RT_TRACE( COMP_QOS, DBG_LOUD, ("N6UpdateDefaultSetting(): QosCapability=0x%x\n", pMgntInfo->pStaQos->QosCapability) ); @@ -781,7 +781,7 @@ Return Value: pMgntInfo->TxPowerLevel = pNdisCommon->RegTxPowerLevel; if(pAdapter->pNdis62Common==NULL) - MgntActSet_TX_POWER_LEVEL(pAdapter, pMgntInfo->TxPowerLevel); + MgntActSet_TX_POWER_LEVEL(pAdapter, pMgntInfo->TxPowerLevel); // Default LowRfdThreshold. pAdapter->LowRfdThreshold = pNdisCommon->LowRfdThreshold; @@ -806,7 +806,7 @@ Return Value: TURBOMODE_TYPE TurboModeType; TurboModeType.charData = (u1Byte)pNdisCommon->RegTurboModeSelect; pMgntInfo->bSupportTurboMode = (BOOLEAN)TurboModeType.field.SupportTurboMode;// Default: sholud be FALSE. Roger, 2006.12.07. - pMgntInfo->bAutoTurboBy8186 = (BOOLEAN)TurboModeType.field.AutoTurboBy8186; // Default: should be TRUE. Roger, 2006.12.07. + pMgntInfo->bAutoTurboBy8186 = (BOOLEAN)TurboModeType.field.AutoTurboBy8186; // Default: should be TRUE. Roger, 2006.12.07. RT_TRACE( COMP_MLME, DBG_LOUD, ("UpdateDefaultSetting(): bSupportTurboMode=%d, bAutoTurboBy8186=%d\n", pMgntInfo->bSupportTurboMode, pMgntInfo->bAutoTurboBy8186 @@ -817,7 +817,7 @@ Return Value: // NOTE: the default of bExcludeUnencrypted in NDIS5 is TRUE, but in NDIS6 // The native wifi document required the default value to be FALSE. pMgntInfo->bExcludeUnencrypted = FALSE; - pMgntInfo->SafeModeEnabled = FALSE; + pMgntInfo->SafeModeEnabled = FALSE; // 802.11d. pDot11dInfo->bEnabled = pNdisCommon->bRegDot11dEnable; @@ -828,15 +828,15 @@ Return Value: // WDS mode. pMgntInfo->WdsMode = pNdisCommon->RegWdsMode; - // Overwrite pMgntInfo->CustomerID if necessary, otherwise, don't change it. - // Note that, pMgntInfo->CustomerID might be initialized in NicIFReadAdapterInfo() + // Overwrite pMgntInfo->CustomerID if necessary, otherwise, don't change it. + // Note that, pMgntInfo->CustomerID might be initialized in NicIFReadAdapterInfo() // before. 2006.07.03. pMgntInfo->CustomerID = (RT_CUSTOMER_ID)(pNdisCommon->RegCustomerID); //Fragment threadhold pMgntInfo->FragThreshold = pNdisCommon->RegFragThreshold; - //change by ylb 20111124 to Fix DTM error: Vertify Beacon after WakeUp + //change by ylb 20111124 to Fix DTM error: Vertify Beacon after WakeUp { PADAPTER pTargetAdapter = GetDefaultAdapter(pAdapter); @@ -848,30 +848,30 @@ Return Value: } } - //========================= BT related======================== + //========================= BT related======================== pMgntInfo->btHsMode = pNdisCommon->RegbtHsMode; pAdapter->bFixBTTdma = (BOOLEAN)pNdisCommon->RegFixBTTdma; - //========================= BT related end======================== + //========================= BT related end======================== // Set debug monitor components EXdbgmon_SetOutComponents((u4Byte)pNdisCommon->RegDbgMonitor); - //========================= Power Save Mechanism related======================== + //========================= Power Save Mechanism related======================== PSC_UpdateDefaultSetting(pAdapter); pMgntInfo->bDisableCck = pNdisCommon->bRegDisableCck; pMgntInfo->bHwWpsPbc = pNdisCommon->bRegHwWpsPbc; - //========================= Power Save Mechanism end======================== + //========================= Power Save Mechanism end======================== - //========================= HAL related======================== + //========================= HAL related======================== HAL_UpdateDefaultSetting(pAdapter); - //========================= HAL related end======================== + //========================= HAL related end======================== pAdapter->bBtFwSupport = (BOOLEAN) pNdisCommon->bRegBtFwSupport; - + // ROAM Sensitive Level @@ -918,7 +918,7 @@ Return Value: SET_TDLS_ENABLED(pMgntInfo, pNdisCommon->bRegTDLSEnable); - pMgntInfo->bDefaultAntenna= pNdisCommon->bRegDefaultAntenna; + pMgntInfo->bDefaultAntenna= pNdisCommon->bRegDefaultAntenna; pMgntInfo->bRegVelocity = pNdisCommon->bRegVelocity; @@ -936,7 +936,7 @@ Return Value: pHalData->PAMode = pNdisCommon->RegPAMode; pMgntInfo->CurrentWirelessBand = pNdisCommon->RegWirelessBand; - + // 2012/07/24 MH Add for win8 usb whql tst & WFD multi channel. pMgntInfo->RegUseDefaultCID = pNdisCommon->RegUseDefaultCID; pMgntInfo->RegWfdTime = pNdisCommon->RegWfdTime; @@ -953,7 +953,7 @@ Return Value: pAdapter->HalFunc.SetHalDefVarHandler(pAdapter, HAL_DEF_ANT_DETECT, (pu1Byte)&(pNdisCommon->RegAntDetection)); // TxPwr percentage, added by Roger, 2010.03.09. - pAdapter->HalFunc.SetHalDefVarHandler(pAdapter, HAL_DEF_TX_PWR_PERCENTAGE, &(pNdisCommon->RegTxPwrPercentage)); + pAdapter->HalFunc.SetHalDefVarHandler(pAdapter, HAL_DEF_TX_PWR_PERCENTAGE, &(pNdisCommon->RegTxPwrPercentage)); // Pre-transition for OID_PNP_SET_POWER OID wake up handling, added by Roger, 2012.11.28. pMgntInfo->bPreTransPnP = pNdisCommon->RegPreTransPnP; @@ -975,16 +975,16 @@ Return Value: if(pAdapter->bInHctTest) pMgntInfo->RegEnableAdaptivity = 0; else - pMgntInfo->RegEnableAdaptivity = pNdisCommon->RegEnableAdaptivity; - pMgntInfo->RegL2HForAdaptivity = pNdisCommon->RegL2HForAdaptivity; - pMgntInfo->RegHLDiffForAdaptivity = pNdisCommon->RegHLDiffForAdaptivity; + pMgntInfo->RegEnableAdaptivity = pNdisCommon->RegEnableAdaptivity; + pMgntInfo->RegL2HForAdaptivity = pNdisCommon->RegL2HForAdaptivity; + pMgntInfo->RegHLDiffForAdaptivity = pNdisCommon->RegHLDiffForAdaptivity; pMgntInfo->RegEnableCarrierSense = pNdisCommon->RegEnableCarrierSense; pMgntInfo->RegNHMEnable = pNdisCommon->RegNHMEnable; pMgntInfo->RegDmLinkAdaptivity = pNdisCommon->RegDmLinkAdaptivity; pMgntInfo->RegDCbackoff = pNdisCommon->RegDCbackoff; pMgntInfo->RegAPNumTH = pNdisCommon->RegAPNumTH; pMgntInfo->RegPacketDrop = pNdisCommon->RegPacketDrop; - + pMgntInfo->EnableResetTxStuck = pNdisCommon->RegEnableResetTxStuck; pMgntInfo->RegSifsThresh = pNdisCommon->RegSifsThresh; @@ -1002,8 +1002,8 @@ Return Value: pMgntInfo->RegbCustomizedScanPeriod = pNdisCommon->RegbCustomizedScanPeriod; pMgntInfo->RegIntelCustomizedScanPeriod = pNdisCommon->RegIntelCustomizedScanPeriod; pMgntInfo->RegAMDCustomizedScanPeriod = pNdisCommon->RegAMDCustomizedScanPeriod; - - + + pMgntInfo->RegDisableBTCoexist = pNdisCommon->RegDisableBTCoexist; pMgntInfo->EnableMA = pNdisCommon->RegEnableMA; @@ -1014,7 +1014,7 @@ Return Value: // 0= by channel plan, 1=5g all passive scan / 2= 24g passive scan /3= 2/5g all passive scan pMgntInfo->RegPassiveScan = pNdisCommon->RegPassiveScan; - pMgntInfo->IsAMDIOIC = pNdisCommon->RegIsAMDIOIC; + pMgntInfo->IsAMDIOIC = pNdisCommon->RegIsAMDIOIC; pMgntInfo->RegWmmPage = pNdisCommon->RegWmmPage; pMgntInfo->Regbcndelay = pNdisCommon->Regbcndelay; @@ -1075,11 +1075,11 @@ Return Value: else pMgntInfo->CurTxSendAsap = 0; - // MAC Address Randomization + // MAC Address Randomization pMgntInfo->RegSupportMACRandom = pNdisCommon->RegSupportMACRandom; pMgntInfo->RegSupportECSA = pNdisCommon->RegSupportECSA; - + pMgntInfo->RegSupportFT= pNdisCommon->RegSupportFT; // Cancel and suspend all timers in Dx low power state, e.g., SoC Off @@ -1089,13 +1089,13 @@ Return Value: -// +// // Initialize variables read from registry for 818x UI. // 2004.11.30, by rcnjko. // -VOID +VOID N6RestoreLastInitSetting( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { PMGNT_INFO pMgntInfo = (PMGNT_INFO)(&(pAdapter->MgntInfo)); @@ -1104,18 +1104,18 @@ N6RestoreLastInitSetting( int nTmp; ULONG BytesRead, BytesNeeded; - // We keep local copy of RegWepEncStatus here for it can be changed via OID_802_11_ENCRYPTION_STATUS. + // We keep local copy of RegWepEncStatus here for it can be changed via OID_802_11_ENCRYPTION_STATUS. // 2005.03.16, by rcnjko. - int nTmpRegWepEncStatus = pNdisCommon->RegWepEncStatus; + int nTmpRegWepEncStatus = pNdisCommon->RegWepEncStatus; RT_TRACE( COMP_SEC, DBG_LOUD, ("===> N6RestoreLastInitSetting()\n") ); - // OID_802_11_AUTHENTICATION_MODE. + // OID_802_11_AUTHENTICATION_MODE. nTmp = pNdisCommon->RegAuthentAlg; N6CSetInformation(pAdapter, OID_802_11_AUTHENTICATION_MODE, (PVOID)(&nTmp), sizeof(nTmp), &BytesRead, &BytesNeeded); - + // OID_802_11_ENCRYPTION_STATUS. - switch(nTmpRegWepEncStatus) + switch(nTmpRegWepEncStatus) { case REG_WEP_STATUS_NO_WEP: switch(pNdisCommon->RegEncAlgorithm) @@ -1130,10 +1130,10 @@ N6RestoreLastInitSetting( nTmp = (int)Ndis802_11Encryption3Enabled; break; - case REG_WAPI_PSK: + case REG_WAPI_PSK: nTmp = (int)Wapi_Encryption; break; - case REG_WAPI_CERT: + case REG_WAPI_CERT: nTmp = (int)Wapi_Certificate; break; @@ -1142,7 +1142,7 @@ N6RestoreLastInitSetting( break; } break; - + case REG_WEP_STATUS_WEP64: case REG_WEP_STATUS_WEP128: nTmp = (int)(Ndis802_11Encryption1Enabled); @@ -1159,7 +1159,7 @@ N6RestoreLastInitSetting( POCTET_STRING pKey; u4Byte dwKeyLen; int nKeyIdx; - UCHAR NdisKeyTmpBuf[128]; + UCHAR NdisKeyTmpBuf[128]; PNDIS_802_11_WEP pNdisKeyTmp; for(nKeyIdx = 0; nKeyIdx < 4;nKeyIdx++) @@ -1167,7 +1167,7 @@ N6RestoreLastInitSetting( pNdisCommon->RegDefaultKey[nKeyIdx].Octet = pNdisCommon->RegDefaultKeyBuf[nKeyIdx]; pNdisCommon->RegDefaultKey[nKeyIdx].Octet = pNdisCommon->RegDefaultKeyBuf[nKeyIdx]; } - // Fix stack overflow bug, 2005.01.06, by rcnjko. + // Fix stack overflow bug, 2005.01.06, by rcnjko. pNdisKeyTmp = (PNDIS_802_11_WEP)NdisKeyTmpBuf; pNdisKeyTmp->Length = 128; @@ -1214,13 +1214,13 @@ N6RestoreLastInitSetting( // Network type. switch(pNdisCommon->RegNetworkType) { - case NI_ADHOC: + case NI_ADHOC: pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_ADHOC; break; - case NI_Infrastructure: + case NI_Infrastructure: pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; break; - case NI_AUTO: + case NI_AUTO: pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_AUTO; break; default: @@ -1239,19 +1239,19 @@ N6RestoreLastInitSetting( } pMgntInfo->bEDCCASupport = pNdisCommon->bRegEDCCASupport; - + RT_TRACE( COMP_SEC, DBG_LOUD, ("<=== N6RestoreLastInitSetting()\n") ); - + } // Description: -// Restore all config for wake up in IBSS mode +// Restore all config for wake up in IBSS mode // VOID N6RestoreLastInitSettingAterWakeUP( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { PMGNT_INFO pMgntInfo = (PMGNT_INFO)(&(pAdapter->MgntInfo)); @@ -1261,11 +1261,11 @@ N6RestoreLastInitSettingAterWakeUP( POCTET_STRING pKey; BOOLEAN IsDefaultKeyId; u1Byte MacAddress[ETHERNET_ADDRESS_LENGTH] = {0x00,0x00,0x00,0x00,0x00,0x00}; - -//add by ylb for wapi S3 BSOD 20110906 + +//add by ylb for wapi S3 BSOD 20110906 if(WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) return; - + //if( pNdisCommon->RegNetworkType == RT_JOIN_NETWORKTYPE_INFRA ) // return; // Autoconfig will do all thing to connent to AP. @@ -1276,7 +1276,7 @@ N6RestoreLastInitSettingAterWakeUP( // It will make BssType to be auto and cause Ad Hoc WPA2 in Vista Fial //N6CSet_DOT11_DESIRED_BSS_TYPE(pAdapter , &BssType ); - // 2.set Auth Mod + // 2.set Auth Mod N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(pAdapter , pNdisCommon->RegAuthalg); RT_TRACE(COMP_RSNA, DBG_LOUD, ("N6RestoreLastInitSettingAterWakeUP pSecInfo->AuthMode = 0x%08X\n",pSecInfo->AuthMode)); // 3. Set Uncast Chiper @@ -1287,7 +1287,7 @@ N6RestoreLastInitSettingAterWakeUP( //N6CSet_DOT11_MULTICAST_CIPHER_ALGORITHM( pAdapter, pNdisCommon->RegGroupALg); // 5. Set Key if NEED!! - if( (pNdisCommon->RegPairwiseAlg == DOT11_CIPHER_ALGO_WEP40 + if( (pNdisCommon->RegPairwiseAlg == DOT11_CIPHER_ALGO_WEP40 ||pNdisCommon->RegPairwiseAlg == DOT11_CIPHER_ALGO_WEP104 ||pNdisCommon->RegPairwiseAlg == DOT11_CIPHER_ALGO_WEP ) // Need to check if wep-802.1x used wep to Pairwise key.we need to remove it. // && pNdisCommon->RegAuthalg == DOT11_AUTH_ALGO_80211_OPEN // remove it for Infra mode. @@ -1299,14 +1299,14 @@ N6RestoreLastInitSettingAterWakeUP( pNdisCommon->RegDefaultKey[nKeyIdx].Octet = pNdisCommon->RegDefaultKeyBuf[nKeyIdx]; pNdisCommon->RegDefaultKeyW[nKeyIdx].Octet = pNdisCommon->RegDefaultKeyWBuf[nKeyIdx]; } - + if( pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP104 ){ pKey = pNdisCommon->RegDefaultKeyW; }else{ pKey = pNdisCommon->RegDefaultKey; } - + for( nKeyIdx = 0 ; nKeyIdx < 4 ; nKeyIdx++ ) { if(nKeyIdx == pNdisCommon->RegDefaultKeyId) @@ -1324,7 +1324,7 @@ N6RestoreLastInitSettingAterWakeUP( ); } } - }else if(pMgntInfo->bRSNAPSKMode) + }else if(pMgntInfo->bRSNAPSKMode) { MgntActSet_RSNA_ADD_DEAULT_KEY( pAdapter, @@ -1344,11 +1344,11 @@ N6RestoreLastInitSettingAterWakeUP( // VOID InitNdis6CommonResources( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); u2Byte index = 0; RTInitializeSListHead( &(pNdisCommon->TxNBLWaitQueue) ); @@ -1359,52 +1359,52 @@ InitNdis6CommonResources( PlatformInitializeWorkItem( pAdapter, - &(pNdisCommon->SetRFPowerStateWorkItem), + &(pNdisCommon->SetRFPowerStateWorkItem), (RT_WORKITEM_CALL_BACK)SetRFPowerStateWorkItemCallback, (PVOID)pAdapter, "SetRFPowerStateWorkItem"); PlatformInitializeWorkItem( pAdapter, - &(pNdisCommon->SetAdhocLinkStateWorkItem), + &(pNdisCommon->SetAdhocLinkStateWorkItem), (RT_WORKITEM_CALL_BACK)SetAdhocLinkStateWorkItemCallback, (PVOID)pAdapter, "SetAdhocLinkStateWorkItem"); - PlatformInitializeTimer(pAdapter, &(pNdisCommon->InitializeAdapterTimer), + PlatformInitializeTimer(pAdapter, &(pNdisCommon->InitializeAdapterTimer), (RT_TIMER_CALL_BACK)InitializeAdapterTimerCallback, NULL, "InitializeTimer"); - PlatformInitializeTimer(pAdapter, &pNdisCommon->N6CSendSingleNetBufferListTimer, - (RT_TIMER_CALL_BACK)N6CSendSingleNetBufferListTimerCallback, - NULL, "N6CSendSingleNetBufferListTimer"); + PlatformInitializeTimer(pAdapter, &pNdisCommon->N6CSendSingleNetBufferListTimer, + (RT_TIMER_CALL_BACK)N6CSendSingleNetBufferListTimerCallback, + NULL, "N6CSendSingleNetBufferListTimer"); - PlatformInitializeTimer(pAdapter, &(pNdisCommon->PNPReConnentTimer), + PlatformInitializeTimer(pAdapter, &(pNdisCommon->PNPReConnentTimer), (RT_TIMER_CALL_BACK)PNPReConnentTimerCallback, NULL, "PNPReConnentTimer"); if(pMgntInfo->bSupportPacketCoalescing) { // Do colese - PlatformInitializeTimer(pAdapter, &(pNdisCommon->D0RxIndicatTimer), + PlatformInitializeTimer(pAdapter, &(pNdisCommon->D0RxIndicatTimer), (RT_TIMER_CALL_BACK)D0RxIndicatTimerCallback, NULL, "D0RxIndicatTimer"); - + RTInitializeListHead( &(pNdisCommon->D0FilterPktQueue) ); - + NdisAllocateSpinLock(&(pNdisCommon->D0FilterPktLock)); - + //pNdisCommon->D0FilterState = RT_D0_FILTER_NONE; // Init D0FilterState !! pNdisCommon->D0FilterState = RT_D0_FILTER_INIT; // For Test !!! } PlatformInitializeWorkItem( pAdapter, - &(pNdisCommon->InitializeAdapterWorkItem), + &(pNdisCommon->InitializeAdapterWorkItem), (RT_WORKITEM_CALL_BACK)InitializeAdapterWorkItemCallback, (PVOID)pAdapter, "InitializeAdapterWorkItem"); PlatformInitializeWorkItem( pAdapter, - &(pNdisCommon->ReleaseDataFrameQueuedWorkItem), + &(pNdisCommon->ReleaseDataFrameQueuedWorkItem), (RT_WORKITEM_CALL_BACK)N6CReleaseDataFrameQueuedWorkItemCallback, (PVOID)pAdapter, "N6CReleaseDataFrameQueuedWorkItemCallback"); @@ -1419,7 +1419,7 @@ InitNdis6CommonResources( // VOID ReleaseNdis6CommonResources( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; @@ -1432,11 +1432,11 @@ ReleaseNdis6CommonResources( PlatformFreeWorkItem( &(pNdisCommon->SetAdhocLinkStateWorkItem) ); PlatformFreeWorkItem( &(pNdisCommon->InitializeAdapterWorkItem) ); - PlatformCancelTimer(pAdapter, &(pNdisCommon->InitializeAdapterTimer)); - PlatformReleaseTimer(pAdapter, &(pNdisCommon->InitializeAdapterTimer)); + PlatformCancelTimer(pAdapter, &(pNdisCommon->InitializeAdapterTimer)); + PlatformReleaseTimer(pAdapter, &(pNdisCommon->InitializeAdapterTimer)); PlatformCancelTimer(pAdapter, &(pNdisCommon->N6CSendSingleNetBufferListTimer)); PlatformReleaseTimer(pAdapter, &(pNdisCommon->N6CSendSingleNetBufferListTimer)); - + PlatformCancelTimer(pAdapter, &(pNdisCommon->PNPReConnentTimer)); PlatformReleaseTimer(pAdapter, &(pNdisCommon->PNPReConnentTimer)); @@ -1447,20 +1447,20 @@ ReleaseNdis6CommonResources( NdisFreeSpinLock(&(pNdisCommon->D0FilterPktLock)); } - + RT_TRACE(COMP_INIT, DBG_LOUD, ("Release TxSemaphore IOSemaphore before N6CDeInitThread\n")); // Release Tx semaphore before cancel corresponding Tx thread. PlatformReleaseSemaphore(&device->TxSemaphore); // Free Tx semaphore. PlatformFreeSemaphore(&device->TxSemaphore); -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // Release IO semaphore before cancel corresponding IO thread. PlatformReleaseSemaphore(&device->IOSemaphore); // Free IO semaphore. PlatformFreeSemaphore(&device->IOSemaphore); #endif // - // In the WDI model, the MS Component handles the original MiniportHaltEx call + // In the WDI model, the MS Component handles the original MiniportHaltEx call // and splits it into multiple WDI interface calls. So we only need to handle DeinitThread here instead. // 2015.03.09. // @@ -1521,7 +1521,7 @@ N6IndicateStatus( VOID N6CInitializeSpinLocks( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { TX_InitializeSpinlock(pAdapter); @@ -1546,7 +1546,7 @@ N6CInitializeSpinLocks( PlatformInitializeSpinLock(pAdapter, RT_USBRX_POSTPROC_SPINLOCK); #endif - PlatformInitializeSpinLock(pAdapter, RT_PORT_SPINLOCK); + PlatformInitializeSpinLock(pAdapter, RT_PORT_SPINLOCK); PlatformInitializeSpinLock(pAdapter, RT_GEN_TEMP_BUF_SPINLOCK); @@ -1561,17 +1561,17 @@ N6CInitializeSpinLocks( PlatformInitializeSpinLock(pAdapter, RT_P2P_SPIN_LOCK); PlatformInitializeSpinLock(pAdapter, RT_IQK_SPINLOCK); PlatformInitializeSpinLock(pAdapter, RT_DYN_TXPWRTBL_SPINLOCK); - PlatformInitializeSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); + PlatformInitializeSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); PlatformInitializeSpinLock(pAdapter, RT_INDIC_SPINLOCK); PlatformInitializeSpinLock(pAdapter, RT_RFD_SPINLOCK); - + #if DRV_LOG_REGISTRY - PlatformInitializeSpinLock(pAdapter, RT_DRV_STATE_SPINLOCK); + PlatformInitializeSpinLock(pAdapter, RT_DRV_STATE_SPINLOCK); #endif #if (AUTO_CHNL_SEL_NHM == 1) - PlatformInitializeSpinLock(pAdapter, RT_ACS_SPINLOCK); + PlatformInitializeSpinLock(pAdapter, RT_ACS_SPINLOCK); #endif PlatformInitializeSpinLock(pAdapter, RT_RX_REF_CNT_SPINLOCK); @@ -1583,7 +1583,7 @@ N6CInitializeSpinLocks( VOID N6CFreeSpinLocks( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { TX_FreeSpinlock(pAdapter); @@ -1609,12 +1609,12 @@ N6CFreeSpinLocks( #endif - PlatformFreeSpinLock(pAdapter, RT_PORT_SPINLOCK); + PlatformFreeSpinLock(pAdapter, RT_PORT_SPINLOCK); PlatformFreeSpinLock(pAdapter, RT_GEN_TEMP_BUF_SPINLOCK); PlatformFreeSpinLock(pAdapter, RT_AWB_SPINLOCK); - + PlatformFreeSpinLock(pAdapter, RT_BTData_SPINLOCK); PlatformFreeSpinLock(pAdapter, RT_BUFFER_SPINLOCK); @@ -1622,10 +1622,10 @@ N6CFreeSpinLocks( PlatformFreeSpinLock(pAdapter, RT_HW_TIMER_SPIN_LOCK); PlatformFreeSpinLock(pAdapter, RT_P2P_SPIN_LOCK); - PlatformFreeSpinLock(pAdapter, RT_IQK_SPINLOCK); + PlatformFreeSpinLock(pAdapter, RT_IQK_SPINLOCK); PlatformFreeSpinLock(pAdapter, RT_DYN_TXPWRTBL_SPINLOCK); - PlatformFreeSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); - + PlatformFreeSpinLock(pAdapter, RT_CHNLLIST_SPINLOCK); + PlatformFreeSpinLock(pAdapter, RT_INDIC_SPINLOCK); PlatformFreeSpinLock(pAdapter, RT_RFD_SPINLOCK); @@ -1634,7 +1634,7 @@ N6CFreeSpinLocks( #endif #if (AUTO_CHNL_SEL_NHM == 1) - PlatformFreeSpinLock(pAdapter, RT_ACS_SPINLOCK); + PlatformFreeSpinLock(pAdapter, RT_ACS_SPINLOCK); #endif PlatformFreeSpinLock(pAdapter, RT_RX_REF_CNT_SPINLOCK); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.h b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.h index 4ee90a298..06f3f42eb 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Init.h @@ -38,7 +38,7 @@ typedef enum _REG_WEP_STATUS // For 818x UI, 2004.11.30, by rcnjko. typedef enum REG_EncryptionAlgorithm { - REG_WEP_Encryption, // 0 + REG_WEP_Encryption, // 0 REG_TKIP_Encryption, // 1 REG_TKIPv2_Encryption, // 2 REG_AESWRAP_Encryption, // 3 @@ -62,18 +62,18 @@ typedef enum _REG_NETWORK_INFRA typedef struct _ADAPTER ADAPTER, *PADAPTER; NDIS_STATUS -CopyFromUnicodeToOS( +CopyFromUnicodeToOS( UCHAR *pointer, UNICODE_STRING *uniStr, USHORT copyLen); NDIS_STATUS -CopyFromUnicodeToString( +CopyFromUnicodeToString( UCHAR *pointer, UNICODE_STRING *uniStr, USHORT copyLen); -int +int TranslateNdisPsToRtPs( IN NDIS_802_11_POWER_MODE ndisPsMode); @@ -98,7 +98,7 @@ N6UpdateDefaultSetting( IN PADAPTER pAdapter); -VOID +VOID N6RestoreLastInitSetting( IN PADAPTER pAdapter); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.c b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.c index 3be462889..898522699 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.c @@ -21,54 +21,54 @@ N6CAuthModeToDot11( dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthModeToDot11(): DOT11_AUTH_ALGO_80211_OPEN\n")); break; - + case RT_802_11AuthModeShared: dot11AuthAlg = DOT11_AUTH_ALGO_80211_SHARED_KEY; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthModeToDot11(): DOT11_AUTH_ALGO_80211_SHARED_KEY\n")); break; - + case RT_802_11AuthModeAutoSwitch: // No such case in DOT11_AUTH_ALGO_XXX!! dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_WARNING, ("N6CAuthModeToDot11(): RT_802_11AuthModeAutoSwitch => DOT11_AUTH_ALGO_80211_OPEN (WARNING!!!)\n")); break; - + case RT_802_11AuthModeWPA: dot11AuthAlg = DOT11_AUTH_ALGO_WPA; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthModeToDot11(): DOT11_AUTH_ALGO_WPA\n")); break; - + case RT_802_11AuthModeWPAPSK: dot11AuthAlg = DOT11_AUTH_ALGO_WPA_PSK; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthModeToDot11(): DOT11_AUTH_ALGO_WPA_PSK\n")); break; - + case RT_802_11AuthModeWPANone: // No such case in DOT11_AUTH_ALGO_XXX!! dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_WARNING, ("N6CAuthModeToDot11(): RT_802_11AuthModeWPANone => DOT11_AUTH_ALGO_80211_OPEN (WARNING!!!)\n")); break; - + case RT_802_11AuthModeWPA2: dot11AuthAlg = DOT11_AUTH_ALGO_RSNA; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthModeToDot11(): DOT11_AUTH_ALGO_RSNA\n")); break; - + case RT_802_11AuthModeWPA2PSK: dot11AuthAlg = DOT11_AUTH_ALGO_RSNA_PSK; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthModeToDot11(): DOT11_AUTH_ALGO_RSNA_PSK\n")); break; - + case RT_802_11AuthModeMax: dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_WARNING, ("N6CAuthModeToDot11(): RT_802_11AuthModeMax => DOT11_AUTH_ALGO_80211_OPEN (WARNING!!!)\n")); break; - + case RT_802_11AuthModeCCKM: dot11AuthAlg = DOT11_AUTH_ALGO_CCKM; RT_TRACE(COMP_SEC, DBG_WARNING, ("N6CAuthModeToDot11(): RT_802_11AuthModeMax => DOT11_AUTH_ALGO_80211_OPEN (WARNING!!!)\n")); break; - + default: dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_WARNING, ("N6CAuthModeToDot11(): unknow authmode: 0x%X => DOT11_AUTH_ALGO_80211_OPEN (WARNING!!!)\n", AuthMode)); @@ -102,12 +102,12 @@ N6CAuthAlgToDot11( dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthAlgToDot11(): DOT11_AUTH_ALGO_80211_OPEN\n")); break; - + case SHARED_KEY: dot11AuthAlg = DOT11_AUTH_ALGO_80211_SHARED_KEY; RT_TRACE(COMP_SEC, DBG_LOUD, ("N6CAuthAlgToDot11(): DOT11_AUTH_ALGO_80211_SHARED_KEY\n")); break; - + default: dot11AuthAlg = DOT11_AUTH_ALGO_80211_OPEN; RT_TRACE(COMP_SEC, DBG_WARNING, ("N6CAuthAlgToDot11(): unknow authmode: 0x%X => DOT11_AUTH_ALGO_80211_OPEN (WARNING!!!)\n", AuthMode)); @@ -131,7 +131,7 @@ N6CEncAlgorithmToDot11( { RT_ENC_ALG EncAlgorithm = *((PRT_ENC_ALG)pEncAlgorithm); DOT11_CIPHER_ALGORITHM dot11CipherAlg; - + switch( EncAlgorithm ) { case RT_ENC_ALG_NO_CIPHER: @@ -162,7 +162,7 @@ N6CEncAlgorithmToDot11( case RT_ENC_ALG_WEP: dot11CipherAlg = DOT11_CIPHER_ALGO_WEP; RT_TRACE( COMP_SEC|COMP_MLME, DBG_LOUD, ("N6CEncAlgorithmToDot11(): DOT11_CIPHER_ALGO_WEP\n") ); - break; + break; default: dot11CipherAlg = DOT11_CIPHER_ALGO_NONE; @@ -203,11 +203,11 @@ N6CQuery_DOT11_ENABLED_AUTHENTICATION_ALGORITHM( } return NDIS_STATUS_BUFFER_OVERFLOW; } - + PlatformZeroMemory( pAuthAlgoList, *BytesNeeded ); N6_ASSIGN_OBJECT_HEADER( - pAuthAlgoList->Header, + pAuthAlgoList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_AUTH_ALGORITHM_LIST)); @@ -219,7 +219,7 @@ N6CQuery_DOT11_ENABLED_AUTHENTICATION_ALGORITHM( pAuthAlgoList->AlgorithmIds[0] = N6CAuthModeToDot11( &authmode ); *BytesWritten = *BytesNeeded; *BytesNeeded = 0; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("<== N6CQuery_DOT11_ENABLED_AUTHENTICATION_ALGORITHM():0x%X\n", pAuthAlgoList->AlgorithmIds[0]) ); return NDIS_STATUS_SUCCESS; } @@ -241,7 +241,7 @@ N6CQuery_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( { PRT_SECURITY_T pSecInfo = &(Adapter->MgntInfo.SecurityInfo); PDOT11_CIPHER_ALGORITHM_LIST pCipherAlgoList = (PDOT11_CIPHER_ALGORITHM_LIST)InformationBuffer; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("==> N6CQuery_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM()\n") ); *BytesNeeded = sizeof(DOT11_CIPHER_ALGORITHM_LIST); @@ -249,11 +249,11 @@ N6CQuery_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( { return NDIS_STATUS_INVALID_LENGTH; } - + PlatformZeroMemory( pCipherAlgoList, *BytesNeeded ); N6_ASSIGN_OBJECT_HEADER( - pCipherAlgoList->Header, + pCipherAlgoList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_CIPHER_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_CIPHER_ALGORITHM_LIST)); @@ -262,7 +262,7 @@ N6CQuery_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( pCipherAlgoList->uTotalNumOfEntries = 1; pCipherAlgoList->AlgorithmIds[0] = N6CEncAlgorithmToDot11(&(pSecInfo->PairwiseEncAlgorithm)); *BytesWritten = *BytesNeeded; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("<== N6CQuery_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM():0x%X\n", pCipherAlgoList->AlgorithmIds[0]) ); return NDIS_STATUS_SUCCESS; } @@ -284,7 +284,7 @@ N6CQuery_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( { PRT_SECURITY_T pSecInfo = &(Adapter->MgntInfo.SecurityInfo); PDOT11_CIPHER_ALGORITHM_LIST pCipherAlgoList = (PDOT11_CIPHER_ALGORITHM_LIST)InformationBuffer; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("==> N6CQuery_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM()\n") ); *BytesNeeded = sizeof(DOT11_CIPHER_ALGORITHM_LIST); @@ -292,11 +292,11 @@ N6CQuery_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( { return NDIS_STATUS_INVALID_LENGTH; } - + PlatformZeroMemory( pCipherAlgoList, *BytesNeeded ); N6_ASSIGN_OBJECT_HEADER( - pCipherAlgoList->Header, + pCipherAlgoList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_CIPHER_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_CIPHER_ALGORITHM_LIST)); @@ -305,7 +305,7 @@ N6CQuery_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( pCipherAlgoList->uTotalNumOfEntries = 1; pCipherAlgoList->AlgorithmIds[0] = N6CEncAlgorithmToDot11(&(pSecInfo->GroupEncAlgorithm)); *BytesWritten = *BytesNeeded; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("<== N6CQuery_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM():0x%X\n", pCipherAlgoList->AlgorithmIds[0]) ); return NDIS_STATUS_SUCCESS; } @@ -325,7 +325,7 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( OUT PULONG BytesNeeded ) { - static DOT11_AUTH_CIPHER_PAIR UcastAuthCipherList[] = + static DOT11_AUTH_CIPHER_PAIR UcastAuthCipherList[] = { {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_NONE}, // 0 {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_CCMP}, //14 @@ -342,21 +342,21 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( {DOT11_AUTH_ALGO_WPA, DOT11_CIPHER_ALGO_CCMP}, //11 {DOT11_AUTH_ALGO_WPA_PSK, DOT11_CIPHER_ALGO_CCMP}, //12 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_CCMP}, //13 - + {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_TKIP }, //15 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_CCMP}, //16 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_MFPCCMP }, //17 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_MFPTKIP}, //18 - + {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_MFPCCMP}, //19 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_MFPTKIP}, //20 - + {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static DOT11_AUTH_CIPHER_PAIR UcastAuthCipherListWiFiCfg[] = + static DOT11_AUTH_CIPHER_PAIR UcastAuthCipherListWiFiCfg[] = { {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_NONE}, // 0 {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_CCMP}, //14 @@ -373,21 +373,21 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( //{DOT11_AUTH_ALGO_WPA, DOT11_CIPHER_ALGO_CCMP}, //11 //{DOT11_AUTH_ALGO_WPA_PSK, DOT11_CIPHER_ALGO_CCMP}, //12 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_CCMP}, //13 - + {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_TKIP }, //15 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_CCMP}, //16 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_MFPCCMP }, //17 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_MFPTKIP}, //18 - + {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_MFPCCMP}, //19 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_MFPTKIP}, //20 - + {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static DOT11_AUTH_CIPHER_PAIR UcastAuthCipherListIBSS[] = + static DOT11_AUTH_CIPHER_PAIR UcastAuthCipherListIBSS[] = { {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_NONE}, // 0 {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_WEP40}, // 1 @@ -395,16 +395,16 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_WEP}, // 3 {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_CCMP}, //4//4 }; - + u4Byte ulNumOfPairSupported = 0; u4Byte TotalLength = 0; PDOT11_AUTH_CIPHER_PAIR_LIST pAuthCipherList = (PDOT11_AUTH_CIPHER_PAIR_LIST)InformationBuffer; u4Byte i; u4Byte FillLength = 0; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("==> N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR()\n") ); - + if( Adapter->MgntInfo.Regdot11networktype != RT_JOIN_NETWORKTYPE_ADHOC ) { if(Adapter->MgntInfo.bWiFiConfg) @@ -425,12 +425,12 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( } PlatformZeroMemory( pAuthCipherList, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST) ); N6_ASSIGN_OBJECT_HEADER( - pAuthCipherList->Header, + pAuthCipherList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_CIPHER_PAIR_LIST_REVISION_1, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST)); FillLength += FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); - + pAuthCipherList->uNumOfEntries = 0; pAuthCipherList->uTotalNumOfEntries = ulNumOfPairSupported; for (i=0; iAuthCipherPairs, + CopyMem(pAuthCipherList->AuthCipherPairs, ((Adapter->MgntInfo.bWiFiConfg) ? UcastAuthCipherListWiFiCfg : UcastAuthCipherList), sizeof(DOT11_AUTH_CIPHER_PAIR)*pAuthCipherList->uNumOfEntries); *BytesWritten = FillLength; *BytesNeeded = TotalLength; } - else { + else { ulNumOfPairSupported = sizeof(UcastAuthCipherListIBSS)/sizeof(DOT11_AUTH_CIPHER_PAIR); TotalLength = sizeof(UcastAuthCipherListIBSS) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); if ( InformationBufferLength < sizeof(DOT11_AUTH_CIPHER_PAIR_LIST) ) @@ -464,14 +464,14 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( } PlatformZeroMemory( pAuthCipherList, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST) ); N6_ASSIGN_OBJECT_HEADER( - pAuthCipherList->Header, + pAuthCipherList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_CIPHER_PAIR_LIST_REVISION_1, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST)); FillLength += FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); pAuthCipherList->uNumOfEntries = 0; pAuthCipherList->uTotalNumOfEntries = ulNumOfPairSupported; - + for (i=0; i InformationBufferLength) @@ -485,13 +485,13 @@ N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( FillLength += sizeof(DOT11_AUTH_CIPHER_PAIR); } - CopyMem(pAuthCipherList->AuthCipherPairs, + CopyMem(pAuthCipherList->AuthCipherPairs, UcastAuthCipherListIBSS, sizeof(DOT11_AUTH_CIPHER_PAIR)*pAuthCipherList->uNumOfEntries); *BytesWritten = FillLength; *BytesNeeded = TotalLength; - + } RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("<== N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR()\n") ); return ndisStatus; @@ -514,7 +514,7 @@ N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( OUT PULONG BytesNeeded ) { - static DOT11_AUTH_CIPHER_PAIR McastAuthCipherList[] = + static DOT11_AUTH_CIPHER_PAIR McastAuthCipherList[] = { {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_NONE}, // 0 {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_CCMP}, //14 @@ -531,17 +531,17 @@ N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( {DOT11_AUTH_ALGO_WPA, DOT11_CIPHER_ALGO_CCMP}, //11 {DOT11_AUTH_ALGO_WPA_PSK, DOT11_CIPHER_ALGO_CCMP}, //12 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_CCMP}, //13 - + {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_WEP40}, //15 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_WEP104}, //16 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_TKIP}, //17 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_CCMP}, //18 - + {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - - static DOT11_AUTH_CIPHER_PAIR McastAuthCipherListWiFiCfg[] = + + static DOT11_AUTH_CIPHER_PAIR McastAuthCipherListWiFiCfg[] = { {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_NONE}, // 0 {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_CCMP}, //14 @@ -558,17 +558,17 @@ N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( //{DOT11_AUTH_ALGO_WPA, DOT11_CIPHER_ALGO_CCMP}, //11 //{DOT11_AUTH_ALGO_WPA_PSK, DOT11_CIPHER_ALGO_CCMP}, //12 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_CCMP}, //13 - + {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_WEP40}, //15 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_WEP104}, //16 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_TKIP}, //17 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_CCMP}, //18 - + {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static DOT11_AUTH_CIPHER_PAIR McastAuthCipherListIBSS[] = + static DOT11_AUTH_CIPHER_PAIR McastAuthCipherListIBSS[] = { {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_NONE}, // 0 {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_WEP40}, // 1 @@ -576,14 +576,14 @@ N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( {DOT11_AUTH_ALGO_80211_OPEN, DOT11_CIPHER_ALGO_WEP}, // 3 {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_CCMP}, // 4 }; - + u4Byte ulNumOfPairSupported = sizeof(McastAuthCipherList)/sizeof(DOT11_AUTH_CIPHER_PAIR); u4Byte TotalLength = sizeof(McastAuthCipherList) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); PDOT11_AUTH_CIPHER_PAIR_LIST pAuthCipherList = (PDOT11_AUTH_CIPHER_PAIR_LIST)InformationBuffer; u4Byte i; u4Byte FillLength = 0; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("==> N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR()\n") ); if( Adapter->MgntInfo.Regdot11networktype != RT_JOIN_NETWORKTYPE_ADHOC) { @@ -607,12 +607,12 @@ N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( PlatformZeroMemory( pAuthCipherList, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST) ); N6_ASSIGN_OBJECT_HEADER( - pAuthCipherList->Header, + pAuthCipherList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_CIPHER_PAIR_LIST_REVISION_1, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST)); FillLength += FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); - + pAuthCipherList->uNumOfEntries = 0; pAuthCipherList->uTotalNumOfEntries = ulNumOfPairSupported; for (i=0; iuNumOfEntries ++; FillLength += sizeof(DOT11_AUTH_CIPHER_PAIR); } @@ -647,12 +647,12 @@ N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( PlatformZeroMemory( pAuthCipherList, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST) ); N6_ASSIGN_OBJECT_HEADER( - pAuthCipherList->Header, + pAuthCipherList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_CIPHER_PAIR_LIST_REVISION_1, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST)); FillLength += FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); - + pAuthCipherList->uNumOfEntries = 0; pAuthCipherList->uTotalNumOfEntries = ulNumOfPairSupported; for (i=0; iuNumOfEntries ++; FillLength += sizeof(DOT11_AUTH_CIPHER_PAIR); } @@ -700,7 +700,7 @@ N6CQuery_DOT11_PMKID_LIST( PlatformZeroMemory( pPMKIDList, TotalLength ); N6_ASSIGN_OBJECT_HEADER( - pPMKIDList->Header, + pPMKIDList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_PMKID_LIST_REVISION_1, sizeof(DOT11_PMKID_LIST)); @@ -711,7 +711,7 @@ N6CQuery_DOT11_PMKID_LIST( // // Integer overflow check // - if ((ULONG)FIELD_OFFSET(DOT11_PMKID_LIST, PMKIDs) > + if ((ULONG)FIELD_OFFSET(DOT11_PMKID_LIST, PMKIDs) > (ULONG)FIELD_OFFSET(DOT11_PMKID_LIST, PMKIDs) + pSecInfo->PMKIDCount * sizeof(DOT11_PMKID_ENTRY)) { RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_WARNING, (" <- [Error]N6CQuery_DOT11_PMKID_LIST(), NDIS_STATUS_FAILURE\n") ); @@ -729,7 +729,7 @@ N6CQuery_DOT11_PMKID_LIST( // // Copy the PMKID list. - // + // pPMKIDList->uNumOfEntries = pSecInfo->PMKIDCount; for( idx=0; idxPMKIDCount; idx++ ) { @@ -742,7 +742,7 @@ N6CQuery_DOT11_PMKID_LIST( // 3. uFlags: This member is reserved and must be set to zero. pPMKIDList->PMKIDs[idx].uFlags = 0; } - + RT_TRACE( COMP_OID_QUERY|COMP_SEC, DBG_TRACE, ("<== N6CQuery_DOT11_PMKID_LIST()\n") ); return NDIS_STATUS_SUCCESS; } @@ -775,7 +775,7 @@ N6CQuery_DOT11_EXTSTA_CAPABILITY( PlatformZeroMemory( pDot11ExtStaCap, *BytesNeeded ); N6_ASSIGN_OBJECT_HEADER( - pDot11ExtStaCap->Header, + pDot11ExtStaCap->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_EXTSTA_CAPABILITY_REVISION_1, sizeof(DOT11_EXTSTA_CAPABILITY)); @@ -792,7 +792,7 @@ N6CQuery_DOT11_EXTSTA_CAPABILITY( pDot11ExtStaCap->uMaxNumPerSTADefaultKeyTables = NATIVE_802_11_MAX_PER_STA_DEFAULT_KEY; *BytesWritten = *BytesNeeded; - + RT_TRACE( COMP_OID_QUERY, DBG_TRACE, ("<== N6CQuery_DOT11_EXTSTA_CAPABILITY()\n") ); return NDIS_STATUS_SUCCESS; } @@ -816,15 +816,15 @@ N6CQuery_DOT11_POWER_MGMT_REQUEST( { case POWER_SAVING_NO_POWER_SAVING: *pPowerSaveLevel = DOT11_POWER_SAVING_NO_POWER_SAVING; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_NO_POWER_SAVING\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_NO_POWER_SAVING\n") ); break; case POWER_SAVING_FAST_PSP: *pPowerSaveLevel = DOT11_POWER_SAVING_FAST_PSP; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_FAST_PSP\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_FAST_PSP\n") ); break; case POWER_SAVING_MAX_PSP: *pPowerSaveLevel = DOT11_POWER_SAVING_MAX_PSP; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST():DOT11_POWER_SAVING_MAX_PSP\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST():DOT11_POWER_SAVING_MAX_PSP\n") ); break; case POWER_SAVING_MAXIMUM_LEVEL: *pPowerSaveLevel = DOT11_POWER_SAVING_MAXIMUM_LEVEL; @@ -832,7 +832,7 @@ N6CQuery_DOT11_POWER_MGMT_REQUEST( break; default: *pPowerSaveLevel = DOT11_POWER_SAVING_NO_POWER_SAVING; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): unkown\n")); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): unkown\n")); break; } RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_POWER_MGMT_REQUEST(): %d\n", pPSC->PowerSaveLevel) ); @@ -851,7 +851,7 @@ N6CQuery_DOT11_EXCLUDED_MAC_ADDRESS_LIST( PDOT11_MAC_ADDRESS_LIST pMacAddrList = (PDOT11_MAC_ADDRESS_LIST)InformationBuffer; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); u4Byte AddrWritten; - + *BytesNeeded = FIELD_OFFSET(DOT11_MAC_ADDRESS_LIST, MacAddrs) + pMgntInfo->ExcludedMacAddrListLength*6; @@ -866,12 +866,12 @@ N6CQuery_DOT11_EXCLUDED_MAC_ADDRESS_LIST( NDIS_OBJECT_TYPE_DEFAULT, DOT11_MAC_ADDRESS_LIST_REVISION_1, sizeof(DOT11_MAC_ADDRESS_LIST)); - + AddrWritten = MgntActQuery_ExcludedMacAddressList( - Adapter, + Adapter, (pu1Byte)(pMacAddrList->MacAddrs), *BytesNeeded - FIELD_OFFSET(DOT11_MAC_ADDRESS_LIST, MacAddrs)); - + pMacAddrList->uNumOfEntries = AddrWritten; pMacAddrList->uTotalNumOfEntries = AddrWritten; @@ -893,7 +893,7 @@ N6CQuery_DOT11_DESIRED_BSSID_LIST( PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PDOT11_BSSID_LIST pBssidList = (PDOT11_BSSID_LIST)InformationBuffer; - //RT_TRACE(COMP_OID_QUERY, DBG_LOUD, + //RT_TRACE(COMP_OID_QUERY, DBG_LOUD, // ("N6CQuery_DOT11_DESIRED_BSSID_LIST(): BytesNeeded: %u, InfoBufLen: %u\n", *BytesNeeded, InformationBufferLength)); // @@ -905,7 +905,7 @@ N6CQuery_DOT11_DESIRED_BSSID_LIST( *BytesWritten = 0; return NDIS_STATUS_BUFFER_OVERFLOW; } - + pBssidList->uTotalNumOfEntries = pNdisCommon->NumDot11DesiredBSSIDList; if(InformationBufferLength < sizeof(DOT11_BSSID_LIST)) {// Refer to DDK, by haich, 2008.08.19. @@ -915,7 +915,7 @@ N6CQuery_DOT11_DESIRED_BSSID_LIST( return NDIS_STATUS_BUFFER_OVERFLOW; } - *BytesNeeded = FIELD_OFFSET(DOT11_BSSID_LIST, BSSIDs) + + *BytesNeeded = FIELD_OFFSET(DOT11_BSSID_LIST, BSSIDs) + pNdisCommon->NumDot11DesiredBSSIDList * sizeof(DOT11_MAC_ADDRESS); if ( InformationBufferLength < *BytesNeeded ) @@ -939,7 +939,7 @@ N6CQuery_DOT11_DESIRED_BSSID_LIST( pNdisCommon->NumDot11DesiredBSSIDList*sizeof(DOT11_MAC_ADDRESS)); *BytesWritten = *BytesNeeded; - + return NDIS_STATUS_SUCCESS; } @@ -964,7 +964,7 @@ N6CQuery_DOT11_OPERATION_MODE_CAPABILITY( *BytesNeeded = length; return NDIS_STATUS_INVALID_LENGTH; } - + PlatformMoveMemory( InformationBuffer, &(pNdisCommon->dot11OperationModeCapability), @@ -980,7 +980,7 @@ N6CQuery_DOT11_CURRENT_OPERATION_MODE( OUT PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, - OUT PULONG BytesNeeded + OUT PULONG BytesNeeded ) { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; @@ -1013,7 +1013,7 @@ N6CQuery_DOT11_DESIRED_SSID_LIST( PDOT11_SSID_LIST pSsidList = (PDOT11_SSID_LIST)InformationBuffer; PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + if ( InformationBufferLength < sizeof(DOT11_SSID_LIST) ) { *BytesWritten = 0; @@ -1026,7 +1026,7 @@ N6CQuery_DOT11_DESIRED_SSID_LIST( { *BytesWritten = 0; } - + PlatformMoveMemory( pSsidList, &(pNdisCommon->dot11DesiredSSIDList), @@ -1046,10 +1046,10 @@ N6CQuery_DOT11_PRIVACY_EXEMPTION_LIST( { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - PDOT11_PRIVACY_EXEMPTION_LIST pExemptionList = + PDOT11_PRIVACY_EXEMPTION_LIST pExemptionList = (PDOT11_PRIVACY_EXEMPTION_LIST)InformationBuffer; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_PRIVACY_EXEMPTION_LIST.\n")); do @@ -1064,7 +1064,7 @@ N6CQuery_DOT11_PRIVACY_EXEMPTION_LIST( *BytesNeeded = sizeof(DOT11_PRIVACY_EXEMPTION_LIST); if ( InformationBufferLength < *BytesNeeded ) { - pExemptionList->uTotalNumOfEntries = + pExemptionList->uTotalNumOfEntries = pNdisCommon->PrivacyExemptionEntrieNum; Status = NDIS_STATUS_BUFFER_OVERFLOW; break; @@ -1079,15 +1079,15 @@ N6CQuery_DOT11_PRIVACY_EXEMPTION_LIST( pExemptionList->uNumOfEntries = pNdisCommon->PrivacyExemptionEntrieNum; pExemptionList->uTotalNumOfEntries = pNdisCommon->PrivacyExemptionEntrieNum; - PlatformMoveMemory(pExemptionList->PrivacyExemptionEntries, - pNdisCommon->PrivacyExemptionEntries, + PlatformMoveMemory(pExemptionList->PrivacyExemptionEntries, + pNdisCommon->PrivacyExemptionEntries, pNdisCommon->PrivacyExemptionEntrieNum* sizeof(DOT11_PRIVACY_EXEMPTION)); *BytesWritten = *BytesNeeded; }while(FALSE); return Status; - + } NDIS_STATUS @@ -1153,7 +1153,7 @@ N6CQuery_DOT11_STATISTICS( } PlatformZeroMemory(pStatistics, InformationBufferLength); - + N6_ASSIGN_OBJECT_HEADER( pStatistics->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1184,22 +1184,22 @@ N6CQuery_DOT11_STATISTICS( { RT_TRACE(COMP_RECV, DBG_LOUD, ("N6CQuery_DOT11_STATISTICS:() QueryAfterFirstReset %d\n", Adapter->RxStats.QueryAfterFirstReset)); - if(Adapter->RxStats.QueryAfterFirstReset != 2) + if(Adapter->RxStats.QueryAfterFirstReset != 2) { - Adapter->RxStats.NumRxReceivedFrameCount = - pStatistics->MacMcastCounters.ullReceivedFrameCount = - Adapter->RxStats.NumRxMulticast + Adapter->RxStats.NumRxBroadcast; + Adapter->RxStats.NumRxReceivedFrameCount = + pStatistics->MacMcastCounters.ullReceivedFrameCount = + Adapter->RxStats.NumRxMulticast + Adapter->RxStats.NumRxBroadcast; } else { Adapter->RxStats.NumRxReceivedFrameCount += 50; - pStatistics->MacMcastCounters.ullReceivedFrameCount = - Adapter->RxStats.NumRxReceivedFrameCount; + pStatistics->MacMcastCounters.ullReceivedFrameCount = + Adapter->RxStats.NumRxReceivedFrameCount; } Adapter->RxStats.QueryAfterFirstReset++; - + } - + // Unicast pStatistics->MacUcastCounters.ullTransmittedFrameCount = Adapter->TxStats.NumTxUnicast; pStatistics->MacUcastCounters.ullReceivedFrameCount = Adapter->RxStats.NumRxUnicast; @@ -1211,63 +1211,63 @@ N6CQuery_DOT11_STATISTICS( pStatistics->MacUcastCounters.ullTKIPICVErrorCount = Adapter->RxStats.NumRxTKIPICVErrorUnicast; pStatistics->MacUcastCounters.ullCCMPReplays = Adapter->RxStats.NumRxCCMPReplayUnicast; pStatistics->MacUcastCounters.ullCCMPDecryptErrors = Adapter->RxStats.NumRxCCMPDecryptErrorsUnicast; - pStatistics->MacUcastCounters.ullWEPUndecryptableCount = Adapter->RxStats.NumRxWEPUndecryptableUnicast; + pStatistics->MacUcastCounters.ullWEPUndecryptableCount = Adapter->RxStats.NumRxWEPUndecryptableUnicast; pStatistics->MacUcastCounters.ullWEPICVErrorCount = Adapter->RxStats.NumRxWEPICVErrorUnicast; - pStatistics->MacUcastCounters.ullDecryptSuccessCount = Adapter->RxStats.NumRxDecryptSuccessUnicast; - pStatistics->MacUcastCounters.ullDecryptFailureCount = Adapter->RxStats.NumRxDecryptFailureUnicast; + pStatistics->MacUcastCounters.ullDecryptSuccessCount = Adapter->RxStats.NumRxDecryptSuccessUnicast; + pStatistics->MacUcastCounters.ullDecryptFailureCount = Adapter->RxStats.NumRxDecryptFailureUnicast; // Multicast - pStatistics->MacMcastCounters.ullTransmittedFrameCount = + pStatistics->MacMcastCounters.ullTransmittedFrameCount = Adapter->TxStats.NumTxMulticast + Adapter->TxStats.NumTxBroadcast; //if(!Adapter->bInHctTest) // 2011/06/14 MH For passing WLK1.6 EXTSTA_Test statistic 2011/06/01 filter. { - pStatistics->MacMcastCounters.ullReceivedFrameCount = + pStatistics->MacMcastCounters.ullReceivedFrameCount = Adapter->RxStats.NumRxMulticast + Adapter->RxStats.NumRxBroadcast; } - pStatistics->MacMcastCounters.ullTransmittedFailureFrameCount = + pStatistics->MacMcastCounters.ullTransmittedFailureFrameCount = Adapter->TxStats.NumTxErrMulticast + Adapter->TxStats.NumTxErrBroadcast; pStatistics->MacMcastCounters.ullReceivedFailureFrameCount = Adapter->RxStats.NumRxErrTotalMulticast; pStatistics->MacMcastCounters.ullWEPExcludedCount = Adapter->RxStats.NumRxExcludeUnencryptedMulticast + Adapter->RxStats.NumRxExcludeUnencryptedBroadcast; - pStatistics->MacMcastCounters.ullTKIPLocalMICFailures = + pStatistics->MacMcastCounters.ullTKIPLocalMICFailures = Adapter->RxStats.NumRxTKIPLocalMICFailuresMulticast + Adapter->RxStats.NumRxTKIPLocalMICFailuresBroadcast; pStatistics->MacMcastCounters.ullTKIPReplays = Adapter->RxStats.NumRxTKIPReplayMulticast; - pStatistics->MacMcastCounters.ullTKIPICVErrorCount = - Adapter->RxStats.NumRxTKIPICVErrorMulticast + Adapter->RxStats.NumRxTKIPICVErrorBroadcast; + pStatistics->MacMcastCounters.ullTKIPICVErrorCount = + Adapter->RxStats.NumRxTKIPICVErrorMulticast + Adapter->RxStats.NumRxTKIPICVErrorBroadcast; pStatistics->MacMcastCounters.ullCCMPReplays = Adapter->RxStats.NumRxCCMPReplayMulticast; pStatistics->MacMcastCounters.ullCCMPDecryptErrors = Adapter->RxStats.NumRxCCMPDecryptErrorsMulticast + Adapter->RxStats.NumRxCCMPDecryptErrorsBroadcast; - pStatistics->MacMcastCounters.ullWEPUndecryptableCount = + pStatistics->MacMcastCounters.ullWEPUndecryptableCount = Adapter->RxStats.NumRxWEPUndecryptableMulticast + Adapter->RxStats.NumRxWEPUndecryptableBroadcast; // TODO pStatistics->MacMcastCounters.ullWEPICVErrorCount = Adapter->RxStats.NumRxWEPICVErrorMulticast + Adapter->RxStats.NumRxWEPICVErrorBroadcast; - pStatistics->MacMcastCounters.ullDecryptSuccessCount = + pStatistics->MacMcastCounters.ullDecryptSuccessCount = Adapter->RxStats.NumRxDecryptSuccessMulticast + Adapter->RxStats.NumRxDecryptSuccessBroadcast; - pStatistics->MacMcastCounters.ullDecryptFailureCount = - Adapter->RxStats.NumRxDecryptFailureMulticast + Adapter->RxStats.NumRxDecryptFailureBroadcast; + pStatistics->MacMcastCounters.ullDecryptFailureCount = + Adapter->RxStats.NumRxDecryptFailureMulticast + Adapter->RxStats.NumRxDecryptFailureBroadcast; // PHY pStatistics->PhyCounters[operatingPhyId].ullTransmittedFrameCount = Adapter->TxStats.NumTxOkTotal; - pStatistics->PhyCounters[operatingPhyId].ullMulticastTransmittedFrameCount = + pStatistics->PhyCounters[operatingPhyId].ullMulticastTransmittedFrameCount = Adapter->TxStats.NumTxMulticast + Adapter->TxStats.NumTxBroadcast; - pStatistics->PhyCounters[operatingPhyId].ullFailedCount = Adapter->TxStats.NumTxErrTotal; - pStatistics->PhyCounters[operatingPhyId].ullRetryCount = Adapter->TxStats.NumTxRetryCount; + pStatistics->PhyCounters[operatingPhyId].ullFailedCount = Adapter->TxStats.NumTxErrTotal; + pStatistics->PhyCounters[operatingPhyId].ullRetryCount = Adapter->TxStats.NumTxRetryCount; pStatistics->PhyCounters[operatingPhyId].ullMultipleRetryCount = 0; // TODO pStatistics->PhyCounters[operatingPhyId].ullMaxTXLifetimeExceededCount = 0; // TODO - pStatistics->PhyCounters[operatingPhyId].ullTransmittedFragmentCount = Adapter->TxStats.NumTxOkTotal; + pStatistics->PhyCounters[operatingPhyId].ullTransmittedFragmentCount = Adapter->TxStats.NumTxOkTotal; pStatistics->PhyCounters[operatingPhyId].ullRTSSuccessCount = 0; // TODO pStatistics->PhyCounters[operatingPhyId].ullRTSFailureCount = 0; // TODO pStatistics->PhyCounters[operatingPhyId].ullACKFailureCount = 0; // TODO pStatistics->PhyCounters[operatingPhyId].ullReceivedFrameCount = Adapter->RxStats.NumRxFramgment; - pStatistics->PhyCounters[operatingPhyId].ullMulticastReceivedFrameCount = Adapter->RxStats.NumRxFramgment; + pStatistics->PhyCounters[operatingPhyId].ullMulticastReceivedFrameCount = Adapter->RxStats.NumRxFramgment; pStatistics->PhyCounters[operatingPhyId].ullPromiscuousReceivedFrameCount = 0; // TODO pStatistics->PhyCounters[operatingPhyId].ullMaxRXLifetimeExceededCount = 0; // TODO pStatistics->PhyCounters[operatingPhyId].ullFrameDuplicateCount = 0; // TODO - pStatistics->PhyCounters[operatingPhyId].ullReceivedFragmentCount = Adapter->RxStats.NumRxFramgment; + pStatistics->PhyCounters[operatingPhyId].ullReceivedFragmentCount = Adapter->RxStats.NumRxFramgment; pStatistics->PhyCounters[operatingPhyId].ullPromiscuousReceivedFragmentCount = 0; // TODO - pStatistics->PhyCounters[operatingPhyId].ullFCSErrorCount = + pStatistics->PhyCounters[operatingPhyId].ullFCSErrorCount = Adapter->RxStats.NumRxErrTotalUnicast + Adapter->RxStats.NumRxErrTotalMulticast; - + #if 1 if(Adapter->bInHctTest) { @@ -1275,9 +1275,9 @@ N6CQuery_DOT11_STATISTICS( for(index = 0; index < bound; index++) { //Unicast - if((pStatistics->MacUcastCounters.ullTKIPICVErrorCount > LowerBoundMin[index]&& + if((pStatistics->MacUcastCounters.ullTKIPICVErrorCount > LowerBoundMin[index]&& pStatistics->MacUcastCounters.ullTKIPICVErrorCount < LowerBound[index]) || - (pStatistics->MacUcastCounters.ullTKIPICVErrorCount > UpperBound[index] && + (pStatistics->MacUcastCounters.ullTKIPICVErrorCount > UpperBound[index] && pStatistics->MacUcastCounters.ullTKIPICVErrorCount < UpperBoundMax[index])) pStatistics->MacUcastCounters.ullTKIPICVErrorCount = UpperBound[index]; if((pStatistics->MacUcastCounters.ullCCMPDecryptErrors > LowerBoundMin[index] && @@ -1285,24 +1285,24 @@ N6CQuery_DOT11_STATISTICS( (pStatistics->MacUcastCounters.ullCCMPDecryptErrors > UpperBound[index] && pStatistics->MacUcastCounters.ullCCMPDecryptErrors < UpperBoundMax[index])) pStatistics->MacUcastCounters.ullCCMPDecryptErrors = UpperBound[index]; - if((pStatistics->MacUcastCounters.ullWEPICVErrorCount > LowerBoundMin[index] && + if((pStatistics->MacUcastCounters.ullWEPICVErrorCount > LowerBoundMin[index] && pStatistics->MacUcastCounters.ullWEPICVErrorCount < LowerBound[index]) || (pStatistics->MacUcastCounters.ullWEPICVErrorCount > UpperBound[index] && pStatistics->MacUcastCounters.ullWEPICVErrorCount < UpperBoundMax[index])) pStatistics->MacUcastCounters.ullWEPICVErrorCount = UpperBound[index]; - if((pStatistics->MacUcastCounters.ullWEPUndecryptableCount > LowerBoundMin[index] && + if((pStatistics->MacUcastCounters.ullWEPUndecryptableCount > LowerBoundMin[index] && pStatistics->MacUcastCounters.ullWEPUndecryptableCount < LowerBound[index]) || (pStatistics->MacUcastCounters.ullWEPUndecryptableCount > UpperBound[index] && pStatistics->MacUcastCounters.ullWEPUndecryptableCount < UpperBoundMax[index])) pStatistics->MacUcastCounters.ullWEPUndecryptableCount = UpperBound[index]; - if((pStatistics->MacUcastCounters.ullDecryptFailureCount > LowerBoundMin[index] && + if((pStatistics->MacUcastCounters.ullDecryptFailureCount > LowerBoundMin[index] && pStatistics->MacUcastCounters.ullDecryptFailureCount < LowerBound[index]) || (pStatistics->MacUcastCounters.ullDecryptFailureCount > UpperBound[index] && pStatistics->MacUcastCounters.ullDecryptFailureCount < UpperBoundMax[index])) pStatistics->MacUcastCounters.ullDecryptFailureCount = UpperBound[index]; //Muticast - if((pStatistics->MacMcastCounters.ullTKIPICVErrorCount > LowerBoundMin[index] && + if((pStatistics->MacMcastCounters.ullTKIPICVErrorCount > LowerBoundMin[index] && pStatistics->MacMcastCounters.ullTKIPICVErrorCount < LowerBound[index]) || (pStatistics->MacMcastCounters.ullTKIPICVErrorCount > UpperBound[index] && pStatistics->MacMcastCounters.ullTKIPICVErrorCount < UpperBoundMax[index])) @@ -1312,17 +1312,17 @@ N6CQuery_DOT11_STATISTICS( (pStatistics->MacMcastCounters.ullCCMPDecryptErrors > UpperBound[index] && pStatistics->MacMcastCounters.ullCCMPDecryptErrors < UpperBoundMax[index])) pStatistics->MacMcastCounters.ullCCMPDecryptErrors = UpperBound[index]; - if((pStatistics->MacMcastCounters.ullWEPICVErrorCount > LowerBoundMin[index]&& + if((pStatistics->MacMcastCounters.ullWEPICVErrorCount > LowerBoundMin[index]&& pStatistics->MacMcastCounters.ullWEPICVErrorCount < LowerBound[index]) || (pStatistics->MacMcastCounters.ullWEPICVErrorCount > UpperBound[index] && pStatistics->MacMcastCounters.ullWEPICVErrorCount < UpperBoundMax[index])) pStatistics->MacMcastCounters.ullWEPICVErrorCount = UpperBound[index]; - if((pStatistics->MacMcastCounters.ullWEPUndecryptableCount > LowerBoundMin[index] && + if((pStatistics->MacMcastCounters.ullWEPUndecryptableCount > LowerBoundMin[index] && pStatistics->MacMcastCounters.ullWEPUndecryptableCount < LowerBound[index]) || (pStatistics->MacMcastCounters.ullWEPUndecryptableCount > UpperBound[index] && pStatistics->MacMcastCounters.ullWEPUndecryptableCount < UpperBoundMax[index])) pStatistics->MacMcastCounters.ullWEPUndecryptableCount = UpperBound[index]; - if((pStatistics->MacMcastCounters.ullDecryptFailureCount > LowerBoundMin[index] && + if((pStatistics->MacMcastCounters.ullDecryptFailureCount > LowerBoundMin[index] && pStatistics->MacMcastCounters.ullDecryptFailureCount < LowerBound[index]) || (pStatistics->MacMcastCounters.ullDecryptFailureCount > UpperBound[index] && pStatistics->MacMcastCounters.ullDecryptFailureCount < UpperBoundMax[index])) @@ -1379,7 +1379,7 @@ N6CQuery_DOT11_ATIM_WINDOW( *pAtimWindow = pMgntInfo->dot11AtimWindow; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_ATIM_WINDOW(): %d\n", *pAtimWindow)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } static DOT11_PHY_TYPE @@ -1489,18 +1489,18 @@ N6CQuery_DOT11_DESIRED_PHY_LIST( sizeof(DOT11_PHY_ID_LIST)); pPhyIdList->uTotalNumOfEntries = pNdisCommon->staDesiredPhyCount; - pPhyIdList->uNumOfEntries = 0; + pPhyIdList->uNumOfEntries = 0; // // If the buffer is not big enough, simply return error. // - if (InformationBufferLength < + if (InformationBufferLength < FIELD_OFFSET(DOT11_PHY_ID_LIST, dot11PhyId) + pNdisCommon->staDesiredPhyCount * sizeof(ULONG)) { return NDIS_STATUS_BUFFER_OVERFLOW; } - + // // Copy the desired PHY list. // @@ -1509,9 +1509,9 @@ N6CQuery_DOT11_DESIRED_PHY_LIST( pNdisCommon->staDesiredPhyList, pNdisCommon->staDesiredPhyCount * sizeof(ULONG)); - *BytesWritten = pPhyIdList->uNumOfEntries * sizeof(ULONG) + + *BytesWritten = pPhyIdList->uNumOfEntries * sizeof(ULONG) + FIELD_OFFSET(DOT11_PHY_ID_LIST, dot11PhyId); - + *BytesNeeded = pPhyIdList->uTotalNumOfEntries * sizeof(ULONG) + FIELD_OFFSET(DOT11_PHY_ID_LIST, dot11PhyId); @@ -1552,7 +1552,7 @@ N6CQuery_DOT11_ACTIVE_PHY_LIST( pPhyIdList->uTotalNumOfEntries = 1; // ActivePhyId modifies in NDIS_STATUS_DOT11_ASSOCIATION_COMPLETION. pPhyIdList->dot11PhyId[0] = pNdisCommon->ActivePhyId; - + *BytesWritten = *BytesNeeded; return NDIS_STATUS_SUCCESS; } @@ -1566,12 +1566,12 @@ N6CQuery_DOT11_OPTIONAL_CAPABILITY( PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; PlatformMoveMemory( - pResult, - &(pNdisCommon->RegOptionalCapability), + pResult, + &(pNdisCommon->RegOptionalCapability), sizeof(DOT11_OPTIONAL_CAPABILITY)); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_OPTIONAL_CAPABILITY()\n")); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1583,12 +1583,12 @@ N6CQuery_DOT11_CURRENT_OPTIONAL_CAPABILITY( PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; PlatformMoveMemory( - pResult, - &(pNdisCommon->dot11CurrOptionalCapability), + pResult, + &(pNdisCommon->dot11CurrOptionalCapability), sizeof(DOT11_OPTIONAL_CAPABILITY)); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_CURRENT_OPTIONAL_CAPABILITY()\n")); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1600,7 +1600,7 @@ N6CQuery_DOT11_CF_POLLABLE( *pResult = MgntActQuery_CfPollable(pAdapter); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_CF_POLLABLE()\n")); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1629,14 +1629,14 @@ N6CQuery_DOT11_OPERATIONAL_RATE_SET( { return NDIS_STATUS_BUFFER_OVERFLOW; } - + PlatformZeroMemory(pDot11RateSet, sizeof(DOT11_RATE_SET)); - + pRtRateSet = &(pMgntInfo->SupportedRates); if(pRtRateSet->Length <= DOT11_RATE_SET_MAX_LENGTH) pDot11RateSet->uRateSetLength = pRtRateSet->Length; - else + else pDot11RateSet->uRateSetLength = DOT11_RATE_SET_MAX_LENGTH; for (index=0, opRateIdx=0; index< pDot11RateSet->uRateSetLength; index++) @@ -1647,14 +1647,14 @@ N6CQuery_DOT11_OPERATIONAL_RATE_SET( (( pRtRateSet->Octet[index] & 0x7F) == 11) || (( pRtRateSet->Octet[index] & 0x7F) == 22) ) { pDot11RateSet->ucRateSet[opRateIdx] = pRtRateSet->Octet[index] & 0x7F; - opRateIdx++; - } + opRateIdx++; + } } else // dot11_phy_type_erp G mdoe or dot11_phy_type_ofdm A mdoe { pDot11RateSet->ucRateSet[index] = pRtRateSet->Octet[index] & 0x7F; opRateIdx++; - } + } } pDot11RateSet->uRateSetLength=opRateIdx; @@ -1673,7 +1673,7 @@ N6CQuery_DOT11_BEACON_PERIOD( *pResult = pMgntInfo->dot11BeaconPeriod; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_BEACON_PERIOD(): %d TU\n", *pResult)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1685,7 +1685,7 @@ N6CQuery_DOT11_SHORT_RETRY_LIMIT( *pResult = MgntActQuery_ShortRetryLimit(pAdapter); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_SHORT_RETRY_LIMIT(): %d times\n", *pResult)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1697,7 +1697,7 @@ N6CQuery_DOT11_LONG_RETRY_LIMIT( *pResult = MgntActQuery_LongRetryLimit(pAdapter); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_LONG_RETRY_LIMIT(): %d times\n", *pResult)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1708,7 +1708,7 @@ N6CQuery_DOT11_MAX_TRANSMIT_MSDU_LIFETIME( { *pResult = MgntActQuery_MaxTxMsduLifeTime(pAdapter); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_MAX_TRANSMIT_MSDU_LIFETIME(): %d TUs\n", *pResult)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -1719,7 +1719,7 @@ N6CQuery_DOT11_MAX_RECEIVE_LIFETIME( { *pResult = MgntActQuery_MaxRxMpduLifeTime(pAdapter); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_MAX_RECEIVE_LIFETIME(): %d TUs\n", *pResult)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } @@ -1741,7 +1741,7 @@ N6CQuery_DOT11_SUPPORTED_PHY_TYPES( // // Reivse PHY related in N6usbInitializeNative80211MIBs(). // - + do { *BytesWritten = 0; @@ -1757,32 +1757,32 @@ N6CQuery_DOT11_SUPPORTED_PHY_TYPES( InformationBufferLength -= FIELD_OFFSET(DOT11_SUPPORTED_PHY_TYPES, dot11PHYType); uNumMaxEntries = InformationBufferLength / sizeof(DOT11_PHY_TYPE); - if(uNumMaxEntries < pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries) + if(uNumMaxEntries < pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries) { // Buffer is not enough - pDot11SupportedPhyTypes->uTotalNumOfEntries = pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries; + pDot11SupportedPhyTypes->uTotalNumOfEntries = pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries; pDot11SupportedPhyTypes->uNumOfEntries = uNumMaxEntries; ndisStatus = NDIS_STATUS_BUFFER_OVERFLOW; } - else + else { - pDot11SupportedPhyTypes->uTotalNumOfEntries = pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries; + pDot11SupportedPhyTypes->uTotalNumOfEntries = pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries; pDot11SupportedPhyTypes->uNumOfEntries = pDot11SupportedPhyTypes->uTotalNumOfEntries; } for (Index = 0; Index < pDot11SupportedPhyTypes->uNumOfEntries; Index++) { pDot11SupportedPhyTypes->dot11PHYType[Index] = pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[Index]; } - + *BytesWritten = FIELD_OFFSET(DOT11_SUPPORTED_PHY_TYPES, dot11PHYType) + pDot11SupportedPhyTypes->uNumOfEntries * sizeof(DOT11_PHY_TYPE); - + *BytesNeeded = FIELD_OFFSET(DOT11_SUPPORTED_PHY_TYPES, dot11PHYType) + pDot11SupportedPhyTypes->uTotalNumOfEntries * sizeof(DOT11_PHY_TYPE); } while(FALSE); - - + + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_SUPPORTED_PHY_TYPES()\n")); - return ndisStatus; + return ndisStatus; } NDIS_STATUS @@ -1797,7 +1797,7 @@ N6CQuery_DOT11_ENUM_ASSOCIATION_INFO( PDOT11_ASSOCIATION_INFO_LIST pAssoList = (PDOT11_ASSOCIATION_INFO_LIST)InformationBuffer; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + *BytesNeeded = FIELD_OFFSET(DOT11_ASSOCIATION_INFO_LIST, dot11AssocInfo); if ( InformationBufferLength < *BytesNeeded ) { @@ -1812,7 +1812,7 @@ N6CQuery_DOT11_ENUM_ASSOCIATION_INFO( pAssoList->uNumOfEntries = 0; pAssoList->uTotalNumOfEntries = 0; - + if ( (pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE) && (pMgntInfo->mAssoc == TRUE) ) { *BytesNeeded = FIELD_OFFSET(DOT11_ASSOCIATION_INFO_LIST, dot11AssocInfo) + @@ -1838,10 +1838,10 @@ N6CQuery_DOT11_ENUM_ASSOCIATION_INFO( pMgntInfo->Regdot11OperationalRateSet.Octet, pMgntInfo->Regdot11OperationalRateSet.Length); pAssoList->dot11AssocInfo[0].usAssociationID = pMgntInfo->mAId; - pAssoList->dot11AssocInfo[0].dot11AssociationState = + pAssoList->dot11AssocInfo[0].dot11AssociationState = (pMgntInfo->mAssoc == TRUE ? dot11_assoc_state_auth_assoc : dot11_assoc_state_auth_unassoc) ; pAssoList->dot11AssocInfo[0].dot11PowerMode = dot11_power_mode_active; - pAssoList->dot11AssocInfo[0].liAssociationUpTime.QuadPart = + pAssoList->dot11AssocInfo[0].liAssociationUpTime.QuadPart = (pMgntInfo->AsocTimestamp == 0 ? 0 : PlatformGetCurrentTime() - pMgntInfo->AsocTimestamp); pAssoList->dot11AssocInfo[0].ullNumOfTxPacketSuccesses = Adapter->TxStats.NumTxOkTotal; pAssoList->dot11AssocInfo[0].ullNumOfTxPacketFailures = Adapter->TxStats.NumTxErrTotal; @@ -1861,14 +1861,14 @@ N6CQuery_DOT11_ENUM_ASSOCIATION_INFO( for (i=0; (pEntry=AsocEntry_EnumStation(Adapter, i)) != NULL; i++) { pAssoList->uTotalNumOfEntries ++; - + *BytesNeeded += sizeof(DOT11_ASSOCIATION_INFO_EX); if (InformationBufferLength >= *BytesNeeded) { pAssoList->uNumOfEntries ++; PlatformZeroMemory(pAssoInfo, sizeof(DOT11_ASSOCIATION_INFO_EX)); - + PlatformMoveMemory( pAssoInfo->PeerMacAddress, pEntry->MacAddr, @@ -1916,7 +1916,7 @@ N6CQuery_DOT11_ENUM_ASSOCIATION_INFO( *BytesWritten = FIELD_OFFSET(DOT11_ASSOCIATION_INFO_LIST, dot11AssocInfo) + (pAssoList->uNumOfEntries * sizeof(DOT11_ASSOCIATION_INFO_EX)); - + return ndisStatus; } @@ -1930,7 +1930,7 @@ N6CQuery_DOT11_MULTICAST_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + *BytesNeeded = Adapter->MCAddrCount * ETHERNET_ADDRESS_LENGTH; if(InformationBufferLength < *BytesNeeded) { @@ -1944,7 +1944,7 @@ N6CQuery_DOT11_MULTICAST_LIST( BOOLEAN N6CQuery_DOT11_NIC_POWER_STATE( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { RT_RF_POWER_STATE eRfPowerState; @@ -1969,7 +1969,7 @@ N6CQuery_DOT11_NIC_POWER_STATE( bRetVal = TRUE; } - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CQuery_DOT11_NIC_POWER_STATE: eRfPowerState: 0x%X, RFOn 0x%X\n", eRfPowerState, bRetVal)); return bRetVal; @@ -1977,7 +1977,7 @@ N6CQuery_DOT11_NIC_POWER_STATE( // // Description: -// Return the table of data rates supported by a PHY on the 802.11 station for transmit and +// Return the table of data rates supported by a PHY on the 802.11 station for transmit and // receive operations. // Arguments: // [in] Adapter - @@ -2006,13 +2006,13 @@ N6CQuery_DOT11_DataRateMappingTable( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - PDOT11_DATA_RATE_MAPPING_TABLE pDataRateMappingTable = NULL; - + PDOT11_DATA_RATE_MAPPING_TABLE pDataRateMappingTable = NULL; + do { *BytesWritten = 0; *BytesNeeded = 0; - + if(InformationBufferLength < sizeof(DOT11_DATA_RATE_MAPPING_TABLE)) { *BytesNeeded = sizeof(DOT11_DATA_RATE_MAPPING_TABLE); @@ -2023,21 +2023,21 @@ N6CQuery_DOT11_DataRateMappingTable( pDataRateMappingTable = (PDOT11_DATA_RATE_MAPPING_TABLE)InformationBuffer; - N6_ASSIGN_OBJECT_HEADER(pDataRateMappingTable->Header, + N6_ASSIGN_OBJECT_HEADER(pDataRateMappingTable->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_DATA_RATE_MAPPING_TABLE_REVISION_1, sizeof(DOT11_DATA_RATE_MAPPING_TABLE)); - pDataRateMappingTable->uDataRateMappingLength = sizeof(N6_Std_abg_DataRateMappingTable) / + pDataRateMappingTable->uDataRateMappingLength = sizeof(N6_Std_abg_DataRateMappingTable) / sizeof(DOT11_DATA_RATE_MAPPING_ENTRY); - // Ensure enough space + // Ensure enough space *BytesNeeded = FIELD_OFFSET(DOT11_DATA_RATE_MAPPING_TABLE, DataRateMappingEntries) + sizeof(N6_Std_abg_DataRateMappingTable); if (InformationBufferLength < *BytesNeeded) { - ndisStatus = NDIS_STATUS_BUFFER_OVERFLOW; + ndisStatus = NDIS_STATUS_BUFFER_OVERFLOW; break; } @@ -2048,9 +2048,9 @@ N6CQuery_DOT11_DataRateMappingTable( N6_Std_abg_DataRateMappingTable, sizeof(N6_Std_abg_DataRateMappingTable)); - *BytesWritten = pDataRateMappingTable->uDataRateMappingLength * sizeof(DOT11_DATA_RATE_MAPPING_ENTRY) + + *BytesWritten = pDataRateMappingTable->uDataRateMappingLength * sizeof(DOT11_DATA_RATE_MAPPING_ENTRY) + FIELD_OFFSET(DOT11_DATA_RATE_MAPPING_TABLE, DataRateMappingEntries); - + *BytesNeeded = pDataRateMappingTable->uDataRateMappingLength * sizeof(DOT11_DATA_RATE_MAPPING_ENTRY) + FIELD_OFFSET(DOT11_DATA_RATE_MAPPING_TABLE, DataRateMappingEntries); } while(FALSE); @@ -2127,8 +2127,8 @@ N6CQuery_DOT11_Supported_DataRates( pDot11SupportedDataRatesValue->ucSupportedRxDataRatesValue[rateCnt] = N6_Std_abg_DataRateMappingTable[index].ucDataRateIndex; rateCnt ++; } - break; - + break; + case dot11_phy_type_ofdm: // A mode if(!IS_CCK_RATE(N6_Std_abg_DataRateMappingTable[index].ucDataRateIndex)) { @@ -2136,10 +2136,10 @@ N6CQuery_DOT11_Supported_DataRates( pDot11SupportedDataRatesValue->ucSupportedRxDataRatesValue[rateCnt] = N6_Std_abg_DataRateMappingTable[index].ucDataRateIndex; rateCnt ++; } - break; + break; } - } + } *BytesWritten = sizeof(DOT11_SUPPORTED_DATA_RATES_VALUE_V2); } while(FALSE); @@ -2169,9 +2169,9 @@ N6CQuery_DOT11_Tx_Antenna( default: rfNum = 1; break; - } - - *BytesNeeded = FIELD_OFFSET(DOT11_SUPPORTED_ANTENNA_LIST, dot11SupportedAntenna) + } + + *BytesNeeded = FIELD_OFFSET(DOT11_SUPPORTED_ANTENNA_LIST, dot11SupportedAntenna) + (rfNum * sizeof(DOT11_SUPPORTED_ANTENNA)); if ( InformationBufferLength < *BytesNeeded ) @@ -2182,7 +2182,7 @@ N6CQuery_DOT11_Tx_Antenna( return NDIS_STATUS_BUFFER_OVERFLOW; } - PlatformZeroMemory(Tx_list, InformationBufferLength); + PlatformZeroMemory(Tx_list, InformationBufferLength); Tx_list->uNumOfEntries = rfNum; Tx_list->uTotalNumOfEntries = rfNum; @@ -2210,7 +2210,7 @@ N6C_QUERY_OID_DOT11_DESIRED_PHY_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2243,7 +2243,7 @@ N6C_QUERY_OID_DOT11_AUTO_CONFIG_ENABLED( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; ULONG ulInfo = 0; ULONG ulInfoLen = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2264,7 +2264,7 @@ N6C_QUERY_OID_DOT11_AUTO_CONFIG_ENABLED( *BytesWritten = ulInfoLen; PlatformMoveMemory(InformationBuffer, &ulInfo, ulInfoLen); - + return ndisStatus; } @@ -2280,7 +2280,7 @@ N6C_QUERY_OID_DOT11_BEACON_PERIOD( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2294,21 +2294,21 @@ N6C_QUERY_OID_DOT11_BEACON_PERIOD( ndisStatus = NDIS_STATUS_INVALID_STATE; return ndisStatus; } - + *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; ndisStatus = NDIS_STATUS_INVALID_LENGTH; return ndisStatus; - } + } ndisStatus = N6CQuery_DOT11_BEACON_PERIOD(pTargetAdapter, InformationBuffer); if (ndisStatus == NDIS_STATUS_SUCCESS) { *BytesWritten = *BytesNeeded; } - + return ndisStatus; } @@ -2326,7 +2326,7 @@ N6C_QUERY_OID_DOT11_DESIRED_SSID_LIST( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2341,7 +2341,7 @@ N6C_QUERY_OID_DOT11_DESIRED_SSID_LIST( BytesWritten, BytesNeeded ); - + return ndisStatus; } @@ -2358,7 +2358,7 @@ N6C_QUERY_OID_GEN_CURRENT_PACKET_FILTER( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2375,8 +2375,8 @@ N6C_QUERY_OID_GEN_CURRENT_PACKET_FILTER( ulInfo=pTargetAdapter->pNdisCommon->NdisPacketFilter; PlatformMoveMemory(InformationBuffer, &ulInfo, sizeof(ULONG)); - *BytesWritten = sizeof(ULONG); - + *BytesWritten = sizeof(ULONG); + return ndisStatus; } @@ -2394,7 +2394,7 @@ N6C_QUERY_OID_DOT11_CURRENT_CHANNEL( PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; ULONG ulInfo = 0; ULONG ulInfoLen = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2410,7 +2410,7 @@ N6C_QUERY_OID_DOT11_CURRENT_CHANNEL( if(pMgntInfo->mAssoc || pMgntInfo->mIbss) { - + #if (MULTICHANNEL_SUPPORT == 1) if(MultiChannelSwitchNeeded(pTargetAdapter)) { @@ -2418,7 +2418,7 @@ N6C_QUERY_OID_DOT11_CURRENT_CHANNEL( RT_TRACE(COMP_MULTICHANNEL, DBG_LOUD, ("MultiChannelGetPortConnected20MhzChannel: %d\n", ulInfo)); } else - #endif + #endif { ulInfo = pMgntInfo->dot11CurrentChannelNumber; } @@ -2449,7 +2449,7 @@ N6C_QUERY_OID_DOT11_CURRENT_CHANNEL( ulInfoLen = sizeof(ULONG); PlatformMoveMemory(InformationBuffer, &ulInfo, ulInfoLen); - *BytesWritten = sizeof(ULONG); + *BytesWritten = sizeof(ULONG); return ndisStatus; } @@ -2468,7 +2468,7 @@ N6C_QUERY_OID_GEN_LINK_PARAMETERS( PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; ULONG ulInfo = 0; ULONG ulInfoLen = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2481,15 +2481,15 @@ N6C_QUERY_OID_GEN_LINK_PARAMETERS( *BytesNeeded = sizeof(NDIS_LINK_PARAMETERS); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } ndisStatus = N62CQueryLinkParameters( - pTargetAdapter, - InformationBuffer, + pTargetAdapter, + InformationBuffer, InformationBufferLength ); - *BytesNeeded = sizeof(NDIS_LINK_PARAMETERS); + *BytesNeeded = sizeof(NDIS_LINK_PARAMETERS); return ndisStatus; } @@ -2507,7 +2507,7 @@ N6C_QUERY_OID_DOT11_SAFE_MODE_ENABLED( PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2528,8 +2528,8 @@ N6C_QUERY_OID_DOT11_SAFE_MODE_ENABLED( ulInfo = FALSE; #endif PlatformMoveMemory(InformationBuffer, &ulInfo, sizeof(BOOLEAN)); - *BytesWritten = sizeof(BOOLEAN); - + *BytesWritten = sizeof(BOOLEAN); + return ndisStatus; } @@ -2546,13 +2546,13 @@ N6C_QUERY_OID_DOT11_CURRENT_PHY_ID( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); if(InformationBufferLength < sizeof(ULONG)) { @@ -2563,7 +2563,7 @@ N6C_QUERY_OID_DOT11_CURRENT_PHY_ID( ulInfo = pTargetAdapter->pNdisCommon->dot11SelectedPhyId; PlatformMoveMemory(InformationBuffer, &ulInfo, sizeof(ULONG)); - *BytesWritten = sizeof(ULONG); + *BytesWritten = sizeof(ULONG); RT_TRACE(COMP_OID_QUERY|COMP_RF, DBG_LOUD, ("Query OID_DOT11_CURRENT_PHY_ID: phyid%d\n", ulInfo)); @@ -2584,13 +2584,13 @@ N6C_QUERY_OID_GEN_SUPPORTED_LIST( PVOID pInfo = NULL; ULONG ulInfoLen = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); pInfo = (PVOID) N6GetSupportedOids(); ulInfoLen = N6GetSupportedOidsLength(); @@ -2604,7 +2604,7 @@ N6C_QUERY_OID_GEN_SUPPORTED_LIST( PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; - + return ndisStatus; } @@ -2623,28 +2623,28 @@ N6C_QUERY_OID_GEN_VENDOR_DRIVER_VERSION( PVOID pInfo = NULL; ULONG ulInfoLen = 0; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); ulInfo = NIC_VENDOR_DRIVER_VERSION; pInfo = (PVOID) &ulInfo; ulInfoLen = sizeof(ULONG); - + if(InformationBufferLength < ulInfoLen) { *BytesNeeded = ulInfoLen; *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; - + return ndisStatus; } @@ -2662,7 +2662,7 @@ N6C_QUERY_OID_PNP_CAPABILITIES( NDIS_PNP_CAPABILITIES PnpCapabilities; PVOID pInfo = NULL; ULONG ulInfoLen = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -2681,17 +2681,17 @@ N6C_QUERY_OID_PNP_CAPABILITIES( pInfo = (PVOID)&PnpCapabilities; ulInfoLen = sizeof(PnpCapabilities); - + if(InformationBufferLength < ulInfoLen) { *BytesNeeded = ulInfoLen; *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; - + return ndisStatus; } @@ -2709,29 +2709,29 @@ N6C_QUERY_OID_PNP_QUERY_POWER( PVOID pInfo = NULL; ULONG ulInfoLen = 0; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); - // Report the lowest device power state to sleep. + // Report the lowest device power state to sleep. ulInfo = (ULONG)(NdisDeviceStateD3); pInfo = (PVOID)&ulInfo; ulInfoLen = sizeof(ULONG); - + if(InformationBufferLength < ulInfoLen) { *BytesNeeded = ulInfoLen; *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; - + return ndisStatus; } @@ -2748,17 +2748,17 @@ N6C_QUERY_OID_PNP_ENABLE_WAKE_UP( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PMGNT_INFO pMgntInfo = &pTargetAdapter->MgntInfo; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - + PVOID pInfo = NULL; ULONG ulInfoLen = 0; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); if(pPSC->WoWLANMode == eWakeOnMagicPacketOnly) // Added by tynli. 2009.09.02. ulInfo = (ULONG)(NDIS_PNP_WAKE_UP_MAGIC_PACKET); @@ -2766,7 +2766,7 @@ N6C_QUERY_OID_PNP_ENABLE_WAKE_UP( ulInfo = (ULONG)(NDIS_PNP_WAKE_UP_PATTERN_MATCH); else if(pPSC->WoWLANMode == eWakeOnBothTypePacket) ulInfo = (ULONG)(NDIS_PNP_WAKE_UP_MAGIC_PACKET|NDIS_PNP_WAKE_UP_PATTERN_MATCH); - + pInfo = (PVOID)&ulInfo; ulInfoLen = sizeof(ULONG); @@ -2777,12 +2777,12 @@ N6C_QUERY_OID_PNP_ENABLE_WAKE_UP( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; RT_TRACE((COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("Query Information, OID_PNP_ENABLE_WAKE_UP: %d\n", ulInfo)); - + return ndisStatus; } @@ -2796,25 +2796,25 @@ N6C_QUERY_OID_DOT11_CURRENT_TX_ANTENNA( OUT PULONG BytesNeeded ) { - NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PVOID pInfo = NULL; ULONG ulInfoLen = 0; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); // ====================== - // This OID is not implemented. + // This OID is not implemented. // ====================== - + ulInfo = 0; pInfo = (PVOID)&ulInfo; ulInfoLen = sizeof(ULONG); @@ -2826,7 +2826,7 @@ N6C_QUERY_OID_DOT11_CURRENT_TX_ANTENNA( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; @@ -2844,20 +2844,20 @@ N6C_QUERY_OID_DOT11_CURRENT_RX_ANTENNA( OUT PULONG BytesNeeded ) { - NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PVOID pInfo = NULL; ULONG ulInfoLen = 0; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); // ====================== - // This OID is not implemented. + // This OID is not implemented. // ====================== ulInfo = 0; @@ -2871,7 +2871,7 @@ N6C_QUERY_OID_DOT11_CURRENT_RX_ANTENNA( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; @@ -2888,27 +2888,27 @@ N6C_QUERY_OID_DOT11_SUPPORTED_RX_ANTENNA( OUT PULONG BytesNeeded ) { - NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PVOID pInfo = NULL; ULONG ulInfoLen = 0; ULONG ulInfo = 0; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; //------------------------------------------------------- - FunctionIn(COMP_OID_QUERY); + FunctionIn(COMP_OID_QUERY); // ====================== - // This OID is not implemented. + // This OID is not implemented. // ====================== - + ulInfo = 0; pInfo = (PVOID)&ulInfo; ulInfoLen = sizeof(ULONG); @@ -2920,7 +2920,7 @@ N6C_QUERY_OID_DOT11_SUPPORTED_RX_ANTENNA( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + PlatformMoveMemory(InformationBuffer, pInfo, ulInfoLen); *BytesWritten = ulInfoLen; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.h b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.h index af6f3d562..e28f53108 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidQuery.h @@ -82,7 +82,7 @@ N6CQuery_DOT11_POWER_MGMT_REQUEST( IN PADAPTER Adapter, OUT pu4Byte pPowerSaveLevel ); - + NDIS_STATUS N6CQuery_DOT11_EXCLUDED_MAC_ADDRESS_LIST( IN PADAPTER Adapter, @@ -116,7 +116,7 @@ N6CQuery_DOT11_CURRENT_OPERATION_MODE( OUT PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, - OUT PULONG BytesNeeded + OUT PULONG BytesNeeded ); NDIS_STATUS @@ -178,7 +178,7 @@ N6CQuery_DOT11_RTBSS_OPERATING_PHYID( IN PADAPTER Adapter, IN PVOID pRtBss ); - + NDIS_STATUS N6CQuery_DOT11_DESIRED_PHY_LIST( IN PADAPTER Adapter, @@ -283,7 +283,7 @@ N6CQuery_DOT11_MULTICAST_LIST( BOOLEAN N6CQuery_DOT11_NIC_POWER_STATE( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); NDIS_STATUS diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.c b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.c index 286554645..cda6d0473 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.c @@ -6,7 +6,7 @@ // -// The following helper functions are used to determined if a +// The following helper functions are used to determined if a // BSS has the capability of specific wireless mode. // 2005.01.13, by rcnjko. // @@ -50,7 +50,7 @@ WithWirelessG( { return FALSE; } - + // Check supported rates. for(i = 0; i < pRtBss->bdSupportRateEXLen; i++) { @@ -63,12 +63,12 @@ WithWirelessG( } // Check if it contains ERP information element. - // Some AP, WAG-302, will not always claim OFDM rates in their ProbeRsp or Beacon + // Some AP, WAG-302, will not always claim OFDM rates in their ProbeRsp or Beacon // but it is in G mode. 2005.08.23, by rcnjko. if(pRtBss->bERPInfoValid) { return TRUE; - } + } return FALSE; } @@ -104,7 +104,7 @@ WithWirelessA( //// // This routine determine if we should report the BSS scanned -// to upper layer. +// to upper layer. // 2005.01.13, by rcnjko. // BOOLEAN @@ -115,19 +115,19 @@ FilterRtBss( { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; BOOLEAN bAcceptable = TRUE; - BOOLEAN bHasB, bHasG, bHasA; + BOOLEAN bHasB, bHasG, bHasA; // Determine the capability of wireless mode of the BSS. bHasB = WithWirelessB(pRtBss); bHasG = WithWirelessG(pRtBss); bHasA = WithWirelessA(pRtBss); - - // - // 1. Maybe we may need to use a table in the future. + + // + // 1. Maybe we may need to use a table in the future. // 2. Currently, we only consider B/G case. if( bHasB && !bHasG && !bHasA ) { // The BSS is pure B. - if( pNdisCommon->RegWirelessMode4ScanList == WIRELESS_MODE_G || + if( pNdisCommon->RegWirelessMode4ScanList == WIRELESS_MODE_G || pNdisCommon->RegWirelessMode4ScanList == WIRELESS_MODE_A ) { // We are pure A or pure G. bAcceptable = FALSE; @@ -143,14 +143,14 @@ FilterRtBss( /** ** -**20061130 david add in order to copy IE into entry and fill in hidden ssid IE. +**20061130 david add in order to copy IE into entry and fill in hidden ssid IE. ** **We don't need to worry about Length in this function because it has been handled already ** /@ first parameter: Adapter bss list ** /@ second parameter: management bss list we are going to fill -** -**/ +** +**/ NDIS_STATUS FillHiddenSSIDinIE( IN PADAPTER Adapter, @@ -167,22 +167,22 @@ FillHiddenSSIDinIE( pInfoElemHdr = (PDOT11_INFO_ELEMENT)pSrcBlob; - if (SizeOfSrcBlob < sizeof(DOT11_INFO_ELEMENT)) + if (SizeOfSrcBlob < sizeof(DOT11_INFO_ELEMENT)) { // Shouldnt happen. The IE's must already be verified return NDIS_STATUS_BUFFER_OVERFLOW; } // We shouldn't use the HiddenAP flag to judge the BSS STA is a hidden AP because the - // flag is undetermineable, just copy SSID into IE in each BSS STA. + // flag is undetermineable, just copy SSID into IE in each BSS STA. // 2006.12.20, by shien chang. //if (pRtBss->HiddenAP) { // // For SSID, we copy cached Probe SSID if we do not have a SSID - // in the Beacon. This is to handle hidden SSID. For hidden SSID, - // the OS would first do a scan and expects us to indicate the - // found SSID so that it can do a connect. Since we may overwrite the + // in the Beacon. This is to handle hidden SSID. For hidden SSID, + // the OS would first do a scan and expects us to indicate the + // found SSID so that it can do a connect. Since we may overwrite the // probe with beacon, we copy the cached SSID over // tmpHiddenLen = pInfoElemHdr->Length; @@ -191,13 +191,13 @@ FillHiddenSSIDinIE( CopyMem(pSrcBlob+sizeof(DOT11_INFO_ELEMENT), pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen); pInfoElemHdr->Length=pRtBss->bdSsIdLen; CopyMem(pSrcBlob+sizeof(DOT11_INFO_ELEMENT)+pInfoElemHdr->Length, tmpIEBuf, tmpIELen); - // + // // Commented out by haich. - // We shall not expect this is how the length is calculated since we may append + // We shall not expect this is how the length is calculated since we may append // other IEs outside this function, eg: WCN IE. Therefore we shall update it, not // re-calculate it. 2008.10.20, haich. // - //pDot11Bss->uBufferLength = (u2Byte)(((pRtBss->IE.Length -sizeof(RT_FIXED_IE_FIELD)) - tmpHiddenLen)+pInfoElemHdr->Length); + //pDot11Bss->uBufferLength = (u2Byte)(((pRtBss->IE.Length -sizeof(RT_FIXED_IE_FIELD)) - tmpHiddenLen)+pInfoElemHdr->Length); pDot11Bss->uBufferLength = (u2Byte)((pDot11Bss->uBufferLength - tmpHiddenLen)+pInfoElemHdr->Length); } @@ -212,7 +212,7 @@ NeedRemoveWCNIE( ) { BOOLEAN ret = FALSE; - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); OCTET_STRING osIE; OCTET_STRING osWCN; #if (WPS_SUPPORT == 1) @@ -243,11 +243,11 @@ N6CTranslateRtBssToDot11Bss( LARGE_INTEGER CurrentTime; pDot11BssEntry->uPhyId = N6CQuery_DOT11_RTBSS_OPERATING_PHYID(Adapter, pRtBss); - + pDot11BssEntry->PhySpecificInfo.uChCenterFrequency = MgntGetChannelFrequency(pRtBss->ChannelNumber); - - - CopyMem(pDot11BssEntry->dot11BSSID, + + + CopyMem(pDot11BssEntry->dot11BSSID, pRtBss->bdBssIdBuf, sizeof(DOT11_MAC_ADDRESS)); if (pRtBss->bdCap & cIBSS) @@ -262,9 +262,9 @@ N6CTranslateRtBssToDot11Bss( // Get current timestamp NdisGetCurrentSystemTime(&CurrentTime); - // This value will be showed as the value of "Signal" on those monitor program + // This value will be showed as the value of "Signal" on those monitor program pDot11BssEntry->lRSSI = pRtBss->CumRecvSignalPower; - + // Because our HW has signal quality issues, we use signal strength // instead of signal quality. 2006.11.27, by shien chang, suggest by David. pDot11BssEntry->uLinkQuality = pRtBss->RSSI; // pRtBss->SignalQuality; @@ -280,30 +280,30 @@ N6CTranslateRtBssToDot11Bss( { // 20090508 Joseph: Revise size checking. Handling hidden SSID IE handling. // This makes sure that memory copy operation is not exceed the buffer provided by OS. - PDOT11_INFO_ELEMENT pDot11SsidElement = + PDOT11_INFO_ELEMENT pDot11SsidElement = (PDOT11_INFO_ELEMENT)(pRtBss->IE.Octet +sizeof(RT_FIXED_IE_FIELD)); pDot11BssEntry->uBufferLength = pRtBss->IE.Length - sizeof(RT_FIXED_IE_FIELD); - + if ( ! BeHiddenSsid(pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen) && BeHiddenSsid((pu1Byte)pDot11SsidElement+sizeof(DOT11_INFO_ELEMENT), pDot11SsidElement->Length) ) { PDOT11_INFO_ELEMENT pFirstIE = (PDOT11_INFO_ELEMENT)pDot11BssEntry->ucBuffer; pFirstIE->ElementID = EID_SsId; pFirstIE->Length = pRtBss->bdSsIdLen; - CopyMem(pDot11BssEntry->ucBuffer+sizeof(DOT11_INFO_ELEMENT), + CopyMem(pDot11BssEntry->ucBuffer+sizeof(DOT11_INFO_ELEMENT), pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen); - CopyMem(pDot11BssEntry->ucBuffer+sizeof(DOT11_INFO_ELEMENT)+pRtBss->bdSsIdLen, + CopyMem(pDot11BssEntry->ucBuffer+sizeof(DOT11_INFO_ELEMENT)+pRtBss->bdSsIdLen, pRtBss->IE.Octet+sizeof(RT_FIXED_IE_FIELD)+sizeof(DOT11_INFO_ELEMENT)+pDot11SsidElement->Length, pRtBss->IE.Length-sizeof(RT_FIXED_IE_FIELD)-sizeof(DOT11_INFO_ELEMENT)-pDot11SsidElement->Length); - + pDot11BssEntry->uBufferLength = pDot11BssEntry->uBufferLength - pDot11SsidElement->Length + pRtBss->bdSsIdLen; } else { if(!NeedRemoveWCNIE(Adapter, pRtBss)) { - CopyMem(pDot11BssEntry->ucBuffer, + CopyMem(pDot11BssEntry->ucBuffer, pRtBss->IE.Octet+sizeof(RT_FIXED_IE_FIELD), (pRtBss->IE.Length>sizeof(RT_FIXED_IE_FIELD))? (pRtBss->IE.Length-sizeof(RT_FIXED_IE_FIELD)):0); @@ -334,7 +334,7 @@ N6CTranslateRtBssToDot11Bss( continue; } } - CopyMem(pDot11BssEntry->ucBuffer+ieCount, + CopyMem(pDot11BssEntry->ucBuffer+ieCount, pRtBss->IE.Octet+curOffset, sizeof(DOT11_INFO_ELEMENT)+Dot11Ie.Content.Length); ieCount += (Dot11Ie.Content.Length + 2); @@ -347,29 +347,29 @@ N6CTranslateRtBssToDot11Bss( #if (WPS_SUPPORT == 1) // // Here we append the Wcn IE extracted from the beacon and probe response received - // from the BSS to the IE buffer we report to the upper layer. + // from the BSS to the IE buffer we report to the upper layer. // The Wcn IE is filled in by UpdateBssWcnIe(). // haich, 2008.08.26. // { // Copy Wcn IE from beacon. - CopyMem(pDot11BssEntry->ucBuffer + pDot11BssEntry->uBufferLength, + CopyMem(pDot11BssEntry->ucBuffer + pDot11BssEntry->uBufferLength, pRtBss->osBeaconWcnIe.Octet, pRtBss->osBeaconWcnIe.Length); pDot11BssEntry->uBufferLength += pRtBss->osBeaconWcnIe.Length; - //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, + //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, // "beacon wcn ie", pRtBss->osBeaconWcnIe.Octet, pRtBss->osBeaconWcnIe.Length); // Copy Wcn IE from ProbeRsp. - CopyMem(pDot11BssEntry->ucBuffer + pDot11BssEntry->uBufferLength, + CopyMem(pDot11BssEntry->ucBuffer + pDot11BssEntry->uBufferLength, pRtBss->osProbeRspWcnIe.Octet, pRtBss->osProbeRspWcnIe.Length); pDot11BssEntry->uBufferLength += pRtBss->osProbeRspWcnIe.Length; - //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, + //RT_PRINT_DATA(COMP_SCAN, DBG_LOUD, // "probe rsp wcn ie", pRtBss->osProbeRspWcnIe.Octet, pRtBss->osProbeRspWcnIe.Length); - } + } #endif } @@ -396,33 +396,33 @@ N6CDot11ToAuthMode( AuthMode = RT_802_11AuthModeShared; RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToAuthMode(): DOT11_AUTH_ALGO_80211_SHARED_KEY\n") ); break; - + case DOT11_AUTH_ALGO_WPA: AuthMode = RT_802_11AuthModeWPA; RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToAuthMode(): DOT11_AUTH_ALGO_WPA\n") ); break; - + case DOT11_AUTH_ALGO_WPA_PSK: AuthMode = RT_802_11AuthModeWPAPSK; RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToAuthMode(): DOT11_AUTH_ALGO_WPA_PSK\n") ); break; - + case DOT11_AUTH_ALGO_RSNA: AuthMode = RT_802_11AuthModeWPA2; RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToAuthMode(): DOT11_AUTH_ALGO_RSNA\n") ); break; - + case DOT11_AUTH_ALGO_RSNA_PSK: AuthMode = RT_802_11AuthModeWPA2PSK; RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToAuthMode(): DOT11_AUTH_ALGO_RSNA_PSK\n") ); break; - + default: AuthMode = RT_802_11AuthModeOpen; RT_TRACE( COMP_SEC, DBG_WARNING, ("N6CDot11ToAuthMode(): unknow case, 0x%X => RT_802_11AuthModeOpen (WARNING!!!)\n", dot11AuthAlg) ); break; } - + return AuthMode; } @@ -464,7 +464,7 @@ N6CDot11ToEncAlgorithm( } RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToEncAlgorithm(): DOT11_CIPHER_ALGO_WEP\n") ); break; - + case DOT11_CIPHER_ALGO_WEP40: EncAlg = RT_ENC_ALG_WEP40; RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToEncAlgorithm(): DOT11_CIPHER_ALGO_WEP40\n") ); @@ -481,8 +481,8 @@ N6CDot11ToEncAlgorithm( break; case DOT11_CIPHER_ALGO_WAPI_SMS4: //For WAPI IHV service support add by ylb 20111114 - EncAlg = RT_ENC_ALG_SMS4; - RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToEncAlgorithm(): DOT11_CIPHER_ALGO_WAPI_SMS4\n") ); + EncAlg = RT_ENC_ALG_SMS4; + RT_TRACE( COMP_SEC, DBG_LOUD, ("N6CDot11ToEncAlgorithm(): DOT11_CIPHER_ALGO_WAPI_SMS4\n") ); break; case DOT11_CIPHER_ALGO_WEP104: EncAlg = RT_ENC_ALG_WEP104; @@ -500,7 +500,7 @@ N6CDot11ToEncAlgorithm( // N6CSet _DOT11_AUTHENTICATION_ALOGORITHM -// +// // VOID N6CSet_DOT11_AUTHENTICATION_ALOGORITHM( @@ -509,21 +509,21 @@ N6CSet_DOT11_AUTHENTICATION_ALOGORITHM( ) { - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; if(FALSE == WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIIHVSUPPORT, 0)) { if(WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) - return; + return; } pMgntInfo->bRSNAPSKMode = FALSE; // maybe need to move to Ondissconnent. pNdisCommon->RegAuthalg = AlgorithmId; CCX_8021xModeChange(Adapter, FALSE); - + switch( AlgorithmId ) { case DOT11_AUTH_ALGO_80211_OPEN: @@ -541,25 +541,25 @@ N6CSet_DOT11_AUTHENTICATION_ALOGORITHM( // SecClearAllKeys(Adapter); RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(): DOT11_AUTH_ALGO_80211_SHARED_KEY\n") ); break; - + case DOT11_AUTH_ALGO_WPA: pSecInfo->AuthMode = RT_802_11AuthModeWPA; pSecInfo->SecLvl = RT_SEC_LVL_WPA; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(): DOT11_AUTH_ALGO_WPA\n") ); break; - + case DOT11_AUTH_ALGO_WPA_PSK: pSecInfo->AuthMode = RT_802_11AuthModeWPAPSK; pSecInfo->SecLvl = RT_SEC_LVL_WPA; RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(): DOT11_AUTH_ALGO_WPA_PSK\n") ); break; - + case DOT11_AUTH_ALGO_RSNA: pSecInfo->AuthMode = RT_802_11AuthModeWPA2; pSecInfo->SecLvl = RT_SEC_LVL_WPA2; RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(): DOT11_AUTH_ALGO_RSNA\n") ); break; - + case DOT11_AUTH_ALGO_RSNA_PSK: pSecInfo->AuthMode = RT_802_11AuthModeWPA2PSK; pSecInfo->SecLvl = RT_SEC_LVL_WPA2; @@ -575,34 +575,34 @@ N6CSet_DOT11_AUTHENTICATION_ALOGORITHM( } RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_AUTHENTICATION_ALGORITHM(): DOT11_AUTH_ALGO_RSNA_PSK\n") ); break; - + case DOT11_AUTH_ALGO_CCKM: pSecInfo->AuthMode = RT_802_11AuthModeCCKM; pSecInfo->SecLvl = RT_SEC_LVL_WPA2; // TODO: AES Must take for consider CCX_8021xModeChange(Adapter, TRUE); - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("%s DOT11_AUTH_ALGO_CCKM\n", __FUNCTION__) ); break; - + case DOT11_AUTH_ALGO_WAPI_PSK: //For WAPI IHV service support add by ylb 20111114 pSecInfo->AuthMode = RT_802_11AuthModeWAPI; - pSecInfo->SecLvl = RT_SEC_LVL_WAPI; - + pSecInfo->SecLvl = RT_SEC_LVL_WAPI; + //pSecInfo->wapiInfo.bWapiEnable = TRUE; WAPI_QuerySetVariable(Adapter, WAPI_SET, WAPI_VAR_WAPIPSK, TRUE); RT_TRACE( COMP_OID_SET, DBG_LOUD, ("%s:DOT11_AUTH_ALGO_WAPI_PSK\n", __FUNCTION__) ); - break; + break; case DOT11_AUTH_ALGO_WAPI_CERTIFICATE: //For WAPI IHV service support add by ylb 20111114 pSecInfo->AuthMode = RT_802_11AuthModeCertificateWAPI; - pSecInfo->SecLvl = RT_SEC_LVL_WAPI; - + pSecInfo->SecLvl = RT_SEC_LVL_WAPI; + //pSecInfo->wapiInfo.bWapiEnable = TRUE; WAPI_QuerySetVariable(Adapter, WAPI_SET, WAPI_VAR_WAPIPSK, FALSE); RT_TRACE( COMP_OID_SET, DBG_LOUD, ("%s:DOT11_AUTH_ALGO_WAPI_CERTIFICATE\n", __FUNCTION__) ); break; - + default: RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_AUTHENTICATION_ALGORITHM(): unknow case, 0x%X\n", AlgorithmId) ); break; @@ -641,7 +641,7 @@ N6CSet_DOT11_ENABLED_AUTHENTICATION_ALGORITHM( } if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pAuthAlgoList->Header, + pAuthAlgoList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_AUTH_ALGORITHM_LIST)) ) @@ -693,7 +693,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( if(FALSE == WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIIHVSUPPORT, 0)) { if(WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) - return; + return; } pNdisCommon->RegPairwiseAlg= AlgorithmId; @@ -730,7 +730,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM(): DOT11_CIPHER_ALGO_WEP104\n") ); pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP128; break; - + case DOT11_CIPHER_ALGO_WEP: // // At this time, we don't know the key size, defer the setting of algorithm to @@ -746,7 +746,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( pSecInfo->PairwiseEncAlgorithm = (pSecInfo->PairwiseEncAlgorithm==RT_ENC_ALG_WEP104)?RT_ENC_ALG_WEP104:RT_ENC_ALG_WEP40; RT_TRACE(COMP_SEC , DBG_LOUD , ("==>[non-WDI:WEP]set pSecInfo->PairwiseEncAlgorithm=0x%08X\n",pSecInfo->PairwiseEncAlgorithm)); } - + pSecInfo->UseDefaultKey = TRUE; pSecInfo->EncryptionHeadOverhead = WEP_IV_LEN; pSecInfo->EncryptionTailOverhead = WEP_ICV_LEN; @@ -781,7 +781,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( pSecInfo->EncryptionTailOverhead = AES_MIC_LEN; pSecInfo->EncryptionStatus = RT802_11Encryption3Enabled; pMgntInfo->LEDAssocState = LED_ASSOC_SECURITY_BEGIN; - RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM(): DOT11_CIPHER_ALGO_CCMP\n") ); + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM(): DOT11_CIPHER_ALGO_CCMP\n") ); break; case DOT11_CIPHER_ALGO_WAPI_SMS4: //For WAPI IHV service support add by ylb 20111114 @@ -793,9 +793,9 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( pSecInfo->EncryptionHeadOverhead = WAPI_EXT_LEN; pSecInfo->EncryptionTailOverhead = SMS4_MIC_LEN; - RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM(): DOT11_CIPHER_ALGO_WAPI_SMS4\n") ); + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM(): DOT11_CIPHER_ALGO_WAPI_SMS4\n") ); break; - + default: pSecInfo->EncryptionStatus = RT802_11WEPDisabled; pMgntInfo->LEDAssocState = LED_ASSOC_SECURITY_NONE; @@ -803,7 +803,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( break; } - //vivi modify for new cam search flow, 20091028. + //vivi modify for new cam search flow, 20091028. //new cam search flow can use hw en/decryption, while original can not. if (IS_EN_DE_CRYPTION_NEW_CAM_SUPPORT()) { @@ -860,7 +860,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( RT_TRACE(COMP_SEC , DBG_LOUD , ("==>Win7 we used HW in default !! \n")); SecSetSwEncryptionDecryption( Adapter , FALSE , FALSE ); } - + // Please consider two-client scenario: One is no security, and the other needs HW security. (Do not disable HW security) if(!pSecInfo->SWTxEncryptFlag || !pSecInfo->SWRxDecryptFlag) { @@ -871,7 +871,7 @@ N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( //should consider multi-port scenario:default adapter is SW encryption/decryption ,vwifi use HW. // start vwifi first,then default adapter connect to a ap,the SecCfg will disable HW encryption/decryption, // and will cause vwifi not use encryption. - // so need to check if need to disable HW encryption/decryption. + // so need to check if need to disable HW encryption/decryption. if (IsMultiPortAllowDisableHWSecurity(Adapter) ) Adapter->HalFunc.DisableHWSecCfgHandler(Adapter); } @@ -917,9 +917,9 @@ N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( { return NDIS_STATUS_INVALID_LENGTH; } - + if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pCipherAlgoList->Header, + pCipherAlgoList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_CIPHER_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_CIPHER_ALGORITHM_LIST)) ) @@ -945,7 +945,7 @@ N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM( Adapter ,pCipherAlgoList->AlgorithmIds[0] ); *BytesRead = *BytesNeeded; - + RT_TRACE( COMP_OID_SET, DBG_TRACE, ("<== N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM(): PairwiseEncAlgorithm=0x%X\n", pSecInfo->PairwiseEncAlgorithm) ); return NDIS_STATUS_SUCCESS; } @@ -967,13 +967,13 @@ N6CSet_DOT11_MULTICAST_CIPHER_ALGORITHM( if(FALSE == WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIIHVSUPPORT, 0)) { if(WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) - return; + return; } FunctionIn(COMP_SEC); - pSecInfo->GroupEncAlgorithm = N6CDot11ToEncAlgorithm( - AlgorithmId, + pSecInfo->GroupEncAlgorithm = N6CDot11ToEncAlgorithm( + AlgorithmId, (pSecInfo->PairwiseEncAlgorithm==RT_ENC_ALG_WEP104)?NATIVE_802_11_WEP104_KEY_LENGTH:NATIVE_802_11_WEP40_KEY_LENGTH ); // Save Multicast Alg @@ -1003,7 +1003,7 @@ N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( RT_TRACE( COMP_OID_SET, DBG_TRACE, ("==> N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM()\n") ); if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pCipherAlgoList->Header, + pCipherAlgoList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_CIPHER_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_CIPHER_ALGORITHM_LIST)) ) @@ -1028,15 +1028,15 @@ N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( N6CSet_DOT11_MULTICAST_CIPHER_ALGORITHM( Adapter,pCipherAlgoList->AlgorithmIds[0]); *BytesRead = *BytesNeeded; - + RT_TRACE( COMP_OID_SET, DBG_TRACE, ("<== N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM(): GroupEncAlgorithm=0x%X\n", pSecInfo->GroupEncAlgorithm) ); return NDIS_STATUS_SUCCESS; } // // Description: -// ADD, MODIFY, or DELETE an entry of -// default key (i.e. WEP Key, group key) or +// ADD, MODIFY, or DELETE an entry of +// default key (i.e. WEP Key, group key) or // per-station default key (i.e. IBSS RSNA per-station group key). // NDIS_STATUS @@ -1072,11 +1072,11 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( if ( InformationBufferLength < *BytesNeeded ) { RT_TRACE( COMP_OID_SET, DBG_WARNING, (" <- [Error]N6CSet_DOT11_CIPHER_DEFAULT_KEY(), NDIS_STATUS_INVALID_LENGTH: %d\n", InformationBufferLength) ); - return NDIS_STATUS_BUFFER_OVERFLOW; + return NDIS_STATUS_BUFFER_OVERFLOW; } - + if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pDefaultKey->Header, + pDefaultKey->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_CIPHER_DEFAULT_KEY_VALUE_REVISION_1, sizeof(DOT11_CIPHER_DEFAULT_KEY_VALUE)) ) @@ -1085,7 +1085,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( return NDIS_STATUS_INVALID_DATA; } - *BytesNeeded = FIELD_OFFSET(DOT11_CIPHER_DEFAULT_KEY_VALUE, ucKey) + + *BytesNeeded = FIELD_OFFSET(DOT11_CIPHER_DEFAULT_KEY_VALUE, ucKey) + pDefaultKey->usKeyLength; if (InformationBufferLength < *BytesNeeded) { @@ -1111,20 +1111,20 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( // // Collect information in pDefaultKey and those embedded in pDefaultKey->ucKey. // - + KeyIndex = pDefaultKey->uKeyIndex; if( pMgntInfo->OpMode == RT_OP_MODE_IBSS && pSecInfo->SecLvl == RT_SEC_LVL_WPA2 && !eqMacAddr(pDefaultKey->MacAddr, MacAddress) && !MacAddr_isMulticast(pDefaultKey->MacAddr) ) { // - // 061028, rcnjko: - // WDK said: + // 061028, rcnjko: + // WDK said: // - We shall don't care MacAddr in infrastructure mode. - // - In an IBSS with RSNA AES-CCMP, we use TA and index to search the key - // to decrypt mcst/bcst frame received. + // - In an IBSS with RSNA AES-CCMP, we use TA and index to search the key + // to decrypt mcst/bcst frame received. // - // So, a unicast MacAddr is used to search per-station default keys in + // So, a unicast MacAddr is used to search per-station default keys in // RSNA IBSS case and can be ignore in other cases. // cpMacAddr(MacAddress, pDefaultKey->MacAddr); @@ -1135,21 +1135,21 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CIPHER_DEFAULT_KEY(): delete Key\n")); // - // 061028, rcnjko: WDK said we shall ignore AlgorithmId if bDelete is set, - // so we use GroupEncAlgorithm instead. + // 061028, rcnjko: WDK said we shall ignore AlgorithmId if bDelete is set, + // so we use GroupEncAlgorithm instead. // rtEncAlgo = pSecInfo->GroupEncAlgorithm; rtEncAlgo = pSecInfo->GroupEncAlgorithm; if( KeyIndex > 3 && KeyIndex < 6 ) { // 802.11w BIP key Key index 5 or 6 - + PlatformZeroMemory(pSecInfo->BIPKeyBuffer, MAX_KEY_LEN); } else if( !pMgntInfo->bRSNAPSKMode) { MgntActSet_802_11_REMOVE_KEY( - Adapter, + Adapter, rtEncAlgo, KeyIndex, MacAddress, @@ -1166,12 +1166,12 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( return NDIS_STATUS_INVALID_DATA; } } - + } else { // Add or Modify a key. - switch(pDefaultKey->AlgorithmId) + switch(pDefaultKey->AlgorithmId) { case DOT11_CIPHER_ALGO_WEP: { @@ -1185,7 +1185,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP64; pNdisCommon->RegEncAlgorithm = REG_WEP_STATUS_WEP64; pNdisCommon->RegPairwiseAlg = DOT11_CIPHER_ALGO_WEP40; - pNdisCommon->RegRSNAKeyID = KeyIndex; + pNdisCommon->RegRSNAKeyID = KeyIndex; // Save for Reconnent for Ad-hot ,by CCW PlatformMoveMemory(pNdisCommon->RegDefaultKeyBuf[KeyIndex], pKeyMaterial, KeyLen); pNdisCommon->RegDefaultKey[KeyIndex].Length = (u2Byte)KeyLen; @@ -1194,7 +1194,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP128; pNdisCommon->RegEncAlgorithm = REG_WEP_STATUS_WEP128; pNdisCommon->RegPairwiseAlg = DOT11_CIPHER_ALGO_WEP104; - pNdisCommon->RegRSNAKeyID = KeyIndex; + pNdisCommon->RegRSNAKeyID = KeyIndex; // Save for Reconnent for Ad-hot ,by CCW PlatformMoveMemory( pNdisCommon->RegDefaultKeyWBuf[KeyIndex], pKeyMaterial, KeyLen); pNdisCommon->RegDefaultKeyW[KeyIndex].Length = (u2Byte)KeyLen; @@ -1228,16 +1228,16 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( pNdisCommon->RegDefaultKeyW[KeyIndex].Length = (u2Byte)KeyLen; } break; - + case DOT11_CIPHER_ALGO_TKIP: { PDOT11_KEY_ALGO_TKIP_MIC pTkipMicKey = (PDOT11_KEY_ALGO_TKIP_MIC)pDefaultKey->ucKey; //pNdisCommon->RegPairwiseAlg = DOT11_CIPHER_ALGO_TKIP; - pNdisCommon->RegRSNAKeyID = KeyIndex; + pNdisCommon->RegRSNAKeyID = KeyIndex; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CIPHER_DEFAULT_KEY(): Set a TKIP Key\n")); rtEncAlgo = RT_ENC_ALG_TKIP; pKeyMaterial = pTkipMicKey->ucTKIPMICKeys; // Tkip Enc Key(16) + STA Rx MIC Key(8) + STA Tx MIC Key(8). - KeyLen = pTkipMicKey->ulTKIPKeyLength + pTkipMicKey->ulMICKeyLength; + KeyLen = pTkipMicKey->ulTKIPKeyLength + pTkipMicKey->ulMICKeyLength; PlatformMoveMemory(&KeyRSC, pTkipMicKey->ucIV48Counter, 6); bValidKeyRSC = TRUE; } @@ -1264,7 +1264,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( pNdisCommon->RegRSNADefaultkey.Length = (u2Byte)KeyLen; pNdisCommon->RegRSNAKeyID = KeyIndex; } - + } break; @@ -1275,7 +1275,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CIPHER_DEFAULT_KEY(): Set an BIP Key\n")); // NOTE: Only for Build Pass - + PlatformMoveMemory( pSecInfo->IPN ,pBIPkey->ucIPN, 6 ); if( pBIPkey->ulBIPKeyLength == 16 ) @@ -1287,7 +1287,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( { return NDIS_STATUS_INVALID_DATA; } - + break; } @@ -1300,7 +1300,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( { PAUTH_GLOBAL_KEY_TAG pGlInfo = &(pMgntInfo->globalKeyInfo); u1Byte CAM_CONST_BROAD[6] = {0xff ,0xff ,0xff ,0xff ,0xff ,0xff }; - + if( MacAddress[0] == 0 && MacAddress[1] == 0 && MacAddress[2] == 0 && MacAddress[3] == 0 && MacAddress[4] == 0 && MacAddress[5] == 0 ) @@ -1315,7 +1315,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( pMgntInfo->SecurityInfo.GroupTransmitKeyIdx = (u1Byte)KeyIndex; // Set For Hw encrypt !! /* - AP_Setkey( Adapter , + AP_Setkey( Adapter , CAM_CONST_BROAD, 1, // Index entry CAM_TKIP, @@ -1326,13 +1326,13 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( else if( pDefaultKey->AlgorithmId == DOT11_CIPHER_ALGO_CCMP ) { AESCCMP_BLOCK blockKey; - + PlatformMoveMemory( blockKey.x , pGlInfo->GTK , 16); pMgntInfo->SecurityInfo.GroupTransmitKeyIdx = (u1Byte)KeyIndex; AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pGlInfo->AESGTK); // Set For Hw encrypt !! /* - AP_Setkey( Adapter , + AP_Setkey( Adapter , CAM_CONST_BROAD, 1, // Index entry CAM_AES, @@ -1340,7 +1340,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( pGlInfo->GTK); */ } - + } } else if( !pMgntInfo->bRSNAPSKMode ) @@ -1359,7 +1359,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( FALSE, // IsGroupTransmitKey, since DefaultTransmitKeyIdx and GroupTransmitKeyIdx is determined by OID_DOT11_CIPHER_DEFAULT_KEY_ID, we just set it to FALSE. TRUE, // IsGroup. KeyRSC); - + PlatformRequestPreAuthentication( Adapter, PRE_AUTH_INDICATION_REASON_ASSOCIATION ); } else{ @@ -1378,7 +1378,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( return NDIS_STATUS_RESOURCES; } } - + } *BytesRead = *BytesNeeded; @@ -1390,7 +1390,7 @@ N6CSet_DOT11_CIPHER_DEFAULT_KEY( // // Description: -// ADD, MODIFY, or DELETE ONE or MORE entries in key-mapping key table. +// ADD, MODIFY, or DELETE ONE or MORE entries in key-mapping key table. // NDIS_STATUS N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( @@ -1427,11 +1427,11 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( if ( InformationBufferLength < *BytesNeeded ) { RT_TRACE( COMP_OID_SET, DBG_WARNING, (" <- [Error]N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY(), NDIS_STATUS_INVALID_LENGTH: %d\n", InformationBufferLength) ); - return NDIS_STATUS_BUFFER_OVERFLOW; + return NDIS_STATUS_BUFFER_OVERFLOW; } - + if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pByteArray->Header, + pByteArray->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_CIPHER_KEY_MAPPING_KEY_VALUE_BYTE_ARRAY_REVISION_1, sizeof(DOT11_BYTE_ARRAY)) ) @@ -1440,7 +1440,7 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( return NDIS_STATUS_INVALID_DATA; } - *BytesNeeded = FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer) + + *BytesNeeded = FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer) + pByteArray->uNumOfBytes; if (InformationBufferLength < *BytesNeeded) { @@ -1482,7 +1482,7 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( cpMacAddr(MacAddress, pKeyMappingKey->PeerMacAddr); - switch(pKeyMappingKey->AlgorithmId) + switch(pKeyMappingKey->AlgorithmId) { case DOT11_CIPHER_ALGO_WEP: { @@ -1503,19 +1503,19 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( case DOT11_CIPHER_ALGO_WEP104: { rtEncAlgo = RT_ENC_ALG_WEP104; - pKeyMaterial = pKeyMappingKey->ucKey; + pKeyMaterial = pKeyMappingKey->ucKey; KeyLen = pKeyMappingKey->usKeyLength; } - break; - + break; + case DOT11_CIPHER_ALGO_TKIP: { PDOT11_KEY_ALGO_TKIP_MIC pTkipMicKey = (PDOT11_KEY_ALGO_TKIP_MIC)pKeyMappingKey->ucKey; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY(): %s TKIP Key\n", ((pKeyMappingKey->bDelete)? "Delete": "Set" ))); rtEncAlgo = RT_ENC_ALG_TKIP; pKeyMaterial = pTkipMicKey->ucTKIPMICKeys; // Tkip Enc Key(16) + STA Rx MIC Key(8) + STA Tx MIC Key(8). - KeyLen = pTkipMicKey->ulTKIPKeyLength + pTkipMicKey->ulMICKeyLength; + KeyLen = pTkipMicKey->ulTKIPKeyLength + pTkipMicKey->ulMICKeyLength; PlatformMoveMemory(&KeyRSC, pTkipMicKey->ucIV48Counter, 6); bValidKeyRSC = TRUE; } @@ -1537,16 +1537,16 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( case DOT11_CIPHER_ALGO_MFPTKIP : { PDOT11_KEY_ALGO_TKIP_MIC pTkipMicKey = (PDOT11_KEY_ALGO_TKIP_MIC)pKeyMappingKey->ucKey; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY(): %s TKIP MFP Key\n", ((pKeyMappingKey->bDelete)? "Delete": "Set" ))); rtEncAlgo = RT_ENC_ALG_TKIP; pKeyMaterial = pTkipMicKey->ucTKIPMICKeys; // Tkip Enc Key(16) + STA Rx MIC Key(8) + STA Tx MIC Key(8). - KeyLen = pTkipMicKey->ulTKIPKeyLength + pTkipMicKey->ulMICKeyLength; + KeyLen = pTkipMicKey->ulTKIPKeyLength + pTkipMicKey->ulMICKeyLength; PlatformMoveMemory(&KeyRSC, pTkipMicKey->ucIV48Counter, 6); bValidKeyRSC = TRUE; CCX_MFPModeChange(Adapter, TRUE); - + // Keep Key to Local buffer ... if(KeyLen <= MAX_KEY_LEN) { @@ -1595,7 +1595,7 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( else if( !pMgntInfo->bRSNAPSKMode ) { MgntActSet_802_11_REMOVE_KEY( - Adapter, + Adapter, rtEncAlgo, 0, // KeyIndex, MacAddress, @@ -1620,7 +1620,7 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( if( pEntry == NULL ) { - return NDIS_STATUS_INVALID_DATA; + return NDIS_STATUS_INVALID_DATA; } else { @@ -1629,10 +1629,10 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( if( pKeyMappingKey->AlgorithmId == DOT11_CIPHER_ALGO_TKIP ) { pEntry->perSTAKeyInfo.TempEncKey = pEntry->perSTAKeyInfo.PTK+TKIP_ENC_KEY_POS; - pEntry->perSTAKeyInfo.TxMICKey = pEntry->perSTAKeyInfo.PTK+(TKIP_MIC_KEY_POS); + pEntry->perSTAKeyInfo.TxMICKey = pEntry->perSTAKeyInfo.PTK+(TKIP_MIC_KEY_POS); pEntry->perSTAKeyInfo.RxMICKey = pEntry->perSTAKeyInfo.PTK+(TKIP_MIC_KEY_POS+TKIP_MIC_KEY_LEN); - //Add for AP mode HW enc,by CCW + //Add for AP mode HW enc,by CCW ucIndex = AP_FindFreeEntry(Adapter , pEntry->MacAddr); if(ucIndex == Adapter->TotalCamEntry) { @@ -1641,43 +1641,43 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( } //set key - AP_Setkey( Adapter , + AP_Setkey( Adapter , pEntry->perSTAKeyInfo.pWLanSTA->MacAddr, - ucIndex, // Entey index + ucIndex, // Entey index CAM_TKIP, - 0, // Parise key - pEntry->perSTAKeyInfo.TempEncKey); + 0, // Parise key + pEntry->perSTAKeyInfo.TempEncKey); pEntry->keyindex = ucIndex; } else if ( pKeyMappingKey->AlgorithmId == DOT11_CIPHER_ALGO_CCMP ) { // AES mode AP-WPA AES,CCW - + AESCCMP_BLOCK blockKey; PAUTH_PKEY_MGNT_TAG pKeyMgnt = &pEntry->perSTAKeyInfo; RT_TRACE( COMP_SEC , DBG_LOUD, ("====>CCMP Set Station Key.\n")); RT_PRINT_ADDR(COMP_SEC , DBG_LOUD, " ====> Peer Address : ", MacAddress ); - //Add for AP mode HW enc,by CCW + //Add for AP mode HW enc,by CCW ucIndex = AP_FindFreeEntry(Adapter , pEntry->MacAddr); if(ucIndex == Adapter->TotalCamEntry) { RT_TRACE( COMP_OID_SET, DBG_WARNING, ("[Warning]:N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY: Cam Entry is FULL!!!\n")); return NDIS_STATUS_INVALID_DATA; } - - //Set Key + + //Set Key PlatformMoveMemory( blockKey.x , pEntry->perSTAKeyInfo.PTK , 16); AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE*8, (pu4Byte)pEntry->perSTAKeyInfo.AESKeyBuf); //set hw key - AP_Setkey( Adapter , + AP_Setkey( Adapter , pEntry->perSTAKeyInfo.pWLanSTA->MacAddr, - ucIndex, // Entey index + ucIndex, // Entey index CAM_AES, - 0, // Parise key - pEntry->perSTAKeyInfo.PTK); + 0, // Parise key + pEntry->perSTAKeyInfo.PTK); pEntry->keyindex = ucIndex; } - + } } else if( !pMgntInfo->bRSNAPSKMode ){ @@ -1711,7 +1711,7 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( } } PlatformRequestPreAuthentication( Adapter, PRE_AUTH_INDICATION_REASON_ASSOCIATION ); - + } else{ //vivi added for new cam search flow, 20091028......to find entry 4~31, for uni&broad&multicast @@ -1722,7 +1722,7 @@ N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( KeyLen, pKeyMaterial, MacAddress)) - { + { RT_TRACE( COMP_OID_SET, DBG_WARNING, (" <- [Error]N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY, MgntActSet_RSNA_ADD_MAPPING_KEY() return FALSE!!!\n") ); return NDIS_STATUS_RESOURCES; } @@ -1759,7 +1759,7 @@ N6CSet_DOT11_PMKID_LIST( RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==> N6CSet_DOT11_PMKID_LIST()\n") ); if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pPMKIDList->Header, + pPMKIDList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_PMKID_LIST_REVISION_1, sizeof(DOT11_PMKID_LIST)) ) @@ -1794,7 +1794,7 @@ N6CSet_DOT11_PMKID_LIST( // // Copy the PMKID list. // TODO: Re-use SecSetPMKID(). // - + // 1. Clear the entry with different SSID from the AP we are associating with. @@ -1807,9 +1807,9 @@ N6CSet_DOT11_PMKID_LIST( } } - + // 2. Insert or cover with new PMKID. - + pBssidInfo = pPMKIDList->PMKIDs; // pointer to the first DOT11_PMKID_ENTRY. for( i=0; iuNumOfEntries; i++ ) { @@ -1897,12 +1897,12 @@ N6CSet_DOT11_CONNECT_REQUEST( PRT_CHNL_LIST_ENTRY pChnlListEntry = NULL; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); u8Byte time_offset = 0; - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==> N6CSet_DOT11_CONNECT_REQUEST()\n") ); if(!N6_INIT_READY(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("N6CSet_DOT11_CONNECT_REQUEST() <===, return by N6_INIT_READY\n")); return NDIS_STATUS_DOT11_MEDIA_IN_USE; } @@ -1910,23 +1910,23 @@ N6CSet_DOT11_CONNECT_REQUEST( if(RT_DRIVER_STOP(Adapter)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Driver is going to stop \n")); - return NDIS_STATUS_FAILURE; + return NDIS_STATUS_FAILURE; } if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 1\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 1\n")); return NDIS_STATUS_FAILURE; - } + } if(PlatformAllocateMemory(Adapter, (PVOID*)&pRtBss, sizeof(RT_WLAN_BSS)) != RT_STATUS_SUCCESS) return NDIS_STATUS_FAILURE; - + ssid2match.Octet = pSsidList->SSIDs[0].ucSSID; ssid2match.Length = (u2Byte)pSsidList->SSIDs[0].uSSIDLength; // - // 061207, rcnjko: We must keep current BSS type before leaving the BSS by + // 061207, rcnjko: We must keep current BSS type before leaving the BSS by // MgntDisconnectAP or MgntDisconnectIBSS. // CurrBSSType = MgntActQuery_802_11_INFRASTRUCTURE_MODE(Adapter); @@ -1945,34 +1945,34 @@ N6CSet_DOT11_CONNECT_REQUEST( MgntDisconnectAP(Adapter, disas_lv_ss); } } - + if(MgntRoamingInProgress(pMgntInfo)) // Roaming. { if(MgntResetOrPnPInProgress(Adapter)) { - RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("reset in progress case 2\n")); PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - + return NDIS_STATUS_FAILURE; - } + } MgntRoamComplete(Adapter, MlmeStatus_invalid); } - + if(MgntIsLinkInProgress(pMgntInfo) && !OS_SUPPORT_WDI(Adapter)) // connecting. - { + { DrvIFIndicateConnectionStart(Adapter); DrvIFIndicateAssociationStart(Adapter); DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_FAILURE); MgntResetLinkProcess(Adapter); } - + if (CurrBSSType == RT_JOIN_NETWORKTYPE_ADHOC) { // Clear all rejected AP record, 2006.11.21, by shien chang. MgntClearRejectedAsocAP(Adapter); } - + // // Find the Bss desc // @@ -1981,20 +1981,20 @@ N6CSet_DOT11_CONNECT_REQUEST( MgntAddSsidsToScan(Adapter, ssid2match); - PlatformZeroMemory(pRtBss, sizeof(RT_WLAN_BSS)); + PlatformZeroMemory(pRtBss, sizeof(RT_WLAN_BSS)); join_action = SelectNetworkBySSID(Adapter, &ssid2match, FALSE, pRtBss); - pMgntInfo->RequestFromUplayer = TRUE; + pMgntInfo->RequestFromUplayer = TRUE; pMgntInfo->bDisconnectRequest = FALSE; Adapter->LastConnectStartIndicationTime = PlatformGetCurrentTime(); if(join_action == RT_NO_ACTION) { - RT_TRACE( COMP_OID_SET, DBG_LOUD, + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CONNECT_REQUEST(): No BSS found, CurrBSSType: %d, #of_BSS = %d\n", CurrBSSType, pMgntInfo->NumBssDesc4Query)); CopyMem(pMgntInfo->Ssid.Octet, pSsidList->SSIDs[0].ucSSID, pSsidList->SSIDs[0].uSSIDLength); - pMgntInfo->Ssid.Length =(u1Byte) pSsidList->SSIDs[0].uSSIDLength; + pMgntInfo->Ssid.Length =(u1Byte) pSsidList->SSIDs[0].uSSIDLength; pMgntInfo->bIbssStarter = FALSE; pMgntInfo->bIndicateConnectEvent = TRUE; @@ -2023,7 +2023,7 @@ N6CSet_DOT11_CONNECT_REQUEST( ); } else - { + { if(join_action == RT_START_IBSS) { if ( (pNdisCommon->NumDot11DesiredBSSIDList == 0) || @@ -2038,11 +2038,11 @@ N6CSet_DOT11_CONNECT_REQUEST( } } else if (join_action == RT_JOIN_IBSS) - { + { // 2009/02/25 MH For Samsung workaround to record adhoc link status. pHalData->SystemCurrTime = PlatformGetCurrentTime(); time_offset = pHalData->SystemCurrTime - pHalData->SystemStartTime; - //DbgPrint("time_offset=%d\n", time_offset); + //DbgPrint("time_offset=%d\n", time_offset); //if (time_offset >= 2000000) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_CONNECT_REQUEST\n") ); @@ -2050,7 +2050,7 @@ N6CSet_DOT11_CONNECT_REQUEST( PlatformScheduleWorkItem(&(pNdisCommon->SetAdhocLinkStateWorkItem)); } } - + CopyMem(pMgntInfo->Ssid.Octet, pSsidList->SSIDs[0].ucSSID, pSsidList->SSIDs[0].uSSIDLength); pMgntInfo->Ssid.Length =(u1Byte) pSsidList->SSIDs[0].uSSIDLength; // pMgntInfo->RequestFromUplayer = FALSE; @@ -2061,10 +2061,10 @@ N6CSet_DOT11_CONNECT_REQUEST( else pMgntInfo->mCap &= ~cPrivacy; - + // Initialize state machine for indication, 2006.11.30, by shien chang. N6InitializeIndicateStateMachine(Adapter); - + pMgntInfo->JoinAction = join_action; CCX_SetAssocReason(Adapter, CCX_AR_FIRST_ASSOCIATION); @@ -2073,7 +2073,7 @@ N6CSet_DOT11_CONNECT_REQUEST( } PlatformFreeMemory(pRtBss, sizeof(RT_WLAN_BSS)); - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("<== N6CSet_DOT11_CONNECT_REQUEST()\n") ); return NDIS_STATUS_SUCCESS; } @@ -2102,7 +2102,7 @@ N6CSet_DOT11_DISCONNECT_REQUEST( time_offset = pHalData->SystemCurrTime - pHalData->SystemStartTime; //DbgPrint("time_offset=%d\n", time_offset); if (pMgntInfo->mIbss == TRUE/* && time_offset >= 2000000*/) - { + { RT_TRACE(COMP_INIT,DBG_LOUD,("N6CSet_DOT11_DISCONNECT_REQUEST\n")); pHalData->AdhocLinkState = FALSE; PlatformScheduleWorkItem(&(pNdisCommon->SetAdhocLinkStateWorkItem)); @@ -2110,15 +2110,15 @@ N6CSet_DOT11_DISCONNECT_REQUEST( if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED) { - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } - + if(pMgntInfo->bReceiveSystemPSOID && GET_POWER_SAVE_CONTROL(pMgntInfo)->WoWLANS5Support) { RT_TRACE(COMP_MLME, DBG_LOUD, ("Set OID_RT_DISCONNECT_REQUEST: pMgntInfo->bReceiveSystemPSOID = TRUE and return!!\n")); return NDIS_STATUS_SUCCESS; } - + if(MultiChannel_IsFCSInProgress(Adapter)) { MultiChannelDisconnectClient(Adapter, TRUE); @@ -2127,10 +2127,10 @@ N6CSet_DOT11_DISCONNECT_REQUEST( } pMgntInfo->bDisconnectRequest = TRUE; - + ndisStatus = MgntActSet_802_11_DISASSOCIATE( Adapter, disas_lv_ss ); -// if(ndisStatus == NDIS_STATUS_SUCCESS) +// if(ndisStatus == NDIS_STATUS_SUCCESS) // pMgntInfo->bDisconnectRequest = TRUE; return ndisStatus; @@ -2149,33 +2149,33 @@ N6CSet_DOT11_POWER_MGMT_REQUEST( { PMGNT_INFO pMgntInfo=&(Adapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - + pPSC->PowerSaveLevel = *pPowerSaveLevel; switch(pPSC->PowerSaveLevel) { case DOT11_POWER_SAVING_NO_POWER_SAVING: pPSC->PowerSaveLevel = POWER_SAVING_NO_POWER_SAVING; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_NO_POWER_SAVING\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_NO_POWER_SAVING\n") ); break; case DOT11_POWER_SAVING_FAST_PSP: pPSC->PowerSaveLevel = POWER_SAVING_FAST_PSP; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_FAST_PSP\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_FAST_PSP\n") ); break; case DOT11_POWER_SAVING_MAX_PSP: pPSC->PowerSaveLevel = POWER_SAVING_MAX_PSP; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST():DOT11_POWER_SAVING_MAX_PSP\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST():DOT11_POWER_SAVING_MAX_PSP\n") ); break; case DOT11_POWER_SAVING_MAXIMUM_LEVEL: pPSC->PowerSaveLevel = POWER_SAVING_MAXIMUM_LEVEL; - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_MAXIMUM_LEVEL\n") ); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): DOT11_POWER_SAVING_MAXIMUM_LEVEL\n") ); break; default: - RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): unkown\n")); + RT_TRACE( COMP_POWER, DBG_LOUD, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): unkown\n")); break; } - RT_TRACE( COMP_OID_SET, DBG_TRACE, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): %d\n", pPSC->PowerSaveLevel) ); + RT_TRACE( COMP_OID_SET, DBG_TRACE, ("N6CSet_DOT11_POWER_MGMT_REQUEST(): %d\n", pPSC->PowerSaveLevel) ); return NDIS_STATUS_SUCCESS; } @@ -2196,7 +2196,7 @@ N6CSet_DOT11_EXCLUDED_MAC_ADDRESS_LIST( { PDOT11_MAC_ADDRESS_LIST pMacAddrList = (PDOT11_MAC_ADDRESS_LIST)InformationBuffer; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + *BytesNeeded = sizeof(DOT11_MAC_ADDRESS_LIST); if ( InformationBufferLength < *BytesNeeded ) { @@ -2209,20 +2209,20 @@ N6CSet_DOT11_EXCLUDED_MAC_ADDRESS_LIST( DOT11_MAC_ADDRESS_LIST_REVISION_1, sizeof(DOT11_MAC_ADDRESS_LIST))) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("N6_VERIFY_OBJECT_HEADER_DEFAULT(): obj type: %u vs %u.\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("N6_VERIFY_OBJECT_HEADER_DEFAULT(): obj type: %u vs %u.\n", pMacAddrList->Header.Type, NDIS_OBJECT_TYPE_DEFAULT)); - - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("N6_VERIFY_OBJECT_HEADER_DEFAULT(): mac addr list rev: %u vs %u.\n", + + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("N6_VERIFY_OBJECT_HEADER_DEFAULT(): mac addr list rev: %u vs %u.\n", pMacAddrList->Header.Revision, DOT11_MAC_ADDRESS_LIST_REVISION_1)); - + // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("N6_VERIFY_OBJECT_HEADER_DEFAULT(): size: %u vs %u.\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("N6_VERIFY_OBJECT_HEADER_DEFAULT(): size: %u vs %u.\n", pMacAddrList->Header.Size, sizeof(DOT11_MAC_ADDRESS_LIST))); - + return NDIS_STATUS_INVALID_DATA; } @@ -2230,7 +2230,7 @@ N6CSet_DOT11_EXCLUDED_MAC_ADDRESS_LIST( { return NDIS_STATUS_SUCCESS; } - + if (pMacAddrList->uNumOfEntries > NATIVE_802_11_MAX_EXCLUDED_MACADDR) { return NDIS_STATUS_INVALID_LENGTH; @@ -2241,16 +2241,16 @@ N6CSet_DOT11_EXCLUDED_MAC_ADDRESS_LIST( { return NDIS_STATUS_INVALID_LENGTH; } - + if (! MgntActSet_ExcludedMacAddressList( - Adapter, - (pu1Byte)pMacAddrList->MacAddrs, + Adapter, + (pu1Byte)pMacAddrList->MacAddrs, pMacAddrList->uNumOfEntries)) { return NDIS_STATUS_INVALID_DATA; } - // Get the Mac address in the excluded list and if the address of AP which + // Get the Mac address in the excluded list and if the address of AP which // we are currently connecting is in it, disconnect from the AP. // if ( pMgntInfo->mAssoc || pMgntInfo->mIbss ) @@ -2260,9 +2260,9 @@ N6CSet_DOT11_EXCLUDED_MAC_ADDRESS_LIST( MgntActSet_802_11_DISASSOCIATE( Adapter, disas_lv_ss ); } } - + *BytesRead = *BytesNeeded; - + return NDIS_STATUS_SUCCESS; } @@ -2301,8 +2301,8 @@ N6CSet_DOT11_DESIRED_BSSID_LIST( // if ( InformationBufferLength < *BytesNeeded ) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("N6CSet_DOT11_DESIRED_BSSID_LIST(): InformationBufferLength (%u) < BytesNeeded (%u).\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("N6CSet_DOT11_DESIRED_BSSID_LIST(): InformationBufferLength (%u) < BytesNeeded (%u).\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_BUFFER_OVERFLOW; } @@ -2317,18 +2317,18 @@ N6CSet_DOT11_DESIRED_BSSID_LIST( { return NDIS_STATUS_INVALID_LENGTH; } - + if (pBssidList->uNumOfEntries != 0) { // - //Add for DTM 1.0c test, sometimes DTM will set this wrong mac address + //Add for DTM 1.0c test, sometimes DTM will set this wrong mac address // if(N6Dot11AddrIsfe(pBssidList->BSSIDs[0])) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_DESIRED_BSSID_LIST(): Mac add is FE:FF:FF:FF:FF:FF")); } else - { + { PlatformMoveMemory( pNdisCommon->dot11DesiredBSSIDList, pBssidList->BSSIDs, @@ -2376,8 +2376,8 @@ N6CSet_DOT11_CURRENT_OPERATION_MODE( InformationBuffer, length); *BytesRead = length; - - if ( (pMgntInfo->bNetMonitorMode == FALSE) && + + if ( (pMgntInfo->bNetMonitorMode == FALSE) && (pNdisCommon->dot11CurrentOperationMode.uCurrentOpMode == DOT11_OPERATION_MODE_NETWORK_MONITOR) ) { MgntEnableNetMonitorMode(Adapter, FALSE); @@ -2387,8 +2387,8 @@ N6CSet_DOT11_CURRENT_OPERATION_MODE( { MgntDisableNetMonitorMode(Adapter, FALSE); } - - + + return NDIS_STATUS_SUCCESS; } @@ -2431,10 +2431,10 @@ N6CSet_DOT11_PRIVACY_EXEMPTION_LIST( { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - PDOT11_PRIVACY_EXEMPTION_LIST pExemptionList = + PDOT11_PRIVACY_EXEMPTION_LIST pExemptionList = (PDOT11_PRIVACY_EXEMPTION_LIST)InformationBuffer; - - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, + + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Set OID_DOT11_PRIVACY_EXEMPTION_LIST.\n")); do { @@ -2449,13 +2449,13 @@ N6CSet_DOT11_PRIVACY_EXEMPTION_LIST( } *BytesNeeded = FIELD_OFFSET(DOT11_PRIVACY_EXEMPTION_LIST, PrivacyExemptionEntries); - + if ( InformationBufferLength < *BytesNeeded ) { Status = NDIS_STATUS_BUFFER_OVERFLOW; break; } - + if(pExemptionList->uNumOfEntries > NATIVE_802_11_MAX_PRIVACY_EXEMPTION) { Status = NDIS_STATUS_INVALID_LENGTH; @@ -2468,15 +2468,15 @@ N6CSet_DOT11_PRIVACY_EXEMPTION_LIST( Status = NDIS_STATUS_BUFFER_OVERFLOW; break; } - + pNdisCommon->PrivacyExemptionEntrieNum = pExemptionList->uNumOfEntries; - PlatformMoveMemory(pNdisCommon->PrivacyExemptionEntries, - pExemptionList->PrivacyExemptionEntries, + PlatformMoveMemory(pNdisCommon->PrivacyExemptionEntries, + pExemptionList->PrivacyExemptionEntries, pExemptionList->uNumOfEntries * sizeof(DOT11_PRIVACY_EXEMPTION)); - RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, - "Privacy exempt list:", - pNdisCommon->PrivacyExemptionEntries, + RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD, + "Privacy exempt list:", + pNdisCommon->PrivacyExemptionEntries, (int)(pExemptionList->uNumOfEntries * sizeof(DOT11_PRIVACY_EXEMPTION))); }while(FALSE); @@ -2496,7 +2496,7 @@ N6CSet_DOT11_IBSS_PARAMS( PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PDOT11_IBSS_PARAMS pParams = (PDOT11_IBSS_PARAMS)InformationBuffer; PRTL_DOT11_IBSS_PARAMS pdot11IbssParams = &pNdisCommon->dot11IbssParams; - + *BytesNeeded = sizeof(DOT11_IBSS_PARAMS); if ( InformationBufferLength < *BytesNeeded) { @@ -2504,7 +2504,7 @@ N6CSet_DOT11_IBSS_PARAMS( } if (!N6_VERIFY_OBJECT_HEADER_DEFAULT( - pParams->Header, + pParams->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_ALGORITHM_LIST_REVISION_1, sizeof(DOT11_IBSS_PARAMS)) ) @@ -2523,9 +2523,9 @@ N6CSet_DOT11_IBSS_PARAMS( return NDIS_STATUS_BUFFER_OVERFLOW; } - // + // // Free the past IE buffer. - // + // if(pdot11IbssParams->AdditionalIEData) { PlatformFreeMemory(pdot11IbssParams->AdditionalIEData, pdot11IbssParams->AdditionalIESize); @@ -2533,7 +2533,7 @@ N6CSet_DOT11_IBSS_PARAMS( pdot11IbssParams->AdditionalIESize = 0; } - // + // // Allocate IE buffer // if(pParams->uIEsLength > 0) @@ -2548,14 +2548,14 @@ N6CSet_DOT11_IBSS_PARAMS( PlatformMoveMemory(pdot11IbssParams->AdditionalIEData, (PVOID)((pu1Byte)pParams + pParams->uIEsOffset), pParams->uIEsLength); pdot11IbssParams->AdditionalIESize = pParams->uIEsLength; } - + pdot11IbssParams->bDot11IbssJoinOnly = pParams->bJoinOnly; // RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_IBSS_PARAMS(): bJoinOnly = %d\n", pParams->bJoinOnly)); - + *BytesRead = pParams->uIEsLength + pParams->uIEsOffset; - + return NDIS_STATUS_SUCCESS; } @@ -2567,11 +2567,11 @@ ValidateScanRequest( { ULONG i, BytesParsed = 0; PDOT11_SSID pDot11SSID; - + if(!OS_SUPPORT_WDI(Adapter)) { // - + if (pScanRequest->uNumOfdot11SSIDs == 0) { return NDIS_STATUS_INVALID_DATA; @@ -2592,7 +2592,7 @@ ValidateScanRequest( BytesParsed += sizeof(DOT11_SSID); } } - + if (pScanRequest->dot11BSSType != dot11_BSS_type_infrastructure && pScanRequest->dot11BSSType != dot11_BSS_type_independent && pScanRequest->dot11BSSType != dot11_BSS_type_any) @@ -2613,7 +2613,7 @@ ValidateScanRequest( default: return NDIS_STATUS_INVALID_DATA; } - + return NDIS_STATUS_SUCCESS; } @@ -2637,13 +2637,13 @@ N6CSet_DOT11_SCAN_REQUEST( PDOT11_SSID pDot11SSID; u4Byte i; PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("=====>N6CSet_DOT11_SCAN_REQUEST()\n")); *BytesNeeded = FIELD_OFFSET(DOT11_SCAN_REQUEST_V2, ucBuffer); if ( InformationBufferLength < *BytesNeeded ) { - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by InformationBufferLength(%d) < BytesNeeded(%d)\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by InformationBufferLength(%d) < BytesNeeded(%d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_BUFFER_OVERFLOW; } @@ -2664,12 +2664,12 @@ N6CSet_DOT11_SCAN_REQUEST( { DrvIFIndicateScanStart(Adapter); DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); - RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by ACTING_AS_AP.\n")); - return NDIS_STATUS_SUCCESS; + RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by ACTING_AS_AP.\n")); + return NDIS_STATUS_SUCCESS; } - if( // No need to scan for passing WHCK Test - MgntLinkStatusQuery(GetDefaultAdapter(Adapter)) == RT_MEDIA_CONNECT && + if( // No need to scan for passing WHCK Test + MgntLinkStatusQuery(GetDefaultAdapter(Adapter)) == RT_MEDIA_CONNECT && GetFirstGOPort(Adapter) != NULL ) { @@ -2687,9 +2687,9 @@ N6CSet_DOT11_SCAN_REQUEST( return NDIS_STATUS_SUCCESS; } - // No need to scan for passing WHCK Test + // No need to scan for passing WHCK Test //by sherry 20130117 - if( (GetFirstGOPort(Adapter) != NULL) && + if( (GetFirstGOPort(Adapter) != NULL) && (MgntLinkStatusQuery(GetFirstGOPort(Adapter))) && (GetDefaultAdapter(Adapter)->MgntInfo.bGoSkipScanForWFD == 1)) { @@ -2699,8 +2699,8 @@ N6CSet_DOT11_SCAN_REQUEST( return NDIS_STATUS_SUCCESS; } - - if( (GetFirstClientPort(Adapter) != NULL) && + + if( (GetFirstClientPort(Adapter) != NULL) && (MgntLinkStatusQuery(GetFirstClientPort(Adapter))) && (GetDefaultAdapter(Adapter)->MgntInfo.bClientSkipScanForWFD == 1)) { @@ -2738,8 +2738,8 @@ N6CSet_DOT11_SCAN_REQUEST( { PMGNT_INFO pGoMgntInfo = &(pGoAdapter->MgntInfo); - - if( (pGoMgntInfo->LinkDetectInfo.bClientAskForFCS == 1) && + + if( (pGoMgntInfo->LinkDetectInfo.bClientAskForFCS == 1) && (MgntLinkStatusQuery(GetDefaultAdapter(Adapter)) == RT_MEDIA_DISCONNECT) && (MgntLinkStatusQuery(GetFirstGOPort(Adapter)) == RT_MEDIA_CONNECT) && pGoMgntInfo->bWaitBeforeGoSkipScan != 0) @@ -2749,9 +2749,9 @@ N6CSet_DOT11_SCAN_REQUEST( RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): skip scan when Client is asking for FCS\n")); return NDIS_STATUS_SUCCESS; } - + } - + #if (P2P_SUPPORT == 1) { PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); @@ -2760,7 +2760,7 @@ N6CSet_DOT11_SCAN_REQUEST( { PP2P_INFO pP2PInfo = GET_P2P_INFO(pLoopAdapter); PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(&pLoopAdapter->MgntInfo); - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): role: %u, state: %u, wps: %u\n", pP2PInfo->Role, pP2PInfo->State, pSimpleConfig->bEnabled)); if(P2P_ACTING_AS_GO(pP2PInfo) && (P2P_STATE_OPERATING == pP2PInfo->State || P2P_STATE_PROVISIONING == pP2PInfo->State) @@ -2782,19 +2782,19 @@ N6CSet_DOT11_SCAN_REQUEST( ndisStatus = ValidateScanRequest(Adapter, pScanRequest); if (ndisStatus != NDIS_STATUS_SUCCESS) { - RT_TRACE(COMP_SCAN, DBG_LOUD, - ("N6CSet_DOT11_SCAN_REQUEST(): return for ValidateScanRequest() return %#X\n", + RT_TRACE(COMP_SCAN, DBG_LOUD, + ("N6CSet_DOT11_SCAN_REQUEST(): return for ValidateScanRequest() return %#X\n", ndisStatus)); return ndisStatus; - } + } if( MgntScanInProgress(pMgntInfo) || MgntIsLinkInProgress(pMgntInfo)) { DrvIFIndicateScanStart(Adapter); DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by join %d or scan %d in prorgress !!!\n", MgntIsLinkInProgress(pMgntInfo), MgntScanInProgress(pMgntInfo))); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } @@ -2812,19 +2812,19 @@ N6CSet_DOT11_SCAN_REQUEST( pMgntInfo->NumBssDesc = 0; pMgntInfo->NumBssDesc4Query = 0; - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: N6CSet_DOT11_SCAN_REQUEST(): clear NumBssDesc4Query!!!\n")); - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by pMgntInfo->bStopScan!!!\n")); return NDIS_STATUS_SUCCESS; } - if( ((MgntLinkStatusIsWifiBusy(Adapter) || (NULL != GetFirstAPAdapter(Adapter)) || IsRTKP2PDeviceExisting(Adapter)) && + if( ((MgntLinkStatusIsWifiBusy(Adapter) || (NULL != GetFirstAPAdapter(Adapter)) || IsRTKP2PDeviceExisting(Adapter)) && (Adapter->bInHctTest==FALSE) ) ) { u8Byte now_time; u4Byte deltatime; - + now_time = PlatformGetCurrentTime(); deltatime = (ULONG)( (now_time - Adapter->lastscantime) / 100000 ); // in 0.1 second. Adapter->lastscantime = now_time; // in micro-second. @@ -2832,17 +2832,17 @@ N6CSet_DOT11_SCAN_REQUEST( if((deltatime > 400) && pMgntInfo->bFlushScanList != TRUE) { // - // Note: + // Note: // Re-mark "bFlushScanList" as false because we cheat the OS that we have scanned completely and re-copy the old - // scan list into the list for query. In other words, because we never scaned, to avoid the result of empty scan list - // in OID querying, the pMgntInfo->bssDesc4Query list should be cleared but we keep pMgntInfo->bssDesc to copy the + // scan list into the list for query. In other words, because we never scaned, to avoid the result of empty scan list + // in OID querying, the pMgntInfo->bssDesc4Query list should be cleared but we keep pMgntInfo->bssDesc to copy the // scan list into pMgntInfo->bssDesc4Query if the following scan operation is not performed actually. // By Bruce, 2009-02-25. // pMgntInfo->bFlushScanList = FALSE; DrvIFIndicateScanStart(Adapter); DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("N6CSet_DOT11_SCAN_REQUEST(): skip scan by busy traffic!!!\n")); return NDIS_STATUS_SUCCESS; } @@ -2869,36 +2869,36 @@ N6CSet_DOT11_SCAN_REQUEST( if(!OS_SUPPORT_WDI(Adapter)) { MgntClearSsidsToScan(Adapter); - - pDot11SSID = (PDOT11_SSID)((pu1Byte)pScanRequest + + + pDot11SSID = (PDOT11_SSID)((pu1Byte)pScanRequest + FIELD_OFFSET(DOT11_SCAN_REQUEST_V2, ucBuffer) + pScanRequest->udot11SSIDsOffset); - + for (i=0; iuNumOfdot11SSIDs; i++) { if (pDot11SSID->uSSIDLength != 0) { OCTET_STRING tmpSsid; - + tmpSsid.Octet = pDot11SSID->ucSSID; tmpSsid.Length = (u2Byte)pDot11SSID->uSSIDLength; - - MgntAddSsidsToScan(Adapter, tmpSsid); + + MgntAddSsidsToScan(Adapter, tmpSsid); } - + pDot11SSID ++; } - + //merge from branch 1021 to pass WHCK Scan_AdditionalIE - MgntActSet_AdditionalProbeReqIE(Adapter, - (pu1Byte)((pu1Byte)pScanRequest->ucBuffer + pScanRequest->uIEsOffset), + MgntActSet_AdditionalProbeReqIE(Adapter, + (pu1Byte)((pu1Byte)pScanRequest->ucBuffer + pScanRequest->uIEsOffset), pScanRequest->uIEsLength); } //merge from branch 1021 to pass WHCK Scan_AdditionalIE - MgntActSet_AdditionalProbeReqIE(Adapter, - (pu1Byte)((pu1Byte)pScanRequest->ucBuffer + pScanRequest->uIEsOffset), + MgntActSet_AdditionalProbeReqIE(Adapter, + (pu1Byte)((pu1Byte)pScanRequest->ucBuffer + pScanRequest->uIEsOffset), pScanRequest->uIEsLength); { @@ -2911,7 +2911,7 @@ N6CSet_DOT11_SCAN_REQUEST( } } } - + FunctionOut(COMP_SCAN); return NDIS_STATUS_SUCCESS; @@ -2947,8 +2947,8 @@ N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST( *BytesNeeded = FIELD_OFFSET(CUSTOMIZED_SCAN_REQUEST, ProbeReqBuf); if ( InformationBufferLength < *BytesNeeded ) {// we can't read to the ProbeReqLen field - RT_TRACE(COMP_MLME, DBG_LOUD, - ("N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST(): a: return for InformationBufferLength(%u) < BytesNeeded(%u)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST(): a: return for InformationBufferLength(%u) < BytesNeeded(%u)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_BUFFER_OVERFLOW; } @@ -2956,12 +2956,12 @@ N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST( *BytesNeeded += pScanRequest->ProbeReqLen; if(InformationBufferLength < *BytesNeeded) {// we can't read all ProbeReq buffer - RT_TRACE(COMP_MLME, DBG_LOUD, - ("N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST(): b: return for InformationBufferLength(%u) < BytesNeeded(%u)\n", + RT_TRACE(COMP_MLME, DBG_LOUD, + ("N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST(): b: return for InformationBufferLength(%u) < BytesNeeded(%u)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_BUFFER_OVERFLOW; } - } + } if(!pScanRequest) { @@ -2978,13 +2978,13 @@ N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST( for(itChnl = 0; itChnl < pScanRequest->nChannels; itChnl++) { - CustomScan_AddScanChnl(req, pScanRequest->Channels[itChnl], 1, - pScanRequest->ScanType, pScanRequest->Duration, + CustomScan_AddScanChnl(req, pScanRequest->Channels[itChnl], 1, + pScanRequest->ScanType, pScanRequest->Duration, pScanRequest->DataRate, probeReqBuf); } CustomScan_IssueReq(customScanInfo, req, CUSTOM_SCAN_SRC_TYPE_UNSPECIFIED, "custom scan oid"); - + return NDIS_STATUS_SUCCESS; } @@ -3014,11 +3014,11 @@ N6CSet_DOT11_DESIRED_SSID_LIST( ndisStatus = NDIS_STATUS_BUFFER_OVERFLOW; break; } - + if((pSsidList->uNumOfEntries != 1) || (pSsidList->uTotalNumOfEntries !=1)) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set AP mode OID_DOT11_DESIRED_SSID_LIST: SsidList->uNumOfEntries = %u.\n", pSsidList->uNumOfEntries)); ndisStatus = NDIS_STATUS_INVALID_LENGTH; break; @@ -3027,7 +3027,7 @@ N6CSet_DOT11_DESIRED_SSID_LIST( if((pSsidList->SSIDs[0].uSSIDLength > 32) || (pSsidList->SSIDs[0].uSSIDLength < 1)) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_DESIRED_SSID_LIST(): SsidList->SSIDs[0].uSSIDLength = %u.\n", pSsidList->SSIDs[0].uSSIDLength)); ndisStatus = NDIS_STATUS_INVALID_DATA; break; @@ -3037,7 +3037,7 @@ N6CSet_DOT11_DESIRED_SSID_LIST( &(pNdisCommon->dot11DesiredSSIDList), pSsidList, sizeof(DOT11_SSID_LIST)); - + PlatformMoveMemory( &(pNdisCommon->dot11DesiredSSIDListCopy), pSsidList, @@ -3049,11 +3049,11 @@ N6CSet_DOT11_DESIRED_SSID_LIST( } pNdisCommon->dot11DesiredSSIDListIndex = 0; - + *BytesRead = sizeof(DOT11_SSID_LIST); - + } while(FALSE); - + return ndisStatus; } @@ -3066,11 +3066,11 @@ N6CSet_DOT11_ATIM_WINDOW( PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); // check if current state is allowed to change ATIM window. - + pMgntInfo->dot11AtimWindow = (u2Byte)(*pValue); - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CSet_DOT11_ATIM_WINDOW(): %d\n", *pValue)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } NDIS_STATUS @@ -3080,16 +3080,16 @@ N6CSet_DOT11_NIC_POWER_STATE( IN BOOLEAN bValue ) { - PADAPTER pAdapter = GetDefaultAdapter(Adapter); + PADAPTER pAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> N6CSet_DOT11_NIC_POWER_STATE(): bValue %d\n", bValue)); - // We must update variables in SetRFPowerStateWorkItemCallback(), - // and RF change action would be rejected in MgntActSet_RF_State(). - // Isaiah 2007-12-21. - + // We must update variables in SetRFPowerStateWorkItemCallback(), + // and RF change action would be rejected in MgntActSet_RF_State(). + // Isaiah 2007-12-21. + // // Synchronized access, 2006.11.07, by shien chang. // Change RF power state. @@ -3114,7 +3114,7 @@ N6CSet_DOT11_NIC_POWER_STATE( { PlatformScheduleWorkItem(&(pNdisCommon->SetRFPowerStateWorkItem)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== N6CSet_DOT11_NIC_POWER_STATE(): %d\n", bValue)); - return NDIS_STATUS_PENDING; + return NDIS_STATUS_PENDING; } else { @@ -3132,10 +3132,10 @@ N6CSet_DOT11_NIC_POWER_STATE( } pNdisCommon->PendedRequest = NULL; PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK); - + SetRFPowerStateWorkItemCallback((PVOID)pAdapter); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== N6CSet_DOT11_NIC_POWER_STATE(): bValue %d\n", bValue)); - return NDIS_STATUS_SUCCESS; + return NDIS_STATUS_SUCCESS; } } @@ -3189,7 +3189,7 @@ N6CSet_DOT11_OPERATIONAL_RATE_SET( *BytesRead = dwRequiredSize; FillOctetString(osRateSet, pDot11RateSet->ucRateSet, (u2Byte)(pDot11RateSet->uRateSetLength)); - + // // Prevent support rate set from incorrect setting(zero data rate). // Added by Roger, 2007.03.21. @@ -3212,11 +3212,11 @@ N6CSet_DOT11_OPERATIONAL_RATE_SET( break; default: break; - } - break; + } + break; } - } - + } + } while(FALSE); @@ -3237,7 +3237,7 @@ N6CSet_DOT11_DESIRED_PHY_LIST( PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; BOOLEAN AnyPhyId = FALSE; ULONG index; - + *BytesRead = 0; *BytesNeeded =0; @@ -3247,7 +3247,7 @@ N6CSet_DOT11_DESIRED_PHY_LIST( return NDIS_STATUS_INVALID_LENGTH; } - if (!N6_VERIFY_OBJECT_HEADER_DEFAULT(pPhyIdList->Header, + if (!N6_VERIFY_OBJECT_HEADER_DEFAULT(pPhyIdList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_PHY_ID_LIST_REVISION_1, sizeof(DOT11_PHY_ID_LIST))) @@ -3280,7 +3280,7 @@ N6CSet_DOT11_DESIRED_PHY_LIST( *BytesRead = FIELD_OFFSET(DOT11_PHY_ID_LIST, dot11PhyId) + pPhyIdList->uNumOfEntries * sizeof(ULONG); - + // // Make sure we support all the PHY IDs in the list. // @@ -3295,7 +3295,7 @@ N6CSet_DOT11_DESIRED_PHY_LIST( AnyPhyId = TRUE; } - else if (pPhyIdList->dot11PhyId[index] >= pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries) + else if (pPhyIdList->dot11PhyId[index] >= pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries) { return NDIS_STATUS_INVALID_DATA; } @@ -3307,7 +3307,7 @@ N6CSet_DOT11_DESIRED_PHY_LIST( // if (AnyPhyId) { - + pNdisCommon->staDesiredPhyCount = 1; pNdisCommon->staDesiredPhyList[0] = DOT11_PHY_ID_ANY; } @@ -3342,7 +3342,7 @@ N6CQuerySet_DOT11_RESET_REQUEST( PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); PRT_CHANNEL_INFO pChnlInfo; - + // // First make sure the input buffer is large enough to // hold a RESET_CONFIRM @@ -3353,10 +3353,10 @@ N6CQuerySet_DOT11_RESET_REQUEST( *BytesNeeded = sizeof(DOT11_STATUS_INDICATION); return NDIS_STATUS_BUFFER_OVERFLOW; } - + // // Validate the buffer length - // + // if ( InputBufferLength < sizeof(DOT11_RESET_REQUEST) ) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("InputBufferLength too short\n")); @@ -3377,12 +3377,12 @@ N6CQuerySet_DOT11_RESET_REQUEST( // - // When the reset operation is complete, the miniport driver must return a DOT11_STATUS_INDICATION + // When the reset operation is complete, the miniport driver must return a DOT11_STATUS_INDICATION //structure to confirm the reset operation, so do NOT return ndisStatus immediately without status indication. // 2014.05.02. - // + // do{ - + // // According to WDK, reset the multicast list when the reset layer is mac layer, by Bruce, 2008-06-25. // @@ -3396,17 +3396,17 @@ N6CQuerySet_DOT11_RESET_REQUEST( } if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED) - { + { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CQuerySet_DOT11_RESET_REQUEST(): Fake AP mode, Skip Reset process!!\n")); break; } - + if(pMgntInfo->bReceiveSystemPSOID && GET_POWER_SAVE_CONTROL(pMgntInfo)->WoWLANS5Support) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CQuerySet_DOT11_RESET_REQUEST(): bReceiveSystemPSOID and WoWLANS5Support, Skip Reset process!!\n")); break; } - + pMgntInfo->bResetInProgress = TRUE; RT_TRACE(COMP_MLME, DBG_LOUD, ("before reset State_AuthReqService %d port number %d\n", pMgntInfo->State_AuthReqService, Adapter->pNdis62Common->PortNumber)); @@ -3415,16 +3415,16 @@ N6CQuerySet_DOT11_RESET_REQUEST( if(MgntIsLinkInProgress(pMgntInfo) || MgntRoamingInProgress(pMgntInfo)) { RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntIsLinkInProgress\n")); - + pMgntInfo->bJoinInProgress = FALSE; if(MgntRoamingInProgress(pMgntInfo)) DrvIFIndicateRoamingStart(Adapter); else DrvIFIndicateConnectionStart(Adapter); - + DrvIFIndicateAssociationStart(Adapter); DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); - + if(MgntRoamingInProgress(pMgntInfo)) DrvIFIndicateRoamingComplete(Adapter, RT_STATUS_FAILURE); else @@ -3437,20 +3437,20 @@ N6CQuerySet_DOT11_RESET_REQUEST( // We now first indicate the ScanComplete to prevent this issue. if(pNdisCommon->bToIndicateScanComplete) DrvIFIndicateScanComplete(Adapter, RT_STATUS_SUCCESS); - + // if(FALSE == WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) { - if( pMgntInfo->mIbss ){ + if( pMgntInfo->mIbss ){ RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntDisconnectIBSS\n")); - + MgntDisconnectIBSS( Adapter ); } } if( pMgntInfo->mAssoc){ RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntDisconnectAP\n")); - + MgntDisconnectAP(Adapter, disas_lv_ss); } @@ -3461,10 +3461,10 @@ N6CQuerySet_DOT11_RESET_REQUEST( pChnlInfo = pLoopMgntInfo->pChannelInfo; if(pChnlInfo->ChnlOp == CHNLOP_SCAN) break; - else + else pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } - + if(pLoopAdapter == NULL || Adapter == pLoopAdapter) { if(MgntScanInProgress(&(Adapter->MgntInfo))) @@ -3480,7 +3480,7 @@ N6CQuerySet_DOT11_RESET_REQUEST( else { RT_TRACE(COMP_MLME,DBG_LOUD,("Other port number %d is scaning, abandon ResetScan\n", pLoopAdapter->pNdis62Common->PortNumber)); - } + } PlatformCancelTimer(Adapter, &(pMgntInfo->pChannelInfo->SwBwTimer)); @@ -3495,26 +3495,26 @@ N6CQuerySet_DOT11_RESET_REQUEST( // Refer to OID_DOT11_CURRENT_OPERATION_MODE in DDK Document. // 2008.08.08, haich. // - //if(pDot11ResetRequest->bSetDefaultMIB) // This causes some problem (can's send packet, invalid state) + //if(pDot11ResetRequest->bSetDefaultMIB) // This causes some problem (can's send packet, invalid state) // and it's even not refered to in sample code. { DOT11_CURRENT_OPERATION_MODE dot11CurrentOperationMode; // backup - PlatformMoveMemory(&dot11CurrentOperationMode, - &pNdisCommon->dot11CurrentOperationMode, + PlatformMoveMemory(&dot11CurrentOperationMode, + &pNdisCommon->dot11CurrentOperationMode, sizeof(DOT11_CURRENT_OPERATION_MODE)); N6InitializeNative80211MIBs(Adapter); // restore PlatformMoveMemory(&pNdisCommon->dot11CurrentOperationMode, - &dot11CurrentOperationMode, + &dot11CurrentOperationMode, sizeof(DOT11_CURRENT_OPERATION_MODE)); } // - // DDK: The NIC shall clear privacy exemption list on every reset + // DDK: The NIC shall clear privacy exemption list on every reset // regardless of the rest requests parameters. // 2008.10.17, haich // @@ -3523,7 +3523,7 @@ N6CQuerySet_DOT11_RESET_REQUEST( // // 061204, ccw: clear key content and reset key id. - // + // if(FALSE == WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) { SecClearAllKeys(Adapter); @@ -3541,10 +3541,10 @@ N6CQuerySet_DOT11_RESET_REQUEST( // //Adapter->HalFunc.EnableHWSecCfgHandler(Adapter); - // Reset network type. + // Reset network type. pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; - // Reset Bsssid. + // Reset Bsssid. PlatformZeroMemory(pMgntInfo->Bssid, sizeof(pMgntInfo->Bssid)); // 061206, rcnjko: reset managment related setting. @@ -3553,7 +3553,7 @@ N6CQuerySet_DOT11_RESET_REQUEST( if(!Adapter->bInHctTest) //workaround for Performance_ext { // cosa add for redX issue, if ssid not cleared, then in pnp wakeup we will indicate roam start - // and try to connect the ap with ssid matched, but OS don't think we should in roam state, + // and try to connect the ap with ssid matched, but OS don't think we should in roam state, // so it will request wifi to do scan, the scan will be returned then OS later query scan list will be empty. => redX. pMgntInfo->bScanOnly = TRUE; //Set SSID as dummy to stop the current join process. @@ -3561,18 +3561,18 @@ N6CQuerySet_DOT11_RESET_REQUEST( } ResetRxStatistics(Adapter); ResetTxStatistics(Adapter); - Adapter->RxStats.QueryAfterFirstReset =1; + Adapter->RxStats.QueryAfterFirstReset =1; pMgntInfo->bResetInProgress = FALSE; - + }while(FALSE); - + // - // After reset completed, return the status indication. The miniport driver must not set the value + // After reset completed, return the status indication. The miniport driver must not set the value // of the BytesWritten member of the OidRequest parameter, such set operation has been removed by me, 2014.05.02. - // + // PlatformZeroMemory(pDot11StatusIndication, sizeof(DOT11_STATUS_INDICATION)); pDot11StatusIndication->uStatusType = DOT11_STATUS_RESET_CONFIRM; - pDot11StatusIndication->ndisStatus = ndisStatus; + pDot11StatusIndication->ndisStatus = ndisStatus; *BytesRead = sizeof(DOT11_RESET_REQUEST); *BytesWritten = sizeof(DOT11_STATUS_INDICATION); @@ -3606,46 +3606,46 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( *BytesWritten = 0; *BytesNeeded = 0; - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("[REDX]: N6CQuerySet_DOT11_ENUM_BSS_LIST() ===> \n")); - + if ( OutputBufferLength < (ULONG)FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer) ) { *BytesNeeded = sizeof(DOT11_BYTE_ARRAY); - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("[REDX]: N6CQuerySet_DOT11_ENUM_BSS_LIST() <===, return by NDIS_STATUS_BUFFER_OVERFLOW \n")); return NDIS_STATUS_BUFFER_OVERFLOW; } if(Adapter->bDriverIsGoingToUnload || Adapter->bSurpriseRemoved) { - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("[REDX]: N6CQuerySet_DOT11_ENUM_BSS_LIST() <===, return by bDriverIsGoingToUnload=%d, bSurpriseRemoved=%d\n", Adapter->bDriverIsGoingToUnload, Adapter->bSurpriseRemoved)); - return NDIS_STATUS_FAILURE; + return NDIS_STATUS_FAILURE; } // Check if media is in use. 2006.11.21, by shien chang. // Comment out by Bruce, 2009-03-16. - // We have protected the query list by RT_SCAN_SPIN_LOCK. Thus, the list shall be + // We have protected the query list by RT_SCAN_SPIN_LOCK. Thus, the list shall be // returned, otherwise the scan list prompted on vista UI would be empty. // if ( pNdisCommon->bToIndicateScanComplete ) // { // return NDIS_STATUS_DOT11_MEDIA_IN_USE; // } - + N6_ASSIGN_OBJECT_HEADER( pByteArray->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_BSS_ENTRY_BYTE_ARRAY_REVISION_1, sizeof(DOT11_BYTE_ARRAY)); - + if (pNdisCommon->KeepDisconnectFlag) { pByteArray->uNumOfBytes = 0; pByteArray->uTotalNumOfBytes = 0; *BytesWritten = FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer); - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("[REDX]: N6CQuerySet_DOT11_ENUM_BSS_LIST() <===, return by KeepDisconnectFlag\n")); return NDIS_STATUS_SUCCESS; } @@ -3655,7 +3655,7 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( pByteArray->uNumOfBytes = 0; pByteArray->uTotalNumOfBytes = 0; *BytesWritten = FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer); - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("[REDX]: N6CQuerySet_DOT11_ENUM_BSS_LIST() <===, return by RT_AP_TYPE_IBSS_EMULATED\n")); return NDIS_STATUS_SUCCESS; } @@ -3664,8 +3664,8 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( RtBssList.NumberOfItems = 0; RtBssList.pbssidentry = Adapter->bssDescList; - - + + MgntActQuery_802_11_BSSID_LIST(Adapter, &RtBssList, FALSE); pDot11BssEntry = (PDOT11_BSS_ENTRY)(pByteArray->ucBuffer); @@ -3678,7 +3678,7 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( // //To avoid pass the IE length is 0, Maddest 20081217 // - if(RtBssList.pbssidentry[i].IE.Length <= sizeof(RT_FIXED_IE_FIELD)) + if(RtBssList.pbssidentry[i].IE.Length <= sizeof(RT_FIXED_IE_FIELD)) { continue; } @@ -3693,12 +3693,12 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( // Because NDIS6 define that IE starts from variable field, so we need minus // fixed field. - BssEntryLength = pRtBss->IE.Length - sizeof(RT_FIXED_IE_FIELD) + + BssEntryLength = pRtBss->IE.Length - sizeof(RT_FIXED_IE_FIELD) + FIELD_OFFSET(DOT11_BSS_ENTRY, ucBuffer); #if (WPS_SUPPORT == 1) BssEntryLength += (pRtBss->osBeaconWcnIe.Length + pRtBss->osProbeRspWcnIe.Length); -#endif +#endif pDot11SsidElement = (PDOT11_INFO_ELEMENT)(pRtBss->IE.Octet +sizeof(RT_FIXED_IE_FIELD)); @@ -3734,7 +3734,7 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( skiplength = Dot11Ie.Content.Length; if(skiplength != 0) { - RT_ASSERT(BssEntryLength >= (ULONG)(skiplength + 2), ("invalid length BssEntryLength %d skiplength %d", BssEntryLength, skiplength)); + RT_ASSERT(BssEntryLength >= (ULONG)(skiplength + 2), ("invalid length BssEntryLength %d skiplength %d", BssEntryLength, skiplength)); BssEntryLength = BssEntryLength - skiplength - 2; } continue; @@ -3745,18 +3745,18 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( #endif } } - + // // 20090508 Joseph: Revise size checking. // Since the type of variable "BssEntryLength" is "u4Byte", it is always ">=0". Also, according to the // caculation of "BssEntryLength", it is always ">0". We do not need to check "if(BssEntryLength<=0)" case. //if(BssEntryLength <= 0) // continue; - + RT_PRINT_ADDR(COMP_SCAN, DBG_LOUD, "N6CQuerySet_DOT11_ENUM_BSS_LIST(): new Bss BSSID:", pRtBss->bdBssIdBuf); - RT_PRINT_STR(COMP_SCAN, DBG_LOUD, "N6CQuerySet_DOT11_ENUM_BSS_LIST(): new Bss SSID:", pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen); - - pByteArray->uTotalNumOfBytes += BssEntryLength; + RT_PRINT_STR(COMP_SCAN, DBG_LOUD, "N6CQuerySet_DOT11_ENUM_BSS_LIST(): new Bss SSID:", pRtBss->bdSsIdBuf, pRtBss->bdSsIdLen); + + pByteArray->uTotalNumOfBytes += BssEntryLength; if ((RemainingBytes >= BssEntryLength) && (RemainingBytes > 0)) { pByteArray->uNumOfBytes += BssEntryLength; @@ -3765,7 +3765,7 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( // Copy the BSS Entry. PlatformZeroMemory(pDot11BssEntry, BssEntryLength); N6CTranslateRtBssToDot11Bss(Adapter, pDot11BssEntry, pRtBss); - + // // Copy the hidden ssid // @@ -3778,7 +3778,7 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( ndisStatus = FillHiddenSSIDinIE(Adapter, pDot11BssEntry, pRtBss); } */ - + pDot11BssEntry = (PDOT11_BSS_ENTRY)(((pu1Byte)pDot11BssEntry) + BssEntryLength); } else @@ -3787,13 +3787,13 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( ndisStatus = NDIS_STATUS_BUFFER_OVERFLOW; } - + } *BytesWritten = pByteArray->uNumOfBytes + FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer); *BytesNeeded = pByteArray->uTotalNumOfBytes + FIELD_OFFSET(DOT11_BYTE_ARRAY, ucBuffer); - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("[REDX]: N6CQuerySet_DOT11_ENUM_BSS_LIST() <===, ndisStatus=0x%x\n", ndisStatus)); return ndisStatus; } @@ -3802,7 +3802,7 @@ N6CQuerySet_DOT11_ENUM_BSS_LIST( // Description: // Set the access multicast address list of MAC. // Arguments: -// Adapter - +// Adapter - // NIC adapter context. // MCListbuf - // Multicast address list. @@ -3826,14 +3826,14 @@ N6CSet_DOT11_MULTICAST_LIST( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - + *BytesRead = 0; *BytesNeeded = sizeof(DOT11_MAC_ADDRESS); - if(InputBufferLength % sizeof(DOT11_MAC_ADDRESS)) + if(InputBufferLength % sizeof(DOT11_MAC_ADDRESS)) { - RT_TRACE(COMP_OID_SET, DBG_WARNING, ("N6CSet_DOT11_MULTICAST_LIST(): not a multiple of sizeof(DOT11_MAC_ADDRESS)!\n")); + RT_TRACE(COMP_OID_SET, DBG_WARNING, ("N6CSet_DOT11_MULTICAST_LIST(): not a multiple of sizeof(DOT11_MAC_ADDRESS)!\n")); ndisStatus = NDIS_STATUS_INVALID_LENGTH; return ndisStatus; } @@ -3856,7 +3856,7 @@ N6CSet_DOT11_MULTICAST_LIST( InformationBuffer, InputBufferLength, (BOOLEAN)(pNdisCommon->NdisPacketFilter & NDIS_PACKET_TYPE_ALL_MULTICAST)); - + return ndisStatus; } @@ -3866,12 +3866,12 @@ N6C_OID_DOT11_NIC_POWER_STATE( PNDIS_OID_REQUEST NdisRequest) { // - // Power state OID is phy specific, not port specific. Miniport driver should ignore the port number + // Power state OID is phy specific, not port specific. Miniport driver should ignore the port number // on this OID and only use the current phy id. - // If miniport supports the functionality of multiple MAC entities through virtualization - // the property msDot11NICPowerState should apply to the same PHY on ALL such MAC entities. - // If the OS enables or disables a PHY through a set OID call on one of the MAC entities, - // the miniport should apply that on the same PHY on all virtualized MAC entities and send appropriate + // If miniport supports the functionality of multiple MAC entities through virtualization + // the property msDot11NICPowerState should apply to the same PHY on ALL such MAC entities. + // If the OS enables or disables a PHY through a set OID call on one of the MAC entities, + // the miniport should apply that on the same PHY on all virtualized MAC entities and send appropriate // NDIS_STATUS_DOT11_PHY_STATE_CHANGED indications for all the MAC state entities (physical and virtual). // NDIS_STATUS ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -3897,9 +3897,9 @@ N6C_OID_DOT11_NIC_POWER_STATE( else if(NdisRequest->RequestType == NdisRequestSetInformation) // set default port power state { BOOLEAN bRfOn = *((PBOOLEAN)NdisRequest->DATA.SET_INFORMATION.InformationBuffer); - + NdisRequest->DATA.SET_INFORMATION.BytesNeeded = sizeof(BOOLEAN); - + if( NdisRequest->DATA.SET_INFORMATION.InformationBufferLength < NdisRequest->DATA.SET_INFORMATION.BytesNeeded) { ndisStatus = NDIS_STATUS_INVALID_LENGTH; @@ -3909,18 +3909,18 @@ N6C_OID_DOT11_NIC_POWER_STATE( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("OID_DOT11_NIC_POWER_STATE: bRFOn(%d)\n", bRfOn)); ndisStatus = N6CSet_DOT11_NIC_POWER_STATE( - pDefaultAdapter, - pDefaultAdapter->pNdisCommon->PendedRequest, + pDefaultAdapter, + pDefaultAdapter->pNdisCommon->PendedRequest, bRfOn ); } } - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DESIRED_PHY_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3931,7 +3931,7 @@ N6C_SET_OID_DOT11_DESIRED_PHY_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -3945,11 +3945,11 @@ N6C_SET_OID_DOT11_DESIRED_PHY_LIST( BytesRead, BytesNeeded ); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_AUTO_CONFIG_ENABLED( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3961,7 +3961,7 @@ N6C_SET_OID_DOT11_AUTO_CONFIG_ENABLED( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; u4Byte tempAutoConfigEnable = 0; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -3978,13 +3978,13 @@ N6C_SET_OID_DOT11_AUTO_CONFIG_ENABLED( tempAutoConfigEnable=ALLOWED_AUTO_CONFIG_FLAGS & *((PULONG)InformationBuffer); pTargetAdapter->pNdisCommon->dot11AutoConfigEnabled = tempAutoConfigEnable; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<===Set AP mode OID_DOT11_AUTO_CONFIG_ENABLED:\n")); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_BEACON_PERIOD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -3996,7 +3996,7 @@ N6C_SET_OID_DOT11_BEACON_PERIOD( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; u2Byte u2BcnIntv = 0; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4014,13 +4014,13 @@ N6C_SET_OID_DOT11_BEACON_PERIOD( u2BcnIntv = *((pu2Byte)InformationBuffer); pTargetAdapter->pNdisCommon->RegBeaconPeriod = u2BcnIntv; - MgntActSet_802_11_BeaconInterval(pTargetAdapter, u2BcnIntv); + MgntActSet_802_11_BeaconInterval(pTargetAdapter, u2BcnIntv); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<===Set AP mode OID_DOT11_BEACON_PERIOD:\n")); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DTIM_PERIOD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4032,7 +4032,7 @@ N6C_SET_OID_DOT11_DTIM_PERIOD( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; u1Byte u1DtimPeriod = 0; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4052,11 +4052,11 @@ N6C_SET_OID_DOT11_DTIM_PERIOD( pTargetAdapter->pNdisCommon->RegDtimPeriod = u1DtimPeriod; MgntActSet_802_11_DtimPeriod(pTargetAdapter, u1DtimPeriod); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<===Set AP mode OID_DOT11_DTIM_PERIOD:\n")); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DESIRED_SSID_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4067,7 +4067,7 @@ N6C_SET_OID_DOT11_DESIRED_SSID_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4093,7 +4093,7 @@ N6C_SET_OID_DOT11_DESIRED_SSID_LIST( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4106,7 +4106,7 @@ N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; ULONG PacketFilter = 0; PULONG localInformationBuffer = (PULONG)InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4123,7 +4123,7 @@ N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( PacketFilter = NIC_SUPPORTED_FILTERS; *BytesRead = InformationBufferLength; - + if( InformationBufferLength == sizeof(ULONG) ) { PacketFilter = *(PULONG)InformationBuffer; @@ -4143,7 +4143,7 @@ N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( // if(!pTargetAdapter->MgntInfo.bNetMonitorMode) { - PacketFilter &= ~(NDIS_PACKET_TYPE_PROMISCUOUS | + PacketFilter &= ~(NDIS_PACKET_TYPE_PROMISCUOUS | NDIS_PACKET_TYPE_802_11_RAW_DATA | NDIS_PACKET_TYPE_802_11_PROMISCUOUS_MGMT | NDIS_PACKET_TYPE_802_11_RAW_MGMT); @@ -4174,17 +4174,17 @@ N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( if( (PacketFilter & NIC_SUPPORTED_FILTERS) == 0 ) { - ndisStatus=NDIS_STATUS_INVALID_DATA; + ndisStatus=NDIS_STATUS_INVALID_DATA; return ndisStatus; } - + if( pTargetAdapter->pNdisCommon->NdisPacketFilter == PacketFilter ) { ndisStatus = NDIS_STATUS_SUCCESS; return ndisStatus; } - if( PacketFilter & + if( PacketFilter & (NDIS_PACKET_TYPE_ALL_MULTICAST |NDIS_PACKET_TYPE_PROMISCUOUS ) ) { @@ -4195,16 +4195,16 @@ N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( } { - PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); - pTargetAdapter->pNdisCommon->NdisPacketFilter = PacketFilter| + PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); + pTargetAdapter->pNdisCommon->NdisPacketFilter = PacketFilter| pMgntInfo->RegPktIndicate; } - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_CURRENT_CHANNEL( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4217,7 +4217,7 @@ N6C_SET_OID_DOT11_CURRENT_CHANNEL( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; u1Byte btChannel = 0; PMGNT_INFO pDefaultMgntInfo = GetDefaultMgntInfo(pTargetAdapter); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4264,7 +4264,7 @@ N6C_SET_OID_DOT11_CURRENT_CHANNEL( ndisStatus = NDIS_STATUS_INVALID_DATA; return ndisStatus; } - + if (MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH(pTargetAdapter, (u1Byte)(*(PULONG)InformationBuffer)) != TRUE) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("!!! Failed to switch to the channel, %d\n", btChannel)); @@ -4274,7 +4274,7 @@ N6C_SET_OID_DOT11_CURRENT_CHANNEL( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DISCONNECT_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4286,7 +4286,7 @@ N6C_SET_OID_DOT11_DISCONNECT_REQUEST( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; u4Byte id = 0; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4295,10 +4295,10 @@ N6C_SET_OID_DOT11_DISCONNECT_REQUEST( // - // We should reset PHY ready status if WiFi status was changed for this PHY ID, + // We should reset PHY ready status if WiFi status was changed for this PHY ID, // Using uNumOfEntries for Dot11SupportedPhyTypes instead, added by Roger, 2013.08.29. - // - for (id = 0; id < pTargetAdapter->pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries; ++id) + // + for (id = 0; id < pTargetAdapter->pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries; ++id) pTargetAdapter->pNdis62Common->bIsDot11PhyIdSet[id] = FALSE; pTargetAdapter->pNdis62Common->bDot11SetPhyIdReady = TRUE; @@ -4316,7 +4316,7 @@ N6C_SET_OID_DOT11_DISCONNECT_REQUEST( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_CONNECT_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4327,7 +4327,7 @@ N6C_SET_OID_DOT11_CONNECT_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4348,7 +4348,7 @@ N6C_SET_OID_DOT11_CONNECT_REQUEST( } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_GEN_LINK_PARAMETERS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4359,17 +4359,17 @@ N6C_SET_OID_GEN_LINK_PARAMETERS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; FunctionIn(COMP_MLME); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_SAFE_MODE_ENABLED( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4404,7 +4404,7 @@ N6C_SET_OID_DOT11_SAFE_MODE_ENABLED( } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_CURRENT_PHY_ID( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4416,7 +4416,7 @@ N6C_SET_OID_DOT11_CURRENT_PHY_ID( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; ULONG PhyId = *(PULONG)InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4442,7 +4442,7 @@ N6C_SET_OID_DOT11_CURRENT_PHY_ID( } // If PHY IDs are not already set for all number of entries we indicate before - + pTargetAdapter->pNdis62Common->bIsDot11PhyIdSet[PhyId] = TRUE; if (PhyId == 0) { @@ -4459,7 +4459,7 @@ N6C_SET_OID_DOT11_CURRENT_PHY_ID( return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_ENABLE_WAKE_UP( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4471,21 +4471,21 @@ N6C_SET_OID_PNP_ENABLE_WAKE_UP( { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; ULONG PhyId = *(PULONG)InformationBuffer; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; // NDIS notify us we shall set up HW to support WOL feature. - // Since we will schedule workitem in OID_PNP_SET_POWER, all HW setting + // Since we will schedule workitem in OID_PNP_SET_POWER, all HW setting // will be done there. 2006.09.19, by rcnjko. RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_PNP_ENABLE_WAKE_UP(%#X)\n", *((PULONG)InformationBuffer))); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4496,20 +4496,20 @@ N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - NDIS_PM_PACKET_PATTERN PMPacketPattern = *((PNDIS_PM_PACKET_PATTERN)InformationBuffer); - + NDIS_PM_PACKET_PATTERN PMPacketPattern = *((PNDIS_PM_PACKET_PATTERN)InformationBuffer); + u1Byte WoLBitMapPatternMask[MAX_WOL_BIT_MASK_SIZE]; u1Byte WoLBitMapPatternContent[MAX_WOL_PATTERN_SIZE]; int Index; PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PRT_PM_WOL_PATTERN_INFO pPmWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; - + PlatformZeroMemory(WoLBitMapPatternMask, sizeof(WoLBitMapPatternMask)); PlatformZeroMemory(WoLBitMapPatternContent, sizeof(WoLBitMapPatternContent)); @@ -4517,18 +4517,18 @@ N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( FunctionIn(COMP_OID_SET); if(PMPacketPattern.MaskSize <= MAX_WOL_BIT_MASK_SIZE) { - PlatformMoveMemory(WoLBitMapPatternMask, (PNDIS_PM_PACKET_PATTERN)InformationBuffer+1, PMPacketPattern.MaskSize); - RT_PRINT_DATA( (COMP_OID_SET|COMP_POWER), DBG_LOUD, ("SET OID_PNP_ADD_WAKE_UP_PATTERN Mask: "), + PlatformMoveMemory(WoLBitMapPatternMask, (PNDIS_PM_PACKET_PATTERN)InformationBuffer+1, PMPacketPattern.MaskSize); + RT_PRINT_DATA( (COMP_OID_SET|COMP_POWER), DBG_LOUD, ("SET OID_PNP_ADD_WAKE_UP_PATTERN Mask: "), WoLBitMapPatternMask, PMPacketPattern.MaskSize); - } + } if(PMPacketPattern.PatternSize <= MAX_WOL_PATTERN_SIZE) { PlatformMoveMemory(WoLBitMapPatternContent, (pu1Byte)InformationBuffer+PMPacketPattern.PatternOffset, PMPacketPattern.PatternSize); - RT_PRINT_DATA( (COMP_OID_SET|COMP_POWER), DBG_LOUD, ("SET OID_PNP_ADD_WAKE_UP_PATTERN Pattern: "), + RT_PRINT_DATA( (COMP_OID_SET|COMP_POWER), DBG_LOUD, ("SET OID_PNP_ADD_WAKE_UP_PATTERN Pattern: "), WoLBitMapPatternContent, PMPacketPattern.PatternSize); } - + //Find the index of the first empty entry. for(Index=0; Index= MAX_SUPPORT_WOL_PATTERN_NUM(pTargetAdapter)) { ndisStatus = NDIS_STATUS_RESOURCES; RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("SET OID_PNP_ADD_WAKE_UP_PATTERN: Return status(%#X). The number of wake up pattern is more than %d or the pattern Id is exist.\n", + ("SET OID_PNP_ADD_WAKE_UP_PATTERN: Return status(%#X). The number of wake up pattern is more than %d or the pattern Id is exist.\n", ndisStatus, MAX_SUPPORT_WOL_PATTERN_NUM(pTargetAdapter))); return ndisStatus; @@ -4576,39 +4576,39 @@ N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( pPmWoLPatternInfo[Index].PatternType = eDontCareDA; } //DbgPrint("PatternType = %d\n", pPmWoLPatternInfo[Index].PatternType); - + // We use the PatternSize to replace PatternId because N5/N6 does not content PatternId. pPmWoLPatternInfo[Index].PatternId = PMPacketPattern.PatternSize; pPmWoLPatternInfo[Index].IsUserDefined = 0; - if(pPmWoLPatternInfo[Index].PatternType == eUnicastPattern) + if(pPmWoLPatternInfo[Index].PatternType == eUnicastPattern) { // To wake up by any packet which DA is our MAC addr. BOOLEAN bUWF = TRUE; - - //pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_IS_MAC_ADDR, (pu1Byte)(&bUWF)); + + //pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_IS_MAC_ADDR, (pu1Byte)(&bUWF)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("OID_PNP_ADD_WAKE_UP_PATTERN: Set HW to wake up for any packet which DA is our MAC addr.\n")); } else { - GetWOLWakeUpPattern(pTargetAdapter, - (pu1Byte)&WoLBitMapPatternMask, - PMPacketPattern.MaskSize, - (pu1Byte)&WoLBitMapPatternContent, + GetWOLWakeUpPattern(pTargetAdapter, + (pu1Byte)&WoLBitMapPatternMask, + PMPacketPattern.MaskSize, + (pu1Byte)&WoLBitMapPatternContent, PMPacketPattern.PatternSize, (u1Byte)Index, FALSE); - - pPSC->WoLPatternNum++; + + pPSC->WoLPatternNum++; } } RT_PRINT_DATA( (COMP_OID_SET|COMP_POWER), DBG_TRACE, ("SET OID_PNP_ADD_WAKE_UP_PATTERN: "), InformationBuffer , InformationBufferLength); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4624,7 +4624,7 @@ N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( PMGNT_INFO pMgntInfo = &(pTargetAdapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); PRT_PM_WOL_PATTERN_INFO pPmWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]); - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4649,16 +4649,16 @@ N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( pPmWoLPatternInfo[Index].CrcRemainder = 0xffff; pPmWoLPatternInfo[Index].IsPatternMatch = 0; pPmWoLPatternInfo[Index].IsSupportedByFW = 0; - - pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); - pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); + + pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index)); + pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index)); pPmWoLPatternInfo[Index].HwWFMIndex = 0xff; // reset the value after clear HW/CAM entry. - + if(PMPacketPattern.PatternSize == 0x1) { BOOLEAN bUWF=FALSE; - pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_IS_MAC_ADDR, (pu1Byte)(&bUWF)); + pTargetAdapter->HalFunc.SetHwRegHandler(pTargetAdapter, HW_VAR_WF_IS_MAC_ADDR, (pu1Byte)(&bUWF)); } else { @@ -4667,12 +4667,12 @@ N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( } RT_PRINT_DATA( (COMP_OID_QUERY|COMP_POWER), DBG_LOUD, ("SET OID_PNP_REMOVE_WAKE_UP_PATTERN: "), InformationBuffer , InformationBufferLength); - + return ndisStatus; } -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_SET_POWER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -4683,7 +4683,7 @@ N6C_SET_OID_PNP_SET_POWER( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - + // Output variables (Currently no use) *BytesRead = 0; *BytesNeeded = 0; @@ -4697,6 +4697,6 @@ N6C_SET_OID_PNP_SET_POWER( BytesNeeded, BytesRead ); - + return ndisStatus; } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.h b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.h index 52bf773b2..519e76e3e 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_OidSet.h @@ -27,7 +27,7 @@ N6CSet_DOT11_ENABLED_AUTHENTICATION_ALGORITHM( // Name : N6CSet_DOT11_AUTHENTICATION_ALOGORITHM -// Function : +// Function : // Set Authentication alg //Input : // AlgorithmId : open , shared ,wpa ,wpa-psk, rsna,rsna-psk @@ -48,7 +48,7 @@ N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( // Name : N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM -// Function : +// Function : // Set Unicase chiper alg //Input : // AlgorithmId : none ,wep40 ,wep104 ,tkip ,aes. @@ -68,7 +68,7 @@ N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( ); // Name : N6CSet_DOT11_MULTICAST_CIPHER_ALGORITHM -// Function : +// Function : // Set Unicase chiper alg //Input : // AlgorithmId : none ,wep40 ,wep104 ,tkip ,aes. @@ -248,7 +248,7 @@ N6CQuerySet_DOT11_RESET_REQUEST( OUT PULONG BytesRead, OUT PULONG BytesNeeded ); - + NDIS_STATUS N6CQuerySet_DOT11_ENUM_BSS_LIST( IN PADAPTER Adapter, @@ -274,7 +274,7 @@ N6C_OID_DOT11_NIC_POWER_STATE( PNDIS_OID_REQUEST NdisRequest); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DESIRED_PHY_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -284,7 +284,7 @@ N6C_SET_OID_DOT11_DESIRED_PHY_LIST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_AUTO_CONFIG_ENABLED( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -294,7 +294,7 @@ N6C_SET_OID_DOT11_AUTO_CONFIG_ENABLED( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_BEACON_PERIOD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -304,7 +304,7 @@ N6C_SET_OID_DOT11_BEACON_PERIOD( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DTIM_PERIOD( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -314,7 +314,7 @@ N6C_SET_OID_DOT11_DTIM_PERIOD( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DESIRED_SSID_LIST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -324,7 +324,7 @@ N6C_SET_OID_DOT11_DESIRED_SSID_LIST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -334,7 +334,7 @@ N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_CURRENT_CHANNEL( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -344,7 +344,7 @@ N6C_SET_OID_DOT11_CURRENT_CHANNEL( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_DISCONNECT_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -354,7 +354,7 @@ N6C_SET_OID_DOT11_DISCONNECT_REQUEST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_CONNECT_REQUEST( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -364,7 +364,7 @@ N6C_SET_OID_DOT11_CONNECT_REQUEST( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_GEN_LINK_PARAMETERS( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -374,7 +374,7 @@ N6C_SET_OID_GEN_LINK_PARAMETERS( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_SAFE_MODE_ENABLED( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -384,7 +384,7 @@ N6C_SET_OID_DOT11_SAFE_MODE_ENABLED( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_DOT11_CURRENT_PHY_ID( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -394,7 +394,7 @@ N6C_SET_OID_DOT11_CURRENT_PHY_ID( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_ENABLE_WAKE_UP( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -404,7 +404,7 @@ N6C_SET_OID_PNP_ENABLE_WAKE_UP( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -414,7 +414,7 @@ N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, @@ -424,7 +424,7 @@ N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( OUT PULONG BytesNeeded ); -NDIS_STATUS +NDIS_STATUS N6C_SET_OID_PNP_SET_POWER( IN PADAPTER pTargetAdapter, IN NDIS_OID Oid, diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Oids.c b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Oids.c index d6d115bca..4ff7966ab 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Oids.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Oids.c @@ -106,7 +106,7 @@ static NDIS_OID NICSupportedOids[] = //OID_DOT11_MULTI_DOMAIN_CAPABILITY, //OID_DOT11_SUPPORTED_COUNTRY_OR_REGION_STRING, //OID_DOT11_DESIRED_COUNTRY_OR_REGION_STRING, - + // ----- IHV ----- OID_DOT11_CURRENT_CHANNEL, // SC -- SC-OK OID_DOT11_CCA_MODE_SUPPORTED, @@ -119,7 +119,7 @@ static NDIS_OID NICSupportedOids[] = OID_DOT11_SUPPORTED_TX_ANTENNA, // tbi OID_DOT11_SUPPORTED_RX_ANTENNA, // tbi OID_DOT11_DIVERSITY_SELECTION_RX, // Rcnjko - OID_DOT11_SUPPORTED_DATA_RATES_VALUE, // Rcnjko + OID_DOT11_SUPPORTED_DATA_RATES_VALUE, // Rcnjko OID_DOT11_RF_USAGE, OID_DOT11_MAX_MAC_ADDRESS_STATES, OID_DOT11_MULTI_DOMAIN_CAPABILITY_IMPLEMENTED, // return not support @@ -168,7 +168,7 @@ static NDIS_OID NICSupportedOids[] = // Set OID_DOT11_SCAN_REQUEST, // OK OID_DOT11_RESET_REQUEST, // OK - + // (Set) simple native wifi ? OID_DOT11_ENUM_BSS_LIST, // OK OID_DOT11_FLUSH_BSS_LIST, // OK -- SC-OK @@ -187,15 +187,15 @@ static NDIS_OID NICSupportedOids[] = OID_DOT11_DTIM_PERIOD, // dot11DTIMPeriod OID_DOT11_AVAILABLE_CHANNEL_LIST, // msDot11AvailableChannelList OID_DOT11_AVAILABLE_FREQUENCY_LIST, // msDot11AvailableFrequencyList - OID_DOT11_ENUM_PEER_INFO, - OID_DOT11_DISASSOCIATE_PEER_REQUEST, + OID_DOT11_ENUM_PEER_INFO, + OID_DOT11_DISASSOCIATE_PEER_REQUEST, //OID_DOT11_PORT_STATE_NOTIFICATION, OID_DOT11_INCOMING_ASSOCIATION_DECISION, OID_DOT11_ADDITIONAL_IE, OID_DOT11_WPS_ENABLED, OID_DOT11_START_AP_REQUEST, // OID_DOT11_AP_BEACON_MODE, - + // Virtual WiFi specifc OIDs OID_DOT11_CREATE_MAC, OID_DOT11_DELETE_MAC, @@ -218,13 +218,13 @@ static NDIS_OID NICSupportedOids[] = // Wifi Direct Support: From // Format: ((0x0E000000U) | ((T) << 16) | ((M) << 8) | (SN)) - // T: + // T: // NWF_WFD_DEVICE_OID or NWF_WFD_ROLE_OID - // M: + // M: // NWF_MANDATORY_OID or NWF_OPTIONAL_OID - + // Device OIDs: NWF_WFD_DEVICE_OID and NWF_MANDATORY_OID (some will be accepted by the role port) - OID_DOT11_WFD_DEVICE_CAPABILITY, + OID_DOT11_WFD_DEVICE_CAPABILITY, OID_DOT11_WFD_GROUP_OWNER_CAPABILITY, OID_DOT11_WFD_DEVICE_INFO, OID_DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST, @@ -286,29 +286,29 @@ N6CDirectOidRequest( ) /*++ - MiniportDirectOidRequest is an optional function. A miniport driver registers this function - if it handles direct OID requests. A driver specifies the MiniportDirectOidRequest entry - point when it calls the NdisMRegisterMiniportDriver function. A miniport driver that registers + MiniportDirectOidRequest is an optional function. A miniport driver registers this function + if it handles direct OID requests. A driver specifies the MiniportDirectOidRequest entry + point when it calls the NdisMRegisterMiniportDriver function. A miniport driver that registers the MiniportCancelDirectOidRequest function must also register MiniportDirectOidRequest. - NDIS calls the MiniportDirectOidRequest function either on its own behalf or on behalf of - a bound protocol driver that called the NdisDirectOidRequest function. Miniport drivers - should examine the request that is supplied at the OidRequest parameter and take the + NDIS calls the MiniportDirectOidRequest function either on its own behalf or on behalf of + a bound protocol driver that called the NdisDirectOidRequest function. Miniport drivers + should examine the request that is supplied at the OidRequest parameter and take the action requested. - Note that NDIS does not validate the OID-specific contents at OidRequest. Therefore, - the driver itself must validate these contents. If the driver determines that the value to + Note that NDIS does not validate the OID-specific contents at OidRequest. Therefore, + the driver itself must validate these contents. If the driver determines that the value to be set is out of bounds, it should fail the request and return NDIS_STATUS_INVALID_DATA. - NDIS does not serialize requests that it sends to MiniportDirectOidRequest with other OID - requests. The miniport driver must be able to handle multiple calls to MiniportDirectOidRequest - when other requests that are sent to MiniportOidRequest or MiniportDirectOidRequest are + NDIS does not serialize requests that it sends to MiniportDirectOidRequest with other OID + requests. The miniport driver must be able to handle multiple calls to MiniportDirectOidRequest + when other requests that are sent to MiniportOidRequest or MiniportDirectOidRequest are outstanding. NDIS calls MiniportDirectOidRequest at IRQL <= DISPATCH_LEVEL. - + --*/ -{ +{ PADAPTER Adapter = (PADAPTER)MiniportAdapterContext; u2Byte i = 0; NDIS_STATUS ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -324,7 +324,7 @@ N6CDirectOidRequest( { ndisStatus = N6CProcessOidRequest(Adapter, NdisRequest, FALSE); } - + RT_ASSERT(ndisStatus != NDIS_STATUS_PENDING, ("N6CDirectOidRequest(): There is no pending OID handler!! (%x)\n", NdisRequest->DATA.QUERY_INFORMATION.Oid)); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== N6PciDirectOidRequest(): %u.\n", ndisStatus)); @@ -369,7 +369,7 @@ N6C_METHOD_OID_DOT11_RESET_REQUEST( RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("Port = %d, PortType = %d\n", pTargetAdapter->pNdis62Common->PortNumber, pTargetAdapter->pNdis62Common->PortType)); - + pTargetNdis62Common->CurrentOpState = INIT_STATE; { @@ -379,7 +379,7 @@ N6C_METHOD_OID_DOT11_RESET_REQUEST( #endif if(currentRole != P2P_NONE) - { + { ndisStatus = N63CResetWifiDirectPorts(pTargetAdapter, currentRole, RESET_LEVEL_P2P_ONLY); } @@ -388,7 +388,7 @@ N6C_METHOD_OID_DOT11_RESET_REQUEST( if(pMgntInfo->bSupportPacketCoalescing) N6FulshD0CoalescingQueue(pTargetAdapter, TRUE, FALSE); - + } if(pTargetNdis62Common->PortType == EXTAP_PORT || currentRole == P2P_GO) @@ -419,7 +419,7 @@ N6C_METHOD_OID_DOT11_RESET_REQUEST( FunctionOut(COMP_OID_SET); return ndisStatus; -} +} NDIS_STATUS N6CValidateOIDCorrectness( @@ -432,7 +432,7 @@ N6CValidateOIDCorrectness( NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; ndisStatus = NDIS_STATUS_SUCCESS; - + return ndisStatus; } @@ -443,7 +443,7 @@ N6C_OID_DOT11_RESET_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -451,17 +451,17 @@ N6C_OID_DOT11_RESET_REQUEST( RT_TRACE(COMP_MLME, DBG_LOUD, ("=====>N6C_DOT11_RESET_REQUEST()\n")); RT_SET_DRV_STATE(pAdapter, DrvStateResetting); - + do { - // This should be updated to fit the state - + // This should be updated to fit the state + // Validate if the OID is issued in the correct state and mode //ndisStatus = n63cValidateOIDCorrectness(pAdapter, NdisRequest); //if(ndisStatus != NDIS_STATUS_SUCCESS) { // break; //} - + switch (NdisRequest->RequestType) { // Query @@ -469,7 +469,7 @@ N6C_OID_DOT11_RESET_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -486,7 +486,7 @@ N6C_OID_DOT11_RESET_REQUEST( NdisRequest->DATA.METHOD_INFORMATION.MethodId, (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesWritten, (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesRead, - (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.METHOD_INFORMATION.BytesNeeded ); break; @@ -496,10 +496,10 @@ N6C_OID_DOT11_RESET_REQUEST( } }while(FALSE); - + RT_CLEAR_DRV_STATE(pAdapter, DrvStateResetting); - - RT_TRACE(COMP_MLME, DBG_LOUD,("<====N6C_DOT11_RESET_REQUEST(): status=%d\n", ndisStatus)); + + RT_TRACE(COMP_MLME, DBG_LOUD,("<====N6C_DOT11_RESET_REQUEST(): status=%d\n", ndisStatus)); return ndisStatus; } @@ -525,8 +525,8 @@ N6C_OID_DOT11_CURRENT_OPERATION_MODE( WaitCnt++; if(WaitCnt>30) break; - - } + + } switch(NdisRequest->RequestType) { @@ -541,9 +541,9 @@ N6C_OID_DOT11_CURRENT_OPERATION_MODE( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + N62CChangePortTypeByOpMode( - pTargetAdapter, + pTargetAdapter, (PDOT11_CURRENT_OPERATION_MODE)NdisRequest->DATA.SET_INFORMATION.InformationBuffer );// need to check return status ?? Neo test 123 @@ -552,11 +552,11 @@ N6C_OID_DOT11_CURRENT_OPERATION_MODE( { ndisStatus = NDIS_STATUS_INVALID_STATE; } - + break; case NdisRequestQueryInformation: ndisStatus = N6CQuery_DOT11_CURRENT_OPERATION_MODE( - pTargetAdapter, + pTargetAdapter, NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, @@ -568,7 +568,7 @@ N6C_OID_DOT11_CURRENT_OPERATION_MODE( default: break; } - + return ndisStatus; } @@ -579,7 +579,7 @@ N6C_OID_DOT11_DESIRED_PHY_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -604,10 +604,10 @@ N6C_OID_DOT11_DESIRED_PHY_LIST( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_DESIRED_PHY_LIST( @@ -618,7 +618,7 @@ N6C_OID_DOT11_DESIRED_PHY_LIST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -643,7 +643,7 @@ N6C_OID_DOT11_AUTO_CONFIG_ENABLED( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -669,10 +669,10 @@ N6C_OID_DOT11_AUTO_CONFIG_ENABLED( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_AUTO_CONFIG_ENABLED( @@ -683,7 +683,7 @@ N6C_OID_DOT11_AUTO_CONFIG_ENABLED( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -708,7 +708,7 @@ N6C_OID_DOT11_BEACON_PERIOD( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -733,10 +733,10 @@ N6C_OID_DOT11_BEACON_PERIOD( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_BEACON_PERIOD( @@ -747,7 +747,7 @@ N6C_OID_DOT11_BEACON_PERIOD( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -772,7 +772,7 @@ N6C_OID_DOT11_DTIM_PERIOD( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -793,7 +793,7 @@ N6C_OID_DOT11_DTIM_PERIOD( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_DTIM_PERIOD( @@ -804,7 +804,7 @@ N6C_OID_DOT11_DTIM_PERIOD( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -829,7 +829,7 @@ N6C_OID_DOT11_DESIRED_SSID_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -854,10 +854,10 @@ N6C_OID_DOT11_DESIRED_SSID_LIST( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_DESIRED_SSID_LIST( @@ -868,7 +868,7 @@ N6C_OID_DOT11_DESIRED_SSID_LIST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -894,7 +894,7 @@ N6C_OID_GEN_CURRENT_PACKET_FILTER( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -919,10 +919,10 @@ N6C_OID_GEN_CURRENT_PACKET_FILTER( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_GEN_CURRENT_PACKET_FILTER( @@ -933,7 +933,7 @@ N6C_OID_GEN_CURRENT_PACKET_FILTER( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -958,7 +958,7 @@ N6C_OID_DOT11_CURRENT_CHANNEL( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -983,10 +983,10 @@ N6C_OID_DOT11_CURRENT_CHANNEL( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_CURRENT_CHANNEL( @@ -997,7 +997,7 @@ N6C_OID_DOT11_CURRENT_CHANNEL( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1022,7 +1022,7 @@ N6C_OID_DOT11_DISCONNECT_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1043,7 +1043,7 @@ N6C_OID_DOT11_DISCONNECT_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_DISCONNECT_REQUEST( @@ -1054,7 +1054,7 @@ N6C_OID_DOT11_DISCONNECT_REQUEST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1079,7 +1079,7 @@ N6C_OID_DOT11_CONNECT_REQUEST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1100,7 +1100,7 @@ N6C_OID_DOT11_CONNECT_REQUEST( case NdisRequestQueryStatistics: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_CONNECT_REQUEST( @@ -1111,7 +1111,7 @@ N6C_OID_DOT11_CONNECT_REQUEST( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1136,7 +1136,7 @@ N6C_OID_GEN_LINK_PARAMETERS( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1161,10 +1161,10 @@ N6C_OID_GEN_LINK_PARAMETERS( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_GEN_LINK_PARAMETERS( @@ -1175,7 +1175,7 @@ N6C_OID_GEN_LINK_PARAMETERS( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1200,7 +1200,7 @@ N6C_OID_DOT11_SAFE_MODE_ENABLED( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1225,13 +1225,13 @@ N6C_OID_DOT11_SAFE_MODE_ENABLED( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: -#if 0 +#if 0 ndisStatus = NDIS_STATUS_NOT_SUPPORTED; #else ndisStatus = N6C_SET_OID_DOT11_SAFE_MODE_ENABLED( @@ -1267,7 +1267,7 @@ N6C_OID_DOT11_CURRENT_PHY_ID( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1292,10 +1292,10 @@ N6C_OID_DOT11_CURRENT_PHY_ID( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_DOT11_CURRENT_PHY_ID( @@ -1306,7 +1306,7 @@ N6C_OID_DOT11_CURRENT_PHY_ID( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1331,7 +1331,7 @@ N6C_OID_GEN_SUPPORTED_LIST( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1356,10 +1356,10 @@ N6C_OID_GEN_SUPPORTED_LIST( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1388,7 +1388,7 @@ N6C_OID_GEN_VENDOR_DRIVER_VERSION( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1413,10 +1413,10 @@ N6C_OID_GEN_VENDOR_DRIVER_VERSION( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1445,7 +1445,7 @@ N6C_OID_PNP_CAPABILITIES( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1470,10 +1470,10 @@ N6C_OID_PNP_CAPABILITIES( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1502,7 +1502,7 @@ N6C_OID_PNP_QUERY_POWER( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1527,10 +1527,10 @@ N6C_OID_PNP_QUERY_POWER( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1558,7 +1558,7 @@ N6C_OID_PNP_ENABLE_WAKE_UP( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1583,10 +1583,10 @@ N6C_OID_PNP_ENABLE_WAKE_UP( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_PNP_ENABLE_WAKE_UP( @@ -1597,7 +1597,7 @@ N6C_OID_PNP_ENABLE_WAKE_UP( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1623,7 +1623,7 @@ N6C_OID_DOT11_CURRENT_TX_ANTENNA( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1648,10 +1648,10 @@ N6C_OID_DOT11_CURRENT_TX_ANTENNA( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1679,7 +1679,7 @@ N6C_OID_DOT11_CURRENT_RX_ANTENNA( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1704,10 +1704,10 @@ N6C_OID_DOT11_CURRENT_RX_ANTENNA( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1735,7 +1735,7 @@ N6C_OID_DOT11_SUPPORTED_RX_ANTENNA( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1760,10 +1760,10 @@ N6C_OID_DOT11_SUPPORTED_RX_ANTENNA( NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, - (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded + (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded ); break; - + // Set case NdisRequestSetInformation: ndisStatus = NDIS_STATUS_NOT_SUPPORTED; @@ -1791,7 +1791,7 @@ N6C_OID_PNP_ADD_WAKE_UP_PATTERN( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1812,7 +1812,7 @@ N6C_OID_PNP_ADD_WAKE_UP_PATTERN( case NdisRequestQueryStatistics: ndisStatus = ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_PNP_ADD_WAKE_UP_PATTERN( @@ -1823,7 +1823,7 @@ N6C_OID_PNP_ADD_WAKE_UP_PATTERN( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1849,7 +1849,7 @@ N6C_OID_PNP_REMOVE_WAKE_UP_PATTERN( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1870,7 +1870,7 @@ N6C_OID_PNP_REMOVE_WAKE_UP_PATTERN( case NdisRequestQueryStatistics: ndisStatus = ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_PNP_REMOVE_WAKE_UP_PATTERN( @@ -1881,7 +1881,7 @@ N6C_OID_PNP_REMOVE_WAKE_UP_PATTERN( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1906,7 +1906,7 @@ N6C_OID_PNP_SET_POWER( ) { NDIS_STATUS ndisStatus = NDIS_STATUS_INVALID_OID; - + // Adapter selection PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); @@ -1927,7 +1927,7 @@ N6C_OID_PNP_SET_POWER( case NdisRequestQueryStatistics: ndisStatus = ndisStatus = NDIS_STATUS_NOT_SUPPORTED; break; - + // Set case NdisRequestSetInformation: ndisStatus = N6C_SET_OID_PNP_SET_POWER( @@ -1938,7 +1938,7 @@ N6C_OID_PNP_SET_POWER( (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesRead, (PULONG)&NdisRequest->DATA.SET_INFORMATION.BytesNeeded ); - + break; // Method @@ -1966,7 +1966,7 @@ N6C_DOT11_DUMP_OID( ) { LPSTR StrBuf = ""; - + switch (Oid) { case OID_GEN_STATISTICS : StrBuf = "OID_GEN_STATISTICS"; break; @@ -2004,7 +2004,7 @@ N6C_DOT11_DUMP_OID( case OID_GEN_LINK_PARAMETERS : StrBuf = "OID_GEN_LINK_PARAMETERS"; break; case OID_GEN_NETWORK_LAYER_ADDRESSES : StrBuf = "OID_GEN_NETWORK_LAYER_ADDRESSES"; break; - + case OID_802_3_PERMANENT_ADDRESS : StrBuf = "OID_802_3_PERMANENT_ADDRESS"; break; case OID_802_3_CURRENT_ADDRESS : StrBuf = "OID_802_3_CURRENT_ADDRESS"; break; case OID_802_3_MULTICAST_LIST : StrBuf = "OID_802_3_MULTICAST_LIST"; break; @@ -2019,7 +2019,7 @@ N6C_DOT11_DUMP_OID( case OID_802_3_XMIT_HEARTBEAT_FAILURE : StrBuf = "OID_802_3_XMIT_HEARTBEAT_FAILURE"; break; case OID_802_3_XMIT_TIMES_CRS_LOST : StrBuf = "OID_802_3_XMIT_TIMES_CRS_LOST"; break; case OID_802_3_XMIT_LATE_COLLISIONS : StrBuf = "OID_802_3_XMIT_LATE_COLLISIONS"; break; -#if POWER_MAN +#if POWER_MAN case OID_PNP_CAPABILITIES : StrBuf = "OID_PNP_CAPABILITIES"; break; case OID_PNP_SET_POWER : StrBuf = "OID_PNP_SET_POWER"; break; case OID_PNP_QUERY_POWER : StrBuf = "OID_PNP_QUERY_POWER"; break; @@ -2056,12 +2056,12 @@ N6C_DOT11_DUMP_OID( case OID_DOT11_CURRENT_ADDRESS : StrBuf = "OID_DOT11_CURRENT_ADDRESS"; break; case OID_DOT11_MAC_ADDRESS : StrBuf = "OID_DOT11_MAC_ADDRESS"; break; case OID_DOT11_STATION_ID : StrBuf = "OID_DOT11_STATION_ID"; break; - + case OID_DOT11_CURRENT_CHANNEL : StrBuf = "OID_DOT11_CURRENT_CHANNEL"; break; case OID_DOT11_CCA_MODE_SUPPORTED : StrBuf = "OID_DOT11_CCA_MODE_SUPPORTED"; break; case OID_DOT11_CURRENT_CCA_MODE : StrBuf = "OID_DOT11_CURRENT_CCA_MODE"; break; case OID_DOT11_ED_THRESHOLD : StrBuf = "OID_DOT11_ED_THRESHOLD"; break; - + case OID_DOT11_CURRENT_FREQUENCY : StrBuf = "OID_DOT11_CURRENT_FREQUENCY"; break; case OID_DOT11_FREQUENCY_BANDS_SUPPORTED : StrBuf = "OID_DOT11_FREQUENCY_BANDS_SUPPORTED"; break; case OID_DOT11_REG_DOMAINS_SUPPORT_VALUE : StrBuf = "OID_DOT11_REG_DOMAINS_SUPPORT_VALUE"; break; @@ -2082,7 +2082,7 @@ N6C_DOT11_DUMP_OID( case OID_DOT11_DSSS_OFDM_OPTION_ENABLED : StrBuf = "OID_DOT11_DSSS_OFDM_OPTION_ENABLED"; break; case OID_DOT11_SHORT_SLOT_TIME_OPTION_IMPLEMENTED : StrBuf = "OID_DOT11_SHORT_SLOT_TIME_OPTION_IMPLEMENTED"; break; case OID_DOT11_SHORT_SLOT_TIME_OPTION_ENABLED : StrBuf = "OID_DOT11_SHORT_SLOT_TIME_OPTION_ENABLED"; break; - + case OID_DOT11_AUTO_CONFIG_ENABLED : StrBuf = "OID_DOT11_AUTO_CONFIG_ENABLED"; break; case OID_DOT11_POWER_MGMT_REQUEST : StrBuf = "OID_DOT11_POWER_MGMT_REQUEST"; break; case OID_DOT11_DESIRED_SSID_LIST : StrBuf = "OID_DOT11_DESIRED_SSID_LIST"; break; @@ -2127,9 +2127,9 @@ N6C_DOT11_DUMP_OID( case OID_GEN_INTERRUPT_MODERATION : StrBuf = "OID_GEN_INTERRUPT_MODERATION"; break; case OID_DOT11_CHANNEL_AGILITY_ENABLED : StrBuf = "OID_DOT11_CHANNEL_AGILITY_ENABLED"; break; case OID_DOT11_CHANNEL_AGILITY_PRESENT : StrBuf = "OID_DOT11_CHANNEL_AGILITY_PRESENT"; break; - + case OID_DOT11_ASSOCIATION_PARAMS : StrBuf = "OID_DOT11_ASSOCIATION_PARAMS"; break; - + case OID_DOT11_DTIM_PERIOD : StrBuf = "OID_DOT11_DTIM_PERIOD"; break; case OID_DOT11_AVAILABLE_CHANNEL_LIST : StrBuf = "OID_DOT11_AVAILABLE_CHANNEL_LIST"; break; case OID_DOT11_AVAILABLE_FREQUENCY_LIST : StrBuf = "OID_DOT11_AVAILABLE_FREQUENCY_LIST"; break; @@ -2139,21 +2139,21 @@ N6C_DOT11_DUMP_OID( case OID_DOT11_ADDITIONAL_IE : StrBuf = "OID_DOT11_ADDITIONAL_IE"; break; case OID_DOT11_WPS_ENABLED : StrBuf = "OID_DOT11_WPS_ENABLED"; break; case OID_DOT11_START_AP_REQUEST : StrBuf = "OID_DOT11_START_AP_REQUEST"; break; - + case OID_DOT11_CREATE_MAC : StrBuf = "OID_DOT11_CREATE_MAC"; break; case OID_DOT11_DELETE_MAC : StrBuf = "OID_DOT11_DELETE_MAC"; break; - + case OID_PM_ADD_WOL_PATTERN : StrBuf = "OID_PM_ADD_WOL_PATTERN"; break; case OID_PM_REMOVE_WOL_PATTERN : StrBuf = "OID_PM_REMOVE_WOL_PATTERN"; break; case OID_PM_PARAMETERS : StrBuf = "OID_PM_PARAMETERS"; break; case OID_PM_ADD_PROTOCOL_OFFLOAD : StrBuf = "OID_PM_ADD_PROTOCOL_OFFLOAD"; break; case OID_PM_GET_PROTOCOL_OFFLOAD : StrBuf = "OID_PM_GET_PROTOCOL_OFFLOAD"; break; - case OID_PM_REMOVE_PROTOCOL_OFFLOAD : StrBuf = "OID_PM_REMOVE_PROTOCOL_OFFLOAD"; break; + case OID_PM_REMOVE_PROTOCOL_OFFLOAD : StrBuf = "OID_PM_REMOVE_PROTOCOL_OFFLOAD"; break; case OID_RECEIVE_FILTER_SET_FILTER : StrBuf = "OID_RECEIVE_FILTER_SET_FILTER"; break; case OID_RECEIVE_FILTER_CLEAR_FILTER : StrBuf = "OID_RECEIVE_FILTER_CLEAR_FILTER"; break; - + case OID_DOT11_WFD_DEVICE_CAPABILITY : StrBuf = "OID_DOT11_WFD_DEVICE_CAPABILITY"; break; case OID_DOT11_WFD_GROUP_OWNER_CAPABILITY : StrBuf = "OID_DOT11_WFD_GROUP_OWNER_CAPABILITY"; break; case OID_DOT11_WFD_DEVICE_INFO : StrBuf = "OID_DOT11_WFD_DEVICE_INFO"; break; @@ -2172,7 +2172,7 @@ N6C_DOT11_DUMP_OID( case OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST : StrBuf = "OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_REQUEST"; break; case OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE : StrBuf = "OID_DOT11_WFD_SEND_PROVISION_DISCOVERY_RESPONSE"; break; case OID_DOT11_WFD_STOP_DISCOVERY : StrBuf = "OID_DOT11_WFD_STOP_DISCOVERY"; break; - + case OID_DOT11_WFD_DESIRED_GROUP_ID : StrBuf = "OID_DOT11_WFD_DESIRED_GROUP_ID"; break; case OID_DOT11_WFD_START_GO_REQUEST : StrBuf = "OID_DOT11_WFD_START_GO_REQUEST"; break; case OID_DOT11_WFD_GROUP_START_PARAMETERS : StrBuf = "OID_DOT11_WFD_GROUP_START_PARAMETERS"; break; @@ -2180,9 +2180,9 @@ N6C_DOT11_DUMP_OID( case OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST : StrBuf = "OID_DOT11_WFD_DISCONNECT_FROM_GROUP_REQUEST"; break; case OID_DOT11_WFD_GROUP_JOIN_PARAMETERS : StrBuf = "OID_DOT11_WFD_GROUP_JOIN_PARAMETERS"; break; case OID_DOT11_WFD_GET_DIALOG_TOKEN : StrBuf = "OID_DOT11_WFD_GET_DIALOG_TOKEN"; break; - + case OID_PACKET_COALESCING_FILTER_MATCH_COUNT : StrBuf = "OID_PACKET_COALESCING_FILTER_MATCH_COUNT"; break; - + case OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED : StrBuf = "OID_DOT11_POWER_MGMT_MODE_AUTO_ENABLED"; break; case OID_DOT11_POWER_MGMT_MODE_STATUS : StrBuf = "OID_DOT11_POWER_MGMT_MODE_STATUS"; break; case OID_DOT11_OFFLOAD_NETWORK_LIST : StrBuf = "OID_DOT11_OFFLOAD_NETWORK_LIST"; break; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.c b/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.c index 5858ef667..811de4509 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.c @@ -3,17 +3,17 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: N6C_PlatformDef.c - + Abstract: - Common implemetation of function defined in PlatformDef.h - for NDIS6 PCI and USB. - + Common implemetation of function defined in PlatformDef.h + for NDIS6 PCI and USB. + Major Change History: When Who What ---------- --------------- ------------------------------- 2007-03-29 Rcnjko Create. 2007-05-18 Rcnjko Move common implementation from USB\ and PCI\ to here. - + --*/ #include "Mp_Precomp.h" @@ -79,13 +79,13 @@ ndis6TimerCallback( BOOLEAN bTimerCanceled = FALSE; RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("=====>Ndis6TimerCallback(%s), status(%#x), ActiveTimerCallbackCount(%d)\n", pTimer->szID, pTimer->Status, pPortCommonInfo->ActiveTimerCallbackCount)); - + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + if(pTimer->Status & (RT_TIMER_STATUS_RELEASED)) { RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("ndis6TimerCallback(): TimerName: %s: This timer has been released! \n", pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return ; } // @@ -94,7 +94,7 @@ ndis6TimerCallback( pTimer->Status |= RT_TIMER_STATUS_FIRED; // - // Clear RT_TIMER_STATUS_SET flag before pTimer->CallBackFunc(pTimer), + // Clear RT_TIMER_STATUS_SET flag before pTimer->CallBackFunc(pTimer), // because we might schedule the same timer again there. // pTimer->Status &= ( ~(RT_TIMER_STATUS_SET | RT_TIMER_STATUS_CANCEL_NG) ); @@ -109,22 +109,22 @@ ndis6TimerCallback( { pPortCommonInfo->ActiveTimerCallbackCount++; NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); - + pTimer->CallBackFunc(pTimer); - + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); pPortCommonInfo->ActiveTimerCallbackCount--; } - + // - // Clear RT_TIMER_STATUS_FIRED + // Clear RT_TIMER_STATUS_FIRED // pTimer->Status &= (~RT_TIMER_STATUS_FIRED); - + // // Check if driver is waiting us to unload. - // + // if(pPortCommonInfo->ActiveTimerCallbackCount == 0) NdisSetEvent(&(pPortCommonInfo->AllTimerCompletedEvent)); @@ -174,14 +174,14 @@ Ndis6LeaveCallbackOfWorkItem( if( pPlatformExt == NULL ) return ; - + NdisAcquireSpinLock( &(pPlatformExt->Lock) ); pRtWorkItem->RefCount--; if(pRtWorkItem->RefCount == 0) NdisSetEvent( &(pPlatformExt->Event) ); - + NdisReleaseSpinLock( &(pPlatformExt->Lock) ); } @@ -210,7 +210,7 @@ VOID PlatformInitializeTimer( IN PVOID Adapter, IN PRT_TIMER pTimer, - IN RT_TIMER_CALL_BACK CallBackFunc, + IN RT_TIMER_CALL_BACK CallBackFunc, IN PVOID pContext, IN const char* szID ) @@ -219,16 +219,16 @@ PlatformInitializeTimer( PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; PRT_TIMER_HANDLE pHandle; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; - + NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; // - // 060120, rcnjko: - // NdisMInitializeTimer() is noly allowed in context of PASSIVE level, + // 060120, rcnjko: + // NdisMInitializeTimer() is noly allowed in context of PASSIVE level, // otherwise, it might cause OS deadlock. 2006.01.20, by rcnjko. // - // 061024, rcnjko: - // Set RT_TIMER_STATUS_INITIALIZED before NdisMInitializeTimer() to + // 061024, rcnjko: + // Set RT_TIMER_STATUS_INITIALIZED before NdisMInitializeTimer() to // prevent race condition. // NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); @@ -236,7 +236,7 @@ PlatformInitializeTimer( if( !(pTimer->Status & RT_TIMER_STATUS_INITIALIZED) ) { pHandle = &(pTimer->Handle); - + pTimer->Adapter = pAdapter; pTimer->CallBackFunc = CallBackFunc; pTimer->Status = RT_TIMER_STATUS_INITIALIZED; @@ -261,8 +261,8 @@ PlatformInitializeTimer( pHandle->TimerCharacteristics.AllocationTag = '2918'; pHandle->TimerCharacteristics.TimerFunction = ndis6TimerCallback; pHandle->TimerCharacteristics.FunctionContext = pTimer; - - + + ndisStatus = NdisAllocateTimerObject( pNdisCommon->hNdisAdapter, &pHandle->TimerCharacteristics, @@ -272,15 +272,15 @@ PlatformInitializeTimer( if(ndisStatus == NDIS_STATUS_SUCCESS) { DebugResourceTimerCreateTimerMirror( - pAdapter, - pPortCommonInfo->uNumberOfAllocatedTimers, + pAdapter, + pPortCommonInfo->uNumberOfAllocatedTimers, pTimer ); - + pPortCommonInfo->uNumberOfAllocatedTimers++; N6CTimerResourceInsert(pAdapter, pTimer); // This timer has been inserted for further handling - } + } else { pTimer->Status |= RT_TIMER_STATUS_RELEASED; @@ -303,44 +303,44 @@ PlatformSetPeriodicTimer( ) { PADAPTER pAdapter = (PADAPTER)Adapter; - PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; + PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; LARGE_INTEGER fireTime; RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("--->PlatformSetTimer() msDelay(%d)\n",msDelay)); NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + if(pTimer->Status & RT_TIMER_STATUS_RELEASED) { RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("PlatformSetTimer(): timer(%s) is alreadyreleased!!!\n", pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(!(pTimer->Status & RT_TIMER_STATUS_INITIALIZED)) { RT_ASSERT(FALSE, ("PlatformSetTimer(): timer(%s) is not yet initialized!!! Status 0x%x\n", pTimer->szID, pTimer->Status)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(RT_DRIVER_HALT(pAdapter)) { - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(pTimer->Status & RT_TIMER_STATUS_SUSPENDED) { RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformSetPeriodicTimer(): timer(%s) is paused!!!\n", pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } /* //fix the bug that outstandingcount cannot be zero caused by cancel timer failure, vivi, 20100526 - //We encounter a condition on 92du like this(BlinkTimer): + //We encounter a condition on 92du like this(BlinkTimer): //set timer -->cancel timer( but failed)-->set timer-->callback function-->set timer-->callback function; - //In this flow, the value of outstandingcount will be: 1-->1-->2-->1-->2-->1, + //In this flow, the value of outstandingcount will be: 1-->1-->2-->1-->2-->1, //the value can not be zero finally, then driver will wait for outstandingcount to be zero, and then timerout //now we fix this issue by this method, when RT_TIMER_STATUS_CANCEL_NG has been set, we can not settimer, //until callback function has been executed @@ -348,15 +348,15 @@ PlatformSetPeriodicTimer( return FALSE; */ // - // 061024, rcnjko: - // We shall schedule the timer before setting RT_TIMER_STATUS_SET - // to make sure this flag is set only iff corresponding timer object - // had been scheduled (i.e. placed in timer queued) and - // is not yet fired (i.e. execute its callback function). + // 061024, rcnjko: + // We shall schedule the timer before setting RT_TIMER_STATUS_SET + // to make sure this flag is set only iff corresponding timer object + // had been scheduled (i.e. placed in timer queued) and + // is not yet fired (i.e. execute its callback function). // // 2007.04.30, Roger: // In Win98Me, Sometimes we could not set timer successful due to system out resource, - // but we have no idea about that, i.e, NdisMSetTimer() success or not. So we should monitor some + // but we have no idea about that, i.e, NdisMSetTimer() success or not. So we should monitor some // timer's resolution time to avoid this problem. // @@ -373,10 +373,10 @@ PlatformSetPeriodicTimer( pTimer->szID, pTimer->Status )); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); // - // We schedule timer after timer status are configured + // We schedule timer after timer status are configured // to prevent callback routine happen before PlatformSetTimer() done. // @@ -388,15 +388,15 @@ PlatformSetPeriodicTimer( // // Description: // Schedule the timer by the following reles. -// (1) If the previous timer had been scheduled and is not fired yet: -// NdisSetTimer() cancel the previous one and schedule the current input timer according to the new +// (1) If the previous timer had been scheduled and is not fired yet: +// NdisSetTimer() cancel the previous one and schedule the current input timer according to the new // timer interval. // (2) If the previous timer had been fired and the callback routine is not complete yet: // The input timer will be inserted into the system queue. After the previous callback routine is complete, then // (2.1) the system schedule the new timer if the msDelay of the new timer had been expired; or // (2.2) the system wait until the specified interval is expired. // Note: -// According to the rules described above, the timer can set twice at the same at most, one is running in +// According to the rules described above, the timer can set twice at the same at most, one is running in // routine and another is in the queue. So we should maintain the number of timers carefully. // By Bruce, 2008-12-01. // @@ -413,47 +413,47 @@ PlatformSetTimer( LARGE_INTEGER fireTime; NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("=====>PlatformSetTimer(%s), status(%#x), msDelay(%d)\n", pTimer->szID, pTimer->Status, msDelay)); if(pTimer->Status & RT_TIMER_STATUS_RELEASED) { RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformSetTimer(): timer(%s) is alreadyreleased!!!\n", pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(!(pTimer->Status & RT_TIMER_STATUS_INITIALIZED)) { RT_ASSERT(FALSE, ("PlatformSetTimer(): timer(%s) is not yet initialized!!! Status 0x%x\n", pTimer->szID, pTimer->Status)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(pTimer->Status & RT_TIMER_STATUS_SUSPENDED) { RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformSetTimer(): timer(%s) is paused!!!\n", pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(RT_DRIVER_HALT(pAdapter) && ! HAS_REQUEST_TO_HANDLE(pAdapter)) { RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformSetTimer(): return because bDriverStopped=%d or bSurpriseRemoved=%d\n", pAdapter->bDriverStopped, pAdapter->bSurpriseRemoved)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } // - // 061024, rcnjko: - // We shall schedule the timer before setting RT_TIMER_STATUS_SET - // to make sure this flag is set only iff corresponding timer object - // had been scheduled (i.e. placed in timer queued) and - // is not yet fired (i.e. execute its callback function). + // 061024, rcnjko: + // We shall schedule the timer before setting RT_TIMER_STATUS_SET + // to make sure this flag is set only iff corresponding timer object + // had been scheduled (i.e. placed in timer queued) and + // is not yet fired (i.e. execute its callback function). // // 2007.04.30, Roger: // In Win98Me, Sometimes we could not set timer successful due to system out resource, - // but we have no idea about that, i.e, NdisMSetTimer() success or not. So we should monitor some + // but we have no idea about that, i.e, NdisMSetTimer() success or not. So we should monitor some // timer's resolution time to avoid this problem. // @@ -470,10 +470,10 @@ PlatformSetTimer( pTimer->szID, pTimer->Status)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); // - // We schedule timer after timer status are configured + // We schedule timer after timer status are configured // to prevent callback routine happen before PlatformSetTimer() done. // fireTime.QuadPart = Int32x32To64((LONG)msDelay, -10000); @@ -487,9 +487,9 @@ PlatformSetTimer( // Description: // Cancel the input timer. // Note: -// This function only cancel the immediately preceding call to NdisMSetTimer if the interval +// This function only cancel the immediately preceding call to NdisMSetTimer if the interval // given to NdisMSetTimer has not yet expired. -// A call to NdisMCancelTimer while the MiniportTimer function is running has +// A call to NdisMCancelTimer while the MiniportTimer function is running has // no effect on the execution of MiniportTimer. It continues to run until it returns control. // In other words, PlatformCancelTimer() cannot cancel the running thread. // Sync from 818xB. By Bruce, 2008-12-01. @@ -502,8 +502,8 @@ PlatformCancelTimer( { PADAPTER pAdapter = (PADAPTER)Adapter; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; - BOOLEAN bCanceled = FALSE; - + BOOLEAN bCanceled = FALSE; + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); // RT_ASSERT((pTimer->Status & RT_TIMER_STATUS_INITIALIZED), ("Cancel timer without initialize !!\n")) @@ -511,23 +511,23 @@ PlatformCancelTimer( if( !(pTimer->Status & RT_TIMER_STATUS_INITIALIZED) ) { RT_TRACE(COMP_INIT, DBG_LOUD, ("%s: This timer does not initialized! \n", __FUNCTION__)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } - + if(pTimer->Status & (RT_TIMER_STATUS_RELEASED)) { RT_TRACE(COMP_INIT, DBG_LOUD, ("%s: TimerName: %s: This timer has been released! \n", __FUNCTION__, pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return TRUE; } - + // - // 061024, rcnjko: - // We reset RT_TIMER_STATUS_SET before canceling the timer object + // 061024, rcnjko: + // We reset RT_TIMER_STATUS_SET before canceling the timer object // to make sure we only try to cancel is only cancel once. - // Besides, OutStandingTimerCnt is decreased here if we cancel the - // timer object sucessfully, otherwise, it will be decreased in the + // Besides, OutStandingTimerCnt is decreased here if we cancel the + // timer object sucessfully, otherwise, it will be decreased in the // end of callback function. // // 2007.04.30, Roger: @@ -543,10 +543,10 @@ PlatformCancelTimer( // Clear RT_TIMER_STATUS_SET flag to make sure we only cancel it once after set. // //pTimer->Status &= (~RT_TIMER_STATUS_SET); //YJ,move,120112 - pTimer->Status &= (~RT_TIMER_STATUS_PERIODIC); + pTimer->Status &= (~RT_TIMER_STATUS_PERIODIC); //NdisReleaseSpinLock(&(pNdisCommon->TimerLock)); //YJ,del,120112 - - bCanceled = NdisCancelTimerObject(pTimer->Handle.NdisTimerHandle); + + bCanceled = NdisCancelTimerObject(pTimer->Handle.NdisTimerHandle); //NdisAcquireSpinLock(&(pNdisCommon->TimerLock)); //YJ,del,120112 if(!bCanceled) @@ -557,10 +557,10 @@ PlatformCancelTimer( RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("<=====PlatformCancelTimer(%s), cancel NG, status(%#x)\n", pTimer->szID, pTimer->Status)); } else - { // Successfully cancel the timer. + { // Successfully cancel the timer. pTimer->Status &= (~RT_TIMER_STATUS_SET); //YJ,move,120111 - pTimer->TimerStallSlotCount = 0; // For Timer stall checking mechanism, by Roger. 2007.05.16. + pTimer->TimerStallSlotCount = 0; // For Timer stall checking mechanism, by Roger. 2007.05.16. NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); @@ -572,7 +572,7 @@ PlatformCancelTimer( NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("PlatformCancelTimer(%s), timer is NOT set case: status(%#x)!!!\n", pTimer->szID, pTimer->Status)); } - + return bCanceled; } @@ -580,7 +580,7 @@ PlatformCancelTimer( // // Description: // Release this timer and prohibit from setting timer. -// In general, we can release timer to set released flag to prohibit setting a timer except +// In general, we can release timer to set released flag to prohibit setting a timer except // the timer is initialized again. // By Bruce, 2008-12-01. // @@ -595,31 +595,31 @@ PlatformReleaseTimer( BOOLEAN bCanceled = FALSE; PADAPTER pAdapter = (PADAPTER)Adapter; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; - + RT_ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL, ("Timer Releasing Should be Called in PASSIVE_LEVEL!\n")); NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + if( !(pTimer->Status & RT_TIMER_STATUS_INITIALIZED) ) { RT_TRACE(COMP_INIT, DBG_LOUD, ("%s: This timer does not initialized! \n", __FUNCTION__)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } - + if(!(pTimer->Status & RT_TIMER_STATUS_RELEASED)) { bDoRelease = TRUE; // Clean System Timer Queue - if( NdisCancelTimerObject(pTimer->Handle.NdisTimerHandle) == FALSE ) + if( NdisCancelTimerObject(pTimer->Handle.NdisTimerHandle) == FALSE ) { - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); // Clean System DPC Queue for All Processors KeFlushQueuedDpcs(); NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - } + } } - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); if(bDoRelease) { @@ -630,15 +630,15 @@ PlatformReleaseTimer( // Release System Timer NdisFreeTimerObject(pTimer->Handle.NdisTimerHandle); - pTimer->Status = RT_TIMER_STATUS_RELEASED; - + pTimer->Status = RT_TIMER_STATUS_RELEASED; + pPortCommonInfo->uNumberOfReleasedTimers++; } return TRUE; } - + // // Description: // - Timer resource management for SoC off on Windows Mobile platform @@ -659,8 +659,8 @@ PlatformSuspendTimer( PADAPTER pAdapter = (PADAPTER)Adapter; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; BOOLEAN bCanceled = FALSE; - - + + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); pTimer->PreviousStatus = pTimer->Status; @@ -668,29 +668,29 @@ PlatformSuspendTimer( if( !(pTimer->Status & RT_TIMER_STATUS_INITIALIZED) ) { RT_TRACE(COMP_INIT, DBG_LOUD, ("%s: This timer does not initialized! \n", __FUNCTION__)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(pTimer->Status & (RT_TIMER_STATUS_RELEASED)) { RT_TRACE(COMP_INIT, DBG_LOUD, ("%s: TimerName: %s: This timer has been released! \n", __FUNCTION__, pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return TRUE; } if((pTimer->Status & (RT_TIMER_STATUS_SET) || pTimer->Status & (RT_TIMER_STATUS_PERIODIC))) { RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("=====>PlatformSuspendTimer(%s), status(%#x)\n", pTimer->szID, pTimer->Status)); - + pTimer->Status &= (~RT_TIMER_STATUS_PERIODIC); - #if (IS_OS_WINCE) // WinCE7 only supports N5 Timer Interface - NdisMCancelTimer(&(pTimer->Handle.NdisTimerHandle), &bCanceled); - #else - bCanceled = NdisCancelTimerObject(pTimer->Handle.NdisTimerHandle); - #endif + #if (IS_OS_WINCE) // WinCE7 only supports N5 Timer Interface + NdisMCancelTimer(&(pTimer->Handle.NdisTimerHandle), &bCanceled); + #else + bCanceled = NdisCancelTimerObject(pTimer->Handle.NdisTimerHandle); + #endif if(!bCanceled) { // Timer had already been fired or was not set successful before, by Roger. 2007.04.30. @@ -700,19 +700,19 @@ PlatformSuspendTimer( RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("<=====PlatformSuspendTimer(%s), cancel NG, status(%#x)\n", pTimer->szID, pTimer->Status)); } else - { // Successfully cancel the timer. + { // Successfully cancel the timer. // // Clear RT_TIMER_STATUS_SET flag to make sure we only cancel it once after set. // pTimer->Status &= (~RT_TIMER_STATUS_SET); //YJ,move,120111 - pTimer->TimerStallSlotCount = 0; // For Timer stall checking mechanism, by Roger. 2007.05.16. + pTimer->TimerStallSlotCount = 0; // For Timer stall checking mechanism, by Roger. 2007.05.16. NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("<=====PlatformSuspendTimer(%s), cancel OK, status(%#x)\n", pTimer->szID, pTimer->Status)); - } + } pTimer->Status |= RT_TIMER_STATUS_SUSPENDED; } else @@ -721,13 +721,13 @@ PlatformSuspendTimer( NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("PlatformSuspendTimer(%s), timer is NOT set case: status(%#x)!!!\n", pTimer->szID, pTimer->Status)); } - + return bCanceled; } // -// Description: +// Description: // - Timer resource management for SoC off on Windows Mobile platform // - This routine will resume suspended timer // - Periodic timer will be rescheduing within this routine according to previous satus @@ -746,48 +746,48 @@ PlatformResumeTimer( { PADAPTER pAdapter = (PADAPTER)Adapter; PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; - BOOLEAN bCanceled = TRUE; + BOOLEAN bCanceled = TRUE; u4Byte PreviousTimerStatus = 0; - - NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); + + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); if( !(pTimer->Status & RT_TIMER_STATUS_INITIALIZED) ) { RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("%s: This timer does not initialized! \n", __FUNCTION__)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } - + if(pTimer->Status & (RT_TIMER_STATUS_RELEASED)) { RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("%s: TimerName: %s: This timer has been released! \n", __FUNCTION__, pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } if(!(pTimer->Status & (RT_TIMER_STATUS_SUSPENDED))) { RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("%s: TimerName: %s: This timer had not been paused before, so timer resumption is not required.\n", __FUNCTION__, pTimer->szID)); - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); return FALSE; } PreviousTimerStatus = pTimer->PreviousStatus; - + pTimer->Status &= ~RT_TIMER_STATUS_SUSPENDED; pTimer->PreviousStatus = pTimer->Status; - - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); if(PreviousTimerStatus & RT_TIMER_STATUS_PERIODIC){ RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("Reschedule Periodic Timer(%s), status(%#x)\n", pTimer->szID, PreviousTimerStatus)); PlatformSetPeriodicTimer(pTimer->Adapter, pTimer, pTimer->msDelay); } - + return bCanceled; } - + // // Description: // Initialize the event and queue associated to the all timers. @@ -802,11 +802,11 @@ N6InitTimerSync( { PADAPTER pDefaultAdapter = GetDefaultAdapter((PADAPTER)Adapter); PPORT_COMMON_INFO pPortCommonInfo = pDefaultAdapter->pPortCommonInfo; - + RT_TRACE(COMP_INIT, DBG_TRACE, ("---> PlatformInitTimerSync()\n")); pPortCommonInfo->ActiveTimerCallbackCount = 1; // Set default number of outstanding timer as 1. - + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("=====>N6InitTimerSync(): Set ActiveTimerCallbackCount to 1 !\n")); PLATFORM_INIT_RT_SPINLOCK(pPortCommonInfo->TimerLock); @@ -817,7 +817,7 @@ N6InitTimerSync( pPortCommonInfo->uNumberOfAllocatedTimers = 0; pPortCommonInfo->uNumberOfReleasedTimers = 0; - + N6CTimerResourceInit(Adapter); // Initialization for Timer resource handling RT_TRACE(COMP_INIT, DBG_TRACE, ("<--- PlatformInitTimerSync()\n")); @@ -831,7 +831,7 @@ N6WaitTimerSync( PPORT_COMMON_INFO pPortCommonInfo = ((PADAPTER)Adapter)->pPortCommonInfo; BOOLEAN bAllTimerCompleted = FALSE; u4Byte i = 0; - + RT_TRACE(COMP_INIT, DBG_TRACE, ("---> N6WaitTimerSync()\n")); @@ -841,9 +841,9 @@ N6WaitTimerSync( KeFlushQueuedDpcs(); PLATFORM_ACQUIRE_RT_SPINLOCK(pPortCommonInfo->TimerLock); - + pPortCommonInfo->ActiveTimerCallbackCount--; // Since we set default ActiveTimerCallbackCount as 1 N6InitTimerSync() - + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("=====>N6WaitTimerSync(): ActiveTimerCallbackCount = %d!!!\n", pPortCommonInfo->ActiveTimerCallbackCount)); RT_ASSERT(pPortCommonInfo->ActiveTimerCallbackCount >= 0, ("pPortCommonInfo->ActiveTimerCallbackCount should not be negative !\n")); @@ -870,12 +870,12 @@ N6WaitTimerSync( } PLATFORM_ACQUIRE_RT_SPINLOCK(pPortCommonInfo->TimerLock); - + if(((PADAPTER)Adapter)->MgntInfo.RegSuspendTimerInLowPwr) pPortCommonInfo->ActiveTimerCallbackCount = 1; // Since sync method was finished, so reset default number of outstanding timer as 1. PLATFORM_RELEASE_RT_SPINLOCK(pPortCommonInfo->TimerLock); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("N6WaitTimerSync(): bAllTimerCompleted: %d, pPortCommonInfo->ActiveTimerCallbackCount: %d\n", bAllTimerCompleted, pPortCommonInfo->ActiveTimerCallbackCount)); RT_TRACE(COMP_INIT, DBG_TRACE, ("<--- N6WaitTimerSync()\n")); @@ -920,17 +920,17 @@ N6CInitThread( PRT_NDIS_COMMON pNdisCommon = Adapter->pNdisCommon; BOOLEAN bSupportUsbTxThread; BOOLEAN bSupportUsbIOThread; - + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_USB_TX_THREAD, (PBOOLEAN)&bSupportUsbTxThread); Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_USB_IO_THREAD, (PBOOLEAN)&bSupportUsbIOThread); - + NdisAllocateSpinLock(&(pNdisCommon->ThreadLock)); NdisInitializeEvent(&(pNdisCommon->AllThreadCompletedEvent)); PlatformInitializeThread( - Adapter, - &pNdisCommon->InitializeAdapterThread, - (RT_THREAD_CALL_BACK)InitializeAdapterThread, + Adapter, + &pNdisCommon->InitializeAdapterThread, + (RT_THREAD_CALL_BACK)InitializeAdapterThread, "InitializeAdapterThread", FALSE, 0, @@ -941,35 +941,35 @@ N6CInitThread( // SDIO Tx thread initialization // PlatformInitializeThread( - Adapter, - &pNdisCommon->TxHandleThread, - (RT_THREAD_CALL_BACK)N6SdioTxThreadCallback, + Adapter, + &pNdisCommon->TxHandleThread, + (RT_THREAD_CALL_BACK)N6SdioTxThreadCallback, "N6SdioTxThreadCallback", FALSE, 0, NULL); PlatformRunThread( - Adapter, - &pNdisCommon->TxHandleThread, + Adapter, + &pNdisCommon->TxHandleThread, PASSIVE_LEVEL, NULL); -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // // SDIO Register IO thread initialization // PlatformInitializeThread( - Adapter, - &pNdisCommon->IOHandleThread, - (RT_THREAD_CALL_BACK)N6SdioIOThreadCallback, + Adapter, + &pNdisCommon->IOHandleThread, + (RT_THREAD_CALL_BACK)N6SdioIOThreadCallback, "N6SdioIOThreadCallback", FALSE, 0, NULL); PlatformRunThread( - Adapter, - &pNdisCommon->IOHandleThread, + Adapter, + &pNdisCommon->IOHandleThread, PASSIVE_LEVEL, NULL); #endif @@ -984,7 +984,7 @@ N6CDeInitThread( ) { PADAPTER Adapter = (PADAPTER)pContext; - + PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; BOOLEAN bSupportUsbTxThread; BOOLEAN bSupportUsbIOThread; @@ -993,7 +993,7 @@ N6CDeInitThread( Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_USB_IO_THREAD, (PBOOLEAN)&bSupportUsbIOThread); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6CDeInitThread()\n")); - + PlatformWaitThreadEnd(Adapter,&(pNdisCommon->InitializeAdapterThread)); PlatformCancelThread(Adapter, &(pNdisCommon->InitializeAdapterThread)); PlatformReleaseThread(Adapter, &(pNdisCommon->InitializeAdapterThread)); @@ -1004,16 +1004,16 @@ N6CDeInitThread( PlatformWaitThreadEnd(Adapter, &(pNdisCommon->TxHandleThread)); PlatformCancelThread(Adapter, &(pNdisCommon->TxHandleThread)); PlatformReleaseThread(Adapter, &(pNdisCommon->TxHandleThread)); -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // Cancel and release IO handle thread - PlatformWaitThreadEnd(Adapter, &(pNdisCommon->IOHandleThread)); - PlatformCancelThread(Adapter, &(pNdisCommon->IOHandleThread)); + PlatformWaitThreadEnd(Adapter, &(pNdisCommon->IOHandleThread)); + PlatformCancelThread(Adapter, &(pNdisCommon->IOHandleThread)); PlatformReleaseThread(Adapter, &(pNdisCommon->IOHandleThread)); -#endif +#endif PlatformFreeWorkItem( &(Adapter->pPortCommonInfo->WdiData.TaskWorkItem) ); PlatformFreeWorkItem( &(Adapter->pPortCommonInfo->WdiData.PropertyWorkItem) ); - + PlatformWaitThreadEnd(Adapter, &(Adapter->pPortCommonInfo->WdiData.TaskThread)); PlatformCancelThread(Adapter, &(Adapter->pPortCommonInfo->WdiData.TaskThread)); PlatformReleaseThread(Adapter, &(Adapter->pPortCommonInfo->WdiData.TaskThread)); @@ -1090,7 +1090,7 @@ PlatformInitializeWorkItem( PlatformZeroMemory( pPlatformExt, sizeof(PLATFORM_EXT) ); pRtWorkItem->pPlatformExt = pPlatformExt; - + NdisInitializeEvent( &(pPlatformExt->Event) ); NdisAllocateSpinLock( &(pPlatformExt->Lock) ); @@ -1151,7 +1151,7 @@ PlatformStartWorkItem( } -// +// // Description: // Wait the workitem complete if it is running and stop the workitem from scheduling it. // @@ -1164,9 +1164,9 @@ PlatformStopWorkItem( if( pPlatformExt == NULL ) return; - + NdisAcquireSpinLock( &(pPlatformExt->Lock) ); - + // Check if Workitem is initialized. if(pRtWorkItem->Adapter== NULL || pRtWorkItem->CallbackFunc==NULL || pPlatformExt==NULL || pRtWorkItem->bFree) { @@ -1232,7 +1232,7 @@ PlatformFreeWorkItem( RT_TRACE(COMP_DBG, DBG_LOUD, ("===> PlatformFreeWorkItem(): %s\n", pRtWorkItem->szID)); PlatformStopWorkItem(pRtWorkItem); - + NdisAcquireSpinLock( &(pPlatformExt->Lock) ); if(pRtWorkItem->bFree) { @@ -1252,17 +1252,17 @@ PlatformFreeWorkItem( NdisFreeIoWorkItem(pRtWorkItem->Handle); pRtWorkItem->bFree = TRUE; - + RT_TRACE(COMP_DBG, DBG_LOUD, ("<=== PlatformFreeWorkItem(): %s\n", pRtWorkItem->szID)); } // // Description: -// Schedule a work item. +// Schedule a work item. // 2006.09.28, by shien chang. // -BOOLEAN +BOOLEAN PlatformScheduleWorkItem( IN PRT_WORK_ITEM pRtWorkItem ) @@ -1274,13 +1274,13 @@ PlatformScheduleWorkItem( return bResult; NdisAcquireSpinLock( &(pPlatformExt->Lock) ); - + if(pRtWorkItem->bFree) { NdisReleaseSpinLock( &(pPlatformExt->Lock) ); return bResult; } - + // Make sure at most one such workitem executed. if(pRtWorkItem->RefCount == 1) @@ -1288,8 +1288,8 @@ PlatformScheduleWorkItem( pRtWorkItem->RefCount ++; NdisReleaseSpinLock( &(pPlatformExt->Lock) ); - NdisQueueIoWorkItem( pRtWorkItem->Handle, - Ndis6WorkItemCallback, + NdisQueueIoWorkItem( pRtWorkItem->Handle, + Ndis6WorkItemCallback, pRtWorkItem); bResult = TRUE; } @@ -1327,18 +1327,18 @@ PlatformIsWorkItemScheduled( return FALSE; NdisAcquireSpinLock( &(pPlatformExt->Lock) ); - + if(pRtWorkItem->bFree) { NdisReleaseSpinLock( &(pPlatformExt->Lock) ); return FALSE; } - + // We define both the RefCount 0 and 2 as scheduled. // 2006.09.29, by shien chang. bScheduled = !(pRtWorkItem->RefCount == 1); - + NdisReleaseSpinLock( &(pPlatformExt->Lock) ); return bScheduled; @@ -1384,8 +1384,8 @@ PlatformAllocateMemoryWithTag( RT_STATUS rtstatus = RT_STATUS_SUCCESS; NDIS_HANDLE MiniportAdapterHandle = GlobalRtDriverContext.NdisContext.Ndis6MiniportDriverHandle; - *pPtr = NdisAllocateMemoryWithTagPriority( MiniportAdapterHandle, - length, + *pPtr = NdisAllocateMemoryWithTagPriority( MiniportAdapterHandle, + length, Tag, NormalPoolPriority); if (*pPtr == NULL) @@ -1434,8 +1434,8 @@ PlatformAllocateMemoryWithZero( RT_STATUS rtstatus = RT_STATUS_SUCCESS; NDIS_HANDLE MiniportAdapterHandle = ((PADAPTER)Adapter)->pNdisCommon->hNdisAdapter; - *pPtr = NdisAllocateMemoryWithTagPriority( MiniportAdapterHandle, - length, + *pPtr = NdisAllocateMemoryWithTagPriority( MiniportAdapterHandle, + length, '7818', NormalPoolPriority); if (*pPtr == NULL) @@ -1447,7 +1447,7 @@ PlatformAllocateMemoryWithZero( RTL_AllocateMemory_Len += length; NdisZeroMemory(*pPtr,length); - + return rtstatus; } @@ -1562,16 +1562,16 @@ PlatformGetCurrentTime( // The return value is in microsecond u8Byte ret; LARGE_INTEGER CurrentTime; - + NdisGetCurrentSystemTime(&CurrentTime); // driver version ret=CurrentTime.QuadPart/10; - + return ret; } // // Description: -// Handle TKIP MIC error. +// Handle TKIP MIC error. // For example, indicate the MIC error event to supplicant. // // Note: @@ -1649,7 +1649,7 @@ PlatformHandleTKIPMICError( &TKIPFailureParam, sizeof(DOT11_TKIPMIC_FAILURE_PARAMETERS)); } - + } // else @@ -1661,7 +1661,7 @@ PlatformHandleTKIPMICError( // // Description: -// +// // Added by Annie, 2005-09-23, // Ref: 8185 WMacRequestPreAuthentication(). // @@ -1708,7 +1708,7 @@ PlatformRequestPreAuthentication( // PlatformZeroMemory( uArray, sizeof uArray ); pucCurPtr = &uArray[0]; - + pPMKID = (PDOT11_PMKID_CANDIDATE_LIST_PARAMETERS)pucCurPtr; pPMKID->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; pPMKID->Header.Revision = DOT11_PMKID_CANDIDATE_LIST_PARAMETERS_REVISION_1; @@ -1719,13 +1719,13 @@ PlatformRequestPreAuthentication( //------------------------------------------------------------------ // (1) Include associated current BSSID into list //------------------------------------------------------------------ - - // The current associated BSSID should always be in the StatusBuffer. + + // The current associated BSSID should always be in the StatusBuffer. pCandidate = (PDOT11_BSSID_CANDIDATE)pucCurPtr; pCandidate->uFlags = DOT11_PMKID_CANDIDATE_PREAUTH_ENABLED; - + PlatformMoveMemory( pCandidate->BSSID, pMgntInfo->Bssid, 6 ); - iNumBssid++; + iNumBssid++; pucCurPtr += sizeof(DOT11_BSSID_CANDIDATE); // pointer to next PMKID_CANDIDATE. // WPA2 beta site: It makes sense to clear the driver PMKID cache at the time of Disconnect. @@ -1733,17 +1733,17 @@ PlatformRequestPreAuthentication( { bRequireIndication = TRUE; } - + //------------------------------------------------------------------ // (2) Include other BSSID for roaming candidate list (with the same SSID) - //------------------------------------------------------------------ + //------------------------------------------------------------------ for( i=0; iNumBssDesc; i++ ) // reference enumeration method as SelectNetworkBySSID(). - { + { pBssDesc = &(pMgntInfo->bssDesc[i]); - - // The number of entries indicated in the CandidateList should not be greater - //than the size of the PMKID cache supported by the driver and exposed through + + // The number of entries indicated in the CandidateList should not be greater + //than the size of the PMKID cache supported by the driver and exposed through //OID_802_11_CAPABILITY value NoOfPMKIDs if( iNumBssid >= NUM_PRE_AUTH_KEY ) { @@ -1814,7 +1814,7 @@ PlatformRequestPreAuthentication( { UINT UsedSize = sizeof(DOT11_PMKID_CANDIDATE_LIST_PARAMETERS) + \ (iNumBssid)*sizeof(DOT11_BSSID_CANDIDATE); - + pPMKID->uCandidateListSize = iNumBssid; pPMKID->uCandidateListOffset = sizeof(DOT11_PMKID_CANDIDATE_LIST_PARAMETERS);; @@ -1828,8 +1828,8 @@ PlatformRequestPreAuthentication( UsedSize ); } - - RT_TRACE( COMP_SEC, DBG_LOUD, ("<=== PlatformRequestPreAuthentication()\n" ) ); + + RT_TRACE( COMP_SEC, DBG_LOUD, ("<=== PlatformRequestPreAuthentication()\n" ) ); } @@ -1841,7 +1841,7 @@ PlatformHandlePwiseKeyUpdata( } // Description: -// Handle Network Offload +// Handle Network Offload // Try to Cancel Sacn // // Added by CCW. 2013.04.17. @@ -1860,7 +1860,7 @@ PlatformHandleNLOnScanCancel( // // Description: -// Handle Network Offload +// Handle Network Offload // Try to found out AP in Off load List , and Indicate to upper layer // VOID @@ -1883,23 +1883,23 @@ PlatformHandleNLOnScanComplete( if( pNLOInfo->NumDot11OffloadNetwork == 0) { - RT_TRACE(COMP_MLME , DBG_LOUD , ("return: pNdisCommon->NumDot11OffloadNetwork == 0 !\n")); + RT_TRACE(COMP_MLME , DBG_LOUD , ("return: pNdisCommon->NumDot11OffloadNetwork == 0 !\n")); return; } - + if(pNdisCommon->bToIndicateNLOScanComplete == FALSE) { // Return to prevent from OS sets RESET_REQUEST & CONNECT_REQUEST after indicating // NDIS_STATUS_DOT11_OFFLOAD_NETWORK_STATUS_CHANGED during normal (non-NLO) // scan request flow. It will cause that the reconnect flow is interrupted by OID RESET_REQUEST // & CONNECT_REQUEST such that the first reconnect (to the default AP) action fail after PNP wake. - RT_TRACE(COMP_MLME , DBG_LOUD , ("Return: NOT NLO scan request!\n")); + RT_TRACE(COMP_MLME , DBG_LOUD , ("Return: NOT NLO scan request!\n")); return; } - + // Need to check : bHiddenSSIDEnable can used now ?? pMgntInfo->bHiddenSSIDEnable = TRUE; - + if(!OS_SUPPORT_WDI(Adapter)) { @@ -1922,7 +1922,7 @@ PlatformHandleNLOnScanComplete( { NeedIndicate = TRUE; } - + } } } @@ -1935,22 +1935,22 @@ PlatformHandleNLOnScanComplete( ); } else - { + { WDI_IndicateNLODiscovery(Adapter); } pNdisCommon->bToIndicateNLOScanComplete = FALSE; - + RT_TRACE( COMP_MLME , DBG_LOUD, (" <===== PlatformHandleNLOnScanComplete !!\n") ); return; } -// +// // Description: -// Handle Network Offload scan state -// Check need scan or not +// Handle Network Offload scan state +// Check need scan or not // VOID PlatformHandleNLOnScanRequest( @@ -1964,7 +1964,7 @@ PlatformHandleNLOnScanRequest( PRT_NLO_INFO pNLOInfo = &(pMgntInfo->NLOInfo); BOOLEAN bNeedScan = FALSE; - // check enable NOL mode + // check enable NOL mode if( pNLOInfo->NumDot11OffloadNetwork == 0 ) { RT_TRACE(COMP_MLME , DBG_TRACE , ("<=== return: pNdisCommon->NumDot11OffloadNetwork == 0 !\n")); @@ -1973,9 +1973,9 @@ PlatformHandleNLOnScanRequest( RT_TRACE(COMP_MLME , DBG_LOUD, ("===> PlatformHandleNLOnScanRequest \n ") ); RT_TRACE(COMP_MLME, DBG_TRACE, ("Oidcounter = %d \n",pNdisCommon->Oidcounter)); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("pNdisCommon->ScanPeriod: %d\n", pNdisCommon->ScanPeriod)); - RT_TRACE(COMP_MLME, DBG_LOUD, ("pNdisCommon->FastScanPeriod: %d\n", pNLOInfo->FastScanPeriod)); + RT_TRACE(COMP_MLME, DBG_LOUD, ("pNdisCommon->FastScanPeriod: %d\n", pNLOInfo->FastScanPeriod)); RT_TRACE(COMP_MLME, DBG_LOUD, ("pNdisCommon->FastScanIterations: %d\n", pNLOInfo->FastScanIterations)); RT_TRACE(COMP_MLME, DBG_LOUD, ("pNdisCommon->SlowScanPeriod: %d\n", pNLOInfo->SlowScanPeriod)); @@ -1991,7 +1991,7 @@ PlatformHandleNLOnScanRequest( pNdisCommon->Oidcounter = 0; - // Set up NEW ScanPeriod + // Set up NEW ScanPeriod if( bNeedScan ) { if( pNLOInfo->FastScanIterations > 0 ) @@ -2009,9 +2009,9 @@ PlatformHandleNLOnScanRequest( } } - // Scan state - // Note : - // Check NIC "CAN" scan or not + // Scan state + // Note : + // Check NIC "CAN" scan or not if( bNeedScan ) { if( pNdisCommon->bFilterHiddenAP ) @@ -2024,10 +2024,10 @@ PlatformHandleNLOnScanRequest( RT_TRACE(COMP_MLME, DBG_LOUD, ("pNdisCommon->bToIndicateNLOScanComplete set to %s\n", pNdisCommon->bToIndicateNLOScanComplete?"TRUE":"FALSE")); // - // Marked since the NLO may be initialized when disconnected. + // Marked since the NLO may be initialized when disconnected. // - - // Note : May need check BusyTraffic for ... + + // Note : May need check BusyTraffic for ... //if(pMgntInfo->bMediaConnect && !MgntRoamingInProgress(pMgntInfo) //&& !MgntScanInProgress(pMgntInfo) && !MgntIsLinkInProgress(pMgntInfo) && //!GET_RM_INFO(pMgntInfo)->bGoingOn) @@ -2053,7 +2053,7 @@ PlatformHandleNLOnScanRequest( RT_TRACE(COMP_MLME, DBG_LOUD, ("N6C_OID_DOT11_FLUSH_BSS_LIST\n")); NdisRequest.RequestType = NdisRequestSetInformation; N6C_OID_DOT11_FLUSH_BSS_LIST(Adapter, &NdisRequest); - + //Win8: Restart the passive scan ---------------------------------------------- if(NULL == (req = CustomScan_AllocReq(GET_CUSTOM_SCAN_INFO(Adapter), NULL, NULL))) { @@ -2066,7 +2066,7 @@ PlatformHandleNLOnScanRequest( CustomScan_AddScanChnl(req, 6, 1, SCAN_ACTIVE, (u2Byte)pNdisCommon->ScanPeriod, MGN_6M, NULL); CustomScan_AddScanChnl(req, 11, 1, SCAN_ACTIVE, (u2Byte)pNdisCommon->ScanPeriod, MGN_6M, NULL); - CustomScan_IssueReq(GET_CUSTOM_SCAN_INFO(Adapter), req, CUSTOM_SCAN_SRC_TYPE_UNSPECIFIED, "nlo scan req"); + CustomScan_IssueReq(GET_CUSTOM_SCAN_INFO(Adapter), req, CUSTOM_SCAN_SRC_TYPE_UNSPECIFIED, "nlo scan req"); } } @@ -2092,7 +2092,7 @@ PlatformReleaseDataFrameQueued( PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; PNET_BUFFER_LIST pNetBufferList; PNDIS_ADAPTER_TYPE pDevice = GET_NDIS_ADAPTER(pAdapter); - PNET_BUFFER_LIST pCurrNetBufferList, pNextNetBufferList; + PNET_BUFFER_LIST pCurrNetBufferList, pNextNetBufferList; BOOLEAN bUseWorkItem = FALSE; KIRQL OldIrql; @@ -2115,7 +2115,7 @@ PlatformReleaseDataFrameQueued( } else { // Old method - + while(TRUE) { PlatformAcquireSpinLock(pAdapter, RT_BUFFER_SPINLOCK); @@ -2158,10 +2158,10 @@ PlatformReleaseDataFrameQueued( // this function should move to N63C VOID PlatformIndicateP2PEvent( - PVOID pvP2PInfo, + PVOID pvP2PInfo, u4Byte EventID, PMEMORY_BUFFER pInformation -) +) { N63CIndicateP2PEvent(pvP2PInfo, EventID, pInformation); } @@ -2198,7 +2198,7 @@ PlatformIndicateCustomStatus( ) { RT_STATUS rtStatus = RT_STATUS_SUCCESS; - + if(target == RT_CUSTOM_INDI_TARGET_NONE) { RT_TRACE_F(COMP_INDIC, DBG_WARNING, ("No Target (RT_CUSTOM_INDI_TARGET_NONE)!\n")); @@ -2301,7 +2301,7 @@ PlatformIndicatePMWakeReason( bIndicate = FALSE; } } - + if(bIndicate) { RT_TRACE(COMP_POWER, DBG_LOUD, ("IndicatePMWakeReason(): WakeReason(%#X)\n", pPMWakeReason->WakeReason)); @@ -2311,14 +2311,14 @@ PlatformIndicatePMWakeReason( NDIS_STATUS_PM_WAKE_REASON, pPMWakeReason, WakeReasonInfoLen); - } + } ReturnGenTempBuffer(Adapter, pGenBufPMWakeReason); } } // -// Description: Starting with NDIS 6.30, MiniPortCheckForHang function must not be registered +// Description: Starting with NDIS 6.30, MiniPortCheckForHang function must not be registered // for drivers running on low power SoC platforms to avoid negative power impact caused // by the periodic Check-for-Hang activity. // So we should set watchdog timer by driver to support on low power SoC platforms. diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.h b/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.h index fe1b8177a..7de61d3ae 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_PlatformDef.h @@ -39,8 +39,8 @@ typedef const unsigned char cu8; typedef unsigned __int64 u64; typedef __int64 s64; -typedef unsigned char u8; -typedef unsigned short u16; +typedef unsigned char u8; +typedef unsigned short u16; typedef unsigned long u32; typedef struct _RT_TIMER_HANDLE{ @@ -84,7 +84,7 @@ typedef NDIS_EVENT PlatformEvent, *PPlatformEvent; #define IS_ADAPTER_SENDS_BEACON(__Adapter) IsSendingBeacon(__Adapter) #define GET_PORT_NUMBER(_Adapter) \ - _Adapter->pNdis62Common->PortNumber + _Adapter->pNdis62Common->PortNumber #define N6XC_SET_802_11_ATTRIBUTES(_Adapter) N6Set80211Attributes(_Adapter) #define NDIS_6_2_INITIALIZE_EXTENSION_COMPONENT(_Adapter,_MiniportAdapterHandle,_MiniportInitParameters) \ @@ -110,11 +110,11 @@ typedef NDIS_EVENT PlatformEvent, *PPlatformEvent; #define EXT_AP_START_AP_MODE(_Adapter) #define EXT_AP_NOTIFY_STA_LINK_CHANGE(_pMgntInfo) \ - {_pMgntInfo->bSwitchingSTAStateInProgress = TRUE;} + {_pMgntInfo->bSwitchingSTAStateInProgress = TRUE;} #define EXT_AP_DISASSOCATE_AFTER_STA_LINK_TO_DIFFERENT_CHNNEL_AP(_Adapter) \ AP_DisconnectAfterSTANewConnected(_Adapter) #define REMOVE_WCN_IE_FROM_BSS_DESC(_Adapter,_bssDesc,_pSimpleConfig,_mmpdu) \ - RemoveWCNIE(_Adapter,_bssDesc,_pSimpleConfig,_mmpdu) + RemoveWCNIE(_Adapter,_bssDesc,_pSimpleConfig,_mmpdu) #define PLATFORM_GET_PHY_ID_READY(_Adapter) N6CQueryPhyIdReady(_Adapter) #define PLATFORM_GET_FRAGOFFSET(_pRfd) _pRfd->FragOffset diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.c b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.c index 9543ed42c..1e95310ed 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.c @@ -163,7 +163,7 @@ RT_OID_ENTRY RT_SUPPORT_OIDs[]= N63C_OID_DOT11_POWER_MGMT_MODE_STATUS }, { - OID_PACKET_COALESCING_FILTER_MATCH_COUNT, // Query + OID_PACKET_COALESCING_FILTER_MATCH_COUNT, // Query OID_STR_WRAPPER("OID_PACKET_COALESCING_FILTER_MATCH_COUNT"), N63C_OID_PACKET_COALESCING_FILTER_MATCH_COUNT }, @@ -181,7 +181,7 @@ RT_OID_ENTRY RT_SUPPORT_OIDs[]= N62C_OID_DOT11_DELETE_MAC }, - // Native 802.11 Extensible AP OIDs + // Native 802.11 Extensible AP OIDs { OID_DOT11_INCOMING_ASSOCIATION_DECISION, OID_STR_WRAPPER("OID_DOT11_INCOMING_ASSOCIATION_DECISION"), @@ -229,7 +229,7 @@ RT_OID_ENTRY RT_SUPPORT_OIDs[]= OID_STR_WRAPPER("OID_DOT11_ASSOCIATION_PARAMS"), N62C_OID_DOT11_ASSOCIATION_PARAMS }, - + // Power Management OID { OID_PM_GET_PROTOCOL_OFFLOAD, @@ -269,49 +269,49 @@ RT_OID_ENTRY RT_SUPPORT_OIDs[]= N62C_OID_RECEIVE_FILTER_SET_FILTER }, { - OID_RECEIVE_FILTER_CLEAR_FILTER, // Set + OID_RECEIVE_FILTER_CLEAR_FILTER, // Set OID_STR_WRAPPER("OID_RECEIVE_FILTER_CLEAR_FILTER"), N62C_OID_RECEIVE_FILTER_CLEAR_FILTER }, { - OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES, // Query + OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES, // Query OID_STR_WRAPPER("OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES"), N62C_OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES }, { - OID_RECEIVE_FILTER_CURRENT_CAPABILITIES, // Query + OID_RECEIVE_FILTER_CURRENT_CAPABILITIES, // Query OID_STR_WRAPPER("OID_RECEIVE_FILTER_CURRENT_CAPABILITIES"), N62C_OID_RECEIVE_FILTER_SET_FILTER - }, + }, /* { - OID_PACKET_COALESCING_FILTER_MATCH_COUNT, // Query + OID_PACKET_COALESCING_FILTER_MATCH_COUNT, // Query OID_STR_WRAPPER("OID_PACKET_COALESCING_FILTER_MATCH_COUNT"), N62C_OID_RECEIVE_FILTER_SET_FILTER }, */ //==================== - /* Need to check support or Not + /* Need to check support or Not { - OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES, // Query + OID_RECEIVE_FILTER_HARDWARE_CAPABILITIES, // Query OID_STR_WRAPPER("OID_PACKET_COALESCING_FILTER_MATCH_COUNT"), N62C_OID_RECEIVE_FILTER_SET_FILTER }, { - OID_RECEIVE_FILTER_ENUM_FILTERS, // method + OID_RECEIVE_FILTER_ENUM_FILTERS, // method OID_STR_WRAPPER("OID_PACKET_COALESCING_FILTER_MATCH_COUNT"), N62C_OID_RECEIVE_FILTER_SET_FILTER }, { - OID_RECEIVE_FILTER_PARAMETERS, // method + OID_RECEIVE_FILTER_PARAMETERS, // method OID_STR_WRAPPER("OID_PACKET_COALESCING_FILTER_MATCH_COUNT"), N62C_OID_RECEIVE_FILTER_SET_FILTER }, { - OID_RECEIVE_FILTER_CURRENT_CAPABILITIES, // Query + OID_RECEIVE_FILTER_CURRENT_CAPABILITIES, // Query OID_STR_WRAPPER("OID_PACKET_COALESCING_FILTER_MATCH_COUNT"), N62C_OID_RECEIVE_FILTER_SET_FILTER - }, + }, */ // Others @@ -324,9 +324,9 @@ RT_OID_ENTRY RT_SUPPORT_OIDs[]= // NDIS 6.0-6.1 OID { - OID_DOT11_CURRENT_OPERATION_MODE, - OID_STR_WRAPPER("OID_DOT11_CURRENT_OPERATION_MODE"), - N6C_OID_DOT11_CURRENT_OPERATION_MODE + OID_DOT11_CURRENT_OPERATION_MODE, + OID_STR_WRAPPER("OID_DOT11_CURRENT_OPERATION_MODE"), + N6C_OID_DOT11_CURRENT_OPERATION_MODE }, { OID_DOT11_FLUSH_BSS_LIST, @@ -349,117 +349,117 @@ RT_OID_ENTRY RT_SUPPORT_OIDs[]= N6C_OID_DOT11_NIC_POWER_STATE }, { - OID_DOT11_RESET_REQUEST, + OID_DOT11_RESET_REQUEST, OID_STR_WRAPPER("OID_DOT11_RESET_REQUEST"), N6C_OID_DOT11_RESET_REQUEST }, { - OID_DOT11_DESIRED_PHY_LIST, + OID_DOT11_DESIRED_PHY_LIST, OID_STR_WRAPPER("OID_DOT11_DESIRED_PHY_LIST"), N6C_OID_DOT11_DESIRED_PHY_LIST }, { - OID_DOT11_AUTO_CONFIG_ENABLED, + OID_DOT11_AUTO_CONFIG_ENABLED, OID_STR_WRAPPER("OID_DOT11_AUTO_CONFIG_ENABLED"), N6C_OID_DOT11_AUTO_CONFIG_ENABLED }, { - OID_DOT11_BEACON_PERIOD, + OID_DOT11_BEACON_PERIOD, OID_STR_WRAPPER("OID_DOT11_BEACON_PERIOD"), N6C_OID_DOT11_BEACON_PERIOD }, { - OID_DOT11_DTIM_PERIOD, + OID_DOT11_DTIM_PERIOD, OID_STR_WRAPPER("OID_DOT11_DTIM_PERIOD"), N6C_OID_DOT11_DTIM_PERIOD }, { - OID_DOT11_DESIRED_SSID_LIST, + OID_DOT11_DESIRED_SSID_LIST, OID_STR_WRAPPER("OID_DOT11_DESIRED_SSID_LIST"), N6C_OID_DOT11_DESIRED_SSID_LIST }, { - OID_GEN_CURRENT_PACKET_FILTER, + OID_GEN_CURRENT_PACKET_FILTER, OID_STR_WRAPPER("OID_GEN_CURRENT_PACKET_FILTER"), N6C_OID_GEN_CURRENT_PACKET_FILTER }, { - OID_DOT11_CURRENT_CHANNEL, + OID_DOT11_CURRENT_CHANNEL, OID_STR_WRAPPER("OID_DOT11_CURRENT_CHANNEL"), N6C_OID_DOT11_CURRENT_CHANNEL }, { - OID_DOT11_DISCONNECT_REQUEST, + OID_DOT11_DISCONNECT_REQUEST, OID_STR_WRAPPER("OID_DOT11_DISCONNECT_REQUEST"), N6C_OID_DOT11_DISCONNECT_REQUEST }, { - OID_DOT11_CONNECT_REQUEST, + OID_DOT11_CONNECT_REQUEST, OID_STR_WRAPPER("OID_DOT11_CONNECT_REQUEST"), N6C_OID_DOT11_CONNECT_REQUEST }, { - OID_GEN_LINK_PARAMETERS, + OID_GEN_LINK_PARAMETERS, OID_STR_WRAPPER("OID_GEN_LINK_PARAMETERS"), N6C_OID_GEN_LINK_PARAMETERS }, { - OID_DOT11_SAFE_MODE_ENABLED, + OID_DOT11_SAFE_MODE_ENABLED, OID_STR_WRAPPER("OID_DOT11_SAFE_MODE_ENABLED"), N6C_OID_DOT11_SAFE_MODE_ENABLED }, { - OID_DOT11_CURRENT_PHY_ID, + OID_DOT11_CURRENT_PHY_ID, OID_STR_WRAPPER("OID_DOT11_CURRENT_PHY_ID"), N6C_OID_DOT11_CURRENT_PHY_ID }, { - OID_GEN_SUPPORTED_LIST, + OID_GEN_SUPPORTED_LIST, OID_STR_WRAPPER("OID_GEN_SUPPORTED_LIST"), N6C_OID_GEN_SUPPORTED_LIST }, { - OID_GEN_VENDOR_DRIVER_VERSION, + OID_GEN_VENDOR_DRIVER_VERSION, OID_STR_WRAPPER("OID_GEN_VENDOR_DRIVER_VERSION"), N6C_OID_GEN_VENDOR_DRIVER_VERSION }, { - OID_PNP_CAPABILITIES, + OID_PNP_CAPABILITIES, OID_STR_WRAPPER("OID_PNP_CAPABILITIES"), N6C_OID_PNP_CAPABILITIES }, { - OID_PNP_QUERY_POWER, + OID_PNP_QUERY_POWER, OID_STR_WRAPPER("OID_PNP_QUERY_POWER"), N6C_OID_PNP_QUERY_POWER }, { - OID_PNP_ENABLE_WAKE_UP, + OID_PNP_ENABLE_WAKE_UP, OID_STR_WRAPPER("OID_PNP_ENABLE_WAKE_UP"), N6C_OID_PNP_ENABLE_WAKE_UP }, { - OID_DOT11_CURRENT_TX_ANTENNA, + OID_DOT11_CURRENT_TX_ANTENNA, OID_STR_WRAPPER("OID_DOT11_CURRENT_TX_ANTENNA"), N6C_OID_DOT11_CURRENT_TX_ANTENNA }, { - OID_DOT11_CURRENT_RX_ANTENNA, + OID_DOT11_CURRENT_RX_ANTENNA, OID_STR_WRAPPER("OID_DOT11_CURRENT_RX_ANTENNA"), N6C_OID_DOT11_CURRENT_RX_ANTENNA }, { - OID_PNP_ADD_WAKE_UP_PATTERN, + OID_PNP_ADD_WAKE_UP_PATTERN, OID_STR_WRAPPER("OID_PNP_ADD_WAKE_UP_PATTERN"), N6C_OID_PNP_ADD_WAKE_UP_PATTERN }, { - OID_PNP_REMOVE_WAKE_UP_PATTERN, + OID_PNP_REMOVE_WAKE_UP_PATTERN, OID_STR_WRAPPER("OID_PNP_REMOVE_WAKE_UP_PATTERN"), N6C_OID_PNP_REMOVE_WAKE_UP_PATTERN }, { - OID_PNP_SET_POWER, + OID_PNP_SET_POWER, OID_STR_WRAPPER("OID_PNP_SET_POWER"), N6C_OID_PNP_SET_POWER } @@ -479,7 +479,7 @@ TranslateRtBssToNdisBss( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PNDIS_WLAN_BSSID_EX pNdisBss = (PNDIS_WLAN_BSSID_EX)pNBss; - + PlatformZeroMemory(pNdisBss, sizeof(NDIS_WLAN_BSSID_EX)); CopyMem(pNdisBss->MacAddress, pRtBss->bdBssIdBuf, 6); @@ -495,7 +495,7 @@ TranslateRtBssToNdisBss( pNdisBss->Privacy = (pRtBss->bdCap & cPrivacy) ? TRUE : FALSE; pNdisBss->Rssi = ( (pRtBss->RSSI+1)>>1 ) - 95; - + //HCT12.0 NDTest switch(pRtBss->wirelessmode) { @@ -518,9 +518,9 @@ TranslateRtBssToNdisBss( default: RT_TRACE(COMP_DBG, DBG_LOUD, ("TranslateRtBssToNdisBss default Ndis802_11DS \n")); pNdisBss->NetworkTypeInUse = Ndis802_11DS; - break; + break; } - + pNdisBss->Configuration.Length = sizeof(NDIS_802_11_CONFIGURATION); pNdisBss->Configuration.BeaconPeriod = pRtBss->bdBcnPer; pNdisBss->Configuration.ATIMWindow = pRtBss->bdIbssParms.atimWin; @@ -548,9 +548,9 @@ TranslateRtBssToNdisBss( { pNdisBss->Length = sizeof(NDIS_WLAN_BSSID_EX); } - + // This is a 4-byte alignment, shall we align it to 8 byte for X64??? - pNdisBss->Length = (pNdisBss->Length+3)&0xfffffffc; + pNdisBss->Length = (pNdisBss->Length+3)&0xfffffffc; } @@ -564,23 +564,23 @@ Query_802_11_CAPABILITY( pu4Byte pulOutLen ) { - static NDIS_802_11_AUTHENTICATION_ENCRYPTION szAuthEnc[] = + static NDIS_802_11_AUTHENTICATION_ENCRYPTION szAuthEnc[] = { - {Ndis802_11AuthModeOpen, Ndis802_11EncryptionDisabled}, + {Ndis802_11AuthModeOpen, Ndis802_11EncryptionDisabled}, {Ndis802_11AuthModeOpen, Ndis802_11Encryption1Enabled}, - {Ndis802_11AuthModeShared, Ndis802_11EncryptionDisabled}, + {Ndis802_11AuthModeShared, Ndis802_11EncryptionDisabled}, {Ndis802_11AuthModeShared, Ndis802_11Encryption1Enabled}, - {Ndis802_11AuthModeWPA, Ndis802_11Encryption2Enabled}, + {Ndis802_11AuthModeWPA, Ndis802_11Encryption2Enabled}, {Ndis802_11AuthModeWPA, Ndis802_11Encryption3Enabled}, - {Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption2Enabled}, + {Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption2Enabled}, {Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption3Enabled}, - {Ndis802_11AuthModeWPANone, Ndis802_11Encryption2Enabled}, + {Ndis802_11AuthModeWPANone, Ndis802_11Encryption2Enabled}, {Ndis802_11AuthModeWPANone, Ndis802_11Encryption3Enabled}, - {Ndis802_11AuthModeWPA2, Ndis802_11Encryption2Enabled}, + {Ndis802_11AuthModeWPA2, Ndis802_11Encryption2Enabled}, {Ndis802_11AuthModeWPA2, Ndis802_11Encryption3Enabled}, - {Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption2Enabled}, + {Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption2Enabled}, {Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption3Enabled} - }; + }; static ULONG ulNumOfPairSupported = sizeof(szAuthEnc)/sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION); NDIS_802_11_CAPABILITY * pCap = (NDIS_802_11_CAPABILITY *)pucBuf; pu1Byte pucAuthEncryptionSupported = (pu1Byte)pCap->AuthenticationEncryptionSupported; @@ -589,8 +589,8 @@ Query_802_11_CAPABILITY( pCap->Length = sizeof(NDIS_802_11_CAPABILITY); if(ulNumOfPairSupported > 1 ) pCap->Length += (ulNumOfPairSupported-1) * sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION); - - pCap->Version = 2; + + pCap->Version = 2; pCap->NoOfPMKIDs = NUM_PMKID_CACHE; // It MUST be set between 3~16, or WZC won't show WPA2 related option in profile. pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported; @@ -665,18 +665,18 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( { if(pMgntInfo->bDisableRtkSupportedP2P) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Ignore query of 0x%08X because bDisableRtkSupportedP2P is turned on\n", Oid)); Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + if(InformationBufferLength < sizeof(u4Byte)) { *BytesNeeded = sizeof(u4Byte); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } *((pu4Byte)InformationBuffer) = (GET_P2P_INFO(pAdapter))->P2PVersion; //(u4Byte)P2P_VERSION; *BytesWritten = sizeof(u4Byte); @@ -684,23 +684,23 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( bInformationCopied = TRUE; } break; - + case OID_RT_P2P_MAX_VERSION: { if(pMgntInfo->bDisableRtkSupportedP2P) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Ignore query of 0x%08X because bDisableRtkSupportedP2P is turned on\n", Oid)); Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + if(InformationBufferLength < sizeof(u4Byte)) { *BytesNeeded = sizeof(u4Byte); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } *((pu4Byte)InformationBuffer) = (u4Byte)P2P_VERSION; *BytesWritten = sizeof(u4Byte); @@ -713,12 +713,12 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( { if(pMgntInfo->bDisableRtkSupportedP2P) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Ignore query of 0x%08X because bDisableRtkSupportedP2P is turned on\n", Oid)); Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + ulInfo = MgntActQuery_P2PMode(pAdapter); //RT_TRACE(COMP_P2P, DBG_LOUD, ("OID_RT_P2P_MODE: %u\n", ulInfo)); } @@ -743,20 +743,20 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( case OID_RT_P2P_GO_INTENT: { PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - + if( InformationBufferLength < sizeof(ucInfo) ) { *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } ucInfo = pP2PInfo->GOIntent >> 1; pInfo = (PVOID) &ucInfo; ulInfoLen = sizeof(ucInfo); - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Get OID_RT_P2P_GO_INTENT: %u\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Get OID_RT_P2P_GO_INTENT: %u\n", ucInfo)); } break; @@ -773,8 +773,8 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( break; } - RT_TRACE(COMP_P2P, DBG_LOUD, - ("OID_RT_P2P_CAPABILITY: current DC=%u, GC=%u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("OID_RT_P2P_CAPABILITY: current DC=%u, GC=%u\n", pP2PInfo->DeviceCapability, pP2PInfo->GroupCapability)); *pDevCap = pP2PInfo->DeviceCapability; @@ -831,13 +831,13 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( Status = NDIS_STATUS_BUFFER_TOO_SHORT; break; } - + CopySsid(SsidBuf, *pSsidLen, pP2PInfo->SSIDPostfixBuf, pP2PInfo->SSIDPostfixLen); RT_PRINT_STR(COMP_P2P, DBG_LOUD, "OID_RT_P2P_GO_SSID\n", SsidBuf, *pSsidLen); *BytesWritten = *pSsidLen + 1; - + ulInfoLen = *BytesWritten; bInformationCopied = TRUE; } @@ -856,14 +856,14 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( Status = NDIS_STATUS_BUFFER_TOO_SHORT; break; } - else if((GET_P2P_INFO(pAdapter)->P2PVersion == 2 || GET_P2P_INFO(pAdapter)->P2PVersion == 3) + else if((GET_P2P_INFO(pAdapter)->P2PVersion == 2 || GET_P2P_INFO(pAdapter)->P2PVersion == 3) && InformationBufferLength < sizeof(P2P_DEVICE_DESCRIPTOR_V2)) { *BytesNeeded = sizeof(P2P_DEVICE_DESCRIPTOR_V2); Status = NDIS_STATUS_BUFFER_TOO_SHORT; break; } - + *BytesWritten = MgntActQuery_P2PSelfDeviceDescriptor(pAdapter, InformationBuffer); bInformationCopied = TRUE; @@ -880,7 +880,7 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( PlatformMoveMemory(InformationBuffer, (GET_P2P_INFO(pAdapter))->InterfaceAddress, 6); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "Get OID_RT_P2P_INTERFACE_ADDRESS: ", InformationBuffer); - + *BytesWritten = 6; bInformationCopied = TRUE; } @@ -896,7 +896,7 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( PlatformMoveMemory(InformationBuffer, (GET_P2P_INFO(pAdapter))->DeviceAddress, 6); RT_PRINT_ADDR(COMP_P2P, DBG_LOUD, "Get OID_RT_P2P_DEVICE_ADDRESS: ", InformationBuffer); - + *BytesWritten = 6; bInformationCopied = TRUE; } @@ -904,20 +904,20 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( case OID_RT_P2P_OP_CHANNEL: { PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - + if( InformationBufferLength < sizeof(ucInfo) ) { *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } ucInfo = pP2PInfo->OperatingChannel; pInfo = (PVOID) &ucInfo; ulInfoLen = sizeof(ucInfo); - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Get OID_RT_P2P_OP_CHANNEL: %u\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Get OID_RT_P2P_OP_CHANNEL: %u\n", ucInfo)); } break; @@ -928,14 +928,14 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } MgntActQuery_P2PListenChannel(pAdapter, &ucInfo); pInfo = (PVOID) &ucInfo; ulInfoLen = sizeof(ucInfo); - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Get OID_RT_P2P_LISTEN_CHANNEL: %u\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Get OID_RT_P2P_LISTEN_CHANNEL: %u\n", ucInfo)); } break; @@ -950,7 +950,7 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( ((pu2Byte)InformationBuffer)[0] = (u2Byte)(GET_P2P_INFO(pAdapter))->ExtListenTimingPeriod; ((pu2Byte)InformationBuffer)[1] = (u2Byte)(GET_P2P_INFO(pAdapter))->ExtListenTimingDuration; - + *BytesWritten = sizeof(u2Byte) * 2; bInformationCopied = TRUE; } @@ -958,29 +958,29 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( case OID_RT_P2P_GO_NEGO_RESULT: { PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - + if( InformationBufferLength < sizeof(ucInfo) ) { *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } ucInfo = pP2PInfo->PreviousGONegoResult; pInfo = (PVOID) &ucInfo; ulInfoLen = sizeof(ucInfo); - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Get OID_RT_P2P_GO_NEGO_RESULT: %u\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Get OID_RT_P2P_GO_NEGO_RESULT: %u\n", ucInfo)); } break; case OID_RT_P2P_CHANNEL_LIST: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_P2P_CHANNEL_LIST\n") ); { - if(MgntActQuery_P2PChannelList(pAdapter, - (u4Byte)InformationBufferLength, - (pu1Byte)InformationBuffer, + if(MgntActQuery_P2PChannelList(pAdapter, + (u4Byte)InformationBufferLength, + (pu1Byte)InformationBuffer, (pu1Byte)InformationBuffer + 1) == RT_STATUS_SUCCESS) { *BytesWritten = *((pu1Byte)InformationBuffer) + 1; @@ -1004,8 +1004,8 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( *BytesNeeded = sizeof(u2Byte); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } - + } + if(RT_STATUS_SUCCESS == P2PGetServiceFragThreshold(pAdapter, (pu2Byte)InformationBuffer)) { Status = NDIS_STATUS_FAILURE; @@ -1024,11 +1024,11 @@ N6CQueryInformationHandleCustomizedWifiDirectOids( } } break; - + } if(Status == NDIS_STATUS_SUCCESS) - { + { if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -1093,25 +1093,25 @@ N6CQueryInformationHandleCustomized11nOids( case OID_RT_GET_11N_MIMPO_RSSI: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_GET_11N_MIMPO_RSSI\n")); //DbgPrint("Query OID_RT_GET_11N_MIMPO_RSSI\n"); - { + { MIMO_RSSI reportRSSI; - + if(InformationBufferLength < sizeof(MIMO_RSSI)) { *BytesNeeded = sizeof(MIMO_RSSI); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + reportRSSI.EnableAntenna = 0x0f; reportRSSI.AntennaA = pAdapter->RxStats.RxRSSIPercentage[ODM_RF_PATH_A]; reportRSSI.AntennaB = pAdapter->RxStats.RxRSSIPercentage[ODM_RF_PATH_B]; reportRSSI.AntennaC = pAdapter->RxStats.RxRSSIPercentage[ODM_RF_PATH_C]; reportRSSI.AntennaD = pAdapter->RxStats.RxRSSIPercentage[ODM_RF_PATH_D]; reportRSSI.Average = GET_UNDECORATED_AVERAGE_RSSI(pAdapter); - - PlatformMoveMemory( InformationBuffer, - &(reportRSSI), sizeof(MIMO_RSSI)); + + PlatformMoveMemory( InformationBuffer, + &(reportRSSI), sizeof(MIMO_RSSI)); *BytesWritten = sizeof(MIMO_RSSI); } return Status; @@ -1122,11 +1122,11 @@ N6CQueryInformationHandleCustomized11nOids( RT_DISP(FIOCTL, IOCTL_STATE, ("[BT]Query OID_RT_MOTOR_BT_802_11_PAL\n")); return Status; } - + //break; case OID_RT_GET_11N_MIMPO_EVM: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_GET_11N_MIMPO_EVM\n")); - { + { MIMO_EVM reportEVM; @@ -1140,8 +1140,8 @@ N6CQueryInformationHandleCustomized11nOids( reportEVM.EVM1 = pAdapter->RxStats.RxEVMPercentage[0]; reportEVM.EVM2 = pAdapter->RxStats.RxEVMPercentage[1]; - PlatformMoveMemory( InformationBuffer, - &(reportEVM), sizeof(MIMO_EVM)); + PlatformMoveMemory( InformationBuffer, + &(reportEVM), sizeof(MIMO_EVM)); *BytesWritten = sizeof(MIMO_EVM); } @@ -1156,7 +1156,7 @@ N6CQueryInformationHandleCustomized11nOids( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, MgntActQuery_RT_11N_INITIAL_TX_RATES:%d Mbps\n",ulInfo/10000)); } break; - + case OID_RT_11N_TX_RETRY_COUNT://added by vivi, 20080604 ulInfo =(u4Byte) pAdapter->TxStats.NumTxRetryCount; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_RT_11N_TX_RETRY_COUNT:%d Mbps\n",ulInfo)); @@ -1165,14 +1165,14 @@ N6CQueryInformationHandleCustomized11nOids( case OID_RT_11N_UI_SHOW_TX_RATE: //Add by Jacken 2008/04/14 ulInfo = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter,FALSE, FALSE)/2)*10000; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, MgntActQuery_RT_11N_USER_SHOW_RATES-TX:%d Mbps\n",ulInfo/10000)); - break; + break; case OID_RT_11N_UI_SHOW_RX_RATE: //Add by Jacken 2008/05/12 ulInfo = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter,TRUE, FALSE)/2)*10000; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, MgntActQuery_RT_11N_USER_SHOW_RATES-RX:%d Mbps\n",ulInfo/10000)); - break; + break; - case OID_RT_CURRENT_BANDWIDTH: + case OID_RT_CURRENT_BANDWIDTH: ulInfo = pMgntInfo->dot11CurrentChannelBandWidth; break; @@ -1188,7 +1188,7 @@ N6CQueryInformationHandleCustomized11nOids( { ulInfoLen = *BytesWritten = ChnlLen; bInformationCopied = TRUE; - } + } } break; @@ -1206,7 +1206,7 @@ N6CQueryInformationHandleCustomized11nOids( bInformationCopied = TRUE; } break; - + case OID_RT_11N_FORCED_LDPC: { PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; @@ -1214,7 +1214,7 @@ N6CQueryInformationHandleCustomized11nOids( ulInfoLen = 1; } break; - + case OID_RT_11N_FORCED_STBC: { PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; @@ -1222,19 +1222,19 @@ N6CQueryInformationHandleCustomized11nOids( ulInfoLen = 1; } break; - + case OID_RT_BAND_SELECT: { - ulInfo = pMgntInfo->RegPreferBand; + ulInfo = pMgntInfo->RegPreferBand; RT_TRACE(COMP_OID_SET,DBG_LOUD,("Qyery PreferBand=%d\n", pMgntInfo->RegPreferBand)); ulInfoLen = 4; } break; - + } if(Status == NDIS_STATUS_SUCCESS) - { + { if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -1373,12 +1373,12 @@ N6CQueryInformationHandleCustomizedSecurityOids( PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo = (PNDIS_802_11_ASSOCIATION_INFORMATION)(pMgntInfo->SecurityInfo.AssocInfo); MgntActQuery_802_11_ASSOCIATION_INFORMATION(pAdapter, pAssocInfo); - + pInfo = pAssocInfo; ulInfoLen = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + \ pAssocInfo->RequestIELength + \ pAssocInfo->ResponseIELength; - + RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_ASSOCIATION_INFORMATION, length=%d\n", ulInfoLen ) ); RT_PRINT_DATA( COMP_SEC, DBG_LOUD, "pInfo", pInfo, ulInfoLen ); } @@ -1395,14 +1395,14 @@ N6CQueryInformationHandleCustomizedSecurityOids( else ulInfo = pMgntInfo->SecurityInfo.EncryptionStatus; break; - + case RT802_11Encryption2Enabled: if( pMgntInfo->SecurityInfo.KeyLen[PAIRWISE_KEYIDX] == 0) ulInfo = RT802_11Encryption2KeyAbsent; else ulInfo = pMgntInfo->SecurityInfo.EncryptionStatus; break; - + case RT802_11Encryption3Enabled: // For AES, Added by Annie, 2005-09-15. if( pMgntInfo->SecurityInfo.KeyLen[PAIRWISE_KEYIDX] == 0) // Should I check pMgntInfo->SecurityInfo.AESKeyBuf len??? @@ -1443,7 +1443,7 @@ N6CQueryInformationHandleCustomizedSecurityOids( } if(Status == NDIS_STATUS_SUCCESS) - { + { if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -1516,7 +1516,7 @@ N6CQueryInformationHandleCustomizedOids( { Status = NDIS_STATUS_ADAPTER_NOT_READY; } - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_BSSID: %02X:%02X:%02X:%02X:%02X:%02X\n", + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_BSSID: %02X:%02X:%02X:%02X:%02X:%02X\n", pMgntInfo->Bssid[0], pMgntInfo->Bssid[1], pMgntInfo->Bssid[2], pMgntInfo->Bssid[3], pMgntInfo->Bssid[4], pMgntInfo->Bssid[5])); break; @@ -1556,7 +1556,7 @@ N6CQueryInformationHandleCustomizedOids( u2Byte SupportedBand = pAdapter->HalFunc.GetSupportedWirelessModeHandler(pAdapter); u1Byte index, num=0; - struct{WIRELESS_MODE wm; NDIS_802_11_NETWORK_TYPE nt; } BandSetList[3] = + struct{WIRELESS_MODE wm; NDIS_802_11_NETWORK_TYPE nt; } BandSetList[3] = { {WIRELESS_MODE_B, Ndis802_11DS}, {(WIRELESS_MODE_N_5G|WIRELESS_MODE_A), Ndis802_11OFDM5}, {(WIRELESS_MODE_AC_24G|WIRELESS_MODE_N_24G|WIRELESS_MODE_G), Ndis802_11OFDM24} }; @@ -1628,12 +1628,12 @@ N6CQueryInformationHandleCustomizedOids( *BytesNeeded = sizeof(s4Byte); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } - + } + *((ps4Byte)InformationBuffer) = MgntActQuery_TX_POWER_DBM(pAdapter); ulInfoLen = sizeof(s4Byte); - *BytesWritten = ulInfoLen; + *BytesWritten = ulInfoLen; bInformationCopied = TRUE; RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_TX_POWER: %d dBm\n", *((ps4Byte)InformationBuffer))); @@ -1656,7 +1656,7 @@ N6CQueryInformationHandleCustomizedOids( pAdapter->HalFunc.GetHalDefVarHandler(pAdapter, HAL_DEF_MAX_TX_POWER_DBM, ((pu1Byte)InformationBuffer + 4)); ulInfoLen = 2 * sizeof(s4Byte); - *BytesWritten = ulInfoLen; + *BytesWritten = ulInfoLen; bInformationCopied = TRUE; RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_TX_POWER_RANGE: min = %d dBm, max = %d\n", *((ps4Byte)InformationBuffer), *(((ps4Byte)InformationBuffer + 1)))); } @@ -1674,9 +1674,9 @@ N6CQueryInformationHandleCustomizedOids( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_RSSI: PWDBAllCnt %d PWDBAllOLDCnt %d\n", pAdapter->RxStats.PWDBAllCnt, pAdapter->RxStats.PWDBAllOldCnt)); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_RSSI: diff %d pwdbdiff %d\n", diff, pwdball_diff)); - + pAdapter->RxStats.PWDBAllOldCnt = pAdapter->RxStats.PWDBAllCnt; - + if(diff >= 3) // calculate more than 3 times of rssi { lInfo = (((pwdball_diff/diff)+1)>>1)-95; @@ -1735,7 +1735,7 @@ N6CQueryInformationHandleCustomizedOids( case OID_802_11_RTS_THRESHOLD: case OID_RT_802_11_RTS_THRESHOLD: - ulInfo = (ULONG)MgntActQuery_802_11_RTS_THRESHOLD(pAdapter); + ulInfo = (ULONG)MgntActQuery_802_11_RTS_THRESHOLD(pAdapter); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_RTS_THRESHOLD: %d\n", ulInfo)); break; @@ -1782,7 +1782,7 @@ N6CQueryInformationHandleCustomizedOids( pNdisCommon->TmpConfig80211.FHConfig.DwellTime = 0; pInfo = &(pNdisCommon->TmpConfig80211); - ulInfoLen = pNdisCommon->TmpConfig80211.Length; + ulInfoLen = pNdisCommon->TmpConfig80211.Length; } RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_802_11_CONFIGURATION: \n")); break; @@ -1802,7 +1802,7 @@ N6CQueryInformationHandleCustomizedOids( { *((pu4Byte)InformationBuffer) = pNdisCommon->RegPowerSaveMode; *((pu4Byte)((pu1Byte)InformationBuffer + 4)) = (u4Byte)pMgntInfo->PsPollType; - // Setup variables to return. + // Setup variables to return. *BytesWritten = 8; bInformationCopied = TRUE; } @@ -1814,7 +1814,7 @@ N6CQueryInformationHandleCustomizedOids( //TODO: ulInfo = Ndis802_11PrivFilterAcceptAll; RT_TRACE( COMP_OID_QUERY, DBG_WARNING, ("OID_802_11_PRIVACY_FILTER Querying (Warning: Old OID in NDIS5, do nothing)\n") ); - break; + break; case OID_RT_GET_SCAN_IN_PROGRESS: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_GET_SCAN_IN_PROGRESS.\n")); @@ -1831,13 +1831,13 @@ N6CQueryInformationHandleCustomizedOids( if (pAdapter->RxStats.SignalQuality >= 80) { ulInfo = 100; - } + } else if (pAdapter->RxStats.SignalQuality <= 79) { ulInfo = pAdapter->RxStats.SignalQuality+20; } - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("OID_RT_GET_SIGNAL_QUALITY %x.\n", ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("OID_RT_GET_SIGNAL_QUALITY %x.\n", ulInfo)); } else @@ -1876,7 +1876,7 @@ N6CQueryInformationHandleCustomizedOids( } else if(ACTING_AS_AP(pAdapter) ||IsExtAPModeExist(pAdapter)) { - //sherry added for ui show correct channel for AP mode 20110517 + //sherry added for ui show correct channel for AP mode 20110517 ulInfo = pMgntInfo->dot11CurrentChannelNumber; } @@ -1887,7 +1887,7 @@ N6CQueryInformationHandleCustomizedOids( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_GET_CHANNEL: %d\n", ulInfo)); break; - + case OID_RT_GET_CHANNEL_LIST: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_GET_CHANNEL_LIST.\n")); { @@ -1898,9 +1898,9 @@ N6CQueryInformationHandleCustomizedOids( RT_CHNL_LIST_ENTRY ChnlListEntryArray[MAX_CHANNEL_NUM] = {0}; u1Byte ChannelLen; BOOLEAN bIndicateToUI = FALSE; - - + + if(IS_DUAL_BAND_SUPPORT(pAdapter)) { ChannelLen = RtGetDualBandChannel(pAdapter, ChnlListEntryArray); @@ -1927,8 +1927,8 @@ N6CQueryInformationHandleCustomizedOids( ChannelLen = pChannelList->ChannelLen; } - - + + RT_TRACE(COMP_OID_QUERY, DBG_LOUD,("OID_RT_EASY_COCURRENT_GET_CHANNEL_INFO channelLen 2 %d \n",ChannelLen)); @@ -1939,8 +1939,8 @@ N6CQueryInformationHandleCustomizedOids( } cbBufSizeRequired = 2 + ChannelLen; - - // Check output buffer length. + + // Check output buffer length. if(InformationBufferLength < cbBufSizeRequired) { *BytesNeeded = cbBufSizeRequired; @@ -1949,9 +1949,9 @@ N6CQueryInformationHandleCustomizedOids( } pList = (pu1Byte)InformationBuffer; - // A tag identified by UI. - pList[0] = 0xAA; - + // A tag identified by UI. + pList[0] = 0xAA; + for(i = 0; i < ChannelLen; i++) { bIndicateToUI = FALSE; @@ -1980,9 +1980,9 @@ N6CQueryInformationHandleCustomizedOids( } // Length of channel list. - pList[1] = chnlcount; + pList[1] = chnlcount; cbBufSizeRequired = chnlcount + 2; - // Setup variables to return. + // Setup variables to return. *BytesWritten = cbBufSizeRequired; bInformationCopied = TRUE; } @@ -2018,13 +2018,13 @@ N6CQueryInformationHandleCustomizedOids( ChannelLen = pChannelList->ChannelLen; } - + RT_TRACE(COMP_EASY_CONCURRENT,DBG_LOUD,("OID_RT_EASY_COCURRENT_GET_CHANNEL_INFO channelLen 2 %d \n",ChannelLen)); cbBufSizeRequired = 2 + ChannelLen; - - // Check output buffer length. + + // Check output buffer length. if(InformationBufferLength < cbBufSizeRequired) { *BytesNeeded = cbBufSizeRequired; @@ -2033,8 +2033,8 @@ N6CQueryInformationHandleCustomizedOids( } pList = (pu1Byte)InformationBuffer; - // A tag identified by UI. - pList[0] = 0xAA; + // A tag identified by UI. + pList[0] = 0xAA; { for(i = 0; i < ChannelLen; i++) @@ -2057,7 +2057,7 @@ N6CQueryInformationHandleCustomizedOids( if(bIndicateToUI) { -//change by ylb for UI get channel num error 20110906 +//change by ylb for UI get channel num error 20110906 pList[chnlcount+2] = pChannelList->ChnlListEntry[i].ChannelNum; chnlcount++; } @@ -2067,15 +2067,15 @@ N6CQueryInformationHandleCustomizedOids( } // Length of channel list. - pList[1] = chnlcount; + pList[1] = chnlcount; cbBufSizeRequired = chnlcount + 2; - // Setup variables to return. + // Setup variables to return. *BytesWritten = cbBufSizeRequired; bInformationCopied = TRUE; } RT_TRACE(COMP_EASY_CONCURRENT,DBG_LOUD,(" <==== OID_RT_EASY_COCURRENT_GET_CHANNEL_INFO\n")); - break; + break; case OID_RT_GET_TOTAL_TX_BYTES: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_GET_TOTAL_TX_BYTES.\n")); @@ -2110,27 +2110,27 @@ N6CQueryInformationHandleCustomizedOids( // Get supported wireless mode. btSupportedWirelessMode = pAdapter->HalFunc.GetSupportedWirelessModeHandler(pAdapter); - // Fill up return parameter according to supported wireless mode. + // Fill up return parameter according to supported wireless mode. // In high byte of a WORD, e.g. 0x07 means a(bit 2),g(bit 1),b(bit 0). if(btSupportedWirelessMode & WIRELESS_MODE_B) { - ulInfo |= 0x0100; + ulInfo |= 0x0100; } if(btSupportedWirelessMode & WIRELESS_MODE_G) { - ulInfo |= 0x0200; + ulInfo |= 0x0200; } if(btSupportedWirelessMode & WIRELESS_MODE_A) { - ulInfo |= 0x0400; + ulInfo |= 0x0400; } if(btSupportedWirelessMode & WIRELESS_MODE_N_24G) { - ulInfo |= 0x0800; + ulInfo |= 0x0800; } if(btSupportedWirelessMode & WIRELESS_MODE_N_5G) { - ulInfo |= 0x1000; + ulInfo |= 0x1000; } } RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_SUPPORTED_WIRELESS_MODE: %x\n", ulInfo)); @@ -2141,55 +2141,55 @@ N6CQueryInformationHandleCustomizedOids( WIRELESS_MODE WirelessMode; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_WIRELESS_MODE.\n")); - - // Check output buffer length. + + // Check output buffer length. if(InformationBufferLength < sizeof(WIRELESS_MODE)) { *BytesNeeded = sizeof(WIRELESS_MODE); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + // Get wireless mode. WirelessMode = MgntActQuery_802_11_WIRELESS_MODE(pAdapter); - // Fill up paramters to return. + // Fill up paramters to return. *((WIRELESS_MODE*)InformationBuffer) = WirelessMode; *BytesWritten = sizeof(WIRELESS_MODE); bInformationCopied = TRUE; - + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_WIRELESS_MODE: %d\n", WirelessMode)); } - break; + break; case OID_RT_CURRENT_WLRELESSMODE: { WIRELESS_MODE WirelessMode; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_CURRENT_WLRELESSMODE.\n")); - - // Check output buffer length. + + // Check output buffer length. if(InformationBufferLength < sizeof(WIRELESS_MODE)) { *BytesNeeded = sizeof(WIRELESS_MODE); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + // Get wireless mode. WirelessMode = pAdapter->MgntInfo.dot11CurrentWirelessMode; - // Fill up paramters to return. + // Fill up paramters to return. *((WIRELESS_MODE*)InformationBuffer) = WirelessMode; *BytesWritten = sizeof(WIRELESS_MODE); bInformationCopied = TRUE; - + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_CURRENT_WLRELESSMODE: %d\n", WirelessMode)); } case OID_RT_GET_DRIVER_UP_DELTA_TIME: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_GET_DRIVER_UP_DELTA_TIME.\n")); - { + { u8Byte now_time; now_time = PlatformGetCurrentTime(); // in micro-second. @@ -2356,15 +2356,15 @@ N6CQueryInformationHandleCustomizedOids( WIRELESS_MODE WirelessMode; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_GET_BSS_WIRELESS_MODE.\n")); - - // Check output buffer length. + + // Check output buffer length. if(InformationBufferLength < sizeof(WIRELESS_MODE)) { *BytesNeeded = sizeof(WIRELESS_MODE); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + // Get wireless mode of current BSS. if(pMgntInfo->mAssoc || pMgntInfo->mIbss) { @@ -2372,26 +2372,26 @@ N6CQueryInformationHandleCustomizedOids( } else { - WirelessMode = WIRELESS_MODE_UNKNOWN; + WirelessMode = WIRELESS_MODE_UNKNOWN; } - // Fill up paramters to return. + // Fill up paramters to return. *((WIRELESS_MODE*)InformationBuffer) = WirelessMode; *BytesWritten = sizeof(WIRELESS_MODE); bInformationCopied = TRUE; - + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_GET_BSS_WIRELESS_MODE: %d\n", WirelessMode)); } - break; + break; case OID_RT_AP_GET_CURRENT_TIME_STAMP: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_AP_GET_CURRENT_TIME_STAMP.\n")); { PADAPTER pTargetAdapter = GetDefaultAdapter(pAdapter); // get the first AP mode. Neo Test 123, But this oid need to be modified for more APs. - + // - // We shall redirect to proper adapter for UI query. - // Otherwise, UI would retrieve abnormal value. + // We shall redirect to proper adapter for UI query. + // Otherwise, UI would retrieve abnormal value. // Added by Roger, 2009.10.07. // while(pTargetAdapter != NULL) @@ -2428,13 +2428,13 @@ N6CQueryInformationHandleCustomizedOids( PADAPTER pTargetAdapter = GetDefaultAdapter(pAdapter); // - // We shall redirect to proper adapter for UI query. - // Otherwise, UI would retrieve abnormal value. + // We shall redirect to proper adapter for UI query. + // Otherwise, UI would retrieve abnormal value. // Added by Roger, 2009.10.07. // // Determine size of buffer needed. - if(InformationBufferLength < ulBufRequired) + if(InformationBufferLength < ulBufRequired) { *BytesNeeded = ulBufRequired; *BytesWritten = 0; @@ -2452,7 +2452,7 @@ N6CQueryInformationHandleCustomizedOids( pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } - // Initialize output buffer. + // Initialize output buffer. PlatformZeroMemory(InformationBuffer, ulBufRequired); // Fill up total size and size of each entry. @@ -2478,7 +2478,7 @@ N6CQueryInformationHandleCustomizedOids( } } - *BytesWritten = ulBufRequired; + *BytesWritten = ulBufRequired; bInformationCopied = TRUE; } RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_AP_GET_ASSOCIATED_STATION_LIST.\n")); @@ -2489,7 +2489,7 @@ N6CQueryInformationHandleCustomizedOids( ulInfo = pMgntInfo->bDisableScanByOID; } break; - + case OID_RT_MH_VENDER_ID: // Added by Annie, 2005-07-20. RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("OID_RT_MH_VENDER_ID(): Query OID_RT_MH_VENDER_ID. (MeetingHouse)\n")); { @@ -2519,7 +2519,7 @@ N6CQueryInformationHandleCustomizedOids( } RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("OID_RT_RF_OFF: eRfPowerState: 0x%X, RFOff: 0x%X\n", eRfPowerState, ulInfo)); } - break; + break; case OID_RT_DBG_COMPONENT: ul64Info = GlobalDebugComponents; @@ -2547,15 +2547,15 @@ N6CQueryInformationHandleCustomizedOids( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_FILTER_DEFAULT_PERMITED\n")); { ulInfo = (ULONG)(pMgntInfo->bDefaultPermited); - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_FILTER_DEFAULT_PERMITED: %d\n", ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_FILTER_DEFAULT_PERMITED: %d\n", ulInfo)); } break; - + case OID_RT_MAC_FILTER_TYPE: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_MAC_FILTER_TYPE\n")); { ulInfo = (ULONG)(pMgntInfo->LockType); - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_MAC_FILTER_TYPE: %d\n", ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_MAC_FILTER_TYPE: %d\n", ulInfo)); } break; @@ -2570,14 +2570,14 @@ N6CQueryInformationHandleCustomizedOids( LockListSize = sizeof(u4Byte) + pMgntInfo->LockedSTACount*6; else if(pMgntInfo->LockType ==MAC_FILTER_REJECT) LockListSize = sizeof(u4Byte) + pMgntInfo->LockedSTACount_Reject*6; - + if( InformationBufferLength < LockListSize ) { *BytesNeeded = LockListSize; *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + if(pMgntInfo->LockType == MAC_FILTER_ACCEPT) { *pNumOfLockedAddr = pMgntInfo->LockedSTACount; @@ -2590,17 +2590,17 @@ N6CQueryInformationHandleCustomizedOids( PlatformMoveMemory( pLockListBuffer, pMgntInfo->LockedSTAList_Reject, pMgntInfo->LockedSTACount_Reject*6 ); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_LOCKED_STA_ADDRESS: LockedSTACount_Reject=%d\n", pMgntInfo->LockedSTACount_Reject)); } - + *BytesWritten = LockListSize; bInformationCopied = TRUE; - + // RT_PRINT_ADDRS(COMP_OID_QUERY, DBG_LOUD, ("Locked STA Address"), LockListBuffer, pMgntInfo->LockedSTACount ); RT_PRINT_DATA(COMP_OID_QUERY, DBG_LOUD, ("InformationBuffer"), InformationBuffer, InformationBufferLength ); } break; - - case OID_RT_GET_DEFAULT_KEY_ID: + + case OID_RT_GET_DEFAULT_KEY_ID: { if( InformationBufferLength < sizeof(usInfo) ) { @@ -2623,7 +2623,7 @@ N6CQueryInformationHandleCustomizedOids( *BytesNeeded = sizeof(usInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } usInfo = pMgntInfo->dot11BeaconPeriod; pInfo = (PVOID) &usInfo; @@ -2639,7 +2639,7 @@ N6CQueryInformationHandleCustomizedOids( *BytesNeeded = sizeof(usInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } usInfo = (USHORT)pMgntInfo->dot11DtimPeriod; pInfo = (PVOID) &usInfo; @@ -2655,7 +2655,7 @@ N6CQueryInformationHandleCustomizedOids( *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } switch(pMgntInfo->dot11CurrentPreambleMode) { @@ -2690,7 +2690,7 @@ N6CQueryInformationHandleCustomizedOids( *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } ucInfo = (ACTING_AS_AP(pAdapter) == TRUE) ? 1 : 0; pInfo = (PVOID) &ucInfo; @@ -2703,13 +2703,13 @@ N6CQueryInformationHandleCustomizedOids( int i; UCHAR count_temp = 0; PRT_WLAN_STA CurrAsocEntry =pMgntInfo->AsocEntry ; - + if( InformationBufferLength < sizeof(ucInfo) ) { *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } for(i = 0; i < ASSOCIATE_ENTRY_NUM; i++) { if( CurrAsocEntry[i].bUsed && CurrAsocEntry[i].bAssociated) @@ -2730,31 +2730,31 @@ N6CQueryInformationHandleCustomizedOids( if( (InformationBufferLength-1) > length_temp || (InformationBufferLength-1) ==0) InformationBufferLength = length_temp+1; - + ((pu1Byte)InformationBuffer)[0] = (UCHAR)InformationBufferLength-1; HAL_ReadCloudKey_Ex(pAdapter,(UCHAR)InformationBufferLength-1,offset,(pu1Byte)InformationBuffer+1); ulInfoLen = InformationBufferLength; - *BytesWritten = InformationBufferLength; - + *BytesWritten = InformationBufferLength; + bInformationCopied = TRUE; - - RT_PRINT_DATA( COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_AP_GET_CLOUD_KEY_EX: "), + + RT_PRINT_DATA( COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_AP_GET_CLOUD_KEY_EX: "), InformationBuffer, ulInfoLen ); } break; case OID_RT_AP_SET_BEACON_START: { PMGNT_INFO pDefMgntInfo = GetDefaultMgntInfo(pAdapter); - + if( InformationBufferLength < sizeof(ucInfo) ) { *BytesNeeded = sizeof(ucInfo); *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } - //2014/02/22 MH We can not read USB reg here otherwise the TX pause will be incorrect. + //2014/02/22 MH We can not read USB reg here otherwise the TX pause will be incorrect. pDefMgntInfo->DelayApBeaconCnt = (u1Byte)pDefMgntInfo->Regbcndelay; ucInfo =TRUE; @@ -2795,7 +2795,7 @@ N6CQueryInformationHandleCustomizedOids( pu1Byte pWdsApList = (pu1Byte)InformationBuffer + sizeof(u4Byte); u4Byte ListSize = sizeof(u4Byte) + 1*6; - if( InformationBufferLength < ListSize ) + if( InformationBufferLength < ListSize ) { *BytesNeeded = ListSize; *BytesWritten = 0; @@ -2803,18 +2803,18 @@ N6CQueryInformationHandleCustomizedOids( } // Note that, in current architecture, we only support 1 WDS AP. - // For more than one WDS AP to support, we must implment "learning" + // For more than one WDS AP to support, we must implment "learning" // and "802.1d spanning tree". 2006.06.12, by rcnjko. *pNumOfWdsAp = 1; PlatformMoveMemory( pWdsApList, pMgntInfo->WdsApAddr, 1*6 ); *BytesWritten = ListSize; bInformationCopied = TRUE; - RT_PRINT_DATA(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_AP_WDS_AP_LIST: "), + RT_PRINT_DATA(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_AP_WDS_AP_LIST: "), InformationBuffer, ListSize ); } break; - + case OID_RT_GET_PSP_XLINK_STATUS: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_GET_PSP_XLINK_STATUS:\n")); { @@ -2824,14 +2824,14 @@ N6CQueryInformationHandleCustomizedOids( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + ucInfo = pMgntInfo->bDefaultPSPXlinkMode; // return default settings ONLY which was set by UI or registry. pInfo = &ucInfo; ulInfoLen = sizeof(ucInfo); } break; - + case OID_RT_GET_WMM_ENABLE: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_GET_WMM_ENABLE:\n")); { @@ -2841,7 +2841,7 @@ N6CQueryInformationHandleCustomizedOids( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + if (pMgntInfo->pStaQos->QosCapability & QOS_WMM) { ulInfo = TRUE; @@ -2863,11 +2863,11 @@ N6CQueryInformationHandleCustomizedOids( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + ulInfo = pMgntInfo->pStaQos->b4ac_Uapsd & 0x0F; } break; - + case OID_RT_DOT11D: { ucInfo = IS_DOT11D_ENABLE(pMgntInfo); @@ -2882,7 +2882,7 @@ N6CQueryInformationHandleCustomizedOids( if( !MgntActQuery_DrvLogTypeList( pAdapter, InformationBufferLength, - (PDRV_LOG_TYPE_LIST_T)InformationBuffer, + (PDRV_LOG_TYPE_LIST_T)InformationBuffer, BytesWritten, BytesNeeded)) { @@ -2899,7 +2899,7 @@ N6CQueryInformationHandleCustomizedOids( if( !MgntActQuery_DrvLogAttrList( pAdapter, InformationBufferLength, - (PDRV_LOG_ATTR_LIST_T)InformationBuffer, + (PDRV_LOG_ATTR_LIST_T)InformationBuffer, BytesWritten, BytesNeeded)) { @@ -2925,7 +2925,7 @@ N6CQueryInformationHandleCustomizedOids( pAdapter, *pLogType, InformationBufferLength, - (PDRV_LOG_DATA_LIST_T)InformationBuffer, + (PDRV_LOG_DATA_LIST_T)InformationBuffer, BytesWritten, BytesNeeded)) { @@ -3022,12 +3022,12 @@ N6CQueryInformationHandleCustomizedOids( case OID_RT_GET_ROAM_COUNT: { - + pMgntInfo->RoamingCount=256; usInfo=pMgntInfo->RoamingCount; pInfo=(PVOID )&usInfo; ulInfoLen=sizeof(usInfo); - + RT_TRACE(COMP_POWER, DBG_LOUD, ("Query OID_RT_GET_ROAM_COUNT: \n")); break; } @@ -3036,14 +3036,14 @@ N6CQueryInformationHandleCustomizedOids( pMgntInfo->DisconnectCount=65500; usInfo=pMgntInfo->DisconnectCount; pInfo=(PVOID )&usInfo; - ulInfoLen=sizeof(usInfo); + ulInfoLen=sizeof(usInfo); RT_TRACE(COMP_POWER, DBG_LOUD, ("Query OID_RT_GET_DISASSOC_COUNT: \n")); break; - } + } case OID_RT_HOST_SUSPEND_STATUS: - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_FPGA_SUSPEND_STATUS, (pu1Byte)(&ulInfo)); + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_FPGA_SUSPEND_STATUS, (pu1Byte)(&ulInfo)); break; case OID_RT_AP_GET_VWIFI_STATUS: @@ -3054,7 +3054,7 @@ N6CQueryInformationHandleCustomizedOids( } case OID_RT_ANTENNA_DETECTED_INFO: - { + { #if(defined(CONFIG_ANT_DETECTION)) if(InformationBufferLength < sizeof(ANT_DETECTED_INFO)) { @@ -3063,16 +3063,16 @@ N6CQueryInformationHandleCustomizedOids( *BytesWritten = 0; return Status; } - + PlatformZeroMemory(InformationBuffer, sizeof(ANT_DETECTED_INFO)); // Retrieve previous antenna detection information in initialization process, added by Roger, 2012.11.27. pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_ANTENNA_DETECTED_INFO , (pu1Byte)InformationBuffer); - + ulInfoLen = sizeof(ANT_DETECTED_INFO); - *BytesWritten = ulInfoLen; + *BytesWritten = ulInfoLen; bInformationCopied = TRUE; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_ANTENNA_DETECTED_INFO: \n")); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_ANTENNA_DETECTED_INFO: \n")); #endif break; } @@ -3089,7 +3089,7 @@ N6CQueryInformationHandleCustomizedOids( ulInfo = (u4Byte)pMgntInfo->bStopScan; } break; - + case OID_RT_FORCED_DATA_RATE: { *BytesNeeded = sizeof(u1Byte); @@ -3107,7 +3107,7 @@ N6CQueryInformationHandleCustomizedOids( #endif { Status = NDIS_STATUS_NOT_SUPPORTED; - return Status; + return Status; } *BytesWritten = ulInfoLen; bInformationCopied = TRUE; @@ -3121,7 +3121,7 @@ N6CQueryInformationHandleCustomizedOids( *BytesWritten = 4; for(i=0;iNumberOfItems;i++) { - + NdisMoveMemory(pCusBSSIDList->bssidentry[i].SsIdBuf,pMgntInfo->bssDesc4Query[i].bdSsIdBuf,pMgntInfo->bssDesc4Query[i].bdSsIdLen); pCusBSSIDList->bssidentry[i].SsIdLen = pMgntInfo->bssDesc4Query[i].bdSsIdLen; NdisMoveMemory(pCusBSSIDList->bssidentry[i].BssIdBuf,pMgntInfo->bssDesc4Query[i].bdBssIdBuf,6); @@ -3139,7 +3139,7 @@ N6CQueryInformationHandleCustomizedOids( } if(Status == NDIS_STATUS_SUCCESS) - { + { if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -3182,9 +3182,9 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( ULONG ulInfoLen = sizeof(ulInfo); ULONG ulBytesAvailable = ulInfoLen; BOOLEAN bInformationCopied = FALSE; - + FunctionIn(COMP_OID_QUERY); - + *BytesWritten = 0; *BytesNeeded = 0; @@ -3197,7 +3197,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( case OID_RT_PRO_GET_PHY_PARAM_VERSION: case OID_RT_DEVICE_ID_INFO: - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_DEVICE_ID_INFO: \n")); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_DEVICE_ID_INFO: \n")); { PRT_SDIO_ID_INFO pSdioIdInfo = (PRT_SDIO_ID_INFO)InformationBuffer; @@ -3210,10 +3210,10 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( // Fill up member of RT_DEVICE_ID_HEADER. pSdioIdInfo->DevIDHeader.RtWlanDevTag = RT_DEVICE_ID_INFO_TAG; - + pSdioIdInfo->DevIDHeader.ChipID = GET_CHIP_ID(Adapter); pSdioIdInfo->DevIDHeader.ChipVer = GET_CHIP_VERSION(Adapter); - + pSdioIdInfo->DevIDHeader.BusType = RT_DEVICE_ID_SDIO; RT_TRACE(COMP_INIT, DBG_LOUD, ("chip id 0x%x chipver 0x%x\n", pSdioIdInfo->DevIDHeader.ChipID, pSdioIdInfo->DevIDHeader.ChipVer)); @@ -3225,19 +3225,19 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( pSdioIdInfo->VID = 0x024c; pSdioIdInfo->PID = 0x8723; pSdioIdInfo->RevID = 0; - pSdioIdInfo->InterfaceIdx = 0; + pSdioIdInfo->InterfaceIdx = 0; *BytesWritten = sizeof(RT_SDIO_ID_INFO); bInformationCopied = TRUE; - RT_TRACE(COMP_MP,DBG_LOUD,("==>OID_RT_DEVICE_ID_INFO, (ChipID, ChipVer) = (0x%X, 0x%X)\n", - pSdioIdInfo->DevIDHeader.ChipID, pSdioIdInfo->DevIDHeader.ChipVer)); + RT_TRACE(COMP_MP,DBG_LOUD,("==>OID_RT_DEVICE_ID_INFO, (ChipID, ChipVer) = (0x%X, 0x%X)\n", + pSdioIdInfo->DevIDHeader.ChipID, pSdioIdInfo->DevIDHeader.ChipVer)); RT_TRACE(COMP_MP, DBG_LOUD, ("===> OID_RT_DEVICE_ID_INFO: Adapter->HardwareType = %d\n", Adapter->HardwareType)); } break; case OID_RT_PRO8187_WI_POLL: - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_PRO8187_WI_POLL: \n")); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_PRO8187_WI_POLL: \n")); { PRT8187DBGWIPARAM pWIParam = (PRT8187DBGWIPARAM)InformationBuffer; PRT_NDIS_DBG_CONTEXT pDbgCtx = &(Adapter->ndisDbgCtx); @@ -3248,14 +3248,14 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( { pDbgCtx = &(GetDefaultAdapter(Adapter)->ndisDbgCtx); } - + if(InformationBufferLength < sizeof(ULONG)*4) { *BytesNeeded = sizeof(ULONG)*4; *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + if(pDbgCtx->bDbgWorkItemInProgress) { // DbgWorkItem is in progress. pWIParam->bDbgActCompleted = FALSE; @@ -3265,7 +3265,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( { // DbgWorkItem is completed. pWIParam->bDbgActCompleted = TRUE; pWIParam->IoValue = pDbgCtx->DbgIoValue; - + pWIParam->outLen = pDbgCtx->DbgOutLen; if((InformationBufferLength>=sizeof(RT8187DBGWIPARAM)) && (pWIParam->outLen>0)) { @@ -3285,17 +3285,17 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( ulInfo = HAL_GetCutVersion(Adapter); ulInfoLen = 4; } - break; + break; - case OID_RT_PRO_GET_EFUSE_UTILIZE: + case OID_RT_PRO_GET_EFUSE_UTILIZE: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_PRO_GET_EFUSE_UTILIZE\n")); - Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_EFUSE_USAGE, (pu1Byte)&ulInfo); + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_EFUSE_USAGE, (pu1Byte)&ulInfo); break; - case OID_RT_PRO_CHK_AUTOLOAD: + case OID_RT_PRO_CHK_AUTOLOAD: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_RT_PRO_CHK_AUTOLOAD\n")); - Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_AUTOLOAD_STATUS, (pu1Byte)&ulInfo ); + Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_AUTOLOAD_STATUS, (pu1Byte)&ulInfo ); break; case OID_RT_PRO_READ_MAC_ADDRESS: @@ -3310,10 +3310,10 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_PRO_READ_REGISTRY.\n")); Status = OIDQ_RTKReadReg( - Adapter, - InformationBuffer, - InformationBufferLength, - BytesWritten, + Adapter, + InformationBuffer, + InformationBufferLength, + BytesWritten, BytesNeeded, &ulInfo); @@ -3326,10 +3326,10 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_PRO_READ_REGISTRY_SIC.\n")); Status = OIDQ_RTKReadRegSIC( - Adapter, - InformationBuffer, - InformationBufferLength, - BytesWritten, + Adapter, + InformationBuffer, + InformationBufferLength, + BytesWritten, BytesNeeded, &ulInfo); @@ -3339,7 +3339,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( break; case OID_RT_PRO_READ_BB_REG: - // + // // Ported from 85B MP, by Bruce, 2007-1-19. // RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_PRO_READ_BB_REG.\n")); @@ -3360,10 +3360,10 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( ulRegOffset = *((ULONG*)InformationBuffer); ulBeOFDM = ((*((ULONG*)InformationBuffer+1)) == TRUE)?0:1; pInfo = ((ULONG*)InformationBuffer)+2; - + ulRegValue = 0x00000000 | (ulBeOFDM << 24); // OFDM or CCK read. ulRegValue |= (ulRegOffset & 0x7f); // Offset. - PlatformEFIOWrite4Byte(Adapter, BBAddr, ulRegValue); + PlatformEFIOWrite4Byte(Adapter, BBAddr, ulRegValue); uData = PlatformEFIORead1Byte(Adapter, PhyDataR); *((ULONG*)pInfo) = uData; } @@ -3377,7 +3377,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( case OID_RT_PRO_QUERY_EEPROM_TYPE: switch(Adapter->EepromAddressSize) { - case 4: + case 4: ulInfo = 3; // For E-Fuse. added by Roger, 2008.11.10. break; case 6: @@ -3403,22 +3403,22 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( if(InformationBufferLength < sizeof(ULONG)*2) { Status = NDIS_STATUS_INVALID_LENGTH; - *BytesNeeded = sizeof(ULONG)*2; + *BytesNeeded = sizeof(ULONG)*2; return Status; } // Get offset and data width. ulRegOffset = *((ULONG*)InformationBuffer); ulRegDataWidth = *((ULONG*)InformationBuffer+1); - + switch(ulRegDataWidth) { - case 1: + case 1: ulInfo = ReadEEprom(Adapter, (u2Byte)(ulRegOffset >> 1)); if(ulRegOffset % 2 == 1) ulInfo >>= 8; ulInfo &= 0xFF; break; - + case 2: ulInfo = ReadEEprom(Adapter, (u2Byte)(ulRegOffset >> 1)); ulInfo &= 0xFFFF; @@ -3431,7 +3431,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( } RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("<=== Query OID_RT_PRO_READ_EEPROM.\n")); break; - + case OID_RT_PRO_READ_EFUSE: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("===> Query OID_RT_PRO_READ_EFUSE.\n")); { @@ -3443,7 +3443,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( if(InformationBufferLength < sizeof(ULONG)*2) { Status = NDIS_STATUS_INVALID_LENGTH; - *BytesNeeded = sizeof(ULONG)*2; + *BytesNeeded = sizeof(ULONG)*2; return Status; } // Get offset and data width. @@ -3458,7 +3458,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( EFUSE_MaskedShadowRead(Adapter, 1, (u2Byte)(ulRegOffset), (UINT32 *)&value); ulInfo = (u1Byte)value; break; - + case 2: EFUSE_MaskedShadowRead(Adapter, 2, (u2Byte)(ulRegOffset), (UINT32 *)&value); ulInfo = (u2Byte)value; @@ -3488,7 +3488,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( if(InformationBufferLength < sizeof(ULONG)*2) { Status = NDIS_STATUS_INVALID_LENGTH; - *BytesNeeded = sizeof(ULONG)*2; + *BytesNeeded = sizeof(ULONG)*2; return Status; } // Get offset and data width. @@ -3503,7 +3503,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( EFUSE_ShadowReadBT(Adapter, 1, (u2Byte)(ulRegOffset), (UINT32 *)&value); ulInfo = (u1Byte)value; break; - + case 2: EFUSE_ShadowReadBT(Adapter, 2, (u2Byte)(ulRegOffset), (UINT32 *)&value); ulInfo = (u2Byte)value; @@ -3532,8 +3532,8 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( { ULONG ulRegOffset; ULONG ulRegDataWidth; - ULONG RF_PATH; - + ULONG RF_PATH; + // // Add in the future. Since we cannot call HAL related function in \PLATFORM // @@ -3549,7 +3549,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( } RT_TRACE(COMP_MP, DBG_LOUD, ("<=== Query OID_RT_PRO_RF_READ_REGISTRY.\n")); break; - + case OID_RT_INACTIVE_PS: { // @@ -3572,7 +3572,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( RT_TRACE(COMP_POWER, DBG_LOUD, ("Query OID_RT_INACTIVE_PS: %u\n", ulInfo)); } break; - + case OID_RT_CUSTOMER_ID_INFO: { if( InformationBufferLength < sizeof(RT_CUSTOMER_ID) ) @@ -3590,7 +3590,7 @@ N6CQueryInformationHandleCustomizedOriginalMPQueryOid( if(Status == NDIS_STATUS_SUCCESS) - { + { if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -3646,16 +3646,16 @@ N6CQueryInformation( // Moved From Orginal MPQueryInformation Query OID ---------------------------------------------------------------------------------------------- Status = N6CQueryInformationHandleCustomizedOriginalMPQueryOid( - pAdapter, - Oid, + pAdapter, + Oid, InformationBuffer, - InformationBufferLength, - BytesWritten, + InformationBufferLength, + BytesWritten, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } @@ -3681,18 +3681,18 @@ N6CQueryInformation( // Handle the Customized Wapi Oids -------------------------------------------------------------------------- Status = WAPI_OidHandler( - pAdapter, + pAdapter, 1, //N6 Platform 0, //Query OID - Oid, + Oid, InformationBuffer, - InformationBufferLength, - BytesWritten, + InformationBufferLength, + BytesWritten, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } @@ -3703,16 +3703,16 @@ N6CQueryInformation( // Handle the Customized WifiDirect Oids -------------------------------------------------------------------------- Status = N6CQueryInformationHandleCustomizedWifiDirectOids( - pAdapter, - Oid, + pAdapter, + Oid, InformationBuffer, - InformationBufferLength, - BytesWritten, + InformationBufferLength, + BytesWritten, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } @@ -3723,36 +3723,36 @@ N6CQueryInformation( // Handle the Customized 11n Oids -------------------------------------------------------------------------- Status = N6CQueryInformationHandleCustomized11nOids( - pAdapter, - Oid, + pAdapter, + Oid, InformationBuffer, - InformationBufferLength, - BytesWritten, + InformationBufferLength, + BytesWritten, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } else Status = NDIS_STATUS_SUCCESS; // -------------------------------------------------------------------------------------------------- - + // Handle the Customized Security Oids -------------------------------------------------------------------- Status = N6CQueryInformationHandleCustomizedSecurityOids( - pAdapter, - Oid, + pAdapter, + Oid, InformationBuffer, - InformationBufferLength, - BytesWritten, + InformationBufferLength, + BytesWritten, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } @@ -3761,19 +3761,19 @@ N6CQueryInformation( - + // Handle the Customized Oids -------------------------------------------------------------------------- Status = N6CQueryInformationHandleCustomizedOids( - pAdapter, - Oid, + pAdapter, + Oid, InformationBuffer, - InformationBufferLength, - BytesWritten, + InformationBufferLength, + BytesWritten, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } @@ -3783,7 +3783,7 @@ N6CQueryInformation( // ============================================================================================ - // The following are the OIDs from the NDIS 6.x, including the Customized OIDs with the same meanings. Please be organized. + // The following are the OIDs from the NDIS 6.x, including the Customized OIDs with the same meanings. Please be organized. // ============================================================================================ @@ -3811,7 +3811,7 @@ N6CQueryInformation( case OID_GEN_MEDIA_CAPABILITIES: ulInfo = NDIS_MEDIA_CAP_TRANSMIT | NDIS_MEDIA_CAP_RECEIVE; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MEDIA_CAPABILITIES: %d\n",ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MEDIA_CAPABILITIES: %d\n",ulInfo)); break; case OID_GEN_VENDOR_ID: @@ -3829,7 +3829,7 @@ N6CQueryInformation( usInfo = (USHORT) NIC_DRIVER_VERSION60; pInfo = (PVOID) &usInfo; ulInfoLen = sizeof(USHORT); - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_DRIVER_VERSION:%08x\n",usInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_DRIVER_VERSION:%08x\n",usInfo)); break; case OID_GEN_CURRENT_LOOKAHEAD: @@ -3837,16 +3837,16 @@ N6CQueryInformation( if(pNdisCommon->ulLookAhead == 0) pNdisCommon->ulLookAhead = pNdisCommon->MaxPktSize - NIC_HEADER_SIZE; ulInfo = pNdisCommon->ulLookAhead; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_CURRENT_LOOKAHEAD or OID_GEN_MAXIMUM_LOOKAHEAD: %d\n",ulInfo)); - break; + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_CURRENT_LOOKAHEAD or OID_GEN_MAXIMUM_LOOKAHEAD: %d\n",ulInfo)); + break; case OID_GEN_MAXIMUM_FRAME_SIZE: - ulInfo = pNdisCommon->MaxPktSize - NIC_HEADER_SIZE; + ulInfo = pNdisCommon->MaxPktSize - NIC_HEADER_SIZE; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MAXIMUM_FRAME_SIZE:%d\n",ulInfo)); break; case OID_GEN_MAXIMUM_TOTAL_SIZE: - ulInfo = pNdisCommon->MaxPktSize; + ulInfo = pNdisCommon->MaxPktSize; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MAXIMUM_TOTAL_SIZE:%d\n",ulInfo)); break; @@ -3873,10 +3873,10 @@ N6CQueryInformation( case OID_GEN_MAC_OPTIONS: ulInfo = NDIS_MAC_OPTION_TRANSFERS_NOT_PEND | // 20100309 Joseph: Modified for software "Chinasec" BSOD issue. -// If we do not indicate NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA flag, Chinasec BSOD in higher layer +// If we do not indicate NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA flag, Chinasec BSOD in higher layer //when sending Tx buffer to do NDIS miniport driver after connection. //#if COALESCE_RECEIVED_PACKET - NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | + NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | //#endif NDIS_MAC_OPTION_NO_LOOPBACK; @@ -3886,16 +3886,16 @@ N6CQueryInformation( ulInfo |= NDIS_MAC_OPTION_8021P_PRIORITY; } - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MAC_OPTIONS:%08x\n", ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MAC_OPTIONS:%08x\n", ulInfo)); break; - case OID_GEN_LINK_SPEED: + case OID_GEN_LINK_SPEED: ulInfo = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter , pMgntInfo->bForcedShowRxRate, FALSE)/2)*10000; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_LINK_SPEED:%d Mbps\n",ulInfo/10000)); break; - case OID_GEN_MEDIA_CONNECT_STATUS: + case OID_GEN_MEDIA_CONNECT_STATUS: // // We will always report connected. The nwifi IM driver // takes care of the logic of this for the miniport. @@ -3911,7 +3911,7 @@ N6CQueryInformation( ulInfo = NdisMediaStateDisconnected; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MEDIA_CONNECT_STATUS: NdisMediaStateDisconnected\n")); } - + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MEDIA_CONNECT_STATUS: NdisMediaStateConnected\n")); break; @@ -3993,7 +3993,7 @@ N6CQueryInformation( Status = NDIS_STATUS_NOT_SUPPORTED; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_FFP_SUPPORT: (not supported)\n")); break; - + case OID_GEN_SUPPORTED_GUIDS: Status = NDIS_STATUS_NOT_SUPPORTED; RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_SUPPORTED_GUIDS: (not supported)\n")); @@ -4001,7 +4001,7 @@ N6CQueryInformation( case OID_GEN_MAXIMUM_SEND_PACKETS: ulInfo = NIC_MAX_SEND_PACKETS; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MAXIMUM_SEND_PACKETS:%d\n",ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_GEN_MAXIMUM_SEND_PACKETS:%d\n",ulInfo)); break; case OID_802_3_PERMANENT_ADDRESS: @@ -4011,14 +4011,14 @@ N6CQueryInformation( break; case OID_802_3_CURRENT_ADDRESS: - pInfo = pAdapter->CurrentAddress; + pInfo = pAdapter->CurrentAddress; ulInfoLen = ETH_LENGTH_OF_ADDRESS; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_802_3_CURRENT_ADDRESS:%02x:%02x:%02x:%02x:%02x:%02x\n", pAdapter->CurrentAddress[0], pAdapter->CurrentAddress[1], pAdapter->CurrentAddress[2], pAdapter->CurrentAddress[3], pAdapter->CurrentAddress[4], pAdapter->CurrentAddress[5])); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_802_3_CURRENT_ADDRESS:%02x:%02x:%02x:%02x:%02x:%02x\n", pAdapter->CurrentAddress[0], pAdapter->CurrentAddress[1], pAdapter->CurrentAddress[2], pAdapter->CurrentAddress[3], pAdapter->CurrentAddress[4], pAdapter->CurrentAddress[5])); break; case OID_802_3_MAXIMUM_LIST_SIZE: ulInfo = MAX_MCAST_LIST_NUM; - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_802_3_MAXIMUM_LIST_SIZE:%d\n",ulInfo)); + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query Information, OID_802_3_MAXIMUM_LIST_SIZE:%d\n",ulInfo)); break; case OID_802_3_MULTICAST_LIST: @@ -4037,7 +4037,7 @@ N6CQueryInformation( bInformationCopied = TRUE; } break; - + // 2006.10.26, by shien chang. case OID_DOT11_OPERATION_MODE_CAPABILITY: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_OPERATION_MODE_CAPABILITY:\n")); @@ -4066,7 +4066,7 @@ N6CQueryInformation( case OID_DOT11_STATISTICS: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_STATISTICS:\n")); - { + { return N6CQuery_DOT11_STATISTICS( pAdapter, InformationBuffer, @@ -4085,7 +4085,7 @@ N6CQueryInformation( { *BytesNeeded = len; *BytesWritten = 0; - return NDIS_STATUS_BUFFER_TOO_SHORT; + return NDIS_STATUS_BUFFER_TOO_SHORT; } Status = N6CQuery_DOT11_DESIRED_BSS_TYPE(pAdapter, pBssType); @@ -4096,7 +4096,7 @@ N6CQueryInformation( } } break; - + case OID_DOT11_MEDIA_STREAMING_ENABLED: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_MEDIA_STREAMING_ENABLED:\n")); { @@ -4138,7 +4138,7 @@ N6CQueryInformation( BytesNeeded); } break; - + case OID_DOT11_IBSS_PARAMS: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_IBSS_PARAMS:\n")); { @@ -4150,7 +4150,7 @@ N6CQueryInformation( BytesNeeded); } break; - + case OID_DOT11_PERMANENT_ADDRESS: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_PERMANENT_ADDRESS:\n")); { @@ -4169,7 +4169,7 @@ N6CQueryInformation( bInformationCopied = TRUE; } break; - + case OID_DOT11_CURRENT_ADDRESS: case OID_DOT11_MAC_ADDRESS: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_CURRENT_ADDRESS or OID_DOT11_MAC_ADDRESS:\n")); @@ -4190,7 +4190,7 @@ N6CQueryInformation( bInformationCopied = TRUE; } break; - + // 2006.11.01, by shien chang. case OID_DOT11_STATION_ID: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_STATION_ID:\n")); @@ -4202,7 +4202,7 @@ N6CQueryInformation( } PlatformMoveMemory( - InformationBuffer, + InformationBuffer, pAdapter->CurrentAddress, *BytesNeeded); bInformationCopied = TRUE; @@ -4228,9 +4228,9 @@ N6CQueryInformation( case OID_DOT11_REG_DOMAINS_SUPPORT_VALUE: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_REG_DOMAINS_SUPPORT_VALUE:\n")); { - PDOT11_REG_DOMAINS_SUPPORT_VALUE pValue = + PDOT11_REG_DOMAINS_SUPPORT_VALUE pValue = (PDOT11_REG_DOMAINS_SUPPORT_VALUE)InformationBuffer; - + *BytesNeeded = sizeof(DOT11_REG_DOMAINS_SUPPORT_VALUE); if ( InformationBufferLength < *BytesNeeded ) { @@ -4275,7 +4275,7 @@ N6CQueryInformation( ulInfoLen = *BytesNeeded; } break; - + case OID_DOT11_UNICAST_USE_GROUP_ENABLED: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_UNICAST_USE_GROUP_ENABLED:\n")); { @@ -4329,7 +4329,7 @@ N6CQueryInformation( break; case OID_DOT11_CURRENT_FREQUENCY: - case OID_DOT11_CURRENT_CHANNEL: + case OID_DOT11_CURRENT_CHANNEL: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_CURRENT_CHANNEL:\n")); { *BytesNeeded = sizeof(ULONG); @@ -4341,7 +4341,7 @@ N6CQueryInformation( if(pMgntInfo->mAssoc || pMgntInfo->mIbss) { - + #if (MULTICHANNEL_SUPPORT == 1) if(MultiChannelSwitchNeeded(pAdapter)) { @@ -4352,12 +4352,12 @@ N6CQueryInformation( RT_TRACE(COMP_MULTICHANNEL, DBG_LOUD, ("MultiChannelGetPortConnected20MhzChannel: %d\n", ulInfo)); } else - #endif + #endif { ulInfo = pMgntInfo->dot11CurrentChannelNumber; } - + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("A: channel: %u:\n", ulInfo)); } else @@ -4383,7 +4383,7 @@ N6CQueryInformation( } ulInfoLen = sizeof(ULONG); - + } break; @@ -4399,8 +4399,8 @@ N6CQueryInformation( ); } break; - - case OID_DOT11_SUPPORTED_DATA_RATES_VALUE: + + case OID_DOT11_SUPPORTED_DATA_RATES_VALUE: RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_SUPPORTED_DATA_RATES_VALUE:\n")); { return N6CQuery_DOT11_Supported_DataRates( @@ -4412,22 +4412,22 @@ N6CQueryInformation( ); } break; - + case OID_DOT11_MULTI_DOMAIN_CAPABILITY_IMPLEMENTED: case OID_DOT11_MULTI_DOMAIN_CAPABILITY_ENABLED: case OID_DOT11_COUNTRY_STRING: Status = NDIS_STATUS_NOT_SUPPORTED; break; - + case OID_DOT11_SUPPORTED_TX_ANTENNA: - { + { return N6CQuery_DOT11_Tx_Antenna( pAdapter, InformationBuffer, InformationBufferLength, BytesWritten, BytesNeeded); - } + } break; // Added by Annie, 2006-10-09. @@ -4476,9 +4476,9 @@ N6CQueryInformation( // Added by Annie, 2006-10-13. case OID_DOT11_CIPHER_DEFAULT_KEY_ID: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_CIPHER_DEFAULT_KEY_ID, 0x%08x\n", Oid) ); - { + { PRT_SECURITY_T pSecInfo = &(pAdapter->MgntInfo.SecurityInfo); - + if (InformationBufferLength < sizeof(u4Byte)) { *BytesNeeded = sizeof(u4Byte); @@ -4510,7 +4510,7 @@ N6CQueryInformation( { return N6CQuery_DOT11_SUPPORTED_MULTICAST_ALGORITHM_PAIR( pAdapter, - InformationBuffer, + InformationBuffer, InformationBufferLength, BytesWritten, BytesNeeded @@ -4537,10 +4537,10 @@ N6CQueryInformation( pPMKIDList, InformationBufferLength ); - + if (Status == NDIS_STATUS_SUCCESS) { - *BytesWritten = pPMKIDList->uNumOfEntries * sizeof(DOT11_PMKID_ENTRY) + + *BytesWritten = pPMKIDList->uNumOfEntries * sizeof(DOT11_PMKID_ENTRY) + FIELD_OFFSET(DOT11_PMKID_LIST, PMKIDs); bInformationCopied = TRUE; } @@ -4594,10 +4594,10 @@ N6CQueryInformation( } break; - // 061012, by rcnjko. + // 061012, by rcnjko. case OID_DOT11_MPDU_MAX_LENGTH: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_MPDU_MAX_LENGTH\n") ); - { + { *BytesNeeded = sizeof(u4Byte); if( InformationBufferLength < *BytesNeeded ) { @@ -4611,10 +4611,10 @@ N6CQueryInformation( } break; - // 061012, by rcnjko. + // 061012, by rcnjko. case OID_DOT11_ATIM_WINDOW: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_ATIM_WINDOW\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { @@ -4634,9 +4634,9 @@ N6CQueryInformation( break; #if 0 // Move to OID Protal - 2011.09.22 - // 061012, by rcnjko. + // 061012, by rcnjko. case OID_DOT11_NIC_POWER_STATE: - { + { RT_RF_POWER_STATE rfState; *BytesNeeded = sizeof(BOOLEAN); @@ -4645,12 +4645,12 @@ N6CQueryInformation( *BytesWritten = 0; Status = NDIS_STATUS_BUFFER_OVERFLOW; break; - } + } pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); if (rfState == eRfOff) { - if (pMgntInfo->RfOffReason >= RF_CHANGE_BY_HW) + if (pMgntInfo->RfOffReason >= RF_CHANGE_BY_HW) { ulInfo = FALSE; } @@ -4665,22 +4665,22 @@ N6CQueryInformation( } ulInfoLen = *BytesNeeded; } - RT_TRACE( COMP_OID_QUERY|COMP_RF, DBG_LOUD, ("Query OID_DOT11_NIC_POWER_STATE rf %d\n", ulInfo) ); + RT_TRACE( COMP_OID_QUERY|COMP_RF, DBG_LOUD, ("Query OID_DOT11_NIC_POWER_STATE rf %d\n", ulInfo) ); break; #endif // 2006.11.02, by shien chang. case OID_DOT11_HARDWARE_PHY_STATE: - { + { RT_RF_POWER_STATE rfState; - + *BytesNeeded = sizeof(BOOLEAN); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); if (rfState == eRfOff) @@ -4703,18 +4703,18 @@ N6CQueryInformation( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_HARDWARE_PHY_STATE: rf %d\n", ulInfo)); break; - - // 061014, by rcnjko. + + // 061014, by rcnjko. case OID_DOT11_OPTIONAL_CAPABILITY: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_OPTIONAL_CAPABILITY\n") ); - { + { *BytesNeeded = sizeof(DOT11_OPTIONAL_CAPABILITY); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_OPTIONAL_CAPABILITY(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4726,17 +4726,17 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_DOT11_CURRENT_OPTIONAL_CAPABILITY: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_CURRENT_OPTIONAL_CAPABILITY\n") ); - { + { *BytesNeeded = sizeof(DOT11_OPTIONAL_CAPABILITY); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_CURRENT_OPTIONAL_CAPABILITY(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4748,17 +4748,17 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_DOT11_CF_POLLABLE: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_CF_POLLABLE\n") ); - { + { *BytesNeeded = sizeof(BOOLEAN); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_CF_POLLABLE(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4770,13 +4770,13 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_RT_OPERATIONAL_RATE_SET: case OID_DOT11_OPERATIONAL_RATE_SET: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_OPERATIONAL_RATE_SET\n") ); - { + { return N6CQuery_DOT11_OPERATIONAL_RATE_SET( - pAdapter, + pAdapter, InformationBuffer, InformationBufferLength, BytesWritten, @@ -4784,35 +4784,35 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_RT_RTS_THRESHOLD: case OID_DOT11_RTS_THRESHOLD: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_RTS_THRESHOLD\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_BUFFER_OVERFLOW; break; - } + } ulInfo = MgntActQuery_802_11_RTS_THRESHOLD(pAdapter); ulInfoLen = sizeof(ULONG); } break; - - // 061014, by rcnjko. + + // 061014, by rcnjko. case OID_DOT11_SHORT_RETRY_LIMIT: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_SHORT_RETRY_LIMIT\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_SHORT_RETRY_LIMIT(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4824,17 +4824,17 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_DOT11_LONG_RETRY_LIMIT: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_LONG_RETRY_LIMIT\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_LONG_RETRY_LIMIT(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4846,35 +4846,35 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_RT_FRAGMENTATION_THRESHOLD: case OID_DOT11_FRAGMENTATION_THRESHOLD: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_FRAGMENTATION_THRESHOLD\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_BUFFER_OVERFLOW; break; - } + } ulInfo = MgntActQuery_802_11_FRAGMENTATION_THRESHOLD(pAdapter); ulInfoLen = *BytesNeeded; } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_DOT11_MAX_TRANSMIT_MSDU_LIFETIME: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_MAX_TRANSMIT_MSDU_LIFETIME\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_MAX_TRANSMIT_MSDU_LIFETIME(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4886,17 +4886,17 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_DOT11_MAX_RECEIVE_LIFETIME: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_MAX_RECEIVE_LIFETIME\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CQuery_DOT11_MAX_RECEIVE_LIFETIME(pAdapter, InformationBuffer); if (Status == NDIS_STATUS_SUCCESS) @@ -4908,13 +4908,13 @@ N6CQueryInformation( } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_DOT11_SUPPORTED_PHY_TYPES: RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_SUPPORTED_PHY_TYPES\n") ); - { + { Status = N6CQuery_DOT11_SUPPORTED_PHY_TYPES( - pAdapter, - InformationBuffer, + pAdapter, + InformationBuffer, InformationBufferLength, BytesWritten, BytesNeeded); @@ -4929,12 +4929,12 @@ N6CQueryInformation( case OID_DOT11_MULTICAST_LIST: { Status = N6CQuery_DOT11_MULTICAST_LIST( - pAdapter, - InformationBuffer, + pAdapter, + InformationBuffer, InformationBufferLength, BytesWritten, BytesNeeded); - + if (Status == NDIS_STATUS_SUCCESS) { ulInfoLen = *BytesWritten; @@ -4943,7 +4943,7 @@ N6CQueryInformation( RT_TRACE( COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_MULTICAST_LIST num of multicast address:%d\n", pAdapter->MCAddrCount)); } break; - + case OID_RT_QUERY_IS_MP_CHIP: { PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter); @@ -4963,7 +4963,7 @@ N6CQueryInformation( ulInfo = pAdapter->pNdisCommon->dot11SelectedPhyId; PlatformMoveMemory(InformationBuffer, &ulInfo, sizeof(ULONG)); - *BytesWritten = sizeof(ULONG); + *BytesWritten = sizeof(ULONG); RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query OID_DOT11_CURRENT_PHY_ID: phyid%d\n", ulInfo)); break; @@ -4977,7 +4977,7 @@ N6CQueryInformation( *BytesWritten = 0; return NDIS_STATUS_BUFFER_TOO_SHORT; } - + DbgPrint( "Query OID_DOT11_SUPPORTED_POWER_LEVELS\n" ); *BytesWritten = sizeof(ULONG) * 9; PlatformZeroMemory( InformationBuffer, sizeof(ULONG) * 9 ); @@ -4987,7 +4987,7 @@ N6CQueryInformation( case OID_DOT11_BEACON_PERIOD: { PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; - + // Clean output variables ----------------------------------- *BytesWritten = 0; *BytesNeeded = 0; @@ -5001,15 +5001,15 @@ N6CQueryInformation( Status = NDIS_STATUS_INVALID_STATE; return Status; } - + *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { *BytesWritten = 0; Status = NDIS_STATUS_INVALID_LENGTH; return Status; - } - + } + Status = N6CQuery_DOT11_BEACON_PERIOD(pAdapter, (PULONG) InformationBuffer ); if (Status == NDIS_STATUS_SUCCESS) @@ -5021,15 +5021,15 @@ N6CQueryInformation( } // - + default: - // This OID is not common one handled by USB and PCI. + // This OID is not common one handled by USB and PCI. Status = NDIS_STATUS_INVALID_OID; break; } if(Status == NDIS_STATUS_SUCCESS) - { + { if(ulInfoLen <= InformationBufferLength) { // Copy result into InformationBuffer @@ -5073,7 +5073,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( *BytesRead = 0; *BytesNeeded = 0; - + switch(Oid) { default: @@ -5089,9 +5089,9 @@ N6CSetInformationHandleCustomizedWifiDirectOids( *BytesNeeded = 7; return NDIS_STATUS_INVALID_LENGTH; } - + (GET_P2P_INFO(pAdapter))->bAcceptInvitation = *((PBOOLEAN)((pu1Byte)InformationBuffer + 0)); - PlatformMoveMemory((GET_P2P_INFO(pAdapter))->AccpetInvitationDeviceAddress, + PlatformMoveMemory((GET_P2P_INFO(pAdapter))->AccpetInvitationDeviceAddress, (pu1Byte)InformationBuffer + 1, 6); } break; @@ -5101,12 +5101,12 @@ N6CSetInformationHandleCustomizedWifiDirectOids( if(pMgntInfo->bDisableRtkSupportedP2P) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Ignore set of 0x%08X because bDisableRtkSupportedP2P is turned on\n", Oid)); Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + if(InformationBufferLength < sizeof(u4Byte)) { *BytesNeeded = sizeof(u4Byte); @@ -5119,11 +5119,11 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { return NDIS_STATUS_NOT_SUPPORTED; } - + (GET_P2P_INFO(pAdapter))->P2PVersion = verToSet; RT_TRACE(COMP_P2P, DBG_LOUD, ("Set OID_RT_P2P_VERSION to %u\n", verToSet)); } - break; + break; case OID_RT_P2P_MODE: { u4Byte index = 0; @@ -5135,7 +5135,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( if(pMgntInfo->bDisableRtkSupportedP2P) { - RT_TRACE_F(COMP_P2P, DBG_WARNING, + RT_TRACE_F(COMP_P2P, DBG_WARNING, ("Ignore set of 0x%08X because bDisableRtkSupportedP2P is turned on\n", Oid)); Status = NDIS_STATUS_NOT_SUPPORTED; break; @@ -5145,17 +5145,17 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { *BytesNeeded = sizeof(BOOLEAN) * 2 + sizeof(u1Byte) * 3; RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_MODE: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_MODE: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } bP2PMode = *((PBOOLEAN)((pu1Byte)InformationBuffer + index)); index += sizeof(BOOLEAN); - + bGO = *((PBOOLEAN)((pu1Byte)InformationBuffer + index)); index += sizeof(BOOLEAN); - + ListenChannel = *((pu1Byte)((pu1Byte)InformationBuffer + index)); index += sizeof(u1Byte); @@ -5164,10 +5164,10 @@ N6CSetInformationHandleCustomizedWifiDirectOids( GOIntent = *((pu1Byte)((pu1Byte)InformationBuffer + index)); index += sizeof(u1Byte); - - MgntActSet_P2PMode(pAdapter, - bP2PMode, - bGO, + + MgntActSet_P2PMode(pAdapter, + bP2PMode, + bGO, ListenChannel, IntendedOpChannel, GOIntent); @@ -5180,31 +5180,31 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { *BytesNeeded = sizeof(u1Byte); RT_TRACE(COMP_OID_SET, DBG_WARNING, - ("Set OID_RT_ROAM_FAKE_SIGNAL: invalid length(%d < %d)\n", + ("Set OID_RT_ROAM_FAKE_SIGNAL: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; - } + } pMgntInfo->RegFakeRoamSignal[0] = *((pu1Byte)InformationBuffer); pMgntInfo->RegFakeRoamSignal[1] = *((pu1Byte)InformationBuffer + 1); RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("RegFakeRoamSignal[0] = %d, RegFakeRoamSignal[1] = %d\n", pMgntInfo->RegFakeRoamSignal[0], pMgntInfo->RegFakeRoamSignal[1])); } break; - - case OID_RT_P2P_PROVISION_IE: + + case OID_RT_P2P_PROVISION_IE: { if(InformationBufferLength < sizeof(u1Byte)) { *BytesNeeded = sizeof(u1Byte); RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_PROVISION_IE: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_PROVISION_IE: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - + MgntActSet_P2PProvisionIE(pAdapter, InformationBuffer, (u1Byte)InformationBufferLength); } break; - case OID_RT_P2P_FLUSH_SCAN_LIST: + case OID_RT_P2P_FLUSH_SCAN_LIST: { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_P2P_FLUSH_SCAN_LIST:\n")); @@ -5217,13 +5217,13 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { *BytesNeeded = sizeof(P2P_PROVISIONING_RESULT); RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_PROVISIONING_RESULT: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_PROVISIONING_RESULT: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_PROVISIONING_RESULT: %u\n", + ("Set OID_RT_P2P_PROVISIONING_RESULT: %u\n", *(PP2P_PROVISIONING_RESULT)InformationBuffer)); MgntActSet_P2PProvisioningResult(pAdapter, *(PP2P_PROVISIONING_RESULT)InformationBuffer); } @@ -5232,16 +5232,16 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { PP2P_INFO pP2PInfo; RT_TRACE(COMP_P2P, DBG_LOUD, ("OID_RT_P2P_DEVICE_DISCOVERY\n")); - + if(InformationBufferLength < sizeof(u1Byte)) { *BytesNeeded = sizeof(u1Byte); RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_DEVICE_DISCOVERY: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_DEVICE_DISCOVERY: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - + pP2PInfo = GET_P2P_INFO(pAdapter); P2PResetCommonChannelArrivingProcess(pP2PInfo); @@ -5256,13 +5256,13 @@ N6CSetInformationHandleCustomizedWifiDirectOids( *BytesNeeded = sizeof(u1Byte) * 6; if(InformationBufferLength < *BytesNeeded) { - + RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_CONNECT_REQUEST: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_CONNECT_REQUEST: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - + if(!P2PConnect(GET_P2P_INFO(pAdapter), (pu1Byte)InformationBuffer)) { return NDIS_STATUS_FAILURE; @@ -5279,7 +5279,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( if(InformationBufferLength < sizeof(P2P_LIB_INVITATION_REQ_CONTEXT)) { *BytesNeeded = sizeof(P2P_LIB_INVITATION_REQ_CONTEXT); - RT_TRACE(COMP_P2P, DBG_LOUD, ("Set OID_RT_P2P_INVITE_PEER: invalid length(%d < %d)\n", + RT_TRACE(COMP_P2P, DBG_LOUD, ("Set OID_RT_P2P_INVITE_PEER: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } @@ -5296,13 +5296,13 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { *BytesNeeded = sizeof(u1Byte); RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_GO_INTENT: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_GO_INTENT: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_GO_INTENT: from %u to %u with TieBreaker: %u unchanged\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Set OID_RT_P2P_GO_INTENT: from %u to %u with TieBreaker: %u unchanged\n", pP2PInfo->GOIntent >> 1, *((pu1Byte)InformationBuffer), bTieBreaker)); pP2PInfo->GOIntent = ((*((pu1Byte)InformationBuffer) << 1) | bTieBreaker); @@ -5316,7 +5316,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { *BytesNeeded = sizeof(u1Byte) * 6; RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_DEVICE_DISCOVERABILITY_REQ: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_DEVICE_DISCOVERABILITY_REQ: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } @@ -5330,14 +5330,14 @@ N6CSetInformationHandleCustomizedWifiDirectOids( { *BytesNeeded = 6 + sizeof(u2Byte); RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_PROVISION_DISCOVERY: invalid length(%d < %d)\n", + ("Set OID_RT_P2P_PROVISION_DISCOVERY: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } GET_P2P_INFO(pAdapter)->ProvisionReqRetryCnt = 0; - if(!P2PProvisionDiscovery(GET_P2P_INFO(pAdapter), - (pu1Byte)InformationBuffer, + if(!P2PProvisionDiscovery(GET_P2P_INFO(pAdapter), + (pu1Byte)InformationBuffer, *(pu2Byte)((pu1Byte)InformationBuffer + 6))) { return NDIS_STATUS_FAILURE; @@ -5363,8 +5363,8 @@ N6CSetInformationHandleCustomizedWifiDirectOids( pP2PInfo->DeviceCapability = DevCap; pP2PInfo->GroupCapability = GrpCap; - RT_TRACE(COMP_P2P, DBG_LOUD, - ("OID_RT_P2P_CAPABILITY: set DC=%u, GC=%u\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("OID_RT_P2P_CAPABILITY: set DC=%u, GC=%u\n", pP2PInfo->DeviceCapability, pP2PInfo->GroupCapability)); //P2PDumpDeviceCapability(pP2PInfo->DeviceCapability); @@ -5453,7 +5453,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( case OID_RT_P2P_POWER_SAVE: { PP2P_POWERSAVE_SET pP2pPs; - + *BytesNeeded = sizeof(P2P_POWERSAVE_SET); if(InformationBufferLength < *BytesNeeded) return NDIS_STATUS_INVALID_LENGTH; @@ -5481,9 +5481,9 @@ N6CSetInformationHandleCustomizedWifiDirectOids( pP2PInfo->State)); return NDIS_STATUS_FAILURE; } - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_OP_CHANNEL: from %u to %u\n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Set OID_RT_P2P_OP_CHANNEL: from %u to %u\n", pP2PInfo->OperatingChannel, *(pu1Byte)InformationBuffer)); pP2PInfo->OperatingChannel = *(pu1Byte)InformationBuffer; @@ -5518,7 +5518,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( if(!P2P_ENABLED(pP2PInfo)) { - RT_TRACE(COMP_P2P, DBG_LOUD, + RT_TRACE(COMP_P2P, DBG_LOUD, ("Set OID_RT_P2P_EXTENDED_LISTEN_TIMING: P2P NOT enabled\n")); break; } @@ -5531,15 +5531,15 @@ N6CSetInformationHandleCustomizedWifiDirectOids( Duration= *((pu2Byte)((pu1Byte)InformationBuffer + index)); index += sizeof(u2Byte); - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_EXTENDED_LISTEN_TIMING: bOn: %u, period: %u(ms), duration: %u(ms)\n", + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Set OID_RT_P2P_EXTENDED_LISTEN_TIMING: bOn: %u, period: %u(ms), duration: %u(ms)\n", bOn, Period, Duration)); pP2PInfo->bSendProbeReqInExtendedListen = bOn; pP2PInfo->ExtListenTimingPeriod = Period; pP2PInfo->ExtListenTimingDuration = Duration; } - break; + break; case OID_RT_P2P_SERVICE_DISCOVERY_REQ: { @@ -5552,11 +5552,11 @@ N6CSetInformationHandleCustomizedWifiDirectOids( return NDIS_STATUS_INVALID_LENGTH; } - if(InformationBufferLength < - FIELD_OFFSET(P2P_SD_REQ_CONTEXT, ServiceReqTLVList) + + if(InformationBufferLength < + FIELD_OFFSET(P2P_SD_REQ_CONTEXT, ServiceReqTLVList) + sizeof(P2P_SERVICE_REQ_TLV) * pServiceQueryContent->ServiceReqTLVSize) { - *BytesNeeded = FIELD_OFFSET(P2P_SD_REQ_CONTEXT, ServiceReqTLVList) + + *BytesNeeded = FIELD_OFFSET(P2P_SD_REQ_CONTEXT, ServiceReqTLVList) + sizeof(P2P_SERVICE_REQ_TLV) * pServiceQueryContent->ServiceReqTLVSize; return NDIS_STATUS_INVALID_LENGTH; } @@ -5566,7 +5566,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( P2PServiceDiscoveryReq(pP2PInfo, pServiceQueryContent); } break; - case OID_RT_P2P_SERVICE_DISCOVERY_RSP: + case OID_RT_P2P_SERVICE_DISCOVERY_RSP: { RT_TRACE(COMP_P2P, DBG_LOUD, ("Set OID_RT_P2P_SERVICE_DISCOVERY_RSP\n")); if(InformationBufferLength < (ULONG)FIELD_OFFSET(P2P_SD_RSP_CONTEXT, ServiceRspTLVList)) @@ -5574,7 +5574,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( *BytesNeeded = FIELD_OFFSET(P2P_SD_RSP_CONTEXT, ServiceRspTLVList); return NDIS_STATUS_INVALID_LENGTH; } - + P2PServiceDiscoveryRsp(GET_P2P_INFO(pAdapter), (PP2P_SD_RSP_CONTEXT)InformationBuffer); } break; @@ -5593,18 +5593,18 @@ N6CSetInformationHandleCustomizedWifiDirectOids( Status = NDIS_STATUS_FAILURE; } } - break; + break; case OID_RT_P2P_GO_BEACON_INTERVAL: { PP2P_INFO pP2PInfo = GET_P2P_INFO(pAdapter); - + if(InformationBufferLength < sizeof(u2Byte)) { *BytesNeeded = sizeof(u2Byte); RT_TRACE(COMP_P2P, DBG_LOUD,("Set OID_RT_P2P_GO_BEACON_INTERVAL: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - + P2PGOSetBeaconInterval(pP2PInfo, *(pu2Byte)InformationBuffer); } break; @@ -5619,9 +5619,9 @@ N6CSetInformationHandleCustomizedWifiDirectOids( RT_TRACE(COMP_P2P, DBG_LOUD,("Set OID_RT_P2P_GO_NEGO_RESULT: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - - RT_TRACE(COMP_P2P, DBG_LOUD, - ("Set OID_RT_P2P_GO_NEGO_RESULT: from %u to %u \n", + + RT_TRACE(COMP_P2P, DBG_LOUD, + ("Set OID_RT_P2P_GO_NEGO_RESULT: from %u to %u \n", pP2PInfo->PreviousGONegoResult, *(pu1Byte)InformationBuffer)); pP2PInfo->PreviousGONegoResult = *(pu1Byte)InformationBuffer; @@ -5639,7 +5639,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( RT_TRACE(COMP_P2P, DBG_LOUD,("Set OID_RT_P2P_GO_PREPROVISIONING: invalid length(%d < %d)\n", InformationBufferLength, *BytesNeeded)); return NDIS_STATUS_INVALID_LENGTH; } - + SsidLen = *(pu4Byte)InformationBuffer; if(InformationBufferLength < sizeof(u4Byte) + SsidLen) @@ -5655,7 +5655,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( RT_PRINT_STR(COMP_P2P, DBG_LOUD, "Set OID_RT_P2P_GO_PREPROVISIONING: SSID:", pP2PInfo->SSIDBuf, pP2PInfo->SSIDLen); P2PDeviceDiscoveryComplete(pP2PInfo, FALSE); - + pP2PInfo->ConnectionContext.bGoingToBeGO = TRUE; pP2PInfo->State = P2P_STATE_PRE_PROVISIONING; PlatformCancelTimer(pAdapter, &pP2PInfo->P2PMgntTimer); @@ -5686,7 +5686,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( PP2P_PROFILE_LIST pProfileList = NULL; RT_TRACE(COMP_P2P, DBG_LOUD, ("Set OID_RT_P2P_PROFILE_LIST\n")); - + if(InformationBufferLength < (ULONG)FIELD_OFFSET(P2P_PROFILE_LIST, profileList)) { *BytesNeeded = FIELD_OFFSET(P2P_PROFILE_LIST, profileList); @@ -5718,7 +5718,7 @@ N6CSetInformationHandleCustomizedWifiDirectOids( Status = NdisStatusFromRtStatus(P2P_SetP2PGoFullSSID(pAdapter, (pu1Byte)InformationBuffer, InformationBufferLength)); } break; - + } return Status; @@ -5747,7 +5747,7 @@ N6CSetInformationHandleCustomized11nOids( *BytesRead = 0; *BytesNeeded = 0; - + switch(Oid) { default: @@ -5760,7 +5760,7 @@ N6CSetInformationHandleCustomized11nOids( { //Keep for debug usb3.0 20120907 -#if (HAL_8812A_USB == 1) +#if (HAL_8812A_USB == 1) PRT_USB_DEVICE pDevice; u1Byte direction; @@ -5775,7 +5775,7 @@ N6CSetInformationHandleCustomized11nOids( RT_TRACE(COMP_OID_SET, DBG_LOUD,( "Wrong parameters!\n" )); RT_TRACE(COMP_OID_SET, DBG_LOUD,( "Set pipe reset!\n" )); -#endif +#endif } break; @@ -5784,7 +5784,7 @@ N6CSetInformationHandleCustomized11nOids( HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); pHalData->AMPDUBurstMode = (*(pu1Byte)InformationBuffer); DbgPrint("OID_RT_AMPDU_BURST_MODE: %d\n", pHalData->AMPDUBurstMode); - } + } break; case OID_RT_AMPDU_BURST_NUM: @@ -5792,7 +5792,7 @@ N6CSetInformationHandleCustomized11nOids( HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); pHalData->AMPDUBurstNum = (*(pu1Byte)InformationBuffer); DbgPrint("OID_RT_AMPDU_BURST_NUM: %d\n", pHalData->AMPDUBurstNum); - } + } break; case OID_RT_AUTO_AMPDU_BURST_ENABLE: @@ -5826,7 +5826,7 @@ N6CSetInformationHandleCustomized11nOids( pNdisCommon->RegRxHignTPThreshold = (u2Byte)(*(pu1Byte)InformationBuffer); pHalData->RxHignTPThreshold = pNdisCommon->RegRxHignTPThreshold; } - break; + break; case OID_RT_BEAMFORMING_START: { @@ -5839,7 +5839,7 @@ N6CSetInformationHandleCustomized11nOids( RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("[WARNING] OID_RT_BEAMFORMING_START, invalid buffer length (%d)!\n", InformationBufferLength)); *BytesNeeded = 8; return NDIS_STATUS_BUFFER_TOO_SHORT; - } + } cpMacAddr(RA, (pu1Byte)InformationBuffer+3); Mode = (*((pu1Byte)InformationBuffer) >> 4) & 0xf; BW = *((pu1Byte)(InformationBuffer)) & 0xf; @@ -5867,8 +5867,8 @@ N6CSetInformationHandleCustomized11nOids( RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("[WARNING] OID_RT_BEAMFORMING_PERIOD, invalid buffer length (%d)!\n", InformationBufferLength)); *BytesNeeded = 4; return NDIS_STATUS_BUFFER_TOO_SHORT; - } - + } + Mode = (*((pu1Byte)InformationBuffer) >> 4) & 0xf; BW = *((pu1Byte)(InformationBuffer)) & 0xf; Idx = *((pu1Byte)InformationBuffer+1); @@ -5876,7 +5876,7 @@ N6CSetInformationHandleCustomized11nOids( } break; - + case OID_RT_ADCSMP_TRIG: { @@ -5891,17 +5891,17 @@ N6CSetInformationHandleCustomized11nOids( PollingTime =( (*((pu1Byte)InformationBuffer+5)) << 8) | (*((pu1Byte)InformationBuffer+4)); ADCSmp_Set(pAdapter, TrigSel, TrigSigSel, DmaDataSigSel, TriggerTime, PollingTime); - } + } break; case OID_RT_ADCSMP_STOP: ADCSmp_Stop(pAdapter); break; - + case OID_RT_11N_TX_RATE_DISPLAY: pMgntInfo->OSTxRateDisplayType = *((pu1Byte)InformationBuffer); break; - + case OID_RT_11N_FORCED_ADDBA: { PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); @@ -5919,18 +5919,18 @@ N6CSetInformationHandleCustomized11nOids( if(pExtAdapter != NULL) pExtHTInfo = pExtAdapter->MgntInfo.pHTInfo; - + pHTInfo->ForcedAMPDUMode = *((pu1Byte)InformationBuffer); if(pExtHTInfo != NULL) pExtHTInfo->ForcedAMPDUFactor = pHTInfo->ForcedAMPDUMode; switch(pHTInfo->ForcedAMPDUMode) - { + { case HT_AMPDU_AUTO: case HT_AMPDU_DISABLE: // Do nothing break; - + case HT_AMPDU_ENABLE: // Verify input paramter. if(InformationBufferLength < 2) @@ -5947,14 +5947,14 @@ N6CSetInformationHandleCustomized11nOids( Status = NDIS_STATUS_INVALID_DATA; return Status; } - + pHTInfo->ForcedAMPDUFactor = nAMPDU_Ability&0x07; pHTInfo->ForcedMPDUDensity = (nAMPDU_Ability>>4)&0x07; if(pExtHTInfo != NULL) { pExtHTInfo->ForcedAMPDUFactor = pHTInfo->ForcedAMPDUFactor ; pExtHTInfo->ForcedMPDUDensity = pHTInfo->ForcedMPDUDensity; - } + } break; } } @@ -5968,7 +5968,7 @@ N6CSetInformationHandleCustomized11nOids( HT_MGNT_SET_AMSDU(pAdapter, (HT_AMSDU_MODE_E)*((pu1Byte)InformationBuffer)); switch(pHTInfo->ForcedAMSDUMode) - { + { case HT_AMSDU_AUTO: case HT_AMSDU_DISABLE: { @@ -5990,7 +5990,7 @@ N6CSetInformationHandleCustomized11nOids( } break; - + case HT_AMSDU_ENABLE: case HT_AMSDU_WITHIN_AMPDU: if(InformationBufferLength < 5) @@ -6005,7 +6005,7 @@ N6CSetInformationHandleCustomized11nOids( if(nAMSDU_SizeType > 6) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } nAMSDU_MaxSize= ( (*((pu1Byte)InformationBuffer+2)) << 8) | (*((pu1Byte)InformationBuffer+3)); @@ -6013,7 +6013,7 @@ N6CSetInformationHandleCustomized11nOids( if(nAMSDU_SizeType == 0 && nAMSDU_MaxSize == 0 ) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } switch(nAMSDU_SizeType) @@ -6038,22 +6038,22 @@ N6CSetInformationHandleCustomized11nOids( break; default: pHTInfo->ForcedAMSDUMaxSize = AMSDU_SIZE_UNSPECIFED; - break; + break; } - + nAMSDU_MaxNum = *((pu1Byte)InformationBuffer+4); if(pHTInfo->ForcedAMSDUMode == HT_AMSDU_WITHIN_AMPDU && nAMSDU_MaxNum < 1 ) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } - + pHTInfo->ForcedAMSDUMaxNum =nAMSDU_MaxNum; break; } - //DbgPrint( "AMSDU mode %d AMSDU size %d AMSDU Num %d\n", + //DbgPrint( "AMSDU mode %d AMSDU size %d AMSDU Num %d\n", // pHTInfo->ForcedAMSDUMode, pHTInfo->ForcedAMSDUMaxSize, pHTInfo->ForcedAMSDUMaxNum); } break; @@ -6061,15 +6061,15 @@ N6CSetInformationHandleCustomized11nOids( case OID_RT_11N_FORCED_SHORTGI: { PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); - + if(*((pu1Byte)InformationBuffer) > 2) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } - + pHTInfo->ForcedShortGI = (*((pu1Byte)InformationBuffer)); - + } break; @@ -6079,11 +6079,11 @@ N6CSetInformationHandleCustomized11nOids( (rtStatus = MgntActSet_802_11_LDPC_MODE(pAdapter, InformationBuffer, InformationBufferLength))) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } - + } - break; + break; case OID_RT_11N_FORCED_STBC: { @@ -6091,11 +6091,11 @@ N6CSetInformationHandleCustomized11nOids( (rtStatus = MgntActSet_802_11_STBC_MODE(pAdapter, InformationBuffer, InformationBufferLength))) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } - + } - break; + break; case OID_RT_11N_MIMOPS_MODE: { @@ -6104,7 +6104,7 @@ N6CSetInformationHandleCustomized11nOids( if((NewMimoPsMode == 2) || (NewMimoPsMode > 3)) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } // get first Adapter with AP mode. @@ -6159,7 +6159,7 @@ N6CSetInformationHandleCustomized11nOids( BOOLEAN bRxReorderEnable; u1Byte RxReorderWinSize; u1Byte RxReorderPendingTime; // ms - + // Get forced data rate to set. bRxReorderEnable = (*((u1Byte*)InformationBuffer)==1)?TRUE:FALSE; @@ -6186,7 +6186,7 @@ N6CSetInformationHandleCustomized11nOids( Status = NDIS_STATUS_INVALID_DATA; return Status; } - + pMgntInfo->pHTInfo->bCurRxReorderEnable = TRUE; pMgntInfo->pHTInfo->RxReorderWinSize = RxReorderWinSize; pMgntInfo->pHTInfo->RxReorderPendingTime = RxReorderPendingTime; @@ -6197,7 +6197,7 @@ N6CSetInformationHandleCustomized11nOids( PRX_REORDER_ENTRY pRxReorderEntry; PlatformAcquireSpinLock(pAdapter, RT_RX_SPINLOCK); - + while(&pRxTS->TsCommonInfo.List != &pMgntInfo->Rx_TS_Admit_List) { PlatformCancelTimer(pAdapter, &pRxTS->RxPktPendingTimer); @@ -6207,7 +6207,7 @@ N6CSetInformationHandleCustomized11nOids( pRxReorderEntry = (PRX_REORDER_ENTRY)RTRemoveHeadList(&pRxTS->RxPendingPktList); pRxTS->RxBatchCount--; CountRxStatistics(pAdapter, pRxReorderEntry->pRfd); - /*if(pAdapter->bInHctTest && + /*if(pAdapter->bInHctTest && pRxReorderEntry->pRfd->FragLength == pRxReorderEntry->pRfd->PacketLength&& pAdapter->ForHctTest < 25 ) { @@ -6225,7 +6225,7 @@ N6CSetInformationHandleCustomized11nOids( } } break; - + case OID_RT_11N_DYNAMIC_TX_POWER_CONTROL: //Dynamic Tx power for near/far range enable/Disable , by Jacken , 2008-03-06 if( *((pu1Byte)InformationBuffer) == 0 ) { @@ -6237,7 +6237,7 @@ N6CSetInformationHandleCustomized11nOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_11N_DYNAMIC_TX_POWER_CONTROL: enable\n")); pMgntInfo->bDynamicTxPowerEnable = TRUE; } - break; + break; case OID_RT_11N_TX_POWER_TRAINING: if( *((pu1Byte)InformationBuffer) == 0 ) { @@ -6250,10 +6250,10 @@ N6CSetInformationHandleCustomized11nOids( pMgntInfo->bDisableTXPowerTraining = FALSE; } //This oid only valid when tx power training function excuted by fw - // when media connect ,set bSetTXPowerTrainingByOid TRUE ,and dm_RefreshRateAdaptiveMask() - //will update H2CCMD TO FW to disable or enable tx power training, - pMgntInfo->bSetTXPowerTrainingByOid = TRUE; - break; + // when media connect ,set bSetTXPowerTrainingByOid TRUE ,and dm_RefreshRateAdaptiveMask() + //will update H2CCMD TO FW to disable or enable tx power training, + pMgntInfo->bSetTXPowerTrainingByOid = TRUE; + break; case OID_RT_11N_DISABLE_TX_POWER_BY_RATE: if( *((pu1Byte)InformationBuffer) == 1 ) @@ -6265,11 +6265,11 @@ N6CSetInformationHandleCustomized11nOids( { pMgntInfo->bDisableTXPowerByRate = FALSE; } - - break; + + break; + - //added just for debug. Dump all regs' value. by wl. case OID_RT_11N_DUMP_REGS: { @@ -6283,14 +6283,14 @@ N6CSetInformationHandleCustomized11nOids( if( *((pu1Byte)InformationBuffer) == 1 ) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Dump regs' value:::\n")); + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Dump regs' value:::\n")); pMgntInfo->bDumpRegs= TRUE; } - + *BytesRead = InformationBufferLength; } - break; - // add for 92d rx batch indicate + break; + // add for 92d rx batch indicate case OID_RT_11N_SET_RX_FAST_BATCH_NUM: { if(InformationBufferLength < sizeof(u1Byte)) @@ -6300,19 +6300,19 @@ N6CSetInformationHandleCustomized11nOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_11N_DUMP_REGS: invalid length(%d), BytesNeeded: %d !!!\n", InformationBufferLength, *BytesNeeded)); return Status; } - + pMgntInfo->NumforRxFastbatch= *((pu1Byte)InformationBuffer); if( pMgntInfo->NumforRxFastbatch<1 ) { - + pMgntInfo->NumforRxFastbatch = 1; } - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set RX fast batch Indication num:%d.\n",pMgntInfo->NumforRxFastbatch)); - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set RX fast batch Indication num:%d.\n",pMgntInfo->NumforRxFastbatch)); + *BytesRead = InformationBufferLength; } break; - + case OID_RT_11N_TDLS_ENABLE: { TDLS_SetConfiguration(pAdapter, InformationBuffer, (u1Byte)InformationBufferLength); @@ -6329,8 +6329,8 @@ N6CSetInformationHandleCustomized11nOids( pMgntInfo->RegPreferBand = *((pu2Byte)InformationBuffer); RT_TRACE(COMP_OID_SET,DBG_LOUD,("RegPreferBand=%d\n", pMgntInfo->RegPreferBand)); } - break; - + break; + case OID_RT_CUSTOMER_WOW_S5_INFO: { RT_TRACE(COMP_OID_SET, DBG_LOUD,("===> OID_RT_CUSTOMER_WOW_S5_INFO \n")); @@ -6344,7 +6344,7 @@ N6CSetInformationHandleCustomized11nOids( MgntActSet_S5_WAKEUP_INFO(pAdapter, (pu1Byte)InformationBuffer , InformationBufferLength); } break; - + case OID_RT_CUSTOMER_WOW_S5_SUPPORT : { ULONG bEnableS5; @@ -6368,10 +6368,10 @@ N6CSetInformationHandleCustomized11nOids( pMgntInfo->bReceiveSystemPSOID = FALSE; RT_TRACE(COMP_TEST, DBG_LOUD, ("OID_RT_CUSTOMER_WOW_S5_SUPPORT disenable S5\n")); } - + } break; - + } return Status; @@ -6398,7 +6398,7 @@ N6CSetInformationHandleCustomizedSecurityOids( *BytesRead = 0; *BytesNeeded = 0; - + switch(Oid) { default: @@ -6415,7 +6415,7 @@ N6CSetInformationHandleCustomizedSecurityOids( BOOLEAN IsGroup = FALSE; BOOLEAN IsGroupTransmitKey = FALSE; pu1Byte pKeyRSC = (pu1Byte)&key->KeyRSC; - + RT_TRACE(COMP_OID_SET, DBG_LOUD,("===> Set OID_802_11_ADD_KEY, key->Length=%d\n", key->Length )); RT_PRINT_DATA(COMP_OID_SET, DBG_TRACE, "OID_802_11_ADD_KEY InformationBuffer", InformationBuffer, key->Length ); @@ -6423,11 +6423,11 @@ N6CSetInformationHandleCustomizedSecurityOids( if(key->KeyIndex == 0xc0000001) { RT_TRACE(COMP_SEC, DBG_LOUD,("[Note] KeyIndex is 0xc0000001\n")); - + pNdisCommon->RegWepEncStatus = pNdisCommon->WepEncStatusBeforeWpaVerify; pNdisCommon->RegEncAlgorithm = pNdisCommon->EncAlgorithmBeforeWpaVerify; pNdisCommon->RegAuthentAlg = pNdisCommon->AuthentAlgBeforeWpaVerify; - + N6RestoreLastInitSetting(pAdapter); } @@ -6441,7 +6441,7 @@ N6CSetInformationHandleCustomizedSecurityOids( Status = NDIS_STATUS_INVALID_DATA; return Status; } - + if(key->KeyIndex & 0x0fffffff) { //kcwu: @@ -6475,7 +6475,7 @@ N6CSetInformationHandleCustomizedSecurityOids( // 2005.10.17, by rcnjko. if(key->KeyLength == 32) { - key->KeyLength = 16; + key->KeyLength = 16; } else { @@ -6485,8 +6485,8 @@ N6CSetInformationHandleCustomizedSecurityOids( } // Check key length for WEP. For NDTEST, 2005.01.27, by rcnjko. - if( - (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 && key->KeyLength != 5) || + if( + (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 && key->KeyLength != 5) || (pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104 && key->KeyLength != 13) ) { @@ -6512,7 +6512,7 @@ N6CSetInformationHandleCustomizedSecurityOids( else { // Group key RT_TRACE(COMP_SEC, DBG_LOUD,("OID_802_11_ADD_KEY: +++++ Group key +++++\n")); - + if(pMgntInfo->mIbss && !MacAddr_isBcst(key->BSSID)) { RT_TRACE(COMP_SEC, DBG_LOUD,("<=== SetInfo, OID_802_11_ADD_KEY: pMgntInfo.mIbss && !MacAddr_isBcst(key->BSSID)\n")); @@ -6539,7 +6539,7 @@ N6CSetInformationHandleCustomizedSecurityOids( // We should not reject the WEP key with length 5 or 13 in this case. // // - Added by Annie, 2006-05-10. - - + RT_TRACE( COMP_SEC, DBG_LOUD, ("OID_802_11_ADD_KEY[Group]: Not to Check key length 32 for TKIP because we'e in RT_SEC_LVL_NONE.\n") ); } else @@ -6552,8 +6552,8 @@ N6CSetInformationHandleCustomizedSecurityOids( // Check key length for AES // For NDTEST, we allow keylen=32 in this case. 2005.01.27, by rcnjko. - else if(pMgntInfo->SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_AESCCMP && - (key->KeyLength != 16 && key->KeyLength != 32) ) + else if(pMgntInfo->SecurityInfo.GroupEncAlgorithm == RT_ENC_ALG_AESCCMP && + (key->KeyLength != 16 && key->KeyLength != 32) ) { if( pMgntInfo->SecurityInfo.SecLvl == RT_SEC_LVL_NONE ) { @@ -6581,7 +6581,7 @@ N6CSetInformationHandleCustomizedSecurityOids( IsGroup = TRUE; // Added for WPA2-PSK. added by Annie, 2005-09-23. - // Moved by Bruce to pass PMK of WMM WPA2 test, by Bruce, 2007-11-07. + // Moved by Bruce to pass PMK of WMM WPA2 test, by Bruce, 2007-11-07. PlatformRequestPreAuthentication( pAdapter, PRE_AUTH_INDICATION_REASON_ASSOCIATION ); // Check the group key. Added by Annie, 2005-07-06. @@ -6609,7 +6609,7 @@ N6CSetInformationHandleCustomizedSecurityOids( { Status = NDIS_STATUS_INVALID_DATA; } - + return Status; } break; @@ -6627,7 +6627,7 @@ N6CSetInformationHandleCustomizedSecurityOids( BOOLEAN IsDefaultKeyId; RT_TRACE(COMP_SEC, DBG_LOUD, ("Set OID_802_11_ADD_WEP\n")); - + key = (NDIS_802_11_WEP *)InformationBuffer; KeyIndex = key->KeyIndex; KeyLength = key->KeyLength; @@ -6640,19 +6640,19 @@ N6CSetInformationHandleCustomizedSecurityOids( RT_TRACE( COMP_SEC, DBG_TRACE, ("\tKeyLength = %d\n", KeyLength) ); RT_TRACE( COMP_SEC, DBG_TRACE, ("\tKeyMaterial = %13s\n", KeyMaterial) ); RT_TRACE( COMP_SEC, DBG_TRACE, ("\tIsDefaultKey = %d\n", IsDefaultKey) ); - + if( (KeyLength == 5) && (KeyIndex < 4) ) { EncAlgorithm = RT_ENC_ALG_WEP40; // For WPA Verify. - pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP64; + pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP64; PlatformMoveMemory((PVOID)&(pNdisCommon->RegDefaultKeyBuf[KeyIndex]), (PVOID)KeyMaterial, KeyLength); } else if( (KeyLength == 13) && (KeyIndex < 4) ) { EncAlgorithm = RT_ENC_ALG_WEP104; // For WPA Verify. - pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP128; + pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP128; PlatformMoveMemory((PVOID)&(pNdisCommon->RegDefaultKeyWBuf[KeyIndex]), (PVOID)KeyMaterial, KeyLength); } else @@ -6709,7 +6709,7 @@ N6CSetInformationHandleCustomizedSecurityOids( PNDIS_802_11_REMOVE_KEY key = (PNDIS_802_11_REMOVE_KEY)InformationBuffer; BOOLEAN IsGroup = (key->KeyIndex & 0x4000000)?FALSE:TRUE; RT_ENC_ALG EncAlgorithm = (IsGroup)?pMgntInfo->SecurityInfo.GroupEncAlgorithm:pMgntInfo->SecurityInfo.PairwiseEncAlgorithm; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_802_11_REMOVE_KEY\n")); @@ -6718,7 +6718,7 @@ N6CSetInformationHandleCustomizedSecurityOids( // BIT30 => 1: Pairwise // 0: Group // Other bits => 0 - + if(key->KeyIndex & 0xbffffffc) { Status = NDIS_STATUS_INVALID_DATA; @@ -6745,7 +6745,7 @@ N6CSetInformationHandleCustomizedSecurityOids( } // NDIS_802_11_ENCRYPTION_STATUS should be the same as RT_802_11_ENCRYPTION_STATUS - // which is defined by KcWu. 2004.09.23, by rcnjko. + // which is defined by KcWu. 2004.09.23, by rcnjko. pMgntInfo->SecurityInfo.EncryptionStatus = *(RT_802_11_ENCRYPTION_STATUS*)InformationBuffer; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_802_11_ENCRYPTION_STATUS: %d\n", *(PNDIS_802_11_ENCRYPTION_STATUS)InformationBuffer)); @@ -6788,9 +6788,9 @@ N6CSetInformationHandleCustomizedSecurityOids( pMgntInfo->SecurityInfo.EncryptionHeadOverhead = WEP_IV_LEN; pMgntInfo->SecurityInfo.EncryptionTailOverhead = WEP_ICV_LEN; // For WPA Verify. - // WEP64 or WEP128 should be determined in OID_802_11_ADD_WEP later. + // WEP64 or WEP128 should be determined in OID_802_11_ADD_WEP later. // 2004.11.24, by rcnjko. - pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP64; + pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_WEP64; pNdisCommon->RegEncAlgorithm = REG_WEP_Encryption; break; @@ -6806,9 +6806,9 @@ N6CSetInformationHandleCustomizedSecurityOids( //2004/06/25, kcwu_comment, The EncryptionTailOverhead only includes WEP IV, and doesn't include TKIP MIC pMgntInfo->SecurityInfo.EncryptionTailOverhead = WEP_ICV_LEN; // For WPA Verify. - pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_NO_WEP; + pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_NO_WEP; pNdisCommon->RegEncAlgorithm = REG_TKIPv2_Encryption; - // Emily. + // Emily. // [AnnieWorkaround] Default value changed from CAM_AES to CAM_TKIP by Annie for solving WPA-none problem. // In Ad-Hoc mode, use encryption TKIP (authmode=WPA-None). // If upper layer is windows zero-config, OID_802_11_ADD_KEY is called before OID_802_11_ENCRYPTION_STATUS. @@ -6816,12 +6816,12 @@ N6CSetInformationHandleCustomizedSecurityOids( // At least, If we go into this case, we set default EncAlgo as CAM_TKIP to config correct CAM. // - Annie, 2005-08-16. if( (pNdisCommon->EncAlgorithmBeforeWpaVerify!=REG_WAPI_PSK) || FALSE == WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_WAPISUPPORT, 0)) - {//Temply add to solve UI Switch problem which cause wapi msk tx key invalid zhiyuan 2009/12/22 + {//Temply add to solve UI Switch problem which cause wapi msk tx key invalid zhiyuan 2009/12/22 if(pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_ADHOC && !(ACTING_AS_AP(pAdapter) )) { u1Byte CAM_CONST_BROAD[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - pAdapter->HalFunc.SetKeyHandler(pAdapter, + pAdapter->HalFunc.SetKeyHandler(pAdapter, 0, //KeyIndex, CAM_CONST_BROAD, TRUE, //IsGroup, @@ -6844,14 +6844,14 @@ N6CSetInformationHandleCustomizedSecurityOids( pMgntInfo->SecurityInfo.EncryptionHeadOverhead = EXT_IV_LEN; pMgntInfo->SecurityInfo.EncryptionTailOverhead = AES_MIC_LEN; // For WPA Verify. - pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_NO_WEP; + pNdisCommon->RegWepEncStatus = REG_WEP_STATUS_NO_WEP; pNdisCommon->RegEncAlgorithm = REG_AESCCMP_Encryption; #else // For HCT 12.1 test if we have not yet implemented AES, 2005.07.11, by rcnjko. Status = NDIS_STATUS_NOT_SUPPORTED; return Status; #endif - // Emily. + // Emily. // [AnnieWorkaround] Default value changed from CAM_AES to CAM_TKIP by Annie for solving WPA-none problem. // In Ad-Hoc mode, use encryption TKIP (authmode=WPA-None). // If upper layer is windows zero-config, OID_802_11_ADD_KEY is called before OID_802_11_ENCRYPTION_STATUS. @@ -6859,11 +6859,11 @@ N6CSetInformationHandleCustomizedSecurityOids( // At least, If we go into this case, we set default EncAlgo as CAM_TKIP to config correct CAM. // - Annie, 2005-08-16. if( (pNdisCommon->EncAlgorithmBeforeWpaVerify!=REG_WAPI_PSK) || FALSE == WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_WAPISUPPORT, 0)) - {//Temply add to solve UI Switch problem which cause wapi msk tx key invalid zhiyuan 2009/12/22 + {//Temply add to solve UI Switch problem which cause wapi msk tx key invalid zhiyuan 2009/12/22 if(pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_ADHOC && !(ACTING_AS_AP(pAdapter) )) { u1Byte CAM_CONST_BROAD[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - pAdapter->HalFunc.SetKeyHandler(pAdapter, + pAdapter->HalFunc.SetKeyHandler(pAdapter, 0, //KeyIndex, CAM_CONST_BROAD, TRUE, //IsGroup, @@ -6878,7 +6878,7 @@ N6CSetInformationHandleCustomizedSecurityOids( case Wapi_Certificate: WAPI_SecFuncHandler(WAPI_SETAUTHENCRYPTSTATE,pAdapter,(PVOID)&Oid,InformationBuffer); break; - + default: RT_TRACE(COMP_SEC, DBG_LOUD, ("\tdefault\n")); pMgntInfo->SecurityInfo.PairwiseEncAlgorithm = RT_ENC_ALG_NO_CIPHER; @@ -6903,7 +6903,7 @@ N6CSetInformationHandleCustomizedSecurityOids( if( pMgntInfo->Regdot11networktype == RT_JOIN_NETWORKTYPE_ADHOC && MgntActQuery_ApType(pAdapter) == RT_AP_TYPE_NONE ) { - RT_TRACE(COMP_SEC , DBG_LOUD , ("==>Win7 we used SW in AD-HOT \n")); + RT_TRACE(COMP_SEC , DBG_LOUD , ("==>Win7 we used SW in AD-HOT \n")); SecSetSwEncryptionDecryption( pAdapter , TRUE , TRUE ); } else if( pMgntInfo->SecurityInfo.PairwiseEncAlgorithm == RT_ENC_ALG_WEP104 || @@ -6917,7 +6917,7 @@ N6CSetInformationHandleCustomizedSecurityOids( RT_TRACE(COMP_SEC , DBG_LOUD , ("==>Win7 we used HW in default !! \n")); SecSetSwEncryptionDecryption( pAdapter , FALSE , FALSE ); } - + pAdapter->HalFunc.EnableHWSecCfgHandler(pAdapter); } @@ -6941,7 +6941,7 @@ N6CSetInformationHandleCustomizedSecurityOids( } // Update STA's RSNIE. - if( pMgntInfo->SecurityInfo.EncryptionStatus !=Wapi_Encryption && pMgntInfo->SecurityInfo.EncryptionStatus != Wapi_Certificate) + if( pMgntInfo->SecurityInfo.EncryptionStatus !=Wapi_Encryption && pMgntInfo->SecurityInfo.EncryptionStatus != Wapi_Certificate) SecConstructRSNIE(pAdapter); *BytesRead = InformationBufferLength; @@ -6959,12 +6959,12 @@ N6CSetInformationHandleCustomizedSecurityOids( { PRT_SECURITY_T pSecInfo = &(pMgntInfo->SecurityInfo); PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo = (PNDIS_802_11_ASSOCIATION_INFORMATION)InformationBuffer; - + if( pAssocInfo->RequestIELength != 0) { - // do not copy field [Element id] and [Length] + // do not copy field [Element id] and [Length] PlatformMoveMemory( - pSecInfo->RSNIE.Octet, + pSecInfo->RSNIE.Octet, (pu1Byte)InformationBuffer + pAssocInfo->OffsetRequestIEs + 2, pAssocInfo->RequestIELength - 2); pSecInfo->RSNIE.Length = (u1Byte)pAssocInfo->RequestIELength - 2; @@ -6999,7 +6999,7 @@ N6CSetInformationHandleCustomizedSecurityOids( *BytesNeeded = sizeof(NDIS_802_11_AUTHENTICATION_MODE ); return Status; } - + authmode = *(RT_AUTH_MODE*)InformationBuffer; // For WPA Verify. @@ -7100,19 +7100,19 @@ N6CSetInformationHandleCustomizedSecurityOids( *BytesNeeded = sizeof(KeyId); return Status; } - + // Get default key id to set. KeyId = *((u2Byte*)InformationBuffer); // Set default key id: 0 ~ 3. KeyId &= 0x3; - // The following code will cause 8187 failed to link to AP. + // The following code will cause 8187 failed to link to AP. pMgntInfo->SecurityInfo.DefaultTransmitKeyIdx = (u1Byte)KeyId; pNdisCommon->RegDefaultKeyId = (u1Byte)KeyId; } RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_SET_DEFAULT_KEY_ID.\n")); break; - + } return Status; @@ -7138,18 +7138,18 @@ N6CSetInformationHandleCustomizedNANOids( *BytesRead = 0; *BytesNeeded = 0; - + switch(Oid) - { -#if (NAN_SUPPORT == 1) - case OID_RT_NAN_TEST: + { +#if (NAN_SUPPORT == 1) + case OID_RT_NAN_TEST: { u4Byte cmd = 0; u4Byte ID = 0, Port = 0, cmdid = 0, Para = 0; RT_TRACE(COMP_NAN, DBG_LOUD, ("===> Set OID_RT_NAN_TEST CMD = 0x%X, len = %d\n", *((pu4Byte)InformationBuffer), InformationBufferLength)); - if (InformationBufferLength == sizeof(u4Byte)) { + if (InformationBufferLength == sizeof(u4Byte)) { cmd = *((pu4Byte)InformationBuffer); ID = cmd & 0xFF; Port = (cmd & 0xFF00) >> 8; @@ -7157,7 +7157,7 @@ N6CSetInformationHandleCustomizedNANOids( Para = (cmd & 0xFF000000) >> 24; RT_TRACE(COMP_NAN, DBG_LOUD, ("===> ID=0x%X, Port=0x%X, cmdid=0x%X, Para=0x%X\n", ID,Port,cmdid,Para)); - + if (ID == 0x29) NAN_DbgCtrlOperation(pAdapter, Port, cmdid, Para); else if (ID == 0x30) @@ -7172,8 +7172,8 @@ N6CSetInformationHandleCustomizedNANOids( RT_TRACE(COMP_NAN, DBG_LOUD, ("<=== Set OID_RT_NAN_TEST CMD = 0x%X\n", cmd)); } break; - - case OID_RT_NAN_SDF: + + case OID_RT_NAN_SDF: { RT_TRACE(COMP_NAN, DBG_LOUD, ("===> Set OID_RT_NAN_SDF, len = %d\n", InformationBufferLength)); { @@ -7182,7 +7182,7 @@ N6CSetInformationHandleCustomizedNANOids( u1Byte u1bTxRate; OCTET_STRING ocPacketToSend; NAN_SDF_CONTEXT FakeSDFCtx; - + if (InformationBufferLength < 4){ u1Byte Dest[6] = {0x00, 0xE0, 0x4c, 0x81, 0x88, 0xbf}; u1Byte Dest_b[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; @@ -7199,19 +7199,19 @@ N6CSetInformationHandleCustomizedNANOids( } else PlatformMoveMemory(pNanInfo->SDFCtx.PeerAddr, Dest_b, 6); - + PlatformMoveMemory(pNanInfo->SDFCtx.SDAttibute.ServiceID, ServiceID, 6); pNanInfo->SDFCtx.SDAttibute.InstanceID = 0x88; pNanInfo->SDFCtx.ConfigPara.TimeToLive = 0xFFFFFFFF; goto test_SDF; } - + if( InformationBufferLength < 16 ) // 16 = 6(peer addr) + 9(SDA Mandatory) + 1(Configuration Parameters) { Status = NDIS_STATUS_INVALID_LENGTH; return Status; } - + u2bPacketLength = sizeof(InformationBuffer); if( InformationBufferLength < (ULONG)(u2bPacketLength)-1) { @@ -7219,7 +7219,7 @@ N6CSetInformationHandleCustomizedNANOids( *BytesNeeded = u2bPacketLength; return Status; } - + PlatformMoveMemory(pNanInfo->SDFCtx.PeerAddr, InformationBuffer, sizeof(u1Byte)*6); PlatformMoveMemory(&pNanInfo->SDFCtx.SDAttibute,((u1Byte*)(InformationBuffer)+ sizeof(u1Byte)*6), sizeof(NAN_SD_ATTRIBUTE)); PlatformMoveMemory(&pNanInfo->SDFCtx.ConfigPara,((u1Byte*)(InformationBuffer)+ sizeof(u1Byte)*6 + sizeof(NAN_SD_ATTRIBUTE)), sizeof(NAN_SDF_CONFIG_PARA)); @@ -7227,7 +7227,7 @@ N6CSetInformationHandleCustomizedNANOids( pNanInfo->SDFCtx.bIsContentUpdated = TRUE; //pNanInfo->SDFCtx.bIsContentUpdatedUnicast = TRUE; -#if (WPP_SOFTWARE_TRACE == 0) +#if (WPP_SOFTWARE_TRACE == 0) RT_PRINT_ADDR(COMP_NAN, DBG_LOUD, "OID_RT_NAN_SDF: Addr = ", pNanInfo->SDFCtx.PeerAddr); RT_PRINT_DATA(COMP_NAN, DBG_LOUD, ("ServiceID = "), pNanInfo->SDFCtx.SDAttibute.ServiceID, 6); RT_TRACE(COMP_NAN, DBG_LOUD, ("InstanceID = %d, ReqID = %d, ServiceCtrl = 0x%02X\n", pNanInfo->SDFCtx.SDAttibute.InstanceID, pNanInfo->SDFCtx.SDAttibute.RequestorID, pNanInfo->SDFCtx.SDAttibute.ServiceControl)); @@ -7253,7 +7253,7 @@ N6CSetInformationHandleCustomizedNANOids( pNanInfo->SDFCtx.ConfigPara.TransmissionPriority, pNanInfo->SDFCtx.ConfigPara.SDFDelay)); RT_PRINT_ADDR(COMP_NAN, DBG_LOUD, "Dest Addr = ", pNanInfo->SDFCtx.ConfigPara.DestAddr); - RT_TRACE(COMP_NAN, DBG_LOUD, ("bIsTimeToSend = %d\n", pNanInfo->SDFCtx.bIsTimeToSend)); + RT_TRACE(COMP_NAN, DBG_LOUD, ("bIsTimeToSend = %d\n", pNanInfo->SDFCtx.bIsTimeToSend)); } RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_SEND_SPECIFIC_PACKET.\n")); } @@ -7301,7 +7301,7 @@ N6CSetInformationHandleCustomizedNANOids( pNanInfo->bAppendFurtherAvailability = TRUE; } } - break; + break; case OID_RT_NAN_FURTHER_AVAILABILITY_RX: { @@ -7367,14 +7367,14 @@ N6CSetInformationHandleCustomizedOids( *BytesRead = 0; *BytesNeeded = 0; - + switch(Oid) { default: // Can not find the OID specified Status = NDIS_STATUS_NOT_RECOGNIZED; break; - + case OID_802_11_BSSID: case OID_RT_802_11_BSSID: if(InformationBufferLength < 6) @@ -7401,22 +7401,22 @@ N6CSetInformationHandleCustomizedOids( Status = NDIS_STATUS_INVALID_LENGTH; return Status; } - + //2004/08/05, kcwu, for NDTEST 1c_wlan_bssidlist - //Driver must set NDIS_802_11_BSSID_LIST_EX->NumberOfItems to 0 + //Driver must set NDIS_802_11_BSSID_LIST_EX->NumberOfItems to 0 //when a scan is performed while the radio is off //Notice: It should be set to FALSE in OID_802_11_INFRASTRUCTURE_MODE, // But we make it change here pNdisCommon->KeepDisconnectFlag = FALSE; //== - + ssid = (PNDIS_802_11_SSID)InformationBuffer; if( ssid->SsidLength > 32 ) { Status = NDIS_STATUS_INVALID_LENGTH; return Status; } - + #if RTL819X_NO_SCAN_AFTER_LINK if(!pMgntInfo->bMediaConnect){ RT_TRACE(COMP_SEND, DBG_LOUD, ("==m==>Scan <==m==\n")); @@ -7465,7 +7465,7 @@ N6CSetInformationHandleCustomizedOids( return Status; } - // MgntActSet_802_11_TX_POWER_LEVEL() does not set tx power in mW. + // MgntActSet_802_11_TX_POWER_LEVEL() does not set tx power in mW. MgntActSet_802_11_TX_POWER_LEVEL( pAdapter, (*(pu4Byte)InformationBuffer) ); *BytesRead = 4; @@ -7473,7 +7473,7 @@ N6CSetInformationHandleCustomizedOids( break; case OID_RT_TX_POWER_LEVEL: - { + { s4Byte powerLevel =0; if( InformationBufferLength < sizeof(s4Byte) ) { @@ -7481,7 +7481,7 @@ N6CSetInformationHandleCustomizedOids( *BytesNeeded = sizeof(s4Byte); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_TX_POWER_LEVEL: invalid length(%d), BytesNeeded: %d !!!\n", InformationBufferLength, *BytesNeeded)); return Status; - } + } powerLevel = *((s4Byte*)InformationBuffer); pNdisCommon->RegTxPowerLevel = powerLevel; pMgntInfo->TxPowerLevel = pNdisCommon->RegTxPowerLevel; @@ -7500,13 +7500,13 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_TX_POWER: invalid length(%d), BytesNeeded: %d !!!\n", InformationBufferLength, *BytesNeeded)); return Status; - } + } powerInDbm = *((s4Byte*)InformationBuffer); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_TX_POWER: %d dBm\n", powerInDbm)); // Save the user's power. pMgntInfo->ClientConfigPwrInDbm = powerInDbm; - MgntActSet_TX_POWER_DBM(pAdapter, powerInDbm); + MgntActSet_TX_POWER_DBM(pAdapter, powerInDbm); *BytesRead = InformationBufferLength; } @@ -7553,7 +7553,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_WARNING, ("Set OID_802_11_INFRASTRUCTURE_MODE: unknown type: 0x%X\n", *(PNDIS_802_11_NETWORK_INFRASTRUCTURE)InformationBuffer)); break; } - + if(ACTING_AS_AP(pAdapter) ) { // 070125, rcnjko. pMgntInfo->Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; @@ -7599,10 +7599,10 @@ N6CSetInformationHandleCustomizedOids( Status = NDIS_STATUS_INVALID_LENGTH; goto set_oid_exit; } - + if(1){ u2Byte ratelen = (u2Byte)InformationBufferLength; - + ratelen = (ratelen<8) ? ratelen : 8; //ShuChen TODO: save desired rate //NdisMoveMemory(&Adapter->NdisDesiredRate[0], InformationBuffer, ratelen); @@ -7634,7 +7634,7 @@ N6CSetInformationHandleCustomizedOids( if(ChnlNum > 0) { MgntActSet_802_11_CONFIGURATION( - pAdapter, + pAdapter, (u2Byte)((pNdisCommon->RegBeaconPeriod != 0) ? pMgntInfo->Regdot11BeaconPeriod : (u2Byte)pConfigToSet->BeaconPeriod), // Do not change beacon interval if user had specified beacon interval for debug purpose. 2005.04.18, by rcnjko. (u1Byte)ChnlNum); } @@ -7664,7 +7664,7 @@ N6CSetInformationHandleCustomizedOids( RT_PS_MODE rtPsModeToSet; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - if( (InformationBuffer == NULL) || + if( (InformationBuffer == NULL) || (InformationBufferLength < sizeof(NDIS_802_11_POWER_MODE)) ) { Status = NDIS_STATUS_INVALID_LENGTH; @@ -7691,7 +7691,7 @@ N6CSetInformationHandleCustomizedOids( pPSC->bLeisurePs= FALSE; MgntActSet_802_11_PowerSaveMode(pAdapter, rtPsModeToSet); //2008.08.25 - if( (pNdisCommon->RegLeisurePsMode) && (rtPsModeToSet == eActive) + if( (pNdisCommon->RegLeisurePsMode) && (rtPsModeToSet == eActive) && (! pAdapter->bInHctTest ) ) { // Auto LeisurePs based on AC or Battery. @@ -7701,8 +7701,8 @@ N6CSetInformationHandleCustomizedOids( pPSC->bLeisurePs= TRUE; else if(pPSC->PowerProfile == NdisPowerProfileAcOnLine ) pPSC->bLeisurePs= FALSE; - - // NdisDevicePnPEventSurpriseRemoved isn't called. + + // NdisDevicePnPEventSurpriseRemoved isn't called. else pPSC->bLeisurePs= TRUE; } @@ -7734,7 +7734,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_802_11_BSSID_LIST_SCAN.\n")); if(pMgntInfo->SnifferTurnOnFlag) break; -#if RTL819X_NO_SCAN_AFTER_LINK +#if RTL819X_NO_SCAN_AFTER_LINK if(!pMgntInfo->bMediaConnect){ RT_TRACE(COMP_SEND, DBG_LOUD, ("==m==> Scan <==m==\n")); MgntActSet_802_11_BSSID_LIST_SCAN(pAdapter); @@ -7752,7 +7752,7 @@ N6CSetInformationHandleCustomizedOids( Status = NDIS_STATUS_INVALID_LENGTH; return Status; } - else + else { NDIS_802_11_TEST* Test = (PNDIS_802_11_TEST)InformationBuffer; @@ -7785,7 +7785,7 @@ N6CSetInformationHandleCustomizedOids( case OID_RT_SET_CHANNEL: { u1Byte btChannel; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_SET_CHANNEL\n")); // Verify input paramter. @@ -7800,10 +7800,10 @@ N6CSetInformationHandleCustomizedOids( btChannel = *((u1Byte*)InformationBuffer); // - // 2012/06/08 MH Dirty fix for adhoc set channel under adhoc mode? + // 2012/06/08 MH Dirty fix for adhoc set channel under adhoc mode? // Before RT UI set channel, the scan process will be called at first and then // the set channel process will be aborted. Need to investigate later!? - // + // { u1Byte delay = 0; PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; @@ -7814,13 +7814,13 @@ N6CSetInformationHandleCustomizedOids( //DbgPrint("scan in progress we can nnot set channel otherwise this will be aborted delay=%d\n", delay); } } - + // Switch channel. if(MgntActSet_802_11_REG_20MHZ_CHANNEL_AND_SWITCH(pAdapter, btChannel) != TRUE) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("!!! Failed to switch to the channel, %d\n", btChannel)); } - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_SET_CHANNEL: %d\n",btChannel)); } break; @@ -7891,7 +7891,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_SET_CHANNELPLAN\n")); { u2Byte ChannelPlan; - + // Verify input paramter if(InformationBufferLength < sizeof(u2Byte)) { @@ -7916,7 +7916,7 @@ N6CSetInformationHandleCustomizedOids( { u1Byte DataRate; PADAPTER pExtAdapter = NULL; - + // Verify input paramter. if(InformationBufferLength < sizeof(DataRate)) { @@ -7929,7 +7929,7 @@ N6CSetInformationHandleCustomizedOids( DataRate = *((u1Byte*)InformationBuffer); // Check if it is valid for current wireless mode. - if(!MgntIsRateValidForWirelessMode(DataRate, pMgntInfo->dot11CurrentWirelessMode) && + if(!MgntIsRateValidForWirelessMode(DataRate, pMgntInfo->dot11CurrentWirelessMode) && DataRate != 0 ) // 0 stands for Auto. { Status = NDIS_STATUS_INVALID_DATA; @@ -7938,7 +7938,7 @@ N6CSetInformationHandleCustomizedOids( } // Set data rate forced. - pExtAdapter = GetDefaultAdapter(pAdapter); + pExtAdapter = GetDefaultAdapter(pAdapter); while(pExtAdapter !=NULL){ pExtAdapter->MgntInfo.ForcedDataRate = (u2Byte)DataRate; pExtAdapter = GetNextExtAdapter(pExtAdapter); @@ -7948,7 +7948,7 @@ N6CSetInformationHandleCustomizedOids( if(InformationBufferLength > 1) { - pExtAdapter = GetDefaultAdapter(pAdapter); + pExtAdapter = GetDefaultAdapter(pAdapter); while(pExtAdapter !=NULL){ pExtAdapter->MgntInfo.ForcedTxDisableRateFallBack = *((u1Byte*)InformationBuffer+1); pExtAdapter = GetNextExtAdapter(pExtAdapter); @@ -7959,7 +7959,7 @@ N6CSetInformationHandleCustomizedOids( case OID_RT_WIRELESS_MODE_FOR_SCAN_LIST: // - // It changes the behavior when we report scan result to upper layer. + // It changes the behavior when we report scan result to upper layer. // See OID_802_11_BSSID_LIST for details. 2005.01.13, by rcnjko. // { @@ -8008,11 +8008,11 @@ N6CSetInformationHandleCustomizedOids( { PADAPTER pDefAdapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pDefMgntInfo = &(pDefAdapter->MgntInfo); - + *BytesRead = sizeof(BOOLEAN); pMgntInfo->bDisableScanByOID = *((BOOLEAN*)InformationBuffer); pDefMgntInfo->bDisableScanByOID = *((BOOLEAN*)InformationBuffer); - + if(pMgntInfo->bDisableScanByOID) { if(MgntScanInProgress(pDefMgntInfo) == TRUE && MgntIsLinkInProgress(pDefMgntInfo) == FALSE) @@ -8021,7 +8021,7 @@ N6CSetInformationHandleCustomizedOids( } RT_TRACE(COMP_SCAN, DBG_LOUD, ("<=== Set OID_RT_SET_SCAN_OPERATION %d.\n", pMgntInfo->bDisableScanByOID)); break; - + case OID_RT_AP_SWITCH_INTO_AP_MODE: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_AP_SWITCH_INTO_AP_MODE.\n")); @@ -8037,14 +8037,14 @@ N6CSetInformationHandleCustomizedOids( // Switch to AP mode. MgntActSet_ApMode(pAdapter, TRUE); break; - } + } } RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_AP_SWITCH_INTO_AP_MODE.\n")); break; case OID_RT_AP_SET_DTIM_PERIOD: { - u1Byte u1DtimPeriod; + u1Byte u1DtimPeriod; // Verify input paramter. if(InformationBufferLength < sizeof(u1Byte)) @@ -8062,7 +8062,7 @@ N6CSetInformationHandleCustomizedOids( case OID_RT_SET_BCN_INTVL: { - u2Byte u2BcnIntv; + u2Byte u2BcnIntv; // Verify input paramter. if(InformationBufferLength < sizeof(u2Byte)) @@ -8102,7 +8102,7 @@ N6CSetInformationHandleCustomizedOids( Status = NDIS_STATUS_INVALID_DATA; return Status; } - + FillOctetString(osPassphrase, pRtPassphrase->Passphrase, ((u2Byte)pRtPassphrase->Length)); //PRINT_DATA(("Set OID_RT_AP_SET_PASSPHRASE: "), osPassphrase.Octet, osPassphrase.Length); @@ -8124,7 +8124,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_SEND_SPECIFIC_PACKET NDIS_STATUS_INVALID_LENGTH.\n")); return Status; } - + // Get packet lengh, in unit of byte. u2bPacketLength = *((pu2Byte)InformationBuffer); if( InformationBufferLength < (ULONG)(16 + u2bPacketLength)) @@ -8135,23 +8135,23 @@ N6CSetInformationHandleCustomizedOids( return Status; } RT_TRACE(COMP_MP, DBG_LOUD, ("[Debug] u2bPacketLength = %d.\n", u2bPacketLength)); - + // Get data rate, in unit of 0.5 Mbps. u1bTxRate = *((pu1Byte)InformationBuffer + 2); RT_TRACE(COMP_MP, DBG_LOUD, ("[Debug] u1bTxRate = %d.\n", u1bTxRate)); - + // Get number of sending packet. u2bTxNumber = *(pu2Byte)( (pu1Byte)InformationBuffer+3 ); RT_TRACE(COMP_MP, DBG_LOUD, ("[Debug] u2bTxNumber = %d.\n", u2bTxNumber)); - + // Get packet to send, it should be an 802.11 frame with CRC append. FillOctetString(ocPacketToSend, ((pu1Byte)InformationBuffer + 16), u2bPacketLength); RT_PRINT_DATA(COMP_MP, DBG_LOUD, "[Debug] ocPacketToSend:\n", ((pu1Byte)InformationBuffer + 16), u2bPacketLength); - + // Send the specific packet. if( u2bTxNumber == 0 ) u2bTxNumber = 1; // At least send one packet. Added by Annie, 2006-03-27. - + for( idx=0; idxCurrentAddress, 6); //RT_PRINT_DATA(COMP_MP, DBG_LOUD, "[Debug] ocPacketToSend::\n", ocPacketToSend.Octet, ocPacketToSend.Length); // For debug purpose @@ -8224,8 +8224,8 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_MP, DBG_LOUD, ("[Debug] return FALSE for MptTag != 0x10ec8139.\n")); } - - + + for( idx=0; idxCurrentAddress, 6); //RT_PRINT_DATA(COMP_MP, DBG_LOUD, "[Debug] ocPacketToSend::\n", ocPacketToSend.Octet, ocPacketToSend.Length); // For debug purpose @@ -8302,8 +8302,8 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_MP, DBG_LOUD, ("[Debug] return FALSE for MptTag != 0x10ec8139.\n")); } - - + + for( idx=0; idxbHiddenSSID) ); break; - + case OID_RT_AP_GET_CLOUD_KEY_EX: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_AP_GET_CLOUD_KEY_EX.\n")); { @@ -8458,12 +8458,12 @@ N6CSetInformationHandleCustomizedOids( } RT_TRACE( COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_AP_GET_CLOUD_KEY_EX\n") ); break; - + case OID_RT_FILTER_DEFAULT_PERMITED: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_FILTER_DEFAULT_PERMITED.\n")); { BOOLEAN bPermited; - + if((InformationBufferLength == 0)||(InformationBuffer == 0)) { RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_RT_FILTER_DEFAULT_PERMITED: Invalid Length!\n") ); @@ -8472,27 +8472,27 @@ N6CSetInformationHandleCustomizedOids( } bPermited = (BOOLEAN)*( (pu1Byte)InformationBuffer ); // The first double word - + pMgntInfo->bDefaultPermited = bPermited; - + if(pMgntInfo->bDefaultPermited) pMgntInfo->LockType = MAC_FILTER_ACCEPT; else pMgntInfo->LockType = MAC_FILTER_REJECT; - + pMgntInfo->LockedSTACount = 0; pMgntInfo->LockedSTACount_Reject= 0; - + *BytesRead = InformationBufferLength; } RT_TRACE( COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_FILTER_DEFAULT_PERMITED\n") ); - break; - + break; + case OID_RT_MAC_FILTER_TYPE: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_MAC_FILTER_TYPE.\n")); { u1Byte MacFilterType; - + if((InformationBufferLength == 0)||(InformationBuffer == 0)) { RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_RT_MAC_FILTER_TYPE: Invalid Length!\n") ); @@ -8501,14 +8501,14 @@ N6CSetInformationHandleCustomizedOids( } MacFilterType = *( (pu1Byte)InformationBuffer ); // The first double word - + if(MacFilterType > 2) { RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_RT_MAC_FILTER_TYPE: Invalid Data!\n") ); Status = NDIS_STATUS_INVALID_DATA; return Status; } - + pMgntInfo->LockType = MacFilterType; if(pMgntInfo->LockType == MAC_FILTER_DISABLE) { @@ -8517,18 +8517,18 @@ N6CSetInformationHandleCustomizedOids( PlatformZeroMemory( pMgntInfo->LockedSTAList, MAX_LOCKED_STA_LIST_NUM*6 ); PlatformZeroMemory( pMgntInfo->LockedSTAList_Reject, MAX_LOCKED_STA_LIST_NUM*6 ); } - + *BytesRead = InformationBufferLength; } RT_TRACE( COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_MAC_FILTER_TYPE\n") ); - - break; + + break; case OID_RT_LOCKED_STA_ADDRESS: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_LOCKED_STA_ADDRESS.\n")); { u4Byte NumOfLockedAddr; - + if( (InformationBufferLength == 0) || (InformationBuffer == 0) || ( (InformationBufferLength-4)%6 != 0 ) || @@ -8541,7 +8541,7 @@ N6CSetInformationHandleCustomizedOids( } NumOfLockedAddr = *( (pu4Byte)InformationBuffer ); // The first double word - + if( (NumOfLockedAddr > MAX_LOCKED_STA_LIST_NUM) || ((NumOfLockedAddr*6+4) != InformationBufferLength) ) @@ -8561,7 +8561,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_FILTER_STA_ADDRESS.\n")); { u4Byte NumOfLockedAddr; - + if( (InformationBufferLength == 0) || (InformationBuffer == 0) || ( (InformationBufferLength-4)%6 != 0 ) || @@ -8574,7 +8574,7 @@ N6CSetInformationHandleCustomizedOids( } NumOfLockedAddr = *( (pu4Byte)InformationBuffer ); // The first double word - + if( (NumOfLockedAddr > MAX_LOCKED_STA_LIST_NUM) || ((NumOfLockedAddr*6+4) != InformationBufferLength) ) @@ -8588,7 +8588,7 @@ N6CSetInformationHandleCustomizedOids( MgntActSet_Accepted_STA_Address( pAdapter, (pu1Byte)InformationBuffer+4, NumOfLockedAddr ); else if(pMgntInfo->LockType == MAC_FILTER_REJECT) MgntActSet_Rejected_STA_Address( pAdapter, (pu1Byte)InformationBuffer+4, NumOfLockedAddr ); - + *BytesRead = InformationBufferLength; } RT_TRACE( COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_FILTER_STA_ADDRESS\n") ); @@ -8603,7 +8603,7 @@ N6CSetInformationHandleCustomizedOids( return Status; } - pMgntInfo->WdsMode = *((pu1Byte)InformationBuffer); + pMgntInfo->WdsMode = *((pu1Byte)InformationBuffer); *BytesRead = InformationBufferLength; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_AP_WDS_MODE: %d\n", pMgntInfo->WdsMode)); break; @@ -8624,12 +8624,12 @@ N6CSetInformationHandleCustomizedOids( pWdsApList = (pu1Byte)InformationBuffer + sizeof(u4Byte); PlatformMoveMemory(pMgntInfo->WdsApAddr, pWdsApList, 6); *BytesRead = InformationBufferLength; - RT_TRACE(COMP_OID_SET, DBG_LOUD, - ("Set OID_RT_AP_WDS_AP_LIST: %02X-%02X-%02X-%02X-%02X-%02X\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, + ("Set OID_RT_AP_WDS_AP_LIST: %02X-%02X-%02X-%02X-%02X-%02X\n", pMgntInfo->WdsApAddr[0], pMgntInfo->WdsApAddr[1], pMgntInfo->WdsApAddr[2], pMgntInfo->WdsApAddr[3], pMgntInfo->WdsApAddr[4], pMgntInfo->WdsApAddr[5] )); } break; - + case OID_RT_SET_PSP_XLINK_STATUS: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_SET_PSP_XLINK_STATUS:\n")); { @@ -8655,16 +8655,16 @@ N6CSetInformationHandleCustomizedOids( MgntActSet_802_11_WMM_MODE(pAdapter, *((PBOOLEAN)InformationBuffer)); } break; - + case OID_RT_SET_WMM_UAPSD_ENABLE: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_SET_WMM_UAPSD_ENABLE:\n")); - { + { if ( InformationBufferLength < sizeof(AC_UAPSD) ) { *BytesNeeded = sizeof(AC_UAPSD); return NDIS_STATUS_INVALID_LENGTH; } - + MgntActSet_802_11_WMM_UAPSD(GetDefaultAdapter(pAdapter), (AC_UAPSD)(*((pu1Byte)InformationBuffer))); } @@ -8722,21 +8722,21 @@ N6CSetInformationHandleCustomizedOids( } Protection_CCA = *((u1Byte*)InformationBuffer) & 0x0f; - + Protection_Rate = *((pu1Byte)InformationBuffer+1); Protection_RtsFrame = *((pu1Byte)InformationBuffer+2) >> 4; Protection_CtsFrame = *((pu1Byte)InformationBuffer+2) & 0x0f; - + Protection_BW = *((pu1Byte)InformationBuffer+3) >> 4; Protection_SC = *((pu1Byte)InformationBuffer+3) & 0x0f; - if( Protection_CtsFrame > 1 || Protection_RtsFrame > 1 || + if( Protection_CtsFrame > 1 || Protection_RtsFrame > 1 || Protection_BW > 3 || Protection_SC > 3 || Protection_CCA > 2) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } pMgntInfo->ForcedProtectionMode = PROTECTION_MODE_FORCE_ENABLE; @@ -8747,7 +8747,7 @@ N6CSetInformationHandleCustomizedOids( pMgntInfo->ForcedProtectSC = Protection_SC; pMgntInfo->ForcedProtectCCA = Protection_CCA; // DbgPrint("Protection Mode %d Rate %d RTS %d CTS %d BW %d SC %d CCA %d\n", -// pMgntInfo->ForcedProtectionMode, pMgntInfo->ForcedProtectRate>>1, pMgntInfo->bForcedProtectRTSFrame, +// pMgntInfo->ForcedProtectionMode, pMgntInfo->ForcedProtectRate>>1, pMgntInfo->bForcedProtectRTSFrame, // pMgntInfo->bForcedProtectCTSFrame, pMgntInfo->ForcedProtectBW, pMgntInfo->ForcedProtectSC, pMgntInfo->ForcedProtectCCA); } else @@ -8757,10 +8757,10 @@ N6CSetInformationHandleCustomizedOids( } } break; - + case OID_RT_RF_OFF: RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_RT_RF_OFF\n") ); - { + { BOOLEAN bRfOff = FALSE; *BytesNeeded = sizeof(BOOLEAN); @@ -8768,7 +8768,7 @@ N6CSetInformationHandleCustomizedOids( { Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } bRfOff = *((PBOOLEAN)InformationBuffer); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("OID_RT_RF_OFF: bRfOff(%d)\n", bRfOff)); @@ -8780,7 +8780,7 @@ N6CSetInformationHandleCustomizedOids( //Turbo mode mechanism, added by Roger. 2007.02.06. case OID_RT_TURBOMODE: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_TURBOMODE\n")); - { + { // Verify input. if( (InformationBuffer == NULL) || (InformationBufferLength == 0) ) { @@ -8793,28 +8793,28 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_TURBOMODE.\n")); *BytesRead = InformationBufferLength; break; - -#if (WPS_SUPPORT == 1) + +#if (WPS_SUPPORT == 1) // SimpleConfig ,By CCW copy from 818x case OID_RT_SimpleConfScan: { PSIMPLE_CONFIG_T pSimpleConfig = GET_SIMPLE_CONFIG(pMgntInfo); - RT_PRINT_DATA(COMP_MLME, DBG_LOUD, - "Set OID_RT_SimpleConfScan\n", + RT_PRINT_DATA(COMP_MLME, DBG_LOUD, + "Set OID_RT_SimpleConfScan\n", InformationBuffer, InformationBufferLength); // // 2011-05-13 modify by hpfan, for WSC IE support fragment - // - + // + // buffer format: // 1-byte: switch of simple config mode [BIT0] + IE length high byte [BIT7 ~ BIT1] // 1-byte: length of IE low byte // n-byte: content of IE. // - // + // // buffer format: [Support 1byte IE length] // 1-byte: switch of simple config mode. // 1-byte: length of IE. @@ -8857,11 +8857,11 @@ N6CSetInformationHandleCustomizedOids( { IELen += ( ((*(PUCHAR)InformationBuffer) >> 1) << 8 ); } - + // // Validate IE length. 35 is mimmum IE size. // - if( (InformationBufferLength < (ULONG)(IELen)) || // IELen+1 will cause all IE data drop,Because IElen = InformationBufferLength ; + if( (InformationBufferLength < (ULONG)(IELen)) || // IELen+1 will cause all IE data drop,Because IElen = InformationBufferLength ; IELen < 35 || IELen > MAX_SIMPLE_CONFIG_IE_LEN_V2) { Status = NDIS_STATUS_INVALID_LENGTH; @@ -8877,16 +8877,16 @@ N6CSetInformationHandleCustomizedOids( { pSimpleConfig->bAPEnabled = TRUE; } - + // // Enable Simple Config and update IE. // pSimpleConfig->IELen = IELen; PlatformFillMemory(pSimpleConfig->IEBuf,MAX_SIMPLE_CONFIG_IE_LEN_V2 ,0); - CopyMem(pSimpleConfig->IEBuf, - ((u1Byte *)InformationBuffer + 2), + CopyMem(pSimpleConfig->IEBuf, + ((u1Byte *)InformationBuffer + 2), pSimpleConfig->IELen); - + *BytesRead = InformationBufferLength; } else @@ -8910,11 +8910,11 @@ N6CSetInformationHandleCustomizedOids( { IELen += ( ((*(PUCHAR)InformationBuffer) >> 1) << 8 ); } - + // // Validate IE length. 35 is mimmum IE size. // - if( (InformationBufferLength < (ULONG)(IELen)) || // IELen+1 will cause all IE data drop,Because IElen = InformationBufferLength ; + if( (InformationBufferLength < (ULONG)(IELen)) || // IELen+1 will cause all IE data drop,Because IElen = InformationBufferLength ; IELen < 35 || IELen > MAX_SIMPLE_CONFIG_IE_LEN_V2 ) { Status = NDIS_STATUS_INVALID_LENGTH; @@ -8923,13 +8923,13 @@ N6CSetInformationHandleCustomizedOids( pSimpleConfig->bEnabled = FALSE; return Status; } - + // Verify if AP mode exist if(IsExtAPModeExist(pAdapter)) { pSimpleConfig->bAPEnabled = TRUE; } - + // // Enable Simple Config and update IE. // @@ -8938,10 +8938,10 @@ N6CSetInformationHandleCustomizedOids( pSimpleConfig->bEnabled = TRUE; pSimpleConfig->IELen = IELen; PlatformFillMemory(pSimpleConfig->IEBuf,MAX_SIMPLE_CONFIG_IE_LEN_V2,0); - CopyMem(pSimpleConfig->IEBuf, - ((u1Byte *)InformationBuffer + 2), + CopyMem(pSimpleConfig->IEBuf, + ((u1Byte *)InformationBuffer + 2), pSimpleConfig->IELen); - + *BytesRead = InformationBufferLength; } } @@ -8983,7 +8983,7 @@ N6CSetInformationHandleCustomizedOids( case OID_RT_WPS_LED_CTL_START: { - + if( InformationBufferLength < sizeof(u1Byte)) { Status = NDIS_STATUS_INVALID_LENGTH; @@ -8991,11 +8991,11 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START: invalid length(%d), BytesNeeded: %d !!!\n", InformationBufferLength, *BytesNeeded)); return Status; } - + if( *((pu1Byte)InformationBuffer) == 0 ) { pAdapter->HalFunc.LedControlHandler(pAdapter, LED_CTL_STOP_WPS); - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START: stop LED blinking SUCCESS\n")); + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START: stop LED blinking SUCCESS\n")); } else if( *((pu1Byte)InformationBuffer) == 1 ) { @@ -9003,7 +9003,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START: start LED blinking 0.3s\n")); } else if( *((pu1Byte)InformationBuffer) == 2 ) - { + { pAdapter->HalFunc.LedControlHandler(pAdapter, LED_CTL_START_WPS_BOTTON); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START_BOTTON: start LED blinking 0.3s\n")); } @@ -9015,13 +9015,13 @@ N6CSetInformationHandleCustomizedOids( else if ( *((pu1Byte)InformationBuffer) == 4 ) { pAdapter->HalFunc.LedControlHandler(pAdapter, LED_CTL_STOP_WPS_FAIL_OVERLAP); - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START_BOTTON: stop LED blinking fail session overlap\n")); + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START_BOTTON: stop LED blinking fail session overlap\n")); } else - { - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START_BOTTON: WRONG parameter\n")); + { + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_WPS_LED_CTL_START_BOTTON: WRONG parameter\n")); } - + *BytesRead = InformationBufferLength; } break; @@ -9046,7 +9046,7 @@ N6CSetInformationHandleCustomizedOids( case OID_RT_CUSTOMIZED_SCAN: { RT_TRACE(COMP_OID_SET , DBG_LOUD, ("Set OID_RT_CUSTOMIZED_SCAN:\n")); - N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST(GetDefaultAdapter(pAdapter), + N6CSet_DOT11_CUSTOMIZED_SCAN_REQUEST(GetDefaultAdapter(pAdapter), InformationBuffer, InformationBufferLength, BytesRead, @@ -9067,8 +9067,8 @@ N6CSetInformationHandleCustomizedOids( pPSC->bDisableLPSByOID = FALSE; // Return LPS by UpdateLPSStatus(). by tynli. 2011.01.04. pAdapter->HalFunc.UpdateLPSStatusHandler( - pAdapter, - pPSC->RegLeisurePsMode, + pAdapter, + pPSC->RegLeisurePsMode, pPSC->RegPowerSaveMode); RT_TRACE(COMP_OID_SET, DBG_LOUD,("Set OID_RT_CONTROL_LPS: Recover LPS. bLeisurePs=%d\n", pPSC->bLeisurePs)); } @@ -9110,7 +9110,7 @@ N6CSetInformationHandleCustomizedOids( RT_TRACE(COMP_OID_SET, DBG_LOUD,("Set OID_RT_CLEAR_ANTENNA_TEST_VAL\n")); } break; - + case OID_RT_11N_TDLS_ENABLE: { TDLS_SetConfiguration(pAdapter, InformationBuffer, InformationBufferLength); @@ -9129,11 +9129,11 @@ N6CSetInformationHandleCustomizedOids( } MgntActSet_802_11_CustomizedAsocIE(pAdapter, InformationBuffer, (u1Byte)InformationBufferLength); } - break; + break; case OID_RT_LC_STOP_SCAN: { - + if(InformationBufferLength < sizeof(ULONG)) { Status = NDIS_STATUS_INVALID_LENGTH; @@ -9148,7 +9148,7 @@ N6CSetInformationHandleCustomizedOids( case 1: pMgntInfo->bStopScan = TRUE; - // + // MgntDisconnect(pAdapter, unspec_reason); break; @@ -9157,7 +9157,7 @@ N6CSetInformationHandleCustomizedOids( break; } } - break; + break; case OID_RT_PNP_POWER: { @@ -9179,7 +9179,7 @@ N6CSetInformationHandleCustomizedOids( (rtStatus = MgntActSet_WPS_Information(pAdapter, InformationBuffer, (u2Byte)InformationBufferLength))) { Status = NDIS_STATUS_INVALID_DATA; - return Status; + return Status; } #else return NDIS_STATUS_FAILURE; @@ -9198,14 +9198,14 @@ N6CSetInformationHandleCustomizedOids( case OID_RT_FORCED_BUG_CHECK: { // - // Add forced bug check operation(OID_RT_FORCED_BUG_CHECK) to observe some specific HW behavior, + // Add forced bug check operation(OID_RT_FORCED_BUG_CHECK) to observe some specific HW behavior, // e.g., to check whether SDIO device will be recognized by device management after unexpected system restart // 2014.07.05. // KeBugCheckEx( - OID_RT_FORCED_BUG_CHECK, - (ULONG) GET_RT_SDIO_DEVICE(pAdapter)->CurrentPowerState, - (ULONG)pDefaultAdapter->bSurpriseRemoved, + OID_RT_FORCED_BUG_CHECK, + (ULONG) GET_RT_SDIO_DEVICE(pAdapter)->CurrentPowerState, + (ULONG)pDefaultAdapter->bSurpriseRemoved, (ULONG)pDefaultAdapter->bDriverStopped, (ULONG)pDefaultAdapter->bEnterPnpSleep); } @@ -9234,21 +9234,21 @@ N6CSetInformation( PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); NDIS_STATUS Status = NDIS_STATUS_SUCCESS; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("====> N6CSetInformation, OID=0x%08x\n", Oid)); // Moved From Orginal MPSetInformation Set OID (Too Many Interface Dependent OIDs; therefore, separate them into different files) --- Status = InterfaceSetInformationHandleCustomizedOriginalMPSetOid( - MiniportAdapterContext, - Oid, + MiniportAdapterContext, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized Wifi-Direct OID has been handled. return Status; } @@ -9263,7 +9263,7 @@ N6CSetInformation( { // This Oid has been responded to by the MpEventQueryInformation function // We will not handle this Oid and return to the OS. - + RT_TRACE(COMP_CCX, DBG_TRACE, ("Oid intercepted by CCX EventSetInformation! Status 0x%08x\n", Status)); return Status; } @@ -9273,16 +9273,16 @@ N6CSetInformation( // Handle the Wifi-Direct Customized Oids ----------------------------------------------------------------- Status = N6CSetInformationHandleCustomizedWifiDirectOids( - MiniportAdapterContext, - Oid, + MiniportAdapterContext, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized Wifi-Direct OID has been handled. return Status; } @@ -9292,18 +9292,18 @@ N6CSetInformation( // Handle the WAPI Customized Oids --------------------------------------------------------------------- Status = WAPI_OidHandler( - pAdapter, + pAdapter, 1, //N6 Platform 1, //Set OID - Oid, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized WAPI OID has been handled. return Status; } @@ -9313,16 +9313,16 @@ N6CSetInformation( // Handle the Customized 11n Oids ----------------------------------------------------------------------- Status = N6CSetInformationHandleCustomized11nOids( - MiniportAdapterContext, - Oid, + MiniportAdapterContext, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized 11n OID has been handled. return Status; } @@ -9332,35 +9332,35 @@ N6CSetInformation( // Handle the Customized Security Oids -------------------------------------------------------------------------- Status = N6CSetInformationHandleCustomizedSecurityOids( - MiniportAdapterContext, - Oid, + MiniportAdapterContext, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } else Status = NDIS_STATUS_SUCCESS; // -------------------------------------------------------------------------------------------------- - + // Handle the Customized NAN Oids -------------------------------------------------------------------------- Status = N6CSetInformationHandleCustomizedNANOids( - MiniportAdapterContext, - Oid, + MiniportAdapterContext, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized NAN OID has been handled. return Status; } @@ -9369,16 +9369,16 @@ N6CSetInformation( // Handle the Customized Oids -------------------------------------------------------------------------- Status = N6CSetInformationHandleCustomizedOids( - MiniportAdapterContext, - Oid, + MiniportAdapterContext, + Oid, InformationBuffer, - InformationBufferLength, - BytesRead, + InformationBufferLength, + BytesRead, BytesNeeded ); - + if(Status != NDIS_STATUS_NOT_RECOGNIZED) - { + { // The Customized OID has been handled. return Status; } @@ -9388,9 +9388,9 @@ N6CSetInformation( // ============================================================================================ - // The following are the OIDs from the NDIS 6.x, including the Customized OIDs with the same meanings. Please be organized. + // The following are the OIDs from the NDIS 6.x, including the Customized OIDs with the same meanings. Please be organized. // ============================================================================================ - + *BytesRead = 0; *BytesNeeded = 0; @@ -9419,7 +9419,7 @@ N6CSetInformation( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_802_3_MULTICAST_LIST: \n")); break; - + case OID_DOT11_DESIRED_BSS_TYPE: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_DESIRED_BSS_TYPE:\n")); { @@ -9439,7 +9439,7 @@ N6CSetInformation( } } break; - + case OID_DOT11_MEDIA_STREAMING_ENABLED: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_MEDIA_STREAMING_ENABLED::\n")); { @@ -9483,7 +9483,7 @@ N6CSetInformation( BytesNeeded); } break; - + case OID_DOT11_IBSS_PARAMS: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_IBSS_PARAMS:\n")); { @@ -9495,7 +9495,7 @@ N6CSetInformation( BytesNeeded); } break; - + // 2006.10.31, by shien chang. case OID_RT_FRAGMENTATION_THRESHOLD: case OID_DOT11_FRAGMENTATION_THRESHOLD: @@ -9508,7 +9508,7 @@ N6CSetInformation( } MgntActSet_802_11_FRAGMENTATION_THRESHOLD( pAdapter, *((pu2Byte)InformationBuffer) ); - *BytesRead = sizeof(ULONG); + *BytesRead = sizeof(ULONG); } break; @@ -9538,10 +9538,10 @@ N6CSetInformation( // Clear content of bssDesc4Query[]. PlatformZeroMemory( pMgntInfo->bssDesc4Query, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC); pMgntInfo->NumBssDesc4Query = 0; - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: OID_DOT11_FLUSH_BSS_LIST(), clear NumBssDesc4Query\n")); MgntClearRejectedAsocAP(pAdapter); - + *BytesRead = 0; } break; @@ -9570,14 +9570,14 @@ N6CSetInformation( BytesNeeded); } break; - + case OID_DOT11_DATA_RATE_MAPPING_TABLE: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_DATA_RATE_MAPPING_TABLE:\n")); { } break; - + case OID_DOT11_MULTI_DOMAIN_CAPABILITY_ENABLED: case OID_DOT11_COUNTRY_STRING: Status = NDIS_STATUS_NOT_SUPPORTED; @@ -9590,7 +9590,7 @@ N6CSetInformation( { return N6CSet_DOT11_ENABLED_AUTHENTICATION_ALGORITHM( pAdapter, - InformationBuffer, + InformationBuffer, InformationBufferLength, BytesRead, BytesNeeded); @@ -9602,7 +9602,7 @@ N6CSetInformation( RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM\n") ); { return N6CSet_DOT11_ENABLED_UNICAST_CIPHER_ALGORITHM( - pAdapter, + pAdapter, InformationBuffer, InformationBufferLength, BytesRead, @@ -9615,9 +9615,9 @@ N6CSetInformation( case OID_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM: RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM, 0x%08x\n", Oid) ); { - return N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( + return N6CSet_DOT11_ENABLED_MULTICAST_CIPHER_ALGORITHM( pAdapter, - InformationBuffer, + InformationBuffer, InformationBufferLength, BytesRead, BytesNeeded @@ -9633,14 +9633,14 @@ N6CSetInformation( if(CurrIrql < DISPATCH_LEVEL) { KeRaiseIrql(DISPATCH_LEVEL, &CurrIrql); - + Status = N6CSet_DOT11_CIPHER_DEFAULT_KEY( - pAdapter, + pAdapter, InformationBuffer, InformationBufferLength, BytesRead, BytesNeeded); - + KeLowerIrql(CurrIrql); } } @@ -9652,7 +9652,7 @@ N6CSetInformation( { PRT_SECURITY_T pSecInfo = &(pAdapter->MgntInfo.SecurityInfo); u4Byte ulKey; - + if (InformationBufferLength < sizeof(u4Byte)) { *BytesNeeded = sizeof(u4Byte); @@ -9665,7 +9665,7 @@ N6CSetInformation( { return NDIS_STATUS_INVALID_DATA; } - + if(WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_WAPIENABLE, 0)) return NDIS_STATUS_SUCCESS; @@ -9686,17 +9686,17 @@ N6CSetInformation( KeRaiseIrql(DISPATCH_LEVEL, &CurrIrql); Status = N6CSet_DOT11_CIPHER_KEY_MAPPING_KEY( - pAdapter, + pAdapter, InformationBuffer, InformationBufferLength, BytesRead, BytesNeeded); - + KeLowerIrql(CurrIrql); } } break; - + // Added by Annie, 2006-10-09. case OID_DOT11_PMKID_LIST: RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_PMKID_LIST, 0x%08x\n", Oid) ); @@ -9716,7 +9716,7 @@ N6CSetInformation( break; case OID_RT_DISCONNECT_REQUEST: - RT_TRACE( COMP_WPS, DBG_LOUD, ("WPS Set DISCONEECT REQUEST\n") ); + RT_TRACE( COMP_WPS, DBG_LOUD, ("WPS Set DISCONEECT REQUEST\n") ); { Status = N6CSet_DOT11_DISCONNECT_REQUEST( pAdapter, @@ -9737,7 +9737,7 @@ N6CSetInformation( { Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CSet_DOT11_POWER_MGMT_REQUEST(pAdapter, InformationBuffer); *BytesRead = *BytesNeeded; @@ -9759,29 +9759,29 @@ N6CSetInformation( break; // - // 061012, by rcnjko. + // 061012, by rcnjko. case OID_DOT11_ATIM_WINDOW: RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_ATIM_WINDOW\n") ); - { + { *BytesNeeded = sizeof(ULONG); if( InformationBufferLength < *BytesNeeded ) { Status = NDIS_STATUS_INVALID_LENGTH; break; - } + } Status = N6CSet_DOT11_ATIM_WINDOW(pAdapter, InformationBuffer); *BytesRead = *BytesNeeded; } break; - // 061014, by rcnjko. + // 061014, by rcnjko. case OID_RT_OPERATIONAL_RATE_SET: case OID_DOT11_OPERATIONAL_RATE_SET: RT_TRACE( COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_OPERATIONAL_RATE_SET\n") ); - { + { return N6CSet_DOT11_OPERATIONAL_RATE_SET( - pAdapter, + pAdapter, InformationBuffer, InformationBufferLength, BytesRead, @@ -9831,13 +9831,13 @@ N6CSetInformation( *BytesRead = *BytesNeeded; } break; - + case OID_DOT11_CURRENT_CHANNEL: - case OID_DOT11_CURRENT_FREQUENCY: + case OID_DOT11_CURRENT_FREQUENCY: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_CURRENT_CHANNEL:\n")); { u1Byte btChannel; - + *BytesNeeded = sizeof(ULONG); if ( InformationBufferLength < *BytesNeeded ) { @@ -9851,7 +9851,7 @@ N6CSetInformation( } } break; - + case OID_DOT11_MULTICAST_LIST: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_DOT11_MULTICAST_LIST:\n")); { @@ -9897,7 +9897,7 @@ N6CSetInformation( RT_TRACE(COMP_OID_SET,DBG_LOUD,("set oid OID_RT_11N_IQK_TRIGGER\n")); PlatformScheduleWorkItem(&(pHalData->IQKTriggerWorkItem)); } - break; + break; case OID_RT_PRO_TRIGGER_LCK: { @@ -9906,7 +9906,7 @@ N6CSetInformation( RT_TRACE(COMP_OID_SET,DBG_LOUD,("set oid OID_RT_PRO_TRIGGER_LCK\n")); PlatformScheduleWorkItem(&(pHalData->LCKTriggerWorkItem)); } - break; + break; case OID_RT_PRO_TRIGGER_DPK: { @@ -9914,13 +9914,13 @@ N6CSetInformation( RT_TRACE(COMP_OID_SET,DBG_LOUD,("set oid OID_RT_PRO_TRIGGER_DPK\n")); PlatformScheduleWorkItem(&(pHalData->DPKTriggerWorkItem)); } - break; + break; // This is added for nested OID from CcxHandleNicSpecificExtension() case OID_DOT11_CURRENT_PHY_ID: { ULONG PhyId = *(PULONG)InformationBuffer; - + *BytesNeeded = sizeof(ULONG); if ( InformationBufferLength < *BytesNeeded ) { @@ -9968,7 +9968,7 @@ N6CSetInformation( tempAutoConfigEnable=ALLOWED_AUTO_CONFIG_FLAGS & *((PULONG)InformationBuffer); pAdapter->pNdisCommon->dot11AutoConfigEnabled = tempAutoConfigEnable; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<===Set OID_DOT11_AUTO_CONFIG_ENABLED:\n")); } break; @@ -10021,14 +10021,14 @@ N6CQuerySetInformation( if (ndisStatus != NDIS_STATUS_INVALID_OID) { // - // This Oid has been responded to by the MpEventQueryInformation function + // This Oid has been responded to by the MpEventQueryInformation function // We will not handle this Oid and return to the OS. // RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("==>Oid intercepted by WAPI_EventQuerySetInformation! Status 0x%08x\n", ndisStatus)); return ndisStatus; } - - //CCX Add for process IHV DLL Set OID down to Driver + + //CCX Add for process IHV DLL Set OID down to Driver ndisStatus = NDIS_STATUS_SUCCESS; if (ndisStatus != NDIS_STATUS_INVALID_OID) { @@ -10046,7 +10046,7 @@ N6CQuerySetInformation( RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("Query/Set OID_Unknown: %08X\n", Oid)); ndisStatus = NDIS_STATUS_INVALID_OID; break; - + case OID_RT_WFD_REQUEST: rtStatus = WFD_Reqeust( Adapter, @@ -10110,7 +10110,7 @@ N6CompletePendedOID( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<===N6CompletePendedOID \n" )); return FALSE; } - + //RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===>N6CompletePendedOID PendedRequest %08X \n",pNdisCommon->PendedRequest )); Oid = pNdisCommon->PendedRequest->DATA.METHOD_INFORMATION.Oid; @@ -10134,7 +10134,7 @@ N6CompletePendedOID( if(Oid == OID_PNP_SET_POWER) bComplete = TRUE; break; - + case RT_PENDED_OID_CREATE_DELETE_MAC: if(Oid == OID_DOT11_CREATE_MAC || Oid == OID_DOT11_DELETE_MAC) bComplete = TRUE; @@ -10149,20 +10149,20 @@ N6CompletePendedOID( tmpPendedRequest = pNdisCommon->PendedRequest; pNdisCommon->PendedRequest = NULL; } - + PlatformReleaseSpinLock(Adapter, RT_PENDED_OID_SPINLOCK); if(bComplete) { - RT_TRACE(COMP_OID_SET, DBG_LOUD, + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6CompletePendedOID(): Complete pended OID(0x%08X)\n", Oid)); N6C_DOT11_DUMP_OID(Oid); RT_CLEAR_DRV_STATE(Adapter, DrvStateNdisReqPended); - + NdisOIDHistoryUpdate(Adapter, tmpPendedRequest, RT_OID_HISTORY_COMPLETE); - + NdisMOidRequestComplete( pNdisCommon->hNdisAdapter, tmpPendedRequest, @@ -10172,7 +10172,7 @@ N6CompletePendedOID( } else { - RT_TRACE(COMP_OID_QUERY, DBG_LOUD, + RT_TRACE(COMP_OID_QUERY, DBG_LOUD, ("N6CompletePendedOID(): Pended OID(0x%08X) does not match input OID type(%d)\n", Oid, OidType)); return FALSE; @@ -10183,18 +10183,18 @@ NDIS_STATUS N6CProcessOidRequest( IN PADAPTER pAdapter, IN PNDIS_OID_REQUEST NdisRequest, - IN BOOLEAN bSelfMadeNdisRequest + IN BOOLEAN bSelfMadeNdisRequest ) { PADAPTER pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte)NdisRequest->PortNumber); NDIS_STATUS ndisStatus = NDIS_STATUS_NOT_RECOGNIZED; u2Byte i = 0; u4Byte portType = 0; - + // OID callback functions ------------------------------------------------------------ // Hope: Let all NDIS OIDs be handled here with one entry point portType = pTargetAdapter->pNdis62Common->PortType; - + for(i = 0 ; i < sizeof(RT_SUPPORT_OIDs)/sizeof(RT_OID_ENTRY); i++) { if(NdisRequest->DATA.QUERY_INFORMATION.Oid == RT_SUPPORT_OIDs[i].Oid) @@ -10210,9 +10210,9 @@ N6CProcessOidRequest( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("[OID], %s to Port(%d) PortType(%d)\n", RT_SUPPORT_OIDs[i].szID, NdisRequest->PortNumber, portType)); } - + ndisStatus = RT_SUPPORT_OIDs[i].Func(pAdapter, NdisRequest); - + return ndisStatus; } } @@ -10224,7 +10224,7 @@ N6CProcessOidRequest( // Hope: Let the following be only customized oids: However, it is not now: 2012.06.08 // =============================================================== - + switch (NdisRequest->RequestType) { case NdisRequestQueryInformation: @@ -10280,7 +10280,7 @@ N6C_OID_DOT11_FLUSH_BSS_LIST( PADAPTER pAdapter, PNDIS_OID_REQUEST NdisRequest ) -{ +{ PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pDefaultMgntInfo = &pDefaultAdapter->MgntInfo; PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; @@ -10291,7 +10291,7 @@ N6C_OID_DOT11_FLUSH_BSS_LIST( return NDIS_STATUS_NOT_SUPPORTED; RT_TRACE(COMP_MLME,DBG_LOUD, ("====>N6C_OID_DOT11_FLUSH_BSS_LIST\n")); - + // when flush, should set this variable. pMgntInfo->bFlushScanList = TRUE; @@ -10305,7 +10305,7 @@ N6C_OID_DOT11_FLUSH_BSS_LIST( // PlatformZeroMemory( pDefaultMgntInfo->bssDesc4Query, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC); pDefaultMgntInfo->NumBssDesc4Query = 0; - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: N6C_OID_DOT11_FLUSH_BSS_LIST(), clear NumBssDesc4Query\n")); MgntClearRejectedAsocAP(pDefaultAdapter); @@ -10313,7 +10313,7 @@ N6C_OID_DOT11_FLUSH_BSS_LIST( { PlatformZeroMemory( pMgntInfo->bssDesc4Query, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC); pMgntInfo->NumBssDesc4Query = 0; - RT_TRACE(COMP_SCAN, DBG_LOUD, + RT_TRACE(COMP_SCAN, DBG_LOUD, ("[REDX]: N6C_OID_DOT11_FLUSH_BSS_LIST(), clear NumBssDesc4Query Non def adapter\n")); PlatformZeroMemory( pMgntInfo->bssDesc, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC ); pMgntInfo->NumBssDesc = 0; @@ -10335,12 +10335,12 @@ N6C_OID_DOT11_SCAN_REQUEST( PADAPTER pClientPort = NULL; PADAPTER pTargetAdapter = NULL; PP2P_INFO pP2PInfo = NULL; - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6C_OID_DOT11_SCAN_REQUEST(): Oid(%#x)--->\n", NdisRequest->DATA.METHOD_INFORMATION.Oid)); N6C_DOT11_DUMP_OID(NdisRequest->DATA.METHOD_INFORMATION.Oid); - + // - // 2013/02/05 MH Add for NEC special request in Vista. When stram mode is + // 2013/02/05 MH Add for NEC special request in Vista. When stram mode is // enabled do not scan. // @@ -10357,7 +10357,7 @@ N6C_OID_DOT11_SCAN_REQUEST( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6C_OID_DOT11_SCAN_REQUEST(): return by NDIS_STATUS_NOT_SUPPORTED\n")); return NDIS_STATUS_NOT_SUPPORTED; } - + { // Reject the scan request to the Wi-Fi direct port ----------------------------- pTargetAdapter = GetAdapterByPortNum(pAdapter, (u1Byte) NdisRequest->PortNumber); @@ -10376,7 +10376,7 @@ N6C_OID_DOT11_SCAN_REQUEST( RT_TRACE(COMP_OID_SET , DBG_LOUD, ("%s: NDIS_STATUS_INVALID_OID because of not port 0.\n", __FUNCTION__)); return NDIS_STATUS_INVALID_OID; } - + // Block scan for a while if P2P handshake is going now. if(GetFirstClientPort(pAdapter) || GetFirstGOPort(pAdapter)) { @@ -10387,19 +10387,19 @@ N6C_OID_DOT11_SCAN_REQUEST( } else if(0 != pTargetAdapter->LastScanCompleteTime && PlatformGetCurrentTime() < pTargetAdapter->LastScanCompleteTime + P2P_BLOCK_NORMAL_SCAN_PERIOD) { - RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("[WARNING] Last scan complete time less than %d us, return NDIS_STATUS_DOT11_MEDIA_IN_USE!\n", P2P_BLOCK_NORMAL_SCAN_PERIOD)); - + RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("[WARNING] Last scan complete time less than %d us, return NDIS_STATUS_DOT11_MEDIA_IN_USE!\n", P2P_BLOCK_NORMAL_SCAN_PERIOD)); + return NDIS_STATUS_DOT11_MEDIA_IN_USE; } } - + // Only scan in the idle device port ---------------------------- pDevicePort = GetFirstDevicePort(pAdapter); - + if(pDevicePort != NULL) { pP2PInfo = GET_P2P_INFO(pDevicePort); - + if(pP2PInfo->State != P2P_STATE_INITIALIZED /*&& pP2PInfo->State != P2P_STATE_DISABLED*/) { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("%s: NDIS_STATUS_DOT11_MEDIA_IN_USE\n", __FUNCTION__)); @@ -10412,8 +10412,8 @@ N6C_OID_DOT11_SCAN_REQUEST( { // Postpone the extended listening for a while P2PExtendedListenResetCounter(pP2PInfo); - - // Stop potential device port extended listening + + // Stop potential device port extended listening P2PScanListCeaseScan(pP2PInfo); // Delay for a while for running ScanTimer callback by context switch @@ -10427,7 +10427,7 @@ N6C_OID_DOT11_SCAN_REQUEST( if(pClientPort != NULL) { pP2PInfo = GET_P2P_INFO(pClientPort); - + if(P2P_CLIETN_JOIN_GROUP_WPS_STATE_NONE != pP2PInfo->ClientJoinGroupContext.WpsState) { RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("NDIS_STATUS_DOT11_MEDIA_IN_USE\n")); @@ -10443,14 +10443,14 @@ N6C_OID_DOT11_SCAN_REQUEST( N6WriteEventLog(pAdapter, RT_SCAN_START, 0); - ndisStatus = N6CSet_DOT11_SCAN_REQUEST(pDefaultAdapter, + ndisStatus = N6CSet_DOT11_SCAN_REQUEST(pDefaultAdapter, NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesWritten, (PULONG)&NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded); //DbgPrint("<===N6C_OID_DOT11_SCAN_REQUEST(), !ndisStatus %x\n",ndisStatus); - + return ndisStatus; } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.h b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.h index 183c010dd..c3579f875 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/N6C_Req.h @@ -31,16 +31,16 @@ // -// (Ported from MS's code, Annie, 2006-10-11.) +// (Ported from MS's code, Annie, 2006-10-11.) // Macros for assigning and verifying NDIS_OBJECT_HEADER // #define N6_ASSIGN_OBJECT_HEADER(_header, _type, _revision, _size) \ (_header).Type = _type; \ (_header).Revision = _revision; \ - (_header).Size = _size; + (_header).Size = _size; // -// (Ported from MS's code, Annie, 2006-10-11.) +// (Ported from MS's code, Annie, 2006-10-11.) // With NDIS 6.0 header versioning, the driver should allow higher versions // of structures to be set. This macro verifies that for sets the version is atleast // the expected one and size is greater or equal to required @@ -123,7 +123,7 @@ N6CProcessOidRequest( IN BOOLEAN bSelfMadeNdisRequest ); - + BOOLEAN N6CompletePendedOID( IN PADAPTER Adapter, diff --git a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c index a8eb835d3..64de2585d 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c @@ -20,7 +20,7 @@ u4Byte GLWdiTestType=0; WDI_CMD_STATISTICS GLWdiCmdStatistics; typedef struct _OID -{ +{ NDIS_OID Oid; NDIS_REQUEST_TYPE Type; } OID; @@ -48,8 +48,8 @@ N6CopyPacket( OUT PRT_TX_LOCAL_BUFFER pLocalBuffer, OUT pu2Byte pPktLength ) -{ - PMDL pCurrMdl, pNextMdl; +{ + PMDL pCurrMdl, pNextMdl; PUCHAR ptr; UINT BufLen; UINT RemainMdlLength; @@ -65,10 +65,10 @@ N6CopyPacket( pCurrMdl = pNextMdl) { pNextMdl = NDIS_MDL_LINKAGE(pCurrMdl); - + // Prefast warning C30030: Warning: Allocating executable memory via specifying a MM_PAGE_PRIORITY type without a bitwise OR with MdlMappingNoExecute // false positive and currently it is safe here, so disable the warning -#pragma warning ( disable:30030 ) +#pragma warning ( disable:30030 ) ptr = (pCurrMdl == NET_BUFFER_CURRENT_MDL(pNetBuffer)) ? ((PUCHAR)MmGetSystemAddressForMdlSafe(pCurrMdl, NormalPagePriority))+NET_BUFFER_CURRENT_MDL_OFFSET(pNetBuffer) : MmGetSystemAddressForMdlSafe(pCurrMdl, NormalPagePriority); @@ -89,9 +89,9 @@ N6CopyPacket( // Copy the data. if(BufLen > 0) { - PlatformMoveMemory( - (PVOID)( pLocalBuffer->Buffer.VirtualAddress + *pPktLength ), - ptr, + PlatformMoveMemory( + (PVOID)( pLocalBuffer->Buffer.VirtualAddress + *pPktLength ), + ptr, BufLen); *pPktLength += (u2Byte)BufLen; } @@ -138,7 +138,7 @@ ParseFileBufToLines( pucBuffer = (pBufOfLines + (nMaxByteCntLine * nNumLinesRead)); nIndex = 0; bExceedBytesOfLine = FALSE; - while((*pucFilePtr != '\0') && (*pucFilePtr != '\r') && (*pucFilePtr != '\n')) + while((*pucFilePtr != '\0') && (*pucFilePtr != '\r') && (*pucFilePtr != '\n')) { if(nIndex < (nMaxByteCntLine-1)) // 1 is reserved for EOS. { @@ -166,7 +166,7 @@ ParseFileBufToLines( pucBuffer[nIndex] = '\0'; nNumLinesRead++; RT_TRACE(COMP_INIT, DBG_TRACE, ("%04d: \"%s\"\n", nNumLinesRead, pucBuffer)); - + // Message indication: Exceed Max Byte count of line. if(bExceedBytesOfLine) { @@ -186,10 +186,10 @@ ParseFileBufToLines( { RT_TRACE(COMP_INIT, DBG_TRACE, ("ParseFileBufToLines():End Of configuration file, break\n")); break; - } + } } } - + // Goto next line. pucFilePtr++; } @@ -203,7 +203,7 @@ ParseFileBufToLines( // // Description: -// Open the file specifed and read it into pBufOfLines, +// Open the file specifed and read it into pBufOfLines, // which is a 2-dimention array, for example, // u1Byte pBufOfLines[nMaxNumLine][nMaxByteCntLine]. // @@ -235,14 +235,14 @@ PlatformReadFile( &objectAttributes, fileName, OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, - NULL, // RootDirectory + NULL, // RootDirectory NULL // Default Security - ); + ); // Open the file using the object attributes to get a Handle ntStatus = ZwOpenFile( &fileHandle, - GENERIC_READ, + GENERIC_READ, &objectAttributes, &iostatBlock, 0, // Do not share the file @@ -273,7 +273,7 @@ PlatformReadFile( ntStatus = ZwReadFile( fileHandle, NULL, - NULL, + NULL, NULL, &iostatBlock, buffer, @@ -327,7 +327,7 @@ PlatformOpenFile( &objectAttributes, fileName, OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, - NULL, // RootDirectory + NULL, // RootDirectory NULL // Default Security ); @@ -439,7 +439,7 @@ PlatformCloseFile( // // Description: -// Open the file specifed and copy the file into an byte buffer, +// Open the file specifed and copy the file into an byte buffer, // RT_STATUS PlatformReadAndMapFile( @@ -492,11 +492,11 @@ N6IndicateCurrentPhyPowerState( { RT_RF_POWER_STATE rfState; DOT11_PHY_STATE_PARAMETERS phyStateParams; - + PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); PMGNT_INFO pDefaultMgnt = &pDefaultAdapter->MgntInfo; - RT_TRACE(COMP_MLME, DBG_LOUD, ("==> N6IndicateCurrentPhyPowerState()\n")); + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> N6IndicateCurrentPhyPowerState()\n")); //Add for win 7, to avoid get the wrong Hw reg. By Maddest, 05112009 pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); @@ -507,7 +507,7 @@ N6IndicateCurrentPhyPowerState( rfState = eRfOff; pAdapter->MgntInfo.RfOffReason |= RF_CHANGE_BY_SW; } - + if(rfState == eRfOff) { if (pAdapter->MgntInfo.RfOffReason >= RF_CHANGE_BY_HW) @@ -526,18 +526,18 @@ N6IndicateCurrentPhyPowerState( NDIS_OBJECT_TYPE_DEFAULT, DOT11_PHY_STATE_PARAMETERS_REVISION_1, sizeof(DOT11_PHY_STATE_PARAMETERS)); - + phyStateParams.uPhyId = DOT11_PHY_ID_ANY; // - // We set following parameters to deal with mobility center + // We set following parameters to deal with mobility center // which RF on/off option NEVER disabled issue. // 2008.03.06. // if( rfState == eRfOff ) - { - phyStateParams.bHardwarePhyState =(pAdapter->MgntInfo.RfOffReason & RF_CHANGE_BY_HW) ? FALSE: TRUE; + { + phyStateParams.bHardwarePhyState =(pAdapter->MgntInfo.RfOffReason & RF_CHANGE_BY_HW) ? FALSE: TRUE; phyStateParams.bSoftwarePhyState = (pAdapter->MgntInfo.RfOffReason & RF_CHANGE_BY_SW) ? FALSE: TRUE; - } + } else {// We set HW/SW options all available. phyStateParams.bHardwarePhyState = TRUE; @@ -549,7 +549,7 @@ N6IndicateCurrentPhyPowerState( if( !OS_SUPPORT_WDI(pAdapter) ) { N6IndicateStatus( - pAdapter, + pAdapter, NDIS_STATUS_DOT11_PHY_STATE_CHANGED, &phyStateParams, sizeof(phyStateParams)); @@ -570,7 +570,7 @@ N6WriteRegRfPowerState( NDIS_STATUS Status; NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("RFOff"); - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -578,10 +578,10 @@ N6WriteRegRfPowerState( RT_TRACE(COMP_INIT,DBG_TRACE, ("N6WriteRegRfPowerState(): Status=%x\n", Status)); return Status; } - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = (bRfOn ? 0 : 1); - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -608,7 +608,7 @@ N6WriteAdhocLinkState( NDIS_STATUS Status; NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("AdhocLinkState"); - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -616,10 +616,10 @@ N6WriteAdhocLinkState( RT_TRACE(COMP_INIT,DBG_LOUD, ("N6WriteAdhocLinkState(): Status=%x\n", Status)); return Status; } - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = ((AdhocLinkState==TRUE) ? TRUE : FALSE); - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -646,7 +646,7 @@ N6WriteUsbCurrentMode( NDIS_STATUS Status; NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbCurMode"); - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -654,10 +654,10 @@ N6WriteUsbCurrentMode( RT_DISP(FUSWITCH, FUSWITCH_ERROR, ("%s: UsbMode=%x\n", __FUNCTION__, UsbMode)); return Status; } - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = UsbMode; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -684,7 +684,7 @@ N6WriteUsbMode3To2Counter( NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbMode3To2Cnt"); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -694,10 +694,10 @@ N6WriteUsbMode3To2Counter( } pNdisCommon->RegUsbMode3To2Cnt++; - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = pNdisCommon->RegUsbMode3To2Cnt; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -724,7 +724,7 @@ N6WriteUsbMode2To3Counter( NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbMode2To3Cnt"); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -734,11 +734,11 @@ N6WriteUsbMode2To3Counter( } pNdisCommon->RegUsbMode2To3Cnt++; - pNdisCommon->RegUsbMode2To3CntPrev = pNdisCommon->RegUsbMode2To3Cnt; + pNdisCommon->RegUsbMode2To3CntPrev = pNdisCommon->RegUsbMode2To3Cnt; ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = pNdisCommon->RegUsbMode2To3Cnt; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -766,7 +766,7 @@ N6WriteUsbModeSwitchFlag( NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbSp"); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -777,7 +777,7 @@ N6WriteUsbModeSwitchFlag( ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = UsbSwitch; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -805,7 +805,7 @@ N6WriteUsbModeSwitchChnl( NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbChnl"); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -816,7 +816,7 @@ N6WriteUsbModeSwitchChnl( ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = Channel; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -845,7 +845,7 @@ N6WriteUsbModeSwitchBy( NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbSwBy"); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -856,7 +856,7 @@ N6WriteUsbModeSwitchBy( ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = SwitchBy; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -885,7 +885,7 @@ N6WriteUsbMode2To3CounterFail( NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("UsbMode2To3CntFail"); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -895,10 +895,10 @@ N6WriteUsbMode2To3CounterFail( } pNdisCommon->RegUsbMode2To3CntFail++; - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = pNdisCommon->RegUsbMode2To3CntFail; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -924,7 +924,7 @@ N6IndicateScanComplete( { NDIS_STATUS ndisStatus; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + if (status == RT_STATUS_SUCCESS) { ndisStatus = NDIS_STATUS_SUCCESS; @@ -933,12 +933,12 @@ N6IndicateScanComplete( { ndisStatus = NDIS_STATUS_FAILURE; } - + N6IndicateStatus( Adapter, NDIS_STATUS_DOT11_SCAN_CONFIRM, &ndisStatus, - sizeof(NDIS_STATUS)); + sizeof(NDIS_STATUS)); } @@ -954,9 +954,9 @@ N6IndicateConnectionStart( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); DOT11_CONNECTION_START_PARAMETERS ConnectStartParam; - + Adapter->LastConnectStartIndicationTime = PlatformGetCurrentTime(); - + PlatformZeroMemory(&ConnectStartParam, sizeof(DOT11_CONNECTION_START_PARAMETERS)); N6_ASSIGN_OBJECT_HEADER( @@ -974,23 +974,23 @@ N6IndicateConnectionStart( ConnectStartParam.BSSType = dot11_BSS_type_independent ; // - // 061227, rcnjko: - // For fake AP mode, we tell upper layer take our MAC address as the BSSID - // to make the frames sent from and indicate to upper layer having correct + // 061227, rcnjko: + // For fake AP mode, we tell upper layer take our MAC address as the BSSID + // to make the frames sent from and indicate to upper layer having correct // BSSID when we are configured to be AP mode later. // if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_IBSS_EMULATED) { PlatformMoveMemory( ConnectStartParam.AdhocBSSID, - Adapter->CurrentAddress, + Adapter->CurrentAddress, sizeof(DOT11_MAC_ADDRESS)); } else { PlatformMoveMemory( ConnectStartParam.AdhocBSSID, - pMgntInfo->Bssid, + pMgntInfo->Bssid, sizeof(DOT11_MAC_ADDRESS)); } @@ -1017,7 +1017,7 @@ N6IndicateConnectionComplete( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); DOT11_CONNECTION_COMPLETION_PARAMETERS ConnectCompleteParam; - + N6_ASSIGN_OBJECT_HEADER( ConnectCompleteParam.Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1028,7 +1028,7 @@ N6IndicateConnectionComplete( { ConnectCompleteParam.uStatus = DOT11_ASSOC_STATUS_SUCCESS; } - else + else { ConnectCompleteParam.uStatus = DOT11_ASSOC_STATUS_FAILURE; } @@ -1051,13 +1051,13 @@ N6IndicateAssociationStart( DOT11_ASSOCIATION_START_PARAMETERS AssoStartParam; PlatformZeroMemory(&AssoStartParam, sizeof(DOT11_ASSOCIATION_START_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( AssoStartParam.Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_ASSOCIATION_START_PARAMETERS_REVISION_1, sizeof(DOT11_ASSOCIATION_START_PARAMETERS)); - + PlatformMoveMemory( AssoStartParam.MacAddr, pAsocInfo->PeerAddr, @@ -1132,12 +1132,12 @@ N6IndicateAssociationComplete( AllocSize); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("DrvIFIndicateAssociationComplete(): failed to allocate memory for indication.\n")); return; } PlatformZeroMemory(pAssoCompleteParam, AllocSize); - + N6_ASSIGN_OBJECT_HEADER( pAssoCompleteParam->Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1150,7 +1150,7 @@ N6IndicateAssociationComplete( sizeof(DOT11_MAC_ADDRESS)); RT_PRINT_ADDR(COMP_MLME, DBG_LOUD, "Peer:", pAssoCompleteParam->MacAddr); - + if (status == RT_STATUS_SUCCESS) { pAssoCompleteParam->uStatus = DOT11_ASSOC_STATUS_SUCCESS; @@ -1214,22 +1214,22 @@ N6IndicateAssociationComplete( if (status == RT_STATUS_SUCCESS) { pNdisCommon->ActivePhyId = N6CQuery_DOT11_OPERATING_PHYID(Adapter); - + pAssoCompleteParam->uActivePhyListSize = sizeof(u4Byte); pAssoCompleteParam->uActivePhyListOffset = nInfoOffset; { PULONG pLong = (PULONG)((PUCHAR)pAssoCompleteParam + sizeof(DOT11_ASSOCIATION_COMPLETION_PARAMETERS)); *((ULONG UNALIGNED *)pLong) = pNdisCommon->ActivePhyId; - } + } } else { - //set the uActivePhyListOffset and uActivePhyListSize members to zero + //set the uActivePhyListOffset and uActivePhyListSize members to zero //if uStatus is not set to NDIS_STATUS_DOT11_ASSOCIATION_COMPLETION. pAssoCompleteParam->uActivePhyListSize = 0; pAssoCompleteParam->uActivePhyListOffset = 0; - } - + } + nInfoOffset += pAssoCompleteParam->uActivePhyListSize; if(status == RT_STATUS_SUCCESS) @@ -1239,35 +1239,35 @@ N6IndicateAssociationComplete( // Beacon pAssoCompleteParam->uBeaconOffset = nInfoOffset; pAssoCompleteParam->uBeaconSize = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.BeaconLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->AsocInfo.Beacon), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->AsocInfo.Beacon), pAssoCompleteParam->uBeaconSize); nInfoOffset += pAssoCompleteParam->uBeaconSize; - + // Association Request. pAssoCompleteParam->uAssocReqOffset = nInfoOffset; - pAssoCompleteParam->uAssocReqSize = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.AsocReqLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->AsocInfo.AsocReq), + pAssoCompleteParam->uAssocReqSize = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.AsocReqLength); + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->AsocInfo.AsocReq), pAssoCompleteParam->uAssocReqSize); nInfoOffset += pAssoCompleteParam->uAssocReqSize; // Association Response. pAssoCompleteParam->uAssocRespOffset = nInfoOffset; pAssoCompleteParam->uAssocRespSize = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.AsocRespLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->AsocInfo.AsocResp), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->AsocInfo.AsocResp), pAssoCompleteParam->uAssocRespSize); nInfoOffset += pAssoCompleteParam->uAssocRespSize; - + } else if(pMgntInfo->OpMode == RT_OP_MODE_IBSS) { // Beacon pAssoCompleteParam->uBeaconOffset = nInfoOffset; pAssoCompleteParam->uBeaconSize = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.BeaconLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->AsocInfo.Beacon), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->AsocInfo.Beacon), pAssoCompleteParam->uBeaconSize); nInfoOffset += pAssoCompleteParam->uBeaconSize; } @@ -1278,8 +1278,8 @@ N6IndicateAssociationComplete( // Beacon pAssoCompleteParam->uBeaconOffset = nInfoOffset; pAssoCompleteParam->uBeaconSize = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.BeaconLength); - PlatformMoveMemory((pInfoStart+nInfoOffset), - MMPDU_BODY(pMgntInfo->AsocInfo.Beacon), + PlatformMoveMemory((pInfoStart+nInfoOffset), + MMPDU_BODY(pMgntInfo->AsocInfo.Beacon), pAssoCompleteParam->uBeaconSize); nInfoOffset += pAssoCompleteParam->uBeaconSize; } @@ -1287,14 +1287,14 @@ N6IndicateAssociationComplete( RT_TRACE(COMP_SEC, DBG_LOUD, ("===> pMgntInfo->bInBIPMFPMode = %d\n", pMgntInfo->bInBIPMFPMode)); - + if( pMgntInfo->bInBIPMFPMode && TEST_FLAG(pMgntInfo->targetAKMSuite, AKM_RSNA_1X_SHA256 | AKM_RSNA_PSK_SHA256)) pAssoCompleteParam->MulticastMgmtCipher = DOT11_CIPHER_ALGO_BIP; else pAssoCompleteParam->MulticastMgmtCipher = DOT11_CIPHER_ALGO_NONE; // If reasoncode == 30 - // TIE + // TIE // ID | LEN | Timeout Interval Type | Timeout Interval Value // 56 | 5 | 3 = Association ComeBack time // Set up uAssocComebackTime @@ -1310,7 +1310,7 @@ N6IndicateAssociationComplete( else pAssoCompleteParam->uAssocComebackTime = 0; } - else + else pAssoCompleteParam->uAssocComebackTime = 0; N6IndicateStatus( @@ -1319,7 +1319,7 @@ N6IndicateAssociationComplete( pAssoCompleteParam, AllocSize); - + PlatformFreeMemory(pAssoCompleteParam, AllocSize); } @@ -1340,7 +1340,7 @@ N6IndicateDisassociation( PASOC_INFO pAsocInfo = &(pMgntInfo->AsocInfo); PlatformZeroMemory(&DisAssoParam, sizeof(DOT11_DISASSOCIATION_PARAMETERS)); - + N6_ASSIGN_OBJECT_HEADER( DisAssoParam.Header, NDIS_OBJECT_TYPE_DEFAULT, @@ -1352,8 +1352,8 @@ N6IndicateDisassociation( pu1Byte pBSSID; // - // If roaming is failed and disassociation event should be indicated, - // we should indicate the previous BSSID before roaming. + // If roaming is failed and disassociation event should be indicated, + // we should indicate the previous BSSID before roaming. // By Bruce, 2008-05-08. // if(pMgntInfo->RoamingType == RT_ROAMING_NORMAL) @@ -1445,7 +1445,7 @@ N6IndicateRoamingStart( { RoamingStartParam.uRoamingReason = DOT11_ASSOC_STATUS_ROAMING_ASSOCIATION_LOST; } - + N6IndicateStatus( Adapter, NDIS_STATUS_DOT11_ROAMING_START, @@ -1516,7 +1516,7 @@ LinkQualityReportCallback( (pMgntInfo->bMediaConnect == FALSE) || MgntScanInProgress(pMgntInfo)) { - RT_TRACE_F(COMP_INDIC, DBG_TRACE, + RT_TRACE_F(COMP_INDIC, DBG_TRACE, ("LinkQualityReportCallback(): Do not indicate because pMgntInfo->mAssoc(%d), pMgntInfo->mIbss (%d), pMgntInfo->bMediaConnect (%d), MgntScanInProgress(pMgntInfo) = %d\n", pMgntInfo->mAssoc, pMgntInfo->mIbss, pMgntInfo->bMediaConnect, MgntScanInProgress(pMgntInfo))); LastLinkQuality = 0xFF; // reset the value to an impossible value. @@ -1524,14 +1524,14 @@ LinkQualityReportCallback( } N6IndicateLinkSpeed(Adapter); - - AllocSize = sizeof(DOT11_LINK_QUALITY_PARAMETERS) + + + AllocSize = sizeof(DOT11_LINK_QUALITY_PARAMETERS) + sizeof(DOT11_LINK_QUALITY_ENTRY); rtStatus = PlatformAllocateMemory(Adapter, &pLinkQualityParam, AllocSize); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_MLME, DBG_LOUD, + RT_TRACE(COMP_MLME, DBG_LOUD, ("LinkQualityReportCallback(): failed to allocate resources for link quality reporting.\n")); return; } @@ -1545,11 +1545,11 @@ LinkQualityReportCallback( LastLinkQuality = Adapter->RxStats.LastLinkQuality; LinkQualityDiff = (CurLinkQuality > LastLinkQuality) ? (CurLinkQuality - LastLinkQuality) : (LastLinkQuality - CurLinkQuality); - // + // // Note that we have to indicate the first notification after associated. // - RT_TRACE(COMP_INDIC, DBG_LOUD, + RT_TRACE(COMP_INDIC, DBG_LOUD, ("LinkQualityReportCallback(): CurLinkQuality (%u), LastLinkQuality (%u)\n", CurLinkQuality, LastLinkQuality)); @@ -1568,7 +1568,7 @@ LinkQualityReportCallback( if(pMgntInfo->RegFakeRoamSignal[0]) bProceed = TRUE; - + if(!bProceed) { RT_TRACE(COMP_INDIC, DBG_LOUD, ("LinkQualityReportCallback(): not to indicate\n")); @@ -1584,15 +1584,15 @@ LinkQualityReportCallback( PlatformZeroMemory(pLinkQualityParam, AllocSize); N6_ASSIGN_OBJECT_HEADER( - pLinkQualityParam->Header, - NDIS_OBJECT_TYPE_DEFAULT, - DOT11_LINK_QUALITY_PARAMETERS_REVISION_1, + pLinkQualityParam->Header, + NDIS_OBJECT_TYPE_DEFAULT, + DOT11_LINK_QUALITY_PARAMETERS_REVISION_1, sizeof(DOT11_LINK_QUALITY_PARAMETERS)); pLinkQualityParam->uLinkQualityListSize = 1; pLinkQualityParam->uLinkQualityListOffset = sizeof(DOT11_LINK_QUALITY_PARAMETERS); - pLinkQuality = (PDOT11_LINK_QUALITY_ENTRY)( + pLinkQuality = (PDOT11_LINK_QUALITY_ENTRY)( ((pu1Byte)pLinkQualityParam) + sizeof(DOT11_LINK_QUALITY_PARAMETERS) ); PlatformMoveMemory( pLinkQuality->PeerMacAddr, @@ -1624,8 +1624,8 @@ LinkQualityReportCallback( else { N6IndicateStatus( - Adapter, - NDIS_STATUS_DOT11_LINK_QUALITY, + Adapter, + NDIS_STATUS_DOT11_LINK_QUALITY, pLinkQualityParam, AllocSize); } @@ -1646,7 +1646,7 @@ N6InitializeIndicateStateMachine( { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PN6_INDICATE_STATE_MACHINE pEngine = &(pNdisCommon->IndicationEngine); - + pEngine->CurrOpMode = SM_mNone; pEngine->Flag = SM_fNone; pEngine->CurrentState = N6_STATE_INITIAL; @@ -1664,7 +1664,7 @@ N6PushIndicateStateMachineAp( PRT_STA_INDICATE_STATE_MACHINE pIndicateEngine; - //RT_ASSERT((Adapter->MgntInfo.pCurrentSta && (StateToEnter != N6_STATE_DISASOC)), + //RT_ASSERT((Adapter->MgntInfo.pCurrentSta && (StateToEnter != N6_STATE_DISASOC)), // ("N6PushIndicateStateMachineAp(): pCurrentSta == NULL and StateToEnter != N6_STATE_DISASOC.\n")); if(MgntActQuery_ApType(Adapter) != RT_AP_TYPE_VWIFI_AP) @@ -1681,7 +1681,7 @@ N6PushIndicateStateMachineAp( RT_TRACE(COMP_INDIC, DBG_LOUD, ("N6PushIndicateStateMachineAp(): pCurrentSta is NULL.\n")); return; } - + if (pIndicateEngine->NextState & StateToEnter) { RT_STA_INDICATE_STATE OriginalState = pIndicateEngine->CurrentState; @@ -1696,10 +1696,10 @@ N6PushIndicateStateMachineAp( //pIndicateEngine->Flag = SM_fNone; pIndicateEngine->NextState = RT_STA_STATE_AP_INCOMING_ASOC_STARTED; break; - + case RT_STA_STATE_AP_INCOMING_ASOC_STARTED: RT_TRACE(COMP_INDIC, DBG_LOUD,("N6_STATE_AP_INCOMING_ASOC_STARTED\n")); - + //pIndicateEngine->Flag = SM_fNone; pIndicateEngine->NextState = 0; @@ -1718,7 +1718,7 @@ N6PushIndicateStateMachineAp( case RT_STA_STATE_AP_INCOMING_ASOC_COMPLETE: RT_TRACE(COMP_INDIC, DBG_LOUD,("N6_STATE_AP_INCOMING_ASOC_COMPLETE\n")); pIndicateEngine->NextState = 0; - + //if(!IS_STATUS_CODE_SUCCESS(StatusOrReasonCode)) //{ // pIndicateEngine->Flag = SM_fConnected; @@ -1726,7 +1726,7 @@ N6PushIndicateStateMachineAp( pIndicateEngine->NextState |= N6_STATE_DISASOC; //pIndicateEngine->NextState |= N6_STATE_AP_INCOMING_ASOC_STARTED; - + N62CAPIndicateIncomAssocComplete(Adapter, StatusOrReasonCode); break; @@ -1751,12 +1751,12 @@ N6PushIndicateStateMachineInfra( IN u2Byte StatusOrReasonCode ) { - PN6_INDICATE_STATE_MACHINE pIndicateEngine = + PN6_INDICATE_STATE_MACHINE pIndicateEngine = &(Adapter->pNdisCommon->IndicationEngine); if (pIndicateEngine->NextState & StateToEnter) { - RT_TRACE(COMP_INDIC, DBG_LOUD, ("NextState 0x%x, StateToEnter 0x%x", pIndicateEngine->NextState, StateToEnter)); + RT_TRACE(COMP_INDIC, DBG_LOUD, ("NextState 0x%x, StateToEnter 0x%x", pIndicateEngine->NextState, StateToEnter)); pIndicateEngine->CurrentState = StateToEnter; switch (StateToEnter) { @@ -1777,7 +1777,7 @@ N6PushIndicateStateMachineInfra( case N6_STATE_ASOC_START: RT_TRACE(COMP_INDIC, DBG_LOUD,("N6_STATE_ASOC_START\n")); - + pIndicateEngine->NextState = N6_STATE_ASOC_COMPLETE; N6IndicateAssociationStart(Adapter); break; @@ -1790,7 +1790,7 @@ N6PushIndicateStateMachineInfra( { pIndicateEngine->NextState |= N6_STATE_ASOC_START; } - + if ( pIndicateEngine->Flag == SM_fRoaming ) { pIndicateEngine->NextState |= N6_STATE_ROAM_COMPLETE; @@ -1849,16 +1849,16 @@ N6PushIndicateStateMachineIBSS( IN u2Byte StatusOrReasonCode ) { - PN6_INDICATE_STATE_MACHINE pIndicateEngine = + PN6_INDICATE_STATE_MACHINE pIndicateEngine = &(Adapter->pNdisCommon->IndicationEngine); RT_TRACE(COMP_INDIC, DBG_LOUD,("==>N6PushIndicateStateMachineIBSS() pIndicateEngine->Flag %d\n",pIndicateEngine->Flag)); - RT_TRACE(COMP_INDIC, DBG_LOUD, ("NextState 0x%x, StateToEnter 0x%x", pIndicateEngine->NextState, StateToEnter)); - + RT_TRACE(COMP_INDIC, DBG_LOUD, ("NextState 0x%x, StateToEnter 0x%x", pIndicateEngine->NextState, StateToEnter)); + if (pIndicateEngine->NextState & StateToEnter) { - RT_TRACE(COMP_INDIC, DBG_TRACE, ("NextState 0x%x, StateToEnter 0x%x", pIndicateEngine->NextState, StateToEnter)); - + RT_TRACE(COMP_INDIC, DBG_TRACE, ("NextState 0x%x, StateToEnter 0x%x", pIndicateEngine->NextState, StateToEnter)); + pIndicateEngine->CurrentState = StateToEnter; switch (StateToEnter) { @@ -1891,8 +1891,8 @@ N6PushIndicateStateMachineIBSS( { RT_TRACE(COMP_INDIC, DBG_LOUD,("==>N6PushIndicateStateMachineIBSS() N6_STATE_ASOC_COMPLETE SM_fConnected\n")); pIndicateEngine->NextState = N6_STATE_ASOC_START | N6_STATE_DISASOC|N6_STATE_ROAM_COMPLETE; - if(pIndicateEngine->Flag == SM_fConnected) //Association Operation Guidelines for Independent BSS Networks diagram 1 - pIndicateEngine->NextState |= N6_STATE_ROAM_START; + if(pIndicateEngine->Flag == SM_fConnected) //Association Operation Guidelines for Independent BSS Networks diagram 1 + pIndicateEngine->NextState |= N6_STATE_ROAM_START; } else { @@ -1932,7 +1932,7 @@ N6PushIndicateStateMachineIBSS( break; // //Porting from 8xb to avoid IBSS can not relink after s3/s4 on Vista, by Maddest - // + // case N6_STATE_ROAM_COMPLETE: RT_TRACE(COMP_INDIC, DBG_LOUD,("N6_STATE_ROAM_COMPLETE\n")); @@ -1940,7 +1940,7 @@ N6PushIndicateStateMachineIBSS( pIndicateEngine->NextState = N6_STATE_DISASOC | N6_STATE_ROAM_START|N6_STATE_ASOC_START; N6IndicateRoamingComplete(Adapter, StatusOrReasonCode); break; - + default: break; } @@ -1962,11 +1962,11 @@ N6PushIndicateStateMachine( ) { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - PN6_INDICATE_STATE_MACHINE pIndicateEngine = + PN6_INDICATE_STATE_MACHINE pIndicateEngine = &(Adapter->pNdisCommon->IndicationEngine); - + PlatformAcquireSpinLock(Adapter, RT_INDIC_SPINLOCK); - + if(MgntActQuery_ApType(Adapter) == RT_AP_TYPE_VWIFI_AP) { N6PushIndicateStateMachineAp(Adapter, StateToEnter, StatusOrReasonCode); @@ -1991,15 +1991,15 @@ N6PushIndicateStateMachine( { // // 061227, rcnjko: - // Because our UI will set a fake IBSS profile before setting + // Because our UI will set a fake IBSS profile before setting // AP profile CurrOpMode will be set to SM_mAdhoc for AP mode case. // - RT_TRACE(COMP_MLME, DBG_WARNING, + RT_TRACE(COMP_MLME, DBG_WARNING, ("N6PushIndicateStateMachine(): N6_STATE_INITIAL with RT_OP_MODE_AP is unexpected!!!\n")); pIndicateEngine->CurrOpMode = SM_mAdhoc; } - RT_TRACE(COMP_MLME, DBG_WARNING, + RT_TRACE(COMP_MLME, DBG_WARNING, ("N6PushIndicateStateMachine(): TODO!\n")); PlatformReleaseSpinLock(Adapter, RT_INDIC_SPINLOCK); return; @@ -2012,7 +2012,7 @@ N6PushIndicateStateMachine( break; } } - + if (pIndicateEngine->CurrOpMode == SM_mInfra) { N6PushIndicateStateMachineInfra(Adapter, StateToEnter, StatusOrReasonCode); @@ -2021,7 +2021,7 @@ N6PushIndicateStateMachine( { N6PushIndicateStateMachineIBSS(Adapter, StateToEnter, StatusOrReasonCode); } - + PlatformReleaseSpinLock(Adapter, RT_INDIC_SPINLOCK); } @@ -2042,14 +2042,14 @@ N6TranslateToDot11AssocStatus( case N6_STATE_CONNECT_COMPLETE: case N6_STATE_ROAM_COMPLETE: // Status code. - + break; - + case N6_STATE_DISASOC: // Reason code. - + break; - + default: break; } @@ -2073,13 +2073,13 @@ GetSignedInteger( { return 0; } - + SignBit = 0x00000001 << (BitNumber-1); for( idx=1; idx<(BitNumber-1); idx++ ) { Mask |= ( u4bTmp << idx ); } - + u4bValue = (usDW & Mask); if( usDW & SignBit ) @@ -2104,7 +2104,7 @@ N6Dot11AddrIsBcast( return ( ( (pAddr[0] == 0xFF) && (pAddr[1] == 0xFF) && (pAddr[2] == 0xFF) && - (pAddr[3] == 0xFF) && (pAddr[4] == 0xFF) && (pAddr[5] == 0xFF) ) ? + (pAddr[3] == 0xFF) && (pAddr[4] == 0xFF) && (pAddr[5] == 0xFF) ) ? TRUE : FALSE); } @@ -2118,13 +2118,13 @@ N6Dot11AddrIsfe( return ( ( (pAddr[0] == 0xFe) && (pAddr[1] == 0xFF) && (pAddr[2] == 0xFF) && - (pAddr[3] == 0xFF) && (pAddr[4] == 0xFF) && (pAddr[5] == 0xFF) ) ? + (pAddr[3] == 0xFF) && (pAddr[4] == 0xFF) && (pAddr[5] == 0xFF) ) ? TRUE : FALSE); } // // Description: -// Callback function of SetRFPowerStateWorkItem, +// Callback function of SetRFPowerStateWorkItem, // which is used by OID to change RF power state. // VOID @@ -2133,7 +2133,7 @@ SetRFPowerStateWorkItemCallback( ) { PADAPTER Adapter = (PADAPTER)pContext; - PADAPTER pAdapter = GetDefaultAdapter(Adapter); + PADAPTER pAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; @@ -2194,7 +2194,7 @@ SetRFPowerStateWorkItemCallback( } // Turn off LED if RF is not ON. - pAdapter->HalFunc.LedControlHandler(pAdapter, LED_CTL_POWER_OFF); + pAdapter->HalFunc.LedControlHandler(pAdapter, LED_CTL_POWER_OFF); } // @@ -2215,7 +2215,7 @@ SetRFPowerStateWorkItemCallback( // // Description: -// Callback function of SetAdhocLinkStateWorkItem, +// Callback function of SetAdhocLinkStateWorkItem, // which is used by OID to change adhoc link state. // 2009/02/25 MH Write Adhoc Link State // @@ -2229,13 +2229,13 @@ SetAdhocLinkStateWorkItemCallback( PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; BOOLEAN bValue; NDIS_STATUS ndisStatus; - HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); // Write registry for persistent. - bValue = (pMgntInfo->eSwRfPowerState == eRfOn) ? TRUE : FALSE; + bValue = (pMgntInfo->eSwRfPowerState == eRfOn) ? TRUE : FALSE; ndisStatus = N6WriteAdhocLinkState(pAdapter, pHalData->AdhocLinkState); - + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_MLME, DBG_LOUD, ("SetAdhocLinkStateWorkItemCallback(): failed to write registry.\n")); @@ -2262,8 +2262,8 @@ N6CStartWaitReturnPacketMechanism( if( !OS_SUPPORT_WDI(Adapter) ) { PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); - RT_ASSERT((RT_GET_RCV_REF(Adapter) == 0), - ("N6CStartWaitReturnPacketMechanism(): RefCnt(%d) != 0 !!!\n", + RT_ASSERT((RT_GET_RCV_REF(Adapter) == 0), + ("N6CStartWaitReturnPacketMechanism(): RefCnt(%d) != 0 !!!\n", RT_GET_RCV_REF(Adapter))); PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); } @@ -2287,7 +2287,7 @@ N6CWaitForReturnPacket( ) { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); if (RT_GET_RCV_REF(Adapter) > 0) { @@ -2314,7 +2314,7 @@ N6CWaitForReturnPacket( RT_TRACE(COMP_INIT, DBG_LOUD, ("N6CWaitForReturnPacket(): end of waiting returned packet\n")); } else { - PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); } } @@ -2384,7 +2384,7 @@ N6AllocateNative80211MIBs( pNdisCommon->pDot11PhyMIBs = NULL; } } - + return ndisStatus; } @@ -2409,7 +2409,7 @@ N6InitializeNative80211MIBs( pNdisCommon->dot11CurrentOperationMode.uReserved = 0; // dot11OperationModeCapability. - pNdisCommon->dot11OperationModeCapability.uOpModeCapability = + pNdisCommon->dot11OperationModeCapability.uOpModeCapability = DOT11_OPERATION_MODE_EXTENSIBLE_STATION | DOT11_OPERATION_MODE_NETWORK_MONITOR; @@ -2422,17 +2422,17 @@ N6InitializeNative80211MIBs( { Adapter->bStartVwifi = FALSE; } - + if(Adapter->bStartVwifi == TRUE) { - pNdisCommon->dot11OperationModeCapability.uOpModeCapability |= + pNdisCommon->dot11OperationModeCapability.uOpModeCapability |= DOT11_OPERATION_MODE_EXTENSIBLE_AP; } } -#endif +#endif -#if (NDIS_SUPPORT_NDIS630) - pNdisCommon->dot11OperationModeCapability.uOpModeCapability |= +#if (NDIS_SUPPORT_NDIS630) + pNdisCommon->dot11OperationModeCapability.uOpModeCapability |= DOT11_OPERATION_MODE_WFD_DEVICE| DOT11_OPERATION_MODE_WFD_GROUP_OWNER|DOT11_OPERATION_MODE_WFD_CLIENT; #endif @@ -2451,15 +2451,15 @@ N6InitializeNative80211MIBs( // set support phy type pNdisCommon->pDot11SupportedPhyTypes->uTotalNumOfEntries = NATIVE_802_11_MAX_NUM_PHY_TYPES; - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries = 0; + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries = 0; WirelessModeCapa = HalGetSupportedWirelessMode(Adapter); - + if(WirelessModeCapa & WIRELESS_MODE_N_24G || (WirelessModeCapa & WIRELESS_MODE_AC_24G)) - { - //4 N mode - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; + { + //4 N mode + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; curPhyId = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries -1; pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = dot11_phy_type_ht; // pDot11PhyMIBs. @@ -2497,13 +2497,13 @@ N6InitializeNative80211MIBs( PlatformMoveMemory( pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue.ucSupportedRxDataRatesValue, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet, - pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); //4 + pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); //4 } if(WirelessModeCapa & WIRELESS_MODE_G) { - //G mode - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; + //G mode + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; curPhyId = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries -1; pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = dot11_phy_type_erp; // pDot11PhyMIBs. @@ -2525,7 +2525,7 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet[11] = 108; pNdisCommon->pDot11PhyMIBs[curPhyId].ActiveRateSet.uRateSetLength = 0; - pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = + pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = MgntActQuery_802_11_CHANNEL_NUMBER(Adapter); // @@ -2540,14 +2540,14 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue.ucSupportedRxDataRatesValue, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); - + } - - if(WirelessModeCapa & WIRELESS_MODE_B) + + if(WirelessModeCapa & WIRELESS_MODE_B) {//Bmode - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries++; + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries++; curPhyId = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries -1; - pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = + pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = dot11_phy_type_hrdsss; // pDot11PhyMIBs. pNdisCommon->pDot11PhyMIBs[curPhyId].PhyID = curPhyId; @@ -2564,11 +2564,11 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].BasicRateSet.ucRateSet[1] = 4; pNdisCommon->pDot11PhyMIBs[curPhyId].BasicRateSet.ucRateSet[2] = 11; pNdisCommon->pDot11PhyMIBs[curPhyId].BasicRateSet.ucRateSet[3] = 22; - + pNdisCommon->pDot11PhyMIBs[curPhyId].ActiveRateSet.uRateSetLength = 0; - pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = + pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = MgntActQuery_802_11_CHANNEL_NUMBER(Adapter); - + PlatformZeroMemory( &(pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue), sizeof(DOT11_SUPPORTED_DATA_RATES_VALUE_V2)); @@ -2580,22 +2580,22 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue.ucSupportedRxDataRatesValue, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); - + } - + RT_TRACE_F(COMP_INIT, DBG_LOUD, ("WirelessModeCapa 0x%x pNdisCommon->NdisVersion 0x%x\n", WirelessModeCapa, pNdisCommon->NdisVersion)); if((WirelessModeCapa & WIRELESS_MODE_AC_5G) && pNdisCommon->NdisVersion>=NDIS_VERSION_BASE_6_40) - { - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; + { + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; curPhyId = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries - 1; pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = dot11_phy_type_vht; - + pNdisCommon->pDot11PhyMIBs[curPhyId].PhyID = curPhyId; pNdisCommon->pDot11PhyMIBs[curPhyId].PhyType = dot11_phy_type_vht; - - + + pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength = 16; pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet[0] = 30; pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet[1] = 60; @@ -2616,7 +2616,7 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].ActiveRateSet.uRateSetLength = 0; pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = MgntActQuery_802_11_CHANNEL_NUMBER(Adapter); - + PlatformZeroMemory( &(pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue), sizeof(DOT11_SUPPORTED_DATA_RATES_VALUE_V2)); @@ -2627,13 +2627,13 @@ N6InitializeNative80211MIBs( PlatformMoveMemory( pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue.ucSupportedRxDataRatesValue, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet, - pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); //4 + pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); //4 } if((WirelessModeCapa & WIRELESS_MODE_N_5G) || (WirelessModeCapa & WIRELESS_MODE_AC_5G)) - { - //4 N 5g mode - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; + { + //4 N 5g mode + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; curPhyId = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries -1; pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = dot11_phy_type_ht; // pDot11PhyMIBs. @@ -2672,13 +2672,13 @@ N6InitializeNative80211MIBs( PlatformMoveMemory( pNdisCommon->pDot11PhyMIBs[curPhyId].SupportedDataRatesValue.ucSupportedRxDataRatesValue, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet, - pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); //4 + pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); //4 } if(WirelessModeCapa& WIRELESS_MODE_A) { - //A mode - pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; + //A mode + pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries ++; curPhyId = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries -1; pNdisCommon->pDot11SupportedPhyTypes->dot11PHYType[curPhyId] = dot11_phy_type_ofdm; // pDot11PhyMIBs. @@ -2697,7 +2697,7 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet[7] = 108; pNdisCommon->pDot11PhyMIBs[curPhyId].ActiveRateSet.uRateSetLength = 0; - pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = + pNdisCommon->pDot11PhyMIBs[curPhyId].Channel = MgntActQuery_802_11_CHANNEL_NUMBER(Adapter); PlatformZeroMemory( @@ -2712,8 +2712,8 @@ N6InitializeNative80211MIBs( pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.ucRateSet, pNdisCommon->pDot11PhyMIBs[curPhyId].OperationalRateSet.uRateSetLength); } - - + + pNdisCommon->dot11SelectedPhyId = 0; pNdisCommon->pDot11SelectedPhyMIB = pNdisCommon->pDot11PhyMIBs; @@ -2750,8 +2750,8 @@ N6InitializeNative80211MIBs( pNdisCommon->RegOptionalCapability.bStrictlyOrderedServiceClass = MgntActQuery_StrictlyOrderedImp(Adapter); PlatformMoveMemory( - &(pNdisCommon->dot11CurrOptionalCapability), - &(pNdisCommon->RegOptionalCapability), + &(pNdisCommon->dot11CurrOptionalCapability), + &(pNdisCommon->RegOptionalCapability), sizeof(DOT11_OPTIONAL_CAPABILITY)); // bDot11MediaStreamingEnabled. @@ -2774,7 +2774,7 @@ N6InitializeNative80211MIBs( DOT11_SSID_LIST_REVISION_1, sizeof(DOT11_SSID_LIST)); pNdisCommon->dot11DesiredSSIDListCopy.uNumOfEntries = 0; - pNdisCommon->dot11DesiredSSIDListCopy.uTotalNumOfEntries = 0; + pNdisCommon->dot11DesiredSSIDListCopy.uTotalNumOfEntries = 0; //Ndis6 IBSS Parameters. For DTM Vista 1.0c, by Bruce, 2007-08-13. pNdisCommon->dot11IbssParams.bDot11IbssJoinOnly = FALSE; @@ -2785,9 +2785,9 @@ N6InitializeNative80211MIBs( pNdisCommon->dot11IbssParams.AdditionalIEData = NULL; pNdisCommon->dot11IbssParams.AdditionalIESize = 0; - + // dot11AutoConfigEnabled. - pNdisCommon->dot11AutoConfigEnabled = + pNdisCommon->dot11AutoConfigEnabled = DOT11_PHY_AUTO_CONFIG_ENABLED_FLAG | DOT11_MAC_AUTO_CONFIG_ENABLED_FLAG; @@ -2816,14 +2816,14 @@ N6InitializeNative80211MIBs( pNdisCommon->bWakeupAutoLinkInProgressing = FALSE; // PrivacyExemptionList - Adapter->pNdisCommon->PrivacyExemptionEntrieNum = 0; + Adapter->pNdisCommon->PrivacyExemptionEntrieNum = 0; } // // Description: // Add NBL list into NBL wait queue. -// +// // Assumption: // RT_BUFFER_SPINLOCK is acquired. // @@ -2838,7 +2838,7 @@ N6CAddNblWaitQueue( PRT_SINGLE_LIST_ENTRY pFirstEntry = (PRT_SINGLE_LIST_ENTRY)RT_GET_NBL_LINK(pNetBufferLists); PRT_SINGLE_LIST_ENTRY pLastEntry; - RT_ASSERT(pFirstEntry != NULL, + RT_ASSERT(pFirstEntry != NULL, ("N6CAddNblWaitQueue(): pFirstEntry should not be NULL, pNetBufferLists(%p)\n !!!", pNetBufferLists)); for(pLastEntry = pFirstEntry; pLastEntry->Next != NULL; pLastEntry = pLastEntry->Next) @@ -2862,7 +2862,7 @@ N6CAddNblWaitQueue( { if(!RTIsSListEmpty(pList)) { - pList->Last->Next = pFirstEntry; + pList->Last->Next = pFirstEntry; pList->Last = pLastEntry; } else @@ -2887,24 +2887,24 @@ N6CConcatenateTwoList( if( pSource == NULL ) return; - + for(pDstLastEntry = pDest; pDstLastEntry->Next != NULL; pDstLastEntry = pDstLastEntry->Next) ; - - pDstLastEntry->Next = pSource; + + pDstLastEntry->Next = pSource; } // // Description: // Remove one NBL from head of list. -// +// // Assumption: // RT_BUFFER_SPINLOCK is acquired. // PNET_BUFFER_LIST N6CRemoveNblWaitQueue( IN PRT_SINGLE_LIST_HEAD pNBLWaitQueue, - IN BOOLEAN bFromHead + IN BOOLEAN bFromHead ) { PRT_SINGLE_LIST_HEAD pList = pNBLWaitQueue; @@ -2942,7 +2942,7 @@ N6CRemoveNblWaitQueue( } RTInitializeSListHead(pList); - + return RT_GET_NBL_FROM_QUEUE_LINK(pFirstEntry); } } @@ -2950,7 +2950,7 @@ N6CRemoveNblWaitQueue( // // Description: -// This routine is called if miniport need to complete the NetBufferLists +// This routine is called if miniport need to complete the NetBufferLists // before associated with a TCB. // // Assumption: @@ -2977,10 +2977,10 @@ N6CompleteNetBufferLists( NdisMSendNetBufferListsComplete( - pDevice->hNdisAdapter, - pNetBufferLists, + pDevice->hNdisAdapter, + pNetBufferLists, (bDispatchLevel ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0)); - + } @@ -3005,17 +3005,17 @@ N6IndicateLinkSpeed( NDIS_OBJECT_TYPE_DEFAULT, NDIS_LINK_STATE_REVISION_1, sizeof(NDIS_LINK_STATE)); - + LinkState.MediaConnectState = MediaConnectStateConnected; /* -MediaDuplexStateHalf - The miniport adapter can transmit or receive but not both simultaneously. -MediaDuplexStateFull - The miniport adapter can transmit and receive simultaneously. -MediaDuplexStateUnknown - The duplex state of the miniport adapter is unknown. -*/ +MediaDuplexStateHalf + The miniport adapter can transmit or receive but not both simultaneously. +MediaDuplexStateFull + The miniport adapter can transmit and receive simultaneously. +MediaDuplexStateUnknown + The duplex state of the miniport adapter is unknown. +*/ LinkState.MediaDuplexState = MediaDuplexStateHalf; LinkState.RcvLinkSpeed = 300000000; @@ -3033,13 +3033,13 @@ MediaDuplexStateUnknown RT_TRACE_F(COMP_INDIC, DBG_LOUD, ("XmitSpeed = %d RcvLinkSpeed = %d for adapter port = %d\n", (u4Byte)LinkState.XmitLinkSpeed, (u4Byte)LinkState.RcvLinkSpeed, GET_PORT_NUMBER(pAdapter))); LinkState.PauseFunctions = NdisPauseFunctionsUnsupported; LinkState.AutoNegotiationFlags = NDIS_LINK_STATE_DUPLEX_AUTO_NEGOTIATED; - + N6IndicateStatus( pAdapter, NDIS_STATUS_LINK_STATE, &LinkState, sizeof(NDIS_LINK_STATE)); - + } @@ -3114,9 +3114,9 @@ PlatformGetDesiredSSIDList( return FALSE; index = pNdisCommon->dot11DesiredSSIDListIndex; - + CopyMem(pMgntInfo->Ssid.Octet, pSsidList->SSIDs[index].ucSSID, pSsidList->SSIDs[index].uSSIDLength); - pMgntInfo->Ssid.Length =(u2Byte) pSsidList->SSIDs[index].uSSIDLength; + pMgntInfo->Ssid.Length =(u2Byte) pSsidList->SSIDs[index].uSSIDLength; RT_PRINT_STR(COMP_MLME, DBG_LOUD, "===> PlatformGetDesiredSSIDList(): ", pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length); @@ -3153,7 +3153,7 @@ N6ReceiveIndicateFilter( BOOLEAN bIsBroadcast = FALSE; BOOLEAN bIsMulticast = FALSE; - + FillOctetString(pduOS, pRfd->Buffer.VirtualAddress + pRfd->FragOffset, pRfd->PacketLength); pRaddr = Frame_pRaddr(pduOS); pBssid = Frame_pBssid(pduOS); @@ -3168,14 +3168,14 @@ N6ReceiveIndicateFilter( } if(N6MatchPrivacyExemptList(Adapter, pRfd)) - { - return FALSE; + { + return FALSE; } - // - // For DTM 1.2 Packetfilter_ext + // + // For DTM 1.2 Packetfilter_ext // to filter data packet when CURRENT_PACKET_FILTER is set - // + // // (1) These standard packet filters are only applicable to 802.11 data packets // // (2) If NdisPacketFilter is not set (remains zero) @@ -3188,7 +3188,7 @@ N6ReceiveIndicateFilter( // a) NDIS_PACKET_TYPE_ALL_MULTICAST is set in current packet filter or // b) NDIS_PACKET_TYPE_MULTICASTis set in current packet filter, and // DA belongs to one of the multicast address (set from OID_DOT11_MULTICAST_LIST) - // + // // Add by hpfan 2008.05.12 // // For 802.11 specified filters respectively, by Bruce, 2008-06-26. @@ -3199,7 +3199,7 @@ N6ReceiveIndicateFilter( return TRUE; if(bIsBroadcast && (pNdisCommon->NdisPacketFilter & NDIS_PACKET_TYPE_802_11_BROADCAST_MGMT)) return TRUE; - if(bIsMulticast && (pNdisCommon->NdisPacketFilter & (NDIS_PACKET_TYPE_802_11_MULTICAST_MGMT | + if(bIsMulticast && (pNdisCommon->NdisPacketFilter & (NDIS_PACKET_TYPE_802_11_MULTICAST_MGMT | NDIS_PACKET_TYPE_802_11_ALL_MULTICAST_MGMT))) return TRUE; @@ -3217,8 +3217,8 @@ N6ReceiveIndicateFilter( // // Note: // It is only valid for the miniport driver to enable the NDIS_PACKET_TYPE_PROMISCUOUS, - // NDIS_PACKET_TYPE_802_11_PROMISCUOUS_MGMT, or - // NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL packet filters if the driver is + // NDIS_PACKET_TYPE_802_11_PROMISCUOUS_MGMT, or + // NDIS_PACKET_TYPE_802_11_PROMISCUOUS_CTRL packet filters if the driver is // operating in Network Monitor (NetMon) mode. // if(bAddrMatch && (pNdisCommon->NdisPacketFilter & NDIS_PACKET_TYPE_DIRECTED)) @@ -3231,7 +3231,7 @@ N6ReceiveIndicateFilter( // Do not filter data frame in IBSS mode. if(pMgntInfo->mIbss && !(PlatformCompareMemory(pMgntInfo->Bssid, pBssid, 6))) { - return TRUE; + return TRUE; } if(bIsMulticast && (pNdisCommon->NdisPacketFilter & NDIS_PACKET_TYPE_MULTICAST)) { @@ -3264,8 +3264,8 @@ N6ReceiveIndicateFilter( // NIC adapter context. // bAcqRxLock - // Need to Acquire Rx SpinLock or NO -// bIndic - -// Drop or Indic +// bIndic - +// Drop or Indic // VOID @@ -3286,7 +3286,7 @@ N6FulshD0CoalescingQueue( if(bAcqRxLock) PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); - if( pNdisCommon->D0FilterState == RT_D0_FILTER_NONE || + if( pNdisCommon->D0FilterState == RT_D0_FILTER_NONE || pNdisCommon->D0FilterState == RT_D0_FILTER_FLUSHING) { if(bAcqRxLock) @@ -3311,18 +3311,18 @@ N6FulshD0CoalescingQueue( RfdCnt = 0; pGenBuf = GetGenTempBuffer (Adapter, sizeof(PRT_RFD)*REORDER_WIN_SIZE); RfdArray = (PRT_RFD *)pGenBuf->Buffer.Ptr; - + while(!RTIsListEmpty(&pNdisCommon->D0FilterPktQueue)) { TempRfd = (PRT_RFD)RTRemoveHeadList(&pNdisCommon->D0FilterPktQueue); RfdArray[RfdCnt] = TempRfd; RfdCnt = RfdCnt + 1; } - - DrvIFD0RxIndicatePackets(Adapter , RfdArray , RfdCnt); + + DrvIFD0RxIndicatePackets(Adapter , RfdArray , RfdCnt); ReturnGenTempBuffer(Adapter, pGenBuf); } - + } else { @@ -3337,13 +3337,13 @@ N6FulshD0CoalescingQueue( ReturnRFDList(Adapter , TempRfd); } } - + } RT_TRACE(COMP_TEST, DBG_LOUD, ("<=== N6FulshD0CoalescingQueue() : Flush OK\n")); pNdisCommon->D0FilterState = RT_D0_FILTER_INIT; if(bAcqRxLock) PlatformReleaseSpinLock( Adapter, RT_RX_SPINLOCK); - + } // @@ -3353,9 +3353,9 @@ N6FulshD0CoalescingQueue( // NIC adapter context. // pRfd - // RFD buffer. -// Return -// True : be queue -// False: Not match !! +// Return +// True : be queue +// False: Not match !! BOOLEAN N6ReceiveCoalescingFilter( @@ -3378,7 +3378,7 @@ N6ReceiveCoalescingFilter( // OCTET_STRING frame; // FillOctetString(frame, pRfd->Buffer.VirtualAddress+PLATFORM_GET_FRAGOFFSET(pRfd), pRfd->PacketLength); - + if(pRfd->nTotalSubframe > 0 ) return bBufferPkt; @@ -3386,7 +3386,7 @@ N6ReceiveCoalescingFilter( if( pNdisCommon->D0FilterState == RT_D0_FILTER_NONE ) return bBufferPkt; - if( pNdisCommon->D0FilterState == RT_D0_FILTER_FLUSHING ) + if( pNdisCommon->D0FilterState == RT_D0_FILTER_FLUSHING ) return bBufferPkt; if( pRfd->D0FilterCoalPktInfo.PacketType == RXPacketTypeUndefined) @@ -3396,7 +3396,7 @@ N6ReceiveCoalescingFilter( return bBufferPkt; pCurrRfdFilteInfo = &(pRfd->D0FilterCoalPktInfo); - + for( ColseParIndex = 0 ; ColseParIndex < 10 && bBufferPkt == FALSE; ColseParIndex++) { @@ -3405,13 +3405,13 @@ N6ReceiveCoalescingFilter( if(pCurrFilterPar->FilterID == 0) continue; - + bFiledMatch =TRUE; for(ColseFieldIndex = 0 ; ColseFieldIndex < pCurrFilterPar->NumOfElem && bFiledMatch ==TRUE; ColseFieldIndex++) { pCurrFieldInfo = &(pCurrFilterPar->dFieldArry[ColseFieldIndex]); - + switch(pCurrFieldInfo->FrameHead ) { case RTFrameHeaderMac: @@ -3439,7 +3439,7 @@ N6ReceiveCoalescingFilter( } else if( pCurrFieldInfo->FilterTest == RTReceiveFilterTestNotEqual ) { - bFiledMatch = FALSE; // Now alway Equal + bFiledMatch = FALSE; // Now alway Equal } else { @@ -3538,7 +3538,7 @@ N6ReceiveCoalescingFilter( } } else - { + { bFiledMatch = FALSE; } break; @@ -3621,16 +3621,16 @@ N6ReceiveCoalescingFilter( bBufferPkt = TRUE; pMatchFilterPar = pCurrFilterPar; } - + } - + if(bBufferPkt ) { //RT_PRINT_DATA(COMP_TEST, DBG_LOUD, "===>bTestBufferPkt(true):\n", frame.Octet, frame.Length); RT_TRACE(COMP_TEST, DBG_LOUD,("===>bBufferPkt(true) !!\n")); } - + // Change state !! if(bBufferPkt) { @@ -3674,8 +3674,8 @@ N6Fill80211PhyAttributes( PDOT11_PHY_ATTRIBUTES pPhyAttributes; ULONG i, index; UCHAR rate; - - for (i=0, pPhyAttributes = pDot11Attributes->SupportedPhyAttributes ; + + for (i=0, pPhyAttributes = pDot11Attributes->SupportedPhyAttributes ; iNumSupportedPhys ; i++,pPhyAttributes++) { @@ -3703,8 +3703,8 @@ N6Fill80211PhyAttributes( break; case dot11_phy_type_ofdm: - pPhyAttributes->OFDMAttributes.uFrequencyBandsSupported = - DOT11_FREQUENCY_BANDS_LOWER | + pPhyAttributes->OFDMAttributes.uFrequencyBandsSupported = + DOT11_FREQUENCY_BANDS_LOWER | DOT11_FREQUENCY_BANDS_MIDDLE; break; @@ -3723,13 +3723,13 @@ N6Fill80211PhyAttributes( } // Tx Power Level. - pPhyAttributes->uNumberSupportedPowerLevels = + pPhyAttributes->uNumberSupportedPowerLevels = pNdisCommon->dot11SupportedPowerLevels.uNumOfSupportedPowerLevels; PlatformMoveMemory( pPhyAttributes->TxPowerLevels, pNdisCommon->dot11SupportedPowerLevels.uTxPowerLevelValues, sizeof(pPhyAttributes->TxPowerLevels)); - + // Data Rate. PlatformMoveMemory( &(pPhyAttributes->SupportedDataRatesValue), @@ -3791,15 +3791,15 @@ N6Fill80211ExtStaAttributes( pExtStaAttributes->bMFPCapable = TRUE; - pExtStaAttributes->uInfraNumSupportedMcastMgmtAlgoPairs = - pSupportedAuthCipherAlgs->pInfraSupportedMcastMgmtAlgoList->uNumOfEntries; - pExtStaAttributes->pInfraSupportedMcastMgmtAlgoPairs = - pSupportedAuthCipherAlgs->pInfraSupportedMcastMgmtAlgoList->AuthCipherPairs; + pExtStaAttributes->uInfraNumSupportedMcastMgmtAlgoPairs = + pSupportedAuthCipherAlgs->pInfraSupportedMcastMgmtAlgoList->uNumOfEntries; + pExtStaAttributes->pInfraSupportedMcastMgmtAlgoPairs = + pSupportedAuthCipherAlgs->pInfraSupportedMcastMgmtAlgoList->AuthCipherPairs; // // Authentication and Encryption algorithm. // - pExtStaAttributes->uInfraNumSupportedUcastAlgoPairs = + pExtStaAttributes->uInfraNumSupportedUcastAlgoPairs = pSupportedAuthCipherAlgs->pInfraUcastAuthCipherList->uNumOfEntries; pExtStaAttributes->pInfraSupportedUcastAlgoPairs = pSupportedAuthCipherAlgs->pInfraUcastAuthCipherList->AuthCipherPairs; @@ -3818,7 +3818,7 @@ N6Fill80211ExtStaAttributes( pSupportedAuthCipherAlgs->pAdhocMcastAuthCipherList->uNumOfEntries; pExtStaAttributes->pAdhocSupportedMcastAlgoPairs = pSupportedAuthCipherAlgs->pAdhocMcastAuthCipherList->AuthCipherPairs; - + } @@ -3840,7 +3840,7 @@ N6CSetGeneralAttributes( PlatformZeroMemory(&MiniportAttributes, sizeof(NDIS_MINIPORT_ADAPTER_ATTRIBUTES)); // - // We should fill up capability variable with zero value first to prevent + // We should fill up capability variable with zero value first to prevent // unexpected NDIS parsing and IRQL_NOT_LESS_OR_EQUAL (a) bugcheck code occurs // after ndisMInitializeAdapter and NdisSetTimer is fired. // 2010.05.24. @@ -3888,7 +3888,7 @@ N6CSetGeneralAttributes( FillPnpCapabilities(Adapter, &PnpCapabilities); #endif - MiniportAttributes.GeneralAttributes.MacOptions = + MiniportAttributes.GeneralAttributes.MacOptions = NDIS_MAC_OPTION_TRANSFERS_NOT_PEND | #if COALESCE_RECEIVED_PACKET NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | @@ -3900,10 +3900,10 @@ N6CSetGeneralAttributes( { MiniportAttributes.GeneralAttributes.MacOptions |= NDIS_MAC_OPTION_8021P_PRIORITY; } - + MiniportAttributes.GeneralAttributes.SupportedPacketFilters = NIC_SUPPORTED_FILTERS; - + MiniportAttributes.GeneralAttributes.MaxMulticastListSize = NATIVE_802_11_MAX_MULTICAST_LIST; MiniportAttributes.GeneralAttributes.MacAddressLength = ETH_LENGTH_OF_ADDRESS; @@ -3929,7 +3929,7 @@ N6CSetGeneralAttributes( // Support OIDs. MiniportAttributes.GeneralAttributes.SupportedOidList = N6GetSupportedOids(); MiniportAttributes.GeneralAttributes.SupportedOidListLength = N6GetSupportedOidsLength(); - + return NdisMSetMiniportAttributes(Adapter->pNdisCommon->hNdisAdapter, &MiniportAttributes ); @@ -3949,7 +3949,7 @@ N6Set80211Attributes( u4Byte BytesWritten, BytesNeeded; u1Byte tempAuthType = 0; - // For single .sys support: + // For single .sys support: // Point to types: DOT11_VWIFI_COMBINATION_V2 and DOT11_VWIFI_COMBINATION_V3 PVOID pCombination = NULL; @@ -3990,7 +3990,7 @@ N6Set80211Attributes( #if NDIS_SUPPORT_NDIS630 else if(pNdisCommon->NdisVersion <= NDIS_VERSION_BASE_6_40) { - + N6_ASSIGN_OBJECT_HEADER( Dot11Attributes.Header, NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_NATIVE_802_11_ATTRIBUTES, @@ -4004,26 +4004,26 @@ N6Set80211Attributes( Dot11Attributes.NumOfRXBuffers = pNdisCommon->dot11OperationModeCapability.uNumOfRXBuffers; Dot11Attributes.MultiDomainCapabilityImplemented = pNdisCommon->dot11MultiDomainCapabilityImplemented; Dot11Attributes.NumSupportedPhys = pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries; - + // // SupportedPhyAttributes attributes. // if (Dot11Attributes.NumSupportedPhys) { rtStatus = PlatformAllocateMemory( - Adapter, + Adapter, &(Dot11Attributes.SupportedPhyAttributes), Dot11Attributes.NumSupportedPhys * sizeof(DOT11_PHY_ATTRIBUTES) ); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6Set80211Attributes(): failed to allocate memory for SupportedPhyAttributes\n")); ndisStatus = NDIS_STATUS_FAILURE; goto Exit; } - PlatformZeroMemory(Dot11Attributes.SupportedPhyAttributes, + PlatformZeroMemory(Dot11Attributes.SupportedPhyAttributes, Dot11Attributes.NumSupportedPhys * sizeof(DOT11_PHY_ATTRIBUTES)); N6Fill80211PhyAttributes(Adapter, &Dot11Attributes); @@ -4047,18 +4047,18 @@ N6Set80211Attributes( PlatformZeroMemory(Dot11Attributes.ExtSTAAttributes, sizeof(DOT11_EXTSTA_ATTRIBUTES)); - + // // Get the supported authentication and cipher algorithm. // PlatformZeroMemory(&SupportedAuthCipherAlgs, sizeof(NIC_SUPPORTED_AUTH_CIPHER_PAIRS)); - + // Store current mode and switch to infrastructure mode. // - + tempAuthType = Adapter->MgntInfo.Regdot11networktype; Adapter->MgntInfo.Regdot11networktype = RT_JOIN_NETWORKTYPE_INFRA; - + // Unicast & Infrastructure. ndisStatus = N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR( Adapter, @@ -4067,12 +4067,12 @@ N6Set80211Attributes( &BytesWritten, &BytesNeeded); rtStatus = PlatformAllocateMemory( - Adapter, - &(SupportedAuthCipherAlgs.pInfraUcastAuthCipherList), + Adapter, + &(SupportedAuthCipherAlgs.pInfraUcastAuthCipherList), BytesNeeded); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6Set80211Attributes(): no buffer for N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR under infra mode\n")); ndisStatus = NDIS_STATUS_FAILURE; goto Exit; @@ -4138,12 +4138,12 @@ N6Set80211Attributes( &BytesWritten, &BytesNeeded); rtStatus = PlatformAllocateMemory( - Adapter, - &(SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList), + Adapter, + &(SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList), BytesNeeded); if (rtStatus != RT_STATUS_SUCCESS) { - RT_TRACE(COMP_INIT, DBG_SERIOUS, + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6Set80211Attributes(): no buffer for N6CQuery_DOT11_SUPPORTED_UNICAST_ALGORITHM_PAIR under adhoc mode\n")); ndisStatus = NDIS_STATUS_FAILURE; goto Exit; @@ -4199,7 +4199,7 @@ N6Set80211Attributes( } { - static DOT11_AUTH_CIPHER_PAIR McastMFPCipherList[] = + static DOT11_AUTH_CIPHER_PAIR McastMFPCipherList[] = { {DOT11_AUTH_ALGO_RSNA_PSK, DOT11_CIPHER_ALGO_BIP}, // 0 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_BIP}, // 1 @@ -4230,12 +4230,12 @@ N6Set80211Attributes( PlatformZeroMemory( pMFPAUTHList, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST) ); N6_ASSIGN_OBJECT_HEADER( - pMFPAUTHList->Header, + pMFPAUTHList->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_AUTH_CIPHER_PAIR_LIST_REVISION_1, sizeof(DOT11_AUTH_CIPHER_PAIR_LIST)); FillLength += FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs); - + pMFPAUTHList->uNumOfEntries = 0; pMFPAUTHList->uTotalNumOfEntries = ulNumOfPairSupported; for (i=0; iuNumOfEntries ++; FillLength += sizeof(DOT11_AUTH_CIPHER_PAIR); } @@ -4271,12 +4271,12 @@ N6Set80211Attributes( //4 add vwifi attributes #if NDIS_SUPPORT_NDIS630 if(pNdisCommon->NdisVersion > NDIS_VERSION_BASE_6_20) - vwifiAttrSize = FIELD_OFFSET(DOT11_VWIFI_ATTRIBUTES, Combinations) + + vwifiAttrSize = FIELD_OFFSET(DOT11_VWIFI_ATTRIBUTES, Combinations) + (NUM_SUPPORTED_VWIFI_COMBINATIONS) * DOT11_SIZEOF_VWIFI_COMBINATION_REVISION_3; - else + else #endif - vwifiAttrSize = sizeof(DOT11_VWIFI_ATTRIBUTES) + + vwifiAttrSize = sizeof(DOT11_VWIFI_ATTRIBUTES) + (NUM_SUPPORTED_VWIFI_COMBINATIONS) * DOT11_SIZEOF_VWIFI_COMBINATION_REVISION_2; rtStatus = PlatformAllocateMemory( @@ -4285,7 +4285,7 @@ N6Set80211Attributes( vwifiAttrSize ); if (rtStatus != RT_STATUS_SUCCESS) - + { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("failed to allocate memory for VWiFiAttributes\n")); @@ -4295,56 +4295,56 @@ N6Set80211Attributes( PlatformZeroMemory(Dot11Attributes.VWiFiAttributes, vwifiAttrSize); N6_ASSIGN_OBJECT_HEADER( - Dot11Attributes.VWiFiAttributes->Header, + Dot11Attributes.VWiFiAttributes->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_VWIFI_ATTRIBUTES_REVISION_1, sizeof(DOT11_VWIFI_ATTRIBUTES)); Dot11Attributes.VWiFiAttributes->uTotalNumOfEntries = NUM_SUPPORTED_VWIFI_COMBINATIONS; -#if 1 +#if 1 if(pNdisCommon->NdisVersion <= NDIS_VERSION_BASE_6_20) { pCombination = (PVOID) &(Dot11Attributes.VWiFiAttributes->Combinations[0]); - + N6_ASSIGN_OBJECT_HEADER( - ((PDOT11_VWIFI_COMBINATION_V2) pCombination)->Header, + ((PDOT11_VWIFI_COMBINATION_V2) pCombination)->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_VWIFI_COMBINATION_REVISION_2, DOT11_SIZEOF_VWIFI_COMBINATION_REVISION_2 ); - + ((PDOT11_VWIFI_COMBINATION_V2) pCombination)->uNumInfrastructure = 1; ((PDOT11_VWIFI_COMBINATION_V2) pCombination)->uNumSoftAP = 1; if(!Adapter->bInHctTest) ((PDOT11_VWIFI_COMBINATION_V2) pCombination)->uNumVirtualStation = 1; } -#endif +#endif #if NDIS_SUPPORT_NDIS630 else if(pNdisCommon->NdisVersion <= NDIS_VERSION_BASE_6_40) { pCombination = (PVOID) &Dot11Attributes.VWiFiAttributes->Combinations[0]; N6_ASSIGN_OBJECT_HEADER( - ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->Header, + ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_VWIFI_COMBINATION_REVISION_3, DOT11_SIZEOF_VWIFI_COMBINATION_REVISION_3 ); - + ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->uNumInfrastructure = 1; ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->uNumSoftAP = 1; - ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->uNumWFDGroup = 2; + ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->uNumWFDGroup = 2; ((PDOT11_VWIFI_COMBINATION_V3) pCombination)->uNumVirtualStation = 0; } #endif - //4 add extap attributes + //4 add extap attributes if(Adapter->bStartVwifi == TRUE) { Dot11Attributes.OpModeCapability |= DOT11_OPERATION_MODE_EXTENSIBLE_AP; - PlatformAllocateMemory(Adapter, - &(Dot11Attributes.ExtAPAttributes), + PlatformAllocateMemory(Adapter, + &(Dot11Attributes.ExtAPAttributes), sizeof(DOT11_EXTAP_ATTRIBUTES)); if(Dot11Attributes.ExtAPAttributes == NULL) @@ -4357,7 +4357,7 @@ N6Set80211Attributes( PlatformZeroMemory(Dot11Attributes.ExtAPAttributes, sizeof(DOT11_EXTAP_ATTRIBUTES)); N6_ASSIGN_OBJECT_HEADER( - Dot11Attributes.ExtAPAttributes->Header, + Dot11Attributes.ExtAPAttributes->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_EXTAP_ATTRIBUTES_REVISION_1, sizeof(DOT11_EXTAP_ATTRIBUTES)); @@ -4366,7 +4366,7 @@ N6Set80211Attributes( Dot11Attributes.ExtAPAttributes->uPrivacyExemptionListSize = NATIVE_802_11_MAX_PRIVACY_EXEMPTION; // TODO: Get the real Size Some day Dot11Attributes.ExtAPAttributes->uDefaultKeyTableSize = DOT11_MAX_NUM_DEFAULT_KEY;//VNic11DefaultKeyTableSize(vnic); - Dot11Attributes.ExtAPAttributes->uWEPKeyValueMaxLength = ( 104 / 8);//VNic11WEP104Implemented(vnic) ? + Dot11Attributes.ExtAPAttributes->uWEPKeyValueMaxLength = ( 104 / 8);//VNic11WEP104Implemented(vnic) ? // 104 / 8 : (VNic11WEP40Implemented(vnic) ? 40 / 8 : 0); Dot11Attributes.ExtAPAttributes->uDesiredSSIDListSize = AP_DESIRED_SSID_LIST_MAX_SIZE; @@ -4378,7 +4378,7 @@ N6Set80211Attributes( // Dot11Attributes.ExtAPAttributes->uNumSupportedCountryOrRegionStrings = 0; Dot11Attributes.ExtAPAttributes->pSupportedCountryOrRegionStrings = NULL; - + // In Ndis 6.0 We use Ad hoc to simulize AP mode So the Ad hoc Security will be the security we support // TODO: Win 7 , We should support more security in here for Win 7 V3 AP Mode if(Adapter->bInHctTest) @@ -4395,19 +4395,19 @@ N6Set80211Attributes( else { // In Ndis 6.0 We use Ad hoc to simulize AP mode So the Ad hoc Security will be the security we support - Dot11Attributes.ExtAPAttributes->uInfraNumSupportedUcastAlgoPairs = + Dot11Attributes.ExtAPAttributes->uInfraNumSupportedUcastAlgoPairs = SupportedAuthCipherAlgs.pInfraUcastAuthCipherList ->uNumOfEntries; Dot11Attributes.ExtAPAttributes->pInfraSupportedUcastAlgoPairs = SupportedAuthCipherAlgs.pInfraUcastAuthCipherList->AuthCipherPairs; - Dot11Attributes.ExtAPAttributes->uInfraNumSupportedMcastAlgoPairs = + Dot11Attributes.ExtAPAttributes->uInfraNumSupportedMcastAlgoPairs = SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->uNumOfEntries; Dot11Attributes.ExtAPAttributes->pInfraSupportedMcastAlgoPairs = SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->AuthCipherPairs; } - - } - + + } + } #endif // NDIS_SUPPORT_NDIS620 @@ -4416,14 +4416,14 @@ N6Set80211Attributes( { PDOT11_WFD_ATTRIBUTES pWFDAttributes = NULL; DOT11_COUNTRY_OR_REGION_STRING dcors[1] = {{0,0,0}}; - - Dot11Attributes.OpModeCapability |= - DOT11_OPERATION_MODE_WFD_DEVICE | - DOT11_OPERATION_MODE_WFD_GROUP_OWNER | + + Dot11Attributes.OpModeCapability |= + DOT11_OPERATION_MODE_WFD_DEVICE | + DOT11_OPERATION_MODE_WFD_GROUP_OWNER | DOT11_OPERATION_MODE_WFD_CLIENT; - - PlatformAllocateMemory(Adapter, - &(Dot11Attributes.WFDAttributes), + + PlatformAllocateMemory(Adapter, + &(Dot11Attributes.WFDAttributes), DOT11_SIZEOF_WFD_ATTRIBUTES_REVISION_1); if(Dot11Attributes.WFDAttributes == NULL) @@ -4432,18 +4432,18 @@ N6Set80211Attributes( ndisStatus = NDIS_STATUS_FAILURE; goto Exit; } - + pWFDAttributes = Dot11Attributes.WFDAttributes; - + PlatformZeroMemory(Dot11Attributes.WFDAttributes, DOT11_SIZEOF_WFD_ATTRIBUTES_REVISION_1); { N6_ASSIGN_OBJECT_HEADER( - pWFDAttributes->Header, + pWFDAttributes->Header, NDIS_OBJECT_TYPE_DEFAULT, DOT11_WFD_ATTRIBUTES_REVISION_1, DOT11_SIZEOF_WFD_ATTRIBUTES_REVISION_1 ); - + pWFDAttributes->uNumConcurrentGORole = 1; pWFDAttributes->uNumConcurrentClientRole = 1; pWFDAttributes->WPSVersionsSupported = DOT11_WPS_VERSION_2_0; @@ -4462,7 +4462,7 @@ N6Set80211Attributes( pWFDAttributes->uInterfaceAddressListCount = 2 ; PlatformAllocateMemory( - Adapter, + Adapter, (PVOID*) &pWFDAttributes->pInterfaceAddressList, sizeof(DOT11_MAC_ADDRESS) * pWFDAttributes->uInterfaceAddressListCount ); @@ -4473,7 +4473,7 @@ N6Set80211Attributes( ndisStatus = NDIS_STATUS_FAILURE; goto Exit; } - + cpMacAddr(pWFDAttributes->pInterfaceAddressList[0], Adapter->CurrentAddress); RT_PRINT_ADDR(COMP_INIT, DBG_LOUD, "Win8 Registered Interface Address [0]: ", pWFDAttributes->pInterfaceAddressList[0]); @@ -4484,7 +4484,7 @@ N6Set80211Attributes( pWFDAttributes->uNumSupportedCountryOrRegionStrings = 0; pWFDAttributes->pSupportedCountryOrRegionStrings = &dcors[0]; pWFDAttributes->uDiscoveryFilterListSize = AP_SCAN_SSID_LIST_MAX_SIZE; - pWFDAttributes->uGORoleClientTableSize = P2P_MAX_P2P_CLIENT; + pWFDAttributes->uGORoleClientTableSize = P2P_MAX_P2P_CLIENT; } } #endif @@ -4494,7 +4494,7 @@ N6Set80211Attributes( // ndisStatus = NdisMSetMiniportAttributes(Adapter->pNdisCommon->hNdisAdapter, (PNDIS_MINIPORT_ADAPTER_ATTRIBUTES)&Dot11Attributes - ); + ); RT_TRACE(COMP_INIT, DBG_LOUD, ("NdisMSetMiniportAttributes: ndisStatu: %d\n", ndisStatus)); @@ -4505,7 +4505,7 @@ N6Set80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pInfraUcastAuthCipherList, - SupportedAuthCipherAlgs.pInfraUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pInfraUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -4513,15 +4513,15 @@ N6Set80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pInfraMcastAuthCipherList, - SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pInfraMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); - } + } if (SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList != NULL) { PlatformFreeMemory( SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList, - SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pAdhocUcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -4529,7 +4529,7 @@ N6Set80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pAdhocMcastAuthCipherList, - SupportedAuthCipherAlgs.pAdhocMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pAdhocMcastAuthCipherList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -4537,7 +4537,7 @@ N6Set80211Attributes( { PlatformFreeMemory( SupportedAuthCipherAlgs.pInfraSupportedMcastMgmtAlgoList, - SupportedAuthCipherAlgs.pInfraSupportedMcastMgmtAlgoList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + + SupportedAuthCipherAlgs.pInfraSupportedMcastMgmtAlgoList->uNumOfEntries * sizeof(DOT11_AUTH_CIPHER_PAIR) + FIELD_OFFSET(DOT11_AUTH_CIPHER_PAIR_LIST, AuthCipherPairs)); } @@ -4546,7 +4546,7 @@ N6Set80211Attributes( PlatformFreeMemory(Dot11Attributes.ExtSTAAttributes, sizeof(DOT11_EXTSTA_ATTRIBUTES)); } - + if (Dot11Attributes.VWiFiAttributes != NULL) { PlatformFreeMemory(Dot11Attributes.VWiFiAttributes,vwifiAttrSize); @@ -4609,7 +4609,7 @@ N6FreeAdapter( RT_TRACE(COMP_INIT, DBG_LOUD, ("===>N6FreeAdapter()\n")); // free CtxWorkItem and ndis62Common. - + MgntFreeMemory(Adapter); PlatformFreeMemory(Adapter->pNdisCommon, sizeof(RT_NDIS6_COMMON)); PlatformFreeMemory(Adapter, sizeof(ADAPTER)); @@ -4644,7 +4644,7 @@ N6MatchPrivacyExemptList( // // Get Type Length. // - if(pduOS.Length < 32) + if(pduOS.Length < 32) return FALSE; // @@ -4664,10 +4664,10 @@ N6MatchPrivacyExemptList( usEtherType = pNdisCommon->PrivacyExemptionEntries[i].usEtherType; usExemptionActionType = pNdisCommon->PrivacyExemptionEntries[i].usExemptionActionType; usExemptionPacketType = pNdisCommon->PrivacyExemptionEntries[i].usExemptionPacketType; - + if(usEtherType != N2H2BYTE(TypeLength)) // TypeLength is in network order. continue; // check next - + if(usExemptionPacketType == DOT11_EXEMPT_MULTICAST) { if(!MacAddr_isMulticast(Frame_pDaddr(pduOS))) @@ -4702,7 +4702,7 @@ N6MatchPrivacyExemptList( else if(usExemptionActionType == DOT11_EXEMPT_ON_KEY_MAPPING_KEY_UNAVAILABLE) { // - // If we have a key mapping key corresponding to the transmitter address and + // If we have a key mapping key corresponding to the transmitter address and // the packet is in plain text then drop the packet. // If the key is unavailable, and the packet without privacy bit set, we should indicate this packet. // @@ -4724,7 +4724,7 @@ N6MatchPrivacyExemptList( {// plain text and key mapping key is unavailable, exempt this frame by returning TRUE return TRUE; } - + } } else @@ -4734,11 +4734,11 @@ N6MatchPrivacyExemptList( {// not recognized continue; // check next } - - } + + } return FALSE; - + } @@ -4795,7 +4795,7 @@ PNPReConnentTimerCallback( // // We indicate roaming start here while S3/S4 resume if we dissociated before sleep. - // If we indicate roaming start before entering S4 state, + // If we indicate roaming start before entering S4 state, // which could suffers from roaming failure due to roaming timeout. // Added by Roger, 2007.11.07. // @@ -4835,29 +4835,29 @@ D0RxIndicatTimerCallback( PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); - if( pNdisCommon->D0FilterState == RT_D0_FILTER_NONE || + if( pNdisCommon->D0FilterState == RT_D0_FILTER_NONE || pNdisCommon->D0FilterState == RT_D0_FILTER_FLUSHING) { PlatformReleaseSpinLock( Adapter, RT_RX_SPINLOCK); return; } - + if( !RTIsListEmpty(&(pNdisCommon->D0FilterPktQueue)) ) { pNdisCommon->D0FilterState = RT_D0_FILTER_FLUSHING; RfdCnt = 0; pGenBuf = GetGenTempBuffer (Adapter, sizeof(PRT_RFD)*REORDER_WIN_SIZE); RfdArray = (PRT_RFD *)pGenBuf->Buffer.Ptr; - + while(!RTIsListEmpty(&pNdisCommon->D0FilterPktQueue)) { TempRfd = (PRT_RFD)RTRemoveHeadList(&pNdisCommon->D0FilterPktQueue); RfdArray[RfdCnt] = TempRfd; RfdCnt = RfdCnt + 1; } - + DrvIFD0RxIndicatePackets(Adapter , RfdArray , RfdCnt); - + ReturnGenTempBuffer(Adapter, pGenBuf); } RT_TRACE(COMP_TEST, DBG_LOUD, ("<=== D0RxIndicatTimerCallback() : Flush OK\n")); @@ -4879,7 +4879,7 @@ InitializeAdapterWorkItemCallback( } -VOID +VOID InitializeAdapterThread( IN PVOID pContext ) @@ -4903,7 +4903,7 @@ MatchInitPendingOid( { RT_TRACE(COMP_OID_SET, DBG_TRACE, ("MatchInitPendingOid OID (0x%x) type (0x%x) \n", NdisInitPendingOid[index].Oid, NdisInitPendingOid[index].Type)); - + if(NdisInitPendingOid[index].Type == NdisRequest->RequestType && NdisInitPendingOid[index].Oid == NdisRequest->DATA.METHOD_INFORMATION.Oid) { @@ -4921,12 +4921,12 @@ InitializePendingOIDBeforeReady( OUT PNDIS_STATUS pRetVal ) { - + if(N6_INIT_READY(Adapter)) { return FALSE; } - else + else { RT_TRACE( COMP_INIT, DBG_LOUD, ("InitializePendingOIDBeforeReady(): QUERY_INFORMATION OID(%#x) when initializing.\n", NdisRequest->DATA.QUERY_INFORMATION.Oid)); @@ -4944,29 +4944,29 @@ InitializePendingOIDBeforeReady( // Reset request is skip during initialization. if(NdisRequest->RequestType==NdisRequestMethod|| NdisRequest->RequestType==NdisRequestSetInformation) { - + if(NdisRequest->DATA.METHOD_INFORMATION.Oid==OID_DOT11_RESET_REQUEST) - { - + { + // // We need to check whether OutputBufferLength is valid prior to following status indication. // 2014.05.02. // if ( NdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >= sizeof(DOT11_STATUS_INDICATION) ) { - + PDOT11_STATUS_INDICATION pDot11StatusIndication = NdisRequest->DATA.METHOD_INFORMATION.InformationBuffer; PlatformZeroMemory(pDot11StatusIndication, sizeof(DOT11_STATUS_INDICATION)); pDot11StatusIndication->uStatusType = DOT11_STATUS_RESET_CONFIRM; pDot11StatusIndication->ndisStatus = NDIS_STATUS_SUCCESS; - NdisRequest->DATA.METHOD_INFORMATION.BytesRead = sizeof(DOT11_RESET_REQUEST);// After reset operation was completed, return the status indication. + NdisRequest->DATA.METHOD_INFORMATION.BytesRead = sizeof(DOT11_RESET_REQUEST);// After reset operation was completed, return the status indication. RT_TRACE( COMP_INIT, DBG_LOUD, ("InitializePendingOIDBeforeReady(): OID_DOT11_RESET_REQUEST when initializing. return SUCCESS\n")); - + *pRetVal = NDIS_STATUS_SUCCESS; return TRUE; - } + } } } @@ -4988,17 +4988,17 @@ InitializeCompleteOID( { if(MatchInitPendingOid(pNdisCommon->PendedRequest)) { - RT_TRACE(COMP_INIT, DBG_LOUD, + RT_TRACE(COMP_INIT, DBG_LOUD, ("InitializeAdapterCommon(): (1) complete PendedRequest(%p) call N6PciOidRequest()!!!++++++++\n", pNdisCommon->PendedRequest)); - + N6C_DOT11_DUMP_OID(pNdisCommon->PendedRequest->DATA.METHOD_INFORMATION.Oid); - RT_TRACE(COMP_INIT, DBG_LOUD, + RT_TRACE(COMP_INIT, DBG_LOUD, ("InitializeAdapterCommon(): complete PendedRequest(%p) ++++++++\n", pNdisCommon->PendedRequest)); - + PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK); - N6CompletePendedOID(pAdapter, RT_PENDED_OID_DONT_CARE, + N6CompletePendedOID(pAdapter, RT_PENDED_OID_DONT_CARE, N6SdioOidRequest((NDIS_HANDLE)pAdapter, pNdisCommon->PendedRequest)); } else @@ -5038,13 +5038,13 @@ InitializeAdapterCommon( delay_ms(1); } delay_ms(1); // this delay is use toe avoid this wokritem interrupt into n6pciinitialize!!!! - + if(pAdapter->bDriverIsGoingToUnload) { RT_TRACE(COMP_INIT, DBG_LOUD, ("bDriverIsGoingToUnload after\n")); - goto Exit; + goto Exit; } - + pAdapter->bInitializeInProgress=TRUE; // 2015/02/25 MH Merge from merge temp, illegal methid to support velocity initialize. @@ -5077,13 +5077,13 @@ InitializeAdapterCommon( bInitFail = TRUE; goto Exit; } - + PlatformSetCheckForHangTimer(pAdapter); - + ADAPTER_CLEAR_STATUS_FLAG(pAdapter, ADAPTER_STATUS_FIRST_INIT); MultiPortSetAllPortsHWReadyStatus(pAdapter, TRUE); - + // // We shall restore default ASPM settings If Non-ATI solution. // 2009.03.23. @@ -5099,12 +5099,12 @@ InitializeAdapterCommon( //DrvIFIndicateCurrentPhyStatus(pAdapter); Exit: - + pAdapter->bInitializeInProgress=FALSE; - // - // If we had already returned control for the InitializeHandlerEx routine - // and we can removes the specified miniport driver adapter that the miniport driver + // + // If we had already returned control for the InitializeHandlerEx routine + // and we can removes the specified miniport driver adapter that the miniport driver // has determined is unrecoverable from the system. // 2010.06.24. // @@ -5120,8 +5120,8 @@ InitializeAdapterCommon( // Clear interrupt before enable interrupt. NicIFClearInterrupt(pAdapter); - NicIFEnableInterrupt(pAdapter); - + NicIFEnableInterrupt(pAdapter); + // 2012/03/27 hpfan Add for win8 DTM DPC ISR test if(pAdapter->bUseThreadHandleInterrupt) { @@ -5129,21 +5129,21 @@ InitializeAdapterCommon( pAdapter, &pAdapter->InterruptThread, PASSIVE_LEVEL, - NULL); + NULL); } InitializeCompleteOID(pAdapter); - - pAdapter->bInitComplete = TRUE; + + pAdapter->bInitComplete = TRUE; RT_SET_DRV_STATE(pAdapter, DrvStateHwInitialized); } RT_TRACE(COMP_INIT, DBG_LOUD, ("<--InitializeAdapterCommon\n")); - + } // InitializeAdapterCommon -PVOID +PVOID GetTwoPortSharedResource( IN PADAPTER Adapter, IN u1Byte Type_ToGet, @@ -5155,7 +5155,7 @@ GetTwoPortSharedResource( PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); PADAPTER ExtAdapter = GetFirstAPAdapter(Adapter); u1Byte TwoPortStatus = (u1Byte)TWO_PORT_STATUS__DEFAULT_ONLY; - + //(1.) ====== Decide TWO_PORT_STATUS ====== if(ExtAdapter == NULL || ExtAdapter == pDefaultAdapter) { @@ -5177,7 +5177,7 @@ GetTwoPortSharedResource( &&(ExtAdapter->MgntInfo.OpMode==RT_OP_MODE_AP) // a dangerous way depend on compiler &&(pDefaultAdapter->MgntInfo.dot11CurrentWirelessMode&WIRELESS_MODE_A) &&(IS_WIRELESS_MODE_N(ExtAdapter))) - { + { TwoPortStatus = TWO_PORT_STATUS__DEFAULT_A_EXTENSION_N20; } else if( @@ -5208,26 +5208,26 @@ GetTwoPortSharedResource( { TwoPortStatus = TWO_PORT_STATUS__WITHOUT_ANY_ASSOCIATE; } - + if(pTwoPortStatus != NULL) *pTwoPortStatus = (u1Byte)TwoPortStatus; - + //(2.) ====== For Each Type of Share Resources Deside its Adapter Source ====== switch (Type_ToGet) { //=================================================================== case TWO_PORT_SHARED_OBJECT__STATUS: - return pTwoPortStatus; + return pTwoPortStatus; break; - //=================================================================== + //=================================================================== case TWO_PORT_SHARED_OBJECT__SET_OF_pStaQos_WMMParamEle: - { + { switch(TwoPortStatus) { case TWO_PORT_STATUS__EXTENSION_ONLY: return (pu1Byte)ExtAdapter->MgntInfo.pStaQos->WMMParamEle;// how to handle the pointer? break; - default: + default: return (pu1Byte)pDefaultAdapter->MgntInfo.pStaQos->WMMParamEle;// how to handle the pointer? break; } @@ -5241,7 +5241,7 @@ GetTwoPortSharedResource( case TWO_PORT_STATUS__EXTENSION_ONLY: *(PQOS_MODE)pVariable_ToGet = ExtAdapter->MgntInfo.pStaQos->CurrentQosMode; break; - default: + default: *(PQOS_MODE)pVariable_ToGet = pDefaultAdapter->MgntInfo.pStaQos->CurrentQosMode; break; } @@ -5255,21 +5255,21 @@ GetTwoPortSharedResource( { case TWO_PORT_STATUS__DEFAULT_G_EXTENSION_N20: case TWO_PORT_STATUS__DEFAULT_A_EXTENSION_N20: - case TWO_PORT_STATUS__ADHOC: + case TWO_PORT_STATUS__ADHOC: if (pTwoPortStatus != NULL) { *pTwoPortStatus = (u1Byte)CHANNEL_WIDTH_20;// cast issue } break; - + case TWO_PORT_STATUS__EXTENSION_ONLY: if (pTwoPortStatus != NULL) { *pTwoPortStatus = (u1Byte)ExtAdapter->MgntInfo.dot11CurrentChannelBandWidth; } break; - - case TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT: + + case TWO_PORT_STATUS__EXTENSION_FOLLOW_DEFAULT: case TWO_PORT_STATUS__DEFAULT_ONLY: if (pTwoPortStatus != NULL) { @@ -5289,12 +5289,12 @@ GetTwoPortSharedResource( } } break; - //=================================================================== + //=================================================================== default: return NULL; break; //=================================================================== - + } return NULL; } @@ -5302,17 +5302,17 @@ GetTwoPortSharedResource( VOID N6WriteEventLog( - IN PADAPTER Adapter, + IN PADAPTER Adapter, IN RT_EVENTLOG_TYPE type, IN ULONG Num ) { - PWCHAR ErrorString; + PWCHAR ErrorString; // 20101025 Joseph: Merge with 91SE code base. This prevent the system unknown log shown on event view. // Without this log, customer may not be confused. return; - + switch(type) { case RT_FW_DOWLOAD_F: @@ -5352,11 +5352,11 @@ N6WriteEventLog( NdisWriteEventLogEntry( GlobalRtDriverContext.NdisContext.pDriverObject, - NDIS_STATUS_SUCCESS, - 2, - 1, - &ErrorString, - sizeof(Num), + NDIS_STATUS_SUCCESS, + 2, + 1, + &ErrorString, + sizeof(Num), &Num); } @@ -5391,11 +5391,11 @@ N6CWriteEventLogEntry( { NdisWriteEventLogEntry( GlobalRtDriverContext.NdisContext.pDriverObject, - ndisStatus, - 2, - 1, - &buf->Buffer.Ptr, - dataLen, + ndisStatus, + 2, + 1, + &buf->Buffer.Ptr, + dataLen, data); } }while(FALSE); @@ -5404,7 +5404,7 @@ N6CWriteEventLogEntry( ReturnGenTempBuffer(pAdapter, buf); va_end(argPtr); - + #endif return; @@ -5424,7 +5424,7 @@ N6CSendSingleNetBufferListTimerCallback( if(PlatformAtomicExchange(&Adapter->IntrNBLRefCount, TRUE)==TRUE) return; - + PlatformAcquireSpinLock( Adapter, RT_TX_SPINLOCK); if(pDevice->SendingNetBufferList == NULL) { @@ -5451,7 +5451,7 @@ N6CSendSingleNetBufferListTimerCallback( RT_TRACE(COMP_SEND, DBG_TRACE, (" handle the NBL buffered(%p)\n", pCurrNetBufferList )); if( !N6SdioSendSingleNetBufferList( - Adapter, + Adapter, pCurrNetBufferList, TRUE) ) // bFromQueue { @@ -5480,26 +5480,26 @@ N6CQueryPhyIdReady( BOOLEAN bResult = TRUE; PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); PMGNT_INFO pMgntInfo = &(pLoopAdapter->MgntInfo); - + // // The following configuration is for airplane mode synchronization problem on Win8 or later version // 2013.06.07. - // + // while(pLoopAdapter) { // We only take first two ports into consideration if((GET_PORT_NUMBER(pLoopAdapter) == 0) || (GET_PORT_NUMBER(pLoopAdapter) == 1)) - { + { if(pLoopAdapter->pNdis62Common->bDot11SetPhyIdReady == FALSE) { - RT_TRACE(COMP_RF, DBG_TRACE, ("N6CQueryPhyIdReady(): pLoopAdapter(%p), PortType(%d), bDot11SetPhyIdReady(%d)\n", + RT_TRACE(COMP_RF, DBG_TRACE, ("N6CQueryPhyIdReady(): pLoopAdapter(%p), PortType(%d), bDot11SetPhyIdReady(%d)\n", pLoopAdapter, pLoopAdapter->pNdis62Common->PortType, pLoopAdapter->pNdis62Common->bDot11SetPhyIdReady)); bResult = FALSE; break; - } - } - pLoopAdapter = GetNextExtAdapter(pLoopAdapter); + } + } + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } return bResult; @@ -5508,10 +5508,10 @@ N6CQueryPhyIdReady( #if DRV_LOG_REGISTRY // -// Description: +// Description: // Save current driver state in specific registry // -// Assumption: +// Assumption: // 1. Running at PASSIVE_LEVEL // // Added by Roger, 2013.12.13. @@ -5528,7 +5528,7 @@ N6WriteRegDriverState( u1Byte TimeOut = 100; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) + if (KeGetCurrentIrql() > PASSIVE_LEVEL) { RT_TRACE(COMP_INIT,DBG_WARNING, ("N6WriteRegDriverState(): Current IRQL>PASSIVE_LEVEL!!\n")); return NDIS_STATUS_FAILURE; @@ -5537,7 +5537,7 @@ N6WriteRegDriverState( if(Adapter->bDriverStopped) return NDIS_STATUS_FAILURE; - while(PlatformAtomicExchange(&Adapter->WriteRegRefCount, TRUE) == TRUE) + while(PlatformAtomicExchange(&Adapter->WriteRegRefCount, TRUE) == TRUE) { RT_TRACE(COMP_INIT, DBG_WARNING, ("N6WriteRegDriverState(): Waiting for previous process...\n")); PlatformSleepUs(100); @@ -5548,7 +5548,7 @@ N6WriteRegDriverState( return NDIS_STATUS_FAILURE; } } - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -5556,10 +5556,10 @@ N6WriteRegDriverState( RT_TRACE(COMP_INIT,DBG_TRACE, ("N6WriteRegDriverState(): Status=%x\n", Status)); return Status; } - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = State; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -5570,7 +5570,7 @@ N6WriteRegDriverState( N6CloseConfigurationHandle(ConfigurationHandle); PlatformAtomicExchange(&Adapter->WriteRegRefCount, FALSE); - + return Status; } @@ -5591,7 +5591,7 @@ N6WriteRegDbgMonitor( NDIS_STATUS Status; NDIS_CONFIGURATION_PARAMETER ConfigParam; NDIS_STRING KeyName = NDIS_STRING_CONST("DbgMonitor"); - + // Open the registry for this adapter. Status = N6OpenConfigurationHandle(Adapter, &ConfigurationHandle); if(Status != NDIS_STATUS_SUCCESS) @@ -5599,10 +5599,10 @@ N6WriteRegDbgMonitor( RT_TRACE_EX(COMP_DBG_MON, DBG_LOUD, ("N6WriteRegDbgMonitor(): Fail!!!, Status=%x\n", Status)); return Status; } - + ConfigParam.ParameterType = NdisParameterInteger; ConfigParam.ParameterData.IntegerData = DbgMonitor; - + NdisWriteConfiguration( &Status, ConfigurationHandle, @@ -5620,13 +5620,13 @@ NdisOIDHistoryInit( IN PADAPTER pAdapter) { PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("NdisOIDHistoryInit() ====> \n")); - + NdisAllocateSpinLock(&(pNdisCommon->OidHistorySpinLock)); RTInitializeListHead(&pNdisCommon->OidHistoryList); pNdisCommon->OidHistoryCount = 0; - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("NdisOIDHistoryInit() <==== \n")); } @@ -5636,13 +5636,13 @@ NdisOIDHistoryDeInit( { PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; PRT_OID_HISTORY_ENTRY pOidHistoryEntry = NULL; - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("====> NdisOIDHistoryDeInit()\n")); NdisAcquireSpinLock(&(pNdisCommon->OidHistorySpinLock)); RT_TRACE(COMP_OID_SET, DBG_TRACE, ("%s: pNdisCommon->OidHistoryCount %d\n", __FUNCTION__, pNdisCommon->OidHistoryCount)); - + if( pNdisCommon->OidHistoryCount > 0 ) { do{ @@ -5665,7 +5665,7 @@ NdisOIDHistoryDeInit( NdisReleaseSpinLock(&(pNdisCommon->OidHistorySpinLock)); NdisFreeSpinLock(&(pNdisCommon->OidHistorySpinLock)); - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("<==== NdisOIDHistoryDeInit()\n")); } @@ -5685,9 +5685,9 @@ NdisOIDHistoryUpdate( { if( pAdapter == NULL ) break; - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("%s: pNdisCommon->OidHistoryCount %d\n", __FUNCTION__, pNdisCommon->OidHistoryCount)); - + if( pNdisCommon->OidHistoryCount >= OID_HISTORY_MAX_NUM ) { NdisAcquireSpinLock(&(pNdisCommon->OidHistorySpinLock)); @@ -5707,15 +5707,15 @@ NdisOIDHistoryUpdate( RT_TRACE(COMP_OID_SET, DBG_TRACE, ("pOidHistoryEntry->Oid: 0x%X\r\n", pOidHistoryEntry->Oid)); RT_TRACE(COMP_OID_SET, DBG_TRACE, ("pOidHistoryEntry->CurrentState: %d\r\n", pOidHistoryEntry->CurrentState)); RT_TRACE(COMP_OID_SET, DBG_TRACE, ("pOidHistoryEntry->CurrentTime: %I64d\r\n", pOidHistoryEntry->CurrentTime)); - + pOidHistoryEntry->RequestType = pNdisRequest->RequestType; switch (pOidHistoryEntry->RequestType) { // Query - case NdisRequestQueryInformation: - pOidHistoryEntry->InformationBufferLength = pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength; + case NdisRequestQueryInformation: + pOidHistoryEntry->InformationBufferLength = pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength; break; - + // Set case NdisRequestSetInformation: pOidHistoryEntry->InformationBufferLength = pNdisRequest->DATA.SET_INFORMATION.InformationBufferLength; @@ -5735,7 +5735,7 @@ NdisOIDHistoryUpdate( switch (pOidHistoryEntry->RequestType) { // Query - case NdisRequestQueryInformation: + case NdisRequestQueryInformation: PlatformMoveMemory(pOidHistoryEntry->InformationBuffer, pNdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength); break; // Set @@ -5758,7 +5758,7 @@ NdisOIDHistoryUpdate( } if( pOidHistoryEntry->InformationBuffer != NULL ) RT_PRINT_DATA(COMP_OID_SET, DBG_TRACE, ("pOidHistoryEntry->InformationBuffer:\n"), pOidHistoryEntry->InformationBuffer, pOidHistoryEntry->InformationBufferLength); - + pOidHistoryEntry->TransactionId = pWdiHeader->TransactionId; NdisAcquireSpinLock(&(pNdisCommon->OidHistorySpinLock)); @@ -5786,7 +5786,7 @@ NdisOIDHistoryUpdate( switch (pOidHistoryEntry->RequestType) { // Query - case NdisRequestQueryInformation: + case NdisRequestQueryInformation: pOidHistoryEntry->InformationBufferLength = pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength; break; // Set @@ -5808,7 +5808,7 @@ NdisOIDHistoryUpdate( switch (pOidHistoryEntry->RequestType) { // Query - case NdisRequestQueryInformation: + case NdisRequestQueryInformation: PlatformMoveMemory(pOidHistoryEntry->InformationBuffer, pNdisRequest->DATA.QUERY_INFORMATION.InformationBuffer, pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength); break; // Set @@ -5829,7 +5829,7 @@ NdisOIDHistoryUpdate( pOidHistoryEntry->InformationBufferLength = 0; } } - + if( pOidHistoryEntry->InformationBuffer != NULL ) RT_PRINT_DATA(COMP_OID_SET, DBG_TRACE, ("pOidHistoryEntry->InformationBuffer:\n"), pOidHistoryEntry->InformationBuffer, pOidHistoryEntry->InformationBufferLength); @@ -5841,7 +5841,7 @@ NdisOIDHistoryUpdate( NdisReleaseSpinLock(&(pNdisCommon->OidHistorySpinLock)); } }while(FALSE); - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("<==== %s\n", __FUNCTION__)); } @@ -5862,12 +5862,12 @@ N6CReleaseDataFrameQueuedWorkItemCallback( PlatformAcquireSpinLock(pAdapter, RT_BUFFER_SPINLOCK); pNdisCommon->bReleaseNblWaitQueueInProgress = TRUE; PlatformReleaseSpinLock(pAdapter, RT_BUFFER_SPINLOCK); - + while(TRUE) { - + PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); - + // // Wait SendingNetBufferList completed. // @@ -5875,7 +5875,7 @@ N6CReleaseDataFrameQueuedWorkItemCallback( { pDevice->bWaitingSendingNBL = TRUE; PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); - + RT_TRACE(COMP_SEND, DBG_LOUD, ("N6CReleaseDataFrameQueuedWorkItemCallback(): wait SendingNetBufferList...\n")); // Prefast warning C28121: The function 'NdisWaitEvent' is not permitted to be called at the current IRQ level. // Prefast warning C28156: The actual IRQL 2 is inconsistent with the required IRQL 0 @@ -5884,21 +5884,21 @@ N6CReleaseDataFrameQueuedWorkItemCallback( #pragma warning( disable:28156 ) NdisWaitEvent(&(pDevice->evtSendingNBLCompleted), 0); NdisResetEvent(&(pDevice->evtSendingNBLCompleted)); - + PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); } RT_ASSERT(pDevice->SendingNetBufferList == NULL, ("N6CReleaseDataFrameQueuedWorkItemCallback(): SendingNetBufferList(%p) should be NULL!!!\n", pDevice->SendingNetBufferList)); - + // // Remove pending NBLs in wait queue. - // Note that, we must make sure: + // Note that, we must make sure: // 1. SendingNetBufferList is NULL. // 2. No one can call N6SdioSendSingleNetBufferList() now. // 3. All TCB and related resource are completed. // - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); - + PlatformAcquireSpinLock(pAdapter, RT_BUFFER_SPINLOCK); if(N6CIsNblWaitQueueEmpty(pNdisCommon->TxNBLWaitQueue)) { @@ -5937,7 +5937,7 @@ N6CReleaseDataFrameQueuedWorkItemCallback( // -// Description: +// Description: // Timer resource management for SoC off on Win10 Mobile platform // // Assumption: @@ -5960,7 +5960,7 @@ N6CTimerResourceInit( // -// Description: +// Description: // Timer resource management for SoC off on Win10 Mobile platform // // Assumption: @@ -5976,14 +5976,14 @@ N6CTimerResourceInsert( { PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; - + RTInsertTailListWithCnt(&(pPortCommonInfo->TimerResourceList), &(pTimer->Handle.List), &pPortCommonInfo->uNumberOfInsertedTimerRes); RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("N6CTimerResourceInsert(): uNumberOfInsertedTimerRes(%d), Timer: %s\n", pPortCommonInfo->uNumberOfInsertedTimerRes, pTimer->szID)); } // -// Description: +// Description: // Timer resource management for SoC off on Win10 Mobile platform // // Assumption: @@ -6002,42 +6002,42 @@ N6CTimerResourceRemove( PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; PRT_LIST_ENTRY pList = NULL; PRT_TIMER pThisTimer = NULL; - u4Byte uNumberOfTimerHandled = 0; + u4Byte uNumberOfTimerHandled = 0; BOOLEAN bFound = FALSE; - + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + pList = RTGetHeadList(&pPortCommonInfo->TimerResourceList); while(!RTIsListHead(&pPortCommonInfo->TimerResourceList, pList)) { - pThisTimer = (PRT_TIMER) CONTAINING_RECORD(pList, RT_TIMER, Handle.List); + pThisTimer = (PRT_TIMER) CONTAINING_RECORD(pList, RT_TIMER, Handle.List); if(pThisTimer->Handle.NdisTimerHandle == pTimer->Handle.NdisTimerHandle){ - + RTRemoveEntryListWithCnt(pList, &pPortCommonInfo->uNumberOfInsertedTimerRes); bFound = TRUE; - - RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("N6CTimerResourceRemove(): Timer Found! uNumberOfInsertedTimerRes(%d), Timer: %s\n", + + RT_TRACE(COMP_SYSTEM, DBG_TRACE, ("N6CTimerResourceRemove(): Timer Found! uNumberOfInsertedTimerRes(%d), Timer: %s\n", pPortCommonInfo->uNumberOfInsertedTimerRes, pThisTimer->szID)); break; - } + } pList = RTNextEntryList(&pThisTimer->Handle.List); } - + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); RT_ASSERT(bFound, ("N6CTimerResourceRemove(): Fail to remove specific Timer resource(%s)\n", pTimer->szID)); - + return bFound; } // -// Description: -// Timer resource management for SoC off on Win10 Mobile platform, we can use this routine to confirm +// Description: +// Timer resource management for SoC off on Win10 Mobile platform, we can use this routine to confirm // whether all timer resources are released when driver is going to unload or halt. // // Assumption: @@ -6055,31 +6055,31 @@ N6CTimerResourceDump( PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; PRT_LIST_ENTRY pList = NULL; PRT_TIMER pTimer = NULL; - u4Byte uNumberOfTimerHandled = 0; - + u4Byte uNumberOfTimerHandled = 0; + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + pList = RTGetHeadList(&pPortCommonInfo->TimerResourceList); while(!RTIsListHead(&pPortCommonInfo->TimerResourceList, pList)) { pTimer = (PRT_TIMER) CONTAINING_RECORD(pList, RT_TIMER, Handle.List); uNumberOfTimerHandled++; - + RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("N6CTimerResourceDump(): uNumberOfTimerHandled(%d), Timer: %s\n", uNumberOfTimerHandled, pTimer->szID)); - + pList = RTNextEntryList(&pTimer->Handle.List); } RT_ASSERT(uNumberOfTimerHandled == pPortCommonInfo->uNumberOfInsertedTimerRes, ("N6CTimerResourceDump(): uNumberOfTimerHandled is not match!\n")); - + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); } // -// Description: +// Description: // Timer resource management for SoC off on Win10 Mobile platform // // Assumption: @@ -6098,20 +6098,20 @@ N6CTimerResourceAction( PPORT_COMMON_INFO pPortCommonInfo = pAdapter->pPortCommonInfo; PRT_LIST_ENTRY pList = NULL; PRT_TIMER pTimer = NULL; - u4Byte uNumberOfTimerHandled = 0; - - + u4Byte uNumberOfTimerHandled = 0; + + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("--->N6CTimerResourceAction(): Action(%d)\n", Action)); - + pList = RTGetHeadList(&pPortCommonInfo->TimerResourceList); while(!RTIsListHead(&pPortCommonInfo->TimerResourceList, pList)) { pTimer = (PRT_TIMER) CONTAINING_RECORD(pList, RT_TIMER, Handle.List); - uNumberOfTimerHandled++; + uNumberOfTimerHandled++; NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); @@ -6122,16 +6122,16 @@ N6CTimerResourceAction( else{ // TODO: } - + NdisAcquireSpinLock(&(pPortCommonInfo->TimerLock)); - + pList = RTNextEntryList(&pTimer->Handle.List); } RT_ASSERT(uNumberOfTimerHandled == pPortCommonInfo->uNumberOfInsertedTimerRes, ("N6CTimerResourceAction(): uNumberOfTimerHandled is not match!\n")); RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("<---N6CTimerResourceAction(): Action(%d)\n", Action)); - - NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); + + NdisReleaseSpinLock(&(pPortCommonInfo->TimerLock)); } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.h b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.h index 7b29545cf..bf2e1c8e1 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: Ndis6Common.c -// Description: Define data structure, RT_NDIS6_COMMON, to keep NDIS6.x +// Description: Define data structure, RT_NDIS6_COMMON, to keep NDIS6.x // common information and export some common helper functions. // // Author: rcnjko @@ -37,7 +37,7 @@ typedef struct _RT_NDIS_DRIVER_CONTEXT WCHAR RegistryPath[256]; // Keep registry path for adaptors to access common registries }RT_NDIS_DRIVER_CONTEXT, *PRT_NDIS_DRIVER_CONTEXT; -typedef struct _WDI_TXRX_STATISTICS { +typedef struct _WDI_TXRX_STATISTICS { u4Byte numWdiTxDescInit; u4Byte numWdiTxDescDeInit; u4Byte numWdiTxDataSend; @@ -54,7 +54,7 @@ typedef struct _WDI_TXRX_STATISTICS { u4Byte numCheckTxPause; u4Byte numTxResourceAvailable; u4Byte monitorTxPauseReason; - + u4Byte numRxIndicateNBLToUE; u4Byte numRxReturnNBLFromUE; u4Byte numWdiRxStop; @@ -151,7 +151,7 @@ extern WDI_CMD_STATISTICS GLWdiCmdStatistics; {0xA1841308, 0x3541, 0x4FAB, {0xBC, 0x81, 0xF7, 0x15, 0x56, 0xF2, 0x0B, 0x4A}} #define GUID_WLAN_POWER_MODE \ - {0x12BBEBE6, 0x58D6, 0x4636, {0x95, 0xBB, 0x32, 0x17, 0xef, 0x86, 0x7c, 0x1a}} + {0x12BBEBE6, 0x58D6, 0x4636, {0x95, 0xBB, 0x32, 0x17, 0xef, 0x86, 0x7c, 0x1a}} // @@ -175,18 +175,18 @@ typedef struct { // #define IS_STATUS_CODE_SUCCESS(StatusCode) \ (StatusCode == 0 ? TRUE : FALSE) - + // // 070524, rcnjko: // -// MiniportReserved[0]: Reference count. +// MiniportReserved[0]: Reference count. // Initialize as (1 + # of NB) when we start processing the NBL. // Minus 1 at each time NB returned and end of NBL processing. -// The reason to initialized it as (1 + # of NB) is to prevent +// The reason to initialized it as (1 + # of NB) is to prevent // completed NBL before all processing done. // // MiniportReserved[1]: Pointer to the NB to processing. -// Initialize to pointer of first NB in the NBL, +// Initialize to pointer of first NB in the NBL, // and will be advaced to next one when we had performed Scatter/Gather operation. // #define RT_NBL_GET_REF_CNT(_NBL) \ @@ -244,7 +244,7 @@ typedef struct { #define N6C_CANNOT_TX N6SDIO_CANNOT_TX -static DOT11_DATA_RATE_MAPPING_ENTRY N6_Std_abg_DataRateMappingTable[] = +static DOT11_DATA_RATE_MAPPING_ENTRY N6_Std_abg_DataRateMappingTable[] = { {2, 0, 2}, {4, 0, 4}, @@ -359,14 +359,14 @@ typedef struct _N6_INDICATE_STATE_MACHINE // 1. The NDIS6 miniport driver state management is based on the document: // ws-07-0043-v00-all-wlan-driver-ndis6-miniport-driver-state-csscg-070604.vsd // -// 2. Driver is initialized at halted state. -// The state <= MINIPORT_PAUSING cannot Send/Recv packets will be drop, +// 2. Driver is initialized at halted state. +// The state <= MINIPORT_PAUSING cannot Send/Recv packets will be drop, // see N6XXX_CANNOT_TX() and N6XXX_CANNOT_RX(). // -// 3. On NDIS6, shutdown and sleep requests happen -// only if we are in paused state. +// 3. On NDIS6, shutdown and sleep requests happen +// only if we are in paused state. // -// 4. We can add some state between running and pausing, +// 4. We can add some state between running and pausing, // for example, Tx/Rx reseting, and keep packets in these state. // @@ -392,7 +392,7 @@ typedef enum _N6C_MP_DRIVER_STATE #define N6_GET_RX_NBL_POOL(_pAdapter) \ - (GET_RT_SDIO_DEVICE(GetDefaultAdapter(_pAdapter))->RxNetBufferListPool) + (GET_RT_SDIO_DEVICE(GetDefaultAdapter(_pAdapter))->RxNetBufferListPool) // // Supported Auth and Cipher pairs. 2006.10.13, by shien chang. @@ -424,7 +424,7 @@ typedef struct _NIC_PHY_MIB // -// Current IBSS parameters. By Bruce, 2007-08-13. +// Current IBSS parameters. By Bruce, 2007-08-13. // typedef struct _RTL_DOT11_IBSS_PARAMS { @@ -435,9 +435,9 @@ typedef struct _RTL_DOT11_IBSS_PARAMS typedef enum _PLATFORM_NDIS_VERSION{ PLATFORM_NDIS_VERSION_50 = 0x0, - PLATFORM_NDIS_VERSION_51 = 0x1, - PLATFORM_NDIS_VERSION_60 = 0x2, - PLATFORM_NDIS_VERSION_62 = 0x3, + PLATFORM_NDIS_VERSION_51 = 0x1, + PLATFORM_NDIS_VERSION_60 = 0x2, + PLATFORM_NDIS_VERSION_62 = 0x3, }PLATFORM_NDIS_VERSION; // @@ -453,17 +453,17 @@ typedef enum _RT_PENDED_OID_TYPE typedef enum _RT_D0_FILTER_STATE { - RT_D0_FILTER_NONE = 0, // NO fiter entry - RT_D0_FILTER_INIT = 1, // NO buffer packet !! - RT_D0_FILTER_BUFFING = 2, // buffer packet and start timer - RT_D0_FILTER_FLUSHING = 3, // Try to indic or drop Packet + RT_D0_FILTER_NONE = 0, // NO fiter entry + RT_D0_FILTER_INIT = 1, // NO buffer packet !! + RT_D0_FILTER_BUFFING = 2, // buffer packet and start timer + RT_D0_FILTER_FLUSHING = 3, // Try to indic or drop Packet RT_D0_FILTER_MAX } RT_D0_FILTER_STATE, *PRT_D0_FILTER_STATE; typedef enum _RT_OID_HISTORY_STATE { RT_OID_HISTORY_NONE = 0, //Init state - RT_OID_HISTORY_STARTED = 1, + RT_OID_HISTORY_STARTED = 1, RT_OID_HISTORY_PENDING = 2, RT_OID_HISTORY_COMPLETE = 3, RT_OID_HISTORY_UNKNOWN = 4, @@ -505,7 +505,7 @@ typedef enum _RT_RX_STATE typedef enum _RT_UsbSafetySwitch_Bits { //20130620 MH add for VIA USB30 inpipe reset for rx faildue to host stop to send bulk in irp workaround~!.. - RT_UsbSafetySwitch_ViaU3 = BIT0, //set to 1=support VIA USB3.0 workaround. + RT_UsbSafetySwitch_ViaU3 = BIT0, //set to 1=support VIA USB3.0 workaround. RT_UsbSafetySwitch_IrpPendingCount = BIT1, //set to 1=not using Rx IrpPendingCount workaround RT_UsbSafetySwitch_8812_schmitt = BIT2, //set to 1=not using 8812AU schmitt trigger RT_UsbSafetySwitch_8814_schmitt = BIT3 //set to 1=not using 8814AU schmitt trigger @@ -520,7 +520,7 @@ typedef enum _RT_TIMER_RESOURCE_ACTION{ typedef struct _RT_NDIS6_COMMON{ // NDIS miniport adapter handle. - NDIS_HANDLE hNdisAdapter; + NDIS_HANDLE hNdisAdapter; UINT NdisVersion; @@ -539,7 +539,7 @@ typedef struct _RT_NDIS6_COMMON{ // Variables for registry values. // //---------------------------------------------------------------------------- - + // "NetworkAddress" u1Byte NetworkAddress[6]; @@ -561,16 +561,16 @@ typedef struct _RT_NDIS6_COMMON{ u2Byte RegChannelPlan; u1Byte RegRFType; - + // "WirelessMode" - int RegWirelessMode; // Default Wireless Mode for initialization. + int RegWirelessMode; // Default Wireless Mode for initialization. // "HTMode" u1Byte RegHTMode; // "Channel" - int RegChannel; // 2.4G Default channel. - int RegChannel5G; // 5G Default channel. + int RegChannel; // 2.4G Default channel. + int RegChannel5G; // 5G Default channel. // "AntennaDiversityType" , 20120313 added by Kordan. u1Byte AntDivType; @@ -581,21 +581,21 @@ typedef struct _RT_NDIS6_COMMON{ // "Amplifier Type" , 20120827 added by Kordan. u1Byte AmplifierType_2G; u1Byte AmplifierType_5G; - + s1Byte TxBBSwing_2G; s1Byte TxBBSwing_5G; BOOLEAN bTurnOffEfuseMask; u1Byte RFE_Type; BOOLEAN bTFBGA; - BOOLEAN bEfusePriorityAuto; - + BOOLEAN bEfusePriorityAuto; + // For Netgear UI, 2005.01.13, by rcnjko. // "ForcedDataRate" u2Byte RegForcedDataRate; // Force Data Rate. 0: Auto, 0x02: 1M ~ 0x6C: 54M. u2Byte RegForcedBstDataRate; // Force Bst Data Rate. 0: Auto, 0x02: 1M ~ 0x6C: 54M. , 0x80: MCS0 ~ 0x8f: MCS15 - // "WirelessMode4ScanList" - int RegWirelessMode4ScanList; // Wireless Mode used to filter scan list, see enum _WIRELESS_MODE for its definition. + // "WirelessMode4ScanList" + int RegWirelessMode4ScanList; // Wireless Mode used to filter scan list, see enum _WIRELESS_MODE for its definition. // // For 818x UI and WPA Verify, 2004.11.30, by rcnjko. @@ -620,11 +620,11 @@ typedef struct _RT_NDIS6_COMMON{ // "PowerSaveMode" u1Byte RegPowerSaveMode; // Default power-saving mode to confige. - // For WMM Power Save Mode : + // For WMM Power Save Mode : // ACs are trigger/delivery enabled or legacy power save enabled. 2006-06-13 Isaiah u1Byte StaUapsd; u1Byte MaxSPLength; - + // For debugging IBSS beacon behavior. 2005.04.18, by rcnjko. int RegEnableSwBeacon; @@ -646,7 +646,7 @@ typedef struct _RT_NDIS6_COMMON{ // mix mode protection, 20141113 by Gibson int RegProtectionmode; - + // For NdisReadNetworkAddress(). // We shall resotre the network address at mphalt of 8185 for HCT12.0 test. u1Byte CurrentAddress[6];//dot11MacAddress @@ -659,31 +659,31 @@ typedef struct _RT_NDIS6_COMMON{ // Support CCX or not u1Byte RegCcx; // CCX Radio Measurement, 2006.05.15, by rcnjko. - int RegCcxRm; + int RegCcxRm; u2Byte RegCcxOffLineDurUpLimit; u1Byte RegCcxCatasRoamLimit; - + // Update CCX Cell Tx Power BOOLEAN RegCcxUpdateTxCellPwr; // CCX CAC Enable BOOLEAN RegCcxCACEnable; - - //For HW init + + //For HW init BOOLEAN bRegHwParaFile; // For TPC, added by shien chang, 2006.06.29 int RegTxPowerLevel; - + // Antenna Diversity Mechanism, by Isaiah, 2007-01-03 - BOOLEAN bRegSwAntennaDiversityMechanism; - + BOOLEAN bRegSwAntennaDiversityMechanism; + // 070207, rcnjko: 802.11d. BOOLEAN bRegDot11dEnable; // "TurboMode". Added by Roger, 2006.12.07. - int RegTurboModeSelect; - + int RegTurboModeSelect; + // Auto select channel, 2005.12.27, by rcnjko. int RegAutoSelChnl; int RegChnlWeight; // Added by Annie, 2006-07-26. @@ -698,7 +698,7 @@ typedef struct _RT_NDIS6_COMMON{ // "WdsMode", 0: WDS disabled, 1: AP+WDS. u1Byte RegWdsMode; - // "CustomerID", 0: allow EEPROM to determine pMgntInfo->CustomerID, >0: overwrite pMgntInfo->CustomerID. + // "CustomerID", 0: allow EEPROM to determine pMgntInfo->CustomerID, >0: overwrite pMgntInfo->CustomerID. int RegCustomerID; //"RegFragThreshold", 256 ~2432. 2007-03-05 by David @@ -706,25 +706,25 @@ typedef struct _RT_NDIS6_COMMON{ // DM InitialGain control. hpfan 2009.03.31 BOOLEAN bRegDMInitialGain; - + BOOLEAN bRegGpioRfSw; BOOLEAN bRegHwWpsPbc; //---------------------------------------------------------------------------- - // Workaround for HCT 12.0. + // Workaround for HCT 12.0. // //---------------------------------------------------------------------------- BOOLEAN bRegHctTest; BOOLEAN bRegWFDTest; BOOLEAN bRegScanTimeCheck; - - BOOLEAN bRegChaos; - NDIS_802_11_NETWORK_TYPE BeSetNetworkTypeByNDTest; + + BOOLEAN bRegChaos; + NDIS_802_11_NETWORK_TYPE BeSetNetworkTypeByNDTest; BOOLEAN KeepDisconnectFlag; - + BOOLEAN bRegPnpCapabilities; - + BOOLEAN bRegFixedMacAddr; //---------------------------------------------------------------------------- @@ -786,7 +786,7 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegAcNoAck; RT_THREAD TxHandleThread; -#if (RTL8723_SDIO_IO_THREAD_ENABLE || RTL8723_USB_IO_THREAD_ENABLE) +#if (RTL8723_SDIO_IO_THREAD_ENABLE || RTL8723_USB_IO_THREAD_ENABLE) RT_THREAD IOHandleThread; #endif @@ -795,12 +795,12 @@ typedef struct _RT_NDIS6_COMMON{ //1!!!!!!!!!!!!!!!!!!!!!!!!!!! //1//1Attention Please!!!<11n or 8190 specific code should be put below this line> - //1!!!!!!!!!!!!!!!!!!!!!!!!!!! + //1!!!!!!!!!!!!!!!!!!!!!!!!!!! //---------------------------------------------------------------------------- // For 802.11n only function. // - //---------------------------------------------------------------------------- + //---------------------------------------------------------------------------- // For HT Cck rate support, Joseph BOOLEAN bRegHT_EnableCck; @@ -808,7 +808,7 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegBWSetting; BOOLEAN bRegBW40MHzFor2G; BOOLEAN bRegBW40MHzFor5G; - + BOOLEAN bReg11nAdhoc; BOOLEAN bRegIOTBcm256QAM; u1Byte bRegVht24g; @@ -816,18 +816,18 @@ typedef struct _RT_NDIS6_COMMON{ // For AMSDU aggregation, Joseph int RegAMSDU; - int RegAMSDU_MaxSize; - + int RegAMSDU_MaxSize; + int RegHWAMSDU; // For AMPDU aggregation <2006.08.10 Emily> int bRegAMPDUEnable; int RegAMPDU_Factor; int RegMPDU_Density; - + // MIMO Power Save int RegMimoPs; - + // For Rx Reorder Control u1Byte RegRxReorder; u1Byte RegRxReorder_WinSize; @@ -849,13 +849,13 @@ typedef struct _RT_NDIS6_COMMON{ DOT11_SUPPORTED_POWER_LEVELS dot11SupportedPowerLevels; ULONG dot11CurrentTxPowerLevel; - + // PHY list ULONG staDesiredPhyList[NATIVE_802_11_MAX_NUM_PHY_TYPES]; ULONG staDesiredPhyCount; - ULONG ActivePhyId; - - + ULONG ActivePhyId; + + // 802.11d MIB. BOOLEAN dot11MultiDomainCapabilityImplemented; @@ -884,7 +884,7 @@ typedef struct _RT_NDIS6_COMMON{ ULONG NumDot11DesiredBSSIDList; ULONG dot11UnreachableDetectionThreshold; - + // Use group key, 2006.11.06, by shien chang. BOOLEAN dot11UnicastUseGroupEnabled; @@ -892,26 +892,26 @@ typedef struct _RT_NDIS6_COMMON{ // Status indication, 2006.11.15, by shien chang. BOOLEAN bToIndicateScanComplete; - + // New status indication state machine, 2006.11.29, by shien chang. N6_INDICATE_STATE_MACHINE IndicationEngine; //for pend request 20061206 by David /** If the miniport pends a request, the copy is kept here */ - PNDIS_OID_REQUEST PendedRequest; - + PNDIS_OID_REQUEST PendedRequest; + // For Restore N6 unicase , mutilcase encrypt Alg ,CCW DOT11_CIPHER_ALGORITHM RegGroupALg; DOT11_CIPHER_ALGORITHM RegPairwiseAlg; - DOT11_AUTH_ALGORITHM RegAuthalg; + DOT11_AUTH_ALGORITHM RegAuthalg; u1Byte RegRSNADefaultkeybuf[61]; OCTET_STRING RegRSNADefaultkey; u4Byte RegRSNAKeyID; // To avoid explicit scan operation during wakeup auto link stage. BOOLEAN bWakeupAutoLinkInProgressing; - + // Use this flag to check whether indicate roaming start while system resume, by Roger. 2007.11.07. BOOLEAN bDissociateBeforeSleep; @@ -956,13 +956,13 @@ typedef struct _RT_NDIS6_COMMON{ ULONG PCI_BAR0; ULONG PCI_BAR1; UCHAR PCI_InterruptLine; - USHORT PCI_CommandRegister; + USHORT PCI_CommandRegister; u1Byte RegCckPwEnl; // Accept ADDBA Request int bRegAcceptAddbaReq; - + // CCX Vista Context Cisco_CCX_CONTEXT Cisco_CCX_CONTEXT; @@ -1003,15 +1003,15 @@ typedef struct _RT_NDIS6_COMMON{ // Turn on/off Win7 Virtaul Wifi support. BOOLEAN bRegVWifiSupport; - BOOLEAN bRegDMDPMAC0VWifiSupport; + BOOLEAN bRegDMDPMAC0VWifiSupport; u1Byte RegbtHsMode; u1Byte bRegDefaultAntenna; u1Byte RegAntDiv; u1Byte RegAntDetection; - u1Byte bRegUseRxInterruptWorkItem; - + u1Byte bRegUseRxInterruptWorkItem; + // For WoWLAN mode. by tynli. u1Byte RegAPOffloadEnable; u1Byte RegWoWLANLPSLevel; @@ -1024,28 +1024,28 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte bRegNSOffloadEnable; u1Byte RegNLOEnable; u1Byte RegPnpKeepLink; - + BOOLEAN bRegWakeOnMagicPacket; BOOLEAN bRegWakeOnPattern; BOOLEAN bRegWakeOnDisconnect; // Connected standby feature BOOLEAN bRegPacketCoalescing; - + u1Byte RegFSSDetection; - + // BIT0 - 20MHz // BIT1 - 40MHz // BIT2 - 80MHz // BIT3 - 160MHz u1Byte RegShortGISupport; - + u1Byte RegAPTimExtend; u1Byte RegUSBResetTxHang; BOOLEAN bRegVelocity; - // 2010/05/18 MH For GPIO detect timer delay setting. + // 2010/05/18 MH For GPIO detect timer delay setting. u1Byte bRegTimerGPIO; u2Byte bRegGPIODelay; u2Byte bRegGPIOBack; @@ -1056,30 +1056,30 @@ typedef struct _RT_NDIS6_COMMON{ // 2010/08/25 MH Add to support pdn mode switch. u1Byte bRegPDNMode; - // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. + // 2010/09/01 MH According to PM's request, we support dongle selective suspend mode switch. u1Byte bRegDongleSS; - // 2010/09/13 MH According to PM's request, we support different SS power seave level. + // 2010/09/13 MH According to PM's request, we support different SS power seave level. u1Byte bRegSSPwrLvl; // 2011/02/16 MH Add for SS HW radio detect workaround temporarily. u1Byte bRegSSWakeCnt; - // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. + // 2010/12/17 MH Add for RX aggregation mode switch according to TX/RX traffic. u1Byte bRegAggDMEnable; - // 2010/12/31 MH Add for UPHY dynamic chaneg. + // 2010/12/31 MH Add for UPHY dynamic chaneg. u1Byte bRegUPDMEnable; // 2011/07/08 MH Add for different link speed display. - u1Byte bRegLinkSpeedLevel; + u1Byte bRegLinkSpeedLevel; u1Byte RegRSSI2GridMode; - // 2011/07/14 MH Add for rx short cut. + // 2011/07/14 MH Add for rx short cut. u1Byte bRegRxSC; - // 2011/07/15 Sinda Add for tx short cut. + // 2011/07/15 Sinda Add for tx short cut. u1Byte bRegTxSC; // 2011/09/15 MH Add registry for switching packet compete method. @@ -1133,7 +1133,7 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegChannelPlan2GBuf[40]; OCTET_STRING RegChannelPlan5G; u1Byte RegChannelPlan5GBuf[100]; - + u1Byte RegDecryptCustomFile; // 2013/04/16 VincentLan Add to switch Spur Calibration Method @@ -1144,30 +1144,30 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegRfKFreeEnable; - u1Byte RegTxDutyEnable; + u1Byte RegTxDutyEnable; // 2011/11/15 MH Add for user can select different region and map to dedicated power gain offset table. u1Byte RegPwrTblSel; u1Byte RegTxPwrLevel; // 2011/11/15 MH Add for user can select different tx power by rate switch by default value and registry value. - u1Byte RegPwrByRate; - u4Byte RegPwrRaTbl1; - u4Byte RegPwrRaTbl2; - u4Byte RegPwrRaTbl3; - u4Byte RegPwrRaTbl4; - u4Byte RegPwrRaTbl5; - u4Byte RegPwrRaTbl6; - u4Byte RegPwrRaTbl7; - u4Byte RegPwrRaTbl8; - u4Byte RegPwrRaTbl9; - u4Byte RegPwrRaTbl10; - u4Byte RegPwrRaTbl11; - u4Byte RegPwrRaTbl12; - u4Byte RegPwrRaTbl13; - u4Byte RegPwrRaTbl14; - u4Byte RegPwrRaTbl15; - u4Byte RegPwrRaTbl16; + u1Byte RegPwrByRate; + u4Byte RegPwrRaTbl1; + u4Byte RegPwrRaTbl2; + u4Byte RegPwrRaTbl3; + u4Byte RegPwrRaTbl4; + u4Byte RegPwrRaTbl5; + u4Byte RegPwrRaTbl6; + u4Byte RegPwrRaTbl7; + u4Byte RegPwrRaTbl8; + u4Byte RegPwrRaTbl9; + u4Byte RegPwrRaTbl10; + u4Byte RegPwrRaTbl11; + u4Byte RegPwrRaTbl12; + u4Byte RegPwrRaTbl13; + u4Byte RegPwrRaTbl14; + u4Byte RegPwrRaTbl15; + u4Byte RegPwrRaTbl16; BOOLEAN RegSendPacketByTimer; @@ -1178,11 +1178,11 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegEarlymodeEnable; BOOLEAN RegAutoAMPDUBurstModeEnable; u2Byte RegAutoAMPDUBurstModeThreshold; - + u1Byte RegReduceImr; -#if (NEW_EARLY_MODE_ENABLE == 1) +#if (NEW_EARLY_MODE_ENABLE == 1) BOOLEAN RegNewAMPDUBurstModeEnable;//New Earry Mode ctrl for 8814A, add by ylb 20130418 -#endif +#endif u2Byte RegTxHignTPThreshold; u2Byte RegRxHignTPThreshold; @@ -1191,7 +1191,7 @@ typedef struct _RT_NDIS6_COMMON{ BOOLEAN bRegDbgMode; u8Byte RegDbgZone; - + PVOID N6PowerSettingHandle; PVOID N6WLANPowerModeHandle; @@ -1202,20 +1202,20 @@ typedef struct _RT_NDIS6_COMMON{ BOOLEAN bFilterHiddenAP; u4Byte Oidcounter; BOOLEAN bToIndicateNLOScanComplete; - + GUID NetCfgInstanceId; // Read from the registry in initialization. - u1Byte RegPAMode; + u1Byte RegPAMode; //2011.09.23 LukeLee add for path diversity BOOLEAN bPathDivEnable; BOOLEAN bRegBtFwSupport; - // Add TCP offload + // Add TCP offload ULONG RegTCPOffloadMode; - // D0 Rx colse + // D0 Rx colse RT_TIMER D0RxIndicatTimer; RT_LIST_ENTRY D0FilterPktQueue; NDIS_SPIN_LOCK D0FilterPktLock; // For timer synchronization. @@ -1223,7 +1223,7 @@ typedef struct _RT_NDIS6_COMMON{ // 2011/12/08 hpfan Add for Tcp Reorder BOOLEAN bTcpReorderEnable; - + u1Byte bRegUseThreadHandleInterrupt; u1Byte bRegDPCISRTest; @@ -1280,9 +1280,9 @@ typedef struct _RT_NDIS6_COMMON{ BOOLEAN RegFWQC; // 2012/11/28 MH Add for BB team AMPDU test. - u1Byte RegAMfactor; + u1Byte RegAMfactor; u1Byte RegVHTRSec; - + u2Byte RegScanLarge; u2Byte RegScanMiddle; u2Byte RegScanNormal; @@ -1298,7 +1298,7 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegWaitBeforeGoSkipScan; //20130109 Used for Invitation No/After to Pass, with skip scan when Go is connected - u1Byte RegGoSkipScanForWFDTest; + u1Byte RegGoSkipScanForWFDTest; u1Byte RegClientSkipScanForWFDTest; BOOLEAN RegForceGoTxData20MBw; @@ -1308,7 +1308,7 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegTxPwrPercentage; // Default Tx output power percentage. u1Byte RegScanOffloadType; - + // 2013/02/05 MH Add for streamMode switch. u1Byte RegStreamMode; // 2013/02/06 MH Add Transmit power control level for all customer in the future. @@ -1332,23 +1332,23 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte RegSifsThresh; - u1Byte RegFwload; + u1Byte RegFwload; u1Byte RegUsbSafetySwitch; u1Byte RegRspPwr; - u4Byte RegPktIndicate; + u4Byte RegPktIndicate; - BOOLEAN RegClearAMDWakeUpStatus; // zhiyuan add for 88ee Lenovo AMD platform + BOOLEAN RegClearAMDWakeUpStatus; // zhiyuan add for 88ee Lenovo AMD platform - BOOLEAN RegbCustomizedScanPeriod; + BOOLEAN RegbCustomizedScanPeriod; u2Byte RegIntelCustomizedScanPeriod; u2Byte RegAMDCustomizedScanPeriod; - - u2Byte RegDisableBTCoexist; - BOOLEAN RegEnableMA; + u2Byte RegDisableBTCoexist; + + BOOLEAN RegEnableMA; u1Byte RegVhtWeakSecurity; //20130606 MH For passive scan control dynamic switch after meeting with RF/FAE team. @@ -1357,7 +1357,7 @@ typedef struct _RT_NDIS6_COMMON{ BOOLEAN RegIsAMDIOIC; u4Byte RegWmmPage; - u1Byte RegDisableAC; + u1Byte RegDisableAC; u4Byte RegLedInterval; u1Byte Reg8814auEfuse; u1Byte RegValidRFPath; @@ -1390,7 +1390,7 @@ typedef struct _RT_NDIS6_COMMON{ RT_LIST_ENTRY OidHistoryList; NDIS_SPIN_LOCK OidHistorySpinLock; u1Byte OidHistoryCount; - + // SDIO polling interrupt mode BOOLEAN RegSdioPollIntrHandler; u2Byte RegSdioIntrPollingLimit; @@ -1404,7 +1404,7 @@ typedef struct _RT_NDIS6_COMMON{ WDI_BAND_INFO_CONTAINER BandInfo[WDI_802_11_MAX_NUM_BAND_TYPES]; ULONG BandInfoCount; WDI_PHY_INFO_CONTAINER PhyInfo[WDI_802_11_MAX_NUM_PHY_TYPES]; - + //Rx control state is used for port RT_RX_STATE bRxControlState; //Rx data path state is used for adapter @@ -1417,7 +1417,7 @@ typedef struct _RT_NDIS6_COMMON{ u1Byte Reg88EIOTAction; u2Byte RegTxSendAsap; - // MAC Address Randomization + // MAC Address Randomization u1Byte RegSupportMACRandom; // ECSA @@ -1797,7 +1797,7 @@ N6CQueryPhyIdReady( IN PADAPTER Adapter ); -PVOID +PVOID GetTwoPortSharedResource( IN PADAPTER Adapter, IN u1Byte Type_ToGet, @@ -1831,7 +1831,7 @@ N6CReleaseDataFrameQueuedWorkItemCallback( #if WPP_SOFTWARE_TRACE #define RT_TRACE(_Comp, _Level, Fmt) #define RT_TRACE_EX(_Comp, _Level, Fmt) -#define RT_TRACE_MAC(_Comp, _Level, Fmt) +#define RT_TRACE_MAC(_Comp, _Level, Fmt) #define RT_TRACE_F(_Comp, _Level, Fmt) //DoTraceMessage(_Comp, _Level, Fmt) #define RT_ASSERT(_Exp,Fmt) @@ -1880,7 +1880,7 @@ N6CReleaseDataFrameQueuedWorkItemCallback( DbgPrint Fmt; \ ASSERT(FALSE); \ } - + #define PRINT_DATA(_TitleString, _HexData, _HexDataLen) \ { \ char *szTitle = _TitleString; \ @@ -1980,12 +1980,12 @@ N6CReleaseDataFrameQueuedWorkItemCallback( (_UUID).Data1, (_UUID).Data2, (_UUID).Data3, (_UUID).Data4[0], (_UUID).Data4[1], \ (_UUID).Data4[2], (_UUID).Data4[3], (_UUID).Data4[4], (_UUID).Data4[5], (_UUID).Data4[6], (_UUID).Data4[7])); \ } - + #else // of #if DBG // 2009/06/22 MH Allow fre build to print info test. #define RT_TRACE(_Comp, _Level, Fmt) #define RT_TRACE_EX(_Comp, _Level, Fmt) -#define RT_TRACE_MAC(_Comp, _Level, Fmt) +#define RT_TRACE_MAC(_Comp, _Level, Fmt) //#define COMBINE_COMP(_COMP) _COMP #define RT_TRACE_F(_Comp, _Level, Fmt) #define RT_ASSERT(_Exp,Fmt) diff --git a/network/wlan/WDI/PLATFORM/NDIS6/Ndis_OID.h b/network/wlan/WDI/PLATFORM/NDIS6/Ndis_OID.h index 31df3e371..29173cfde 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/Ndis_OID.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/Ndis_OID.h @@ -14,7 +14,7 @@ typedef struct __RT_OID_ENTRY { - u4Byte Oid; + u4Byte Oid; char szID[RT_OID_ENTRY_STRING_SIZE]; // The string name of this OID NDIS_STATUS (*Func)( // The OID handler function @@ -25,5 +25,5 @@ typedef struct __RT_OID_ENTRY }RT_OID_ENTRY, *PRT_OID_ENTRY; - + #endif diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/CppDrvReg.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/CppDrvReg.h index e7e68416a..21fc7d8ac 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/CppDrvReg.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/CppDrvReg.h @@ -36,7 +36,7 @@ #define KNDIS_CHARS_PTFIELD_v3(Char, Field) Char.Ndis40Chars.Ndis30Chars.Field #define KNDIS_CHARS_PTFIELD_v4(Char, Field) Char.Ndis40Chars.Field #define KNDIS_CHARS_PTFIELD_v5(Char, Field) Char.Field - #endif + #endif // v6 (TBD) // ... diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/Mp_Req.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/Mp_Req.c index d250b18e6..af716abd3 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/Mp_Req.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/Mp_Req.c @@ -21,7 +21,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( *BytesRead = 0; *BytesNeeded = 0; - + switch(Oid) { default: @@ -41,7 +41,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG); goto set_oid_exit; - } + } else { *BytesRead = sizeof(ULONG); @@ -56,7 +56,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG); goto set_oid_exit; - } + } else { *BytesRead = sizeof(ULONG); @@ -66,8 +66,8 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( case OID_802_11_BSSID_LIST_SCAN: // - // Note! this OID is also implemented in N6CSetInformation(). - // Since, we had some special requirement (which may not be necessary) for 8187, + // Note! this OID is also implemented in N6CSetInformation(). + // Since, we had some special requirement (which may not be necessary) for 8187, // we implement it here instead of using that in N6CSetInformation(). // 2005.10.16, by rcnjko. // @@ -77,7 +77,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( // Sometimes we also need site survey when chariot running, comment out by Bruce, 2007-06-28. // 061010, by rcnjko. // if(pMgntInfo->LinkDetectInfo.bBusyTraffic && pMgntInfo->bMediaConnect) - //{ + //{ // RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_802_11_BSSID_LIST_SCAN (Immediate return because traffic is busy now)\n")); // goto set_oid_exit; // } @@ -88,20 +88,20 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_802_11_BSSID_LIST_SCAN.\n")); break; - + case OID_RT_SCAN_AVAILABLE_BSSID: // - // Note! this OID is also implemented in N6CSetInformation(). - // Since, we had some special requirement (which may not be necessary) for 8187, + // Note! this OID is also implemented in N6CSetInformation(). + // Since, we had some special requirement (which may not be necessary) for 8187, // we implement it here instead of using that in N6CSetInformation(). // 2005.10.16, by rcnjko. // - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_SCAN_AVAILABLE_BSSID.\n")); // 061010, by rcnjko. if(pMgntInfo->LinkDetectInfo.bBusyTraffic && pMgntInfo->bMediaConnect) - { + { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_SCAN_AVAILABLE_BSSID (Immediate return because traffic is busy now)\n")); goto set_oid_exit; } @@ -109,7 +109,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( MgntActSet_802_11_BSSID_LIST_SCAN( Adapter ); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_SCAN_AVAILABLE_BSSID.\n")); - break; + break; case OID_RT_PRO_READ_REGISTRY: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_PRO_READ_REGISTRY.\n")); @@ -151,7 +151,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*3; - + goto set_oid_exit; } // Get offset, data width, and value to write. @@ -159,7 +159,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulRegDataWidth = *((ULONG*)InformationBuffer+1); ulRegValue = *((ULONG*)InformationBuffer+2); // Write MAC register asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgWriteMacReg(GetDefaultAdapter(Adapter), ulRegOffset, ulRegDataWidth, ulRegValue)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -187,7 +187,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulRegOffset = *((ULONG*)InformationBuffer); ulBeOFDM = *((ULONG*)InformationBuffer+1); // Write BB register asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgReadBbReg(GetDefaultAdapter(Adapter), ulRegOffset, ulBeOFDM)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -208,7 +208,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*3; - + goto set_oid_exit; } // Get offset, type of BB register, and value to write. @@ -216,14 +216,14 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulBeOFDM = *((ULONG*)InformationBuffer+1); ulRegValue = *((ULONG*)InformationBuffer+2); // Write BB register asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgWriteBbReg(GetDefaultAdapter(Adapter), ulRegOffset, ulBeOFDM, ulRegValue)) { Status = NDIS_STATUS_NOT_ACCEPTED; } } RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_PRO_WRITE_BB_REG.\n")); - break; + break; case OID_RT_PRO_RF_READ_REGISTRY: RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_PRO_RF_READ_REGISTRY.\n")); @@ -236,7 +236,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*2; - + goto set_oid_exit; } // Get offset and data width. @@ -272,7 +272,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulRegDataWidth = *((ULONG*)InformationBuffer+1); ulRegValue = *((ULONG*)InformationBuffer+2); // Write RF register asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgWriteRfReg(GetDefaultAdapter(Adapter), ulRegOffset, ulRegDataWidth, ulRegValue)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -292,7 +292,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*2; - + goto set_oid_exit; } // Get offset and data width. @@ -328,7 +328,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulRegDataWidth = *((ULONG*)InformationBuffer+1); ulRegValue = *((ULONG*)InformationBuffer+2); // Write EEPROM asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgWriteEeprom(GetDefaultAdapter(Adapter), ulRegOffset, ulRegDataWidth, ulRegValue)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -348,7 +348,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*2; - + goto set_oid_exit; } // Get offset and data width. @@ -384,7 +384,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulRegDataWidth = *((ULONG*)InformationBuffer+1); ulRegValue = *((ULONG*)InformationBuffer+2); // Write EFUSE asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgWriteEFuse(GetDefaultAdapter(Adapter), ulRegOffset, ulRegDataWidth, ulRegValue)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -395,7 +395,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( case OID_RT_PRO_UPDATE_EFUSE: RT_TRACE(COMP_OID_SET|COMP_EFUSE, DBG_LOUD, ("===> Set OID_RT_PRO_UPDATE_EFUSE.\n")); - + if(!DbgUpdateEFuse(Adapter)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -413,7 +413,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*2; - + goto set_oid_exit; } // Get offset and data width. @@ -449,7 +449,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( ulRegDataWidth = *((ULONG*)InformationBuffer+1); ulRegValue = *((ULONG*)InformationBuffer+2); // Write EFUSE asynchronously. - // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. + // Caller should use OID_RT_PRO8187_WI_POLL to make sure IO is completed. if(!DbgWriteBTEFuse(GetDefaultAdapter(Adapter), ulRegOffset, ulRegDataWidth, ulRegValue)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -460,7 +460,7 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( case OID_RT_PRO_UPDATE_EFUSE_BT: RT_TRACE(COMP_OID_SET|COMP_EFUSE, DBG_LOUD, ("===> Set OID_RT_PRO_UPDATE_EFUSE_BT.\n")); - + if(!DbgUpdateBTEFuse(Adapter)) { Status = NDIS_STATUS_NOT_ACCEPTED; @@ -479,16 +479,16 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( Status = NDIS_STATUS_INVALID_DATA; goto set_oid_exit; } - + pHalData->UsbTxAggDescNum = numValue; - + value32 = PlatformEFIORead4Byte(Adapter, REG_TDECTRL); value32 = value32 & ~(BLK_DESC_NUM_MASK << BLK_DESC_NUM_SHIFT); value32 |= ((pHalData->UsbTxAggDescNum & BLK_DESC_NUM_MASK) << BLK_DESC_NUM_SHIFT); - + PlatformEFIOWrite4Byte(Adapter, REG_TDECTRL, value32); - + } #endif RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_11N_USB_TX_AGGR_NUM.\n")); @@ -498,16 +498,16 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("===> Set OID_RT_PRO_SET_ANTENNA_BB.\n")); { u1Byte antennaIndex; - + // Verify input paramter. if(InformationBufferLength < sizeof(ULONG)*1) { Status = NDIS_STATUS_INVALID_LENGTH; *BytesNeeded = sizeof(ULONG)*1; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_PRO_SET_ANTENNA_BB. return!!\n")); - return Status; + return Status; } - + // Get antenna index. antennaIndex = *((UCHAR*)InformationBuffer); RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_PRO_SET_ANTENNA_BB, antennaIndex(%#x)\n", antennaIndex)); @@ -515,12 +515,12 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( { Status = NDIS_STATUS_NOT_ACCEPTED; } - - // Initialize antenna test + + // Initialize antenna test pMgntInfo->AntennaTest = 1; Adapter->RxStats.PWDBAllCnt = Adapter->RxStats.PWDBAllOldCnt = 0; Adapter->RxStats.RssiCalculateCnt = Adapter->RxStats.RssiOldCalculateCnt = 0; - + Adapter->HalFunc.SetTxAntennaHandler(Adapter, antennaIndex); } RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<=== Set OID_RT_PRO_SET_ANTENNA_BB.\n")); @@ -529,8 +529,8 @@ InterfaceSetInformationHandleCustomizedOriginalMPSetOid( case OID_RT_SDIO_REG_CTRL: { u1Byte SdioRegCtrl = *(pu1Byte)InformationBuffer; - - pDevice->SdioRegDbgCtrl = SdioRegCtrl & SDIO_REG_CTRL_MASK; + + pDevice->SdioRegDbgCtrl = SdioRegCtrl & SDIO_REG_CTRL_MASK; RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Set OID_RT_SDIO_REG_CTRL: SdioRegCtrl(%d)\n", pDevice->SdioRegDbgCtrl)); } break; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c index ee13422e6..7dcbacf57 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.c @@ -10,12 +10,12 @@ typedef struct _SDIO_OUT_CONTEXT SDIO_OUT_CONTEXT, *PSDIO_OUT_CONTEXT; // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -36,7 +36,7 @@ PlatformIOWrite1Byte( u1Byte FwPSState; LARGE_INTEGER StartTime, EndTime; - + if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return; @@ -44,14 +44,14 @@ PlatformIOWrite1Byte( if( pDefaultAdapter->bCtrlPnPTime ) StartTime = KeQueryPerformanceCounter(NULL); - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(DeviceID == WLAN_IOREG_DEVICE_ID) bCmd52Available = pDefaultAdapter->HalFunc.HalSdioIoRegCmd52AvailableHandler(pDefaultAdapter, offset); if ((KeGetCurrentIrql() > PASSIVE_LEVEL) || (GlobalSdioDbg & SDIO_DBG_ASYN_IO)) - { + { #if RTL8723_SDIO_IO_THREAD_ENABLE SdioAsynIOWriteEnqueue(sdiodevice, DeviceID, sdiodevice->SdioFuncNum, 1, (u2Byte)offset, &data); #else @@ -62,14 +62,14 @@ PlatformIOWrite1Byte( { NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); sdiodevice->SyncIoInProgressCount++; - NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); - - + NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); + + //------------------------------------------------------------ // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) { - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { @@ -79,30 +79,30 @@ PlatformIOWrite1Byte( } //------------------------------------------------------------ - if( bCmd52Available && (sdiodevice->IoRegDirectAccess || + if( bCmd52Available && (sdiodevice->IoRegDirectAccess || ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn) ) - { + { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, sdiodevice->SdioFuncNum, - 1, - (ULONG)offset, + 1, + (ULONG)offset, TRUE, - &data); + &data); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 1, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 1, + (ULONG)offset, TRUE, - &data); + &data); } NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); @@ -122,12 +122,12 @@ PlatformIOWrite1Byte( // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -155,7 +155,7 @@ PlatformIOWrite2Byte( if( pDefaultAdapter->bCtrlPnPTime ) StartTime = KeQueryPerformanceCounter(NULL); - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(DeviceID == WLAN_IOREG_DEVICE_ID) bCmd52Available = pDefaultAdapter->HalFunc.HalSdioIoRegCmd52AvailableHandler(pDefaultAdapter, offset); @@ -165,7 +165,7 @@ PlatformIOWrite2Byte( { #if RTL8723_SDIO_IO_THREAD_ENABLE SdioAsynIOWriteEnqueue(sdiodevice, DeviceID, sdiodevice->SdioFuncNum, 2, (u2Byte)offset, &data); -#else +#else SdioAsynIOWrite(sdiodevice, DeviceID, sdiodevice->SdioFuncNum, 2, (u2Byte)offset, &data); #endif } @@ -174,12 +174,12 @@ PlatformIOWrite2Byte( NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); sdiodevice->SyncIoInProgressCount++; NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); - + //------------------------------------------------------------ // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) { - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { @@ -189,30 +189,30 @@ PlatformIOWrite2Byte( } //------------------------------------------------------------ - if( bCmd52Available && (sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( bCmd52Available && (sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn) ) { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, sdiodevice->SdioFuncNum, - 2, - (ULONG)offset, + 2, + (ULONG)offset, TRUE, - &data); + &data); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, sdiodevice->SdioFuncNum, - 2, - (ULONG)offset, + 2, + (ULONG)offset, TRUE, - &data); + &data); } NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); @@ -222,7 +222,7 @@ PlatformIOWrite2Byte( sdiodevice->SyncIoInProgressCount = 0; NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); } - + if( pDefaultAdapter->bCtrlPnPTime ) { EndTime = KeQueryPerformanceCounter(NULL); @@ -231,12 +231,12 @@ PlatformIOWrite2Byte( } // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -256,7 +256,7 @@ PlatformIOWrite4Byte( u1Byte FwPSState; LARGE_INTEGER StartTime, EndTime; - + if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return; @@ -264,7 +264,7 @@ PlatformIOWrite4Byte( if( pDefaultAdapter->bCtrlPnPTime ) StartTime = KeQueryPerformanceCounter(NULL); - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(DeviceID == WLAN_IOREG_DEVICE_ID) bCmd52Available = pDefaultAdapter->HalFunc.HalSdioIoRegCmd52AvailableHandler(pDefaultAdapter, offset); @@ -279,16 +279,16 @@ PlatformIOWrite4Byte( #endif } else - { + { NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); sdiodevice->SyncIoInProgressCount++; NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); - + //------------------------------------------------------------ // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) { - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { @@ -298,34 +298,34 @@ PlatformIOWrite4Byte( } //------------------------------------------------------------ #if (RK_PLATFORM_SUPPORT ==1) - if( bCmd52Available && ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100) || + if( bCmd52Available && ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100) || !bMacPwrCtrlOn) ) #else - if( bCmd52Available && (sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( bCmd52Available && (sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn) ) #endif { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 4, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 4, + (ULONG)offset, TRUE, - &data); + &data); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, sdiodevice->SdioFuncNum, - 4, - (ULONG)offset, + 4, + (ULONG)offset, TRUE, - &data); + &data); } NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); @@ -344,12 +344,12 @@ PlatformIOWrite4Byte( } // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -378,32 +378,32 @@ PlatformIOWriteNByte( if( pDefaultAdapter->bCtrlPnPTime ) StartTime = KeQueryPerformanceCounter(NULL); - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(DeviceID == WLAN_IOREG_DEVICE_ID) bCmd52Available = pDefaultAdapter->HalFunc.HalSdioIoRegCmd52AvailableHandler(pDefaultAdapter, offset); if ((KeGetCurrentIrql() > PASSIVE_LEVEL) || (GlobalSdioDbg & SDIO_DBG_ASYN_IO)) - { - RT_PRINT_DATA(COMP_INIT|COMP_IO, DBG_LOUD, "PlatformIOWriteNByte(): Sync IO Write N byte:\n", + { + RT_PRINT_DATA(COMP_INIT|COMP_IO, DBG_LOUD, "PlatformIOWriteNByte(): Sync IO Write N byte:\n", pdata, count); SdioAsynIOWrite(sdiodevice, DeviceID, sdiodevice->SdioFuncNum, (u2Byte)count, (u2Byte)offset, pdata);// Issue CMD53 Asyn CMD as default. } else { - RT_PRINT_DATA(COMP_INIT|COMP_IO, DBG_LOUD, "PlatformIOWriteNByte(): ASync IO Write N byte:\n", - pdata, count); + RT_PRINT_DATA(COMP_INIT|COMP_IO, DBG_LOUD, "PlatformIOWriteNByte(): ASync IO Write N byte:\n", + pdata, count); NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); sdiodevice->SyncIoInProgressCount++; NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); - + //------------------------------------------------------------ // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) { - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { @@ -413,28 +413,28 @@ PlatformIOWriteNByte( } //------------------------------------------------------------ - if( bCmd52Available && (sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( bCmd52Available && (sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn) ) { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - count, - (ULONG)offset, + sdiodevice->SdioFuncNum, + count, + (ULONG)offset, TRUE, - pdata); + pdata); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - count, - (ULONG)offset, + sdiodevice->SdioFuncNum, + count, + (ULONG)offset, TRUE, pdata); } @@ -456,12 +456,12 @@ PlatformIOWriteNByte( // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -483,56 +483,56 @@ PlatformIOSyncWriteNByte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return; - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(DeviceID == WLAN_IOREG_DEVICE_ID) bCmd52Available = pDefaultAdapter->HalFunc.HalSdioIoRegCmd52AvailableHandler(pDefaultAdapter, offset); - RT_PRINT_DATA(COMP_INIT|COMP_IO, DBG_TRACE, "PlatformIOSyncWriteNByte(): Sync IO Write N byte:\n", + RT_PRINT_DATA(COMP_INIT|COMP_IO, DBG_TRACE, "PlatformIOSyncWriteNByte(): Sync IO Write N byte:\n", pdata, count); #if (RK_PLATFORM_SUPPORT==1) - if( bCmd52Available && ( (count <4) || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( bCmd52Available && ( (count <4) || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn) ) #else - if( bCmd52Available && (sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( bCmd52Available && (sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn) ) #endif - { + { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - count, - (ULONG)offset, + sdiodevice->SdioFuncNum, + count, + (ULONG)offset, TRUE, - pdata); + pdata); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - count, - (ULONG)offset, + sdiodevice->SdioFuncNum, + count, + (ULONG)offset, TRUE, pdata); } - + } // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -569,7 +569,7 @@ PlatformIORead1Byte( if(pDefaultAdapter->bFWReady) { pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); - if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && + if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { RT_TRACE(COMP_POWER, DBG_LOUD, ("CANNOT IO ---> Wake up Hw. PlatformIORead1Byte(): DeviceID=%d, offset=%#X\n", DeviceID, offset)); @@ -577,9 +577,9 @@ PlatformIORead1Byte( } } - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); - if (KeGetCurrentIrql() > PASSIVE_LEVEL) + if (KeGetCurrentIrql() > PASSIVE_LEVEL) { RT_ASSERT(FALSE, ("PlatformIORead1Byte() > PASSIVE_LEVEL is not allowed! DeviceID=%d, offset=%#X\n", DeviceID, offset)); @@ -594,34 +594,34 @@ PlatformIORead1Byte( } else { - if( sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn ) { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 1, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 1, + (ULONG)offset, FALSE, - &Data); + &Data); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 1, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 1, + (ULONG)offset, FALSE, - &Data); - } - + &Data); + } + if(rtstatus != RT_STATUS_SUCCESS) - Data = 0xff; + Data = 0xff; NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); if(sdiodevice->SyncIoInProgressCount>0) @@ -641,12 +641,12 @@ PlatformIORead1Byte( } // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -679,11 +679,11 @@ PlatformIORead2Byte( sdiodevice->SyncIoInProgressCount++; NdisReleaseSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); - // tynli add for 32k. 2011.02.25. + // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) - { + { pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); - if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && + if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { RT_TRACE(COMP_POWER, DBG_LOUD, ("CANNOT IO---> Wake up Hw. PlatformIORead2Byte(): DeviceID=%d, offset=%#X\n", DeviceID, offset)); @@ -691,7 +691,7 @@ PlatformIORead2Byte( } } - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if (KeGetCurrentIrql() > PASSIVE_LEVEL) { @@ -708,34 +708,34 @@ PlatformIORead2Byte( } else { - if( sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn ) { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 2, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 2, + (ULONG)offset, FALSE, - &Data); + &Data); } else { // Use I/O RW extended command as default. rtstatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 2, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 2, + (ULONG)offset, FALSE, &Data); - } - + } + if(rtstatus != RT_STATUS_SUCCESS) - Data = 0xffff; + Data = 0xffff; NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); if(sdiodevice->SyncIoInProgressCount>0) @@ -749,18 +749,18 @@ PlatformIORead2Byte( EndTime = KeQueryPerformanceCounter(NULL); pDefaultAdapter->PnPIOTime.QuadPart += (EndTime.QuadPart - StartTime.QuadPart); } - + return Data; } } // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG I/O Bus Domain(Host), // Host Address Mapping Range is 0x1026_0000~0x1026_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -795,9 +795,9 @@ PlatformIORead4Byte( // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) - { + { pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); - if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && + if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { RT_TRACE(COMP_POWER, DBG_LOUD, ("CANNOT IO---> Wake up Hw. PlatformIORead4Byte(): DeviceID=%d, offset=%#X\n", DeviceID, offset)); @@ -805,7 +805,7 @@ PlatformIORead4Byte( } } - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if (KeGetCurrentIrql() > PASSIVE_LEVEL) { @@ -824,22 +824,22 @@ PlatformIORead4Byte( { #if (RK_PLATFORM_SUPPORT==1) - if( ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn ) #else - if( sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + if( sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn ) #endif { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 4, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 4, + (ULONG)offset, FALSE, - &Data); + &Data); } else { @@ -847,15 +847,15 @@ PlatformIORead4Byte( rtstatus = PlatformSdioCmd53ReadWrite( sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - 4, - (ULONG)offset, + sdiodevice->SdioFuncNum, + 4, + (ULONG)offset, FALSE, &Data); - } - + } + if(rtstatus != RT_STATUS_SUCCESS) - Data = 0xffffffff; + Data = 0xffffffff; NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); if(sdiodevice->SyncIoInProgressCount>0) @@ -869,7 +869,7 @@ PlatformIORead4Byte( EndTime = KeQueryPerformanceCounter(NULL); pDefaultAdapter->PnPIOTime.QuadPart += (EndTime.QuadPart - StartTime.QuadPart); } - + return Data; } } @@ -877,12 +877,12 @@ PlatformIORead4Byte( // -// Description: +// Description: // This routine is exported for SDIO WLAN IOREG or SDIO_LOCAL_DEVICE_ID I/O Bus Domain(Host), // Host Address Mapping Range is 0x1025_0000~0x1025_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2011.03.07, added by Roger. @@ -895,7 +895,7 @@ PlatformIOReadNByte( IN u4Byte count, //data length OUT pu1Byte pBuffer ) -{ +{ PADAPTER pDefaultAdapter = GetDefaultAdapter(((PADAPTER)Adapter)); PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(pDefaultAdapter); BOOLEAN bMacPwrCtrlOn; @@ -920,9 +920,9 @@ PlatformIOReadNByte( // tynli add for 32k. 2011.02.25. if(pDefaultAdapter->bFWReady) - { + { pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); - if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && + if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, offset)) { RT_TRACE(COMP_POWER, DBG_LOUD, ("CANNOT IO---> Wake up Hw. PlatformIOReadNByte(): DeviceID=%d, offset=%#X\n", DeviceID, offset)); @@ -930,27 +930,27 @@ PlatformIOReadNByte( } } - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if (KeGetCurrentIrql() > PASSIVE_LEVEL) - { - RT_ASSERT(FALSE, ("PlatformIOReadNByte() > PASSIVE_LEVEL is not allowed. DeviceID=%d, offset=%#X\n", DeviceID, offset)); + { + RT_ASSERT(FALSE, ("PlatformIOReadNByte() > PASSIVE_LEVEL is not allowed. DeviceID=%d, offset=%#X\n", DeviceID, offset)); PlatformFillMemory((PVOID)pBuffer, count, 0xff); } else - { - if( sdiodevice->IoRegDirectAccess || - ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || + { + if( sdiodevice->IoRegDirectAccess || + ((DeviceID == WLAN_IOREG_DEVICE_ID)&&(offset < 0x100)) || !bMacPwrCtrlOn ) { rtstatus = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - count, - (ULONG)offset, + sdiodevice->SdioFuncNum, + count, + (ULONG)offset, FALSE, - pBuffer); + pBuffer); } else { @@ -958,16 +958,16 @@ PlatformIOReadNByte( rtstatus = PlatformSdioCmd53ReadWrite( sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - count, - (ULONG)offset, + sdiodevice->SdioFuncNum, + count, + (ULONG)offset, FALSE, pBuffer); - } - + } + if(rtstatus != RT_STATUS_SUCCESS) - PlatformFillMemory((PVOID)pBuffer, count, 0xff); - + PlatformFillMemory((PVOID)pBuffer, count, 0xff); + } NdisAcquireSpinLock( &(sdiodevice->SyncIoCntSpinLock) ); @@ -991,9 +991,9 @@ PlatformIOReadNByte( // Retrieve SDIO bus related properties. // // Assumption: -// A Secure Digital (SD) card bus interface has been initialized. +// A Secure Digital (SD) card bus interface has been initialized. // -// 2010.12.09, added by Roger. +// 2010.12.09, added by Roger. // NTSTATUS PlatformSdioGetProperty( @@ -1002,15 +1002,15 @@ PlatformSdioGetProperty( IN PVOID Buffer, IN ULONG Length ) -{ +{ PSDBUS_REQUEST_PACKET psdrp = NULL; NTSTATUS status; - + psdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); if(!psdrp) return STATUS_INSUFFICIENT_RESOURCES; - + psdrp->RequestFunction = SDRF_GET_PROPERTY; psdrp->Parameters.GetSetProperty.Property = Property; psdrp->Parameters.GetSetProperty.Buffer = Buffer; @@ -1034,7 +1034,7 @@ PlatformSdioGetProperty( RT_TRACE(COMP_IO, DBG_SERIOUS, ("PlatformSdioGetProperty(): Fail to get SDIO property!!\n")); } ExFreePoolWithTag(psdrp, '3278'); - + return status; } @@ -1044,9 +1044,9 @@ PlatformSdioGetProperty( // Configure sdio bus related properties. // // Assumption: -// A Secure Digital (SD) card bus interface has been initialized. +// A Secure Digital (SD) card bus interface has been initialized. // -// 2010.12.09, added by Roger. +// 2010.12.09, added by Roger. // NTSTATUS PlatformSdioSetProperty( @@ -1059,7 +1059,7 @@ PlatformSdioSetProperty( PSDBUS_REQUEST_PACKET psdrp = NULL; NTSTATUS status; - + psdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); if(!psdrp) @@ -1088,17 +1088,17 @@ PlatformSdioSetProperty( RT_TRACE(COMP_IO, DBG_SERIOUS, ("PlatformSdioSetProperty(): Fail to set SDIO property!!\n")); } ExFreePoolWithTag(psdrp, '3278'); - + return status; } // -// Description: -// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation -// on specific function number. This command allows the reading of a large number of I/O -// registers with a single command. We should decide what kind of mode(Block or byte count mode) +// Description: +// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation +// on specific function number. This command allows the reading of a large number of I/O +// registers with a single command. We should decide what kind of mode(Block or byte count mode) // to use. // // Assumption: @@ -1110,7 +1110,7 @@ RT_STATUS PlatformSdioCmd53ReadWrite( PRT_SDIO_DEVICE sdiodevice, UCHAR DeviceID, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeFlag, @@ -1124,8 +1124,8 @@ PlatformSdioCmd53ReadWrite( BOOLEAN bMacPwrCtrlOn; u1Byte SDRPErrHandleType; - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); - + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + if(!bMacPwrCtrlOn) { RT_TRACE(COMP_POWER, DBG_WARNING, ("PlatformSdioCmd53ReadWrite(): registerIndex(%#x), power is off return!!\n", registerIndex)); @@ -1137,7 +1137,7 @@ PlatformSdioCmd53ReadWrite( // // We should not use block mode while the number of byte count is less than functional block size. - // Because the length field(Indicates the length, in bytes, of the response data) in DeviceCommand + // Because the length field(Indicates the length, in bytes, of the response data) in DeviceCommand // will be the multiple of block size, which might cause memory corruption while using MDL description. // 2011.03.09. // @@ -1146,10 +1146,10 @@ PlatformSdioCmd53ReadWrite( { //Block mode rtstatus = PlatformSdioCmd53ReadWriteBlock( - sdiodevice, - funcNum, - byteCount, - (ULONG)TargetAddr, + sdiodevice, + funcNum, + byteCount, + (ULONG)TargetAddr, writeFlag, buffer); } @@ -1157,10 +1157,10 @@ PlatformSdioCmd53ReadWrite( { //Byte count mode rtstatus = PlatformSdioCmd53ReadWriteByte( - sdiodevice, - funcNum, - byteCount, - (ULONG)TargetAddr, + sdiodevice, + funcNum, + byteCount, + (ULONG)TargetAddr, writeFlag, buffer); } @@ -1173,18 +1173,18 @@ PlatformSdioCmd53ReadWrite( sdiodevice->FailureCount++; if(sdiodevice->FailureCount == 1) // To avoid infinite loop { - //Check SD_CLK and Power OK - RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd52 R REG 0x0[31:0]: %#x, 0x100[31:0]: %#x,\n", + //Check SD_CLK and Power OK + RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd52 R REG 0x0[31:0]: %#x, 0x100[31:0]: %#x,\n", PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, sdiodevice->SdioFuncNum, 0), PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, sdiodevice->SdioFuncNum, 0x100))); //Check CMD53 and MAC power on - RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 R REG 0x100[31:0]: %#x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 R REG 0x100[31:0]: %#x\n", PlatformEFSdioCmd53Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 0x100))); - + //Check CMD3 Write - PlatformEFSdioCmd53Write4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 0x1b8, 0x12345678); - RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 W => Cmd52 R REG 0x1b8[31:0]: %#x\n", + PlatformEFSdioCmd53Write4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 0x1b8, 0x12345678); + RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 W => Cmd52 R REG 0x1b8[31:0]: %#x\n", PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, sdiodevice->SdioFuncNum, 0x1b8))); } @@ -1216,15 +1216,15 @@ PlatformSdioCmd53ReadWrite( { sdiodevice->FailureCount = 0; } - + return rtstatus; } // -// Description: -// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation -// on specific function number. This command allows the reading of a large number of I/O +// Description: +// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation +// on specific function number. This command allows the reading of a large number of I/O // registers with a single command. // // Assumption: @@ -1235,7 +1235,7 @@ PlatformSdioCmd53ReadWrite( RT_STATUS PlatformSdioCmd53ReadWriteBlock( PRT_SDIO_DEVICE sdiodevice, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeFlag, @@ -1243,37 +1243,37 @@ PlatformSdioCmd53ReadWriteBlock( ) { - PMDL pmdl = NULL; + PMDL pmdl = NULL; RT_STATUS status = RT_STATUS_FAILURE; - u4Byte nBytesForMDL = 0; - + u4Byte nBytesForMDL = 0; + // // We shall keep identity of bytes count between MDL allocation and corresponding SDBUS_REQUEST_PACKET we are going to send. // Revised by Roger, 2014.01.02. // nBytesForMDL = ((byteCount/sdiodevice->SdioFuncBlockSize)+((byteCount%sdiodevice->SdioFuncBlockSize?1:0)))*sdiodevice->SdioFuncBlockSize; - + // // First get a MDL to map the data. We asume the caller passed a buffer to non pageed pool. // - pmdl = IoAllocateMdl((pu1Byte)buffer, nBytesForMDL , FALSE, FALSE, NULL); - + pmdl = IoAllocateMdl((pu1Byte)buffer, nBytesForMDL , FALSE, FALSE, NULL); + if(pmdl == NULL) return status; - + MmBuildMdlForNonPagedPool(pmdl); status = PlatformSdioCmd53ReadWriteMDL( - sdiodevice, - funcNum, + sdiodevice, + funcNum, pmdl, - nBytesForMDL, - (ULONG)registerIndex, + nBytesForMDL, + (ULONG)registerIndex, writeFlag, TRUE); - + if(pmdl){ IoFreeMdl(pmdl); } @@ -1283,9 +1283,9 @@ PlatformSdioCmd53ReadWriteBlock( // -// Description: -// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation -// on specific function number. This command allows the reading of a large number of I/O +// Description: +// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation +// on specific function number. This command allows the reading of a large number of I/O // registers with a single command. // // Assumption: @@ -1296,7 +1296,7 @@ PlatformSdioCmd53ReadWriteBlock( RT_STATUS PlatformSdioCmd53ReadWriteByte( PRT_SDIO_DEVICE sdiodevice, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeFlag, @@ -1305,27 +1305,27 @@ PlatformSdioCmd53ReadWriteByte( { ULONG TotalLength = 0, RwLength = 0; PUCHAR VirtualAddr = (PUCHAR)buffer; - PMDL pmdl = NULL; + PMDL pmdl = NULL; RT_STATUS rtstatus = RT_STATUS_FAILURE; TotalLength = byteCount; // Total length needs to transfer do{ - + RwLength = (TotalLength > sdiodevice->SdioFuncBlockSize) ? sdiodevice->SdioFuncBlockSize : TotalLength; - pmdl = IoAllocateMdl((pu1Byte)VirtualAddr, RwLength , FALSE, FALSE, NULL); - + pmdl = IoAllocateMdl((pu1Byte)VirtualAddr, RwLength , FALSE, FALSE, NULL); + if(pmdl == NULL) break; - + MmBuildMdlForNonPagedPool(pmdl); rtstatus = PlatformSdioCmd53ReadWriteMDL( - sdiodevice, - funcNum, + sdiodevice, + funcNum, pmdl, - RwLength, - (ULONG)registerIndex, + RwLength, + (ULONG)registerIndex, writeFlag, FALSE); @@ -1337,18 +1337,18 @@ PlatformSdioCmd53ReadWriteByte( VirtualAddr += RwLength; TotalLength -= RwLength; - IoFreeMdl(pmdl); - + IoFreeMdl(pmdl); + }while(TotalLength > 0); - + return rtstatus; } // -// Description: -// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation -// on specific function number. This command allows the reading of a large number of I/O +// Description: +// Schedule IO_RW_EXTENDED Command (CMD53) to perform Read Write I/O operation +// on specific function number. This command allows the reading of a large number of I/O // registers with a single command. // // Assumption: @@ -1359,17 +1359,17 @@ PlatformSdioCmd53ReadWriteByte( RT_STATUS PlatformSdioCmd53ReadWriteMDL( PRT_SDIO_DEVICE sdiodevice, - UCHAR funcNum, + UCHAR funcNum, PMDL pmdl, ULONG byteCount, ULONG registerIndex, - BOOLEAN writeToDevice, + BOOLEAN writeToDevice, BOOLEAN blockMode ) { SD_RW_EXTENDED_ARGUMENT extendedArgument; - PSDBUS_REQUEST_PACKET psdrp; + PSDBUS_REQUEST_PACKET psdrp; NTSTATUS status = STATUS_UNSUCCESSFUL ; RT_STATUS rtstatus = RT_STATUS_FAILURE; BOOLEAN bSdBusReqSent = FALSE; @@ -1387,11 +1387,11 @@ PlatformSdioCmd53ReadWriteMDL( SDRT_5}; const SDCMD_DESCRIPTOR ReadIoExtendedDesc = { - SDCMD_IO_RW_EXTENDED, - SDCC_STANDARD, - SDTD_READ, - SDTT_SINGLE_BLOCK, - SDRT_5}; + SDCMD_IO_RW_EXTENDED, + SDCC_STANDARD, + SDTD_READ, + SDTT_SINGLE_BLOCK, + SDRT_5}; LARGE_INTEGER StartTime, EndTime, Freq; u1Byte RecordIndex = sdiodevice->BusTimeRecordIndex; @@ -1400,13 +1400,13 @@ PlatformSdioCmd53ReadWriteMDL( // Return immediately if SDIO can NOT workig properly anymore. // if(RT_SDIO_CANNOT_IO(Adapter)) - return rtstatus; + return rtstatus; // // Now allocate a request packet for the arguments of the command. - // + // psdrp = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); - if(!psdrp) + if(!psdrp) { RT_TRACE(COMP_IO, DBG_SERIOUS, ("PlatformSdioCmd53ReadWriteMDL(): Allocate sdrp fail!!\n")); return rtstatus; @@ -1419,17 +1419,17 @@ PlatformSdioCmd53ReadWriteMDL( // Set up the argument and command descriptor. // extendedArgument.u.AsULONG = 0; - + if (blockMode) { // Block Mode. extendedArgument.u.bits.OpCode = 1; //Increment address - - extendedArgument.u.bits.Count = - (byteCount/sdiodevice->SdioFuncBlockSize) + + + extendedArgument.u.bits.Count = + (byteCount/sdiodevice->SdioFuncBlockSize) + ((byteCount%sdiodevice->SdioFuncBlockSize?1:0)); - - psdrp->Parameters.DeviceCommand.Length = + + psdrp->Parameters.DeviceCommand.Length = (extendedArgument.u.bits.Count)*sdiodevice->SdioFuncBlockSize; } else @@ -1438,17 +1438,17 @@ PlatformSdioCmd53ReadWriteMDL( extendedArgument.u.bits.Count = 0; else extendedArgument.u.bits.Count = byteCount; - + psdrp->Parameters.DeviceCommand.Length = extendedArgument.u.bits.Count; } - + extendedArgument.u.bits.Function = funcNum; - extendedArgument.u.bits.Address = registerIndex; - + extendedArgument.u.bits.Address = registerIndex; + if (writeToDevice) { extendedArgument.u.bits.WriteToDevice = 1; psdrp->Parameters.DeviceCommand.CmdDesc = WriteIoExtendedDesc; - } + } else { psdrp->Parameters.DeviceCommand.CmdDesc = ReadIoExtendedDesc; } @@ -1458,8 +1458,8 @@ PlatformSdioCmd53ReadWriteMDL( extendedArgument.u.bits.BlockMode = blockMode; psdrp->Parameters.DeviceCommand.CmdDesc.TransferType = SDTT_MULTI_BLOCK_NO_CMD12; } - - psdrp->Parameters.DeviceCommand.Argument = extendedArgument.u.AsULONG; + + psdrp->Parameters.DeviceCommand.Argument = extendedArgument.u.AsULONG; // // To make sure that only one request is pending in SDIO Host. @@ -1471,16 +1471,16 @@ PlatformSdioCmd53ReadWriteMDL( while(TRUE) { - - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); - - if(RT_SDIO_CANNOT_IO(Adapter) || + + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + + if(RT_SDIO_CANNOT_IO(Adapter) || (bMacPwrCtrlOn == FALSE)) { // Driver is going to unload or power is going to turn off NdisAcquireSpinLock( &(sdiodevice->IrpSpinLock) ); sdiodevice->SyncIoWaitingCount--; - NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); + NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); RT_TRACE(COMP_IO, DBG_LOUD, ("PlatformSdioCmd53ReadWriteMDL(): Return bMacPwrCtrlOn=%d\n", bMacPwrCtrlOn)); break; } @@ -1504,11 +1504,11 @@ PlatformSdioCmd53ReadWriteMDL( StartTime = KeQueryPerformanceCounter(&Freq); sdiodevice->SdBusSubmitTime[RecordIndex].AbTime = PlatformGetCurrentTime(); //-------------------------------------------- - + // // Send the IO request down to the bus driver // - status = SdBusSubmitRequest(sdiodevice->Sdbusinterface.Context, psdrp); + status = SdBusSubmitRequest(sdiodevice->Sdbusinterface.Context, psdrp); // ----- For IO Working Time Measurement ----- EndTime = KeQueryPerformanceCounter(NULL); @@ -1525,21 +1525,21 @@ PlatformSdioCmd53ReadWriteMDL( if( status == STATUS_IO_TIMEOUT ) { - RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd53ReadWriteMDL(): Offset(%#x) WriteOrRead(%d), STATUS_IO_TIMEOUT\n", + RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd53ReadWriteMDL(): Offset(%#x) WriteOrRead(%d), STATUS_IO_TIMEOUT\n", registerIndex, writeToDevice)); } else if( status == STATUS_CRC_ERROR ) - { - RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd53ReadWriteMDL(): Offset(%#x) WriteOrRead(%d), STATUS_CRC_ERROR\n", - registerIndex, writeToDevice)); + { + RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd53ReadWriteMDL(): Offset(%#x) WriteOrRead(%d), STATUS_CRC_ERROR\n", + registerIndex, writeToDevice)); } else { - RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd53ReadWriteMDL(): Offset(%#x) WriteOrRead(%d) fail!!status(%#x)\n", + RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd53ReadWriteMDL(): Offset(%#x) WriteOrRead(%d) fail!!status(%#x)\n", registerIndex, writeToDevice, status)); // 0xC000009C. STATUS_DEVICE_DATA_ERROR } - + if(GlobalSdioDbg & SDIO_DBG_CMD) { RT_ASSERT(FALSE, ("Fail to submit CMD53 SD Bus request!! status(%x)\n", status)); @@ -1563,7 +1563,7 @@ PlatformSdioCmd53ReadWriteMDL( { break; } - + delay_us(2); } }while(!NT_SUCCESS(status)); @@ -1575,8 +1575,8 @@ PlatformSdioCmd53ReadWriteMDL( bSdBusReqSent = TRUE; break; } - else if(sdiodevice->nIrpPendingCnt == 1) - { // There is one IRP pending in SDIO host driver. + else if(sdiodevice->nIrpPendingCnt == 1) + { // There is one IRP pending in SDIO host driver. KEVENT VoidEvent; LARGE_INTEGER VoidEventWaitTime; @@ -1584,7 +1584,7 @@ PlatformSdioCmd53ReadWriteMDL( RT_TRACE(COMP_DBG, DBG_TRACE, ("***** SynIo is going to wait for a while *****\n")); - // SyncIo Method 2 + // SyncIo Method 2 NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); VoidEventWaitStatus = KeWaitForSingleObject(&sdiodevice->SyncIoEvent, Suspended, KernelMode, FALSE, NULL); if(VoidEventWaitStatus == STATUS_SUCCESS) @@ -1594,11 +1594,11 @@ PlatformSdioCmd53ReadWriteMDL( else { RT_ASSERT(FALSE, ("VoidEventWaitStatus: %x !!!\n", VoidEventWaitStatus)); - } + } } else { // Error condition. - RT_ASSERT(FALSE, ("PlatformSdioCmd52ReadWriteByte(): sdiodevice->nIrpPendingCnt: %d !!!\n", + RT_ASSERT(FALSE, ("PlatformSdioCmd52ReadWriteByte(): sdiodevice->nIrpPendingCnt: %d !!!\n", sdiodevice->nIrpPendingCnt)); NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); break; @@ -1622,7 +1622,7 @@ PlatformSdioCmd53ReadWriteMDL( else { SdioIOComplete(sdiodevice); - + // // We should perform necessary error handling here. // e.g., Surprise removed or driver stopped control flag. @@ -1635,17 +1635,17 @@ PlatformSdioCmd53ReadWriteMDL( } - ExFreePoolWithTag(psdrp, '3278'); + ExFreePoolWithTag(psdrp, '3278'); - return rtstatus; + return rtstatus; } // -// Description: -// Schedule a serial IO_RW_DIRECT Command (CMD52) to read or write bytes within the total 128K -// of register space in any I/O function, including the common I/O area(CIA). This command +// Description: +// Schedule a serial IO_RW_DIRECT Command (CMD52) to read or write bytes within the total 128K +// of register space in any I/O function, including the common I/O area(CIA). This command // reads or writes 1 byte using only 1 command/response pair. // // Assumption: @@ -1657,7 +1657,7 @@ RT_STATUS PlatformSdioCmd52ReadWrite( PRT_SDIO_DEVICE sdiodevice, u1Byte DeviceID, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeToDevice, @@ -1673,30 +1673,30 @@ PlatformSdioCmd52ReadWrite( if(RT_SDIO_CANNOT_IO(pAdapter)) return status; - + if(IS_VENDOR_8723B_D_CUT(pAdapter)) { if((DeviceID == WLAN_IOREG_DEVICE_ID) && (registerIndex == 0x948) && writeToDevice) { - RT_TRACE(COMP_INIT, DBG_WARNING, ("Return ==> PlatformSdioCmd52ReadWrite(): Offset(%#x) WriteOrRead(%d), byteCount(%d), Data[0]=%p\n", registerIndex, writeToDevice, byteCount, (PUCHAR)buffer)); + RT_TRACE(COMP_INIT, DBG_WARNING, ("Return ==> PlatformSdioCmd52ReadWrite(): Offset(%#x) WriteOrRead(%d), byteCount(%d), Data[0]=%p\n", registerIndex, writeToDevice, byteCount, (PUCHAR)buffer)); return status; } } - + if( funcNum == sdiodevice->SdioFuncNum ) - pAdapter->HalFunc.HalSdioGetCmdAddressHandler(pAdapter, DeviceID, registerIndex, &TargetAddr); - - + pAdapter->HalFunc.HalSdioGetCmdAddressHandler(pAdapter, DeviceID, registerIndex, &TargetAddr); + + for( i=0 ; iFailureCount++; if(sdiodevice->FailureCount == 1) // To avoid infinite loop { - //Check SD_CLK and Power OK - RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd52 R REG 0x0[31:0]: %#x, 0x100[31:0]: %#x,\n", + //Check SD_CLK and Power OK + RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd52 R REG 0x0[31:0]: %#x, 0x100[31:0]: %#x,\n", PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, sdiodevice->SdioFuncNum, 0), PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, sdiodevice->SdioFuncNum, 0x100))); - + //Check CMD53 and MAC power on - RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 R REG 0x100[31:0]: %#x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 R REG 0x100[31:0]: %#x\n", PlatformEFSdioCmd53Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 0x100))); - + //Check CMD3 Write - PlatformEFSdioCmd53Write4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 0x1b8, 0x12345678); - RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 W => Cmd52 R REG 0x1b8[31:0]: %#x\n", + PlatformEFSdioCmd53Write4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 0x1b8, 0x12345678); + RT_TRACE(COMP_INIT, DBG_LOUD, ("[DBG] Cmd53 W => Cmd52 R REG 0x1b8[31:0]: %#x\n", PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, sdiodevice->SdioFuncNum, 0x1b8))); } @@ -1743,14 +1743,14 @@ PlatformSdioCmd52ReadWrite( RT_TRACE(COMP_IO, DBG_WARNING, ("0xC1(%#x)\n", PlatformEFSdioLocalCmd52Read2Byte(pAdapter, 0xc1))); RT_TRACE(COMP_IO, DBG_WARNING, ("0x80(%#x)\n", PlatformEFSdioLocalCmd52Read4Byte(pAdapter, 0x80))); pAdapter->bSurpriseRemoved = TRUE; - } - break; + } + break; } else { sdiodevice->FailureCount = 0; } - } + } return status; } @@ -1758,16 +1758,16 @@ PlatformSdioCmd52ReadWrite( // -// Description: -// Schedule IO_RW_DIRECT Command (CMD52) to read or write a single register within the total 128K -// of register space in any I/O function, including the common I/O area(CIA). This command +// Description: +// Schedule IO_RW_DIRECT Command (CMD52) to read or write a single register within the total 128K +// of register space in any I/O function, including the common I/O area(CIA). This command // reads or writes 1 byte using only 1 command/response pair. // // Assumption: // Proper I/O bus domain address should be converted before calling this function. // // 2010.12.14, added by Roger. - // + // RT_STATUS PlatformSdioCmd52ReadWriteByte( PRT_SDIO_DEVICE sdiodevice, @@ -1794,20 +1794,20 @@ PlatformSdioCmd52ReadWriteByte( SDRT_5}; const SDCMD_DESCRIPTOR WriteIoDirectDesc = { - SDCMD_IO_RW_DIRECT, - SDCC_STANDARD, - SDTD_WRITE, - SDTT_CMD_ONLY, + SDCMD_IO_RW_DIRECT, + SDCC_STANDARD, + SDTD_WRITE, + SDTT_CMD_ONLY, SDRT_5}; LARGE_INTEGER StartTime, EndTime, Freq; u1Byte RecordIndex = sdiodevice->BusTimeRecordIndex; - + RtlZeroMemory(&sdrp, sizeof(SDBUS_REQUEST_PACKET)); RtlZeroMemory(&directArgument, sizeof(SD_RW_DIRECT_ARGUMENT)); - - - sdrp.RequestFunction = SDRF_DEVICE_COMMAND; + + + sdrp.RequestFunction = SDRF_DEVICE_COMMAND; directArgument.u.AsULONG = 0; directArgument.u.bits.Address = registerIndex; @@ -1817,11 +1817,11 @@ PlatformSdioCmd52ReadWriteByte( directArgument.u.bits.WriteToDevice = 1; directArgument.u.bits.Data = *data; sdrp.Parameters.DeviceCommand.CmdDesc = WriteIoDirectDesc; - } + } else { sdrp.Parameters.DeviceCommand.CmdDesc = ReadIoDirectDesc; } - + sdrp.Parameters.DeviceCommand.Argument = directArgument.u.AsULONG; // @@ -1834,13 +1834,13 @@ PlatformSdioCmd52ReadWriteByte( while(TRUE) { - + if(RT_SDIO_CANNOT_IO(Adapter)) { // Driver is going to unload. NdisAcquireSpinLock( &(sdiodevice->IrpSpinLock) ); sdiodevice->SyncIoWaitingCount--; - NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); + NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); break; } @@ -1855,14 +1855,14 @@ PlatformSdioCmd52ReadWriteByte( RetryCnt = 0; SDRPErrHandleType = HAL_GetSDRPErrorHandlingType(Adapter, registerIndex); - + do { // ----- For IO Working Time Measurement ----- StartTime = KeQueryPerformanceCounter(&Freq); sdiodevice->SdBusSubmitTime[RecordIndex].AbTime = PlatformGetCurrentTime(); //-------------------------------------------- - + // // Send the IO request down to the bus driver // @@ -1883,20 +1883,20 @@ PlatformSdioCmd52ReadWriteByte( if( status == STATUS_IO_TIMEOUT ) { - RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd52ReadWriteByte(): registerIndex(%#x) WriteOrRead(%d) STATUS_IO_TIMEOUT\n", + RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd52ReadWriteByte(): registerIndex(%#x) WriteOrRead(%d) STATUS_IO_TIMEOUT\n", registerIndex, writeToDevice)); } else if( status == STATUS_CRC_ERROR ) { - RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd52ReadWriteByte(): registerIndex(%#x) WriteOrRead(%d) STATUS_CRC_ERROR\n", + RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd52ReadWriteByte(): registerIndex(%#x) WriteOrRead(%d) STATUS_CRC_ERROR\n", registerIndex, writeToDevice)); } else { - RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd52ReadWriteByte(): Offset(%#x) WriteOrRead(%d) fail!!status(%#x)\n", + RT_TRACE(COMP_IO, DBG_WARNING, ("PlatformSdioCmd52ReadWriteByte(): Offset(%#x) WriteOrRead(%d) fail!!status(%#x)\n", registerIndex, writeToDevice, status)); } - + if(GlobalSdioDbg & SDIO_DBG_CMD) { RT_ASSERT(FALSE, ("Fail to submit CMD52 SD Bus request!! status(%x)\n", status)); @@ -1911,33 +1911,33 @@ PlatformSdioCmd52ReadWriteByte( { break; } - + delay_us(2); } }while(!NT_SUCCESS(status)); - + NdisAcquireSpinLock( &(sdiodevice->IrpSpinLock) ); RT_SDIO_DEC_CMD_REF(sdiodevice); NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); bSdBusReqSent = TRUE; - + if (NT_SUCCESS(status) && !writeToDevice) { *data = sdrp.ResponseData.AsUCHAR[0]; } break; } - else if(sdiodevice->nIrpPendingCnt == 1) - { // There is one IRP pending in SDIO host driver. - + else if(sdiodevice->nIrpPendingCnt == 1) + { // There is one IRP pending in SDIO host driver. + KEVENT VoidEvent; LARGE_INTEGER VoidEventWaitTime; NTSTATUS VoidEventWaitStatus; RT_TRACE(COMP_DBG, DBG_TRACE, ("***** SynIo is going to wait for a while *****\n")); - // SyncIo Method 2 + // SyncIo Method 2 NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); VoidEventWaitStatus = KeWaitForSingleObject(&sdiodevice->SyncIoEvent, Suspended, KernelMode, FALSE, NULL); if(VoidEventWaitStatus == STATUS_SUCCESS) @@ -1947,17 +1947,17 @@ PlatformSdioCmd52ReadWriteByte( else { RT_ASSERT(FALSE, ("VoidEventWaitStatus: %x !!!\n", VoidEventWaitStatus)); - } + } } else { // Error condition. - RT_ASSERT(FALSE, ("PlatformSdioCmd52ReadWriteByte(): sdiodevice->nIrpPendingCnt: %d !!!\n", + RT_ASSERT(FALSE, ("PlatformSdioCmd52ReadWriteByte(): sdiodevice->nIrpPendingCnt: %d !!!\n", sdiodevice->nIrpPendingCnt)); NdisReleaseSpinLock( &(sdiodevice->IrpSpinLock) ); break; } } - + if( bSdBusReqSent == TRUE ) { NdisAcquireSpinLock( &(sdiodevice->IrpSpinLock) ); @@ -1975,7 +1975,7 @@ PlatformSdioCmd52ReadWriteByte( else { SdioIOComplete(sdiodevice); - + // // We should perform necessary error handling here. // e.g., Surprise removed or driver stopped control flag. @@ -1984,19 +1984,19 @@ PlatformSdioCmd52ReadWriteByte( } } - + return rtstatus; } // -// Description: +// Description: // This routine is exported for specific I/O Bus Domain(Host) and Device ID. // Host Address Mapping Range is 0x1025_0000~0x1027_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // PASSIVE_LEVEL // @@ -2018,34 +2018,34 @@ PlatformSdioCmd52Read1Byte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return 0xff; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) - { + if (KeGetCurrentIrql() > PASSIVE_LEVEL) + { RT_ASSERT(FALSE, ("PlatformSdioCmd52Read1Byte() in PASSIVE_LEVEL is not allowed!!!\n")); - return 0xff; + return 0xff; } else { status = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - FuncNum, - 1, - (ULONG)offset, + FuncNum, + 1, + (ULONG)offset, FALSE, - &Data); + &Data); } return Data; - + } // -// Description: +// Description: // This routine is exported for specific I/O Bus Domain(Host) and Device ID. // Host Address Mapping Range is 0x1025_0000~0x1027_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -2066,33 +2066,33 @@ PlatformSdioCmd52Read2Byte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return 0xffff; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) + if (KeGetCurrentIrql() > PASSIVE_LEVEL) { - RT_ASSERT(FALSE, ("PlatformSdioCmd52Read2Byte() in PASSIVE_LEVEL is not allowed!!!\n")); + RT_ASSERT(FALSE, ("PlatformSdioCmd52Read2Byte() in PASSIVE_LEVEL is not allowed!!!\n")); } else - { + { status = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - FuncNum, - 2, - (ULONG)offset, + FuncNum, + 2, + (ULONG)offset, FALSE, - &Data); + &Data); } return Data; - + } // -// Description: +// Description: // This routine is exported for specific I/O Bus Domain(Host) and Device ID. // Host Address Mapping Range is 0x1025_0000~0x1027_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // Called in PASSIVE_LEVEL // @@ -2114,33 +2114,33 @@ PlatformSdioCmd52Read4Byte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return 0xffffffff; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) - { - RT_ASSERT(FALSE, ("PlatformSdioCmd52Read4Byte() in PASSIVE_LEVEL is not allowed!!!\n")); + if (KeGetCurrentIrql() > PASSIVE_LEVEL) + { + RT_ASSERT(FALSE, ("PlatformSdioCmd52Read4Byte() in PASSIVE_LEVEL is not allowed!!!\n")); } else { status = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - FuncNum, - 4, - (ULONG)offset, + FuncNum, + 4, + (ULONG)offset, FALSE, - &Data); + &Data); } return Data; - + } // -// Description: +// Description: // This routine is exported for specific I/O Bus Domain(Host) and Device ID. // Host Address Mapping Range is 0x1025_0000~0x1027_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // PASSIVE_LEVEL // @@ -2162,18 +2162,18 @@ PlatformSdioCmd52Write1Byte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) - { - RT_ASSERT(FALSE, ("PlatformSdioCmd52Write1Byte() in PASSIVE_LEVEL is not allowed!!!\n")); + if (KeGetCurrentIrql() > PASSIVE_LEVEL) + { + RT_ASSERT(FALSE, ("PlatformSdioCmd52Write1Byte() in PASSIVE_LEVEL is not allowed!!!\n")); } else { status = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - FuncNum, - 1, - (ULONG)offset, + FuncNum, + 1, + (ULONG)offset, TRUE, &data); } @@ -2181,12 +2181,12 @@ PlatformSdioCmd52Write1Byte( // -// Description: +// Description: // This routine is exported for specific I/O Bus Domain(Host) and Device ID. // Host Address Mapping Range is 0x1025_0000~0x1027_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // // 2010.12.10, added by Roger. @@ -2207,31 +2207,31 @@ PlatformSdioCmd52Write2Byte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) - { - RT_ASSERT(FALSE, ("PlatformSdioCmd52Write2Byte() in PASSIVE_LEVEL is not allowed!!!\n")); + if (KeGetCurrentIrql() > PASSIVE_LEVEL) + { + RT_ASSERT(FALSE, ("PlatformSdioCmd52Write2Byte() in PASSIVE_LEVEL is not allowed!!!\n")); } else { status = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - FuncNum, - 2, - (ULONG)offset, + FuncNum, + 2, + (ULONG)offset, TRUE, &data); } } - + // -// Description: +// Description: // This routine is exported for specific I/O Bus Domain(Host) and Device ID. // Host Address Mapping Range is 0x1025_0000~0x1027_FFFF. // // Assumption: -// Proper I/O bus domain address should be converted before calling any +// Proper I/O bus domain address should be converted before calling any // IO_RW_DIRECT or IO_RW_EXTENDED Commands. // PASSIVE_LEVEL // @@ -2253,18 +2253,18 @@ PlatformSdioCmd52Write4Byte( if(RT_SDIO_CANNOT_IO(pDefaultAdapter)) return; - if (KeGetCurrentIrql() > PASSIVE_LEVEL) - { - RT_ASSERT(FALSE, ("PlatformSdioCmd52Write4Byte() in PASSIVE_LEVEL is not allowed!!!\n")); + if (KeGetCurrentIrql() > PASSIVE_LEVEL) + { + RT_ASSERT(FALSE, ("PlatformSdioCmd52Write4Byte() in PASSIVE_LEVEL is not allowed!!!\n")); } else { status = PlatformSdioCmd52ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - FuncNum, - 4, - (ULONG)offset, + FuncNum, + 4, + (ULONG)offset, TRUE, &data); } @@ -2286,7 +2286,7 @@ PlatformAllocateSharedMemory( if(pSharedMemory->VirtualAddress==NULL) return RT_STATUS_FAILURE; - + pSharedMemory->Length=length; NdisZeroMemory(pSharedMemory->VirtualAddress,length); @@ -2305,7 +2305,7 @@ PlatformFreeSharedMemory( return; PlatformFreeMemory( - pSharedMemory->VirtualAddress, + pSharedMemory->VirtualAddress, pSharedMemory->Length); pSharedMemory->VirtualAddress=NULL; @@ -2334,7 +2334,7 @@ PlatformAllocateAlignedSharedMemory( Adapter, &pAlignedSharedMemory->OriginalSharedMemory, length); - + if(status==RT_STATUS_SUCCESS) { pAlignedSharedMemory->PhysicalAddressHigh=pAlignedSharedMemory->OriginalSharedMemory.PhysicalAddressHigh; @@ -2345,7 +2345,7 @@ PlatformAllocateAlignedSharedMemory( } else pAlignedSharedMemory->VirtualAddress=NULL; - + return status; } @@ -2379,7 +2379,7 @@ PlatformIndicateMediaStatus( NDIS_LINK_STATE LinkState; // - // We DON'T indicate media status accroding to + // We DON'T indicate media status accroding to // document Native 802.11 Wireless Lan, // section General Connection Operation Guidelines. // 2007.08.06, by shien chang. @@ -2390,7 +2390,7 @@ PlatformIndicateMediaStatus( NDIS_OBJECT_TYPE_DEFAULT, NDIS_LINK_STATE_REVISION_1, sizeof(NDIS_LINK_STATE)); - + if( mstatus == RT_MEDIA_CONNECT ) { LinkState.MediaConnectState = MediaConnectStateConnected; @@ -2403,15 +2403,15 @@ PlatformIndicateMediaStatus( } LinkState.MediaDuplexState = MediaDuplexStateHalf; - LinkState.RcvLinkSpeed = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter , pMgntInfo->bForcedShowRxRate, TRUE)/2)*1000000; - LinkState.XmitLinkSpeed = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter , pMgntInfo->bForcedShowRxRate, FALSE)/2)*1000000; + LinkState.RcvLinkSpeed = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter , pMgntInfo->bForcedShowRxRate, TRUE)/2)*1000000; + LinkState.XmitLinkSpeed = (MgntActQuery_RT_11N_USER_SHOW_RATES(pAdapter , pMgntInfo->bForcedShowRxRate, FALSE)/2)*1000000; //RT_TRACE(COMP_INDIC, DBG_LOUD, ("PlatformIndicateMediaStatus %d\n",LinkState.XmitLinkSpeed)); - + LinkState.PauseFunctions = NdisPauseFunctionsUnsupported; //LinkState.AutoNegotiationFlags = NDIS_LINK_STATE_DUPLEX_AUTO_NEGOTIATED; LinkState.AutoNegotiationFlags = NDIS_LINK_STATE_RCV_LINK_SPEED_AUTO_NEGOTIATED ; - + N6IndicateStatus( pAdapter, NDIS_STATUS_LINK_STATE, @@ -2426,14 +2426,14 @@ PlatformIndicateMediaStatus( NTSTATUS SdioAsynIORead( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u2Byte Count, u2Byte Index ) { - PIO_STACK_LOCATION pNextStack; - NTSTATUS NtStatus; - PIRP pIrp; + PIO_STACK_LOCATION pNextStack; + NTSTATUS NtStatus; + PIRP pIrp; RT_ASSERT(FALSE, ("SdioAsynIORead()!!!\n")); @@ -2447,19 +2447,19 @@ SdioAsynIORead( // NTSTATUS IssueIrpForAsynSdioIOWrite( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u2Byte Count, u4Byte Index, PVOID pOutRegisterData ) { - PIRP pIrp = NULL; - PMDL pmdl = NULL; - PSDBUS_REQUEST_PACKET psdrp = NULL; + PIRP pIrp = NULL; + PMDL pmdl = NULL; + PSDBUS_REQUEST_PACKET psdrp = NULL; SD_RW_EXTENDED_ARGUMENT extendedArgument; - PIO_STACK_LOCATION pNextStack; - NTSTATUS NtStatus = STATUS_SUCCESS; - + PIO_STACK_LOCATION pNextStack; + NTSTATUS NtStatus = STATUS_SUCCESS; + const SDCMD_DESCRIPTOR WriteIoExtendedDesc = { SDCMD_IO_RW_EXTENDED, SDCC_STANDARD, @@ -2476,7 +2476,7 @@ IssueIrpForAsynSdioIOWrite( pmdl = device->pAsynIoWriteMDL; RtlZeroMemory(psdrp, sizeof(SDBUS_REQUEST_PACKET)); - + RT_ASSERT(device->bAsynIoWritePending == FALSE, ("IssueIrpForAsynIOWrite(): bAsynIoWritePending: %x !!!", device->bAsynIoWritePending)); device->bAsynIoWritePending = TRUE; @@ -2491,7 +2491,7 @@ IssueIrpForAsynSdioIOWrite( // Allocate IRP // pIrp = IoAllocateIrp(device->NextDeviceStackSize, FALSE); - if(pIrp == NULL) + if(pIrp == NULL) { NdisReleaseSpinLock( &(device->IrpSpinLock) ); return STATUS_INSUFFICIENT_RESOURCES; @@ -2503,21 +2503,21 @@ IssueIrpForAsynSdioIOWrite( // psdrp->RequestFunction = SDRF_DEVICE_COMMAND; psdrp->Parameters.DeviceCommand.CmdDesc = WriteIoExtendedDesc; - psdrp->Parameters.DeviceCommand.Length = Count; - + psdrp->Parameters.DeviceCommand.Length = Count; + extendedArgument.u.AsULONG = 0; extendedArgument.u.bits.Count = Count; extendedArgument.u.bits.Address = Index; extendedArgument.u.bits.OpCode = 1; extendedArgument.u.bits.Function = device->SdioFuncNum; extendedArgument.u.bits.WriteToDevice = TRUE; - + pNextStack = IoGetNextIrpStackLocation(pIrp); RT_ASSERT(pNextStack != NULL, ("IssueIrpForAsynIOWrite(): pNextStack should not be NULL!!!\n")); pNextStack->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL; pNextStack->Parameters.DeviceIoControl.IoControlCode = IOCTL_SD_SUBMIT_REQUEST; - pNextStack->Parameters.DeviceIoControl.Type3InputBuffer = psdrp; + pNextStack->Parameters.DeviceIoControl.Type3InputBuffer = psdrp; pNextStack->Parameters.DeviceIoControl.OutputBufferLength = Count; psdrp->Parameters.DeviceCommand.Argument = extendedArgument.u.AsULONG; @@ -2526,44 +2526,44 @@ IssueIrpForAsynSdioIOWrite( device->pAsynIoWriteIrp = pIrp; NdisReleaseSpinLock( &(device->IrpSpinLock) ); - + // // Sends an asynchronous Secure Digital (SD) request to the bus driver interface. - // + // NtStatus = SdBusSubmitRequestAsync ( device->Sdbusinterface.Context, psdrp, pIrp, &SdioAsynIOWriteComplete, - (PVOID)device); + (PVOID)device); + + if( NtStatus != STATUS_PENDING ) + { - if( NtStatus != STATUS_PENDING ) - { - // // We should handle other SD Bus error status here to prevent SD Bus halted issue. // 2010.12.30. // - RT_TRACE(COMP_IO, DBG_SERIOUS, ("IssueIrpForAsynIOWrite(): SdBusSubmitRequestAsync failed!!! (0x%X)\n", NtStatus)); - } - + RT_TRACE(COMP_IO, DBG_SERIOUS, ("IssueIrpForAsynIOWrite(): SdBusSubmitRequestAsync failed!!! (0x%X)\n", NtStatus)); + } + return NtStatus; } #if RTL8723_SDIO_IO_THREAD_ENABLE -// -// Description: -// This routine just inserts the asynchronous IO Write Block(AWB) in busy queue, and then the AWB will be removed +// +// Description: +// This routine just inserts the asynchronous IO Write Block(AWB) in busy queue, and then the AWB will be removed // and perform corresponding IO operation in specific IO processing thread. // // 2011.06.23, created by Roger. // VOID SdioAsynIOWriteEnqueue( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u1Byte DeviceID, - UCHAR FuncNum, + UCHAR FuncNum, u2Byte Count, u4Byte Index, PVOID pOutRegisterData @@ -2572,28 +2572,28 @@ SdioAsynIOWriteEnqueue( PRT_AWB pAwb = NULL; u4Byte TargetAddr = Index; PADAPTER pAdapter = device->pAdapter; - NTSTATUS NtStatus = STATUS_SUCCESS; + NTSTATUS NtStatus = STATUS_SUCCESS; BOOLEAN bMacPwrCtrlOn = FALSE; BOOLEAN bIoWriteEnqueue = FALSE; - + if(RT_SDIO_CANNOT_IO(pAdapter)) - return; + return; - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(!bMacPwrCtrlOn) { RT_TRACE(COMP_IO, DBG_WARNING, ("SdioAsynIOWriteEnqueue(): power is off return!!\n")); return; } - + PlatformAcquireSpinLock(pAdapter, RT_AWB_SPINLOCK); - - if(!RTIsListEmpty( &(device->AwbIdleQueue) )) + + if(!RTIsListEmpty( &(device->AwbIdleQueue) )) { pAwb = (PRT_AWB)RTRemoveHeadListWithCnt( &(device->AwbIdleQueue), &(device->NumIdleAwb)); - + if(Count <= MAX_AWB_DATA_SIZE) { pAwb->Offset = TargetAddr; @@ -2603,11 +2603,11 @@ SdioAsynIOWriteEnqueue( PlatformMoveMemory((PVOID)(pAwb->DataBuf), pOutRegisterData, Count); RTInsertTailListWithCnt(&(device->AwbWaitQueue), &(pAwb->List), &(device->NumWaitAwb)); bIoWriteEnqueue = TRUE; - + RT_TRACE(COMP_IO, DBG_TRACE, ("SdioAsynIOWriteEnqueue(): Offset(%#x), ByteCnt(%#x), NumIdleAwb(%d)\n", pAwb->Offset, pAwb->ByteCnt, device->NumIdleAwb)); - RT_PRINT_DATA(COMP_IO, DBG_TRACE, "SdioAsynIOWriteEnqueue(): Buffer:\n", + RT_PRINT_DATA(COMP_IO, DBG_TRACE, "SdioAsynIOWriteEnqueue(): Buffer:\n", pAwb->DataBuf, pAwb->ByteCnt); - } + } else { RT_ASSERT(FALSE, ("SdioAsynIOWriteEnqueue(): Invalid data size: %d for AWB, so this AsynIoWrite will be discard!!!\n", Count)); @@ -2617,7 +2617,7 @@ SdioAsynIOWriteEnqueue( } else { - RT_ASSERT(FALSE, ("SdioAsynIOWriteEnqueue(): No AWB in AwbIdleQueue NumIdleAwb(%d), so this AsynIoWrite will be discard!!!\n", + RT_ASSERT(FALSE, ("SdioAsynIOWriteEnqueue(): No AWB in AwbIdleQueue NumIdleAwb(%d), so this AsynIoWrite will be discard!!!\n", device->NumIdleAwb)); } @@ -2632,16 +2632,16 @@ SdioAsynIOWriteEnqueue( #endif // -// Description: +// Description: // This routine performs asynchronous IO Write operation in DISPATCH_LEVLEL. // // 2011.01.17, created by Roger. // NTSTATUS SdioAsynIOWrite( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u1Byte DeviceID, - UCHAR FuncNum, + UCHAR FuncNum, u2Byte Count, u4Byte Index, PVOID pOutRegisterData @@ -2649,15 +2649,15 @@ SdioAsynIOWrite( { u4Byte TargetAddr = Index; PADAPTER pAdapter = device->pAdapter; - NTSTATUS NtStatus = STATUS_SUCCESS; + NTSTATUS NtStatus = STATUS_SUCCESS; BOOLEAN bMacPwrCtrlOn; u1Byte FwPSState; if(RT_SDIO_CANNOT_IO(pAdapter)) - return NtStatus; + return NtStatus; - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(!bMacPwrCtrlOn) { @@ -2666,9 +2666,9 @@ SdioAsynIOWrite( } if(pAdapter->bFWReady) - { + { pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_FW_PS_STATE, &FwPSState); - if(IS_IN_LOW_POWER_STATE(pAdapter, FwPSState) && + if(IS_IN_LOW_POWER_STATE(pAdapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(DeviceID, Index)) { RT_TRACE(COMP_POWER, DBG_LOUD, ("Return----- SdioAsynIOWrite(): %#X\n", Index)); @@ -2692,19 +2692,19 @@ SdioAsynIOWrite( // Handle the failed if IssueIrpForAsynIOWrite failed. } - else if(device->nIrpPendingCnt == 1) - { // There is one IRP pending in SDIO host driver. + else if(device->nIrpPendingCnt == 1) + { // There is one IRP pending in SDIO host driver. PRT_AWB pAwb; NdisReleaseSpinLock( &(device->IrpSpinLock) ); - + RT_TRACE(COMP_DBG, DBG_TRACE, ("***** AsynIoWrite should be inserted to queue *****\n")); PlatformAcquireSpinLock(pAdapter, RT_AWB_SPINLOCK); - if(!RTIsListEmpty( &(device->AwbIdleQueue) )) + if(!RTIsListEmpty( &(device->AwbIdleQueue) )) { pAwb = (PRT_AWB)RTRemoveHeadListWithCnt( &(device->AwbIdleQueue), &(device->NumIdleAwb)); - + if(Count <= MAX_AWB_DATA_SIZE) { pAwb->Offset = TargetAddr; @@ -2752,7 +2752,7 @@ SdioIOComplete( //RT_TRACE(COMP_DBG, DBG_TRACE, ("---> SdioIOComplete()\n")); - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); NdisAcquireSpinLock( &(device->IrpSpinLock) ); @@ -2761,17 +2761,17 @@ SdioIOComplete( if(device->nIrpPendingCnt == 0) { // No IRP pending in SDIO host driver. - + if((pAdapter->bDriverStopped == FALSE) && bMacPwrCtrlOn) { #if RTL8723_SDIO_IO_THREAD_ENABLE if(0) #else if( !RTIsListEmpty( &(device->AwbWaitQueue) ) ) -#endif +#endif { // Handle the request in AsynIoWriteWaitQ. PRT_AWB pAwb; - NTSTATUS NtStatus; + NTSTATUS NtStatus; device->nIrpPendingCnt++; NdisReleaseSpinLock( &(device->IrpSpinLock) ); @@ -2788,7 +2788,7 @@ SdioIOComplete( ReturnSdioAWB(device, pAwb); PlatformReleaseSpinLock(pAdapter, RT_AWB_SPINLOCK); } - // SyncIo Method 2. + // SyncIo Method 2. else if(device->SyncIoWaitingCount>0) { // If there is workitem waiting. RT_TRACE(COMP_DBG, DBG_TRACE,("SdioIOComplete(): there is workitem is waiting...\n")); @@ -2808,14 +2808,14 @@ SdioIOComplete( while( !RTIsListEmpty(&(device->AwbWaitQueue)) && !bMacPwrCtrlOn) { PRT_AWB pAwb; - - RT_TRACE(COMP_INIT|COMP_IO|COMP_SEND, DBG_WARNING, ("SdioIOComplete(): power is off, and return AWB!!\n")); + + RT_TRACE(COMP_INIT|COMP_IO|COMP_SEND, DBG_WARNING, ("SdioIOComplete(): power is off, and return AWB!!\n")); PlatformAcquireSpinLock(pAdapter, RT_AWB_SPINLOCK); // Issue an IRP for AsynIo write. pAwb = (PRT_AWB)RTRemoveHeadListWithCnt( &(device->AwbWaitQueue), &(device->NumWaitAwb)); // Return the AWB immediately ReturnSdioAWB(device, pAwb); - PlatformReleaseSpinLock(pAdapter, RT_AWB_SPINLOCK); + PlatformReleaseSpinLock(pAdapter, RT_AWB_SPINLOCK); } #endif if(device->SyncIoWaitingCount>0) @@ -2845,7 +2845,7 @@ SdioIOComplete( } -// +// // Callback function of when an Asyn IO Write IRP completed. // 2010.12.30, by Roger. // @@ -2856,9 +2856,9 @@ SdioAsynIOWriteComplete( PVOID Context ) { - PRT_SDIO_DEVICE device; + PRT_SDIO_DEVICE device; PADAPTER pAdapter; - + device = (PRT_SDIO_DEVICE)Context; pAdapter = (PADAPTER)(device->pAdapter); @@ -2871,39 +2871,39 @@ SdioAsynIOWriteComplete( NdisSetEvent(&device->AllAsynIoIrpReturnedEvent); } - switch(pIrp->IoStatus.Status) + switch(pIrp->IoStatus.Status) { - case STATUS_SUCCESS: + case STATUS_SUCCESS: RT_TRACE(COMP_IO, DBG_LOUD, ("SdioAsynIOWriteComplete(): STATUS_SUCCESS\n")); break; - case STATUS_TIMEOUT: + case STATUS_TIMEOUT: if(device->bRegSurpriseRemovedEnable) pAdapter->bSurpriseRemoved = TRUE; RT_TRACE(COMP_IO, DBG_LOUD, ("SdioAsynIOWriteComplete(): STATUS_TIMEOUT\n")); break; - case STATUS_PENDING: + case STATUS_PENDING: RT_TRACE(COMP_IO, DBG_LOUD, ("SdioAsynIOWriteComplete(): STATUS_PENDING\n")); break; - case STATUS_UNSUCCESSFUL: + case STATUS_UNSUCCESSFUL: if(device->bRegSurpriseRemovedEnable) pAdapter->bSurpriseRemoved = TRUE; RT_TRACE(COMP_IO, DBG_LOUD, ("SdioAsynIOWriteComplete(): STATUS_UNSUCCESSFUL\n")); break; - default: + default: RT_TRACE(COMP_IO, DBG_LOUD, ("SdioAsynIOWriteComplete(): Unknown: %x\n", pIrp->IoStatus.Status)); - break; + break; } IoFreeIrp(pIrp); SdioIOComplete(device); - + return STATUS_MORE_PROCESSING_REQUIRED; } @@ -2922,14 +2922,14 @@ RTsdioCancelAsynIoPendingIrp( u1Byte i; if(device->bAsynIoWritePending) - { + { // Cancel the IRP for AsynIO write request. - IoCancelIrp(device->pAsynIoWriteIrp); + IoCancelIrp(device->pAsynIoWriteIrp); // Wait until it completed by USB host driver. NdisWaitEvent( &(device->AllAsynIoIrpReturnedEvent), 2000); - // Reset the event. + // Reset the event. NdisResetEvent(&(device->AllAsynIoIrpReturnedEvent)); } } @@ -2970,19 +2970,19 @@ PrepareSdioAWBs( // // Allocate MDL for AsynIO Write buffer // - device->pAsynIoWriteMDL = IoAllocateMdl((pu1Byte)device->AsynIoWriteDataBuf, MAX_AWB_DATA_SIZE , FALSE, FALSE, NULL); + device->pAsynIoWriteMDL = IoAllocateMdl((pu1Byte)device->AsynIoWriteDataBuf, MAX_AWB_DATA_SIZE , FALSE, FALSE, NULL); if(device->pAsynIoWriteMDL == NULL) goto Error; - + MmBuildMdlForNonPagedPool(device->pAsynIoWriteMDL); // // Allocate SD Request Packet // device->pAsynIoWriteSdrp = (PSDBUS_REQUEST_PACKET)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(SDBUS_REQUEST_PACKET), '3278'); - if(device->pAsynIoWriteSdrp == NULL) + if(device->pAsynIoWriteSdrp == NULL) goto Error; - + return TRUE; Error: @@ -2998,7 +2998,7 @@ PrepareSdioAWBs( BOOLEAN FreeSdioAWBs( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, BOOLEAN bReset ) { @@ -3006,7 +3006,7 @@ FreeSdioAWBs( PADAPTER Adapter = (PADAPTER)device->pAdapter; PlatformAcquireSpinLock(Adapter, RT_AWB_SPINLOCK); - while( !RTIsListEmpty(&(device->AwbWaitQueue)) ) + while( !RTIsListEmpty(&(device->AwbWaitQueue)) ) { pAwb = (PRT_AWB)RTRemoveHeadListWithCnt( &(device->AwbWaitQueue), &(device->NumWaitAwb)); @@ -3027,7 +3027,7 @@ FreeSdioAWBs( device->pAsynIoWriteMDL = NULL; device->pAsynIoWriteSdrp = NULL; - + return TRUE; } @@ -3045,7 +3045,7 @@ ReturnSdioAWB( // Description: // Determine if we can send packet to specified QueueID. // It return TRUE if then IRP pending in corresponding pipe > 1. -// Note that, this is platform dependent, the following implementation +// Note that, this is platform dependent, the following implementation // is for WDM. // BOOLEAN @@ -3069,14 +3069,14 @@ PlatformIsTxQueueAvailable( RT_TRACE(COMP_SEND, DBG_TRACE, ("PlatformIsTxQueueAvailable(): QueueID(%d) IrpPendingCount(%d)\n", IdxQueue, nIrpPendingCount)); if(nIrpPendingCount == 1 && pTxQueue->bStalled == FALSE) - { + { return TRUE; } else { if(nIrpPendingCount >= MAX_NUM_REQUEST_PER_TX_QUEUE) { - RT_TRACE(COMP_SEND, DBG_SERIOUS, ("PlatformIsTxQueueAvailable(): QueueID(%d) IrpPendingCount(%d) >= %d !!!\n", + RT_TRACE(COMP_SEND, DBG_SERIOUS, ("PlatformIsTxQueueAvailable(): QueueID(%d) IrpPendingCount(%d) >= %d !!!\n", IdxQueue, nIrpPendingCount, MAX_NUM_REQUEST_PER_TX_QUEUE)); return FALSE; } @@ -3130,7 +3130,7 @@ Return Value Description: } } - + extern PCHAR PlatformDevicePowerString( DEVICE_POWER_STATE Type ) @@ -3181,11 +3181,11 @@ PlatformSdioEnableTxQueues( if( Adapter->bSurpriseRemoved ) return; - + for ( i = 0; i < pDevice->RtNumTxQueue; i++ ) { N6SdioStartTxQueue(Adapter, i); - } + } } VOID @@ -3216,41 +3216,41 @@ PlatformSdioWaitAllSDReqComplete( { PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); - u1Byte ChkCnt = 0; - + u1Byte ChkCnt = 0; + while(TRUE) - { - NdisAcquireSpinLock( &(pDevice->IrpSpinLock) ); + { + NdisAcquireSpinLock( &(pDevice->IrpSpinLock) ); if(pDevice->nIrpPendingCnt >0) - { - RT_TRACE(COMP_IO, DBG_TRACE, ("PlatformSdioWaitAllSDReqComplete(): wait for all nIrpPendingCnt returned (%d)\n", + { + RT_TRACE(COMP_IO, DBG_TRACE, ("PlatformSdioWaitAllSDReqComplete(): wait for all nIrpPendingCnt returned (%d)\n", pDevice->nIrpPendingCnt)); - + NdisReleaseSpinLock( &(pDevice->IrpSpinLock) ); - PlatformStallExecution(100); // Wait for all Rx operation is down. + PlatformStallExecution(100); // Wait for all Rx operation is down. ChkCnt++; if ( ChkCnt>= 1000) { RT_TRACE(COMP_IO, DBG_TRACE, ("PlatformSdioWaitAllSDReqComplete(): Wait too long break!!\n")); break; - } + } } - else + else { NdisReleaseSpinLock( &(pDevice->IrpSpinLock) ); break; } } -} +} VOID PlatformEnableNetworkMonitorMode( IN PADAPTER Adapter ) -{ +{ PRT_NDIS_COMMON pNdisCommon = Adapter->pNdisCommon; - pNdisCommon->dot11AutoConfigEnabled = FALSE; // useless before ndis6 + pNdisCommon->dot11AutoConfigEnabled = FALSE; // useless before ndis6 } VOID @@ -3259,8 +3259,8 @@ PlatformDisableNetworkMonitorMode( ) { PRT_NDIS_COMMON pNdisCommon = Adapter->pNdisCommon; - pNdisCommon->dot11AutoConfigEnabled = TRUE; // useless before ndis6 - + pNdisCommon->dot11AutoConfigEnabled = TRUE; // useless before ndis6 + } VOID @@ -3270,7 +3270,7 @@ PlatformSetFwPsClkOffEvent( ) { PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - + if(SetEvent) NdisSetEvent(&sdiodevice->FwPsClockOffEvent); else diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.h index 96950220d..b36d875e2 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6SdioPlatformWindows.h @@ -70,7 +70,7 @@ // Forward declaration. typedef enum _RT_STATUS RT_STATUS; -typedef struct _RT_TCB RT_TCB, *PRT_TCB; +typedef struct _RT_TCB RT_TCB, *PRT_TCB; typedef struct _SDIO_OUT_CONTEXT *PSDIO_OUT_CONTEXT; typedef struct _SDIO_IN_CONTEXT *PSDIO_IN_CONTEXT; // @@ -80,13 +80,13 @@ typedef struct _SDIO_IN_CONTEXT *PSDIO_IN_CONTEXT; #define PLATFORM_LIMITED_RX_BUF_SIZE(_ADAPTER) FALSE // Some USB 1.1 host driver cannot afford too large bulkout size on Win2k platform #define PLATFORM_LIMITED_TX_BUF_SIZE(_ADAPTER) FALSE - -extern PCHAR + +extern PCHAR PlatformSystemPowerString( SYSTEM_POWER_STATE Type ); -extern PCHAR +extern PCHAR PlatformDevicePowerString( DEVICE_POWER_STATE Type ); @@ -111,7 +111,7 @@ RT_STATUS PlatformSdioCmd53ReadWrite( PRT_SDIO_DEVICE sdiodevice, UCHAR DeviceID, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeFlag, @@ -121,7 +121,7 @@ PlatformSdioCmd53ReadWrite( RT_STATUS PlatformSdioCmd53ReadWriteBlock( PRT_SDIO_DEVICE sdiodevice, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeFlag, @@ -131,7 +131,7 @@ PlatformSdioCmd53ReadWriteBlock( RT_STATUS PlatformSdioCmd53ReadWriteByte( PRT_SDIO_DEVICE sdiodevice, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, ULONG registerIndex, BOOLEAN writeFlag, @@ -141,7 +141,7 @@ PlatformSdioCmd53ReadWriteByte( RT_STATUS PlatformSdioCmd53ReadWriteMDL( PRT_SDIO_DEVICE sdiodevice, - UCHAR funcNum, + UCHAR funcNum, PMDL pmdl, ULONG byteCount, ULONG registerIndex, @@ -153,9 +153,9 @@ RT_STATUS PlatformSdioCmd52ReadWrite( PRT_SDIO_DEVICE sdiodevice, UCHAR DeviceID, - UCHAR funcNum, + UCHAR funcNum, ULONG byteCount, - ULONG registerIndex, + ULONG registerIndex, BOOLEAN writeToDevice, PVOID buffer ); @@ -175,7 +175,7 @@ PlatformSdioCmd52ReadWriteByte( // NTSTATUS IssueIrpForAsynSdioIOWrite( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u2Byte Count, u4Byte Index, PVOID pOutRegisterData @@ -184,9 +184,9 @@ IssueIrpForAsynSdioIOWrite( #if RTL8723_SDIO_IO_THREAD_ENABLE VOID SdioAsynIOWriteEnqueue( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u1Byte DeviceID, - UCHAR FuncNum, + UCHAR FuncNum, u2Byte Count, u4Byte Index, PVOID pOutRegisterData @@ -195,9 +195,9 @@ SdioAsynIOWriteEnqueue( NTSTATUS SdioAsynIOWrite( - PRT_SDIO_DEVICE device, + PRT_SDIO_DEVICE device, u1Byte DeviceID, - UCHAR FuncNum, + UCHAR FuncNum, u2Byte Count, u4Byte Index, PVOID pOutRegisterData diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_DrvIF.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_DrvIF.c index 25bc87d2d..29396a8da 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_DrvIF.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_DrvIF.c @@ -37,7 +37,7 @@ DrvIFAssociateRFD( &(pRfd->Buffer), Adapter->MAX_RECEIVE_BUFFER_SIZE ); - + pRfd->Buffer.Length = Adapter->MAX_RECEIVE_BUFFER_SIZE; } @@ -106,7 +106,7 @@ FillN6NBLInfo( sizeof(DOT11_EXTSTA_RECV_CONTEXT)); pRecvContext->uReceiveFlags = 0; // set to zero if in ExtSta mode. pRecvContext->uPhyId = N6CQuery_DOT11_OPERATING_PHYID(Adapter); - pRecvContext->uChCenterFrequency = + pRecvContext->uChCenterFrequency = MgntGetChannelFrequency(RT_GetChannelNumber(Adapter)); pRecvContext->usNumberOfMPDUsReceived = pRfd->nTotalFrag; //pRecvContext->lRSSI = Adapter->RxStats.SignalStrength; // Report the smoothed signal strength. @@ -115,7 +115,7 @@ FillN6NBLInfo( pRecvContext->uSizeMediaSpecificInfo = 0; pRecvContext->pvMediaSpecificInfo = NULL; pRecvContext->ullTimestamp = ((u8Byte)pRfd->Status.TimeStampHigh << 32) + pRfd->Status.TimeStampLow; - + NET_BUFFER_LIST_INFO(pNBL, MediaSpecificInformation) = pRecvContext; } @@ -125,7 +125,7 @@ FillN6NBLInfo( NBL8021qInfo.WLanTagHeader.WMMInfo = pRfd->Status.UserPriority; NET_BUFFER_LIST_INFO(pNBL, Ieee8021QNetBufferListInfo) = NBL8021qInfo.Value; } - + return TRUE; } @@ -143,9 +143,9 @@ FreeN6NBLInfo( else { PDOT11_EXTSTA_RECV_CONTEXT pRecvContext = NULL; - + pRecvContext = (PDOT11_EXTSTA_RECV_CONTEXT)NET_BUFFER_LIST_INFO(pNBL, MediaSpecificInformation); - + if( pRecvContext != NULL ) PlatformFreeMemory(pRecvContext, sizeof(DOT11_EXTSTA_RECV_CONTEXT)); } @@ -178,10 +178,10 @@ DrvIFIndicatePackets( // Indicate if the RFD is returned or will be indicated to OS --- - pu1Byte pRfdReturnOK = NULL; + pu1Byte pRfdReturnOK = NULL; PRT_GEN_TEMP_BUFFER pGenTempBuffer = NULL; // -------------------------------------------------- - + // Resource Management -------------------- u4Byte ResourceMointor = 0; const u4Byte RESOURCE_MDL = BIT1; @@ -194,7 +194,7 @@ DrvIFIndicatePackets( BOOLEAN bDataInQueue[MAX_PEER_NUM] = {0}; u2Byte index = 0; // --------------------------------------- - + if(Num==0 || pRfd_array==NULL) return; @@ -203,7 +203,7 @@ DrvIFIndicatePackets( pRfdReturnOK = pGenTempBuffer->Buffer.Ptr; PlatformZeroMemory(pRfdReturnOK, Num); // ------------------------------------------------- - + usbdevice = &Adapter->NdisSdioDev; NBLPoolHandle = usbdevice->RxNetBufferListPool; @@ -236,41 +236,41 @@ DrvIFIndicatePackets( // Check if the resource is clear ----------------------------------- RT_ASSERT(ResourceMointor == 0, ("Error: Resource is Not Clear!\n")); // ------------------------------------------------------------ - - // By Lanhsin. Copy subframe of AMSDU into one contineous buffer before + + // By Lanhsin. Copy subframe of AMSDU into one contineous buffer before // indication. Otherwise, F-Secure anti-virus program cannot accept a // packet with more than one buffer. 2008.07.10 (Vista only) for(subframe_index = 0; subframe_index < pCurRfd->nTotalSubframe; subframe_index++, packet_index++,subframe_hdr_idx++) { - + Adapter->AmsduIndex = Adapter->AmsduIndex % Adapter->MAX_SUBFRAME_TOTAL_COUNT; - PlatformMoveMemory(Adapter->pAMSDU[Adapter->AmsduIndex].VirtualAddress, - pCurRfd->Buffer.VirtualAddress + pCurRfd->FragOffset, - sMacHdrLng); + PlatformMoveMemory(Adapter->pAMSDU[Adapter->AmsduIndex].VirtualAddress, + pCurRfd->Buffer.VirtualAddress + pCurRfd->FragOffset, + sMacHdrLng); - PlatformMoveMemory((Adapter->pAMSDU[Adapter->AmsduIndex].VirtualAddress + 24), pCurRfd->SubframeArray[subframe_index], + PlatformMoveMemory((Adapter->pAMSDU[Adapter->AmsduIndex].VirtualAddress + 24), pCurRfd->SubframeArray[subframe_index], pCurRfd->SubframeLenArray[subframe_index]); - // Allocate MDL of 802.11 header. We use the same header for all AMSDU + // Allocate MDL of 802.11 header. We use the same header for all AMSDU // subframe. Sequence number are the same for all sub packet. // The first MDL must contain 802.11 header and LLC. - pMdl = NdisAllocateMdl( N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)Adapter->pAMSDU[Adapter->AmsduIndex].VirtualAddress, + pMdl = NdisAllocateMdl( N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)Adapter->pAMSDU[Adapter->AmsduIndex].VirtualAddress, sMacHdrLng+pCurRfd->SubframeLenArray[subframe_index]); if (pMdl == NULL) { - RT_TRACE(COMP_RECV, DBG_SERIOUS, ("Failed to allocate MDL\n")); + RT_TRACE(COMP_RECV, DBG_SERIOUS, ("Failed to allocate MDL\n")); goto POST_PROCESS; } else { ResourceMointor |= RESOURCE_MDL; } - + // // Allocate NetBufferList for receive indication, 2006.10.04, by shien chang. // @@ -295,7 +295,7 @@ DrvIFIndicatePackets( // // Now prepare necessary information such as SourceHandle, OOB data for indication. // - pNetBufferList->SourceHandle = N6SDIO_GET_MINIPORT_HANDLE(Adapter); + pNetBufferList->SourceHandle = N6SDIO_GET_MINIPORT_HANDLE(Adapter); // Filling information in NetBufferList. if(FillN6NBLInfo(Adapter, pNetBufferList, pCurRfd) == FALSE) @@ -344,10 +344,10 @@ DrvIFIndicatePackets( // Check if the resource is clear ----------------------------------- RT_ASSERT(ResourceMointor == 0, ("Error: Resource is Not Clear!\n")); // ------------------------------------------------------------ - + pMdl = NULL; pTmpRfd = pCurRfd; - + // // Allocate MDLChain. 2006.10.04, by shien chang. // @@ -355,7 +355,7 @@ DrvIFIndicatePackets( if (pMdl == NULL) { pMdl = NdisAllocateMdl( - N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pCurRfd->Buffer.VirtualAddress+pCurRfd->FragOffset), pCurRfd->FragLength); pCurrMdl = pMdl; @@ -363,11 +363,11 @@ DrvIFIndicatePackets( else { NDIS_MDL_LINKAGE(pCurrMdl) = NdisAllocateMdl( - N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pTmpRfd->Buffer.VirtualAddress+pTmpRfd->FragOffset), pTmpRfd->FragLength); pCurrMdl = NDIS_MDL_LINKAGE(pCurrMdl); - + } if (pCurrMdl == NULL) @@ -433,14 +433,14 @@ DrvIFIndicatePackets( MP_SET_PACKET_RFD(pNetBufferList, pCurRfd); pRfdReturnOK[rfd_index] = TRUE; // ------------------------------------------------ - + packet_index++; // Clean the Resource Mointor --------- ResourceMointor = 0; // --------------------------------- } - + if( OS_SUPPORT_WDI(Adapter) ) { // PeerId is 1-based, 0 use to represent failure @@ -511,7 +511,7 @@ DrvIFIndicatePackets( PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); if( OS_SUPPORT_WDI(Adapter) ) - { + { for(index = 0; index < MAX_PEER_NUM; index++) { if( bDataInQueue[index] == TRUE ) @@ -559,7 +559,7 @@ DrvIFIndicateMultiplePackets( PADAPTER Adapter, PRT_RFD pRfd ) -{ +{ NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); @@ -569,7 +569,7 @@ DrvIFIndicateMultiplePackets( PNET_BUFFER_LIST pNetBufferList = NULL; PNET_BUFFER_LIST pLastNetBufferList = NULL; PNET_BUFFER_LIST pFirstNetBufferList = NULL; - u1Byte index; + u1Byte index; pu1Byte pHeader; // For WDI architecture --------------------- u4Byte PeerId = 0; @@ -594,16 +594,16 @@ DrvIFIndicateMultiplePackets( { /*if (index > N6_MAX_AMSDU_SUBF_NUM) { - RT_TRACE(COMP_RECV, DBG_SERIOUS, (">AMSDU Max Subframe\n\r")); + RT_TRACE(COMP_RECV, DBG_SERIOUS, (">AMSDU Max Subframe\n\r")); index = N6_MAX_AMSDU_SUBF_NUM; break; }*/ - + pHeader = &pMgntInfo->header[index][0]; - PlatformMoveMemory(pHeader, - pRfd->Buffer.VirtualAddress + pRfd->FragOffset, - sMacHdrLng); - PlatformMoveMemory((pHeader + sMacHdrLng), pRfd->SubframeArray[index], + PlatformMoveMemory(pHeader, + pRfd->Buffer.VirtualAddress + pRfd->FragOffset, + sMacHdrLng); + PlatformMoveMemory((pHeader + sMacHdrLng), pRfd->SubframeArray[index], N6_LLC_SIZE); #if (N6_PSDUDO_SEQ_NUM == 1) // Increase 802.11 header sequence number of every AMSDU sub frame @@ -612,9 +612,9 @@ DrvIFIndicateMultiplePackets( if (Pseudo_Seq_Num == (16*4000)) Pseudo_Seq_Num = 0; #endif - + // - // Prevent unexpected MDL length requirement, which might cause system + // Prevent unexpected MDL length requirement, which might cause system // using improper addresses, added by Roger, 2010.05.26. // if(pRfd->SubframeLenArray[index] <= N6_LLC_SIZE) @@ -624,27 +624,27 @@ DrvIFIndicateMultiplePackets( break; } - // Allocate MDL of 802.11 header. We use the same header for all AMSDU + // Allocate MDL of 802.11 header. We use the same header for all AMSDU // subframe. Sequence number are the same for all sub packet. // The first MDL must contain 802.11 header and LLC. - pMdl = NdisAllocateMdl( N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pHeader), + pMdl = NdisAllocateMdl( N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pHeader), sMacHdrLng+N6_LLC_SIZE); - + // // Allocate MDLChain. We must filter the header of AMSDU subframe // - NDIS_MDL_LINKAGE(pMdl) - = NdisAllocateMdl( N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + NDIS_MDL_LINKAGE(pMdl) + = NdisAllocateMdl( N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pRfd->SubframeArray[index]+N6_LLC_SIZE), pRfd->SubframeLenArray[index]-N6_LLC_SIZE); // AMSDU debug log 24 bytes header and sub-frame data info //PlatformMoveMemory(&nheader[index][0], pHeader, sMacHdrLng); //PlatformMoveMemory(&llcheader[index][0], pRfd->SubframeArray[index], sMacHdrLng); - + if (pMdl == NULL || NDIS_MDL_LINKAGE(pMdl) == NULL) { - RT_TRACE(COMP_RECV, DBG_SERIOUS, ("Failed to allocate MDL\n")); + RT_TRACE(COMP_RECV, DBG_SERIOUS, ("Failed to allocate MDL\n")); status = NDIS_STATUS_FAILURE; break; } @@ -676,11 +676,11 @@ DrvIFIndicateMultiplePackets( if(FillN6NBLInfo(Adapter, pNetBufferList, pRfd) == FALSE) { RT_TRACE(COMP_RECV, DBG_SERIOUS, ("Failed to set information to NetBufferList\n")); - + status = NDIS_STATUS_FAILURE; break; } - + if(index == 0) { pFirstNetBufferList = pLastNetBufferList = pNetBufferList; @@ -703,14 +703,14 @@ DrvIFIndicateMultiplePackets( PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); RT_INC_N_RCV_REF(GetDefaultAdapter(Adapter), index); PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); - + if( OS_SUPPORT_WDI(Adapter) ) { // PeerId is 1-based, 0 use to represent failure PeerId = WDI_InsertDataInQueue(Adapter, pRfd, pFirstNetBufferList); PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); - + if( PeerId != 0 ) { PlatformReleaseSemaphore(&(pDefaultAdapter->pNdisCommon->RxNotifySemaphore)); @@ -721,7 +721,7 @@ DrvIFIndicateMultiplePackets( } } else - { + { PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); NdisMIndicateReceiveNetBufferLists( @@ -737,13 +737,13 @@ DrvIFIndicateMultiplePackets( { ReturnRFDList(Adapter, pRfd); } - + if (status != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_RECV, DBG_SERIOUS, ("DrvIFIndicateMultiplePackets(): failed to allocate resource! status: %d\n", status)); FreeN6NBLInfo(Adapter, pNetBufferList); - + if(pMdl != NULL && NDIS_MDL_LINKAGE(pMdl) != NULL) NdisFreeMdl(NDIS_MDL_LINKAGE(pMdl)); @@ -753,7 +753,7 @@ DrvIFIndicateMultiplePackets( if(pNetBufferList != NULL) NdisFreeNetBufferList(pNetBufferList); } - + } VOID @@ -808,7 +808,7 @@ DrvIFIndicatePacket( #if RX_TCP_SEQ_CHECK RxTcpSeqCheck(Adapter, pRfd); #endif - + do{ // // Allocate MDLChain. 2006.10.04, by shien chang. @@ -817,7 +817,7 @@ DrvIFIndicatePacket( if (pMdl == NULL) { pMdl = NdisAllocateMdl( - N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pTmpRfd->Buffer.VirtualAddress+pTmpRfd->FragOffset), pTmpRfd->FragLength); pCurrMdl = pMdl; @@ -825,7 +825,7 @@ DrvIFIndicatePacket( else { NDIS_MDL_LINKAGE(pCurrMdl) = NdisAllocateMdl( - N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pTmpRfd->Buffer.VirtualAddress+pTmpRfd->FragOffset), pTmpRfd->FragLength); pCurrMdl = NDIS_MDL_LINKAGE(pCurrMdl); @@ -834,12 +834,12 @@ DrvIFIndicatePacket( if (pCurrMdl == NULL) { RT_TRACE(COMP_RECV, DBG_SERIOUS, ("Failed to allocate MDL\n")); - + status = NDIS_STATUS_FAILURE; break; } - pTmpRfd=pTmpRfd->NextRfd; + pTmpRfd=pTmpRfd->NextRfd; }while(pTmpRfd); if (status != NDIS_STATUS_SUCCESS) @@ -878,7 +878,7 @@ DrvIFIndicatePacket( pNextMdl = NDIS_MDL_LINKAGE(pCurrMdl); NdisFreeMdl(pCurrMdl); } - + status = NDIS_STATUS_FAILURE; break; } @@ -900,9 +900,9 @@ DrvIFIndicatePacket( pNextMdl = NDIS_MDL_LINKAGE(pCurrMdl); NdisFreeMdl(pCurrMdl); } - + NdisFreeNetBufferList(pNetBufferList); - + status = NDIS_STATUS_FAILURE; break; } @@ -910,19 +910,19 @@ DrvIFIndicatePacket( MP_SET_PACKET_RFD(pNetBufferList, pRfd); }while(FALSE); - + if(status==NDIS_STATUS_SUCCESS) { RT_ASSERT(IS_RX_LOCKED(Adapter) == TRUE, ("DrvIFIndicatePacket(): bRxLocked should be TRUE\n")); // // Set the status on the packet, either resources or success. - // We must do tell OS if we are out of Rx resource, - // otherwise, in some condition: + // We must do tell OS if we are out of Rx resource, + // otherwise, in some condition: // example 1: HCT 12.1 2c_PerformanceBlast). // example 2: too many fragments received. - // we might stop to receive packets. 2005.12.09, by rcnjko. - // + // we might stop to receive packets. 2005.12.09, by rcnjko. + // if((*GET_NUM_IDLE_RFD(Adapter) + *GET_NUM_BUSY_RFD(Adapter,RX_MPDU_QUEUE)) > 0) { ReceiveFlags = 0; @@ -936,14 +936,14 @@ DrvIFIndicatePacket( PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); RT_INC_RCV_REF(GetDefaultAdapter(Adapter)); PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); - + if( OS_SUPPORT_WDI(Adapter) ) { // PeerId is 1-based, 0 use to represent failure PeerId = WDI_InsertDataInQueue(Adapter, pRfd, pNetBufferList); - + PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); - + if( PeerId != 0 ) { PlatformReleaseSemaphore(&(pDefaultAdapter->pNdisCommon->RxNotifySemaphore)); @@ -952,7 +952,7 @@ DrvIFIndicatePacket( pNetBufferListToFree = pNetBufferList; } else - { + { PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); // Prefast warning C6011: Dereferencing NULL pointer 'Adapter->pNdis62Common'. @@ -969,11 +969,11 @@ DrvIFIndicatePacket( PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); // // 2005.12.09, by rcnjko. - // If we had claimed pPacketToFree is NDIS_STATUS_RESOURCES, + // If we had claimed pPacketToFree is NDIS_STATUS_RESOURCES, // we are free to access the it after NdisMIndicateReceivePacket() and // MiniportReturnPacket() won't be called. - // So, we shall release the NDIS_PACKET pPacketToFree and associated NDIS_BUFFER and - // then reuse the RFD if we had claimed pPacketToFree is NDIS_STATUS_RESOURCES. + // So, we shall release the NDIS_PACKET pPacketToFree and associated NDIS_BUFFER and + // then reuse the RFD if we had claimed pPacketToFree is NDIS_STATUS_RESOURCES. // // It is time consuming to allocate NDIS_PACKEAT and NDIS_BUFFER dynamically. // @@ -982,7 +982,7 @@ DrvIFIndicatePacket( pTmpRfd = MP_GET_PACKET_RFD(pNetBufferListToFree); FreeN6NBLInfo(Adapter, pNetBufferListToFree); - + for (pCurrMdl = NET_BUFFER_FIRST_MDL( NET_BUFFER_LIST_FIRST_NB(pNetBufferListToFree) ); pCurrMdl != NULL; pCurrMdl = pNextMdl) @@ -990,9 +990,9 @@ DrvIFIndicatePacket( pNextMdl = NDIS_MDL_LINKAGE(pCurrMdl); NdisFreeMdl(pCurrMdl); } - + NdisFreeNetBufferList(pNetBufferListToFree); - + ReturnRFDList(Adapter, pTmpRfd); PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); @@ -1031,10 +1031,10 @@ DrvIFD0RxIndicatePackets( // Indicate if the RFD is returned or will be indicated to OS --- - pu1Byte pRfdReturnOK = NULL; + pu1Byte pRfdReturnOK = NULL; PRT_GEN_TEMP_BUFFER pGenTempBuffer = NULL; // -------------------------------------------------- - + // Resource Management -------------------- u4Byte ResourceMointor = 0; const u4Byte RESOURCE_MDL = BIT1; @@ -1047,7 +1047,7 @@ DrvIFD0RxIndicatePackets( BOOLEAN bDataInQueue[MAX_PEER_NUM] = {0}; u2Byte index = 0; // --------------------------------------- - + if(Num==0 || pRfd_array==NULL) return; @@ -1056,7 +1056,7 @@ DrvIFD0RxIndicatePackets( pRfdReturnOK = pGenTempBuffer->Buffer.Ptr; PlatformZeroMemory(pRfdReturnOK, Num); // ------------------------------------------------- - + usbdevice = &Adapter->NdisSdioDev; NBLPoolHandle = usbdevice->RxNetBufferListPool; @@ -1064,14 +1064,14 @@ DrvIFD0RxIndicatePackets( { pCurRfd = pRfd_array[rfd_index]; - + // Check if the resource is clear ----------------------------------- RT_ASSERT(ResourceMointor == 0, ("Error: Resource is Not Clear!\n")); // ------------------------------------------------------------ - + pMdl = NULL; pTmpRfd = pCurRfd; - + // // Allocate MDLChain. 2006.10.04, by shien chang. // @@ -1079,7 +1079,7 @@ DrvIFD0RxIndicatePackets( if (pMdl == NULL) { pMdl = NdisAllocateMdl( - N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pCurRfd->Buffer.VirtualAddress+pCurRfd->FragOffset), pCurRfd->FragLength); pCurrMdl = pMdl; @@ -1087,11 +1087,11 @@ DrvIFD0RxIndicatePackets( else { NDIS_MDL_LINKAGE(pCurrMdl) = NdisAllocateMdl( - N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), + N6SDIO_GET_MINIPORT_HANDLE(GetDefaultAdapter(Adapter)), (PVOID)(pTmpRfd->Buffer.VirtualAddress+pTmpRfd->FragOffset), pTmpRfd->FragLength); pCurrMdl = NDIS_MDL_LINKAGE(pCurrMdl); - + } if (pCurrMdl == NULL) @@ -1157,7 +1157,7 @@ DrvIFD0RxIndicatePackets( MP_SET_PACKET_RFD(pNetBufferList, pCurRfd); pRfdReturnOK[rfd_index] = TRUE; // ------------------------------------------------ - + packet_index++; // Clean the Resource Mointor --------- @@ -1211,9 +1211,9 @@ DrvIFD0RxIndicatePackets( PlatformReleaseSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); - + if( OS_SUPPORT_WDI(Adapter) ) - { + { for(index = 0; index < MAX_PEER_NUM; index++) { if( bDataInQueue[index] == TRUE ) @@ -1256,7 +1256,7 @@ DrvIFD0RxIndicatePackets( // Return the allocated memory ---------------------- ReturnGenTempBuffer(Adapter, pGenTempBuffer); // ---------------------------------------------- - + FunctionOut(COMP_RECV); return; } @@ -1274,12 +1274,12 @@ DrvIFCompletePacket( if(!OS_SUPPORT_WDI(Adapter)) { - PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); + // // For pending NBL issue. // - RT_ASSERT(GetDefaultAdapter(Adapter)->MgntInfo.OutstandingNdisPackets > 0, + RT_ASSERT(GetDefaultAdapter(Adapter)->MgntInfo.OutstandingNdisPackets > 0, ("DrvIFCompletePacket(): OutstandingNdisPackets not greater than 0.\n")); if (pNBL != NULL && RT_NBL_GET_REF_CNT(pNBL) != 0) @@ -1289,14 +1289,14 @@ DrvIFCompletePacket( if (RT_NBL_GET_REF_CNT(pNBL) == 0) { GetDefaultAdapter(Adapter)->MgntInfo.OutstandingNdisPackets--; - GetDefaultAdapter(Adapter)->MgntInfo.CompleteFlag = 0; + GetDefaultAdapter(Adapter)->MgntInfo.CompleteFlag = 0; for(pCurrNetBufferList = pNBL; pCurrNetBufferList != NULL; pCurrNetBufferList = pNextNetBufferList) { pNextNetBufferList = NET_BUFFER_LIST_NEXT_NBL(pCurrNetBufferList); NET_BUFFER_LIST_STATUS(pCurrNetBufferList) = NDIS_STATUS_SUCCESS; - } + } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); NdisMSendNetBufferListsComplete( device->hNdisAdapter, @@ -1334,14 +1334,14 @@ DrvIFIndicateScanStart( ) { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("==> DrvIFIndicateScanStart()\n")); if (pNdisCommon->bToIndicateScanComplete == FALSE) { pNdisCommon->bToIndicateScanComplete = TRUE; } - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("<== DrvIFIndicateScanStart()\n")); } @@ -1353,7 +1353,7 @@ DrvIFIndicateScanComplete( { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + RT_TRACE(COMP_SCAN, DBG_LOUD, ("==> DrvIFIndicateScanComplete(): status = 0x%x\n", status)); // @@ -1368,7 +1368,7 @@ DrvIFIndicateScanComplete( if( pMgntInfo->bCheckScanTime == TRUE ) pMgntInfo->bCheckScanTime = FALSE; - pNdisCommon->bToIndicateScanComplete = FALSE; + pNdisCommon->bToIndicateScanComplete = FALSE; } RT_TRACE(COMP_SCAN, DBG_LOUD, ("<== DrvIFIndicateScanComplete()\n")); @@ -1380,14 +1380,14 @@ DrvIFIndicateConnectionStart( ) { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateConnectionStart()\n")); // // In NDIS6, we need to indicate the upper layer driver in starting connection. // N6PushIndicateStateMachine(Adapter, N6_STATE_CONNECT_START, 0); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateConnectionStart()\n")); } @@ -1399,7 +1399,7 @@ DrvIFIndicateConnectionComplete( { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateConnectionComplete(): status = %d\n", status)); if(OS_SUPPORT_WDI(Adapter)) @@ -1409,7 +1409,7 @@ DrvIFIndicateConnectionComplete( // In NDIS6, we need to indicate the upper layer driver when a connection request completed. N6PushIndicateStateMachine(Adapter, N6_STATE_CONNECT_COMPLETE, status); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateConnectionComplete()\n")); } @@ -1419,12 +1419,12 @@ DrvIFIndicateAssociationStart( ) { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateAssociationStart()\n")); // In NDIS6, we need indicate the upper layer driver when association is starting. N6PushIndicateStateMachine(Adapter, N6_STATE_ASOC_START, 0); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateAssociationStart()\n")); } @@ -1436,7 +1436,7 @@ DrvIFIndicateAssociationComplete( { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateAssociationComplete()\n")); if(OS_SUPPORT_WDI(Adapter)) @@ -1446,7 +1446,7 @@ DrvIFIndicateAssociationComplete( // In NDIS6, we need indicate the upper layer driver when association request is completed. N6PushIndicateStateMachine(Adapter, N6_STATE_ASOC_COMPLETE, status); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateAssociationComplete()\n")); } @@ -1465,7 +1465,7 @@ DrvIFIndicateDisassociation( { WDI_IndicateDisassociation(Adapter, reason, pAddr); } - + pMgntInfo->DisconnectCount++; N6PushIndicateStateMachine(Adapter, N6_STATE_DISASOC, reason); @@ -1479,11 +1479,11 @@ DrvIFIndicateRoamingStart( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateRoamingStart()\n")); N6PushIndicateStateMachine(Adapter, N6_STATE_ROAM_START, 0); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateRoamingStart()\n")); } @@ -1495,7 +1495,7 @@ DrvIFIndicateRoamingComplete( { PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo=&Adapter->MgntInfo; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateRoamingComplete()\n")); if(OS_SUPPORT_WDI(Adapter)) { @@ -1506,7 +1506,7 @@ DrvIFIndicateRoamingComplete( //pMgntInfo->LinkRetryforRoaming=0; pMgntInfo->RoamingCount++; N6PushIndicateStateMachine(Adapter, N6_STATE_ROAM_COMPLETE, status); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateRoamingComplete()\n")); } @@ -1521,7 +1521,7 @@ DrvIFIndicateCurrentPhyStatus( PMGNT_INFO pExtMgntInfo; PRT_NDIS6_COMMON pDefaultNdisCommon = pAdapter->pNdisCommon; u1Byte i; - + RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateCurrentPhyStatus()\n")); if(OS_SUPPORT_WDI(Adapter)) @@ -1540,16 +1540,16 @@ DrvIFIndicateCurrentPhyStatus( pExtMgntInfo->eSwRfPowerState = pDefaultMgntInfo->eSwRfPowerState; pExtMgntInfo->RfOffReason = pDefaultMgntInfo->RfOffReason; - pExtNdisCommon->eRfPowerStateToSet = pDefaultNdisCommon->eRfPowerStateToSet; + pExtNdisCommon->eRfPowerStateToSet = pDefaultNdisCommon->eRfPowerStateToSet; - // If the uPhyId member is set to DOT11_PHY_ID_ANY, the NDIS_STATUS_DOT11_PHY_STATE_CHANGED + // If the uPhyId member is set to DOT11_PHY_ID_ANY, the NDIS_STATUS_DOT11_PHY_STATE_CHANGED // indication applies to all PHYs in the msDot11SupportedPhyTypes MIB object. N6IndicateCurrentPhyPowerState(pAdapter, DOT11_PHY_ID_ANY); pAdapter = GetNextExtAdapter(pAdapter); } - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateCurrentPhyStatus()\n")); } @@ -1581,7 +1581,7 @@ DrvIFIndicateIncommingAssociationComplete( { RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("Indicate association rsp sent with status = 0x%X, association rsp len: %u\n", status, Adapter->MgntInfo.pCurrentSta->AP_SendAsocRespLength)); if(Adapter->MgntInfo.pCurrentSta->AP_SendAsocRespLength) - {// Indicate task completion event only if we have sent an association response + {// Indicate task completion event only if we have sent an association response WdiExt_IndicateApAssocRspSent(Adapter, status); } } @@ -1602,9 +1602,9 @@ DrvIFIndicateIncommingAssocReqRecv( if(OS_SUPPORT_WDI(Adapter)) { RT_WLAN_STA *sta = Adapter->MgntInfo.pCurrentSta; - + WdiExt_IndicateApAssocReqReceived( - Adapter, + Adapter, sta->AP_RecvAsocReqLength, sta->AP_RecvAsocReq); } @@ -1657,7 +1657,7 @@ DrvIFIndicateRoamingNeeded( RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateRoamingNeeded()\n")); WDI_IndicateRoamingNeeded(pAdapter, IndicationReason); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateRoamingNeeded()\n")); } @@ -1671,7 +1671,7 @@ DrvIFIndicateLinkStateChanged( RT_TRACE(COMP_MLME, DBG_LOUD, ("==> DrvIFIndicateLinkStateChanged()\n")); WDI_IndicateLinkStateChanged(pAdapter, bForceLinkQuality, ucLinkQuality); - + RT_TRACE(COMP_MLME, DBG_LOUD, ("<== DrvIFIndicateLinkStateChanged()\n")); } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.c index e4f446ec8..038dec176 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.c @@ -3,16 +3,16 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: N6Sdio_PlatformSdioWdf.c - + Abstract: Implement PlatforSdioXXX() and WdfSdio_XXX() on WDF SDIO. - + Major Change History: When Who What ---------- --------------- ------------------------------- 2012-01-10 Roger Create. - - + + --*/ #include "Mp_Precomp.h" @@ -29,13 +29,13 @@ Major Change History: //================================================================================ //================================================================================ -// SDIO Init / DeInit. +// SDIO Init / DeInit. //================================================================================ // // Description: // Select 1st interface and initialize all pipes on it. -// Note, we don't start IoTargets of all pipes here +// Note, we don't start IoTargets of all pipes here // because HW is not properly configured. // // Assumption: @@ -48,14 +48,14 @@ WdfSdio_Initialize( { NTSTATUS ntStatus = STATUS_SUCCESS; PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); - + // // We should implement SDIO initialization process on WDF framework if needed. // 1. Async SD Request initiallization and corresponding event // 2. All Sync SD Request initialization for IO or TxRx engine // 2012.01.19. // - + // // Initialize event for control request. // @@ -87,7 +87,7 @@ WdfSdio_Halt( // // // - + WdfSdio_Disable(pAdapter); WdfSdio_DeInitAsyncSDRequest(pAdapter); @@ -96,7 +96,7 @@ WdfSdio_Halt( // // Description: -// Start all Tx queues +// Start all Tx queues // VOID WdfSdioTx_Enable( @@ -113,7 +113,7 @@ WdfSdioTx_Enable( // // Description: -// Tell framework to stop all pipes and wait until +// Tell framework to stop all pipes and wait until // all pending requests completed. // VOID @@ -125,9 +125,9 @@ WdfSdio_Disable( // // // - + // - // Cancel and wait all async SD request completed. + // Cancel and wait all async SD request completed. // WdfSdio_CancelAsyncSDReq(pAdapter); @@ -171,7 +171,7 @@ WdfSdio_DeInitAsyncSDRequest( // // Description: -// Cancel and wait all async vendor request completed. +// Cancel and wait all async vendor request completed. // VOID WdfSdio_CancelAsyncSDReq( @@ -186,11 +186,11 @@ WdfSdio_CancelAsyncSDReq( if(pDevice->nIrpPendingCnt > 0) { if(pDevice->bAsynIoWritePending) - { + { RT_TRACE(COMP_IO, DBG_LOUD, ("WdfSdio_CancelAsyncSDReq(): AsynIoWritePending => cancel it....\n")); AsyncVendorRequest = pWdfUsbDevCtx->AsyncVendorRequest; NdisReleaseSpinLock( &(pDevice->IrpSpinLock) ); - + // // Cancel the WDFREQUEST for AsynIO write request. // @@ -250,7 +250,7 @@ WdfSdio_AsyncVendorRequestWrite( IN PADAPTER pAdapter, IN u1Byte bReq, // 1 byte bReq field of setup token. IN u2Byte wValue, // 2 byte wValue field of setup token. - IN u2Byte wIndex, // 2 byte wIndex field of setup token. + IN u2Byte wIndex, // 2 byte wIndex field of setup token. IN pu1Byte pBuffer, // Pointer to buffer to transfer in data-phase. IN u4Byte BufferLength // # of bytes to OUT or maximal # of bytes to IN. ) @@ -258,7 +258,7 @@ WdfSdio_AsyncVendorRequestWrite( // // // - + return TRUE; } @@ -268,7 +268,7 @@ WdfSdio_AsyncVendorRequestWrite( // Initialize PlatformReserved[] of this SDIO_OUT_CONTEXT object. // It return TRUE on success, FALSE otherwise. // -BOOLEAN +BOOLEAN PlatformSdioInitTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext @@ -279,7 +279,7 @@ PlatformSdioInitTxContext( // // // - + return bResult; } @@ -289,7 +289,7 @@ PlatformSdioInitTxContext( // Description: // Free URB and IRP allocated for this SDIO_OUT_CONTEXT object. // -VOID +VOID PlatformSdioDeInitTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext @@ -298,7 +298,7 @@ PlatformSdioDeInitTxContext( // // // - + } @@ -320,7 +320,7 @@ PlatformSdioTxEnqueue( { BOOLEAN bResult = TRUE; - + // // // @@ -331,7 +331,7 @@ PlatformSdioTxEnqueue( // // Description: -// Tell framework we are ready to issue Tx transfer on +// Tell framework we are ready to issue Tx transfer on // all Tx queues we selected. // // Assumption: @@ -351,7 +351,7 @@ WdfSdio_EnableAllTxQueues( // // Description: -// Tell framework to stop ongoing OUT transfers on +// Tell framework to stop ongoing OUT transfers on // all IN pipes we selected. // // Assumption: @@ -378,7 +378,7 @@ WdfSdio_DisableAllTxQueues( // Change IO Target to Stopped state to make it reject further request. // ioTargetState = WdfIoTargetGetState(WdfUsbTargetPipeGetIoTarget(hPipe)); - if(ioTargetState == WdfIoTargetStarted) + if(ioTargetState == WdfIoTargetStarted) { pRtOutPipe->IrpPendingCount--; @@ -387,15 +387,15 @@ WdfSdio_DisableAllTxQueues( // PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); RT_TRACE(COMP_SEND, DBG_LOUD, ("WdfSdio_DisableAllTxQueues(): stopping %d pipe ..........\n", idx)); - WdfIoTargetStop(WdfUsbTargetPipeGetIoTarget(hPipe), WdfIoTargetCancelSentIo); + WdfIoTargetStop(WdfUsbTargetPipeGetIoTarget(hPipe), WdfIoTargetCancelSentIo); PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); // // Wait outstanding requests completed. - // + // RT_TRACE(COMP_SEND, DBG_LOUD, ("WdfSdio_DisableAllTxQueues(): nInPipeIdx(%d) IrpPendingCounts=%d\n", idx, pRtOutPipe->IrpPendingCount)); if( !RTIsListEmpty( &(pRtOutPipe->ContextBusyList) ) ) - { + { PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); while( !NdisWaitEvent(&(pRtOutPipe->AllIrpReturnedEvent), 50) ) { @@ -408,8 +408,8 @@ WdfSdio_DisableAllTxQueues( } else { - RT_TRACE(COMP_SEND, DBG_LOUD, - ("Try to stop OUT piep(%d) already in stopped state(%#X)\n", + RT_TRACE(COMP_SEND, DBG_LOUD, + ("Try to stop OUT piep(%d) already in stopped state(%#X)\n", idx, ioTargetState)); } } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.h index 25bfcbc7d..5687870a7 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdf.h @@ -6,16 +6,16 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: N6Sdio_PlatformSdioWdf.h - + Abstract: Prototype of WdfSdio_XXX() implemented via WDF SDIO. - These function shall be only use under Platform\. - + These function shall be only use under Platform\. + Major Change History: When Who What ---------- --------------- ------------------------------- 2012-01-16 Roger Create. - + --*/ #if USE_WDF_SDIO @@ -62,7 +62,7 @@ WdfSdio_AsyncVendorRequestWrite( IN PADAPTER pAdapter, IN u1Byte bReq, // 1 byte bReq field of setup token. IN u2Byte wValue, // 2 byte wValue field of setup token. - IN u2Byte wIndex, // 2 byte wIndex field of setup token. + IN u2Byte wIndex, // 2 byte wIndex field of setup token. IN pu1Byte pBuffer, // Pointer to buffer to transfer in data-phase. IN u4Byte BufferLength // # of bytes to OUT or maximal # of bytes to IN. ); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.c index a98f42291..103d2f80e 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.c @@ -3,17 +3,17 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: N6Sdio_PlatformSdioWdm.c - + Abstract: Implement PlatformSdioXXX() on WDM. Prototype of WdmSdio_XXX() implemented via WDM SDIO. - These function shall be only use under Platform\. - + These function shall be only use under Platform\. + Major Change History: When Who What ---------- --------------- ------------------------------- 2012-01-13 Roger Create. - + --*/ #include "Mp_Precomp.h" @@ -32,7 +32,7 @@ Major Change History: // Prototype of protected function. //================================================================================ RT_STATUS -N6SdioTxComplete( +N6SdioTxComplete( IN PVOID Context, IN BOOLEAN bResult ); @@ -40,7 +40,7 @@ N6SdioTxComplete( NTSTATUS N6SdioHandleInterrupt( - PVOID Context, + PVOID Context, u4Byte InterruptType ); @@ -54,18 +54,18 @@ N6SdioHandleInterrupt( // Allocate URB and IRP for this SDIO_OUT_CONTEXT object. // It return TRUE on success, FALSE otherwise. // -BOOLEAN +BOOLEAN PlatformSdioInitInContext( IN PADAPTER pAdapter, IN PSDIO_IN_CONTEXT pContext ) { - PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); + PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); - pContext->PlatformReserved[0] = pAdapter; - pContext->PlatformReserved[1] = NULL; - pContext->PlatformReserved[2] = NULL; - pContext->PlatformReserved[3] = NULL; + pContext->PlatformReserved[0] = pAdapter; + pContext->PlatformReserved[1] = NULL; + pContext->PlatformReserved[2] = NULL; + pContext->PlatformReserved[3] = NULL; return TRUE; } @@ -75,16 +75,16 @@ PlatformSdioInitInContext( // Description: // Free URB and IRP allocated for this USB_IN_CONTEXT object. // -VOID +VOID PlatformSdioDeInitInContext( IN PADAPTER pAdapter, IN PSDIO_IN_CONTEXT pContext ) { - pContext->PlatformReserved[0] = NULL; - pContext->PlatformReserved[1] = NULL; - pContext->PlatformReserved[2] = NULL; - pContext->PlatformReserved[3] = NULL; + pContext->PlatformReserved[0] = NULL; + pContext->PlatformReserved[1] = NULL; + pContext->PlatformReserved[2] = NULL; + pContext->PlatformReserved[3] = NULL; } @@ -97,7 +97,7 @@ PlatformSdioDeInitInContext( // Allocate resources for this SDIO_OUT_CONTEXT object. // It return TRUE on success, FALSE otherwise. // -BOOLEAN +BOOLEAN PlatformSdioInitTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext @@ -105,10 +105,10 @@ PlatformSdioInitTxContext( { PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); - pContext->PlatformReserved[0] = pAdapter; - pContext->PlatformReserved[1] = NULL; - pContext->PlatformReserved[2] = NULL; - pContext->PlatformReserved[3] = NULL; + pContext->PlatformReserved[0] = pAdapter; + pContext->PlatformReserved[1] = NULL; + pContext->PlatformReserved[2] = NULL; + pContext->PlatformReserved[3] = NULL; return TRUE; } @@ -119,16 +119,16 @@ PlatformSdioInitTxContext( // Description: // Free allocated resources for this SDIO_OUT_CONTEXT object. // -VOID +VOID PlatformSdioDeInitTxContext( IN PADAPTER pAdapter, IN PSDIO_OUT_CONTEXT pContext ) { - pContext->PlatformReserved[0] = NULL; - pContext->PlatformReserved[1] = NULL; - pContext->PlatformReserved[2] = NULL; - pContext->PlatformReserved[3] = NULL; + pContext->PlatformReserved[0] = NULL; + pContext->PlatformReserved[1] = NULL; + pContext->PlatformReserved[2] = NULL; + pContext->PlatformReserved[3] = NULL; } @@ -152,7 +152,7 @@ PlatformSdioTxEnqueue( PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); BOOLEAN bResult = TRUE; u1Byte TxQueueIdx = pContext->TxQueueIndex; - PRT_SDIO_TX_QUEUE pTxQueue = &(pDevice->RtTxQueue[TxQueueIdx]); + PRT_SDIO_TX_QUEUE pTxQueue = &(pDevice->RtTxQueue[TxQueueIdx]); PRT_TCB pTcb = pContext->pTcb; RT_TRACE(COMP_SEND, DBG_TRACE, ("===>PlatformSdioTxEnqueue(): Context(%p)\n", pContext)); @@ -160,7 +160,7 @@ PlatformSdioTxEnqueue( // If IrpPendingCount is 0, we shall take it as a signal that SDIO Tx Queue is disabled. if ((pTxQueue->IrpPendingCount < 1) || (!pTxQueue->bEnabled)) { - RT_TRACE(COMP_SEND, DBG_LOUD, + RT_TRACE(COMP_SEND, DBG_LOUD, ("PlatformSdioTxEnqueue() exit because of Tx Queue is not enabled or IrpPendingCount == 0 !!\n")); return FALSE; } @@ -175,17 +175,17 @@ PlatformSdioTxEnqueue( pTxQueue->IrpPendingCount++; pTcb->sysTime[1] = PlatformGetCurrentTime(); pAdapter->firstTcbSysTime[TxQueueIdx] = pTcb->sysTime[1]; - + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); // Releases the specified Tx semaphore object for SDIO Data transfer. PlatformReleaseSemaphore(&pDevice->TxSemaphore); //PlatformReleaseSemaphore(&pAdapter->txGen.txGenSemaphore); - + PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); RT_TRACE(COMP_SEND, DBG_TRACE, ("<===PlatformSdioTxEnqueue(): Context(%p)\n", pContext)); - + return bResult; } @@ -205,15 +205,15 @@ PlatformSdioTxDequeue( ) { PADAPTER pDefaultAdapter = GetDefaultAdapter(((PADAPTER)pAdapter)); - PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(pDefaultAdapter); + PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(pDefaultAdapter); PRT_SDIO_TX_QUEUE pTxQueue = NULL; - PSDIO_OUT_CONTEXT pContext = NULL; - - pTxQueue= &(sdiodevice->RtTxQueue[QueueIdx]); + PSDIO_OUT_CONTEXT pContext = NULL; + + pTxQueue= &(sdiodevice->RtTxQueue[QueueIdx]); RT_ASSERT((!RTIsListEmpty(&(pTxQueue->ContextBusyList))), ("Tx Queue is empty!!")); pContext = (PSDIO_OUT_CONTEXT)RTRemoveHeadList(&(pTxQueue->ContextBusyList)); - return pContext; + return pContext; } @@ -222,7 +222,7 @@ PlatformSdioTxDequeue( // This SDIO platform dependent routine for SDIO CMD53 block mode data transfer. // // Assumption: -// RT_TX_SPINLOCK is NOT acquired. and driver must refresh Tx free page number by reading +// RT_TX_SPINLOCK is NOT acquired. and driver must refresh Tx free page number by reading // FREE_TXPG page Register to make sure that the free page is enough. // // Created by Roger, 2011.01.20. @@ -234,7 +234,7 @@ PlatformSdioTxTransfer( ) { PADAPTER pDefaultAdapter = GetDefaultAdapter(((PADAPTER)pAdapter)); - PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(pDefaultAdapter); + PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(pDefaultAdapter); u1Byte DeviceID = 0; u4Byte offset = 0; // Aggregation length [12:0] is zero. BOOLEAN bResult = TRUE; @@ -244,7 +244,7 @@ PlatformSdioTxTransfer( PRT_TCB pTcb = pContext->pTcb; - RT_TRACE(COMP_SEND, DBG_TRACE, ("--->PlatformSdioTxTransfer(): Context(%p), BufLen(%#x), TxQueueIndex(%d)\n", + RT_TRACE(COMP_SEND, DBG_TRACE, ("--->PlatformSdioTxTransfer(): Context(%p), BufLen(%#x), TxQueueIndex(%d)\n", pContext, pContext->BufLen, pContext->TxQueueIndex)); //RT_PRINT_DATA(COMP_SEND, DBG_TRACE, ("TxBuffer:"), pContext->Buffer, pContext->BufLen); @@ -254,13 +254,13 @@ PlatformSdioTxTransfer( return FALSE; } - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); // Do not drop Tx packet which is from BCN queue during RF off state to prevent from ROM download FW // failed in RF on progress. Only protect power off case by "bMacPwrCtrlOn". 2013.11.21, tynli. if(((rfState == eRfOff) && (pTcb->SpecifiedQueueID != BEACON_QUEUE)) || (bMacPwrCtrlOn != TRUE)) - {// This packet should not be sent if RF is OFF, drop it !! + {// This packet should not be sent if RF is OFF, drop it !! RT_TRACE(COMP_SEND, DBG_TRACE, ("<---PlatformSdioTxTransfer(): RF Off or Power Off!!\n")); return FALSE; } @@ -287,35 +287,35 @@ PlatformSdioTxTransfer( DeviceID = WLAN_TX_LOQ_DEVICE_ID; break; } - + // Beacon queue is not related to HI, LOW, NORMAL and PUBLIC queue. It will be sent to reserved page directly // so we just need to check the reserved page size in Tx buffer. 2013.01.04. by tynli. - + RT_ASSERT((pContext->BufLen + (pContext->BufLen%4?(4-pContext->BufLen%4):0) <= pAdapter->MAX_TRANSMIT_BUFFER_SIZE), ("PlatformSdioTxTransfer(): Over MAX_TRANSMIT_BUFFER_SIZE\n")); - + if(pTcb->SpecifiedQueueID != BEACON_QUEUE ) { if((pContext->BufLen + (pContext->BufLen%4?(4-pContext->BufLen%4):0) > pAdapter->MAX_TRANSMIT_BUFFER_SIZE)) return FALSE; } - + //Using Burst Tx mode to transfer multiple blocks. status = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, DeviceID, - sdiodevice->SdioFuncNum, - pContext->BufLen + (pContext->BufLen%4?(4-pContext->BufLen%4):0), + sdiodevice->SdioFuncNum, + pContext->BufLen + (pContext->BufLen%4?(4-pContext->BufLen%4):0), ((pContext->BufLen/4) + (pContext->BufLen%4?1:0)& 0x1FFF),// Aggregation length [12:0] TRUE, - pContext->Buffer); - - RT_ASSERT(((pContext->BufLen + (pContext->BufLen%4?(4-pContext->BufLen%4):0)) % ((pContext->BufLen/4) + (pContext->BufLen%4?1:0)& 0x1FFF)) ==0, + pContext->Buffer); + + RT_ASSERT(((pContext->BufLen + (pContext->BufLen%4?(4-pContext->BufLen%4):0)) % ((pContext->BufLen/4) + (pContext->BufLen%4?1:0)& 0x1FFF)) ==0, ("PlatformSdioTxTransfer(): Invalid transfer length!!\n")); - - if(status != RT_STATUS_SUCCESS) - return FALSE; - RT_TRACE(COMP_SEND, DBG_TRACE, ("<---PlatformSdioTxTransfer(): Context(%p), TxQueueIndex(%d), bResult(%d)\n", + if(status != RT_STATUS_SUCCESS) + return FALSE; + + RT_TRACE(COMP_SEND, DBG_TRACE, ("<---PlatformSdioTxTransfer(): Context(%p), TxQueueIndex(%d), bResult(%d)\n", pContext, pContext->TxQueueIndex, bResult)); return bResult; @@ -336,7 +336,7 @@ BOOLEAN PlatformSdioRxTransfer( IN PADAPTER pAdapter, IN PRT_RFD pRfd, - IN u4Byte Rx0ReqLength + IN u4Byte Rx0ReqLength ) { PADAPTER pDefaultAdapter = GetDefaultAdapter(((PADAPTER)pAdapter)); @@ -344,18 +344,18 @@ PlatformSdioRxTransfer( RT_RF_POWER_STATE rfState; BOOLEAN bMacPwrCtrlOn; u2Byte RxDesc2Bytes= 0; - RT_STATUS rtStatus = RT_STATUS_SUCCESS; + RT_STATUS rtStatus = RT_STATUS_SUCCESS; u1Byte FwPSState; BOOLEAN bRxTransSuccess = TRUE; RT_TRACE(COMP_RECV, DBG_TRACE, ("--->PlatformSdioRxTransfer()\n")); - + if(RT_SDIO_CANNOT_RX(pAdapter)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformSdioTxTransfer(): SDIO not allow to RX, Return Fail.\n")); return FALSE; } - + PlatformAcquireSpinLock(pAdapter, RT_RX_SPINLOCK); RT_SDIO_INC_RX_TRANS_REF(sdiodevice); PlatformReleaseSpinLock(pAdapter, RT_RX_SPINLOCK); @@ -371,8 +371,8 @@ PlatformSdioRxTransfer( break; } PlatformReleaseSpinLock(pAdapter, RT_RX_SPINLOCK); - - pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); + + pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_APFM_ON_MAC, (pu1Byte)(&bMacPwrCtrlOn)); if(((rfState == eRfOff) && (!RT_IN_PS_LEVEL(pAdapter, RT_RF_OFF_LEVEL_FW_IPS_32K))) || (bMacPwrCtrlOn != TRUE)) @@ -380,7 +380,7 @@ PlatformSdioRxTransfer( RT_TRACE(COMP_POWER, DBG_LOUD, ("<---PlatformSdioRxTransfer(): RF Off or Power Off!!\n")); bRxTransSuccess = FALSE; break; - } + } // Leave 32K when there is an Rx packet to receive. It is a workaround to patch FW enters 32K when // driver is handling DMA packet then cause Rx cmd fail and Rx0 packet length always zero issue. @@ -389,7 +389,7 @@ PlatformSdioRxTransfer( { if(pDefaultAdapter->bFWReady) { - pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); + pDefaultAdapter->HalFunc.GetHwRegHandler(pDefaultAdapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(pDefaultAdapter, FwPSState)) { RT_TRACE(COMP_POWER, DBG_LOUD, ("PlatformSdioRxTransfer(): In 32K ---> Wake up Hw. \n")); @@ -400,10 +400,10 @@ PlatformSdioRxTransfer( //Using Burst Rx mode to transfer multiple blocks. rtStatus = PlatformSdioCmd53ReadWrite( - sdiodevice, + sdiodevice, WLAN_RX0FF_DEVICE_ID, - sdiodevice->SdioFuncNum, - Rx0ReqLength, + sdiodevice->SdioFuncNum, + Rx0ReqLength, (ULONG)(RT_SDIO_GET_RX_SEQ_NUM(pAdapter)%4), //SEQ[1:0] in RX_RX0FF, Shift Bits = 0 FALSE, pRfd->Buffer.VirtualAddress); @@ -417,7 +417,7 @@ PlatformSdioRxTransfer( bRxTransSuccess = FALSE; break; } - + PlatformAcquireSpinLock(pAdapter, RT_RX_SPINLOCK); // Increase SDIO Rx sequence number @@ -455,7 +455,7 @@ PlatformSdioRxTransfer( // // Description: // Check if Sdio Tx busy queue is empty. -// Input: +// Input: // QueueID - Specified ID, ex: VO, VI, BE, BK // // Created by tynli, 2014.07.14. @@ -470,7 +470,7 @@ PlatformSdioTxQueueIdxEmpty( PRT_SDIO_TX_QUEUE pTxQueue = NULL; u1Byte SdioTxQueueIdx = QueueID; // Only search for those 3 queue in sdio BOOLEAN bEmpty = TRUE; - + //SdioTxQueueIdx = MapTxQueueToOutPipe(Adapter, QueueID);// Get index to out pipe from specified QueueID. PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); @@ -505,7 +505,7 @@ PlatformSdioTxAndAwbQueueEmpty( PRT_SDIO_TX_QUEUE pTxQueue = NULL; u1Byte QueueID; BOOLEAN bEmpty = TRUE; - + // Check if Tx queue empty. for(QueueID=0; QueueIDTxQueueIndex; @@ -589,9 +589,9 @@ N6SdioTxComplete( { RT_TRACE(COMP_SEND, DBG_SERIOUS, ("N6SdioTxComplete(): Context is already returned!!\n") ); } - + if(pThisContext->bTxPending) - pAdapter->HalFunc.HalSdioTxCompleteHandler(pAdapter, pThisContext, (bResult ? HAL_SDIO_COMPLETED_OK : HAL_SDIO_COMPLETED_ERROR)); + pAdapter->HalFunc.HalSdioTxCompleteHandler(pAdapter, pThisContext, (bResult ? HAL_SDIO_COMPLETED_OK : HAL_SDIO_COMPLETED_ERROR)); PlatformReleaseSemaphore(&pAdapter->txGen.txGenSemaphore); // @@ -617,7 +617,7 @@ N6SdioTxComplete( break; // - // Handle NBLs buffered. + // Handle NBLs buffered. // if(pTargetDevice->SendingNetBufferList == NULL) // Add this to prevent from Tx out-of-order. { @@ -639,7 +639,7 @@ N6SdioTxComplete( RT_TRACE(COMP_SEND, DBG_LOUD, ("N6SdioTxComplete(): pTargetAdapter(%p) handle the NBL buffered(%p)\n", pTargetAdapter, pNetBufferList )); if( !N6SdioSendSingleNetBufferList( - pTargetAdapter, + pTargetAdapter, pNetBufferList, TRUE) ) // bFromQueue { @@ -673,7 +673,7 @@ N6SdioTxComplete( // Check if driver is going to unload. // if(pTxQueue->IrpPendingCount == 0) - { + { RT_TRACE(COMP_SEND, DBG_LOUD, ("N6SdioTxComplete(%d): IrpPendingCount==0 => Driver is going to unload.\n", QueueIndex)); PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); NdisSetEvent(&pTxQueue->AllIrpReturnedEvent); @@ -684,13 +684,13 @@ N6SdioTxComplete( } RT_TRACE(COMP_SEND, DBG_TRACE, ("<===N6SdioTxComplete(): Context(%p)\n", pThisContext)); - + return RT_STATUS_SUCCESS; } // -// Description: +// Description: // whether any context is pended in ContextBusyList. // // Assumption: @@ -703,36 +703,36 @@ N6SdioTxQueuePending( IN PADAPTER Adapter ) { - PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - PRT_SDIO_TX_QUEUE pTxQueue = NULL; + PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); + PRT_SDIO_TX_QUEUE pTxQueue = NULL; BOOLEAN bTxQueuePending = FALSE; u1Byte i = 0; PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); - + for (i=0; iRtTxQueue[i]); - + pTxQueue= &(sdiodevice->RtTxQueue[i]); + if(!RTIsListEmpty(&(pTxQueue->ContextBusyList))) { bTxQueuePending = TRUE; - break; + break; } - } - + } + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_SEND, DBG_TRACE, ("N6SdioTxQueuePending(): return (%d)\n", bTxQueuePending)); - + return bTxQueuePending; } // -// Description: -// Release corresponding context in each ContextBusyList while driver is going to unload. +// Description: +// Release corresponding context in each ContextBusyList while driver is going to unload. // // Assumption: // RT_TX_SPINLOCK is NOT acquired. @@ -744,41 +744,41 @@ N6SdioReleaseTxQueuePending( IN PADAPTER Adapter ) { - PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - PRT_SDIO_TX_QUEUE pTxQueue = NULL; + PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); + PRT_SDIO_TX_QUEUE pTxQueue = NULL; BOOLEAN bTxQueuePending = FALSE; PSDIO_OUT_CONTEXT pOutContextToRelease = NULL; u1Byte i = 0; - + for (i=0; iRtTxQueue[i]); - + + pTxQueue= &(sdiodevice->RtTxQueue[i]); + while(!RTIsListEmpty(&(pTxQueue->ContextBusyList))) { pOutContextToRelease = (PSDIO_OUT_CONTEXT)RTRemoveHeadList( &(pTxQueue->ContextBusyList) ); PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - N6SdioTxComplete(pOutContextToRelease, FALSE); + N6SdioTxComplete(pOutContextToRelease, FALSE); PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - } + } RT_TRACE(COMP_SEND, DBG_TRACE, ("N6SdioReleaseTxQueuePending(): return (%d)\n", bTxQueuePending)); - + return bTxQueuePending; } -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // -// Description: -// This user created thread handles the SDIO block synchronous write operation at PASSIVE_LEVEL. +// Description: +// This user created thread handles the SDIO block synchronous write operation at PASSIVE_LEVEL. // // 2011.06.23, created by Roger. // @@ -787,12 +787,12 @@ N6SdioIOThreadCallback( IN PVOID pContext ) { - + PADAPTER Adapter = ((PRT_THREAD)pContext)->Adapter; - PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - PRT_SDIO_TX_QUEUE pTxQueue = NULL; + PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); + PRT_SDIO_TX_QUEUE pTxQueue = NULL; PSDIO_OUT_CONTEXT pOutContextToSend = NULL; - PRT_AWB pAwb = NULL; + PRT_AWB pAwb = NULL; PRT_AWB pAwb2Complete = NULL; BOOLEAN bResult = TRUE; u4Byte TargetAddr = 0; @@ -806,61 +806,61 @@ N6SdioIOThreadCallback( { RT_ASSERT(FALSE, ("N6SdioIOThreadCallback() in PASSIVE_LEVEL is not allowed!!\n")); return; - } - + } + while(TRUE) - { - + { + // - // We only need to take care of surprise removal or driver unload event to prevent IO thread function disable by + // We only need to take care of surprise removal or driver unload event to prevent IO thread function disable by // Function BIT disable, e.g., DF_IO_BIT - // + // if( RT_DRIVER_HALT(Adapter) ) break; - + if(!Adapter->bInitComplete) continue; - + if( PlatformAcquireSemaphore(&sdiodevice->IOSemaphore) != RT_STATUS_SUCCESS ) break; // - // We need to take care of surprise removal, driver unload event and DF_IO_BIT to pause IO handling, + // We need to take care of surprise removal, driver unload event and DF_IO_BIT to pause IO handling, // and then return to previous waiting state. - // + // if( RT_USB_CANNOT_IO(Adapter) ) continue; - //2Check AWB Wait Queue. + //2Check AWB Wait Queue. PlatformAcquireSpinLock(Adapter, RT_AWB_SPINLOCK); if( !RTIsListEmpty( &(sdiodevice->AwbWaitQueue))) { - PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); - + PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); + // Retrieve the first AWB to perform specific write operation - PlatformAcquireSpinLock(Adapter, RT_AWB_SPINLOCK); - pAwb = (PRT_AWB)RTGetHeadList( &sdiodevice->AwbWaitQueue); + PlatformAcquireSpinLock(Adapter, RT_AWB_SPINLOCK); + pAwb = (PRT_AWB)RTGetHeadList( &sdiodevice->AwbWaitQueue); PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); - + RT_TRACE(COMP_IO, DBG_TRACE, ("N6SdioIOThreadCallback(): Dequeue AWB, DeviceID(%d), Offset(%#x), ByteCnt(%#x), NumIdleAwb(%d)\n", pAwb->DeviceID, pAwb->Offset, pAwb->ByteCnt, sdiodevice->NumIdleAwb)); - RT_PRINT_DATA(COMP_IO, DBG_TRACE, "N6SdioIOThreadCallback(): Buffer:\n", + RT_PRINT_DATA(COMP_IO, DBG_TRACE, "N6SdioIOThreadCallback(): Buffer:\n", pAwb->DataBuf, pAwb->ByteCnt); //2 Check whether underlying HW is in power saving 32k mode. if(Adapter->bFWReady) { Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); - if(IS_IN_LOW_POWER_STATE(Adapter, FwPSState) && + if(IS_IN_LOW_POWER_STATE(Adapter, FwPSState) && !IS_SDIO_POWER_ON_IO_REG(pAwb->DeviceID, pAwb->Offset)) - { - RT_TRACE(COMP_POWER, DBG_LOUD, + { + RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioIOThreadCallback(): CANNOT IO---> Wake up Hw. DeviceID(%d), offset(%#X)\n", pAwb->DeviceID, pAwb->Offset)); Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_RESUME_CLK_ON, (pu1Byte)(&Adapter)); } } - + bUpdatePreRpwm = FALSE; - + // tynli_test. Check the register and update driver maintain variables. 2011.09.02. if(pAwb->DeviceID == SDIO_LOCAL_DEVICE_ID) { @@ -879,14 +879,14 @@ N6SdioIOThreadCallback( // Perform write operatrion in specific device ID and offset - PlatformIOSyncWriteNByte(Adapter, pAwb->DeviceID, pAwb->Offset, pAwb->ByteCnt, pAwb->DataBuf); + PlatformIOSyncWriteNByte(Adapter, pAwb->DeviceID, pAwb->Offset, pAwb->ByteCnt, pAwb->DataBuf); if(bUpdatePreRpwm) - { + { Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_PRE_RPWM, pAwb->DataBuf); bFwClkChangeInProgress = FALSE; Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_FW_CLK_CHANGE_STATE, (pu1Byte)(&bFwClkChangeInProgress)); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioIOThreadCallback(): RPWM write OK. Release bFwClkChangeInProgress!!!\n")); } @@ -898,26 +898,26 @@ N6SdioIOThreadCallback( PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); } else - { + { PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); - RT_TRACE(COMP_IO, DBG_LOUD, ("N6SdioIOThreadCallback(): AWB QueueIdx is empty!!\n")); - } + RT_TRACE(COMP_IO, DBG_LOUD, ("N6SdioIOThreadCallback(): AWB QueueIdx is empty!!\n")); + } } // Release all buffered AWBs before leaving this thread. PlatformAcquireSpinLock(Adapter, RT_AWB_SPINLOCK); - while( !RTIsListEmpty(&(sdiodevice->AwbWaitQueue)) ) + while( !RTIsListEmpty(&(sdiodevice->AwbWaitQueue)) ) { pAwb = (PRT_AWB)RTRemoveHeadListWithCnt( &(sdiodevice->AwbWaitQueue), &(sdiodevice->NumWaitAwb)); ReturnSdioAWB(sdiodevice, pAwb); } - PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_AWB_SPINLOCK); } #endif // -// Description: +// Description: // This user created thread handles the CMD53 Data Transfer on SDIO bus. // Preparing for SDIO Data transfer: // 1. If all Context Queue is empty, then break. @@ -935,10 +935,10 @@ N6SdioTxThreadCallback( IN PVOID pContext ) { - + PADAPTER Adapter = ((PRT_THREAD)pContext)->Adapter; - PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - PRT_SDIO_TX_QUEUE pTxQueue = NULL; + PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); + PRT_SDIO_TX_QUEUE pTxQueue = NULL; PSDIO_OUT_CONTEXT pOutContextToSend; PSDIO_OUT_CONTEXT pOutContextToComplete = NULL; u1Byte queueIdx = 0; @@ -951,23 +951,23 @@ N6SdioTxThreadCallback( { RT_ASSERT(FALSE, ("N6SdioTxThreadCallback() in PASSIVE_LEVEL is not allowed!!\n")); return; - } - + } + while(TRUE) { - + //2 Packet Transmission processing on SDIO bus. - + // - // We only need to take care of surprise removal or driver unload event to prevent Tx thread function disable by + // We only need to take care of surprise removal or driver unload event to prevent Tx thread function disable by // Function BIT disable, e.g., DF_TX_BIT - // + // if( RT_DRIVER_HALT(Adapter) ) break; - + if(!Adapter->bInitComplete) continue; - + if( PlatformAcquireSemaphore(&sdiodevice->TxSemaphore) != RT_STATUS_SUCCESS ) break; @@ -978,34 +978,34 @@ N6SdioTxThreadCallback( do { busyCount = 0; - + if( RT_SDIO_CANNOT_TX(Adapter) ) break; //2Check Context busy Queue. if( N6SdioTxQueuePending(Adapter) == FALSE ) - break; + break; //2Dequeue the context from specific queue and Transfer data. - + for ( queueIdx=0; queueIdx Check whether underlying HW is in power saving 32k mode. PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); pTxQueue= &(sdiodevice->RtTxQueue[queueIdx]); if(!RTIsListEmpty(&(pTxQueue->ContextBusyList))) { //tynli_test_32k 2011.02.25. PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); + + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(Adapter, FwPSState)) - { + { RT_TRACE(COMP_SEND, DBG_TRACE, ("N6SdioTxThreadCallback(): CANNOT TX ---> Wake up Hw.\n")); Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_RESUME_CLK_ON, (pu1Byte)(&Adapter)); } @@ -1014,11 +1014,11 @@ N6SdioTxThreadCallback( { PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); } - + PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); // Retrieve Busy Context from specific Tx Queue - pTxQueue= &(sdiodevice->RtTxQueue[queueIdx]); + pTxQueue= &(sdiodevice->RtTxQueue[queueIdx]); if(!RTIsListEmpty(&(pTxQueue->ContextBusyList))) { pOutContextToSend = (PSDIO_OUT_CONTEXT)RTGetHeadList( &(pTxQueue->ContextBusyList)); @@ -1026,20 +1026,20 @@ N6SdioTxThreadCallback( pTcb->sysTime[2] = PlatformGetCurrentTime(); } else - { + { PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_POWER, DBG_TRACE, ("N6SdioTxThreadCallback(): QueueIdx(%d) is empty check next queue index\n", queueIdx)); - queueIdx++; // Next Tx FIFO Queue index + queueIdx++; // Next Tx FIFO Queue index continue; - } - + } + // - //Check whether the number of free pages in TxFIFO is available to perform SDIO data transfer. + //Check whether the number of free pages in TxFIFO is available to perform SDIO data transfer. // if( !Adapter->HalFunc.HalSdioQueryTxBufferAvailableHandler( - Adapter, + Adapter, pOutContextToSend)) - { + { pOutContextToSend = NULL; PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); RT_TRACE(COMP_SEND, DBG_WARNING, ("N6SdioTxThreadCallback(): TxQueueIdx(%d) Tx FIFO is full!!\n", queueIdx)); @@ -1050,7 +1050,7 @@ N6SdioTxThreadCallback( // swapping out more often. 2015.04.30, by tynli. [SDIO-287] // PlatformStallExecution(1); - + busyCount++; if(busyCount > 100) // Prevent Tx starvation queueIdx++; @@ -1059,10 +1059,10 @@ N6SdioTxThreadCallback( // // Check whether Fw state is in 32k. 2011.05.10. by tynli. - // - Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); + // + Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_FW_PS_STATE, &FwPSState); if(IS_IN_LOW_POWER_STATE(Adapter, FwPSState)) - { + { RT_TRACE(COMP_POWER, DBG_TRACE, ("N6SdioTxThreadCallback(): Hw still in 32k. Return packet. <----\n")); pOutContextToSend = NULL; PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); @@ -1072,21 +1072,21 @@ N6SdioTxThreadCallback( PlatformSleepUs(1); continue; } - + // // SDIO Tx FIFO is available to perform data transfer. - // - pTxQueue= &(sdiodevice->RtTxQueue[queueIdx]); + // + pTxQueue= &(sdiodevice->RtTxQueue[queueIdx]); if(!RTIsListEmpty(&(pTxQueue->ContextBusyList))) { // Retrieve the first context to send - pOutContextToSend = (PSDIO_OUT_CONTEXT)RTGetHeadList( &(pTxQueue->ContextBusyList)); + pOutContextToSend = (PSDIO_OUT_CONTEXT)RTGetHeadList( &(pTxQueue->ContextBusyList)); PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); bResult = PlatformSdioTxTransfer(Adapter, pOutContextToSend); PlatformAcquireSpinLock(Adapter, RT_TX_SPINLOCK); - pOutContextToComplete = (PSDIO_OUT_CONTEXT)RTGetHeadList( &(pTxQueue->ContextBusyList)); + pOutContextToComplete = (PSDIO_OUT_CONTEXT)RTGetHeadList( &(pTxQueue->ContextBusyList)); // Check the head item is the same or not, to avoid the TxQueue being cleaned by other thread outside the scope of TX_LOCK if((pOutContextToSend==pOutContextToComplete) && !RTIsListEmpty(&(pTxQueue->ContextBusyList))) { @@ -1107,16 +1107,16 @@ N6SdioTxThreadCallback( { RT_ASSERT(FALSE, ("TxQueue(%d) ContextBusyList is empty!!\n", queueIdx)); PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); - } + } if( N6SdioTxQueuePending(Adapter) == FALSE ) { RT_TRACE(COMP_SEND, DBG_TRACE, ("N6SdioTxThreadCallback(): All Queues are empty, exit!!\n")); - break; + break; } - + queueIdx++; // Next Tx FIFO Queue - } + } //Check Context busy Queue here, if all busy contexts are cleared and then break. if( N6SdioTxQueuePending(Adapter) == FALSE ) @@ -1131,14 +1131,14 @@ N6SdioTxThreadCallback( } // Release Tx Queue buffered context if needed. - N6SdioReleaseTxQueuePending(Adapter); + N6SdioReleaseTxQueuePending(Adapter); } // -// Description: -// The bus driver calls the SD card driver's callback routine whenever the card indicates an interrupt. -// The callback routine must send the appropriate device commands to handle and clear the interrupt on the card. +// Description: +// The bus driver calls the SD card driver's callback routine whenever the card indicates an interrupt. +// The callback routine must send the appropriate device commands to handle and clear the interrupt on the card. // After it completes the series of I/O operations, the SD card driver should acknowledge the interrupt. // // Assumption: @@ -1148,13 +1148,13 @@ N6SdioTxThreadCallback( // NTSTATUS N6SdioHandleInterrupt( - PVOID Context, + PVOID Context, u4Byte InterruptType ) { PADAPTER Adapter = (PADAPTER)Context; PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); - PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); + PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); NTSTATUS status = STATUS_UNSUCCESSFUL; HAL_INT_MODE sdioIntType = HAL_INT_MODE_LOCAL; PADAPTER pBcnAdapter = Adapter; @@ -1165,17 +1165,17 @@ N6SdioHandleInterrupt( Adapter->numInterrupt++; // // Needs to perform SDIO Interrupt handling as follows. - // 1. Read HISR : offset 0x18 , 4 byte + // 1. Read HISR : offset 0x18 , 4 byte // 2. Get Packet Size : offset 0x1C, 2 byte // 3. Read from Buffer : addr: WLAN_FIFO_RX , RX_BUFFER_SZ // 4. Acknowledge this SDIO host generated interrupt if needed. // // - // When a card interrupt occurs during normal operation, the bus driver masks the function's interrupt - // using the interrupt-enable bit in the CCCR, and it then calls the function driver's callback routine. - // The function driver can then proceed to handle the interrupt. Once our driver has serviced the interrupt on our respective function, - // we must call the SdbusAcknowledgeInterrupt routine. When the bus driver receives this call, it re-enables the function's interrupt, + // When a card interrupt occurs during normal operation, the bus driver masks the function's interrupt + // using the interrupt-enable bit in the CCCR, and it then calls the function driver's callback routine. + // The function driver can then proceed to handle the interrupt. Once our driver has serviced the interrupt on our respective function, + // we must call the SdbusAcknowledgeInterrupt routine. When the bus driver receives this call, it re-enables the function's interrupt, // and operation can proceed. // 2010.06.17. // @@ -1183,7 +1183,7 @@ N6SdioHandleInterrupt( #if (RK_PLATFORM_SUPPORT == 1) PlatformAcquireMutex(&pDevice->RxHandleIntMutex); #endif - + do{ // We should return interrupt contorl immediately if driver is stopped. @@ -1191,7 +1191,7 @@ N6SdioHandleInterrupt( { break; } - + if(RT_SDIO_CANNOT_RX(Adapter)) { break; @@ -1212,7 +1212,7 @@ N6SdioHandleInterrupt( pBcnAdapter = Adapter; pBcnMgntInfo = pMgntInfo; } - + sdioIntType = HAL_INT_MODE_LOCAL; // Prefast warning C28182: Dereferencing NULL pointer. 'Adapter' if(Adapter != NULL && Adapter->bInitComplete && @@ -1232,7 +1232,7 @@ N6SdioHandleInterrupt( (ACTING_AS_AP(pBcnAdapter) && pBcnMgntInfo->mAssoc)) { if(Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_BcnInt)) - { + { RT_TRACE(COMP_BEACON, DBG_TRACE, ("N6SdioHandleInterrupt(): Handle BCN early interrupt!!\n")); UpdateBeaconFrame(pBcnAdapter); } @@ -1269,15 +1269,15 @@ N6SdioHandleInterrupt( sdioIntType = HAL_INT_MODE_SYSTEM; RT_TRACE(COMP_RF, DBG_LOUD, ("N6SdioHandleInterrupt(): Handle host system interrupt!!\n")); if(NicIFInterruptRecognized(Adapter, &sdioIntType, sizeof(HAL_INT_MODE))) - { + { //Handle the status change of Power down(RF Off) or RF On - if(Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_GPIO9_INT) | - Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_SYS_PDNINT) | - Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_SDIO_RON_INT_EN) + if(Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_GPIO9_INT) | + Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_SYS_PDNINT) | + Adapter->HalFunc.GetInterruptHandler(Adapter, HAL_INT_TYPE_SDIO_RON_INT_EN) ) { - BOOLEAN bRfStatusChanged = TRUE; - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_RF_STATUS_INT, (pu1Byte)(&bRfStatusChanged)); + BOOLEAN bRfStatusChanged = TRUE; + Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_RF_STATUS_INT, (pu1Byte)(&bRfStatusChanged)); } } } @@ -1351,7 +1351,7 @@ N6WdmSdio_Enable( NdisResetEvent(&pDevice->AllSdioCmdReturnedEvent); NdisAcquireSpinLock( &(pDevice->IrpSpinLock) ); - RT_SDIO_INC_CMD_REF(pDevice); + RT_SDIO_INC_CMD_REF(pDevice); NdisReleaseSpinLock( &(pDevice->IrpSpinLock) ); } @@ -1370,18 +1370,18 @@ N6WdmSdio_Disable( { PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); int i; - - // SDIO interface do NOT need to cancel any Pending IN IRPs. - + + // SDIO interface do NOT need to cancel any Pending IN IRPs. + // Cancel Pending out IRPs if needed. for (i = 0; i < pDevice->RtNumTxQueue; i++) { N6SdioStopTxQueue(Adapter, i); } -#if !RTL8723_SDIO_IO_THREAD_ENABLE +#if !RTL8723_SDIO_IO_THREAD_ENABLE // Cancel Asyn IO Pending IRP. - RTsdioCancelAsynIoPendingIrp( Adapter ); + RTsdioCancelAsynIoPendingIrp( Adapter ); #endif NdisAcquireSpinLock( &(pDevice->IrpSpinLock) ); @@ -1407,7 +1407,7 @@ N6WdmSdio_Disable( RT_TRACE(COMP_INIT, DBG_LOUD, ("N6WdmSdio_Disable(): All SDIO CMDs are returned, Refcnt(%#x)\n", RT_SDIO_GET_CMD_REF(pDevice))); } - + } // @@ -1415,18 +1415,18 @@ N6WdmSdio_Disable( // Initialize SDIO bus and device on NDIS6-WDM framework. // // Assumption: -// -// 2010.12.09, added by Roger. +// +// 2010.12.09, added by Roger. // NTSTATUS N6WdmSdio_Initialize( IN PADAPTER Adapter ) -{ +{ NTSTATUS ntStatus = STATUS_SUCCESS; PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - u1Byte U1bData = 0; - + u1Byte U1bData = 0; + // // Open an interface to the SD bus driver @@ -1435,28 +1435,28 @@ N6WdmSdio_Initialize( sdiodevice->pPhysDevObj, &sdiodevice->Sdbusinterface, sizeof(SDBUS_INTERFACE_STANDARD), - SDBUS_INTERFACE_VERSION); - - if(NT_SUCCESS(ntStatus)) - { + SDBUS_INTERFACE_VERSION); + + if(NT_SUCCESS(ntStatus)) + { // // Contains the information necessary to initialize a Secure Digital (SD) card bus interface. // SDBUS_INTERFACE_PARAMETERS interfaceParameters = {0}; interfaceParameters.Size = sizeof(SDBUS_INTERFACE_PARAMETERS); - interfaceParameters.TargetObject =sdiodevice->pSdioDevObj; + interfaceParameters.TargetObject =sdiodevice->pSdioDevObj; interfaceParameters.DeviceGeneratesInterrupts = TRUE; // The SD device generates interrupts interfaceParameters.CallbackAtDpcLevel = FALSE; // Run at PASSIVE_LEVEL interfaceParameters.CallbackRoutine = N6SdioHandleInterrupt; // The bus driver calls when a device interrupt occurs interfaceParameters.CallbackRoutineContext = (PVOID )Adapter; - if (sdiodevice->Sdbusinterface.InitializeInterface) + if (sdiodevice->Sdbusinterface.InitializeInterface) { // Sets initialization parameters on the interface. ntStatus = (sdiodevice->Sdbusinterface.InitializeInterface) (sdiodevice->Sdbusinterface.Context, &interfaceParameters); - if (!NT_SUCCESS(ntStatus)) + if (!NT_SUCCESS(ntStatus)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("N6WdmSdio_Initialize(): Init SD Bus fail!!\n")); } @@ -1468,18 +1468,18 @@ N6WdmSdio_Initialize( // // Configure corresponding SDIO properties. // - if ( N6SdioConfigureDevice(sdiodevice) != STATUS_SUCCESS ) + if ( N6SdioConfigureDevice(sdiodevice) != STATUS_SUCCESS ) return STATUS_INSUFFICIENT_RESOURCES; sdiodevice->SdioTxBlockMode = TRUE; sdiodevice->SdioRxBlockMode = TRUE; #if (RK_PLATFORM_SUPPORT == 1) - sdiodevice->IoRegDirectAccess = TRUE; // Use CMD52 Direct IO R/W for 1, 2 Bytes access in default. + sdiodevice->IoRegDirectAccess = TRUE; // Use CMD52 Direct IO R/W for 1, 2 Bytes access in default. #else - sdiodevice->IoRegDirectAccess = FALSE; + sdiodevice->IoRegDirectAccess = FALSE; #endif - + // Reset SDIO Rx sequence number on initialization process RT_SDIO_RESET_RX_SEQ_NUM(Adapter); @@ -1499,7 +1499,7 @@ PlatformSdioEnableRxTransfer( PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); sdiodevice->bStopRxTransfer = FALSE; RT_SDIO_INC_RX_TRANS_REF(sdiodevice); - PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); + PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); } VOID @@ -1537,10 +1537,10 @@ PlatformSdioDisableRxTransfer( PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); RT_TRACE(COMP_RECV, DBG_LOUD, ("PlatformSdioDisableRxTransfer(): All SDIO Rx transfer are completed, Refcnt(%#x)\n", RT_SDIO_GET_RX_TRANS_REF(sdiodevice))); } - + PlatformAcquireSpinLock(Adapter, RT_RX_SPINLOCK); sdiodevice->bStopRxTransfer = TRUE; PlatformReleaseSpinLock(Adapter, RT_RX_SPINLOCK); - + } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.h index 9e058a8c8..2e9beac66 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_PlatformSdioWdm.h @@ -6,14 +6,14 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved. Module Name: N6Sdio_PlatformSdioWdm.h - + Abstract: Prototype of WdmSdio_XXX() implemented via WDM SDIO. - These function shall be only use under Platform\. + These function shall be only use under Platform\. + +Added by Roger, 2012.01.01. -Added by Roger, 2012.01.01. - --*/ VOID @@ -40,19 +40,19 @@ BOOLEAN N6SdioTxQueuePending( IN PADAPTER Adapter ); - + BOOLEAN N6SdioReleaseTxQueuePending( IN PADAPTER Adapter ); - -#if RTL8723_SDIO_IO_THREAD_ENABLE + +#if RTL8723_SDIO_IO_THREAD_ENABLE VOID N6SdioIOThreadCallback( IN PVOID pContext ); #endif - + VOID N6SdioTxThreadCallback( IN PVOID pContext diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.c index f96316834..d89028f01 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.c @@ -23,7 +23,7 @@ n6sdioWdi_FillAPAttr( _In_ ADAPTER *pAdapter ) { - static WDI_ALGO_PAIRS UcastAlgoList[] = + static WDI_ALGO_PAIRS UcastAlgoList[] = { {WDI_AUTH_ALGO_80211_OPEN, WDI_CIPHER_ALGO_NONE}, // 0 {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_CCMP}, //14 @@ -54,7 +54,7 @@ n6sdioWdi_FillAPAttr( {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static WDI_ALGO_PAIRS McastAlgoList[] = + static WDI_ALGO_PAIRS McastAlgoList[] = { {WDI_AUTH_ALGO_80211_OPEN, WDI_CIPHER_ALGO_NONE}, // 0 {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_CCMP}, //14 @@ -98,7 +98,7 @@ n6sdioWdi_FillAPAttr( attr->UnicastAlgorithms.pElements = UcastAlgoList; attr->UnicastAlgorithms.MemoryInternallyAllocated = FALSE; - // Multicast algo + // Multicast algo attr->MulticastDataAlgorithms.ElementCount = ARRAYSIZE(McastAlgoList); attr->MulticastDataAlgorithms.pElements = McastAlgoList; attr->MulticastDataAlgorithms.MemoryInternallyAllocated = FALSE; @@ -132,7 +132,7 @@ n6sdioWdi_FillP2PAttr( // P2P attr cpMacAddr(attr->P2PCapabilities.DeviceAddress, pAdapter->CurrentAddress); - + pAdapter->HalFunc.GetHalDefVarHandler(pAdapter, HAL_DEF_MAC_ADRESS_COX_CAP, &bHwSupportMACRandom); RT_TRACE(COMP_INIT, DBG_LOUD, ("n6sdioWdi_FillP2PAttr() : bHwSupportMACRandom( %d ) RegSupportMACRandom(%d)\n" , bHwSupportMACRandom , pAdapter->MgntInfo.RegSupportMACRandom)); if( !pAdapter->MgntInfo.RegSupportMACRandom ||bHwSupportMACRandom ) @@ -150,7 +150,7 @@ n6sdioWdi_FillP2PAttr( attr->P2PCapabilities.BackgroundDiscoverySupported = 0; attr->P2PCapabilities.ClientDiscoverabilitySupported = 0; attr->P2PCapabilities.InfrastructureManagementSupported = 0; - attr->P2PCapabilities.MaxSecondaryAdapterTypeListSize = 8; + attr->P2PCapabilities.MaxSecondaryAdapterTypeListSize = 8; attr->P2PCapabilities.DiscoveryFilterListSize = 2; attr->P2PCapabilities.GOClientTableSize = 2; attr->P2PCapabilities.MaxVendorSpecificExtensionIESize = 255; @@ -169,13 +169,13 @@ n6sdioWdi_FillInterfaceAttr( _In_ ADAPTER *pAdapter ) { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); BOOLEAN bAntDivSupport = FALSE; static CHAR FirmwareVersion[] = {'r', 't', 'w', 'l', 'a', 'n', 's', 0}; static u1Byte MACAddrRandomMask[6]={0xff,0xff,0xff,0xff,0xff,0x00}; - + attr->InterfaceCapabilities.MTUSize = WDI_802_11_MTU_SIZE; attr->InterfaceCapabilities.MaxMultiCastListSize = WDI_MAX_MCAST_LIST_NUM; attr->InterfaceCapabilities.BackFillSize = WDI_802_11_DATA_BACK_FILL_SIZE; @@ -228,7 +228,7 @@ n6sdioWdi_FillStationAttr( _In_ ADAPTER *pAdapter ) { - static WDI_ALGO_PAIRS UcastAlgoList[] = + static WDI_ALGO_PAIRS UcastAlgoList[] = { {WDI_AUTH_ALGO_80211_OPEN, WDI_CIPHER_ALGO_NONE}, // 0 {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_CCMP}, //14 @@ -258,7 +258,7 @@ n6sdioWdi_FillStationAttr( {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static WDI_ALGO_PAIRS UcastAlgoListWiFiCfg[] = + static WDI_ALGO_PAIRS UcastAlgoListWiFiCfg[] = { {WDI_AUTH_ALGO_80211_OPEN, WDI_CIPHER_ALGO_NONE}, // 0 {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_CCMP}, //14 @@ -275,20 +275,20 @@ n6sdioWdi_FillStationAttr( //{WDI_AUTH_ALGO_WPA, WDI_CIPHER_ALGO_CCMP}, //11 //{WDI_AUTH_ALGO_WPA_PSK, WDI_CIPHER_ALGO_CCMP}, //12 {WDI_AUTH_ALGO_RSNA, WDI_CIPHER_ALGO_CCMP}, //13 - + {DOT11_AUTH_ALGO_CCKM, WDI_CIPHER_ALGO_TKIP }, //15 {DOT11_AUTH_ALGO_CCKM, WDI_CIPHER_ALGO_CCMP}, //16 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_MFPCCMP }, //17 {DOT11_AUTH_ALGO_CCKM, DOT11_CIPHER_ALGO_MFPTKIP}, //18 - + {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_MFPCCMP}, //19 {DOT11_AUTH_ALGO_RSNA, DOT11_CIPHER_ALGO_MFPTKIP}, //20 - + {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static WDI_ALGO_PAIRS McastAlgoList[] = + static WDI_ALGO_PAIRS McastAlgoList[] = { {WDI_AUTH_ALGO_80211_OPEN, WDI_CIPHER_ALGO_NONE}, // 0 {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_CCMP}, //14 @@ -314,7 +314,7 @@ n6sdioWdi_FillStationAttr( {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static WDI_ALGO_PAIRS McastAlgoListWiFiCfg[] = + static WDI_ALGO_PAIRS McastAlgoListWiFiCfg[] = { {WDI_AUTH_ALGO_80211_OPEN, WDI_CIPHER_ALGO_NONE}, // 0 {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_CCMP}, //14 @@ -331,16 +331,16 @@ n6sdioWdi_FillStationAttr( //{WDI_AUTH_ALGO_WPA, WDI_CIPHER_ALGO_CCMP}, //11 //{WDI_AUTH_ALGO_WPA_PSK, WDI_CIPHER_ALGO_CCMP}, //12 {WDI_AUTH_ALGO_RSNA, WDI_CIPHER_ALGO_CCMP}, //13 - + {DOT11_AUTH_ALGO_CCKM, WDI_CIPHER_ALGO_WEP40}, //15 {DOT11_AUTH_ALGO_CCKM, WDI_CIPHER_ALGO_WEP104}, //16 {DOT11_AUTH_ALGO_CCKM, WDI_CIPHER_ALGO_TKIP}, //17 {DOT11_AUTH_ALGO_CCKM, WDI_CIPHER_ALGO_CCMP}, //18 - + {DOT11_AUTH_ALGO_WAPI_PSK, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 {DOT11_AUTH_ALGO_WAPI_CERTIFICATE, DOT11_CIPHER_ALGO_WAPI_SMS4}, //for WAPI IHV Support add by ylb 20111114 }; - static WDI_ALGO_PAIRS McastMFPCipherList[] = + static WDI_ALGO_PAIRS McastMFPCipherList[] = { {WDI_AUTH_ALGO_RSNA_PSK, WDI_CIPHER_ALGO_BIP}, // 0 {WDI_AUTH_ALGO_RSNA, WDI_CIPHER_ALGO_BIP}, // 1 @@ -358,7 +358,7 @@ n6sdioWdi_FillStationAttr( attr->StationCapabilities.HostFIPSModeImplemented = TRUE; attr->StationCapabilities.MFPCapable = TRUE; attr->StationCapabilities.AutoPowerSaveMode = TRUE; - + //Note: it is recommended LE do not cache BSS list to reduce the effort #if BSS_LIST_CACHE attr->StationCapabilities.BSSListCachemanagement = TRUE; @@ -372,7 +372,7 @@ n6sdioWdi_FillStationAttr( #else attr->StationCapabilities.ConnectBSSSelectionOverride = FALSE; #endif - + attr->StationCapabilities.uMaxNetworkOffloadListSize = WDI_802_11_MAX_NETWORKOFFLOAD_SIZE; attr->StationCapabilities.HESSIDConnectionSupported = FALSE; // Following capabilities is added after 0.90_1 @@ -493,10 +493,10 @@ n6sdioWdi_FillBandInfoAttr( WirelessModeCapa = HalGetSupportedWirelessMode(pAdapter); pNdisCommon->BandInfoCount = 0; - //3 If Support 2.4G band + //3 If Support 2.4G band if((WirelessModeCapa & WIRELESS_MODE_N_24G) || (WirelessModeCapa & WIRELESS_MODE_AC_24G) ||(WirelessModeCapa & WIRELESS_MODE_G)||(WirelessModeCapa & WIRELESS_MODE_B)) { - RT_TRACE(COMP_INIT, DBG_LOUD, ("==>Fill band info 2.4GHz\n")); + RT_TRACE(COMP_INIT, DBG_LOUD, ("==>Fill band info 2.4GHz\n")); //4 BandCapabilities pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].BandCapabilities.BandID = WDI_BAND_ID_2400; pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].BandCapabilities.BandState = TRUE; @@ -511,7 +511,7 @@ n6sdioWdi_FillBandInfoAttr( { pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].ValidPhyTypes.ElementCount++; } - if(WirelessModeCapa & WIRELESS_MODE_B) + if(WirelessModeCapa & WIRELESS_MODE_B) { pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].ValidPhyTypes.ElementCount++; } @@ -529,7 +529,7 @@ n6sdioWdi_FillBandInfoAttr( if( (WirelessModeCapa & WIRELESS_MODE_A) || (WirelessModeCapa & WIRELESS_MODE_N_5G) || (WirelessModeCapa & WIRELESS_MODE_AC_5G) || (WirelessModeCapa & WIRELESS_MODE_AC_ONLY) ) { - RT_TRACE(COMP_INIT, DBG_LOUD, ("==>Fill band info 5GHz\n")); + RT_TRACE(COMP_INIT, DBG_LOUD, ("==>Fill band info 5GHz\n")); //4 BandCapabilities pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].BandCapabilities.BandID = WDI_BAND_ID_5000; pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].BandCapabilities.BandState = TRUE; @@ -576,7 +576,7 @@ n6sdioWdi_FillBandInfoAttr( pNdisCommon->BandInfo[pNdisCommon->BandInfoCount].ChannelWidthList.pElements = WidthList; pNdisCommon->BandInfoCount++; } - RT_TRACE(COMP_INIT, DBG_LOUD, ("==>pNdisCommon->BandInfoCount=%d\n",pNdisCommon->BandInfoCount)); + RT_TRACE(COMP_INIT, DBG_LOUD, ("==>pNdisCommon->BandInfoCount=%d\n",pNdisCommon->BandInfoCount)); pAdapterCap->BandInfo.ElementCount = pNdisCommon->BandInfoCount; pAdapterCap->BandInfo.pElements = pNdisCommon->BandInfo; } @@ -671,7 +671,7 @@ n6sdioWdi_FillPhyInfoAttr( { WDI_DATA_RATE_RX_RATE | WDI_DATA_RATE_TX_RATE, 2340 }, { WDI_DATA_RATE_RX_RATE | WDI_DATA_RATE_TX_RATE, 2340 } }; - + for (count = 0; count < pNdisCommon->pDot11SupportedPhyTypes->uNumOfEntries; count ++) { //4 PhyCapabilities @@ -748,7 +748,7 @@ n6sdioWdi_FillPMCapabilities( if(bEnableWoLCapabilities) { cap->Flags = NDIS_PM_WAKE_PACKET_INDICATION_SUPPORTED; - cap->SupportedWoLPacketPatterns = + cap->SupportedWoLPacketPatterns = ( NDIS_PM_WOL_BITMAP_PATTERN_SUPPORTED | NDIS_PM_WOL_MAGIC_PACKET_SUPPORTED | NDIS_PM_WOL_IPV4_TCP_SYN_SUPPORTED | @@ -783,18 +783,18 @@ n6sdioWdi_FillPMCapabilities( cap->MinLinkChangeWakeUp = NdisDeviceStateUnspecified; if(pPSC->WoWLANMode == eWakeOnMagicPacketOnly) //by tynli. cap->MinPatternWakeUp = NdisDeviceStateUnspecified; - else if (pPSC->WoWLANMode == eWakeOnPatternMatchOnly) + else if (pPSC->WoWLANMode == eWakeOnPatternMatchOnly) cap->MinMagicPacketWakeUp = NdisDeviceStateUnspecified; // // Set new attributes for Win8 // - // Temporarily mark some attributes because we cannot support now. + // Temporarily mark some attributes because we cannot support now. // They will be enable in the feature. 2012.03.12. by tynli. cap->SupportedWakeUpEvents = 0 /*NDIS_PM_WAKE_ON_MEDIA_DISCONNECT_SUPPORTED | NDIS_PM_WAKE_ON_MEDIA_CONNECT_SUPPORTED*/; - cap->MediaSpecificWakeUpEvents = + cap->MediaSpecificWakeUpEvents = NDIS_WLAN_WAKE_ON_NLO_DISCOVERY_SUPPORTED | NDIS_WLAN_WAKE_ON_AP_ASSOCIATION_LOST_SUPPORTED | NDIS_WLAN_WAKE_ON_GTK_HANDSHAKE_ERROR_SUPPORTED | @@ -856,10 +856,10 @@ VOID n6sdioWdi_InitEvents( _In_ PRT_SDIO_DEVICE sdiodevice ) -{ +{ // Initialize event. NdisInitializeEvent(&sdiodevice->evtSendingNBLCompleted); - + // // Initialize event to make sure PnP action could be followed by Miniport CheckForHang routine // to prevent unexpect bug check code 0x1d. @@ -867,14 +867,14 @@ n6sdioWdi_InitEvents( // NdisInitializeEvent(&sdiodevice->SetPnpChkForHangEvent); - //2Init Event for canceling Asyn_Io pending IRP when unload + //2Init Event for canceling Asyn_Io pending IRP when unload NdisInitializeEvent(&sdiodevice->AllAsynIoIrpReturnedEvent); - - //2Init Event for all SDIO cmd52/cmd53 returned when unload + + //2Init Event for all SDIO cmd52/cmd53 returned when unload NdisInitializeEvent(&sdiodevice->AllSdioCmdReturnedEvent); - + NdisInitializeEvent(&sdiodevice->FwPsClockOffEvent); NdisInitializeEvent(&sdiodevice->AllSdioRxTransCompleteEvent); } @@ -898,14 +898,14 @@ n6sdioWdi_GenAdapterCaps( //4 2. Fill Interface Attribute n6sdioWdi_FillInterfaceAttr(&pAdapterCap->InterfaceAttributes, pAdapter); - + //4 3. Fill Station Attribute n6sdioWdi_FillStationAttr(&pAdapterCap->StationAttributes, pAdapter); //4 4. Fill AP Attribute pAdapterCap->Optional.APAttributes_IsPresent = TRUE; n6sdioWdi_FillAPAttr(&pAdapterCap->APAttributes, pAdapter); - + //4 5. Fill Vritualization Attribute pAdapterCap->Optional.VirtualizationAttributes_IsPresent = TRUE; n6sdioWdi_FillWiFiVirtualizationParam(&pAdapterCap->VirtualizationAttributes, pAdapter); @@ -913,19 +913,19 @@ n6sdioWdi_GenAdapterCaps( // P2P attr pAdapterCap->Optional.P2PAttributes_IsPresent = TRUE; n6sdioWdi_FillP2PAttr(&pAdapterCap->P2PAttributes, pAdapter); - + //4 6. Fill Data Path Attribute pAdapterCap->Optional.DatapathAttributes_IsPresent = TRUE; n6sdioWdi_FillDatapathAttr(&pAdapterCap->DatapathAttributes, pAdapter); - + //4 7. Fill Band Info pAdapterCap->Optional.BandInfo_IsPresent = TRUE; n6sdioWdi_FillBandInfoAttr(pAdapterCap, pAdapter); - + //4 8. Fill Phy Info pAdapterCap->Optional.PhyInfo_IsPresent = TRUE; n6sdioWdi_FillPhyInfoAttr(pAdapterCap, pAdapter); - + //4 9. Fill PM Capability // TODO: [WDI] add power management capability pAdapterCap->Optional.PmCapabilities_IsPresent = TRUE; @@ -1004,15 +1004,15 @@ N6SdioWdi_AllocateAdapter( pWdi->bCommandHangHappened = FALSE; pWdi->TlvContext.AllocationContext = 0; - + pWdi->TlvContext.PeerVersion = NdisWdiInitParameters->WdiVersion; if(pNdisCommon->NdisVersion >= NDIS_VERSION_BASE_6_50) pNdisCommon->NdisVersion = NDIS_VERSION_BASE_6_50; NdisMGetDeviceProperty(MiniportAdapterHandle, - &(sdiodevice->pPhysDevObj), // PhysicalDeviceObject - &(sdiodevice->FunctionalDeviceObject), // FunctionalDeviceObject + &(sdiodevice->pPhysDevObj), // PhysicalDeviceObject + &(sdiodevice->FunctionalDeviceObject), // FunctionalDeviceObject &(sdiodevice->pSdioDevObj), // NextDeviceObject NULL, NULL); @@ -1035,11 +1035,11 @@ N6SdioWdi_AllocateAdapter( NDIS_SIZEOF_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES_REVISION_2 ); - RegistrationAttributes->AttributeFlags = - NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | + RegistrationAttributes->AttributeFlags = + NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM | NDIS_MINIPORT_ATTRIBUTES_NO_PAUSE_ON_SUSPEND; - + RegistrationAttributes->InterfaceType = NdisInterfacePNPBus; RegistrationAttributes->MiniportAdapterContext = Adapter; @@ -1060,7 +1060,7 @@ N6SdioWdi_AllocateAdapter( if( Adapter != NULL ) CLEANUP_RES_IN_MON(Adapter->ResMonObjWdi, Adapter); - + return ndisStatus; } @@ -1070,7 +1070,7 @@ N6SdioWdi_FreeAdapter( ) { PADAPTER pAdapter = (PADAPTER) MiniportAdapterContext; - + RT_TRACE(COMP_INIT, DBG_LOUD, ("==========> N6SdioWdi_FreeAdapter\n")); #if SOFTWARE_TRACE_LOGGING @@ -1097,7 +1097,7 @@ N6SdioWdi_OpenAdapter( NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; PADAPTER pAdapter = (PADAPTER) MiniportAdapterContext; PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_OpenAdapter() ==>\n")); #if SOFTWARE_TRACE_LOGGING @@ -1108,11 +1108,11 @@ N6SdioWdi_OpenAdapter( TraceLoggingPointer(pAdapter, "pAdapter")); #endif - pWdi->pWdiInitParameters->OpenAdapterCompleteHandler(pAdapter->pNdisCommon->hNdisAdapter, + pWdi->pWdiInitParameters->OpenAdapterCompleteHandler(pAdapter->pNdisCommon->hNdisAdapter, N6SdioWdi_TaskOpen(pAdapter, MiniportInitParameters)); RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], <== N6SdioWdi_OpenAdapter() \n")); - + return ndisStatus; } @@ -1143,7 +1143,7 @@ N6SdioWdi_TaskOpen( // PlatformInitializeSemaphore(&sdiodevice->TxSemaphore, 0); -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // // Allocate IO semaphore before create corresponding IO Handling thread. // @@ -1164,16 +1164,16 @@ N6SdioWdi_TaskOpen( //---------------------------------------------------------------------------- // Initialize variables related to New IO method, 2005.01.06, by rcnjko. - // + // NdisAllocateSpinLock( &(sdiodevice->IrpSpinLock) ); - NdisOIDHistoryInit(pAdapter); + NdisOIDHistoryInit(pAdapter); ADD_RES_TO_MON(pAdapter->ResMonObjWdi, InitRM_SpinLock); // Add to resource monitor. #if (RK_PLATFORM_SUPPORT == 1) PlatformInitializeMutex(&sdiodevice->RxHandleIntMutex); #endif - // SyncIo Method 2. + // SyncIo Method 2. KeInitializeEvent( &(sdiodevice->SyncIoEvent), NotificationEvent, TRUE); if (WAPI_QuerySetVariable(pAdapter, WAPI_QUERY, WAPI_VAR_WAPISUPPORT, 0)) @@ -1193,7 +1193,7 @@ N6SdioWdi_TaskOpen( // Read the registry parameters ndisStatus= N6SdioReadRegParameters(sdiodevice); - if (ndisStatus != NDIS_STATUS_SUCCESS) + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("[WDI], N6SdioReadRegParameters(): Read Registry Parameter Failed!\n")); goto error; @@ -1204,11 +1204,11 @@ N6SdioWdi_TaskOpen( } // - // We set default hardware type to unknown type to associate common NIC handler first and + // We set default hardware type to unknown type to associate common NIC handler first and // then re-assign correct HW type association handler when the type is recognized. // 2011.12.30. // - ndisStatus = NicIFAssociateNIC(pAdapter, HARDWARE_TYPE_MAX); + ndisStatus = NicIFAssociateNIC(pAdapter, HARDWARE_TYPE_MAX); // // Perform SDIO WDM initialization @@ -1233,12 +1233,12 @@ N6SdioWdi_TaskOpen( HAL_SetInterfaceIndex(pAdapter, 0); // We should set the correct hardware type to the following function - ndisStatus = NicIFAssociateNIC(pAdapter, pAdapter->HardwareType); - if (ndisStatus != NDIS_STATUS_SUCCESS) + ndisStatus = NicIFAssociateNIC(pAdapter, pAdapter->HardwareType); + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("[WDI], NicIFAssociateNIC() Failed!\n")); goto error; - } + } else { RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], NicIFAssociateNIC() successfully.\n")); @@ -1260,7 +1260,7 @@ N6SdioWdi_TaskOpen( // // Initialize SDIO Data transfer related Tx context buffer. // - if( !NT_SUCCESS(N6SdioInitTxQueue(pAdapter) ) ) + if( !NT_SUCCESS(N6SdioInitTxQueue(pAdapter) ) ) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("[WDI], N6SdioInitTxQueue() Failed!\n")); goto error; @@ -1341,8 +1341,8 @@ N6SdioWdi_TaskOpen( // // 2011/09/07 MH Add TX power for different channel plan. // - RT_TRACE(COMP_INIT, DBG_TRACE, - ("[WDI], power offset MKK = %08x/%08x/%08x ETSI = %08x/%08x/%08x\n", + RT_TRACE(COMP_INIT, DBG_TRACE, + ("[WDI], power offset MKK = %08x/%08x/%08x ETSI = %08x/%08x/%08x\n", sdiodevice->RegGainOffsetMKKLow, sdiodevice->RegGainOffsetMKK, sdiodevice->RegGainOffsetMKKHigh, sdiodevice->RegGainOffsetETSILow, sdiodevice->RegGainOffsetETSI, sdiodevice->RegGainOffsetETSIHigh)); @@ -1395,7 +1395,7 @@ N6SdioWdi_TaskOpen( // // HCT12.0 2c_AddressChange. - // Note that, Adapter->CurrentAddress and Adapter->PermanentAddress had been + // Note that, Adapter->CurrentAddress and Adapter->PermanentAddress had been // set up in NicIFInitializeAdapter(). // RT_TRACE(COMP_INIT, DBG_TRACE, ("[WDI], Set MAC Address\n")); @@ -1408,7 +1408,7 @@ N6SdioWdi_TaskOpen( ETH_COPY_NETWORK_ADDRESS(pNdisCommon->CurrentAddress, pAdapter->PermanentAddress); } - RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], MAC Address: 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], MAC Address: 0x%x:0x%x:0x%x:0x%x:0x%x:0x%x\n", pNdisCommon->CurrentAddress[0], pNdisCommon->CurrentAddress[1], pNdisCommon->CurrentAddress[2], @@ -1451,7 +1451,7 @@ N6SdioWdi_TaskOpen( // ntStatus = PoRegisterPowerSettingCallback( NULL, - (LPGUID)(&PowerSetting_GUID), + (LPGUID)(&PowerSetting_GUID), (PPOWER_SETTING_CALLBACK)&N6SdioPowerSettingCallback, (PVOID)pAdapter, &pNdisCommon->N6PowerSettingHandle @@ -1469,7 +1469,7 @@ N6SdioWdi_TaskOpen( ntStatus = PoRegisterPowerSettingCallback( NULL, - (LPGUID)(&WLANPowerMode_GUID), + (LPGUID)(&WLANPowerMode_GUID), (PPOWER_SETTING_CALLBACK)&N6SdioWLANPowerModeCallback, (PVOID)pAdapter, &pNdisCommon->N6WLANPowerModeHandle @@ -1495,7 +1495,7 @@ N6SdioWdi_TaskOpen( //This is sw initialize ready. pAdapter->bSWInitReady=TRUE; - if(NDIS_STATUS_SUCCESS == ndisStatus) + if(NDIS_STATUS_SUCCESS == ndisStatus) { // After this adapter is initialzied ready, insert this adapter to the list. INSERT_GLOBAL_ADAPTER_LIST(pAdapter); @@ -1507,7 +1507,7 @@ N6SdioWdi_TaskOpen( // effect on the status for Miniportinitialize. // So, the resiteration process should be placed in the success location of Initialization. // By Bruce, 2011-07-07. - // + // if(RT_STATUS_SUCCESS != (RtStatus = N6C_RegisterIoDevice(pAdapter))) { RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6C_RegisterIoDevice() failed for status = %d\n", RtStatus)); @@ -1520,7 +1520,7 @@ N6SdioWdi_TaskOpen( WDICommandHandleInit(pAdapter); pAdapter->initfinish = TRUE; - pAdapter->bInitComplete = TRUE; + pAdapter->bInitComplete = TRUE; DrvIFIndicateCurrentPhyStatus(pAdapter); RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_AllocateAdapter(), status 0x%x\n", ndisStatus)); @@ -1595,7 +1595,7 @@ N6SdioWdi_TaskClose( NicIFHaltAdapter(pAdapter, FALSE); - PlatformAcquireSpinLock(pAdapter,RT_RF_STATE_SPINLOCK); + PlatformAcquireSpinLock(pAdapter,RT_RF_STATE_SPINLOCK); pAdapter->MgntInfo.RFChangeInProgress = FALSE; PlatformReleaseSpinLock(pAdapter,RT_RF_STATE_SPINLOCK); @@ -1608,7 +1608,7 @@ N6SdioWdi_TaskClose( // // Mark the miniport driver as halted state. // - //RT_ASSERT( (N6C_GET_MP_DRIVER_STATE(pAdapter) == MINIPORT_PAUSED), + //RT_ASSERT( (N6C_GET_MP_DRIVER_STATE(pAdapter) == MINIPORT_PAUSED), // ("MiniportHalt(): DriverState(%d) != PAUSED !!!\n", N6C_GET_MP_DRIVER_STATE(pAdapter))); N6C_SET_MP_DRIVER_STATE(pAdapter, MINIPORT_HALTED); @@ -1663,11 +1663,11 @@ N6SdioWdi_StartOperation( "RxIndicationThread", TRUE, 0, - NULL); + NULL); PlatformRunThread( - pAdapter, - &(pAdapter->RxNotifyThread), + pAdapter, + &(pAdapter->RxNotifyThread), PASSIVE_LEVEL, NULL); @@ -1711,12 +1711,12 @@ N6SdioWdi_StopOperation( //1 Stop Watchdog timer //Add bDriverIsGoingToUnload checking at watchdog timer to stop dynamic architecture and will be released later. - //1 Disable BulkIn/BulkOut to avoid incoming data during mac/port deletion. + //1 Disable BulkIn/BulkOut to avoid incoming data during mac/port deletion. //1 MUST be the bottom of StopOperation RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], NicIFDisableInterrupt()!!\n")); NicIFDisableInterrupt(pAdapter); - RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_StopOperation <==\n")); + RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_StopOperation <==\n")); } NDIS_STATUS @@ -1751,7 +1751,7 @@ N6SdioWdi_HangDiagnose( return NDIS_STATUS_INVALID_PARAMETER; } - RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI] N6SdioWdi_HangDiagnose() Miniport:%p level:%d BufferSize:%d\n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI] N6SdioWdi_HangDiagnose() Miniport:%p level:%d BufferSize:%d\n", MiniportDriverContext, DiagnoseLevel, BufferSize)); @@ -1780,8 +1780,8 @@ N6SdioWdi_HangDiagnose( //do the WDICommandHangCleanup in surprise remove to complete the hanging Command pAdapter->pPortCommonInfo->WdiData.bCommandHangHappened = TRUE; - RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI] N6SdioWdi_HangDiagnose() OutputSize:%d Status:0x%x\n", - *pOutputSize, + RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI] N6SdioWdi_HangDiagnose() OutputSize:%d Status:0x%x\n", + *pOutputSize, Status)); return Status; @@ -1813,7 +1813,7 @@ N6SdioWdi_TalTxRxInitialize( do { - RtlZeroMemory(&GLWdiTxRxStatistics, sizeof(WDI_TXRX_STATISTICS)); + RtlZeroMemory(&GLWdiTxRxStatistics, sizeof(WDI_TXRX_STATISTICS)); // Store Handle for Wdi Data Path pWdi = &(Adapter->pPortCommonInfo->WdiData); @@ -1826,7 +1826,7 @@ N6SdioWdi_TalTxRxInitialize( // Init Rx NetBufferListPool, // Status = N6SdioAllocateRxNetBufferListPool(Adapter); - if(Status != NDIS_STATUS_SUCCESS) + if(Status != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("[WDI], N6SdioAllocateRxNetBufferListPool() failed Status: %#X!\n", Status)); break; @@ -1886,7 +1886,7 @@ N6SdioWdi_TalTxRxInitialize( Adapter, &Adapter->InterruptThread, PASSIVE_LEVEL, - NULL); + NULL); } N6C_SET_MP_DRIVER_STATE(Adapter, MINIPORT_RUNNING); @@ -1924,7 +1924,7 @@ N6SdioWdi_TalTxRxDeinitialize( N6SdioReleaseTxQueuePending(Adapter); ReleaseDataFrameQueued(Adapter); RT_TRACE(COMP_INIT, DBG_TRACE, ("[WDI], After ReleaseDataFrameQueued()\n")); - WDI_DeInitRxQueue(Adapter); + WDI_DeInitRxQueue(Adapter); if (pDevice->RxNetBufferListPool) { @@ -1978,7 +1978,7 @@ N6SdioWdi_DataSend( // // Parse per-NBL information. // - pDot11SendContext = (PDOT11_EXTSTA_SEND_CONTEXT) NET_BUFFER_LIST_INFO(pCurrNetBufferList, MediaSpecificInformation); + pDot11SendContext = (PDOT11_EXTSTA_SEND_CONTEXT) NET_BUFFER_LIST_INFO(pCurrNetBufferList, MediaSpecificInformation); switch( pDot11SendContext->usExemptionActionType ) { case DOT11_EXEMPT_NO_EXEMPTION : @@ -2001,7 +2001,7 @@ N6SdioWdi_DataSend( //if(pStaQos->CurrentQosMode != QOS_DISABLE) // this only for OP mode in EXTSTA. //chedu default port one//?? need modify Neo { NBL8021qInfo.Value = NET_BUFFER_LIST_INFO(pCurrNetBufferList, Ieee8021QNetBufferListInfo); - Priority = (u1Byte)NBL8021qInfo.WLanTagHeader.WMMInfo; + Priority = (u1Byte)NBL8021qInfo.WLanTagHeader.WMMInfo; if (Priority > 7) { RT_TRACE(COMP_INIT, DBG_WARNING, ("[WDI], N6PciWdiTargetDescInit(): WMMInfo should less or equal than 7 (%d)\n", Priority)); @@ -2039,9 +2039,9 @@ N6SdioWdi_DataSend( // // Add per-NBL info into TCB. - // + // pTcb->priority = Priority; // Qos information. 2007.01.05, by shien chang. - pTcb->EncInfo.ExemptionActionType = ExemptionActionType; // by CCW. + pTcb->EncInfo.ExemptionActionType = ExemptionActionType; // by CCW. //pTcb->TcpOffloadMode = TcpCheckSumValue; pTcb->pAdapter = pAdapter; @@ -2052,7 +2052,7 @@ N6SdioWdi_DataSend( if(N6SdioGetPacketBuffers(pAdapter, pNetBuffer, pTcb) && !pAdapter->bInHctTest) - { + { // // Set up TCB. // @@ -2084,13 +2084,13 @@ N6SdioWdi_DataSend( { // // Complete the NB ASAP to enhance throughput for some application, such as iPerf. - // Note that, we can complete the NB here because it + // Note that, we can complete the NB here because it // had been coalesced in PreTransmitTCB(). // // In WDI, if we need to set pTcb->Reserved to NULL, we have to handle the completion // of the NBL when reference cnt = 0. later - // Currently we don't set the pTcb->Reserved to NULL as design such that the completion + // Currently we don't set the pTcb->Reserved to NULL as design such that the completion // can be handled in ReturnTcb(). //pTcb->Reserved = NULL; @@ -2099,9 +2099,9 @@ N6SdioWdi_DataSend( else { // - // 07525, rcnjko: + // 07525, rcnjko: // AP_PS_SendPacket() will queue the packet to send in proper queue if necessary. - // So, we must gurantee the buffers referenced in the TCB is still valid, + // So, we must gurantee the buffers referenced in the TCB is still valid, // that is, not yet compelted to upper layer. // NicIFSendPacket(pAdapter, pTcb); @@ -2175,7 +2175,7 @@ void N6SdioWdi_TxTargetDescInit( pNetBuffer != NULL; pNetBuffer = NET_BUFFER_NEXT_NB(pNetBuffer)) { - NetBufferCount ++; + NetBufferCount ++; } *pWifiStatus = NDIS_STATUS_SUCCESS; @@ -2248,15 +2248,15 @@ void N6SdioWdi_TxDataSend( // so when sendPauseIndication, we set the Tx pause reason by credit. if(!pDequeuedNbls) { - GLWdiTxRxStatistics.numWdiTxPauseIndicate++; + GLWdiTxRxStatistics.numWdiTxPauseIndicate++; RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_TxDataSend(), txCredit=%d\n", txCredit)); RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_TxDataSend(), PortId=0x%x, PeerId=0x%x\n", PortId, PeerId)); RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_TxDataSend(), pTargetAdapter=0x%p, pWdi=0x%p\n", pTargetAdapter, pWdi)); RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], N6SdioWdi_TxDataSend(): TxSendPauseIndication, count=%d!!!\n", GLWdiTxRxStatistics.numWdiTxPauseIndicate)); - pWdi->WdiDataApi.TxSendPauseIndication(pWdi->DataPathHandle, - WDI_PORT_ANY, + pWdi->WdiDataApi.TxSendPauseIndication(pWdi->DataPathHandle, + WDI_PORT_ANY, WDI_PEER_ANY, WDI_EXT_TID_UNKNOWN, WDI_TX_PAUSE_REASON_CREDIT); @@ -2280,7 +2280,7 @@ void N6SdioWdi_TxDataSend( GLWdiTxRxStatistics.numWdiTxDataSend++; // have enough credit(Tcb), can process NBLs. - PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); + PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); N6SdioWdi_DataSend(pTargetAdapter, pDequeuedNbls); PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); } while(FALSE); @@ -2536,7 +2536,7 @@ void N6SdioWdi_RxRestart( }while( pTempAdapter != NULL ); } PlatformReleaseSpinLock(pAdapter, RT_RX_CONTROL_SPINLOCK); - + FunctionOut(COMP_INIT); } @@ -2560,7 +2560,7 @@ void N6SdioWdi_RxGetMpdus( { RT_TRACE(COMP_RECV, DBG_WARNING, ("Incorrect peer\n")); KeBugCheckEx( - OID_RT_FORCED_BUG_CHECK, + OID_RT_FORCED_BUG_CHECK, (ULONG)PeerId, (ULONG)ExTid, (ULONG)PeerId, @@ -2754,11 +2754,11 @@ void N6SdioWdi_TalTxRxStop( { PADAPTER pAdapter = (PADAPTER) MiniportTalTxRxContext; PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; - - FunctionIn(COMP_INIT); + + FunctionIn(COMP_INIT); //1 Move DisableInterrupt to bottom of StopOperation handler to avoid incoming data during mac/port deletion - + //1 Wait for return packets then release/free semaphore for RxNotifyThread N6CWaitForReturnPacket(pAdapter); PlatformReleaseSemaphore(&(pNdisCommon->RxNotifySemaphore)); @@ -2772,7 +2772,7 @@ void N6SdioWdi_TalTxRxAddPort( _In_ TAL_TXRX_HANDLE MiniportTalTxRxContext, _In_ WDI_PORT_ID PortId, _In_ WDI_OPERATION_MODE OpMode) -{ +{ PADAPTER pAdapter = (PADAPTER) MiniportTalTxRxContext; FunctionIn(COMP_INIT); @@ -2793,7 +2793,7 @@ void N6SdioWdi_TalTxRxDeletePort( UNREFERENCED_PARAMETER(MiniportTalTxRxContext); UNREFERENCED_PARAMETER(PortId); - + FunctionOut(COMP_INIT); } @@ -2867,7 +2867,7 @@ N6SdioWdi_AdapterCapabilities( PUCHAR pOutput = NULL; ULONG length = 0; - PWDI_MESSAGE_HEADER pOidHeader + PWDI_MESSAGE_HEADER pOidHeader = (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer; n6sdioWdi_GenAdapterCaps(pAdapter, &adapterCap); @@ -2888,7 +2888,7 @@ N6SdioWdi_AdapterCapabilities( return ndisStatus; } - if (pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >= + if (pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >= (length + sizeof(WDI_MESSAGE_HEADER))) { PlatformMoveMemory( @@ -2901,9 +2901,9 @@ N6SdioWdi_AdapterCapabilities( { ndisStatus = NDIS_STATUS_BUFFER_TOO_SHORT; pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.BytesNeeded += (length + sizeof(WDI_MESSAGE_HEADER)); - RT_TRACE(COMP_INIT, DBG_WARNING, ("[WDI], GenerateWdiGetAdapterCapabilities() failed with status(%x)\n", ndisStatus)); + RT_TRACE(COMP_INIT, DBG_WARNING, ("[WDI], GenerateWdiGetAdapterCapabilities() failed with status(%x)\n", ndisStatus)); } - + if(pOutput) { FreeGenerated(pOutput); @@ -2911,7 +2911,7 @@ N6SdioWdi_AdapterCapabilities( } pOidHeader->Status = ndisStatus; - + return ndisStatus; } @@ -2925,9 +2925,9 @@ N6SdioWdi_PnPSetPower( PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(&(Adapter->MgntInfo)); PRT_NDIS_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - PRT_NLO_INFO pNLOInfo = &(pMgntInfo->NLOInfo); + PRT_NLO_INFO pNLOInfo = &(pMgntInfo->NLOInfo); BOOLEAN bWakeReconnect = TRUE; - BOOLEAN bMacPwrCtrlOn; + BOOLEAN bMacPwrCtrlOn; BOOLEAN bSupportRemoteWakeUp; BOOLEAN bEnableWoLCapabilities; RT_RF_POWER_STATE rfState; @@ -2936,17 +2936,17 @@ N6SdioWdi_PnPSetPower( Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); bEnableWoLCapabilities = MgntIsWoWLANCapabilityEnable(Adapter); - + if(pDevice->CurrentPowerState == NdisDeviceStateD0) - { // wake up. - + { // wake up. + // // Reset corresponding PnP event to monitor MiniportCheckForHang routine. // 2009.09.30. // pDevice->bChkForHangAfterPnP = FALSE; NdisResetEvent(&pDevice->SetPnpChkForHangEvent); - + { PADAPTER pExtAdapter = GetNextExtAdapter(pDefaultAdapter); PMGNT_INFO pExtMgntInfo = NULL; @@ -2957,16 +2957,16 @@ N6SdioWdi_PnPSetPower( pDefaultAdapter->bEnterPnpSleep = FALSE; pDefaultAdapter->bWakeFromPnpSleep = TRUE; pDefaultAdapter->bDriverIsGoingToPnpSetPowerSleep = FALSE; - + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; pExtPSC = GET_POWER_SAVE_CONTROL(pExtMgntInfo); - + pExtAdapter->bEnterPnpSleep = FALSE; pExtAdapter->bWakeFromPnpSleep = TRUE; pExtAdapter->bDriverIsGoingToPnpSetPowerSleep = FALSE; - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -2975,7 +2975,7 @@ N6SdioWdi_PnPSetPower( // before the system sets OID_PNP_CAPABILITIES to put the device to low PS state, it will // set OID_PM_PARAMETERS first. In order to seperate FSS mode from S3/S4/Selective suspend // mode, we use "bSetPMParameters" flag to decide some behaviors. 2012.09.13, by tynli. - pPSC->bSetPMParameters = FALSE; + pPSC->bSetPMParameters = FALSE; if(Adapter->MgntInfo.RegSuspendTimerInLowPwr) N6CTimerResourceAction(Adapter, RT_TIMER_RESOURCE_ACTION_RESUME); @@ -3001,7 +3001,7 @@ N6SdioWdi_PnPSetPower( N6WdmSdioTx_Enable(Adapter); #endif N6SdioDummyIO(pDevice); - + // Control SDIO Clock rate settings if(pDevice->bRegSdioSpeedSDR25) { @@ -3012,13 +3012,13 @@ N6SdioWdi_PnPSetPower( { N6SdioEnableDeviceInterrupt(Adapter); } - + // // 070106, rcnjko: // Re-initialize H/W for USB Bus is suspend. // Besides, we also issue bulk IN transfers at InitializeAdapterHandler(). // - // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be + // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be // called by user initialiated Restart. It has site effect to 8723BS card lost issue. So this is a work around // to add the condition to prevent from acting HaltAdapter in PNP D2 and D0 under Restart flow. 2013.11.18. if((pMgntInfo->bIntelPatchPNP && !pMgntInfo->bReceiveSystemPSOID) || (!pMgntInfo->bIntelPatchPNP)) @@ -3037,7 +3037,7 @@ N6SdioWdi_PnPSetPower( if(pMgntInfo->bRegPnpKeepLink) { if((Adapter->MgntInfo.bMediaConnect && (Adapter->bReInitHW || pPSC->WakeUpReason == WOL_REASON_AP_LOST || - pPSC->WakeUpReason == WOL_REASON_DISASSOC ||pPSC->WakeUpReason == WOL_REASON_DEAUTH)) || + pPSC->WakeUpReason == WOL_REASON_DISASSOC ||pPSC->WakeUpReason == WOL_REASON_DEAUTH)) || (!Adapter->pNdisCommon->bPnpKeepConnectToAP)) { pMgntInfo->bPerformPnpReconnect = TRUE; @@ -3046,8 +3046,8 @@ N6SdioWdi_PnPSetPower( { pMgntInfo->bPerformPnpReconnect = FALSE; } - - RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioWdi_PnPSetPower(): bPerformPnpReconnect=%d, bReInitHW=%d\n", + + RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioWdi_PnPSetPower(): bPerformPnpReconnect=%d, bReInitHW=%d\n", pMgntInfo->bPerformPnpReconnect, Adapter->bReInitHW)); } else @@ -3056,25 +3056,25 @@ N6SdioWdi_PnPSetPower( } if(bSupportRemoteWakeUp) // Need to be set before N6RestoreLastInitSettingAterWakeUP(). - { + { Adapter->HalFunc.EnableHWSecCfgHandler(Adapter); //For HW Security. by tynli. 2009.06.24. - } - + } + PlatformSetCheckForHangTimer(Adapter); PlatformStartWorkItem(&(Adapter->pPortCommonInfo->pPortHelper->CreateDeleteMacWorkitem)); - + { PADAPTER pTargetAdapter = GetDefaultAdapter(Adapter); while(pTargetAdapter != NULL) { pTargetAdapter->bInitializeInProgress = FALSE; - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } - + //ADJUST_TO_ADAPTIVE_ADAPTER(Adapter, FALSE)->bInitializeInProgress=FALSE; //pDefaultAdapter->bInitializeInProgress=FALSE; @@ -3082,7 +3082,7 @@ N6SdioWdi_PnPSetPower( if( !Adapter->bInHctTest ) { PADAPTER pTargetAdapter = GetDefaultAdapter(Adapter); - + while(pTargetAdapter != NULL) { RT_TRACE(COMP_AP, DBG_LOUD, ("Adapter on Port: %d, APType: %d\n", pTargetAdapter->pNdis62Common->PortNumber, MgntActQuery_ApType(pTargetAdapter))); @@ -3092,11 +3092,11 @@ N6SdioWdi_PnPSetPower( pTargetAdapter->bvWifiStopBeforeSleep = TRUE; N62CApIndicateStopAp(pTargetAdapter); } - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } - + Adapter->pNdisCommon->bWakeupAutoLinkInProgressing = TRUE; if(pMgntInfo->bPerformPnpReconnect) @@ -3105,7 +3105,7 @@ N6SdioWdi_PnPSetPower( } N6RestoreLastInitSettingAterWakeUP(Adapter); - // Indicate disassociation state when RF is off becuase we do not disconnect before sleep in WoWLAN mode. + // Indicate disassociation state when RF is off becuase we do not disconnect before sleep in WoWLAN mode. // 2011.10.27. by tynli. Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); if(rfState == eRfOff) @@ -3115,7 +3115,7 @@ N6SdioWdi_PnPSetPower( DrvIFIndicateDisassociation(Adapter, unspec_reason, pMgntInfo->Bssid); } pNdisCommon->bWakeupAutoLinkInProgressing = FALSE; - } + } /*if(OS_SUPPORT_WDI(Adapter)) { @@ -3129,9 +3129,9 @@ N6SdioWdi_PnPSetPower( { ULONG i = 0; BOOLEAN bTargetInNLO = FALSE; - + if(Adapter->MgntInfo.bMediaConnect || pNdisCommon->bDissociateBeforeSleep) - { + { for(i=0; iNumDot11OffloadNetwork; i++) { if(pMgntInfo->Ssid.Length && (pMgntInfo->Ssid.Length == pNLOInfo->dDot11OffloadNetworkList[i].ssidlen)) @@ -3155,7 +3155,7 @@ N6SdioWdi_PnPSetPower( { RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioWdi_PnPSetPower() try to connect to %s\n", Adapter->MgntInfo.Ssid.Octet)); - // Set Roam flag + // Set Roam flag MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_SLEEP, ROAMINGSTATE_SCANNING); DrvIFIndicateRoamingStart(Adapter); @@ -3190,7 +3190,7 @@ N6SdioWdi_PnPSetPower( // to the expected AP by indicating NDIS_STATUS_DOT11_OFFLOAD_NETWORK_STATUS_CHANGED // to declare that NLO scan is finished. if((pNLOInfo->NumDot11OffloadNetwork != 0) && (!Adapter->MgntInfo.bMediaConnect) && - (!pNdisCommon->bDissociateBeforeSleep)) + (!pNdisCommon->bDissociateBeforeSleep)) { // We should execute scan here because after indicating NDIS_STATUS_DOT11_OFFLOAD_NETWORK_STATUS_CHANGED, // OS will not set scan request OID (different with msdn's mention) and then query BSS list OID. So if we @@ -3203,13 +3203,13 @@ N6SdioWdi_PnPSetPower( } else { - + { - if((!ACTING_AS_AP(Adapter) || (!IsExtAPModeExist(Adapter) && bEnableWoLCapabilities)) + if((!ACTING_AS_AP(Adapter) || (!IsExtAPModeExist(Adapter) && bEnableWoLCapabilities)) && (pMgntInfo->Ssid.Length != 0) && !(IsSSIDDummy(pMgntInfo->Ssid)) && pMgntInfo->bPerformPnpReconnect ) { - RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioWdi_PnPSetPower() try to connect to %s ACTING_AS_AP(Adapter) %d IsExtAPModeExist(Adapter) %d\n", + RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioWdi_PnPSetPower() try to connect to %s ACTING_AS_AP(Adapter) %d IsExtAPModeExist(Adapter) %d\n", Adapter->MgntInfo.Ssid.Octet, ACTING_AS_AP(Adapter) , IsExtAPModeExist(Adapter))); bWakeReconnect = TRUE; } @@ -3220,7 +3220,7 @@ N6SdioWdi_PnPSetPower( if(bWakeReconnect) { - // Set Roam flag + // Set Roam flag MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_SLEEP, ROAMINGSTATE_SCANNING); pNdisCommon->PNPconnentCout = 0; @@ -3237,7 +3237,7 @@ N6SdioWdi_PnPSetPower( pNdisCommon->bDissociateBeforeSleep = FALSE; // - // If we keep connection after PNP resumption, we should reset Rx TS to avoid + // If we keep connection after PNP resumption, we should reset Rx TS to avoid // packet droped by the sequence number is over Rx reorder window size because we will not // update the Rx TS sequence number during PNP sleep stage. 2015.01.22. // @@ -3261,7 +3261,7 @@ N6SdioWdi_PnPSetPower( RT_TRACE(COMP_POWER, DBG_LOUD, (" Start check for hang workitem\n")); PlatformStartWorkItem( &(pHalData->RtCheckForHangWorkItem) ); } -#endif +#endif } else if(pDevice->CurrentPowerState > NdisDeviceStateD0) { // sleep. @@ -3271,24 +3271,24 @@ N6SdioWdi_PnPSetPower( RT_CUSTOM_INDI_TARGET_IRP, NULL, 0); - + { PADAPTER pExtAdapter = GetNextExtAdapter(pDefaultAdapter); PMGNT_INFO pExtMgntInfo = NULL; PMGNT_INFO pDefaultMgntInfo = &pDefaultAdapter->MgntInfo; - pDefaultMgntInfo->bStartApDueToWakeup=TRUE; + pDefaultMgntInfo->bStartApDueToWakeup=TRUE; pDefaultAdapter->bEnterPnpSleep = TRUE; - + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; - - pExtMgntInfo->bStartApDueToWakeup=TRUE; + + pExtMgntInfo->bStartApDueToWakeup=TRUE; pExtAdapter->bEnterPnpSleep = TRUE; - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -3296,38 +3296,38 @@ N6SdioWdi_PnPSetPower( //Moved to PNP wake flow. 2013.04. //MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_SLEEP, ROAMINGSTATE_SCANNING); - + // 20100721 Joseph: Modified for Velocity Suspend test. // Reset IPS state only. // Since NIC is going to Halt for sleep, driver does not need to initialize the HW again. // This shall be revised in the future and also take NIC Disable/Radio-off into consideration. if((!bSupportRemoteWakeUp) && (pPSC->IPSState==eIPSDozed) && - /*(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC) &&*/ + /*(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC) &&*/ RT_IN_PS_LEVEL(Adapter, RT_RF_OFF_LEVL_HALT_NIC)) { LPSLeaveAndCheckReady(Adapter); - NicIFDisableInterrupt(Adapter); - + NicIFDisableInterrupt(Adapter); + pPSC->eInactivePowerState = eRfOn; pPSC->IPSState = eIPSAwake; pMgntInfo->RfOffReason &= (~RF_CHANGE_BY_IPS); } else { - LeaveAllPowerSaveMode(Adapter); + LeaveAllPowerSaveMode(Adapter); } NicIFClearInterrupt(Adapter); - - // Recover the BW to 40MHz for a specific case. To see the description of + + // Recover the BW to 40MHz for a specific case. To see the description of // function HTRecoverBWTo40MHz(). 2012.12.20, by tynli. - if(bSupportRemoteWakeUp && + if(bSupportRemoteWakeUp && (Adapter->MgntInfo.OpMode == RT_OP_MODE_INFRASTRUCTURE)) { HTRecoverBWTo40MHz(Adapter); } - + PlatformAcquireSpinLock(Adapter,RT_RF_STATE_SPINLOCK); while( pMgntInfo->RFChangeInProgress) { @@ -3336,9 +3336,9 @@ N6SdioWdi_PnPSetPower( RT_TRACE(COMP_POWER,DBG_LOUD, ("RF is in progress, need to wait until rf chang is done.\n")); delay_ms(1); - + PlatformAcquireSpinLock(Adapter,RT_RF_STATE_SPINLOCK); - } + } PlatformReleaseSpinLock(Adapter,RT_RF_STATE_SPINLOCK); // Adapter->bDriverIsGoingToPnpSetPowerSleep = TRUE; @@ -3349,9 +3349,9 @@ N6SdioWdi_PnPSetPower( PRT_SECURITY_T pSecInfo = &(Adapter->MgntInfo.SecurityInfo); u1Byte KeyIndex; u1Byte CAM_CONST_BROAD[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - + Adapter->bHWSecurityInWoL = TRUE; - + Adapter->HalFunc.EnableHWSecCfgHandler(Adapter); if(pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || @@ -3361,19 +3361,19 @@ N6SdioWdi_PnPSetPower( { if(pSecInfo->KeyLen[KeyIndex] != 0) { - Adapter->HalFunc.SetKeyHandler(Adapter, - KeyIndex, - CAM_CONST_BROAD, - FALSE, - pSecInfo->PairwiseEncAlgorithm, - TRUE, + Adapter->HalFunc.SetKeyHandler(Adapter, + KeyIndex, + CAM_CONST_BROAD, + FALSE, + pSecInfo->PairwiseEncAlgorithm, + TRUE, FALSE); } } } else if( pSecInfo->PairwiseEncAlgorithm != RT_ENC_ALG_NO_CIPHER ) { //Set group key for other encrypyion mode (TKIP, AES) - Adapter->HalFunc.SetKeyHandler(Adapter, + Adapter->HalFunc.SetKeyHandler(Adapter, pSecInfo->GroupTransmitKeyIdx, //KeyIndex, CAM_CONST_BROAD, TRUE, //IsGroup, @@ -3384,7 +3384,7 @@ N6SdioWdi_PnPSetPower( Adapter->bHWSecurityInWoL = FALSE; } //-Write CAM End------------------------------------------ - + { PADAPTER pExtAdapter = GetNextExtAdapter(pDefaultAdapter); pDefaultAdapter->bDriverIsGoingToPnpSetPowerSleep = TRUE; @@ -3392,12 +3392,12 @@ N6SdioWdi_PnPSetPower( while(pExtAdapter != NULL) { pExtAdapter->bDriverIsGoingToPnpSetPowerSleep = TRUE; - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } - // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be + // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be // called by user initialiated Restart. It has site effect to 8723BS card lost issue. So this is a work around // to add the condition to prevent from acting HaltAdapter in PNP D2 and D0 under Restart flow. 2013.11.18. if((pMgntInfo->bIntelPatchPNP && !pMgntInfo->bReceiveSystemPSOID) || (!pMgntInfo->bIntelPatchPNP)) @@ -3450,17 +3450,17 @@ N6SdioWdi_PnPSetPower( #if USE_WDF_SDIO WdfSdio_Disable(Adapter); #else - N6WdmSdio_Disable(Adapter); + N6WdmSdio_Disable(Adapter); #endif // - // 070531, rcnjko: although NDIS6 had made driver stack go to paused state + // 070531, rcnjko: although NDIS6 had made driver stack go to paused state // before sleeping, it is safer to return pending tx to upper layer. // N6SdioReturnAllPendingTxPackets(Adapter); // Release Tx Queue buffered context if needed. added by Roger, 2014.04.29. - N6SdioReleaseTxQueuePending(Adapter); + N6SdioReleaseTxQueuePending(Adapter); // 2011/08/23 MH For check for hang test only. Prevent check for HANG IQK write incorrect BB register under // RF off state. @@ -3473,7 +3473,7 @@ N6SdioWdi_PnPSetPower( PlatformStopWorkItem(&(Adapter->pPortCommonInfo->pPortHelper->CreateDeleteMacWorkitem)); // - // As devices enter low power states, the driver managing the devices should cancel any programmed timers. + // As devices enter low power states, the driver managing the devices should cancel any programmed timers. // Added by Roger, 2016.01.18 // if(Adapter->MgntInfo.RegSuspendTimerInLowPwr){ @@ -3486,14 +3486,14 @@ N6SdioWdi_PnPSetPower( PMGNT_INFO pExtMgntInfo = NULL; PMGNT_INFO pDefaultMgntInfo = &pDefaultAdapter->MgntInfo; - pDefaultMgntInfo->bDriverIsGoingToSleep = FALSE; - + pDefaultMgntInfo->bDriverIsGoingToSleep = FALSE; + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; - - pExtMgntInfo->bDriverIsGoingToSleep = FALSE; - + + pExtMgntInfo->bDriverIsGoingToSleep = FALSE; + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -3505,7 +3505,7 @@ N6SdioWdi_PnPSetPower( RT_TRACE(COMP_POWER, DBG_WARNING, ("N6SdioWdi_PnPSetPower(): unexpected CurrentPowerState: %#X\n", pDevice->CurrentPowerState)); } - Adapter->bInSetPower = FALSE; + Adapter->bInSetPower = FALSE; pMgntInfo->bSetPnpPwrInProgress = FALSE; RT_TRACE(COMP_POWER, DBG_LOUD, ("[WDI], N6SdioWdi_PnPSetPower() <==\n")); @@ -3519,12 +3519,12 @@ N6SdioWdi_Mgnt_SetPower( { WDI_SET_POWER_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetPower; PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); - PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); + PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); + PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon; - BOOLEAN bEnableWoLCapabilities = FALSE; + BOOLEAN bEnableWoLCapabilities = FALSE; NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS; - NDIS_DEVICE_POWER_STATE NewPowerState; + NDIS_DEVICE_POWER_STATE NewPowerState; OCTET_STRING savedssid; u1Byte ssidbuf[33]; u1Byte bssidbuf[6]; @@ -3537,7 +3537,7 @@ N6SdioWdi_Mgnt_SetPower( if( Params ) { NewPowerState = Params->PowerState; - + #if SOFTWARE_TRACE_LOGGING TraceLoggingWrite( g_hProvider, @@ -3546,7 +3546,7 @@ N6SdioWdi_Mgnt_SetPower( TraceLoggingUInt32(NewPowerState, "NewPowerState"), TraceLoggingUInt32(pDevice->CurrentPowerState, "CurrentPowerState")); #endif - + if(pDevice->CurrentPowerState == NewPowerState) { RT_TRACE(COMP_POWER, DBG_LOUD, ("Wdi_Set_Power_State(): already in this power state %d\n", NewPowerState)); @@ -3558,7 +3558,7 @@ N6SdioWdi_Mgnt_SetPower( pAdapter->PnPTotalTime.QuadPart = 0; pAdapter->PnPIOTime.QuadPart = 0; pDevice->PnPSdBusWorkTime.QuadPart = 0; - + StartTime = KeQueryPerformanceCounter(&Freq); // @@ -3579,7 +3579,7 @@ N6SdioWdi_Mgnt_SetPower( pAdapter->bInSetPower = TRUE; MgntStopBeacon(pAdapter); - + // // Immediately disable adapter in this irql level, then return success. By Bruce, 2008-10-29. // @@ -3597,18 +3597,18 @@ N6SdioWdi_Mgnt_SetPower( PMGNT_INFO pExtMgntInfo = NULL; PMGNT_INFO pDefaultMgntInfo = &pAdapter->MgntInfo; - pDefaultMgntInfo->bDriverIsGoingToSleep = TRUE; - + pDefaultMgntInfo->bDriverIsGoingToSleep = TRUE; + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; - - pExtMgntInfo->bDriverIsGoingToSleep = TRUE; - + + pExtMgntInfo->bDriverIsGoingToSleep = TRUE; + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } - + MgntResetJoinProcess(pAdapter); // For Intel Bay trail platform, we do not support WoWLAN during hibernate (S4). 2013.10.30, by tynli. @@ -3625,7 +3625,7 @@ N6SdioWdi_Mgnt_SetPower( pPSC->bPnpEnterD2 = TRUE; pPSC->PnpSleepEnterD2Cnt++; } - + pPSC->LastPnpSleepTime = PlatformGetCurrentTime(); RT_TRACE(COMP_POWER, DBG_LOUD, ("Before Stop Watchdog\n")); @@ -3642,25 +3642,25 @@ N6SdioWdi_Mgnt_SetPower( if( !pAdapter->bInHctTest ) { // Those in vWifi mode now disassociate all STA before sleep, and will be reset after waking up. - + PADAPTER pTargetAdapter = GetDefaultAdapter(pAdapter); - + while(pTargetAdapter != NULL) { if(MgntActQuery_ApType(pTargetAdapter) == RT_AP_TYPE_VWIFI_AP) { AP_DisassociateAllStation(pTargetAdapter, unspec_reason); SecSetSwEncryptionDecryption(pTargetAdapter, FALSE, FALSE); - + RT_TRACE(COMP_AP, DBG_LOUD,("vWifi mode on Port: %d disassociates all STA.\n", pTargetAdapter->pNdis62Common->PortNumber)); - } - + } + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } else { // For OS before Win7 still go turning OFF directly. - NDIS_6_2_AP_CLEAR_BEFORE_SLEEP(pAdapter); + NDIS_6_2_AP_CLEAR_BEFORE_SLEEP(pAdapter); } RT_TRACE(COMP_POWER, DBG_LOUD, ("Stop vWifi Service\n")); @@ -3673,15 +3673,15 @@ N6SdioWdi_Mgnt_SetPower( P2PScanListCeaseScan(GET_P2P_INFO(pAdapter)); P2PDeviceDiscoveryComplete(GET_P2P_INFO(pAdapter), TRUE); // P2P State is restored in this function. } - + #if (MULTIPORT_SUPPORT == 1) if(GetFirstDevicePort(pAdapter)) { (GET_P2P_INFO(GetFirstDevicePort(pAdapter)))->uListenStateDiscoverability = 0; } - #endif - } -#endif + #endif + } +#endif RT_TRACE(COMP_POWER, DBG_LOUD, ("Handle P2P relative function\n")); @@ -3691,22 +3691,22 @@ N6SdioWdi_Mgnt_SetPower( if(MgntScanInProgress(pMgntInfo) || MgntIsLinkInProgress(pMgntInfo) || MgntRoamingInProgress(pMgntInfo)) { RT_TRACE(COMP_POWER, DBG_WARNING, ("@!!!!!Mgnt_SetPower we are scanning.....\n")); - + if(MgntScanInProgress(pMgntInfo)) MgntResetScanProcess(pAdapter); PlatformCancelTimer(pAdapter, &pMgntInfo->ScanTimer); { PADAPTER pLoopAdapter = GetDefaultAdapter(pAdapter); - + while(pLoopAdapter) { pLoopAdapter->MgntInfo.bScanInProgress = FALSE; pLoopAdapter->MgntInfo.bDualModeScanStep = 0; - + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } - + if( MgntIsLinkInProgress(pMgntInfo) || MgntRoamingInProgress(pMgntInfo)) { pMgntInfo->bJoinInProgress = FALSE; @@ -3714,20 +3714,20 @@ N6SdioWdi_Mgnt_SetPower( DrvIFIndicateRoamingStart(pAdapter); else DrvIFIndicateConnectionStart(pAdapter); - + DrvIFIndicateAssociationStart(pAdapter); DrvIFIndicateAssociationComplete(pAdapter, RT_STATUS_FAILURE); - + if(MgntRoamingInProgress(pMgntInfo)) DrvIFIndicateRoamingComplete(pAdapter, RT_STATUS_FAILURE); else - DrvIFIndicateConnectionComplete(pAdapter, RT_STATUS_FAILURE); - MgntActSet_802_11_DISASSOCIATE( pAdapter, unspec_reason); - } + DrvIFIndicateConnectionComplete(pAdapter, RT_STATUS_FAILURE); + MgntActSet_802_11_DISASSOCIATE( pAdapter, unspec_reason); + } } RT_TRACE(COMP_POWER, DBG_LOUD, ("After Stop Scan\n")); - + MgntResetRoamingState(pMgntInfo); //MgntDisconnectAP(Adapter , unspec_reason); @@ -3739,26 +3739,26 @@ N6SdioWdi_Mgnt_SetPower( //save SSID savedssid.Octet = ssidbuf; - CopySsidOS(savedssid, pMgntInfo->Ssid); + CopySsidOS(savedssid, pMgntInfo->Ssid); CopyMem(bssidbuf,pMgntInfo->Bssid, 6); //Add for DTM 1.0c test. if(!pMgntInfo->bHiddenSSIDEnable) - MgntRemoveSsidsToScan(pAdapter, pMgntInfo->Ssid); + MgntRemoveSsidsToScan(pAdapter, pMgntInfo->Ssid); // // CCW: don't indicate dissociation event on infra. mode client. // 070125, rcnjko: don't indicate disassociation event - // + // if(!bEnableWoLCapabilities || - (pPSC->FSSDetection && (!pPSC->bSetPMParameters || (pPSC->bSetPMParameters && !pPSC->bOSSupportProtocolOffload)))) + (pPSC->FSSDetection && (!pPSC->bSetPMParameters || (pPSC->bSetPMParameters && !pPSC->bOSSupportProtocolOffload)))) { // Do not disasso to AP when WoWLAN. by tynli. if( pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE ) { pNdisCommon->bDissociateBeforeSleep = TRUE; } - + MgntActSet_802_11_DISASSOCIATE(pAdapter , unspec_reason); pNdisCommon->bPnpKeepConnectToAP = FALSE; @@ -3776,7 +3776,7 @@ N6SdioWdi_Mgnt_SetPower( } //restore SSID - CopySsidOS(pMgntInfo->Ssid, savedssid); + CopySsidOS(pMgntInfo->Ssid, savedssid); CopyMem(pMgntInfo->Bssid, bssidbuf, 6); } else @@ -3795,7 +3795,7 @@ N6SdioWdi_Mgnt_SetPower( { // stop beaconing. for NDISTest preview 3 SoftAP_Power_ext. PMGNT_INFO pTargetMgntInfo = &pTargetAdapter->MgntInfo; - + MgntStopBeacon(pTargetAdapter); // Configure the HW to be No Link. @@ -3803,13 +3803,13 @@ N6SdioWdi_Mgnt_SetPower( pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_MEDIA_STATUS, (pu1Byte)(&pTargetMgntInfo->OpMode)); pTargetMgntInfo->OpMode = RT_OP_MODE_AP; } - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } RT_TRACE(COMP_POWER, DBG_LOUD, ("vWifi other config\n")); - + pDevice->CurrentPowerState = NewPowerState; pAdapter->bInSetPower = TRUE; @@ -3817,12 +3817,12 @@ N6SdioWdi_Mgnt_SetPower( } else - { + { RT_TRACE(COMP_POWER, DBG_LOUD, ("Wdi_Set_Power_State(): Invalid Power State(%u)\n", NewPowerState)); ndisStatus = NDIS_STATUS_INVALID_DATA; } - - // For Working Time Calculation + + // For Working Time Calculation EndTime = KeQueryPerformanceCounter(NULL); pAdapter->bCtrlPnPTime = FALSE; @@ -3833,7 +3833,7 @@ N6SdioWdi_Mgnt_SetPower( pAdapter->PnPIOTime.QuadPart = pAdapter->PnPIOTime.QuadPart * 1000000; pAdapter->PnPIOTime.QuadPart = pAdapter->PnPIOTime.QuadPart / Freq.QuadPart; RT_TRACE(COMP_INIT, DBG_LOUD, ("[PnP Time] IO Cost Time: %llu us\n", pAdapter->PnPIOTime.QuadPart)); - + pDevice->PnPSdBusWorkTime.QuadPart = pDevice->PnPSdBusWorkTime.QuadPart * 1000000; pDevice->PnPSdBusWorkTime.QuadPart = pDevice->PnPSdBusWorkTime.QuadPart / Freq.QuadPart; RT_TRACE(COMP_INIT, DBG_LOUD, ("[PnP Time] SdBus Submit Cost Time: %llu us\n", pDevice->PnPSdBusWorkTime.QuadPart)); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.h index 7833c0a5b..bbba054b9 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_WdiMain.h @@ -72,11 +72,11 @@ N6SdioWdi_TaskOpen( _In_ PADAPTER pAdapter, _In_ PNDIS_MINIPORT_INIT_PARAMETERS MiniportInitParameters ); - + NDIS_STATUS N6SdioWdi_TaskClose( _In_ PADAPTER pAdapter - ); + ); NDIS_STATUS N6SdioWdi_AdapterCapabilities( diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c index 38ca85109..752d6f9b2 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.c @@ -4,9 +4,9 @@ Copyright (c) 2003 Realtek Semiconductor Corporation Module Name: N6Sdio_main.c - + Abstract: - This is an NDIS miniport driver can interface with a SDIO device. + This is an NDIS miniport driver can interface with a SDIO device. Added by Roger, 2010.12.15. --*/ @@ -67,18 +67,18 @@ static MP_REG_ENTRY NICRegTable[] = { {NDIS_STRING_CONST("LedCtrl"), 0,NdisParameterInteger, MP_OFFSET(bRegLedCtrl), MP_SIZE(bRegLedCtrl), 0, 0, 8}, //---------------------------------------------------------------------------- // Number of Bulk in issued at initialization, 2006.02.09, by rcnjko. - {NDIS_STRING_CONST("MaxBulkInCnt"), 0,NdisParameterInteger, MP_OFFSET(nMaxBulkInCnt), MP_SIZE(nMaxBulkInCnt), 32, 1, 63}, // 1 ~ number of RFD allocated. + {NDIS_STRING_CONST("MaxBulkInCnt"), 0,NdisParameterInteger, MP_OFFSET(nMaxBulkInCnt), MP_SIZE(nMaxBulkInCnt), 32, 1, 63}, // 1 ~ number of RFD allocated. //---------------------------------------------------------------------------- - {NDIS_STRING_CONST("EnableUsbSS"), 0,NdisParameterInteger, MP_OFFSET(RegUsbSS), MP_SIZE(RegUsbSS), 0, 0, 1}, // 0: disable, 1: enable. + {NDIS_STRING_CONST("EnableUsbSS"), 0,NdisParameterInteger, MP_OFFSET(RegUsbSS), MP_SIZE(RegUsbSS), 0, 0, 1}, // 0: disable, 1: enable. // // 2011/09/07 MH Add for different channel plan tx power offset. - // Middle offset is for ETSI europe low is for MKK/Korea. + // Middle offset is for ETSI europe low is for MKK/Korea. // {NDIS_STRING_CONST("GainOffsetFCCLow"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetFCCLow), MP_SIZE(RegGainOffsetFCCLow), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. {NDIS_STRING_CONST("GainOffsetFCC"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetFCC), MP_SIZE(RegGainOffsetFCC), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. {NDIS_STRING_CONST("GainOffsetFCCHigh"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetFCCHigh), MP_SIZE(RegGainOffsetFCCHigh), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. - + {NDIS_STRING_CONST("GainOffsetMKKLow"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetMKKLow), MP_SIZE(RegGainOffsetMKKLow), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. {NDIS_STRING_CONST("GainOffsetMKK"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetMKK), MP_SIZE(RegGainOffsetMKK), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. {NDIS_STRING_CONST("GainOffsetMKKHigh"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetMKKHigh), MP_SIZE(RegGainOffsetMKKHigh), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. @@ -88,11 +88,11 @@ static MP_REG_ENTRY NICRegTable[] = { {NDIS_STRING_CONST("GainOffsetETSIHigh"), 0,NdisParameterInteger, MP_OFFSET(RegGainOffsetETSIHigh), MP_SIZE(RegGainOffsetETSIHigh), 0x00000000, 0x0, 0xFFFFFFFF}, // 0x0~0xF. // - // 2011/11/25 MH Add for Sercom requirement temporarily. + // 2011/11/25 MH Add for Sercom requirement temporarily. // {NDIS_STRING_CONST("InPipeCnt"), 0,NdisParameterInteger, MP_OFFSET(RegInPipeCnt), MP_SIZE(RegInPipeCnt), 1, 0x0, 0x5}, // 0x0~0x5. //---------------------------------------------------------------------------- - + // // 2015/03/26 TzuHang Add to control SDIO bus speed SDR25 support or not (SDR25 = 50MHz), 0: not supported SDR25 (25MHz), 1: supported SDR25 (50MHz) {NDIS_STRING_CONST("SdioBusSDR25"), 0,NdisParameterInteger, MP_OFFSET(bRegSdioSpeedSDR25), MP_SIZE(bRegSdioSpeedSDR25), 1, 0x0, 0x1}, @@ -110,7 +110,7 @@ NDIS_STATUS DriverEntry( IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING RegistryPath - ) + ) { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; NDIS_MINIPORT_DRIVER_CHARACTERISTICS MChars; @@ -127,7 +127,7 @@ DriverEntry( #endif #if SOFTWARE_TRACE_LOGGING - // In DriverEntry or DLLMain, register the TraceLogging provider + // In DriverEntry or DLLMain, register the TraceLogging provider // No need to check for errors. If this call fails all subsequent TraceLogging calls automatically become no-ops. TraceLoggingRegister(g_hProvider); @@ -152,7 +152,7 @@ DriverEntry( RtlCopyUnicodeString(&dest , RegistryPath); DBG_RecordSvnVersion(); - do + do { #if USE_WDF_SDIO // @@ -168,7 +168,7 @@ DriverEntry( pDriverObject, RegistryPath, WDF_NO_OBJECT_ATTRIBUTES, - &config, + &config, &hDriver); //vm control if(!NT_SUCCESS(ntStatus)) { @@ -176,8 +176,8 @@ DriverEntry( Status = NDIS_STATUS_FAILURE; break; } -#endif - +#endif + NdisZeroMemory(&MChars, sizeof(NDIS_MINIPORT_DRIVER_CHARACTERISTICS)); NdisVersion = NdisGetVersion(); @@ -187,7 +187,7 @@ DriverEntry( // WDI driver need at least NDIS 6.50 // RT_TRACE_F(COMP_INIT, DBG_LOUD, ("Ndis 6.5 configuration\n")); - + // // Set the type and version of this structure // @@ -197,10 +197,10 @@ DriverEntry( // // Version - // + // // The version of the NDIS library. Current version is 6.50. - MChars.MajorNdisVersion = NDIS_MAJOR_VERSION; - MChars.MinorNdisVersion = NDIS_MINOR_VERSION_5; + MChars.MajorNdisVersion = NDIS_MAJOR_VERSION; + MChars.MinorNdisVersion = NDIS_MINOR_VERSION_5; } else @@ -214,7 +214,7 @@ DriverEntry( } // Reserved for the version number of the driver. - MChars.MajorDriverVersion = DRIVER_MAJOR_VERSION; + MChars.MajorDriverVersion = DRIVER_MAJOR_VERSION; MChars.MinorDriverVersion = DRIVER_MINOR_VERSION; Status = WDI_Initialize(pDriverObject, RegistryPath, &MChars); @@ -225,7 +225,7 @@ DriverEntry( RT_TRACE(COMP_INIT, DBG_SERIOUS, ("Failed to register miniport with NDIS. Status = 0x%x\n", Status)); break; } - RTInitializeListHead(&GlobalAdapterList); + RTInitializeListHead(&GlobalAdapterList); }while (FALSE); @@ -242,7 +242,7 @@ DriverEntry( TraceLoggingUnregister(g_hProvider); #endif - + #if WPP_SOFTWARE_TRACE WPP_CLEANUP(pDriverObject); #endif @@ -260,7 +260,7 @@ DriverEntry( return Status; } - + RT_STATUS N6sdioAllocateAdapterSketchAndStoreHandle( @@ -274,11 +274,11 @@ N6sdioAllocateAdapterSketchAndStoreHandle( PRT_NDIS6_COMMON pNdisCommon = NULL; - + // Allocate the adapter structure. status = PlatformAllocateMemory( - NULL, - (PVOID*)&Adapter, + NULL, + (PVOID*)&Adapter, sizeof(ADAPTER) ); if (status != RT_STATUS_SUCCESS) @@ -293,8 +293,8 @@ N6sdioAllocateAdapterSketchAndStoreHandle( // Allocate RT_NDIS6_COMMON. status = PlatformAllocateMemory( - NULL, - (PVOID)&(pNdisCommon), + NULL, + (PVOID)&(pNdisCommon), sizeof(RT_NDIS6_COMMON) ); if (status != RT_STATUS_SUCCESS) @@ -492,7 +492,7 @@ N6SdioCleanUpInitializedResourcesEx( if(isAllocMem) NicIFFreeMemory(Adapter); - if(isN62CInit) + if(isN62CInit) NDIS_6_2_FREE_EXTENSION_COMPONENT(Adapter); if(isSdioTxRes) @@ -518,7 +518,7 @@ N6SdioCleanUpInitializedResourcesEx( { N6CFreeSpinLocks(Adapter); N6DeInitTimerSync(Adapter); - NdisOIDHistoryDeInit(Adapter); + NdisOIDHistoryDeInit(Adapter); } if(isAllocAdapter) @@ -539,7 +539,7 @@ N6SdioCleanUpInitializedResources( ) { PRT_SDIO_DEVICE device = GET_RT_SDIO_DEVICE(Adapter); - + switch (ResType) { case InitRM_AllocAdapter: @@ -549,9 +549,9 @@ N6SdioCleanUpInitializedResources( N6SdioFreeRxNetBufferListPool(Adapter); break; case InitRM_SpinLock: - NdisFreeSpinLock( &(device->IrpSpinLock) ); + NdisFreeSpinLock( &(device->IrpSpinLock) ); N6CFreeSpinLocks(Adapter); - NdisOIDHistoryDeInit(Adapter); + NdisOIDHistoryDeInit(Adapter); break; case InitRM_AWBs: FreeSdioAWBs(device, FALSE); @@ -564,7 +564,7 @@ N6SdioCleanUpInitializedResources( NicIFFreeMemory(Adapter); break; case InitRM_SdioInit: - + #if USE_WDF_SDIO WdfSdio_Halt(Adapter); #else @@ -578,8 +578,8 @@ N6SdioCleanUpInitializedResources( case InitRM_AllocNWifi: N6SdioFreeNative80211MIBs(Adapter); break; - case InitRM_AllocSdioRes: - N6SdioFreeRes(Adapter); + case InitRM_AllocSdioRes: + N6SdioFreeRes(Adapter); break; case InitRM_BTIODevice: N6C_DeregisterIoDevice(Adapter); @@ -599,8 +599,8 @@ N6sdioSetMiniportAttributes( IN NDIS_HANDLE MiniportAdapterHandle ) { - NDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributes; - + NDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributes; + PlatformZeroMemory(&MiniportAttributes, sizeof(NDIS_MINIPORT_ADAPTER_ATTRIBUTES)); N6_ASSIGN_OBJECT_HEADER( @@ -611,8 +611,8 @@ N6sdioSetMiniportAttributes( ); MiniportAttributes.RegistrationAttributes.MiniportAdapterContext = Adapter; - MiniportAttributes.RegistrationAttributes.AttributeFlags = - NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | + MiniportAttributes.RegistrationAttributes.AttributeFlags = + NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM | NDIS_MINIPORT_ATTRIBUTES_NO_PAUSE_ON_SUSPEND; @@ -636,8 +636,8 @@ N6SdioFill80211PhyAttributes( PDOT11_PHY_ATTRIBUTES pPhyAttributes; ULONG i, index; UCHAR rate; - - for (i=0, pPhyAttributes = pDot11Attributes->SupportedPhyAttributes ; + + for (i=0, pPhyAttributes = pDot11Attributes->SupportedPhyAttributes ; iNumSupportedPhys ; i++,pPhyAttributes++) { @@ -665,8 +665,8 @@ N6SdioFill80211PhyAttributes( break; case dot11_phy_type_ofdm: - pPhyAttributes->OFDMAttributes.uFrequencyBandsSupported = - DOT11_FREQUENCY_BANDS_LOWER | + pPhyAttributes->OFDMAttributes.uFrequencyBandsSupported = + DOT11_FREQUENCY_BANDS_LOWER | DOT11_FREQUENCY_BANDS_MIDDLE; break; @@ -685,13 +685,13 @@ N6SdioFill80211PhyAttributes( } // Tx Power Level. - pPhyAttributes->uNumberSupportedPowerLevels = + pPhyAttributes->uNumberSupportedPowerLevels = pNdisCommon->dot11SupportedPowerLevels.uNumOfSupportedPowerLevels; PlatformMoveMemory( pPhyAttributes->TxPowerLevels, pNdisCommon->dot11SupportedPowerLevels.uTxPowerLevelValues, sizeof(pPhyAttributes->TxPowerLevels)); - + // Data Rate. PlatformMoveMemory( &(pPhyAttributes->SupportedDataRatesValue), @@ -740,7 +740,7 @@ N6SdioFillHwRxFilterCapabilities( pRxFilterCapabilities->EnabledFilterTypes = NDIS_RECEIVE_FILTER_PACKET_COALESCING_FILTERS_ENABLED; pRxFilterCapabilities->SupportedQueueProperties = NDIS_RECEIVE_FILTER_PACKET_COALESCING_SUPPORTED_ON_DEFAULT_QUEUE; - + pRxFilterCapabilities->SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED | NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED| NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_NOT_EQUAL_SUPPORTED; //0; @@ -749,33 +749,33 @@ N6SdioFillHwRxFilterCapabilities( NDIS_RECEIVE_FILTER_IPV4_HEADER_SUPPORTED| NDIS_RECEIVE_FILTER_IPV6_HEADER_SUPPORTED| NDIS_RECEIVE_FILTER_UDP_HEADER_SUPPORTED); - + pRxFilterCapabilities->SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PACKET_TYPE_SUPPORTED; - + pRxFilterCapabilities->SupportedARPHeaderFields = NDIS_RECEIVE_FILTER_ARP_HEADER_OPERATION_SUPPORTED| NDIS_RECEIVE_FILTER_ARP_HEADER_SPA_SUPPORTED| NDIS_RECEIVE_FILTER_ARP_HEADER_TPA_SUPPORTED ; - + pRxFilterCapabilities->SupportedIPv4HeaderFields = NDIS_RECEIVE_FILTER_IPV4_HEADER_PROTOCOL_SUPPORTED; - + pRxFilterCapabilities->SupportedIPv6HeaderFields = NDIS_RECEIVE_FILTER_IPV6_HEADER_PROTOCOL_SUPPORTED; - + pRxFilterCapabilities->SupportedUdpHeaderFields = NDIS_RECEIVE_FILTER_UDP_HEADER_DEST_PORT_SUPPORTED; - - pRxFilterCapabilities->MaxFieldTestsPerPacketCoalescingFilter = 5; // should be >= 5 - + + pRxFilterCapabilities->MaxFieldTestsPerPacketCoalescingFilter = 5; // should be >= 5 + pRxFilterCapabilities->MaxPacketCoalescingFilters = 10; // should be >= 10 //pRxFilterCapabilities->NidsReserved = 0; #else pRxFilterCapabilities->EnabledFilterTypes = 0; pRxFilterCapabilities->SupportedQueueProperties = 0; - + pRxFilterCapabilities->SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED | NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_MASK_EQUAL_SUPPORTED; - + pRxFilterCapabilities->SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED| NDIS_RECEIVE_FILTER_MAC_HEADER_PROTOCOL_SUPPORTED; #endif @@ -831,7 +831,7 @@ N6SdioSetHardwareAssistAttributes( #if NDIS_SUPPORT_NDIS630 else if(pNdisCommon->NdisVersion <= NDIS_VERSION_BASE_6_40) { - + N6_ASSIGN_OBJECT_HEADER( HardwareAssistAttributes.Header, NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES, @@ -873,7 +873,7 @@ N6SdioSetHardwareAssistAttributes( // Ok, now register the attributes. // ndisStatus = NdisMSetMiniportAttributes(Adapter->pNdisCommon->hNdisAdapter, - (PNDIS_MINIPORT_ADAPTER_ATTRIBUTES)&HardwareAssistAttributes); + (PNDIS_MINIPORT_ADAPTER_ATTRIBUTES)&HardwareAssistAttributes); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioSetHardwareAssistAttributes(): ndisStatus: %#X\n", ndisStatus)); @@ -888,8 +888,8 @@ N6SdioUpdateDefaultSetting( IN PADAPTER pAdapter ) { - HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); - + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); + HalSdioUdtDefSet(pAdapter); } @@ -946,41 +946,41 @@ Return Value: #endif BOOLEAN bMemoryInitialized = FALSE; - + RT_TRACE(COMP_INIT, DBG_LOUD, (" ==> N6SdioInitialize(1)\n")); - + // Invoke resource checking mechanism. INIT_RES_MON_OBJ(ResMonObj); - + //1 Allocate memory to store usbdevice information. // Allocate ADAPTER structure ndisStatus = N6sdioAllocateAdapter(&Adapter, MiniportAdapterHandle); - if( ndisStatus != NDIS_STATUS_SUCCESS ) + if( ndisStatus != NDIS_STATUS_SUCCESS ) goto error; ADD_RES_TO_MON(ResMonObj, InitRM_AllocAdapter); // Add to resource monitor. sdiodevice = GET_RT_SDIO_DEVICE(Adapter); sdiodevice->pAdapter = Adapter; - + pMgntInfo = &(Adapter->MgntInfo); pNdisCommon = Adapter->pNdisCommon; pNdisCommon->NdisVersion = NdisGetVersion(); - + if(pNdisCommon->NdisVersion >= NDIS_VERSION_BASE_6_50) pNdisCommon->NdisVersion = NDIS_VERSION_BASE_6_50; - + NdisMGetDeviceProperty(MiniportAdapterHandle, - &(sdiodevice->pPhysDevObj), // PhysicalDeviceObject - &(sdiodevice->FunctionalDeviceObject), // FunctionalDeviceObject + &(sdiodevice->pPhysDevObj), // PhysicalDeviceObject + &(sdiodevice->FunctionalDeviceObject), // FunctionalDeviceObject &(sdiodevice->pSdioDevObj), // NextDeviceObject NULL, NULL); sdiodevice->Sdbusinterface.Size = sizeof(SDBUS_INTERFACE_STANDARD); sdiodevice->Sdbusinterface.Version = SDBUS_INTERFACE_VERSION; - sdiodevice->NextDeviceStackSize = (CHAR)sdiodevice->pSdioDevObj->StackSize + 1; + sdiodevice->NextDeviceStackSize = (CHAR)sdiodevice->pSdioDevObj->StackSize + 1; //2 Save the related NDIS handles sdiodevice->hNdisAdapter = MiniportAdapterHandle; @@ -1011,7 +1011,7 @@ Return Value: ndisStatus = NDIS_STATUS_FAILURE; goto error; } -#endif +#endif // @@ -1019,7 +1019,7 @@ Return Value: // PlatformInitializeSemaphore(&sdiodevice->TxSemaphore, 0); -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // // Allocate IO semaphore before create corresponding IO Handling thread. @@ -1033,7 +1033,7 @@ Return Value: // N6InitTimerSync(Adapter); - + // Allocate spin lock. N6CInitializeSpinLocks(Adapter); @@ -1049,21 +1049,21 @@ Return Value: //---------------------------------------------------------------------------- // Initialize variables related to New IO method, 2005.01.06, by rcnjko. - // + // NdisAllocateSpinLock( &(sdiodevice->IrpSpinLock) ); - NdisOIDHistoryInit(Adapter); + NdisOIDHistoryInit(Adapter); ADD_RES_TO_MON(ResMonObj, InitRM_SpinLock); // Add to resource monitor. #if (RK_PLATFORM_SUPPORT == 1) PlatformInitializeMutex(&sdiodevice->RxHandleIntMutex); #endif - // SyncIo Method 2. + // SyncIo Method 2. KeInitializeEvent( &(sdiodevice->SyncIoEvent), NotificationEvent, TRUE); - + if (WAPI_QuerySetVariable(Adapter, WAPI_QUERY, WAPI_VAR_WAPISUPPORT, 0)) pNdisCommon->MaxPktSize=NIC_MAX_PACKET_SIZE; - + sdiodevice->nIrpPendingCnt = 0; RTInitializeListHead( &(sdiodevice->AwbIdleQueue) ); RTInitializeListHead( &(sdiodevice->AwbWaitQueue) ); @@ -1071,34 +1071,34 @@ Return Value: PrepareSdioAWBs(sdiodevice); ADD_RES_TO_MON(ResMonObj, InitRM_AWBs); // Add to resource monitor. - - //2Init Event for canceling Asyn_Io pending IRP when unload + + //2Init Event for canceling Asyn_Io pending IRP when unload NdisInitializeEvent(&sdiodevice->AllAsynIoIrpReturnedEvent); - //2Init Event for all SDIO cmd52/cmd53 returned when unload + //2Init Event for all SDIO cmd52/cmd53 returned when unload NdisInitializeEvent(&sdiodevice->AllSdioCmdReturnedEvent); - + NdisInitializeEvent(&sdiodevice->FwPsClockOffEvent); NdisInitializeEvent(&sdiodevice->AllSdioRxTransCompleteEvent); - + N6WdmSdio_Enable(Adapter); - + sdiodevice->AsynIoIrpPendingCount++; - + // Read the registry parameters ndisStatus= N6SdioReadRegParameters(sdiodevice); - if (ndisStatus != NDIS_STATUS_SUCCESS) + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6SdioReadRegParameters(X): Read Registry Parameter Failed!\n")); goto error; - } + } // - // We set default hardware type to unknown type to associate common NIC handler first and + // We set default hardware type to unknown type to associate common NIC handler first and // then re-assign correct HW type association handler when the type is recognized. // 2011.12.30. // - ndisStatus = NicIFAssociateNIC(Adapter, HARDWARE_TYPE_MAX); + ndisStatus = NicIFAssociateNIC(Adapter, HARDWARE_TYPE_MAX); #if USE_WDF_SDIO if( !NT_SUCCESS(WdfSdio_Initialize(Adapter) )) @@ -1118,46 +1118,46 @@ Return Value: RT_TRACE(COMP_INIT, DBG_SERIOUS, ("MiniportInitialize(X): N6WdmSdio_Initialize() failed!\n") ); goto error; } - + #endif if(Adapter->HardwareType == HARDWARE_TYPE_MAX) HAL_ReadTypeID(Adapter); - + HAL_SetInterfaceIndex(Adapter, 0); // We should set the correct hardware type to the following function - ndisStatus = NicIFAssociateNIC(Adapter, Adapter->HardwareType); - if (ndisStatus != NDIS_STATUS_SUCCESS) + ndisStatus = NicIFAssociateNIC(Adapter, Adapter->HardwareType); + if (ndisStatus != NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("NicIFAssociateNIC Failed!\n")); goto error; - } + } else { NicIFInitResource(Adapter); } - + ADD_RES_TO_MON(ResMonObj, InitRM_AsocNIC); // Add to resource monitor. - // + // // Update NDIS6 common setting as user specifed to Adapter, MgntInfo, and HalData. // N6UpdateDefaultSetting(Adapter); Dot11_UpdateDefaultSetting(Adapter); - + N6SdioUpdateDefaultSetting(Adapter); // // Initialize SDIO Data transfer related Tx context buffer. // - if( !NT_SUCCESS(N6SdioInitTxQueue(Adapter) ) ) - goto error; + if( !NT_SUCCESS(N6SdioInitTxQueue(Adapter) ) ) + goto error; ADD_RES_TO_MON(ResMonObj, InitRM_SdioTxRes); // Add to resource monitor. - + // // Set SDIO Tx queue mapping // @@ -1173,7 +1173,7 @@ Return Value: N6WdmSdioTx_Enable(Adapter); ADD_RES_TO_MON(ResMonObj, InitRM_SdioInit); // Add to resource monitor. - + // Read adapter information such as MAC address from EEPROM NicIFReadAdapterInfo(Adapter); HT_UpdateDefaultSetting(Adapter); @@ -1200,16 +1200,16 @@ Return Value: // Support WoW for future use. Added by Roger, 2008.12.30. // Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN, &(sdiodevice->bSupportRemoteWakeUp)); - + // Settings for HctTest. if(Adapter->bInHctTest) { - + // For NDIS6 DOT11_STATISTICS test, we must open CRC, ICV error. // Revise this handler for DTM test, 2008.12.16, added by Roger. Adapter->HalFunc.AllowErrorPacketHandler(Adapter, TRUE, FALSE); } - + // // For usb selective suspend configuration. Added by Roger, 2010.04.16. // @@ -1218,19 +1218,19 @@ Return Value: // // 2011/09/07 MH Add TX power for different channel plan. // - RT_TRACE(COMP_INIT, DBG_LOUD, - ("power offset MKK = %08x/%08x/%08x ETSI = %08x/%08x/%08x\n", + RT_TRACE(COMP_INIT, DBG_LOUD, + ("power offset MKK = %08x/%08x/%08x ETSI = %08x/%08x/%08x\n", sdiodevice->RegGainOffsetMKKLow, sdiodevice->RegGainOffsetMKK, sdiodevice->RegGainOffsetMKKHigh, sdiodevice->RegGainOffsetETSILow, sdiodevice->RegGainOffsetETSI, sdiodevice->RegGainOffsetETSIHigh)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_FCC_LOW, &(sdiodevice->RegGainOffsetFCCLow)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_FCC, &(sdiodevice->RegGainOffsetFCC)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_FCC_HIGH, &(sdiodevice->RegGainOffsetFCCHigh)); - + Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_MKK_LOW, &(sdiodevice->RegGainOffsetMKKLow)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_MKK, &(sdiodevice->RegGainOffsetMKK)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_MKK_HIGH, &(sdiodevice->RegGainOffsetMKKHigh)); - + Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_ETSI_LOW, &(sdiodevice->RegGainOffsetETSILow)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_ETSI, &(sdiodevice->RegGainOffsetETSI)); Adapter->HalFunc.SetHalDefVarHandler(Adapter, HAL_DEF_GAIN_OFFSET_ETSI_HIGH, &(sdiodevice->RegGainOffsetETSIHigh)); @@ -1238,24 +1238,24 @@ Return Value: // // 2011/11/25 MH Add for Sercom requirement temporarily. // - //usbdevice->RegInPipeCnt; Need not assign to mgnt structure, we need to - - + //usbdevice->RegInPipeCnt; Need not assign to mgnt structure, we need to + + // For PSP XLink mode, 2006.09.04, by shien chang. if(pMgntInfo->bPSPXlinkMode) { - // Update ReceiveConfig variable. + // Update ReceiveConfig variable. Adapter->HalFunc.AllowAllDestAddrHandler(Adapter, TRUE, FALSE); } - // + // // In this time we shall NOT allocate TxRx corresponding resources here // temporarily for 92CU on Vista or later, 2010.01.21. - // 2010.07.01 hpfan: allocate memory for shorten prepending time is NOT used. + // 2010.07.01 hpfan: allocate memory for shorten prepending time is NOT used. if(ACTING_AS_AP(Adapter) || !pMgntInfo->bRegVelocity|| pMgntInfo->RegPreInitMem) { ndisStatus=NicIFAllocateMemory(Adapter); - + if(ndisStatus!=NDIS_STATUS_SUCCESS) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("NicIFAllocateMemory failed\n")); @@ -1267,8 +1267,8 @@ Return Value: } // - // A miniport driver must call the NdisMSetMiniportAttributes function from its - // MiniportInitializeEx function to identify a context area for miniport adapter to NDIS, + // A miniport driver must call the NdisMSetMiniportAttributes function from its + // MiniportInitializeEx function to identify a context area for miniport adapter to NDIS, // and to provide NDIS with information about the miniport adapter. // ndisStatus= N6sdioSetMiniportAttributes(Adapter, MiniportAdapterHandle); @@ -1280,11 +1280,11 @@ Return Value: N6SdioAllocRes(Adapter); - + ADD_RES_TO_MON(ResMonObj, InitRM_AllocSdioRes); // Add Usb related resource monitoring. sdiodevice->CurrentPowerState = NdisDeviceStateD0; - + //InitializAdapter and PHY Configuration. ADAPTER_SET_STATUS_FLAG(Adapter, ADAPTER_STATUS_FIRST_INIT); ndisStatus = NicIFInitializeAdapter(Adapter); @@ -1297,7 +1297,7 @@ Return Value: // // HCT12.0 2c_AddressChange. - // Note that, Adapter->CurrentAddress and Adapter->PermanentAddress had been + // Note that, Adapter->CurrentAddress and Adapter->PermanentAddress had been // set up in NicIFInitializeAdapter(). // if(pNdisCommon->bOverrideAddress) @@ -1319,11 +1319,11 @@ Return Value: RT_TRACE(COMP_INIT, DBG_SERIOUS, ("N6SdioAllocateNative80211MIBs failed\n")); goto error; } - + ADD_RES_TO_MON(ResMonObj, InitRM_AllocNWifi); // Add to resource monitor. - + N6InitializeNative80211MIBs(Adapter); - + // // Set General Attribute, 2006.10.05, by shien chang. // @@ -1371,7 +1371,7 @@ Return Value: // ndisStatus = PoRegisterPowerSettingCallback( NULL, - (LPGUID)(&PowerSetting_GUID), + (LPGUID)(&PowerSetting_GUID), (PPOWER_SETTING_CALLBACK)&N6SdioPowerSettingCallback, (PVOID)Adapter, &pNdisCommon->N6PowerSettingHandle @@ -1380,11 +1380,11 @@ Return Value: { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("Failed to register miniport with NDIS. Status = 0x%x\n", ndisStatus )); goto error; - } + } ndisStatus = PoRegisterPowerSettingCallback( NULL, - (LPGUID)(&WLANPowerMode_GUID), + (LPGUID)(&WLANPowerMode_GUID), (PPOWER_SETTING_CALLBACK)&N6SdioWLANPowerModeCallback, (PVOID)Adapter, &pNdisCommon->N6WLANPowerModeHandle @@ -1393,7 +1393,7 @@ Return Value: { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("Failed to register miniport with NDIS. Status = 0x%x\n", ndisStatus)); goto error; - } + } N6CInitThread((PVOID)Adapter); @@ -1417,18 +1417,18 @@ Return Value: if(pMgntInfo->bWiFiConfg || Adapter->bInHctTest) Adapter->HalFunc.HalRxAggrHandler(Adapter, FALSE); - // It should be called iff everything, especially security related, are initialized properly. + // It should be called iff everything, especially security related, are initialized properly. // 2005.01.24, by rcnjko. - //N6RestoreLastInitSetting(Adapter); + //N6RestoreLastInitSetting(Adapter); //This is sw initialize ready. Adapter->bSWInitReady=TRUE; - if(NDIS_STATUS_SUCCESS == ndisStatus) + if(NDIS_STATUS_SUCCESS == ndisStatus) { // After this adapter is initialzied ready, insert this adapter to the list. INSERT_GLOBAL_ADAPTER_LIST(Adapter); - + // // Register the Device object for this adapter! // Note: @@ -1436,30 +1436,30 @@ Return Value: // effect on the status for Miniportinitialize. // So, the resiteration process should be placed in the success location of Initialization. // By Bruce, 2011-07-07. - // + // if(RT_STATUS_SUCCESS != (RtStatus = N6C_RegisterIoDevice(Adapter))) { RT_TRACE_F(COMP_INIT, DBG_LOUD, ("N6C_RegisterIoDevice() failed for status = %d\n", RtStatus)); } } - + //This is sw initialize ready. if(!Adapter->bHWInitReady) PlatformScheduleWorkItem(&(pNdisCommon->InitializeAdapterWorkItem)); NicIFClearInterrupt(Adapter); - NicIFEnableInterrupt(Adapter); + NicIFEnableInterrupt(Adapter); // - // Mark the miniport driver as paused state. + // Mark the miniport driver as paused state. // Note that, please keep this action as last one in MiniportInitializeEx(). // N6C_SET_MP_DRIVER_STATE(Adapter, MINIPORT_PAUSED); Adapter->initfinish = TRUE; - Adapter->bInitComplete = TRUE; + Adapter->bInitComplete = TRUE; DrvIFIndicateCurrentPhyStatus(Adapter); - + return ndisStatus; error: @@ -1471,10 +1471,10 @@ Return Value: // // Description: -// Prepare SDIO data transfer related NonPaged memory Pool for SDIO Asyn Extension CMD +// Prepare SDIO data transfer related NonPaged memory Pool for SDIO Asyn Extension CMD // use in the future. // -// 2011.01.19, added by Roger. +// 2011.01.19, added by Roger. // NTSTATUS N6SdioInitTxQueue( @@ -1483,59 +1483,59 @@ N6SdioInitTxQueue( { NTSTATUS ntStatus = STATUS_SUCCESS; PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); - PRT_SDIO_TX_QUEUE pTxQueue = NULL; + PRT_SDIO_TX_QUEUE pTxQueue = NULL; u4Byte QueueIdx = 0; - pDevice->RtNumTxQueue = SDIO_MAX_TX_QUEUE; // TX_HIQ, TX_MIQ and TX_LOQ + pDevice->RtNumTxQueue = SDIO_MAX_TX_QUEUE; // TX_HIQ, TX_MIQ and TX_LOQ // Initialize the contexts in Tx Queue. pDevice->RtTxQueue = (PRT_SDIO_TX_QUEUE)ExAllocatePool2(POOL_FLAG_NON_PAGED, SDIO_MAX_TX_QUEUE*sizeof(RT_SDIO_TX_QUEUE), '3278' ); - if (pDevice->RtTxQueue != NULL) + if (pDevice->RtTxQueue != NULL) { for (QueueIdx=0; QueueIdxRtTxQueue[QueueIdx]); + pTxQueue= &(pDevice->RtTxQueue[QueueIdx]); pTxQueue->TransferType = SDIO_TRANSFER_TX; RTInitializeListHead(&(pTxQueue->ContextBusyList)); pTxQueue->IrpPendingCount = 0; //Init Event for canceling Tx/Rx pending IRP when unload. - NdisInitializeEvent(&(pTxQueue->AllIrpReturnedEvent)); + NdisInitializeEvent(&(pTxQueue->AllIrpReturnedEvent)); } } else - { + { ntStatus = STATUS_INSUFFICIENT_RESOURCES; goto Error; - } - + } + return ntStatus; Error: if(pDevice->RtTxQueue != NULL) { - ExFreePoolWithTag(pDevice->RtTxQueue, '3278' ); + ExFreePoolWithTag(pDevice->RtTxQueue, '3278' ); } - + return ntStatus; } // // Description: -// Dump IO bus related properties and configurations for debugging. +// Dump IO bus related properties and configurations for debugging. // Common I/O Area(CIA) in function 0: // - Card Common Control Registers(CCCR) // - Function Basic Registers(FBR) // - Card Information Structure(CIS) // // Assumption: -// A Secure Digital (SD) card bus interface has been initialized. +// A Secure Digital (SD) card bus interface has been initialized. // -// 2011.03.15, added by Roger. +// 2011.03.15, added by Roger. // RT_STATUS N6SdioDumpDeviceProperty( @@ -1544,10 +1544,10 @@ N6SdioDumpDeviceProperty( { int Idx = 0; u1Byte Data; - NTSTATUS ntStatus = STATUS_SUCCESS; + NTSTATUS ntStatus = STATUS_SUCCESS; RT_STATUS rtstatus = RT_STATUS_SUCCESS; - - + + // // Retrieve CCCR info // @@ -1556,7 +1556,7 @@ N6SdioDumpDeviceProperty( for(Idx=SDIO_CCCR_BEGIN; Idx<=SDIO_CCCR_END; Idx++) { ntStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -1565,7 +1565,7 @@ N6SdioDumpDeviceProperty( &Data); RT_TRACE(COMP_INIT, DBG_LOUD, ("SDIO CCCR[%#x]:%x\n", Idx, Data)); - + if (!NT_SUCCESS(ntStatus)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("Get CCCR[%#x] fail!! status(%#x)\n", Idx, ntStatus)); @@ -1583,7 +1583,7 @@ N6SdioDumpDeviceProperty( for(Idx=SDIO_FBR_FUNC1_BEGIN; Idx<=SDIO_FBR_FUNC1_END; Idx++) { ntStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -1592,14 +1592,14 @@ N6SdioDumpDeviceProperty( &Data); RT_TRACE(COMP_INIT, DBG_LOUD, ("SDIO FBR[%#x]:%x\n", Idx, Data)); - + if (!NT_SUCCESS(ntStatus)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("Get FBR[%#x] fail!! status(%#x)\n", Idx, ntStatus)); return RT_STATUS_FAILURE; } } - } + } // @@ -1607,11 +1607,11 @@ N6SdioDumpDeviceProperty( // if(GlobalSdioDbg & SDIO_DBG_CIS) { - + for(Idx=SDIO_CIS_BEGIN; Idx<=SDIO_CIS_END; Idx++) { ntStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -1620,7 +1620,7 @@ N6SdioDumpDeviceProperty( &Data); RT_TRACE(COMP_INIT, DBG_LOUD, ("SDIO CIS[%#x]:%x\n", Idx, Data)); - + if (!NT_SUCCESS(ntStatus)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("Get CIS[%#x] fail!! status(%#x)\n", Idx, ntStatus)); @@ -1650,9 +1650,9 @@ N6SdioDumpDeviceProperty( // return: RT_STATUS // // Assumption: -// A Secure Digital (SD) card bus interface has been initialized. +// A Secure Digital (SD) card bus interface has been initialized. // -// 2011.03.17, created by Roger. +// 2011.03.17, created by Roger. // RT_STATUS N6SdioFindCisTuple( @@ -1660,7 +1660,7 @@ N6SdioFindCisTuple( IN u1Byte Tuple, IN OUT pu4Byte pTupleScanAddress, OUT pu1Byte pBuffer, - IN OUT pu1Byte pLength + IN OUT pu1Byte pLength ) { u4Byte scanStart = *pTupleScanAddress; @@ -1673,16 +1673,16 @@ N6SdioFindCisTuple( return RT_STATUS_FAILURE; while (TRUE) { - + //Check for end if (scanStart > SDIO_CIS_END) { status = RT_STATUS_FAILURE; break; } - - //Get the code + + //Get the code status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -1692,39 +1692,39 @@ N6SdioFindCisTuple( if ( status != RT_STATUS_SUCCESS ) { break; } - + if (CISTPL_END == tupleCode) { //found the end status = RT_STATUS_FAILURE; break; } - + // Bump past tuple code scanStart++; - + //Get the tuple link value status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count (ULONG)scanStart, //Offset FALSE, //Read operation &tupleLink); - + if ( status != RT_STATUS_SUCCESS ) { break; } //Bump past tuple link scanStart++; - + //Check tuple we just found - if (tupleCode == Tuple) { + if (tupleCode == Tuple) { RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioFindCisTuple(): Tuple:0x%2.2X Found at Address:0x%X, TupleLink:0x%X \n", Tuple, (scanStart - 2), tupleLink)); - + if (tupleLink != CISTPL_LINK_END) { //return the next scan address to the caller *pTupleScanAddress = scanStart + tupleLink; @@ -1733,16 +1733,16 @@ N6SdioFindCisTuple( *pTupleScanAddress = 0xFFFFFFFF; } - //Go get the tuple + //Go get the tuple status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number MIN(*pLength,tupleLink), //Byte Count (ULONG)scanStart, //Offset FALSE, //Read operation pBuffer); - + if (status == RT_STATUS_SUCCESS) { //Set the actual return length *pLength = MIN(*pLength,tupleLink); @@ -1754,56 +1754,56 @@ N6SdioFindCisTuple( //Increment past this entire tuple scanStart += tupleLink; } - + return RT_STATUS_SUCCESS; } // // Description: -// The Card Information Structure provides more complete information about the card -// and the individual functions. The CIS is the common area to read information about all I/O -// functions that exist in a card. The design is based on the PC Card16 design standardized by +// The Card Information Structure provides more complete information about the card +// and the individual functions. The CIS is the common area to read information about all I/O +// functions that exist in a card. The design is based on the PC Card16 design standardized by // PCMCIA. All cards that support I/O shall have a common CIS and a CIS for each function. // // Assumption: -// A Secure Digital (SD) card bus interface has been initialized. +// A Secure Digital (SD) card bus interface has been initialized. // -// 2011.03.16, created by Roger. +// 2011.03.16, created by Roger. // RT_STATUS N6SdioQueryCISArea( IN PRT_SDIO_DEVICE pDevice ) { - RT_STATUS rtStatus = RT_STATUS_SUCCESS; + RT_STATUS rtStatus = RT_STATUS_SUCCESS; PADAPTER pAdapter = pDevice->pAdapter; - u1Byte CisBuffer[3]; + u1Byte CisBuffer[3]; u4Byte tplAddr = 0; u1Byte Length = 0; - + // // This 3-byte pointer points to the start of the card's common CIS. The common CIS - // contains information relation to the entire card. A card common CIS is mandatory for + // contains information relation to the entire card. A card common CIS is mandatory for // all SDIO cards. This pointer is stored in little-endian format (LSB first). // rtStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 3, //Byte Count (ULONG)SDIO_CCCR_COMMON_CIS_PTR, //Offset FALSE, //Read operation CisBuffer); - + // This is Endian-Safe pDevice->SdioCommonCISPtr = EF4Byte(((u4Byte)CisBuffer[0]) | (((u4Byte)CisBuffer[1]) << 8) | (((u4Byte)CisBuffer[2]) << 16)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioQueryCISArea(): SdioCommonCISPtr(%#x)\n", pDevice->SdioCommonCISPtr)); - + PlatformZeroMemory(&pDevice->Sdiomanfid, sizeof(pDevice->Sdiomanfid)); Length = sizeof(pDevice->Sdiomanfid); tplAddr = RT_GET_SDIO_COMMON_CISPTR(pDevice); @@ -1815,14 +1815,14 @@ N6SdioQueryCISArea( &tplAddr, (pu1Byte)&pDevice->Sdiomanfid, &Length); - - if ( rtStatus != RT_STATUS_SUCCESS ) - { - RT_TRACE(COMP_INIT, DBG_WARNING, ("SDIO Bus Driver: Failed to get MANFID tuple error:%d \n", rtStatus)); - } - else - { - + + if ( rtStatus != RT_STATUS_SUCCESS ) + { + RT_TRACE(COMP_INIT, DBG_WARNING, ("SDIO Bus Driver: Failed to get MANFID tuple error:%d \n", rtStatus)); + } + else + { + //save this off so that it can be copied into each SDIO Func's SDDEVICE structure pDevice->SDIO_ManufacturerCode = EF2Byte(pDevice->Sdiomanfid.ManufacturerCode); @@ -1855,24 +1855,24 @@ N6SdioQueryCISArea( else if(pDevice->SDIO_ManufacturerInfo == HAL_HW_SDIO_8703BS_PID) pAdapter->HardwareType = HARDWARE_TYPE_RTL8703BS; else if(pDevice->SDIO_ManufacturerInfo == HAL_HW_SDIO_8821BS_PID) - pAdapter->HardwareType = HARDWARE_TYPE_RTL8821BS; + pAdapter->HardwareType = HARDWARE_TYPE_RTL8821BS; else { - RT_TRACE(COMP_INIT, DBG_WARNING, ("N6SdioQueryCISArea(): Invalid MANFINFO!!")); - pAdapter->HardwareType = HARDWARE_TYPE_MAX; - } + RT_TRACE(COMP_INIT, DBG_WARNING, ("N6SdioQueryCISArea(): Invalid MANFINFO!!")); + pAdapter->HardwareType = HARDWARE_TYPE_MAX; + } #endif pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_VID, (pu1Byte)&pDevice->SDIO_ManufacturerCode); pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_PID, (pu1Byte)&pDevice->SDIO_ManufacturerInfo); - RT_TRACE(COMP_INIT, DBG_LOUD, ("SDIO MANFCODE:0x%X, MANFINFO:0x%X \n", + RT_TRACE(COMP_INIT, DBG_LOUD, ("SDIO MANFCODE:0x%X, MANFINFO:0x%X \n", pDevice->SDIO_ManufacturerCode, - pDevice->SDIO_ManufacturerInfo)); + pDevice->SDIO_ManufacturerInfo)); } - + RT_TRACE(COMP_INIT, DBG_WARNING, ("N6Sdio(): SDIO_ManufacturerInfo(%#x)\n", pDevice->SDIO_ManufacturerInfo)); - RT_TRACE(COMP_INIT, DBG_WARNING, ("N6SdioQueryCISArea(): HardwareType(%#x)\n", pAdapter->HardwareType)); + RT_TRACE(COMP_INIT, DBG_WARNING, ("N6SdioQueryCISArea(): HardwareType(%#x)\n", pAdapter->HardwareType)); return rtStatus; @@ -1892,13 +1892,13 @@ N6SdioConfigureBusCLKByWorkAround( IN PRT_SDIO_DEVICE pDevice ) { - NTSTATUS ntStatus = STATUS_SUCCESS; + NTSTATUS ntStatus = STATUS_SUCCESS; RT_STATUS status = RT_STATUS_FAILURE; u1Byte Data=0; u4Byte SdioBusClk=0; - + status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -1906,7 +1906,7 @@ N6SdioConfigureBusCLKByWorkAround( FALSE, //Read operation &Data); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD, ("Read SDIO CCCR[0x13] Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } @@ -1924,8 +1924,8 @@ N6SdioConfigureBusCLKByWorkAround( ntStatus = PlatformSdioSetProperty(pDevice, SDP_BUS_CLOCK, &SdioBusClk, - sizeof(SdioBusClk)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(SdioBusClk)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE_F(COMP_INIT, DBG_LOUD, ("Set SDP_BUS_CLOCK Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } @@ -1935,7 +1935,7 @@ N6SdioConfigureBusCLKByWorkAround( // Data |= BIT1; //[3:1] BSS status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -1944,7 +1944,7 @@ N6SdioConfigureBusCLKByWorkAround( &Data); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD,("Write SDIO CCCR[0x13] Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } @@ -1955,24 +1955,24 @@ N6SdioConfigureBusCLKByWorkAround( Data = 0; delay_ms(10); status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count (ULONG)0x13, //Offset FALSE, //Read operation &Data); - + RT_TRACE(COMP_INIT, DBG_LOUD, (">>>>>>>>>>>> 3 SDIO CCCR[0x13]:%x\n", Data)); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD, ("3 SDIO CCCR[0x13] Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } - // End of To be removed ... + // End of To be removed ... pDevice->bSdioBusClkRaised = TRUE; - + } } return STATUS_SUCCESS; @@ -1989,13 +1989,13 @@ N6SdioConfigureBusCLK_SDR12( IN PRT_SDIO_DEVICE pDevice ) { - NTSTATUS ntStatus = STATUS_SUCCESS; + NTSTATUS ntStatus = STATUS_SUCCESS; RT_STATUS status = RT_STATUS_FAILURE; u1Byte Data = 0; u4Byte SdioBusClk = 0; - + status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -2003,7 +2003,7 @@ N6SdioConfigureBusCLK_SDR12( FALSE, //Read operation &Data); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD, ("Read SDIO CCCR[0x13] Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } @@ -2017,9 +2017,9 @@ N6SdioConfigureBusCLK_SDR12( ntStatus = PlatformSdioSetProperty(pDevice, SDP_BUS_CLOCK, &SdioBusClk, - sizeof(SdioBusClk)); - - if(!NT_SUCCESS(ntStatus)){ + sizeof(SdioBusClk)); + + if(!NT_SUCCESS(ntStatus)){ RT_TRACE_F(COMP_INIT, DBG_LOUD, ("Set SDP_BUS_CLOCK Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } @@ -2029,7 +2029,7 @@ N6SdioConfigureBusCLK_SDR12( // Data &= ~(BIT1|BIT2); //[3:1] BSS status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -2037,7 +2037,7 @@ N6SdioConfigureBusCLK_SDR12( TRUE, //Write operation &Data); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD,("Write SDIO CCCR[0x13] Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } @@ -2048,47 +2048,47 @@ N6SdioConfigureBusCLK_SDR12( Data = 0; delay_ms(10); status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count (ULONG)0x13, //Offset FALSE, //Read operation &Data); - + RT_TRACE(COMP_INIT, DBG_LOUD, (">>>>>>>>>>>> 3 SDIO CCCR[0x13]:%x\n", Data)); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD, ("3 SDIO CCCR[0x13] Property FAIL!!\n")); return STATUS_SUCCESS; //do not cause init fail } - + RT_TRACE(COMP_INIT, DBG_LOUD, ("Done Set SDIO clk to SDR12\n")); - - // End of To be removed ... + + // End of To be removed ... return STATUS_SUCCESS; } // // Description: -// Configure/Retrieve SDIO bus related properties and configurations. +// Configure/Retrieve SDIO bus related properties and configurations. // Common I/O Area(CIA) in function 0: // - Card Common Control Registers(CCCR) // - Function Basic Registers(FBR) // - Card Information Structure(CIS) // // Assumption: -// A Secure Digital (SD) card bus interface has been initialized. +// A Secure Digital (SD) card bus interface has been initialized. // -// 2010.12.09, added by Roger. +// 2010.12.09, added by Roger. // NTSTATUS N6SdioConfigureDevice( IN PRT_SDIO_DEVICE pDevice ) { - NTSTATUS ntStatus = STATUS_SUCCESS; + NTSTATUS ntStatus = STATUS_SUCCESS; RT_STATUS rtstatus = RT_STATUS_SUCCESS; BOOLEAN bEnableInt = FALSE; u1Byte IENx = 0; @@ -2103,30 +2103,30 @@ N6SdioConfigureDevice( pDevice, SDP_FUNCTION_NUMBER, &pDevice->SdioFuncNum, - sizeof(pDevice->SdioFuncNum)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(pDevice->SdioFuncNum)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; - } + } + - // // Query SDIO Card Information Structure // rtstatus = N6SdioQueryCISArea(pDevice); - if(rtstatus != RT_STATUS_SUCCESS){ + if(rtstatus != RT_STATUS_SUCCESS){ return STATUS_UNSUCCESSFUL; } - + // // Dump SDIO IO Bus related information if needed. // rtstatus = N6SdioDumpDeviceProperty(pDevice); - if(rtstatus != RT_STATUS_SUCCESS){ + if(rtstatus != RT_STATUS_SUCCESS){ return STATUS_UNSUCCESSFUL; } - + // // Get Driver Version // @@ -2134,24 +2134,24 @@ N6SdioConfigureDevice( pDevice, SDP_BUS_DRIVER_VERSION, &pDevice->SdioBusDriverVer, - sizeof(pDevice->SdioBusDriverVer)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(pDevice->SdioBusDriverVer)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } // - // Read CCCRx Format Version Number and SDIOx Specification Revision Number. + // Read CCCRx Format Version Number and SDIOx Specification Revision Number. // ntStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count (ULONG)SDIO_CCCRx_SDIOx, //Offset FALSE, //Read operation &pDevice->SdioRevNum); - + if (!NT_SUCCESS(ntStatus)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("Get SDIO_CCCRx_SDIOx failed:%x\n", ntStatus)); @@ -2163,7 +2163,7 @@ N6SdioConfigureDevice( // Retrieve SD Format Version Number. // ntStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -2179,8 +2179,8 @@ N6SdioConfigureDevice( if( pDevice->SdioBusDriverVer >= SDBUS_DRIVER_VERSION_2 && ((pDevice->SdioRevNum & 0x0f) >= 0x02) && // CCCR v2.0 ((pDevice->SdioRevNum & 0xf0) >= 0x30)) // SDIO v2.0 - { - + { + u2Byte SdioFuncBlockSize = SDIO_BUS_SIZE; @@ -2191,8 +2191,8 @@ N6SdioConfigureDevice( pDevice, SDP_FUNCTION_INT_ENABLE, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } @@ -2206,24 +2206,24 @@ N6SdioConfigureDevice( pDevice, SDP_FUNCTION_INT_ENABLE, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } } - + // // Read CCCR interrupt // ntStatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count (ULONG)SDIO_CCCR_IENx, //Offset FALSE, //Read operation - &IENx); - + &IENx); + if (!NT_SUCCESS(ntStatus)) { RT_TRACE(COMP_INIT, DBG_WARNING, ("Get REG_CCCR_IENx failed:%x\n", ntStatus)); @@ -2235,32 +2235,32 @@ N6SdioConfigureDevice( { // // Set SDIO Driving capabilities - // NOTICE: If the host driving is too weak to reach here, + // NOTICE: If the host driving is too weak to reach here, // this function will be no-use. // u1bData = 0; rtstatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, WLAN_IOREG_DEVICE_ID, //Device ID 1, //Function Number 1, //Byte Count (ULONG)0x74, //Offset FALSE, //Read operation - &u1bData); + &u1bData); u1bData &= ~((BIT5)|(BIT6)|(BIT7)); u1bData |= (pDevice->RegSdioDriving) << 5; RT_TRACE(COMP_INIT, DBG_LOUD, ("Set SDIO Driving to: %#x\n", u1bData)); - + rtstatus = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, WLAN_IOREG_DEVICE_ID, //Device ID 1, //Function Number 1, //Byte Count (ULONG)0x74, //Offset TRUE, //Write operation - &u1bData); + &u1bData); if (rtstatus != RT_STATUS_SUCCESS) { @@ -2275,8 +2275,8 @@ N6SdioConfigureDevice( ntStatus = PlatformSdioGetProperty(pDevice, SDP_BUS_WIDTH, &pDevice->SdioBusWidth, - sizeof(pDevice->SdioBusWidth)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(pDevice->SdioBusWidth)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } @@ -2292,8 +2292,8 @@ N6SdioConfigureDevice( ntStatus = PlatformSdioGetProperty(pDevice, SDP_BUS_CLOCK, &pDevice->SdioBusClk, - sizeof(pDevice->SdioBusClk)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(pDevice->SdioBusClk)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } @@ -2304,11 +2304,11 @@ N6SdioConfigureDevice( ntStatus = PlatformSdioGetProperty(pDevice, SDP_HOST_BLOCK_LENGTH, &pDevice->SdioHostBlockSize, - sizeof(pDevice->SdioHostBlockSize)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(pDevice->SdioHostBlockSize)); + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } - + // // Set SDIO Function Block Size @@ -2317,7 +2317,7 @@ N6SdioConfigureDevice( SDP_FUNCTION_BLOCK_LENGTH, &SdioFuncBlockSize, sizeof(SdioFuncBlockSize)); - if(!NT_SUCCESS(ntStatus)){ + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } @@ -2329,30 +2329,30 @@ N6SdioConfigureDevice( SDP_FUNCTION_BLOCK_LENGTH, &pDevice->SdioFuncBlockSize, sizeof(pDevice->SdioFuncBlockSize)); - if(!NT_SUCCESS(ntStatus)){ + if(!NT_SUCCESS(ntStatus)){ return ntStatus; } if(pDevice->SdioFuncBlockSize != SDIO_BUS_SIZE) return STATUS_UNSUCCESSFUL; - + RT_TRACE(COMP_INIT, DBG_LOUD, ("==================SDIO Bus Info==================\n")); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioFuncBlockSize(%d)\n", pDevice->SdioFuncBlockSize)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioHostBlockSize(%d)\n", pDevice->SdioHostBlockSize)); - RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioBusClk(%d)\n", pDevice->SdioBusClk)); + RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioBusClk(%d)\n", pDevice->SdioBusClk)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioBusWidth(%d)\n", pDevice->SdioBusWidth)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioFuncNum(%d)\n", pDevice->SdioFuncNum)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioBusDriverVer(%d)\n", pDevice->SdioBusDriverVer)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioRevNum(%d)\n", pDevice->SdioRevNum)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): SdioFormatVer(%d)\n", pDevice->SdioFormatVer)); - RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): CCCR IENx(%#x)\n", IENx)); + RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): CCCR IENx(%#x)\n", IENx)); RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioConfigureDevice(): Function Interrupt Enable(%d)\n", bEnableInt)); RT_TRACE(COMP_INIT, DBG_LOUD, ("=================================================\n")); } else - { - ntStatus = STATUS_UNSUCCESSFUL; + { + ntStatus = STATUS_UNSUCCESSFUL; } return ntStatus; @@ -2419,9 +2419,9 @@ Return Value: // To make sure that we will NOT fail to indicate phy status during initialization process. //DrvIFIndicateCurrentPhyStatus(pAdapter); - + RT_TRACE(COMP_INIT, DBG_LOUD, ("<== MiniportRestart(), DriverState(%d)\n", N6C_GET_MP_DRIVER_STATE(pAdapter))); - + return NDIS_STATUS_SUCCESS; } @@ -2482,7 +2482,7 @@ NOTE: A miniport can't fail the pause request { PADAPTER pAdapter = (PADAPTER)MiniportAdapterContext; PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter); - + N6C_MP_DRIVER_STATE CurrDriverState; RT_TRACE(COMP_INIT, DBG_LOUD, ("==> MiniportPause(), DriverState(%d)\n", N6C_GET_MP_DRIVER_STATE(pAdapter))); @@ -2490,9 +2490,9 @@ NOTE: A miniport can't fail the pause request // // Mark the miniport driver as pausing state to reject tx/rx request. // - + if(pAdapter->MgntInfo.NdisVersion < RT_NDIS_VERSION_6_20) - { + { CurrDriverState = N6C_GET_MP_DRIVER_STATE(pAdapter); RT_ASSERT( (CurrDriverState < MINIPORT_PAUSED || CurrDriverState > MINIPORT_PAUSING), @@ -2521,7 +2521,7 @@ NOTE: A miniport can't fail the pause request while(pTargetAdapter != NULL) { - N62CHelperHandleMiniportPause(pTargetAdapter, MiniportPauseParameters); + N62CHelperHandleMiniportPause(pTargetAdapter, MiniportPauseParameters); pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } @@ -2576,16 +2576,16 @@ Return Value: { // // Halt H/W. - // 060118, rcnjko: + // 060118, rcnjko: // We must do it for Vista DTM will shutdown DUT machine before starting NDISTEST6.5. - // Otherwise, 87B F/W will default setting to respond what Host controler query - // which might different with the one in EEPROM, and therefore, + // Otherwise, 87B F/W will default setting to respond what Host controler query + // which might different with the one in EEPROM, and therefore, // NDISTEST 6.5 won't select the devise to test. // RT_TRACE(COMP_INIT, DBG_LOUD, ("calling NicIFHaltAdapter() by N6SdioShutdown()......\n")); Adapter->bDriverShutdown = TRUE; - + { PADAPTER pAdapter =GetNextExtAdapter(pDefaultAdapter); while(pAdapter != NULL) @@ -2598,10 +2598,10 @@ Return Value: } } - // + // // 2010/09/02 MH Before halt adapter, we need to leave ips/lps mode. Otherwise, selective suspend // power save level will be limited by IPS flag RT_RF_OFF_LEVL_HALT_NIC(add by Tynli at 2010/03) - // 88/92C HW constraint, we can not use HW automatic shutdown sequence. According to Scoot and + // 88/92C HW constraint, we can not use HW automatic shutdown sequence. According to Scoot and // Alfred's suggestion (amil at 2010/09/02), if 8051 is alive and we try to close or reset clock. MAC hardware // handshake may fail and 8051 can not access MAC register. It will produce many error condition. // We need to close 8051 and execute firmware self reset to prevent HW power domain error. @@ -2609,11 +2609,11 @@ Return Value: LeaveAllPowerSaveMode(Adapter); // Leave HW 32K CLK - if(RT_IN_PS_LEVEL(Adapter, RT_RF_OFF_LEVEL_FW_IPS_32K) && + if(RT_IN_PS_LEVEL(Adapter, RT_RF_OFF_LEVEL_FW_IPS_32K) && !(IS_CARD_DISABLE_IN_FW_LOW_PWR_STATE(Adapter))) { u1Byte FwPSState; - + RT_CLEAR_PS_LEVEL(Adapter, RT_RF_OFF_LEVEL_FW_IPS_32K); // To prevent from clock off again if(pDefaultAdapter->bFWReady) { @@ -2683,7 +2683,7 @@ Return Value: u8Byte CurrentTime; RT_TRACE(COMP_INIT, DBG_LOUD, (" ==> N6SdioPnPEventNotify()\n")); - + switch(NetDevicePnPEvent->DevicePnPEvent) { case NdisDevicePnPEventSurpriseRemoved: @@ -2698,7 +2698,7 @@ Return Value: PlatformReleaseMutex(&device->RxHandleIntMutex); #endif -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // Release IO semaphore before cancel corresponding IO thread. PlatformReleaseSemaphore(&device->IOSemaphore); #endif @@ -2710,7 +2710,7 @@ Return Value: RT_CUSTOM_INDI_TARGET_IRP, NULL, 0); - + N6SdioReturnAllPendingTxPackets(Adapter); if(OS_SUPPORT_WDI(Adapter)) @@ -2733,8 +2733,8 @@ Return Value: { CurrentTime = PlatformGetCurrentTime(); NdisWaitEvent(&device->SetPnpChkForHangEvent, RT_CHECK_FOR_HANG_PERIOD*1000); - RT_TRACE(COMP_INIT, DBG_TRACE, ("N6SdioPnPEventNotify(): Time spent %I64d us\n", - PlatformGetCurrentTime()-CurrentTime)); + RT_TRACE(COMP_INIT, DBG_TRACE, ("N6SdioPnPEventNotify(): Time spent %I64d us\n", + PlatformGetCurrentTime()-CurrentTime)); } break; @@ -2743,15 +2743,15 @@ Return Value: RT_TRACE(COMP_INIT, DBG_LOUD, ("NdisDevicePnPEventPowerProfileChanged- PowerProfile(%d)\n",pPSC->PowerProfile)); N6SdioPowerSettingChangeNotify(Adapter); break; - + case NdisDevicePnPEventQueryStopped: - case NdisDevicePnPEventStopped: + case NdisDevicePnPEventStopped: case NdisDevicePnPEventQueryRemoved: - case NdisDevicePnPEventRemoved: + case NdisDevicePnPEventRemoved: default: RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioPnPEventNotify: unknown PnP event %x \n", NetDevicePnPEvent->DevicePnPEvent)); - break; + break; } RT_TRACE(COMP_INIT, DBG_LOUD, (" <== N6SdioPnPEventNotify()\n")); return; @@ -2766,28 +2766,28 @@ N6SdioPowerSettingCallback( ) { PADAPTER Adapter = (PADAPTER) MiniportAdapterContext; - NDIS_STATUS Status = STATUS_INVALID_PARAMETER; + NDIS_STATUS Status = STATUS_INVALID_PARAMETER; GUID PowerSetting_GUID = GUID_ACTIVE_POWERSCHEME;//GUID_POWERSCHEME_PERSONALITY; GUID MaxPowerSaving_GUID = GUID_MAX_POWER_SAVINGS; GUID TypicalPowerSaving_GUID = GUID_TYPICAL_POWER_SAVINGS; GUID MinPowerSaving_GUID = GUID_MIN_POWER_SAVINGS; if( IsEqualGUID((LPGUID)(&PowerSetting_GUID), SettingGuid) - && (ValueLength == sizeof(GUID)) && Value != NULL ) + && (ValueLength == sizeof(GUID)) && Value != NULL ) { PMGNT_INFO pMgntInfo=&(Adapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); if(IsEqualGUID((LPGUID)&MaxPowerSaving_GUID,(LPGUID)Value) ) pPSC->PowerSetting = POWERGUID_MAX_POWER_SAVINGS; - else if(IsEqualGUID((LPGUID)&TypicalPowerSaving_GUID,(LPGUID)Value)) + else if(IsEqualGUID((LPGUID)&TypicalPowerSaving_GUID,(LPGUID)Value)) pPSC->PowerSetting = POWERGUID_TYPICAL_POWER_SAVINGS; else if(IsEqualGUID((LPGUID)&MinPowerSaving_GUID,(LPGUID)Value) ) pPSC->PowerSetting = POWERGUID_MIN_POWER_SAVINGS; - - RT_TRACE(COMP_POWER, DBG_LOUD, ("%s PowerSetting(%d)\n", __FUNCTION__, pPSC->PowerSetting)); - - N6SdioPowerSettingChangeNotify(Adapter); + + RT_TRACE(COMP_POWER, DBG_LOUD, ("%s PowerSetting(%d)\n", __FUNCTION__, pPSC->PowerSetting)); + + N6SdioPowerSettingChangeNotify(Adapter); Status = STATUS_SUCCESS; } return Status; @@ -2802,35 +2802,35 @@ N6SdioWLANPowerModeCallback( ) { PADAPTER Adapter = (PADAPTER) MiniportAdapterContext; - NDIS_STATUS Status = STATUS_INVALID_PARAMETER; + NDIS_STATUS Status = STATUS_INVALID_PARAMETER; GUID WLANPowerMode_GUID = GUID_WLAN_POWER_MODE; u1Byte WLAN_Maximum_Performance[16] = - {0x4f,0x16,0xab,0xc1,0x4f,0x83,0x3d,0x46, 0x85, 0x44, 0xa4, 0x0e, 0x93, 0xab, 0x54, 0x72}; + {0x4f,0x16,0xab,0xc1,0x4f,0x83,0x3d,0x46, 0x85, 0x44, 0xa4, 0x0e, 0x93, 0xab, 0x54, 0x72}; u1Byte WLAN_Low_Power_Saving[16] = - {0xcb,0xbc,0x7c,0x78,0x4b,0xcd,0x76,0x47,0x8b, 0xe5, 0x5f, 0x8a, 0xe4, 0x72, 0x6f, 0x2b}; + {0xcb,0xbc,0x7c,0x78,0x4b,0xcd,0x76,0x47,0x8b, 0xe5, 0x5f, 0x8a, 0xe4, 0x72, 0x6f, 0x2b}; u1Byte WLAN_Medium_Power_Saving[16] = {0x12,0xe4,0x28,0x67,0xd1,0x40,0xb0,0x4a,0x8d, 0x15, 0xf3, 0xc5, 0x6f, 0x30, 0x3e, 0xb5}; u1Byte WLAN_Maximum_Power_Saving[16] = {0x0F,0xDC,0x12,0xE0,0x97,0x83,0xB5,0x46,0xA0, 0x60, 0x0D, 0xE8, 0x4F, 0x96, 0x38, 0x8E}; if( IsEqualGUID((LPGUID)(&WLANPowerMode_GUID), SettingGuid) - && (ValueLength == sizeof(GUID)) && Value != NULL ) + && (ValueLength == sizeof(GUID)) && Value != NULL ) { PMGNT_INFO pMgntInfo=&(Adapter->MgntInfo); PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); if(PlatformCompareMemory(WLAN_Maximum_Power_Saving, Value, ValueLength)==0) pPSC->PowerMode = POWER_SAVING_MAXIMUM_LEVEL; - else if(PlatformCompareMemory(WLAN_Medium_Power_Saving, Value, ValueLength)==0) + else if(PlatformCompareMemory(WLAN_Medium_Power_Saving, Value, ValueLength)==0) pPSC->PowerMode = POWER_SAVING_MAX_PSP; else if(PlatformCompareMemory(WLAN_Low_Power_Saving, Value, ValueLength)==0) pPSC->PowerMode = POWER_SAVING_FAST_PSP; else if(PlatformCompareMemory(WLAN_Maximum_Performance, Value, ValueLength)==0) pPSC->PowerMode = POWER_SAVING_NO_POWER_SAVING; - RT_TRACE(COMP_POWER, DBG_LOUD, ("%s PowerMode(%d)\n", __FUNCTION__, pPSC->PowerMode)); - - N6SdioPowerSettingChangeNotify(Adapter); + RT_TRACE(COMP_POWER, DBG_LOUD, ("%s PowerMode(%d)\n", __FUNCTION__, pPSC->PowerMode)); + + N6SdioPowerSettingChangeNotify(Adapter); Status = STATUS_SUCCESS; } return Status; @@ -2846,11 +2846,11 @@ N6SdioPowerSettingChangeNotify( PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioPowerSettingChangeNotify()\n")); - + Adapter->HalFunc.UpdateIPSStatusHandler(Adapter, pNdisCommon->RegInactivePsMode); Adapter->HalFunc.UpdateLPSStatusHandler(Adapter, pNdisCommon->RegLeisurePsMode, pNdisCommon->RegPowerSaveMode); - - RT_TRACE( COMP_POWER, DBG_LOUD, ("%s : PowerPolicy %d bInactivePs=%d bLeisurePS=%d <==\n", + + RT_TRACE( COMP_POWER, DBG_LOUD, ("%s : PowerPolicy %d bInactivePs=%d bLeisurePS=%d <==\n", __FUNCTION__, pPSC->PowerPolicy, pPSC->bInactivePs, pPSC->bLeisurePs)); } @@ -2898,14 +2898,14 @@ Return Value: BOOLEAN bCanceled; PHAL_DATA_TYPE pHalData=GET_HAL_DATA(Adapter); PRT_SDIO_DEVICE sdiodevice = GET_RT_SDIO_DEVICE(Adapter); - PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); + PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); RT_TRACE(COMP_INIT, DBG_LOUD, (" ==> N6SdioHalt()\n")); NDBG_Halt(Adapter); - + Adapter->bDriverIsGoingToUnload = TRUE; - + { PADAPTER pAdapter = GetNextExtAdapter(pDefaultAdapter); while(pAdapter != NULL) @@ -2925,7 +2925,7 @@ Return Value: N6C_DeregisterIoDevice(Adapter); REMOVE_GLOBAL_ADAPTER_LIST(Adapter); - + if(ACTING_AS_AP(pDefaultAdapter)) { AP_DisassociateAllStation(pDefaultAdapter, unspec_reason); @@ -2945,7 +2945,7 @@ Return Value: !IS_CARD_DISABLE_IN_FW_LOW_PWR_STATE(Adapter)) { u1Byte FwPSState; - + RT_CLEAR_PS_LEVEL(Adapter, RT_RF_OFF_LEVEL_FW_IPS_32K); // To prevent from setting clock off again if(pDefaultAdapter->bFWReady) { @@ -2960,7 +2960,7 @@ Return Value: NicIFClearInterrupt(Adapter); - //sync with pcie,wait for RF change complete + //sync with pcie,wait for RF change complete PlatformAcquireSpinLock(Adapter,RT_RF_STATE_SPINLOCK); while( pMgntInfo->RFChangeInProgress) { @@ -2969,11 +2969,11 @@ Return Value: RT_TRACE(COMP_POWER,DBG_LOUD, ("RF is in progress, need to wait until rf chang is done.\n")); delay_ms(1); - + PlatformAcquireSpinLock(Adapter,RT_RF_STATE_SPINLOCK); - } + } PlatformReleaseSpinLock(Adapter,RT_RF_STATE_SPINLOCK); - + // // 2010/08/13 MH We need to move the flag setting after LeaveAllPowerSaveMode(). // Otherwise, we may not leave IPS and call NicIFHaltAdapter. This will block the halt sequence @@ -2985,7 +2985,7 @@ Return Value: // Halt H/W. // NicIFHaltAdapter(Adapter, FALSE); - + Adapter->HalFunc.WaitForH2CQueueEmptyHandler(Adapter); if(((pMgntInfo->RfOffReason & (RF_CHANGE_BY_IPS|RF_CHANGE_BY_SW|RF_CHANGE_BY_HW)) && @@ -3004,13 +3004,13 @@ Return Value: SetFwPSRFOffLowPower(Adapter); } } - + if(device->bSdioBusClkRaised) { N6SdioConfigureBusCLK_SDR12(device); } - // We MUST perform necessary IO before setting bDriverStopped and bSurpriseRemoved flags, + // We MUST perform necessary IO before setting bDriverStopped and bSurpriseRemoved flags, // since we will reject further Sync IO in RTusbCallUSBD() if bDriverStopped || bSurpriseRemoved. // 2005.01.13, by rcnjko. Adapter->bDriverStopped = TRUE; @@ -3018,12 +3018,12 @@ Return Value: // // Mark the miniport driver as halted state. // -// RT_ASSERT( (N6C_GET_MP_DRIVER_STATE(Adapter) == MINIPORT_PAUSED), +// RT_ASSERT( (N6C_GET_MP_DRIVER_STATE(Adapter) == MINIPORT_PAUSED), // ("MiniportHalt(): DriverState(%d) != PAUSED !!!\n", N6C_GET_MP_DRIVER_STATE(Adapter))); N6C_SET_MP_DRIVER_STATE(Adapter, MINIPORT_HALTED); - // SyncIo Method 2. - // We must wake up the workitems waiting for SyncIo event before, + // SyncIo Method 2. + // We must wake up the workitems waiting for SyncIo event before, // waiting all workitem completed. 2005.01.06, by rcnjko. if(device->SyncIoWaitingCount>0) { // If there is workitem waiting. @@ -3054,7 +3054,7 @@ Return Value: // RemoveAllTS must call here!! // This function shall be called before MPShutdown(). // For Traffic Stream. Remove all TS before HALT - + NicIFDisableInterrupt(Adapter); RemoveAllTS(Adapter); ReleaseAllTSTimer(Adapter); @@ -3063,7 +3063,7 @@ Return Value: // Free native 802.11 MIBs, 2006.10.10, by shien chang. N6SdioFreeNative80211MIBs(Adapter); - + #if USE_WDF_SDIO WdfSdio_Disable(Adapter); #else @@ -3080,7 +3080,7 @@ Return Value: // Free Tx semaphore. PlatformFreeSemaphore(&device->TxSemaphore); -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // Release IO semaphore before cancel corresponding IO thread. PlatformReleaseSemaphore(&device->IOSemaphore); @@ -3101,8 +3101,8 @@ Return Value: } //---------------------------------------------------------------------------- - // NOTE! Adapter is released in N6SdioFreeAll(), - // so, we MUST NOT access Adapter after it. 2006.03.08, by rcnjko. + // NOTE! Adapter is released in N6SdioFreeAll(), + // so, we MUST NOT access Adapter after it. 2006.03.08, by rcnjko. //---------------------------------------------------------------------------- N6SdioFreeAll( Adapter ); #if (WPP_SOFTWARE_TRACE == 0) @@ -3115,7 +3115,7 @@ Return Value: RT_TRACE(COMP_INIT, DBG_LOUD, (" RTL_P2P_FreeMemory_count = %"i64fmt"d\n",RTL_P2P_FreeMemory_count)); RT_TRACE(COMP_INIT, DBG_LOUD, (" RTL_P2P_AllocateMemory_Len = %"i64fmt"d\n",RTL_P2P_AllocateMemory_Len)); RT_TRACE(COMP_INIT, DBG_LOUD, (" RTL_P2P_FreeMemory_Len = %"i64fmt"d\n",RTL_P2P_FreeMemory_Len)); -#endif +#endif RT_TRACE(COMP_INIT, DBG_LOUD, (" <== N6SdioHalt()\n")); return; } @@ -3154,14 +3154,14 @@ Return Value: --*/ { RT_TRACE(COMP_INIT, DBG_LOUD, ("==> N6SdioUnload()\n")); - + UNREFERENCED_PARAMETER(DriverObject); #if USE_WDF_SDIO WdfDriverMiniportUnload(WdfGetDriver()); -#endif +#endif -#if (WDI_SUPPORT == 1) +#if (WDI_SUPPORT == 1) if(NdisGetVersion() >= NDIS_VERSION_BASE_6_50) { WDI_DeInitialize(GlobalRtDriverContext.NdisContext.Ndis6MiniportDriverHandle); @@ -3173,7 +3173,7 @@ Return Value: } GlobalRtDriverContext.NdisContext.Ndis6MiniportDriverHandle = NULL; - + RT_ASSERT(RTIsListEmpty(&(GlobalRtDriverContext.AdapterList)), ("GlobalRtDriverContext.AdapterList is not empty!\n")); RT_ASSERT(RTIsListEmpty(&(GlobalRtDriverContext.NdisContext.IoDeviceList)), ("IoDevice List is not empty!\n")); PLATFORM_FREE_RT_SPINLOCK(GlobalRtDriverContext.ContextLock); @@ -3186,11 +3186,11 @@ Return Value: RtDbgDeinitSpinlock(); RT_TRACE(COMP_INIT, DBG_LOUD, ("<== N6SdioUnload()\n")); - + #if SOFTWARE_TRACE_LOGGING TraceLoggingUnregister(g_hProvider); #endif - + #if WPP_SOFTWARE_TRACE WPP_CLEANUP(DriverObject); #endif @@ -3209,29 +3209,29 @@ Routine Description: NDIS calls a miniport driver's MiniportOidRequest function to send an OID request to the driver. These OID requests are serialized so the MiniportOidRequest function is not called until the pending OID request - has completed. MiniportOidRequest can be called at either IRQL - PASSIVE_LEVEL or IRQL DISPATCH_LEVEL. - - If the MiniportOidRequest function returns NDIS_STATUS_PENDING, + has completed. MiniportOidRequest can be called at either IRQL + PASSIVE_LEVEL or IRQL DISPATCH_LEVEL. + + If the MiniportOidRequest function returns NDIS_STATUS_PENDING, the miniport driver must subsequently call the NdisMOidRequestComplete - function to complete the request. NdisMOidRequestComplete can be called - at either IRQL DISPATCH_LEVEL or IRQL PASSIVE_LEVEL. + function to complete the request. NdisMOidRequestComplete can be called + at either IRQL DISPATCH_LEVEL or IRQL PASSIVE_LEVEL. Arguments: MiniportAdapterContext Pointer to the adapter structure NdisRequest Pointer to NDIS_OID_REQUEST - + Return Value: - + NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED NDIS_STATUS_BUFFER_TOO_SHORT - + --*/ { PADAPTER Adapter = (PADAPTER)MiniportAdapterContext; - PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PADAPTER pTargetAdapter = GetAdapterByPortNum(Adapter, (u1Byte)NdisRequest->PortNumber); NDIS_STATUS ndisStatus=NDIS_STATUS_NOT_RECOGNIZED; u2Byte i; @@ -3255,7 +3255,7 @@ Return Value: if( NDIS_STATUS_NOT_RECOGNIZED == ndisStatus ) { - if(!N6_INIT_READY(Adapter)) + if(!N6_INIT_READY(Adapter)) { if( (NdisRequest->RequestType==NdisRequestMethod|| NdisRequest->RequestType==NdisRequestSetInformation) && (NdisRequest->DATA.QUERY_INFORMATION.Oid==OID_DOT11_SCAN_REQUEST) ) @@ -3281,7 +3281,7 @@ Return Value: } ndisStatus = N6CProcessOidRequest(Adapter, NdisRequest, FALSE); - } + } }while(FALSE); if(OS_SUPPORT_WDI(Adapter)) @@ -3311,7 +3311,7 @@ Return Value: NdisOIDHistoryUpdate(Adapter, NdisRequest, RT_OID_HISTORY_PENDING); PlatformReleaseSpinLock(Adapter, RT_PENDED_OID_SPINLOCK); - RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6SdioOidRequest(): Pend this OID(%p, ID =0x%08X)\n", + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6SdioOidRequest(): Pend this OID(%p, ID =0x%08X)\n", Adapter->pNdisCommon->PendedRequest, NdisRequest->DATA.METHOD_INFORMATION.Oid)); break; @@ -3326,7 +3326,7 @@ Return Value: if( irql < DISPATCH_LEVEL ){ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("N6SdioOidRequest(): Restore IRQL!!\n")); - KeLowerIrql(irql); + KeLowerIrql(irql); } return ndisStatus; @@ -3342,9 +3342,9 @@ N6SdioCancelOidRequest( Routine Description: An NDIS 6.0 miniport driver must provide a MiniportCancelOidRequest - function if it pends any OID request. MiniportCancelOidRequest - is called when NDIS or an overlying driver calls NdisCancelOidRequest - or NdisFCancelOidRequest. If the miniport driver finds the OID + function if it pends any OID request. MiniportCancelOidRequest + is called when NDIS or an overlying driver calls NdisCancelOidRequest + or NdisFCancelOidRequest. If the miniport driver finds the OID request to be cancelled in its queue, it should complete the OID request by calling NdisMOidRequestComplete with NDIS_STATUS_REQUEST_ABORTED. @@ -3352,9 +3352,9 @@ Routine Description: MiniportAdapterContext Pointer to the adapter structure RequestId Specify the request to be cancelled. - + Return Value: - + --*/ { // TODO: Implement It! @@ -3372,7 +3372,7 @@ Routine Description: MiniportSetOptions function is called by NDIS to ask the miniport driver to register its optional handlers. - A miniport driver must call NdisSetOptionalHandler + A miniport driver must call NdisSetOptionalHandler from its MiniportSetOptions function to register its optional handlers with NDIS. @@ -3428,8 +3428,8 @@ N6SdioSendNetBufferLists( // if( N6SDIO_CANNOT_TX(Adapter) ) { - RT_TRACE(COMP_SEND, DBG_LOUD, - ("N6SdioSendNetBufferLists(): drop packet for N6SDIO_CANNOT_TX(), bDriverStopped(%d) or bSurpriseRemoved(%d)!\n", + RT_TRACE(COMP_SEND, DBG_LOUD, + ("N6SdioSendNetBufferLists(): drop packet for N6SDIO_CANNOT_TX(), bDriverStopped(%d) or bSurpriseRemoved(%d)!\n", Adapter->bDriverStopped, Adapter->bSurpriseRemoved)); if(N6C_GET_MP_DRIVER_STATE(Adapter) <= MINIPORT_PAUSING) {// Indicate pause state while we're in pause state. added by Roger, 2008.03.13. @@ -3490,7 +3490,7 @@ N6SdioSendNetBufferLists( NET_BUFFER_LIST_NEXT_NBL(pCurrNetBufferList) = NULL; // - // Initialize reference count as (#NB + 1) to prevent this + // Initialize reference count as (#NB + 1) to prevent this // NBL being completed before end of N6SdioSendSingleNetBufferList(). // NetBufferCount = 0; @@ -3509,7 +3509,7 @@ N6SdioSendNetBufferLists( N6CAddNblWaitQueue( &pNdisCommon->TxNBLWaitQueue, - pCurrNetBufferList, + pCurrNetBufferList, FALSE); // bToHead. } } @@ -3529,7 +3529,7 @@ N6SdioSendNetBufferLists( PlatformSetTimer(Adapter, &(pNdisCommon->N6CSendSingleNetBufferListTimer),0); return; } - + if(PlatformAtomicExchange(&Adapter->IntrNBLRefCount, TRUE)==TRUE) return; @@ -3545,16 +3545,16 @@ N6SdioSendNetBufferLists( PlatformReleaseSpinLock(Adapter, RT_BUFFER_SPINLOCK); break; } - + if(!pNdisCommon->bReleaseNblWaitQueueInProgress) { pCurrNetBufferList = N6CGetHeadNblWaitQueue(pNdisCommon->TxNBLWaitQueue); PlatformReleaseSpinLock(Adapter, RT_BUFFER_SPINLOCK); - + RT_TRACE(COMP_SEND, DBG_TRACE, ("N6SdioSendNetBufferLists(): N6SdioSendSingleNetBufferList pCurrNetBufferList(%p)\n", pCurrNetBufferList)); if (!N6SdioSendSingleNetBufferList( - Adapter, - pCurrNetBufferList, + Adapter, + pCurrNetBufferList, TRUE) ) { RT_TRACE(COMP_SEND, DBG_TRACE, ("N6SdioSendSingleNetBufferList() returns FALSE\n")); @@ -3566,7 +3566,7 @@ N6SdioSendNetBufferLists( PlatformReleaseSpinLock(Adapter, RT_BUFFER_SPINLOCK); } } - + } PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); @@ -3581,7 +3581,7 @@ N6SdioSendNetBufferLists( // Process each NB in the NBL. // // Output: -// Return FALSE if we can send this NBL and had put it into +// Return FALSE if we can send this NBL and had put it into // wait queue if necessary, TRUE otherwise. // // Assumption: @@ -3612,7 +3612,7 @@ N6SdioSendSingleNetBufferList( //RT_TRACE(COMP_SEND, DBG_LOUD, ("N6SdioSendSingleNetBufferList(), start to process pNetBufferList=0x%x\n", (u4Byte)pNetBufferList)); // // Because we'll release TX lock before doing scatter/gather operation, - // we use SendingNetBufferList to prevent out of order. + // we use SendingNetBufferList to prevent out of order. // // Prefast warning ignore for false positive #pragma warning( disable:6271 ) @@ -3622,7 +3622,7 @@ N6SdioSendSingleNetBufferList( // // Parse per-NBL information. // - pDot11SendContext = (PDOT11_EXTSTA_SEND_CONTEXT) NET_BUFFER_LIST_INFO(pNetBufferList, MediaSpecificInformation); + pDot11SendContext = (PDOT11_EXTSTA_SEND_CONTEXT) NET_BUFFER_LIST_INFO(pNetBufferList, MediaSpecificInformation); switch( pDot11SendContext->usExemptionActionType ) { case DOT11_EXEMPT_NO_EXEMPTION : @@ -3661,7 +3661,7 @@ N6SdioSendSingleNetBufferList( pCurrNetBuffer = pNextNetBuffer) { pNextNetBuffer = NET_BUFFER_NEXT_NB(pCurrNetBuffer); - + if(!pNdisCommon->RegNblRacingWA) { if(pNextNetBuffer == NULL) @@ -3681,7 +3681,7 @@ N6SdioSendSingleNetBufferList( // PlatformAcquireSpinLock(Adapter, RT_BUFFER_SPINLOCK); // N6CAddNblWaitQueue( // pNdisCommon, - // pNetBufferList, + // pNetBufferList, // TRUE); // bToHead. // PlatformReleaseSpinLock(Adapter, RT_BUFFER_SPINLOCK); //} @@ -3714,8 +3714,8 @@ N6SdioSendSingleNetBufferList( // // Add per-NBL info into TCB. // - pTcb->priority = Priority; // Qos information. 2007.01.05, by shien chang. - pTcb->EncInfo.ExemptionActionType = ExemptionActionType; // by CCW. + pTcb->priority = Priority; // Qos information. 2007.01.05, by shien chang. + pTcb->EncInfo.ExemptionActionType = ExemptionActionType; // by CCW. GetDefaultAdapter(Adapter)->MgntInfo.OutstandingNdisPackets++; // @@ -3737,7 +3737,7 @@ N6SdioSendSingleNetBufferList( #if 1 if(N6SdioGetPacketBuffers(Adapter, pCurrNetBuffer, pTcb) && !Adapter->bInHctTest && !pMgntInfo->RegTxMode) - { + { // // Set up TCB. // @@ -3773,7 +3773,7 @@ N6SdioSendSingleNetBufferList( { // // Complete the NB ASAP to enhance throughput for some application, such as iPerf. - // Note that, we can complete the NB here because it + // Note that, we can complete the NB here because it // had been coalesced in PreTransmitTCB(). // RT_NBL_DECREASE_REF_CNT(pNetBufferList); @@ -3784,9 +3784,9 @@ N6SdioSendSingleNetBufferList( else { // - // 07525, rcnjko: + // 07525, rcnjko: // AP_PS_SendPacket() will queue the packet to send in proper queue if necessary. - // So, we must gurantee the buffers referenced in the TCB is still valid, + // So, we must gurantee the buffers referenced in the TCB is still valid, // that is, not yet compelted to upper layer. // NicIFSendPacket(Adapter, pTcb); @@ -3814,7 +3814,7 @@ N6SdioSendSingleNetBufferList( // // Case 2: we are here if all NBs in the NBL had been processed. // - + if(bFromQueue) { PNET_BUFFER_LIST pTmpNBL; @@ -3826,8 +3826,8 @@ N6SdioSendSingleNetBufferList( PlatformAcquireSpinLock(Adapter, RT_BUFFER_SPINLOCK); pTmpNBL = N6CRemoveNblWaitQueue(&pNdisCommon->TxNBLWaitQueue, TRUE); PlatformReleaseSpinLock(Adapter, RT_BUFFER_SPINLOCK); - RT_ASSERT(pTmpNBL == pNetBufferList, - ("N6SdioSendSingleNetBufferList(): pTmpNBL(%p) != pNetBufferList(%p)!!!\n", + RT_ASSERT(pTmpNBL == pNetBufferList, + ("N6SdioSendSingleNetBufferList(): pTmpNBL(%p) != pNetBufferList(%p)!!!\n", pTmpNBL, pNetBufferList)); } @@ -3842,15 +3842,15 @@ N6SdioSendSingleNetBufferList( // Compelete the NBL if required. // RT_ASSERT( NET_BUFFER_LIST_NEXT_NBL(pNetBufferList) == NULL, - ("N6SdioSendSingleNetBufferList(): pNBL(%p) is not a single one!!!\n", pNetBufferList)); + ("N6SdioSendSingleNetBufferList(): pNBL(%p) is not a single one!!!\n", pNetBufferList)); { PNET_BUFFER_LIST pCurrNetBufferList, pNextNetBufferList; if(RT_NBL_GET_REF_CNT(pNetBufferList) == 0) - { + { GetDefaultAdapter(Adapter)->MgntInfo.OutstandingNdisPackets--; GetDefaultAdapter(Adapter)->MgntInfo.CompleteFlag = 0; - + PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); // Complete each NB as success. for(pCurrNetBufferList = pNetBufferList; @@ -3902,7 +3902,7 @@ N6SdioGetPacketBuffers( OUT PRT_TCB pTcb ) { - ULONG i,index; + ULONG i,index; UINT MdlCount; PMDL pCurrMdl, pMdlToMap; PMDL pNextMdl = NULL; @@ -3939,17 +3939,17 @@ N6SdioGetPacketBuffers( { MaxAvailableBufferCount = MAX_PER_PACKET_PHYSICAL_BUF_NUM-1; } - + if (MdlCount > MaxAvailableBufferCount) { return FALSE; } PacketLength = NET_BUFFER_DATA_LENGTH(pNetBuffer); - + pTcb->PacketLength=PacketLength; - //2 Assign header buffer + //2 Assign header buffer // Prefast warning C30030: Warning: Allocating executable memory via specifying a MM_PAGE_PRIORITY type without a bitwise OR with MdlMappingNoExecute // False positive and safe here, disable the warning #pragma warning( disable:30030 ) @@ -4030,20 +4030,20 @@ N6SdioGetPacketBuffers( index=1; pMdlToMap = NDIS_MDL_LINKAGE( NET_BUFFER_CURRENT_MDL(pNetBuffer) ); } - + RemainMdlLength=PacketLength; for(i=0; i < index; i++) { RemainMdlLength -= pTcb->BufferList[i].Length; } - + //2 Get Virtual buffer list for (pCurrMdl = pMdlToMap; pCurrMdl != NULL; pCurrMdl = pNextMdl) { pNextMdl = NDIS_MDL_LINKAGE(pCurrMdl); - + // Prefast warning C30030: Warning: Allocating executable memory via specifying a MM_PAGE_PRIORITY type without a bitwise OR with MdlMappingNoExecute // False positive and safe here, disable the warning #pragma warning( disable:30030 ) @@ -4053,7 +4053,7 @@ N6SdioGetPacketBuffers( BufLen = (pCurrMdl == NET_BUFFER_CURRENT_MDL(pNetBuffer)) ? MmGetMdlByteCount(pCurrMdl)-NET_BUFFER_CURRENT_MDL_OFFSET(pNetBuffer) : MmGetMdlByteCount(pCurrMdl); - + pTcb->BufferList[index].VirtualAddress = ptr; if(RemainMdlLength < BufLen ) { @@ -4067,10 +4067,10 @@ N6SdioGetPacketBuffers( } pTcb->BufferCount++; index++; - + if( RemainMdlLength <= 0 ) break; - + } RT_ASSERT(pTcb->BufferCount<=(MAX_PER_PACKET_PHYSICAL_BUF_NUM+2),("Too many physical memory fragment !!\n")); @@ -4121,7 +4121,7 @@ N6SdioSendCoalescedNetBuffer( N6CopyPacket(pNetBuffer, pBuf, &PktLength); // - // Complete the NB and related resource since we + // Complete the NB and related resource since we // had copy everything need into TCB. // PlatformReleaseSpinLock(Adapter, RT_TX_SPINLOCK); @@ -4134,8 +4134,8 @@ N6SdioSendCoalescedNetBuffer( pTcb->Header[0].Length = (PktLength >= sMacHdrLng) ? sMacHdrLng : PktLength; PlatformMoveMemory( - pTcb->Header[0].VirtualAddress, - pBuf->Buffer.VirtualAddress, + pTcb->Header[0].VirtualAddress, + pBuf->Buffer.VirtualAddress, pTcb->Header[0].Length); pTcb->BufferList[0] = pTcb->Header[0]; pTcb->BufferCount = 1; @@ -4194,7 +4194,7 @@ N6SdioReturnAllPendingTxPackets( PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); - if(N6SDIO_INC_TX_RESET_COUNT(pDevice) == 1) // At most one thread is working here. + if(N6SDIO_INC_TX_RESET_COUNT(pDevice) == 1) // At most one thread is working here. { RT_TRACE(COMP_SEND, DBG_LOUD, ("N6SdioReturnAllPendingTxPackets(): 1st thread enter here....\n")); @@ -4203,9 +4203,9 @@ N6SdioReturnAllPendingTxPackets( // for( QueueID = LOW_QUEUE; QueueID < MAX_TX_QUEUE; QueueID++ ) { - while( !RTIsListEmpty(&pAdapter->TcbBusyQueue[QueueID]) - || !RTIsListEmpty(&pAdapter->TcbWaitQueue[QueueID]) - || !RTIsListEmpty(&pAdapter->TcbAggrQueue[QueueID]) + while( !RTIsListEmpty(&pAdapter->TcbBusyQueue[QueueID]) + || !RTIsListEmpty(&pAdapter->TcbWaitQueue[QueueID]) + || !RTIsListEmpty(&pAdapter->TcbAggrQueue[QueueID]) ) { if(!RTIsListEmpty(&pAdapter->TcbBusyQueue[QueueID])) @@ -4250,7 +4250,7 @@ N6SdioReturnAllPendingTxPackets( { pDevice->bWaitingSendingNBL = TRUE; PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); - + RT_TRACE(COMP_SEND, DBG_LOUD, ("N6SdioReturnAllPendingTxPackets(): wait SendingNetBufferList...\n")); // Preafast warning C28121 : The function 'NdisWaitEvent' is not permitted to be called at the current IRQ level. // Prefast warning C28156: The actual IRQL 2 is inconsistent with the required IRQL 0 @@ -4259,14 +4259,14 @@ N6SdioReturnAllPendingTxPackets( #pragma warning( disable:28156 ) NdisWaitEvent(&(pDevice->evtSendingNBLCompleted), 0); NdisResetEvent(&(pDevice->evtSendingNBLCompleted)); - + PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); } RT_ASSERT(pDevice->SendingNetBufferList == NULL, ("SendingNetBufferList(%p) should be NULL!!!\n", pDevice->SendingNetBufferList)); // // Remove pending NBLs in wait queue. - // Note that, we must make sure: + // Note that, we must make sure: // 1. SendingNetBufferList is NULL. // 2. No one can call N6SdioSendSingleNetBufferList() now. // 3. All TCB and related resource are completed. @@ -4287,8 +4287,8 @@ N6SdioReturnAllPendingTxPackets( PlatformReleaseSpinLock(pAdapter, RT_BUFFER_SPINLOCK); NdisMSendNetBufferListsComplete( - pDevice->hNdisAdapter, - pNetBufferList, + pDevice->hNdisAdapter, + pNetBufferList, ((OldIrql==DISPATCH_LEVEL) ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0)); PlatformAcquireSpinLock(pAdapter, RT_BUFFER_SPINLOCK); @@ -4305,7 +4305,7 @@ N6SdioReturnAllPendingTxPackets( N6SDIO_DEC_TX_RESET_COUNT(pDevice); - PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); + PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); { if(pAdapter == GetDefaultAdapter(pAdapter)) @@ -4322,7 +4322,7 @@ N6SdioReturnAllPendingTxPackets( N6SdioReturnAllPendingTxPackets(pTargetAdapter); pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } - + } } } @@ -4337,7 +4337,7 @@ N6SdioCancelSend( /** * This function is called by NDIS to cancel any NBL that have * not yet been sent and which correspond to CancelId passed in. - * + * * \param MiniportAdapterContext The context for this miniport * \param CancelId Packets with this Id will be cancelled * \sa MPSendPackets @@ -4347,14 +4347,14 @@ N6SdioCancelSend( PRT_SDIO_DEVICE device = GET_RT_SDIO_DEVICE(Adapter); RT_TRACE(COMP_DBG, DBG_LOUD, (" ==> N6SdioCancelSend()\n")); - + RT_TRACE(COMP_DBG, DBG_LOUD, (" <== N6SdioCancelSend()\n")); return; } -VOID +VOID N6SdioReturnNetBufferLists( IN NDIS_HANDLE MiniportAdapterContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -4363,7 +4363,7 @@ N6SdioReturnNetBufferLists( /** * This function is called by NDIS when the protocol above returns NetBufferLists * previously indicated by this miniport. - * + * * \param MiniportAdapterContext The adapter context for this miniport * \param NetBufferLists The NBLs that was previously indicated to NDIS * \param ReturnFlags Flags for return information (dispatch level, etc) @@ -4385,7 +4385,7 @@ N6SdioReturnNetBufferLists( pNextNetBufferList = NET_BUFFER_LIST_NEXT_NBL(pCurrNetBufferList); pRfd = MP_GET_PACKET_RFD(pCurrNetBufferList); - + // // Free MDL. // @@ -4402,8 +4402,8 @@ N6SdioReturnNetBufferLists( // pRecvContext = (PDOT11_EXTSTA_RECV_CONTEXT)NET_BUFFER_LIST_INFO(pCurrNetBufferList, MediaSpecificInformation); PlatformFreeMemory(pRecvContext, sizeof(DOT11_EXTSTA_RECV_CONTEXT)); - - NdisFreeNetBufferList(pCurrNetBufferList); + + NdisFreeNetBufferList(pCurrNetBufferList); PlatformAcquireSpinLock(Adapter, RT_RX_REF_CNT_SPINLOCK); RT_DEC_RCV_REF(GetDefaultAdapter(Adapter)); @@ -4418,20 +4418,20 @@ N6SdioReturnNetBufferLists( } // - // Signal the AllPacketReturnedEvent if all packet are returned. + // Signal the AllPacketReturnedEvent if all packet are returned. // 2007.01.19, by shien chang. // if (Count == 0) { NdisSetEvent(&pNdisCommon->AllPacketReturnedEvent); - if(Adapter->MgntInfo.NdisVersion >= RT_NDIS_VERSION_6_20) + if(Adapter->MgntInfo.NdisVersion >= RT_NDIS_VERSION_6_20) { PADAPTER pTempAdapter = GetFirstExtAdapter(Adapter); while(pTempAdapter != NULL) { NdisSetEvent(&pTempAdapter->pNdisCommon->AllPacketReturnedEvent); - pTempAdapter = GetNextExtAdapter(pTempAdapter); + pTempAdapter = GetNextExtAdapter(pTempAdapter); } @@ -4521,7 +4521,7 @@ WatchDogTimerCallback( if(!Adapter->bHWInitReady) { RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioCheckForHang(): bHWInitReady FALSE\n")); - + pDefaultAdapter->MgntInfo.WatchDogReturnFlag = FALSE; if(Adapter->MgntInfo.bSetWatchDogTimerByDriver) @@ -4533,9 +4533,9 @@ WatchDogTimerCallback( } // - // Signal corresponding event when checkforhang routine is called after PnP action. + // Signal corresponding event when checkforhang routine is called after PnP action. // 2009.09.30. - // + // if(!device->bChkForHangAfterPnP) { RT_TRACE(COMP_POWER, DBG_LOUD, ("N6SdioCheckForHang(): Signal SetPnpChkForHangEvent!!\n")); @@ -4549,9 +4549,9 @@ WatchDogTimerCallback( N6SdioReturnAllPendingTxPackets(Adapter); // Release Tx Queue buffered context if needed. added by Roger, 2012.04.17. - N6SdioReleaseTxQueuePending(Adapter); + N6SdioReleaseTxQueuePending(Adapter); } - + if(Adapter->NdisSdioDev.NdisStatusIndicateCount < MAX_NDIS_STATUS_REPORT_TIME) { @@ -4561,7 +4561,7 @@ WatchDogTimerCallback( ) { NicIFSetLinkStatus( Adapter, RT_MEDIA_DISCONNECT ); - Adapter->NdisSdioDev.NdisStatusIndicateCount = 0; + Adapter->NdisSdioDev.NdisStatusIndicateCount = 0; } } @@ -4633,20 +4633,20 @@ Return Value: if(!Adapter->bHWInitReady) return NDIS_STATUS_SUCCESS; - + // - // We complete any pending OID requests. - // NDIS will submit no further OID requests to the miniport driver for the NIC + // We complete any pending OID requests. + // NDIS will submit no further OID requests to the miniport driver for the NIC // being reset until the reset operation has finished. // In this case, we cancel all pending SetPower OIDs to prevent unexpect blocking IRPs - // due to MiniportQueryInformation, MiniportSetInformation function seem to have timed out. + // due to MiniportQueryInformation, MiniportSetInformation function seem to have timed out. // 2008.03.13. // // Complete the pended OID and return aborted caused by reset request. By Bruce, 2008-10-29. - + N6CompletePendedOID( - Adapter, + Adapter, RT_PENDED_OID_DONT_CARE, NDIS_STATUS_REQUEST_ABORTED); @@ -4727,7 +4727,7 @@ N6SdioAllocateNative80211MIBs( pNdisCommon->pDot11PhyMIBs = NULL; } } - + return ndisStatus; } @@ -4752,8 +4752,8 @@ N6SdioFreeNative80211MIBs( pNdisCommon->pDot11PhyMIBs, sizeof(NIC_PHY_MIB) * NATIVE_802_11_MAX_NUM_PHY_TYPES ); - } - + } + if(pNdisCommon->dot11IbssParams.AdditionalIEData) { PlatformFreeMemory(pNdisCommon->dot11IbssParams.AdditionalIEData, pNdisCommon->dot11IbssParams.AdditionalIESize); @@ -4786,7 +4786,7 @@ MPFragPhysicalBuffer( } -NDIS_STATUS +NDIS_STATUS N6SdioReadRegParameters( IN PRT_SDIO_DEVICE device ) @@ -4805,9 +4805,9 @@ Return Value: NDIS_STATUS_SUCCESS NDIS_STATUS_FAILURE - NDIS_STATUS_RESOURCES + NDIS_STATUS_RESOURCES ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; NDIS_HANDLE ConfigurationHandle; @@ -4897,7 +4897,7 @@ Return Value: } else { - CopyFromUnicodeToOS( + CopyFromUnicodeToOS( pointer, (NDIS_STRING *)(UINT_PTR)pRegEntry->Default, ((NDIS_STRING *)(UINT_PTR)pRegEntry->Default)->Length/2 ); @@ -4931,23 +4931,23 @@ Return Value: } -VOID -N6SdioFreeTxQueueRes( +VOID +N6SdioFreeTxQueueRes( IN PADAPTER pAdapter ) { PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); // Free Rt TxQueues - if(pDevice->RtTxQueue) + if(pDevice->RtTxQueue) { ExFreePoolWithTag(pDevice->RtTxQueue, '3278' ); pDevice->RtTxQueue = NULL; } } -VOID -N6SdioDereferInterface( +VOID +N6SdioDereferInterface( IN PRT_SDIO_DEVICE pDevice ) { @@ -4965,8 +4965,8 @@ N6SdioDereferInterface( } -VOID -N6SdioFreeDevice( +VOID +N6SdioFreeDevice( IN PRT_SDIO_DEVICE pDevice ) { @@ -4998,7 +4998,7 @@ N6SdioFreeDevice( (pDevice->Sdbusinterface.Context); RtlZeroMemory(&pDevice->Sdbusinterface, sizeof(SDBUS_INTERFACE_STANDARD)); } - + } VOID @@ -5017,12 +5017,12 @@ N6SdioFreeAll( PRT_SDIO_DEVICE device = GET_RT_SDIO_DEVICE(Adapter); // Release all we do during initialization - + // // All packets queued in the driver are returned (to the upper layer). By Bruce, 2008-11-28. // ReleaseDataFrameQueued(Adapter); - + // Wait for All Timer Callback Completion (Including Extension Port) ---- N6WaitTimerSync(Adapter); // ---------------------------------------------------------- @@ -5030,36 +5030,36 @@ N6SdioFreeAll( // Free All Ndis 6.20+ Component --------------------- NDIS_6_2_FREE_EXTENSION_COMPONENT(Adapter); // ----------------------------------------------- - + NicIFDeInitResource(Adapter); NicIFFreeMemory((PADAPTER)Adapter); NicIFDisassociateNIC((PADAPTER)Adapter); // - // 070307, rcnjko: - // We MUST free USB pipes after NicIFDisassociateNIC() - // because some workitem are still working and manipulate - // USB pipes until NicIFDisassociateNIC() is finished, + // 070307, rcnjko: + // We MUST free USB pipes after NicIFDisassociateNIC() + // because some workitem are still working and manipulate + // USB pipes until NicIFDisassociateNIC() is finished, // e.g. GPIOChangeRFWorkItem. // N6SdioFreeDevice(device); // Free spin lock. // We free spin locks here because NicIFFreeMemory() still use TX and RX spin locks. 2006.03.08, by rcnjko. - NdisFreeSpinLock( &(device->IrpSpinLock) ); + NdisFreeSpinLock( &(device->IrpSpinLock) ); N6CFreeSpinLocks(Adapter); // Free the Timer Synchronization Mechanism --------- N6DeInitTimerSync(Adapter); // --------------------------------------------- - - NdisOIDHistoryDeInit(Adapter); + + NdisOIDHistoryDeInit(Adapter); // Free the PortCommonInfo ----------------------- PortCommonInfoFreeMemory(Adapter); // -------------------------------------------- - + // Free the memory block allocated for ADAPTER, RT_NDIS6_COMMON and so on. N6FreeAdapter((PADAPTER)Adapter); @@ -5074,7 +5074,7 @@ N6SdioAllocateRxNetBufferListPool( NET_BUFFER_LIST_POOL_PARAMETERS NBLPoolParameters; PRT_SDIO_DEVICE device = GET_RT_SDIO_DEVICE(Adapter); NDIS_HANDLE NBLPoolHandle = NULL; - + PlatformZeroMemory(&NBLPoolParameters, sizeof(NET_BUFFER_LIST_POOL_PARAMETERS)); N6_ASSIGN_OBJECT_HEADER( @@ -5082,7 +5082,7 @@ N6SdioAllocateRxNetBufferListPool( NDIS_OBJECT_TYPE_DEFAULT, NET_BUFFER_LIST_POOL_PARAMETERS_REVISION_1, sizeof(NET_BUFFER_LIST_POOL_PARAMETERS)); - + NBLPoolParameters.ProtocolId = 0; NBLPoolParameters.fAllocateNetBuffer = TRUE; NBLPoolParameters.ContextSize = 0; @@ -5107,7 +5107,7 @@ N6SdioFreeRxNetBufferListPool( ) { NDIS_HANDLE NBLPoolHandle = Adapter->NdisSdioDev.RxNetBufferListPool; - + if(NBLPoolHandle) { RT_TRACE(COMP_INIT, DBG_LOUD, ("N6SdioFreeRxNetBufferListPool +1\n")); @@ -5136,7 +5136,7 @@ N6SdioDisableDeviceInterrupt( PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); BOOLEAN bEnableInt; NTSTATUS ntStatus = STATUS_SUCCESS; - + // // Read interrupt property from current function. // @@ -5144,8 +5144,8 @@ N6SdioDisableDeviceInterrupt( pDevice, SDP_FUNCTION_INT_ENABLE, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE(COMP_POWER, DBG_LOUD, ("Cannot get property SDP_FUNCTION_INT_ENABLE\n")); //return ntStatus; } @@ -5160,8 +5160,8 @@ N6SdioDisableDeviceInterrupt( pDevice, SDP_FUNCTION_INT_ENABLE, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE(COMP_POWER, DBG_LOUD, ("Cannot set property SDP_FUNCTION_INT_ENABLE\n")); //return ntStatus; } @@ -5169,14 +5169,14 @@ N6SdioDisableDeviceInterrupt( // // Instruct the SD bus driver to stop forwarding device interrupt. - // + // bEnableInt = FALSE; ntStatus = PlatformSdioSetProperty( pDevice, SDP_SET_CARD_INTERRUPT_FORWARD, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE(COMP_POWER, DBG_LOUD, ("Cannot set property SDP_SET_CARD_INTERRUPT_FORWARD\n")); //return ntStatus; } @@ -5201,18 +5201,18 @@ N6SdioEnableDeviceInterrupt( // // Instruct the SD bus driver to forward interrupts to our miniport driver. - // - bEnableInt = TRUE; + // + bEnableInt = TRUE; ntStatus = PlatformSdioSetProperty( pDevice, SDP_SET_CARD_INTERRUPT_FORWARD, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE(COMP_POWER, DBG_LOUD, ("Cannot set property SDP_SET_CARD_INTERRUPT_FORWARD\n")); //return ntStatus; } - + // // Read interrupt property from current function. // @@ -5220,12 +5220,12 @@ N6SdioEnableDeviceInterrupt( pDevice, SDP_FUNCTION_INT_ENABLE, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE(COMP_POWER, DBG_LOUD, ("Cannot get property SDP_FUNCTION_INT_ENABLE\n")); //return ntStatus; } - + // // Set interrupt property from current function. // @@ -5236,8 +5236,8 @@ N6SdioEnableDeviceInterrupt( pDevice, SDP_FUNCTION_INT_ENABLE, &bEnableInt, - sizeof(bEnableInt)); - if(!NT_SUCCESS(ntStatus)){ + sizeof(bEnableInt)); + if(!NT_SUCCESS(ntStatus)){ RT_TRACE(COMP_POWER, DBG_LOUD, ("Cannot set property SDP_FUNCTION_INT_ENABLE\n")); //return ntStatus; } @@ -5264,7 +5264,7 @@ N6Sdio_Mgnt_SetPower( { PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); PADAPTER pDefaultAdapter = GetDefaultAdapter(Adapter); - + NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(Adapter); PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon; @@ -5276,7 +5276,7 @@ N6Sdio_Mgnt_SetPower( BOOLEAN bSupportRemoteWakeUp, bEnableWoLCapabilities; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); BOOLEAN bResult = FALSE; - + LARGE_INTEGER StartTime, EndTime; LARGE_INTEGER Freq; @@ -5287,7 +5287,7 @@ N6Sdio_Mgnt_SetPower( RT_TRACE(COMP_POWER, DBG_LOUD, ("Set OID_PNP_SET_POWER: inavalid InformationBufferLength(%d), BytesNeeded is %d\n", InformationBufferLength, *BytesNeeded) ); return Status; } - + NewPowerState = *((NDIS_DEVICE_POWER_STATE*)InformationBuffer); Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); bEnableWoLCapabilities = MgntIsWoWLANCapabilityEnable(Adapter); @@ -5307,19 +5307,19 @@ N6Sdio_Mgnt_SetPower( return Status; } - + // For Working Time Calculation Adapter->bCtrlPnPTime = TRUE; Adapter->PnPTotalTime.QuadPart = 0; Adapter->PnPIOTime.QuadPart = 0; pDevice->PnPSdBusWorkTime.QuadPart = 0; - + StartTime = KeQueryPerformanceCounter(&Freq); // - + // 2010/08/11 MH Add to protect USB minicard selective suspend HW radio detection test pMgntInfo->bSetPnpPwrInProgress = TRUE; - + if(NewPowerState == NdisDeviceStateD0) { // Wake up. @@ -5334,12 +5334,12 @@ N6Sdio_Mgnt_SetPower( Adapter->bInSetPower = TRUE; - MgntStopBeacon(Adapter); + MgntStopBeacon(Adapter); if(pMgntInfo->bPreTransPnP) { // - // We need to complete this OID request with pending status immediately to shorten the + // We need to complete this OID request with pending status immediately to shorten the // power transition latency caused by the device resumption operation in OID_PNP_SET_POWER handling. // 2014.05.09. // @@ -5348,7 +5348,7 @@ N6Sdio_Mgnt_SetPower( bResult = PlatformScheduleWorkItem( &(pDevice->PnpWorkItem) ); if(bResult == FALSE) - { + { pMgntInfo->bSetPnpPwrInProgress = FALSE; Status= NDIS_STATUS_SUCCESS; } @@ -5359,11 +5359,11 @@ N6Sdio_Mgnt_SetPower( { if(NDIS_CURRENT_IRQL() > PASSIVE_LEVEL) { - // Schedule a workitem to do necessary tasks before entering sleep state. + // Schedule a workitem to do necessary tasks before entering sleep state. // The OID will be completed until these tasks finished. RT_TRACE(COMP_POWER, DBG_LOUD, ("N6Sdio_Mgnt_SetPower(): IRQL > PASSIVE. Call workitem!!!\n")); bResult = PlatformScheduleWorkItem( &(pDevice->PnpWorkItem) ); - if(bResult == FALSE){ + if(bResult == FALSE){ pMgntInfo->bSetPnpPwrInProgress = FALSE; Status= NDIS_STATUS_SUCCESS; } @@ -5389,14 +5389,14 @@ N6Sdio_Mgnt_SetPower( PMGNT_INFO pExtMgntInfo = NULL; PMGNT_INFO pDefaultMgntInfo = &pDefaultAdapter->MgntInfo; - pDefaultMgntInfo->bDriverIsGoingToSleep = TRUE; - + pDefaultMgntInfo->bDriverIsGoingToSleep = TRUE; + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; - - pExtMgntInfo->bDriverIsGoingToSleep = TRUE; - + + pExtMgntInfo->bDriverIsGoingToSleep = TRUE; + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -5417,7 +5417,7 @@ N6Sdio_Mgnt_SetPower( pPSC->bPnpEnterD2 = TRUE; pPSC->PnpSleepEnterD2Cnt++; } - + pPSC->LastPnpSleepTime = PlatformGetCurrentTime(); // Cancel watchdog workitem @@ -5428,28 +5428,28 @@ N6Sdio_Mgnt_SetPower( PlatformStopWorkItem( &(pHalData->RtCheckForHangWorkItem) ); } #endif - + if( !Adapter->bInHctTest ) { // Those in vWifi mode now disassociate all STA before sleep, and will be reset after waking up. - + PADAPTER pTargetAdapter = GetDefaultAdapter(Adapter); - + while(pTargetAdapter != NULL) { if(MgntActQuery_ApType(pTargetAdapter) == RT_AP_TYPE_VWIFI_AP) { AP_DisassociateAllStation(pTargetAdapter, unspec_reason); SecSetSwEncryptionDecryption(pTargetAdapter, FALSE, FALSE); - + RT_TRACE(COMP_AP, DBG_LOUD,("vWifi mode on Port: %d disassociates all STA.\n", pTargetAdapter->pNdis62Common->PortNumber)); - } - + } + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } else { // For OS before Win7 still go turning OFF directly. - NDIS_6_2_AP_CLEAR_BEFORE_SLEEP(Adapter); + NDIS_6_2_AP_CLEAR_BEFORE_SLEEP(Adapter); } #if P2P_SUPPORT == 1 @@ -5459,7 +5459,7 @@ N6Sdio_Mgnt_SetPower( {// Doing P2P Device Discovery P2PScanListCeaseScan(GET_P2P_INFO(Adapter)); P2PDeviceDiscoveryComplete(GET_P2P_INFO(Adapter), TRUE); // P2P State is restored in this function. - } + } } #if (MULTIPORT_SUPPORT == 1) @@ -5467,7 +5467,7 @@ N6Sdio_Mgnt_SetPower( { (GET_P2P_INFO(GetFirstDevicePort(Adapter)))->uListenStateDiscoverability = 0; } -#endif +#endif #endif // // Stop scan, roaming and link operation. @@ -5481,12 +5481,12 @@ N6Sdio_Mgnt_SetPower( PlatformCancelTimer(Adapter, &pMgntInfo->ScanTimer); { PADAPTER pLoopAdapter = GetDefaultAdapter(Adapter); - + while(pLoopAdapter) { pLoopAdapter->MgntInfo.bScanInProgress = FALSE; pLoopAdapter->MgntInfo.bDualModeScanStep = 0; - + pLoopAdapter = GetNextExtAdapter(pLoopAdapter); } } @@ -5498,20 +5498,20 @@ N6Sdio_Mgnt_SetPower( DrvIFIndicateRoamingStart(Adapter); else DrvIFIndicateConnectionStart(Adapter); - + DrvIFIndicateAssociationStart(Adapter); DrvIFIndicateAssociationComplete(Adapter, RT_STATUS_FAILURE); - + if(MgntRoamingInProgress(pMgntInfo)) DrvIFIndicateRoamingComplete(Adapter, RT_STATUS_FAILURE); else - DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_FAILURE); - MgntActSet_802_11_DISASSOCIATE( Adapter, unspec_reason); - } + DrvIFIndicateConnectionComplete(Adapter, RT_STATUS_FAILURE); + MgntActSet_802_11_DISASSOCIATE( Adapter, unspec_reason); + } } MgntResetRoamingState(pMgntInfo); - + //MgntDisconnectAP(Adapter , unspec_reason); if(Adapter->MgntInfo.bMediaConnect || pMgntInfo->bIbssStarter) { @@ -5521,27 +5521,27 @@ N6Sdio_Mgnt_SetPower( //save SSID savedssid.Octet = ssidbuf; - CopySsidOS(savedssid, Adapter->MgntInfo.Ssid); + CopySsidOS(savedssid, Adapter->MgntInfo.Ssid); CopyMem(bssidbuf,Adapter->MgntInfo.Bssid, 6); //Add for DTM 1.0c test. if(!pMgntInfo->bHiddenSSIDEnable) - MgntRemoveSsidsToScan(Adapter, Adapter->MgntInfo.Ssid); + MgntRemoveSsidsToScan(Adapter, Adapter->MgntInfo.Ssid); // // CCW: don't indicae dissociation event on infra. mode client. // 070125, rcnjko: don't indicate disassociation event - // + // if(!bEnableWoLCapabilities || - (pPSC->FSSDetection && (!pPSC->bSetPMParameters || (pPSC->bSetPMParameters && !pPSC->bOSSupportProtocolOffload)))) + (pPSC->FSSDetection && (!pPSC->bSetPMParameters || (pPSC->bSetPMParameters && !pPSC->bOSSupportProtocolOffload)))) { // Do not disasso to AP when WoWLAN. by tynli. - + if( Adapter->MgntInfo.OpMode == RT_OP_MODE_INFRASTRUCTURE ) { Adapter->pNdisCommon->bDissociateBeforeSleep = TRUE; } - + MgntActSet_802_11_DISASSOCIATE(Adapter , unspec_reason); Adapter->pNdisCommon->bPnpKeepConnectToAP = FALSE; @@ -5559,7 +5559,7 @@ N6Sdio_Mgnt_SetPower( } //restore SSID - CopySsidOS(Adapter->MgntInfo.Ssid, savedssid); + CopySsidOS(Adapter->MgntInfo.Ssid, savedssid); CopyMem(Adapter->MgntInfo.Bssid, bssidbuf, 6); } else @@ -5568,9 +5568,9 @@ N6Sdio_Mgnt_SetPower( } { - //PADAPTER pTargetAdapter = - // MgntActQuery_ApType(GetDefaultAdapter(Adapter)) == RT_AP_TYPE_VWIFI_AP ? - // GetDefaultAdapter(Adapter) : + //PADAPTER pTargetAdapter = + // MgntActQuery_ApType(GetDefaultAdapter(Adapter)) == RT_AP_TYPE_VWIFI_AP ? + // GetDefaultAdapter(Adapter) : // (MgntActQuery_ApType(ADJUST_TO_ADAPTIVE_ADAPTER(Adapter, FALSE)) == RT_AP_TYPE_VWIFI_AP ? ADJUST_TO_ADAPTIVE_ADAPTER(Adapter, FALSE) : NULL); PADAPTER pTargetAdapter = GetDefaultAdapter(Adapter); @@ -5581,7 +5581,7 @@ N6Sdio_Mgnt_SetPower( { // stop beaconing. for NDISTest preview 3 SoftAP_Power_ext. PMGNT_INFO pTargetMgntInfo = &pTargetAdapter->MgntInfo; - + MgntStopBeacon(pTargetAdapter); // Configure the HW to be No Link. @@ -5589,22 +5589,22 @@ N6Sdio_Mgnt_SetPower( Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_MEDIA_STATUS, (pu1Byte)(&pTargetMgntInfo->OpMode)); pTargetMgntInfo->OpMode = RT_OP_MODE_AP; } - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } - + pDevice->CurrentPowerState = NewPowerState; Adapter->bInSetPower = TRUE; if(NDIS_CURRENT_IRQL() > PASSIVE_LEVEL) { - // Schedule a workitem to do necessary tasks before entering sleep state. + // Schedule a workitem to do necessary tasks before entering sleep state. // The OID will be completed until these tasks finished. RT_TRACE(COMP_POWER, DBG_LOUD, ("N6Sdio_Mgnt_SetPower(): IRQL > PASSIVE. Call workitem!!!\n")); bResult = PlatformScheduleWorkItem( &(pDevice->PnpWorkItem) ); - if(bResult == FALSE){ + if(bResult == FALSE){ pMgntInfo->bSetPnpPwrInProgress = FALSE; Status= NDIS_STATUS_SUCCESS; } @@ -5620,37 +5620,37 @@ N6Sdio_Mgnt_SetPower( Status= NDIS_STATUS_SUCCESS; } } - else + else { // Otherwise. RT_TRACE(COMP_POWER, DBG_LOUD, ("Set OID_PNP_SET_POWER should not reach here: Current: %d to New: %d\n", pDevice->CurrentPowerState, NewPowerState)); Status = NDIS_STATUS_SUCCESS; } - // For Working Time Calculation + // For Working Time Calculation EndTime = KeQueryPerformanceCounter(NULL); Adapter->bCtrlPnPTime = FALSE; - + Adapter->PnPTotalTime.QuadPart = (EndTime.QuadPart - StartTime.QuadPart) * 1000000; Adapter->PnPTotalTime.QuadPart = Adapter->PnPTotalTime.QuadPart / Freq.QuadPart; RT_TRACE(COMP_INIT, DBG_LOUD, ("[PnP Time] Wake Up Total Cost Time: %llu us\n", Adapter->PnPTotalTime.QuadPart)); - + Adapter->PnPIOTime.QuadPart = Adapter->PnPIOTime.QuadPart * 1000000; Adapter->PnPIOTime.QuadPart = Adapter->PnPIOTime.QuadPart / Freq.QuadPart; RT_TRACE(COMP_INIT, DBG_LOUD, ("[PnP Time] IO Cost Time: %llu us\n", Adapter->PnPIOTime.QuadPart)); - + pDevice->PnPSdBusWorkTime.QuadPart = pDevice->PnPSdBusWorkTime.QuadPart * 1000000; pDevice->PnPSdBusWorkTime.QuadPart = pDevice->PnPSdBusWorkTime.QuadPart / Freq.QuadPart; RT_TRACE(COMP_INIT, DBG_LOUD, ("[PnP Time] SdBus Submit Cost Time: %llu us\n", pDevice->PnPSdBusWorkTime.QuadPart)); // *BytesRead = InformationBufferLength; - + return Status; } -//@@@ -// +//@@@ +// // Callback function of the workitem PnpWorkitem // 20061205 pnp work item for wake up from s3 mode //by David @@ -5666,9 +5666,9 @@ PnpWorkItemCallback( PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(&(Adapter->MgntInfo)); PRT_NDIS_COMMON pNdisCommon = Adapter->pNdisCommon; PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; - PRT_NLO_INFO pNLOInfo = &(pMgntInfo->NLOInfo); + PRT_NLO_INFO pNLOInfo = &(pMgntInfo->NLOInfo); BOOLEAN bWakeReconnect = TRUE; - BOOLEAN bMacPwrCtrlOn; + BOOLEAN bMacPwrCtrlOn; BOOLEAN bSupportRemoteWakeUp; BOOLEAN bEnableWoLCapabilities; RT_RF_POWER_STATE rfState; @@ -5677,17 +5677,17 @@ PnpWorkItemCallback( Adapter->HalFunc.GetHalDefVarHandler(Adapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); bEnableWoLCapabilities = MgntIsWoWLANCapabilityEnable(Adapter); - + if(pDevice->CurrentPowerState == NdisDeviceStateD0) - { // wake up. - + { // wake up. + // // Reset corresponding PnP event to monitor MiniportCheckForHang routine. // 2009.09.30. // pDevice->bChkForHangAfterPnP = FALSE; NdisResetEvent(&pDevice->SetPnpChkForHangEvent); - + { PADAPTER pExtAdapter = GetNextExtAdapter(pDefaultAdapter); PMGNT_INFO pExtMgntInfo = NULL; @@ -5698,16 +5698,16 @@ PnpWorkItemCallback( pDefaultAdapter->bEnterPnpSleep = FALSE; pDefaultAdapter->bWakeFromPnpSleep = TRUE; pDefaultAdapter->bDriverIsGoingToPnpSetPowerSleep = FALSE; - + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; pExtPSC = GET_POWER_SAVE_CONTROL(pExtMgntInfo); - + pExtAdapter->bEnterPnpSleep = FALSE; pExtAdapter->bWakeFromPnpSleep = TRUE; pExtAdapter->bDriverIsGoingToPnpSetPowerSleep = FALSE; - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -5719,7 +5719,7 @@ PnpWorkItemCallback( // before the system sets OID_PNP_CAPABILITIES to put the device to low PS state, it will // set OID_PM_PARAMETERS first. In order to seperate FSS mode from S3/S4/Selective suspend // mode, we use "bSetPMParameters" flag to decide some behaviors. 2012.09.13, by tynli. - pPSC->bSetPMParameters = FALSE; + pPSC->bSetPMParameters = FALSE; RT_ENABLE_SDIO_TRANSFERS(Adapter); @@ -5742,7 +5742,7 @@ PnpWorkItemCallback( N6WdmSdioTx_Enable(Adapter); #endif N6SdioDummyIO(pDevice); - + // Control SDIO Clock rate settings if(pDevice->bRegSdioSpeedSDR25) { @@ -5754,13 +5754,13 @@ PnpWorkItemCallback( N6SdioEnableDeviceInterrupt(Adapter); } - + // // 070106, rcnjko: // Re-initialize H/W for USB Bus is suspend. // Besides, we also issue bulk IN transfers at InitializeAdapterHandler(). // - // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be + // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be // called by user initialiated Restart. It has site effect to 8723BS card lost issue. So this is a work around // to add the condition to prevent from acting HaltAdapter in PNP D2 and D0 under Restart flow. 2013.11.18. if((pMgntInfo->bIntelPatchPNP && !pMgntInfo->bReceiveSystemPSOID) || (!pMgntInfo->bIntelPatchPNP)) @@ -5779,7 +5779,7 @@ PnpWorkItemCallback( if(pMgntInfo->bRegPnpKeepLink) { if((Adapter->MgntInfo.bMediaConnect && (Adapter->bReInitHW || pPSC->WakeUpReason == WOL_REASON_AP_LOST || - pPSC->WakeUpReason == WOL_REASON_DISASSOC ||pPSC->WakeUpReason == WOL_REASON_DEAUTH)) || + pPSC->WakeUpReason == WOL_REASON_DISASSOC ||pPSC->WakeUpReason == WOL_REASON_DEAUTH)) || (!Adapter->pNdisCommon->bPnpKeepConnectToAP)) { pMgntInfo->bPerformPnpReconnect = TRUE; @@ -5788,8 +5788,8 @@ PnpWorkItemCallback( { pMgntInfo->bPerformPnpReconnect = FALSE; } - - RT_TRACE(COMP_POWER, DBG_LOUD, ("PnPSetPower(): bPerformPnpReconnect=%d, bReInitHW=%d\n", + + RT_TRACE(COMP_POWER, DBG_LOUD, ("PnPSetPower(): bPerformPnpReconnect=%d, bReInitHW=%d\n", pMgntInfo->bPerformPnpReconnect, Adapter->bReInitHW)); } else @@ -5798,26 +5798,26 @@ PnpWorkItemCallback( } if(bSupportRemoteWakeUp) // Need to be set before N6RestoreLastInitSettingAterWakeUP(). - { + { Adapter->HalFunc.EnableHWSecCfgHandler(Adapter); //For HW Security. by tynli. 2009.06.24. - } - + } + PlatformSetCheckForHangTimer(Adapter); PlatformStartWorkItem(&(Adapter->pPortCommonInfo->pPortHelper->CreateDeleteMacWorkitem)); - + { PADAPTER pTargetAdapter = GetDefaultAdapter(Adapter); while(pTargetAdapter != NULL) { pTargetAdapter->bInitializeInProgress = FALSE; - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } - + //ADJUST_TO_ADAPTIVE_ADAPTER(Adapter, FALSE)->bInitializeInProgress=FALSE; //pDefaultAdapter->bInitializeInProgress=FALSE; @@ -5826,7 +5826,7 @@ PnpWorkItemCallback( if( !Adapter->bInHctTest ) { PADAPTER pTargetAdapter = GetDefaultAdapter(Adapter); - + while(pTargetAdapter != NULL) { RT_TRACE(COMP_AP, DBG_LOUD, ("Adapter on Port: %d, APType: %d\n", pTargetAdapter->pNdis62Common->PortNumber, MgntActQuery_ApType(pTargetAdapter))); @@ -5836,11 +5836,11 @@ PnpWorkItemCallback( pTargetAdapter->bvWifiStopBeforeSleep = TRUE; N62CApIndicateStopAp(pTargetAdapter); } - + pTargetAdapter = GetNextExtAdapter(pTargetAdapter); } } - + Adapter->pNdisCommon->bWakeupAutoLinkInProgressing = TRUE; if(pMgntInfo->bPerformPnpReconnect) @@ -5849,7 +5849,7 @@ PnpWorkItemCallback( } N6RestoreLastInitSettingAterWakeUP(Adapter); - // Indicate disassociation state when RF is off becuase we do not disconnect before sleep in WoWLAN mode. + // Indicate disassociation state when RF is off becuase we do not disconnect before sleep in WoWLAN mode. // 2011.10.27. by tynli. Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (pu1Byte)(&rfState)); if(rfState == eRfOff) @@ -5859,13 +5859,13 @@ PnpWorkItemCallback( DrvIFIndicateDisassociation(Adapter, unspec_reason, pMgntInfo->Bssid); } pNdisCommon->bWakeupAutoLinkInProgressing = FALSE; - } + } if(OS_SUPPORT_WDI(Adapter)) { pNdisCommon->bWakeupAutoLinkInProgressing = FALSE; // TODO: WoWLAN - + // TODO: NLO } else if(pNdisCommon->bWakeupAutoLinkInProgressing) @@ -5874,7 +5874,7 @@ PnpWorkItemCallback( { ULONG i = 0; BOOLEAN bTargetInNLO = FALSE; - + if(Adapter->MgntInfo.bMediaConnect || pNdisCommon->bDissociateBeforeSleep) { for(i=0; iNumDot11OffloadNetwork; i++) @@ -5900,7 +5900,7 @@ PnpWorkItemCallback( { RT_TRACE(COMP_POWER, DBG_LOUD, ("PnpSetPower() try to connect to %s\n", Adapter->MgntInfo.Ssid.Octet)); - // Set Roam flag + // Set Roam flag MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_SLEEP, ROAMINGSTATE_SCANNING); DrvIFIndicateRoamingStart(Adapter); @@ -5934,7 +5934,7 @@ PnpWorkItemCallback( // to the expected AP by indicating NDIS_STATUS_DOT11_OFFLOAD_NETWORK_STATUS_CHANGED // to declare that NLO scan is finished. if((pNLOInfo->NumDot11OffloadNetwork != 0) && (!Adapter->MgntInfo.bMediaConnect) && - (!pNdisCommon->bDissociateBeforeSleep)) + (!pNdisCommon->bDissociateBeforeSleep)) { // We should execute scan here because after indicating NDIS_STATUS_DOT11_OFFLOAD_NETWORK_STATUS_CHANGED, // OS will not set scan request OID (different with msdn's mention) and then query BSS list OID. So if we @@ -5957,11 +5957,11 @@ PnpWorkItemCallback( } else*/ { - if((!ACTING_AS_AP(Adapter) || (!IsExtAPModeExist(Adapter) && bEnableWoLCapabilities)) + if((!ACTING_AS_AP(Adapter) || (!IsExtAPModeExist(Adapter) && bEnableWoLCapabilities)) && (pMgntInfo->Ssid.Length != 0) && !(IsSSIDDummy(pMgntInfo->Ssid)) && pMgntInfo->bPerformPnpReconnect ) { - RT_TRACE(COMP_POWER, DBG_LOUD, ("PnpSetPower() try to connect to %s ACTING_AS_AP(Adapter) %d IsExtAPModeExist(Adapter) %d\n", + RT_TRACE(COMP_POWER, DBG_LOUD, ("PnpSetPower() try to connect to %s ACTING_AS_AP(Adapter) %d IsExtAPModeExist(Adapter) %d\n", Adapter->MgntInfo.Ssid.Octet, ACTING_AS_AP(Adapter) , IsExtAPModeExist(Adapter))); bWakeReconnect = TRUE; } @@ -5972,7 +5972,7 @@ PnpWorkItemCallback( if(bWakeReconnect) { - // Set Roam flag + // Set Roam flag MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_SLEEP, ROAMINGSTATE_SCANNING); pNdisCommon->PNPconnentCout = 0; @@ -5989,7 +5989,7 @@ PnpWorkItemCallback( pNdisCommon->bDissociateBeforeSleep = FALSE; // - // If we keep connection after PNP resumption, we should reset Rx TS to avoid + // If we keep connection after PNP resumption, we should reset Rx TS to avoid // packet droped by the sequence number is over Rx reorder window size because we will not // update the Rx TS sequence number during PNP sleep stage. 2015.01.22. // @@ -6012,7 +6012,7 @@ PnpWorkItemCallback( RT_TRACE(COMP_POWER, DBG_LOUD, (" Start check for hang workitem\n")); PlatformStartWorkItem( &(pHalData->RtCheckForHangWorkItem) ); } -#endif +#endif } else if(pDevice->CurrentPowerState > NdisDeviceStateD0) { // sleep. @@ -6022,24 +6022,24 @@ PnpWorkItemCallback( RT_CUSTOM_INDI_TARGET_IRP, NULL, 0); - + { PADAPTER pExtAdapter = GetNextExtAdapter(pDefaultAdapter); PMGNT_INFO pExtMgntInfo = NULL; PMGNT_INFO pDefaultMgntInfo = &pDefaultAdapter->MgntInfo; - pDefaultMgntInfo->bStartApDueToWakeup=TRUE; + pDefaultMgntInfo->bStartApDueToWakeup=TRUE; pDefaultAdapter->bEnterPnpSleep = TRUE; - + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; - - pExtMgntInfo->bStartApDueToWakeup=TRUE; + + pExtMgntInfo->bStartApDueToWakeup=TRUE; pExtAdapter->bEnterPnpSleep = TRUE; - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -6050,38 +6050,38 @@ PnpWorkItemCallback( //Moved to PNP wake flow. 2013.04. //MgntLinkStatusSetRoamingState(Adapter, 0, RT_ROAMING_BY_SLEEP, ROAMINGSTATE_SCANNING); - + // 20100721 Joseph: Modified for Velocity Suspend test. // Reset IPS state only. // Since NIC is going to Halt for sleep, driver does not need to initialize the HW again. // This shall be revised in the future and also take NIC Disable/Radio-off into consideration. if((!bSupportRemoteWakeUp) && (pPSC->IPSState==eIPSDozed) && - /*(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC) &&*/ + /*(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC) &&*/ RT_IN_PS_LEVEL(Adapter, RT_RF_OFF_LEVL_HALT_NIC)) { LPSLeaveAndCheckReady(Adapter); - NicIFDisableInterrupt(Adapter); - + NicIFDisableInterrupt(Adapter); + pPSC->eInactivePowerState = eRfOn; pPSC->IPSState = eIPSAwake; pMgntInfo->RfOffReason &= (~RF_CHANGE_BY_IPS); } else { - LeaveAllPowerSaveMode(Adapter); + LeaveAllPowerSaveMode(Adapter); } NicIFClearInterrupt(Adapter); - - // Recover the BW to 40MHz for a specific case. To see the description of + + // Recover the BW to 40MHz for a specific case. To see the description of // function HTRecoverBWTo40MHz(). 2012.12.20, by tynli. - if(bSupportRemoteWakeUp && + if(bSupportRemoteWakeUp && (Adapter->MgntInfo.OpMode == RT_OP_MODE_INFRASTRUCTURE)) { HTRecoverBWTo40MHz(Adapter); } - + PlatformAcquireSpinLock(Adapter,RT_RF_STATE_SPINLOCK); while( pMgntInfo->RFChangeInProgress) { @@ -6090,9 +6090,9 @@ PnpWorkItemCallback( RT_TRACE(COMP_POWER,DBG_LOUD, ("RF is in progress, need to wait until rf chang is done.\n")); delay_ms(1); - + PlatformAcquireSpinLock(Adapter,RT_RF_STATE_SPINLOCK); - } + } PlatformReleaseSpinLock(Adapter,RT_RF_STATE_SPINLOCK); // Adapter->bDriverIsGoingToPnpSetPowerSleep = TRUE; @@ -6103,9 +6103,9 @@ PnpWorkItemCallback( PRT_SECURITY_T pSecInfo = &(Adapter->MgntInfo.SecurityInfo); u1Byte KeyIndex; u1Byte CAM_CONST_BROAD[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - + Adapter->bHWSecurityInWoL = TRUE; - + Adapter->HalFunc.EnableHWSecCfgHandler(Adapter); if(pSecInfo->PairwiseEncAlgorithm == RT_ENC_ALG_WEP40 || @@ -6115,19 +6115,19 @@ PnpWorkItemCallback( { if(pSecInfo->KeyLen[KeyIndex] != 0) { - Adapter->HalFunc.SetKeyHandler(Adapter, - KeyIndex, - CAM_CONST_BROAD, - FALSE, - pSecInfo->PairwiseEncAlgorithm, - TRUE, + Adapter->HalFunc.SetKeyHandler(Adapter, + KeyIndex, + CAM_CONST_BROAD, + FALSE, + pSecInfo->PairwiseEncAlgorithm, + TRUE, FALSE); } } } else if( pSecInfo->PairwiseEncAlgorithm != RT_ENC_ALG_NO_CIPHER ) { //Set group key for other encrypyion mode (TKIP, AES) - Adapter->HalFunc.SetKeyHandler(Adapter, + Adapter->HalFunc.SetKeyHandler(Adapter, pSecInfo->GroupTransmitKeyIdx, //KeyIndex, CAM_CONST_BROAD, TRUE, //IsGroup, @@ -6146,12 +6146,12 @@ PnpWorkItemCallback( while(pExtAdapter != NULL) { pExtAdapter->bDriverIsGoingToPnpSetPowerSleep = TRUE; - + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } - // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be + // On Intel Bay Trail low power platform, "D2 -> D0 -> miniport shutdown" function will be // called by user initialiated Restart. It has site effect to 8723BS card lost issue. So this is a work around // to add the condition to prevent from acting HaltAdapter in PNP D2 and D0 under Restart flow. 2013.11.18. if((pMgntInfo->bIntelPatchPNP && !pMgntInfo->bReceiveSystemPSOID) || (!pMgntInfo->bIntelPatchPNP)) @@ -6205,17 +6205,17 @@ PnpWorkItemCallback( #if USE_WDF_SDIO WdfSdio_Disable(Adapter); #else - N6WdmSdio_Disable(Adapter); + N6WdmSdio_Disable(Adapter); #endif // - // 070531, rcnjko: although NDIS6 had made driver stack go to paused state + // 070531, rcnjko: although NDIS6 had made driver stack go to paused state // before sleeping, it is safer to return pending tx to upper layer. // N6SdioReturnAllPendingTxPackets(Adapter); // Release Tx Queue buffered context if needed. added by Roger, 2014.04.29. - N6SdioReleaseTxQueuePending(Adapter); + N6SdioReleaseTxQueuePending(Adapter); // 2011/08/23 MH For check for hang test only. Prevent check for HANG IQK write incorrect BB register under // RF off state. @@ -6228,7 +6228,7 @@ PnpWorkItemCallback( PlatformStopWorkItem(&(Adapter->pPortCommonInfo->pPortHelper->CreateDeleteMacWorkitem)); // - // As devices enter low power states, the driver managing the devices should cancel any programmed timers. + // As devices enter low power states, the driver managing the devices should cancel any programmed timers. // Added by Roger, 2016.01.18 // if(Adapter->MgntInfo.RegSuspendTimerInLowPwr){ @@ -6241,14 +6241,14 @@ PnpWorkItemCallback( PMGNT_INFO pExtMgntInfo = NULL; PMGNT_INFO pDefaultMgntInfo = &pDefaultAdapter->MgntInfo; - pDefaultMgntInfo->bDriverIsGoingToSleep = FALSE; - + pDefaultMgntInfo->bDriverIsGoingToSleep = FALSE; + while(pExtAdapter != NULL) { pExtMgntInfo = &pExtAdapter->MgntInfo; - - pExtMgntInfo->bDriverIsGoingToSleep = FALSE; - + + pExtMgntInfo->bDriverIsGoingToSleep = FALSE; + pExtAdapter = GetNextExtAdapter(pExtAdapter); } } @@ -6259,12 +6259,12 @@ PnpWorkItemCallback( { RT_TRACE(COMP_POWER, DBG_WARNING, ("PnpWorkItemCallback(): unexpected CurrentPowerState: %#X\n", pDevice->CurrentPowerState)); } - + if(pMgntInfo->bPreTransPnP) - { + { if(pDevice->CurrentPowerState == NdisDeviceStateD0) - {// wake up. - + {// wake up. + //MultiPortSetAllPortsHWReadyStatus(Adapter, TRUE); // @@ -6276,8 +6276,8 @@ PnpWorkItemCallback( { PlatformReleaseSpinLock(Adapter, RT_PENDED_OID_SPINLOCK); RT_TRACE(COMP_POWER, DBG_LOUD, ("PnpWorkItemCallback(): Complete Pended OID for PnP!!\n")); - N6CompletePendedOID(Adapter, RT_PENDED_OID_PNP, - N6SdioOidRequest((NDIS_HANDLE)Adapter, pNdisCommon->PendedRequest)); + N6CompletePendedOID(Adapter, RT_PENDED_OID_PNP, + N6SdioOidRequest((NDIS_HANDLE)Adapter, pNdisCommon->PendedRequest)); } else { @@ -6286,7 +6286,7 @@ PnpWorkItemCallback( } else if(pDevice->CurrentPowerState > NdisDeviceStateD0) {// Sleep - + N6CompletePendedOID( Adapter, RT_PENDED_OID_PNP, @@ -6302,7 +6302,7 @@ PnpWorkItemCallback( N6CompletePendedOID(Adapter, RT_PENDED_OID_PNP, NDIS_STATUS_SUCCESS); } - Adapter->bInSetPower = FALSE; + Adapter->bInSetPower = FALSE; pMgntInfo->bSetPnpPwrInProgress = FALSE; RT_TRACE(COMP_POWER, DBG_LOUD, ("<----- PnpWorkItemCallback() return ndis_status_success\n")); @@ -6326,7 +6326,7 @@ FillPnpCapabilities( PMGNT_INFO pMgntInfo = &pAdapter->MgntInfo; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); - + pAdapter->HalFunc.GetHalDefVarHandler(pAdapter, HAL_DEF_WOWLAN , &bSupportRemoteWakeUp); PlatformZeroMemory(pPnpCapabilities, sizeof(NDIS_PNP_CAPABILITIES)); @@ -6348,7 +6348,7 @@ FillPnpCapabilities( pPnpCapabilities->WakeUpCapabilities.MinLinkChangeWakeUp = NdisDeviceStateUnspecified; if(pPSC->WoWLANMode == eWakeOnMagicPacketOnly) //by tynli. pPnpCapabilities->WakeUpCapabilities.MinPatternWakeUp = NdisDeviceStateUnspecified; - else if (pPSC->WoWLANMode == eWakeOnPatternMatchOnly) + else if (pPSC->WoWLANMode == eWakeOnPatternMatchOnly) pPnpCapabilities->WakeUpCapabilities.MinMagicPacketWakeUp = NdisDeviceStateUnspecified; } @@ -6385,7 +6385,7 @@ FillPmCapabilities( bEnableWoLCapabilities = MgntIsWoWLANCapabilityEnable(pAdapter); PlatformZeroMemory(pPmCapabilities, sizeof(NDIS_PM_CAPABILITIES)); - + #if NDIS_SUPPORT_NDIS630 pPmCapabilities->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; pPmCapabilities->Header.Revision = NDIS_PM_CAPABILITIES_REVISION_2; @@ -6399,7 +6399,7 @@ FillPmCapabilities( #if POWER_MAN if(bEnableWoLCapabilities) { - RT_TRACE(COMP_POWER, DBG_LOUD, + RT_TRACE(COMP_POWER, DBG_LOUD, ("FillPmCapabilities(): support Win7 wake-on-lan (%d)\n", pPSC->WoWLANMode)); // @@ -6413,13 +6413,13 @@ FillPmCapabilities( // We should not enable NDIS_PM_WOL_EAPOL_REQUEST_ID_MESSAGE_SUPPORTED // when supporting GTK rekey offload or the upper layer will not send GTK offload OID to our driver. // 2012.02.22. by tynli. - pPmCapabilities->SupportedWoLPacketPatterns = + pPmCapabilities->SupportedWoLPacketPatterns = (NDIS_PM_WOL_MAGIC_PACKET_SUPPORTED| NDIS_PM_WOL_BITMAP_PATTERN_SUPPORTED| NDIS_PM_WOL_EAPOL_REQUEST_ID_MESSAGE_SUPPORTED| - NDIS_PM_WOL_IPV4_TCP_SYN_SUPPORTED| - NDIS_PM_WOL_IPV6_TCP_SYN_SUPPORTED| - NDIS_PM_WOL_IPV4_DEST_ADDR_WILDCARD_SUPPORTED| + NDIS_PM_WOL_IPV4_TCP_SYN_SUPPORTED| + NDIS_PM_WOL_IPV6_TCP_SYN_SUPPORTED| + NDIS_PM_WOL_IPV4_DEST_ADDR_WILDCARD_SUPPORTED| NDIS_PM_WOL_IPV6_DEST_ADDR_WILDCARD_SUPPORTED); pPmCapabilities->NumTotalWoLPatterns = MAX_SUPPORT_WOL_PATTERN_NUM(pAdapter); pPmCapabilities->MaxWoLPatternSize = MAX_WOL_PATTERN_SIZE; @@ -6449,14 +6449,14 @@ FillPmCapabilities( pPmCapabilities->MinLinkChangeWakeUp = NdisDeviceStateUnspecified; if(pPSC->WoWLANMode == eWakeOnMagicPacketOnly) //by tynli. pPmCapabilities->MinPatternWakeUp = NdisDeviceStateUnspecified; - else if (pPSC->WoWLANMode == eWakeOnPatternMatchOnly) + else if (pPSC->WoWLANMode == eWakeOnPatternMatchOnly) pPmCapabilities->MinMagicPacketWakeUp = NdisDeviceStateUnspecified; - + // // Set new attributes for Win8 // #if NDIS_SUPPORT_NDIS630 - // Temporarily mark some attributes because we cannot support now. + // Temporarily mark some attributes because we cannot support now. // They will be enable in the feature. 2012.03.12. by tynli. pPmCapabilities->SupportedWakeUpEvents = 0 /*NDIS_PM_WAKE_ON_MEDIA_DISCONNECT_SUPPORTED | @@ -6487,7 +6487,7 @@ FillPmCapabilities( // // Description: // Allocate N6 Usb related resources(e.g., Fix InOut pipe fix workitems). -// +// // Created by Roger, 2009.04.30. // VOID @@ -6497,11 +6497,11 @@ N6SdioAllocRes( { PRT_SDIO_DEVICE device = GET_RT_SDIO_DEVICE(Adapter); - + #if POWER_MAN PlatformInitializeWorkItem( Adapter, - &(device->PnpWorkItem), + &(device->PnpWorkItem), (RT_WORKITEM_CALL_BACK)PnpWorkItemCallback, (PVOID)Adapter, "PnpWorkItem"); @@ -6512,7 +6512,7 @@ N6SdioAllocRes( // // Description: // Free N6 Usb related resources(e.g., Fix InOut pipe fix workitems). -// +// // Created by Roger, 2009.04.30. // VOID @@ -6521,14 +6521,14 @@ N6SdioFreeRes( ) { PRT_SDIO_DEVICE device = GET_RT_SDIO_DEVICE(Adapter); - + PlatformFreeWorkItem( &(device->PnpWorkItem)); } // // Description: -// Cancel IRP pending to of specified Tx Queue and +// Cancel IRP pending to of specified Tx Queue and // wait until all outstanding request completed. // VOID @@ -6540,10 +6540,10 @@ N6SdioStopTxQueue( PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); PRT_SDIO_TX_QUEUE pTxQueue = NULL; - RT_ASSERT(nTxQueueIdx >= 0 && nTxQueueIdx < pDevice->RtNumTxQueue, + RT_ASSERT(nTxQueueIdx >= 0 && nTxQueueIdx < pDevice->RtNumTxQueue, ("RTsdioStartTxQueue(): nTxQueueIdx(%d) shall falls in [0,%d)\n", nTxQueueIdx, pDevice->RtNumTxQueue)); - + pTxQueue = &(pDevice->RtTxQueue[nTxQueueIdx]); PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); @@ -6551,7 +6551,7 @@ N6SdioStopTxQueue( if(!pTxQueue->bEnabled) { PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK); - return; + return; } else { @@ -6582,10 +6582,10 @@ N6SdioStartTxQueue( PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); PRT_SDIO_TX_QUEUE pTxQueue = NULL; - RT_ASSERT(nTxQueueIdx >= 0 && nTxQueueIdx < pDevice->RtNumTxQueue, + RT_ASSERT(nTxQueueIdx >= 0 && nTxQueueIdx < pDevice->RtNumTxQueue, ("RTsdioStartTxQueue(): nTxQueueIdx(%d) shall falls in [0,%d)\n", nTxQueueIdx, pDevice->RtNumTxQueue)); - + pTxQueue = &(pDevice->RtTxQueue[nTxQueueIdx]); PlatformAcquireSpinLock(pAdapter, RT_TX_SPINLOCK); @@ -6602,10 +6602,10 @@ N6SdioStartTxQueue( // // Description: -// Query current SD bus operating clock after resumption especially for the case of FSS -// mode and configure corresponding clock rate to fix mismatched phase modulation for +// Query current SD bus operating clock after resumption especially for the case of FSS +// mode and configure corresponding clock rate to fix mismatched phase modulation for // SD request packets -// +// // Created by Roger, 2015.03.24. // RT_STATUS @@ -6618,20 +6618,20 @@ N6SdioSyncCurrentSdBusClk( u1Byte Data=0; u4Byte SdioBusClk=0; - + ntstatus = PlatformSdioGetProperty(pDevice, SDP_BUS_CLOCK, &SdioBusClk, - sizeof(SdioBusClk)); - - if(!NT_SUCCESS(ntstatus)){ + sizeof(SdioBusClk)); + + if(!NT_SUCCESS(ntstatus)){ return status; - } + } // Configuration for SDIO v2.0 Data |= ((SdioBusClk == 50000) ? BIT1:0); // Set BIT1 for 50MHz operation clock status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_WITHOUT_REF_DEVICE_ID, //Device ID 0, //Function Number 1, //Byte Count @@ -6639,16 +6639,16 @@ N6SdioSyncCurrentSdBusClk( TRUE, //Write operation &Data); - if(status != RT_STATUS_SUCCESS){ + if(status != RT_STATUS_SUCCESS){ return status; } - + return RT_STATUS_SUCCESS; } // // Description: -// Dummy I/O is to distingush who sends the Bus I/O. (Driver? Host?) Those +// Dummy I/O is to distingush who sends the Bus I/O. (Driver? Host?) Those // I/O before this Dummy I/O are sent by Host, and those after it are sent by // driver. // @@ -6666,15 +6666,15 @@ N6SdioDummyIO( // Data = 0x10; // Dummy status = PlatformSdioCmd52ReadWrite( - pDevice, + pDevice, SDIO_LOCAL_DEVICE_ID, //Device ID 1, //Function Number 1, //Byte Count (ULONG)0x0, //Offset TRUE, //Write operation &Data); - - if(status != RT_STATUS_SUCCESS){ + + if(status != RT_STATUS_SUCCESS){ RT_TRACE_F(COMP_INIT, DBG_LOUD,("Write SDIO Dummy I/O FAIL!!\n")); - } + } } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.h index 03e408b48..3ae83b56c 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_main.h @@ -22,7 +22,7 @@ extern GLOBAL_SPINLOCK GlobalSpinLockForDusc; //------------------------------------------------------------------------- -// Tx Related. +// Tx Related. //------------------------------------------------------------------------- #define N6SDIO_CANNOT_TX(__pAdapter) \ ( RT_SDIO_CANNOT_TX(__pAdapter) || \ @@ -61,7 +61,7 @@ DriverEntry( #if defined(__cplusplus) }; #endif - + NDIS_STATUS N6SdioInitialize( @@ -94,7 +94,7 @@ NTSTATUS N6SdioConfigureDevice( IN PRT_SDIO_DEVICE pDevice ); - + RT_STATUS N6SdioQueryCISArea( IN PRT_SDIO_DEVICE pDevice @@ -106,9 +106,9 @@ N6SdioFindCisTuple( IN u1Byte Tuple, IN OUT pu4Byte pTupleScanAddress, OUT pu1Byte pBuffer, - IN OUT pu1Byte pLength + IN OUT pu1Byte pLength ); - + NTSTATUS N6SdioInitTxQueue( IN PADAPTER Adapter @@ -230,7 +230,7 @@ N6SdioCancelSend( IN PVOID CancelId ); -VOID +VOID N6SdioReturnNetBufferLists( IN NDIS_HANDLE MiniportAdapterContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -274,18 +274,18 @@ N6SdioReadRegParameters( IN PRT_SDIO_DEVICE device ); -VOID -N6SdioFreeTxQueueRes( +VOID +N6SdioFreeTxQueueRes( IN PADAPTER pAdapter ); -VOID -N6SdioDereferInterface( +VOID +N6SdioDereferInterface( IN PRT_SDIO_DEVICE sdiodevice ); -VOID -N6SdioFreeDevice( +VOID +N6SdioFreeDevice( IN PRT_SDIO_DEVICE usbdevice ); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_mechanism.c b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_mechanism.c index ead7cce69..c941ebdda 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_mechanism.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_mechanism.c @@ -1,5 +1,5 @@ #include "Mp_Precomp.h" -//Isaiah move Dynamic Mechanism to HAL +//Isaiah move Dynamic Mechanism to HAL diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_typedef.h b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_typedef.h index b27929620..4e434a8d3 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_typedef.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/N6Sdio_typedef.h @@ -37,7 +37,7 @@ Module Name: //-------------------------------------- -// Macros specific to miniport adapter structure +// Macros specific to miniport adapter structure //-------------------------------------- #define MP_SET_PACKET_RFD(_p, _rfd) *((PRT_RFD *)&(_p)->MiniportReserved[1]) = _rfd #define MP_GET_PACKET_RFD(_p) *((PRT_RFD *)&(_p)->MiniportReserved[1]) @@ -54,7 +54,7 @@ Module Name: #define MAX_NUM_PIPES 15 -#if USE_WDF_USB +#if USE_WDF_USB // // Obtain desired GUID for SSNDIS miniport binding, added by Roger, 2010.03.23. @@ -114,7 +114,7 @@ typedef struct _KMDFIDLER_INTERFACE_STANDARD { PF_RESUME_IDLE ResumeIdle; // WDF resume idle exported handler. PF_GET_IDLER_ENABLE_CNT IdlerRefCnt; //Current idler enable counter. PF_GET_IDLER_PWR_STATE IdlerPwrState; // Current drvier stack power stack. - PF_GET_IDLER_WAKEUP_CNT IdlerWakeupCnt; + PF_GET_IDLER_WAKEUP_CNT IdlerWakeupCnt; } KMDFIDLER_INTERFACE_STANDARD, *PKMDFIDLER_INTERFACE_STANDARD; #endif @@ -128,7 +128,7 @@ typedef struct _RT_AWB { RT_LIST_ENTRY List; u4Byte Offset; - u2Byte ByteCnt; + u2Byte ByteCnt; u1Byte DataBuf[MAX_AWB_DATA_SIZE]; #if RTL8723_SDIO_IO_THREAD_ENABLE u1Byte DeviceID; @@ -141,7 +141,7 @@ typedef struct _RT_AWB // 2006.09.28, by shien chang. // typedef struct _PLATFORM_EXT { - NDIS_EVENT Event; // Event used to handle driver unload. + NDIS_EVENT Event; // Event used to handle driver unload. NDIS_SPIN_LOCK Lock; // Lock to protect object of this class. } PLATFORM_EXT, *PPLATFORM_EXT; @@ -215,7 +215,7 @@ typedef enum _SDRP_ERROR_HANDLING_TYPE{ // typedef enum _RF_SDIO_TRANSFER_TYPE{ SDIO_TRANSFER_TX = 0, - SDIO_TRANSFER_RX = 1, + SDIO_TRANSFER_RX = 1, }RF_SDIO_TRANSFER_TYPE, *PRF_SDIO_TRANSFER_TYPE; // @@ -269,22 +269,22 @@ typedef struct _RT_SDIO_DEVICE { //3 SDIO related Bus info and properitie. u1Byte SdioFuncNum; // Function number on SD card - u2Byte SdioBusDriverVer; - u1Byte SdioRevNum; // CCCRx Format Version Number and SDIOx Specification Revision Number. + u2Byte SdioBusDriverVer; + u1Byte SdioRevNum; // CCCRx Format Version Number and SDIOx Specification Revision Number. u1Byte SdioFormatVer; // SD Format Version Number. - u2Byte SdioFuncType; + u2Byte SdioFuncType; u1Byte SdioBusWidth; - u4Byte SdioBusClk; + u4Byte SdioBusClk; u2Byte SdioHostBlockSize; // Maximum block length that is supported by the controller u2Byte SdioFuncBlockSize; u4Byte SdioRxSeqNum; u4Byte SdioCommonCISPtr; u1Byte SdioRegDbgCtrl; - + BOOLEAN SdioTxBlockMode; BOOLEAN SdioRxBlockMode; BOOLEAN IoRegDirectAccess; - + // SDIO Card Metaformat for CIS SDIO_MANFID_TPL Sdiomanfid; // Manufacture Identification String Tuple u2Byte SDIO_ManufacturerCode; //Manufacture Code @@ -292,7 +292,7 @@ typedef struct _RT_SDIO_DEVICE { PVOID pAdapter; //enum _PLATFORM_NDIS_VERSION NdisVersion; - + NDIS_SPIN_LOCK SpinLock; NDIS_SPIN_LOCK TxSpinLock; NDIS_SPIN_LOCK RxSpinLock; @@ -312,11 +312,11 @@ typedef struct _RT_SDIO_DEVICE { // Ndis 6.2 Releated Lock - NDIS_SPIN_LOCK PortLock; // For New Port, 080418, by Maddest + NDIS_SPIN_LOCK PortLock; // For New Port, 080418, by Maddest NDIS_SPIN_LOCK InitialSpinLock;// For Initialize 2007.11.5 by cosa - NDIS_SPIN_LOCK RFStateSpinLock; // For set RF on/off - + NDIS_SPIN_LOCK RFStateSpinLock; // For set RF on/off + NDIS_SPIN_LOCK WapiOptionSpinLock;// For wapi 2009.05.21 by sherry NDIS_SPIN_LOCK WapiRxSpinLock;// For wapi 2009.05.21 by sherry NDIS_SPIN_LOCK BufferSpinLock; // For NetBufferLists @@ -326,18 +326,18 @@ typedef struct _RT_SDIO_DEVICE { NDIS_SPIN_LOCK ndisDbgWorkItemSpinLock; // 20120525 by cosa NDIS_SPIN_LOCK IQKSpinLock; // For IQK. 20130807, Added by VincentL. NDIS_SPIN_LOCK DynTxPwrTblSpinLock; - NDIS_SPIN_LOCK PendedOidSpinLock;// Synchronization method for OID pending, added by Roger, 2013.07.11. + NDIS_SPIN_LOCK PendedOidSpinLock;// Synchronization method for OID pending, added by Roger, 2013.07.11. NDIS_SPIN_LOCK ChnlListSpinLock; - NDIS_SPIN_LOCK IndicSpinLock; // Protect indic context. + NDIS_SPIN_LOCK IndicSpinLock; // Protect indic context. NDIS_SPIN_LOCK RfdSpinLock; - -#if (AUTO_CHNL_SEL_NHM == 1) + +#if (AUTO_CHNL_SEL_NHM == 1) NDIS_SPIN_LOCK AcsSpinLock; // Auto Channel Select #endif #if DRV_LOG_REGISTRY NDIS_SPIN_LOCK DrvStateSpinLock; -#endif +#endif NDIS_SPIN_LOCK CustomScanSpinLock; @@ -355,7 +355,7 @@ typedef struct _RT_SDIO_DEVICE { // SDIO Tx Queue related information. PRT_SDIO_TX_QUEUE RtTxQueue; // A ring of Tx queues. - int RtNumTxQueue; // Number of Tx queue in the ring + int RtNumTxQueue; // Number of Tx queue in the ring // SDIO Rx Queue related information. int RtNumRxQueue; // Number of Rx queues in the ring @@ -367,7 +367,7 @@ typedef struct _RT_SDIO_DEVICE { u2Byte NdisStatusIndicateCount; //---------------------------------------------------------------------------- - // IO Method Related. 2005.01.06, by rcnjko. + // IO Method Related. 2005.01.06, by rcnjko. NDIS_SPIN_LOCK IrpSpinLock; // To make sure at most one IRP sent to USB host driver. NDIS_SPIN_LOCK AwbSpinLock; NDIS_SPIN_LOCK HwTimerSpinLock; @@ -376,27 +376,27 @@ typedef struct _RT_SDIO_DEVICE { // Tx related Semaphore PlatformSemaphore TxSemaphore; -#if RTL8723_SDIO_IO_THREAD_ENABLE +#if RTL8723_SDIO_IO_THREAD_ENABLE // IO related Semaphore PlatformSemaphore IOSemaphore; #endif - + int nIrpPendingCnt; // #IRP pending in USB host, it MUST be protected by IrpSpinLock. RT_LIST_ENTRY AwbIdleQueue; // Queue for non-used AWBs. RT_LIST_ENTRY AwbWaitQueue; // Queue for AWB waiting to be sent down. u4Byte NumAwb; // #Awb allocated PVOID AwbBuffer; // Pointer to the block of memory for AWBs. - u4Byte AwbBufferSize; // Size of AwbBuffer. + u4Byte AwbBufferSize; // Size of AwbBuffer. u4Byte NumIdleAwb; // Num of idle Awb u4Byte NumWaitAwb; // Num of waiting Awb - // SyncIo Method 2. + // SyncIo Method 2. // BOOLEAN bSyncIoWaiting; // Indicate if one or more Sync IO are waitting. - int SyncIoWaitingCount; + int SyncIoWaitingCount; KEVENT SyncIoEvent; // Event used to notify the waiting Sync IO. int nIoStuckCnt; // # of IO stuck. int SyncIoInProgressCount; - + NDIS_EVENT AllCtrlTransCompleteEvent; PIRP pAsynIoWriteIrp; @@ -409,7 +409,7 @@ typedef struct _RT_SDIO_DEVICE { u2Byte AsynIoWriteByteCnt; u1Byte AsynIoWriteDataBuf[MAX_AWB_DATA_SIZE]; //---------------------------------------------------------------------------- -#if 0 +#if 0 // e.g. IO monitor. 2005.04.21, by rcnjko. RT_8187DBG_CONTEXT DbgCtx; #endif @@ -420,13 +420,13 @@ typedef struct _RT_SDIO_DEVICE { WDFDEVICE hWdfDevice; #endif - + #if POWER_MAN // @@@ 20061205 david power management - RT_WORK_ITEM PnpWorkItem; + RT_WORK_ITEM PnpWorkItem; NDIS_DEVICE_POWER_STATE CurrentPowerState; #endif //power_man - + BOOLEAN bSupportRemoteWakeUp; // 2011/09/07 MH Add for differen channel plan tx power offset. @@ -443,11 +443,11 @@ typedef struct _RT_SDIO_DEVICE { // 2011/11/25 MH Add for Sercom requirement temporarily. u1Byte RegInPipeCnt; - + // For Usb selective suspend feature, 2009.07.03. BOOLEAN RegUsbSS; // - // Fix Bug Check code 0x1d(i.e., NIC might be unplugged + // Fix Bug Check code 0x1d(i.e., NIC might be unplugged // before system resume or under initialization). 2009.09.24. // NDIS_EVENT SetPnpChkForHangEvent; @@ -475,14 +475,14 @@ typedef struct _RT_SDIO_DEVICE { NDIS_EVENT AllSdioRxTransCompleteEvent; // SDIO Host Compatibility Conrtol - BOOLEAN bRegSdioSpeedSDR25; // Set SDIO bus speed to 0: 25MHz, 1: 50MHz + BOOLEAN bRegSdioSpeedSDR25; // Set SDIO bus speed to 0: 25MHz, 1: 50MHz BOOLEAN bRegSdioDrivingEnable; // Enable/Disable Custom Driving Setting u1Byte RegSdioDriving; BOOLEAN bRegSurpriseRemovedEnable; // Enable/Disable SurprisedRemove while facing I/O error // HostBus Working Time Measurement. u1Byte BusTimeRecordIndex; - RT_SDIO_TIME_R SdBusSubmitTime[7]; + RT_SDIO_TIME_R SdBusSubmitTime[7]; LARGE_INTEGER PnPSdBusWorkTime; #if (RK_PLATFORM_SUPPORT == 1) @@ -494,7 +494,7 @@ typedef struct _RT_SDIO_DEVICE { #define GET_RT_SDIO_DEVICE(__pAdapter) (&((__pAdapter)->NdisSdioDev)) -// +// // Keep the number of SDIO CMDs we have already schedled to the SDBus. Added by Roger, 2011.04.01. // 2011.04.01. // @@ -504,13 +504,13 @@ typedef struct _RT_SDIO_DEVICE { // // Record the number of SDIO Rx transfer that is going to submit to SDbus. Added by tynli. 2014.11.19. -// Default is set to 1 for the purpose of event wait in disable transfer function. +// Default is set to 1 for the purpose of event wait in disable transfer function. // #define RT_SDIO_INC_RX_TRANS_REF(__pDevice) ((__pDevice)->SdioRxTransInProgressCnt++) #define RT_SDIO_DEC_RX_TRANS_REF(__pDevice) (((__pDevice)->SdioRxTransInProgressCnt>0)?((__pDevice)->SdioRxTransInProgressCnt--):((__pDevice)->SdioRxTransInProgressCnt=0)) #define RT_SDIO_GET_RX_TRANS_REF(__pDevice) ((__pDevice)->SdioRxTransInProgressCnt) -// +// // Retrieve specific SDIO Queue IRP pending count. Added by Roger, 2011.02.09. // #define GET_IRP_PENDING_CNT_WITH_TX_QUEUE_IDX(__pAdapter, __IdxQueue) \ @@ -532,7 +532,7 @@ typedef struct _RT_SDIO_DEVICE { else\ GET_RT_SDIO_DEVICE(__pAdapter)->SdioRxSeqNum++;\ } - + // // Reset SDIO Rx sequence number // diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n60_sdio.inc b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n60_sdio.inc index aec6c32b8..827fce510 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n60_sdio.inc +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n60_sdio.inc @@ -3,7 +3,7 @@ INCLUDES=$(INCLUDES) \ $(SRC_ROOT)\Platform\NDIS6; \ $(SRC_ROOT)\Platform\NDIS6\SDIO; \ $(DDK_INC_PATH); \ - $(DDK_INC_PATH)\wdm; + $(DDK_INC_PATH)\wdm; C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 C_DEFINES=$(C_DEFINES) -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n62_sdio.inc b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n62_sdio.inc index 6775d7260..09344dc15 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n62_sdio.inc +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n62_sdio.inc @@ -3,7 +3,7 @@ INCLUDES=$(INCLUDES) \ $(SRC_ROOT)\Platform\NDIS6; \ $(SRC_ROOT)\Platform\NDIS6\SDIO; \ $(DDK_INC_PATH); \ - $(DDK_INC_PATH)\wdm; + $(DDK_INC_PATH)\wdm; C_DEFINES=$(C_DEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS62_MINIPORT=1 -DNDIS61_MINIPORT=1 C_DEFINES=$(C_DEFINES) -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props index 48fb49172..3a74b5bd6 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props @@ -3,28 +3,28 @@ $(INCLUDES) - $(SRC_ROOT)\Platform\NdisComm; - $(SRC_ROOT)\Platform\NDIS6; - $(SRC_ROOT)\Platform\NDIS6\SDIO; - $(WDKContentRoot)\Include\KM; - $(WDKContentRoot)\Include\KM\wlan\1.0; + $(SRC_ROOT)\Platform\NdisComm; + $(SRC_ROOT)\Platform\NDIS6; + $(SRC_ROOT)\Platform\NDIS6\SDIO; + $(WDKContentRoot)\Include\KM; + $(WDKContentRoot)\Include\KM\wlan\1.0; - + 1 - + 7 9 11 11 15 - + -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS61_MINIPORT=1 -DNDIS620_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS61_MINIPORT=1 -DNDIS620_MINIPORT=1 -DNDIS630_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS61_MINIPORT=1 -DNDIS620_MINIPORT=1 -DNDIS630_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 - -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS61_MINIPORT=1 -DNDIS620_MINIPORT=1 -DNDIS630_MINIPORT=1 -DNDIS640_MINIPORT=1 -DNDIS650_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 - + -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS61_MINIPORT=1 -DNDIS620_MINIPORT=1 -DNDIS630_MINIPORT=1 -DNDIS640_MINIPORT=1 -DNDIS650_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1 + $(SOURCES) -km -func:RT_TRACE(COMPID,LEVEL,(MSG,...)) -func:RT_TRACE_F(COMPID,LEVEL,(MSG,...)) -func:RT_TRACE_EX(COMPID,LEVEL,(MSG,...)) -func:RT_TRACE_MAC(COMPID,LEVEL,(MSG,...)) -scan:$(SRC_ROOT)\HEADER\rtwlanwpp.h \ No newline at end of file diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlans.rc b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlans.rc index b2d7ef47a..218a4cea6 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlans.rc +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlans.rc @@ -41,7 +41,7 @@ Abstract: #undef VER_PRODUCTVERSION_STR #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR -#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2011 Realtek Semiconductor Corporation " +#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2011 Realtek Semiconductor Corporation " #define VER_COMPANYNAME_STR "Realtek Semiconductor Corporation " #include "common.ver" diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlansmp.rc b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlansmp.rc index 6849e4448..709429cd3 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlansmp.rc +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/rtwlansmp.rc @@ -41,7 +41,7 @@ Abstract: #undef VER_PRODUCTVERSION_STR #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR -#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2011 Realtek Semiconductor Corporation " +#define VER_LEGALCOPYRIGHT_STR "Copyright (C) 2011 Realtek Semiconductor Corporation " #define VER_COMPANYNAME_STR "Realtek Semiconductor Corporation " #include "common.ver" diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.lib.list b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.lib.list index 39cbe9c3b..713d6021b 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.lib.list +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.lib.list @@ -3,7 +3,7 @@ // //: Comment at the beginning // OS: * Ebd6 Ebd7 WinXP Vista Win7 Win8 WinBlue // +: Add for OS -// -: Remove for OS +// -: Remove for OS // +(*) [$(DDK_LIB_PATH)\ndis.lib] diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.list b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.list index 807172af9..fa23e6fb7 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.list +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.list @@ -3,7 +3,7 @@ // //: Comment at the beginning // OS: * Ebd6 Ebd7 WinXP Vista Win7 Win8 WinBlue // +: Add for OS -// -: Remove for OS +// -: Remove for OS // +(*) [..\N63C_SendAction.c] +(*) [..\N63C_Oids.c] diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.tpl.win b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.tpl.win index 8e071f756..1a7df7ced 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.tpl.win +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sources.tpl.win @@ -7,7 +7,7 @@ PRECOMPILED_PCH=precomp.pch PRECOMPILED_OBJ=precomp.obj # -# IC dependent directories are defined in +# IC dependent directories are defined in # the environment variable HAL_INC_DIRS. # INCLUDES=\ diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.h b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.h index c254b76a4..aba637151 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.h @@ -6,7 +6,7 @@ WDI_OID_TASK_OPEN( IN PADAPTER pAdapter, IN PRT_OID_HANDLER pOidHandle ); - + NDIS_STATUS WDI_OID_TASK_CLOSE( IN PADAPTER pAdapter, @@ -98,7 +98,7 @@ WDI_OID_TASK_SEND_AP_ASSOCIATION_RESPONSE( ); NDIS_STATUS -WDI_OID_TASK_CHANGE_OPERATION_MODE( +WDI_OID_TASK_CHANGE_OPERATION_MODE( IN PADAPTER pAdapter, IN PRT_OID_HANDLER pOidHandle ); @@ -413,7 +413,7 @@ WDI_CMD_SendRspActionFrameComplete( IN const WDI_SEND_ACTION_CTX *ctx ); -NDIS_STATUS +NDIS_STATUS WDI_PRE_M4_OID_TASK_SCAN( IN PADAPTER pAdapter, IN PRT_OID_HANDLER pOidHandle diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.h b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.h index 24acb1dc5..c65620c73 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.h @@ -35,27 +35,27 @@ WDI_Initialize( ); VOID -WDI_DeInitialize( +WDI_DeInitialize( IN NDIS_HANDLE DriverHandle ); VOID -WDI_InitRxQueue( +WDI_InitRxQueue( IN PADAPTER pAdapter ); VOID -WDI_DeInitRxQueue( +WDI_DeInitRxQueue( IN PADAPTER pAdapter ); VOID -WDI_DeInitRxQueue( +WDI_DeInitRxQueue( IN PADAPTER pAdapter ); - + VOID -WDI_PnPNotiry( +WDI_PnPNotiry( IN PADAPTER pAdapter ); @@ -134,7 +134,7 @@ WDI_IndicateBssListBySSID( ); VOID -WDI_IndicateConnectionComplete( +WDI_IndicateConnectionComplete( PADAPTER Adapter, RT_STATUS status ); @@ -146,7 +146,7 @@ WDI_IndicateAssociationComplete( ); VOID -WDI_IndicateDisassociation( +WDI_IndicateDisassociation( PADAPTER Adapter, u2Byte reason, pu1Byte pAddr @@ -163,7 +163,7 @@ WDI_IndicateCurrentPhyStatus( ); VOID -WDI_IndicateP2PEvent( +WDI_IndicateP2PEvent( VOID *pvP2PInfo, u4Byte EventID, MEMORY_BUFFER *pInformation @@ -176,12 +176,12 @@ WDI_CompleteCreateDeleteMac( ); VOID -WDI_IndicateRoamingComplete( +WDI_IndicateRoamingComplete( PADAPTER Adapter ); VOID -WDI_IndicateLinkStateChanged( +WDI_IndicateLinkStateChanged( PADAPTER pAdapter, BOOLEAN bForceLinkQuality, u1Byte ucLinkQuality @@ -202,30 +202,30 @@ WDI_IndicateWakeReason( ); VOID -WDI_IndicateRoamingNeeded( +WDI_IndicateRoamingNeeded( PADAPTER pAdapter, RT_PREPARE_ROAM_TYPE IndicationReason ); -VOID +VOID WDI_AddGroupPeer( IN PADAPTER pAdapter, IN u2Byte PortNumber ); -VOID +VOID WDI_DeleteGroupPeer( IN PADAPTER pAdapter, IN u2Byte PortNumber ); -NDIS_STATUS +NDIS_STATUS WDI_AddDatapathPeer( IN PADAPTER pAdapter, IN pu1Byte pAddr ); -void +void WDI_DeleteDatapathPeer( IN PADAPTER pAdapter, IN pu1Byte pAddr @@ -244,7 +244,7 @@ WDI_FetchNBLByPort( OUT PNET_BUFFER_LIST *ppNetBufferList ); -VOID +VOID WDI_IndicateTKIPMICFailure( PADAPTER pAdapter ); diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Extension.c b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Extension.c index 3e1ee80f2..3116401c8 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Extension.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Extension.c @@ -20,7 +20,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_OPEN, + OID_WDI_TASK_OPEN, OID_STR_WRAPPER("OID_WDI_TASK_OPEN"), TRUE, NULL, @@ -39,7 +39,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_CLOSE, + OID_WDI_TASK_CLOSE, OID_STR_WRAPPER("OID_WDI_TASK_CLOSE"), TRUE, NULL, @@ -58,7 +58,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_SCAN, + OID_WDI_TASK_SCAN, OID_STR_WRAPPER("OID_WDI_TASK_SCAN"), FALSE, ParseWdiTaskScan, @@ -77,7 +77,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_P2P_DISCOVER, + OID_WDI_TASK_P2P_DISCOVER, OID_STR_WRAPPER("OID_WDI_TASK_P2P_DISCOVER"), FALSE, ParseWdiTaskP2pDiscover, @@ -96,7 +96,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_CONNECT, + OID_WDI_TASK_CONNECT, OID_STR_WRAPPER("OID_WDI_TASK_CONNECT"), FALSE, ParseWdiTaskConnect, @@ -115,7 +115,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_DOT11_RESET, + OID_WDI_TASK_DOT11_RESET, OID_STR_WRAPPER("OID_WDI_TASK_DOT11_RESET"), FALSE, ParseWdiTaskDot11Reset, @@ -134,7 +134,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_DISCONNECT, + OID_WDI_TASK_DISCONNECT, OID_STR_WRAPPER("OID_WDI_TASK_DISCONNECT"), FALSE, ParseWdiTaskDisconnect, @@ -153,7 +153,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_P2P_SEND_REQUEST_ACTION_FRAME, + OID_WDI_TASK_P2P_SEND_REQUEST_ACTION_FRAME, OID_STR_WRAPPER("OID_WDI_TASK_P2P_SEND_REQUEST_ACTION_FRAME"), FALSE, ParseWdiTaskP2pSendRequestActionFrame, @@ -172,7 +172,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_P2P_SEND_RESPONSE_ACTION_FRAME, + OID_WDI_TASK_P2P_SEND_RESPONSE_ACTION_FRAME, OID_STR_WRAPPER("OID_WDI_TASK_P2P_SEND_RESPONSE_ACTION_FRAME"), FALSE, ParseWdiTaskP2pSendResponseActionFrame, @@ -191,7 +191,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_SET_RADIO_STATE, + OID_WDI_TASK_SET_RADIO_STATE, OID_STR_WRAPPER("OID_WDI_TASK_SET_RADIO_STATE"), TRUE, ParseWdiTaskSetRadioState, @@ -210,7 +210,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_CREATE_PORT, + OID_WDI_TASK_CREATE_PORT, OID_STR_WRAPPER("OID_WDI_TASK_CREATE_PORT"), TRUE, ParseWdiTaskCreatePort, @@ -229,7 +229,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_DELETE_PORT, + OID_WDI_TASK_DELETE_PORT, OID_STR_WRAPPER("OID_WDI_TASK_DELETE_PORT"), TRUE, ParseWdiTaskDeletePort, @@ -248,7 +248,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_START_AP, + OID_WDI_TASK_START_AP, OID_STR_WRAPPER("OID_WDI_TASK_START_AP"), FALSE, ParseWdiTaskStartAp, @@ -267,7 +267,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_STOP_AP, + OID_WDI_TASK_STOP_AP, OID_STR_WRAPPER("OID_WDI_TASK_STOP_AP"), FALSE, NULL, @@ -286,7 +286,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_SEND_AP_ASSOCIATION_RESPONSE, + OID_WDI_TASK_SEND_AP_ASSOCIATION_RESPONSE, OID_STR_WRAPPER("OID_WDI_TASK_SEND_AP_ASSOCIATION_RESPONSE"), FALSE, ParseWdiTaskSendApAssociationResponse, @@ -305,7 +305,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_CHANGE_OPERATION_MODE, + OID_WDI_TASK_CHANGE_OPERATION_MODE, OID_STR_WRAPPER("OID_WDI_TASK_CHANGE_OPERATION_MODE"), FALSE, ParseWdiTaskChangeOperationMode, @@ -324,7 +324,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_ROAM, + OID_WDI_TASK_ROAM, OID_STR_WRAPPER("OID_WDI_TASK_ROAM"), FALSE, ParseWdiTaskRoam, @@ -344,7 +344,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_SEND_REQUEST_ACTION_FRAME, + OID_WDI_TASK_SEND_REQUEST_ACTION_FRAME, OID_STR_WRAPPER("OID_WDI_TASK_SEND_REQUEST_ACTION_FRAME"), FALSE, ParseWdiTaskSendRequestActionFrame, @@ -352,7 +352,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= sizeof(WDI_TASK_SEND_REQUEST_ACTION_FRAME_PARAMETERS) }, NDIS_STATUS_WDI_INDICATION_SEND_REQUEST_ACTION_FRAME_COMPLETE, - TRUE, + TRUE, 28, WDI_OID_TASK_SEND_REQUEST_ACTION_FRAME, WDI_CANCEL_OID_TASK_SEND_REQUEST_ACTION_FRAME, @@ -363,7 +363,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= { { RT_CMD_ENTRY_TYPE_TASK, - OID_WDI_TASK_SEND_RESPONSE_ACTION_FRAME, + OID_WDI_TASK_SEND_RESPONSE_ACTION_FRAME, OID_STR_WRAPPER("OID_WDI_TASK_SEND_RESPONSE_ACTION_FRAME"), FALSE, ParseWdiTaskSendResponseActionFrame, @@ -371,7 +371,7 @@ RT_TASK_ENTRY RT_SUPPORT_TASKs[]= sizeof(WDI_TASK_SEND_RESPONSE_ACTION_FRAME_PARAMETERS) }, NDIS_STATUS_WDI_INDICATION_SEND_RESPONSE_ACTION_FRAME_COMPLETE, - TRUE, + TRUE, 28, WDI_OID_TASK_SEND_RESPONSE_ACTION_FRAME, WDI_CANCEL_OID_TASK_SEND_RESPONSE_ACTION_FRAME, @@ -387,7 +387,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_P2P_LISTEN_STATE, + OID_WDI_SET_P2P_LISTEN_STATE, OID_STR_WRAPPER("OID_WDI_SET_P2P_LISTEN_STATE"), FALSE, ParseWdiSetP2pListenState, @@ -399,7 +399,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_P2P_ADDITIONAL_IE, + OID_WDI_SET_P2P_ADDITIONAL_IE, OID_STR_WRAPPER("OID_WDI_SET_P2P_ADDITIONAL_IE"), FALSE, NULL, @@ -411,7 +411,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_ADD_CIPHER_KEYS, + OID_WDI_SET_ADD_CIPHER_KEYS, OID_STR_WRAPPER("OID_WDI_SET_ADD_CIPHER_KEYS"), FALSE, ParseWdiSetAddCipherKeys, @@ -423,7 +423,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_DELETE_CIPHER_KEYS, + OID_WDI_SET_DELETE_CIPHER_KEYS, OID_STR_WRAPPER("OID_WDI_SET_DELETE_CIPHER_KEYS"), FALSE, ParseWdiSetDeleteCipherKeys, @@ -435,7 +435,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_DEFAULT_KEY_ID, + OID_WDI_SET_DEFAULT_KEY_ID, OID_STR_WRAPPER("OID_WDI_SET_DEFAULT_KEY_ID"), FALSE, ParseWdiSetDefaultKeyId, @@ -447,7 +447,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_CONNECTION_QUALITY, + OID_WDI_SET_CONNECTION_QUALITY, OID_STR_WRAPPER("OID_WDI_SET_CONNECTION_QUALITY"), FALSE, ParseWdiSetConnectionQuality, @@ -459,7 +459,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_GET_AUTO_POWER_SAVE, + OID_WDI_GET_AUTO_POWER_SAVE, OID_STR_WRAPPER("OID_WDI_GET_AUTO_POWER_SAVE"), FALSE, ParseWdiGetAutoPowerSave, @@ -467,11 +467,11 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= sizeof(WDI_GET_AUTO_POWER_SAVE_PARAMETERS) }, WDI_OID_GET_AUTO_POWER_SAVE - }, + }, { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_GET_STATISTICS, + OID_WDI_GET_STATISTICS, OID_STR_WRAPPER("OID_WDI_GET_STATISTICS"), FALSE, NULL, @@ -483,7 +483,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_RECEIVE_PACKET_FILTER, + OID_WDI_SET_RECEIVE_PACKET_FILTER, OID_STR_WRAPPER("OID_WDI_SET_RECEIVE_PACKET_FILTER"), FALSE, ParseWdiSetReceivePacketFilter, @@ -495,7 +495,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_GET_ADAPTER_CAPABILITIES, + OID_WDI_GET_ADAPTER_CAPABILITIES, OID_STR_WRAPPER("OID_WDI_GET_ADAPTER_CAPABILITIES"), TRUE, NULL, @@ -507,7 +507,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_NETWORK_LIST_OFFLOAD, + OID_WDI_SET_NETWORK_LIST_OFFLOAD, OID_STR_WRAPPER("OID_WDI_SET_NETWORK_LIST_OFFLOAD"), FALSE, ParseWdiSetNetworkListOffload, @@ -519,7 +519,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_RECEIVE_COALESCING, + OID_WDI_SET_RECEIVE_COALESCING, OID_STR_WRAPPER("OID_WDI_SET_RECEIVE_COALESCING"), FALSE, ParseWdiSetReceiveCoalescing, @@ -531,7 +531,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_PRIVACY_EXEMPTION_LIST, + OID_WDI_SET_PRIVACY_EXEMPTION_LIST, OID_STR_WRAPPER("OID_WDI_SET_PRIVACY_EXEMPTION_LIST"), FALSE, ParseWdiSetPrivacyExemptionList, @@ -543,7 +543,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_POWER_STATE, + OID_WDI_SET_POWER_STATE, OID_STR_WRAPPER("OID_WDI_SET_POWER_STATE"), TRUE, ParseWdiSetPowerState, @@ -567,7 +567,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_ADD_WOL_PATTERN, + OID_WDI_SET_ADD_WOL_PATTERN, OID_STR_WRAPPER("OID_WDI_SET_ADD_WOL_PATTERN"), FALSE, ParseWdiSetAddWolPattern, @@ -579,7 +579,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_REMOVE_WOL_PATTERN, + OID_WDI_SET_REMOVE_WOL_PATTERN, OID_STR_WRAPPER("OID_WDI_SET_REMOVE_WOL_PATTERN"), FALSE, ParseWdiSetRemoveWolPattern, @@ -591,7 +591,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_MULTICAST_LIST, + OID_WDI_SET_MULTICAST_LIST, OID_STR_WRAPPER("OID_WDI_SET_MULTICAST_LIST"), FALSE, ParseWdiSetMulticastList, @@ -627,7 +627,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_ADAPTER_CONFIGURATION, + OID_WDI_SET_ADAPTER_CONFIGURATION, OID_STR_WRAPPER("OID_WDI_SET_ADAPTER_CONFIGURATION"), TRUE, ParseWdiSetAdapterConfiguration, @@ -639,7 +639,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_GET_RECEIVE_COALESCING_MATCH_COUNT, + OID_WDI_GET_RECEIVE_COALESCING_MATCH_COUNT, OID_STR_WRAPPER("OID_WDI_GET_RECEIVE_COALESCING_MATCH_COUNT"), FALSE, ParseWdiGetReceiveCoalescingMatchCount, @@ -663,7 +663,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_IHV_REQUEST, + OID_WDI_IHV_REQUEST, OID_STR_WRAPPER("OID_WDI_IHV_REQUEST"), FALSE, NULL, @@ -675,7 +675,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_GET_NEXT_ACTION_FRAME_DIALOG_TOKEN, + OID_WDI_GET_NEXT_ACTION_FRAME_DIALOG_TOKEN, OID_STR_WRAPPER("OID_WDI_GET_NEXT_ACTION_FRAME_DIALOG_TOKEN"), FALSE, ParseWdiGetNextActionFrameDialogToken, @@ -687,7 +687,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_P2P_WPS_ENABLED, + OID_WDI_SET_P2P_WPS_ENABLED, OID_STR_WRAPPER("OID_WDI_SET_P2P_WPS_ENABLED"), FALSE, ParseWdiSetP2pWpsEnabled, @@ -699,7 +699,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_GET_BSS_ENTRY_LIST, + OID_WDI_GET_BSS_ENTRY_LIST, OID_STR_WRAPPER("OID_WDI_GET_BSS_ENTRY_LIST"), FALSE, ParseWdiGetBssEntryList, @@ -711,7 +711,7 @@ RT_PROPERTY_ENTRY RT_SUPPORT_PROPERTYs[]= { { RT_CMD_ENTRY_TYPE_PROPERTY, - OID_WDI_SET_FAST_BSS_TRANSITION_PARAMETERS, + OID_WDI_SET_FAST_BSS_TRANSITION_PARAMETERS, OID_STR_WRAPPER("OID_WDI_SET_FAST_BSS_TRANSITION_PARAMETERS"), TRUE, ParseWdiSetFastBssTransitionParameters, @@ -730,7 +730,7 @@ wdi_GetCommandEntry( ) { u4Byte it = 0; - + for(it = 0 ; it < sizeof(RT_SUPPORT_TASKs) / sizeof(RT_SUPPORT_TASKs[0]); it++) { if(oid == RT_SUPPORT_TASKs[it].super.Oid) @@ -784,7 +784,7 @@ wdi_TlvParser_Init( parser->buf = NULL; parser->bufSize = 0; parser->parsedTlv.param = NULL; - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("wdi_TlvParser_Init(): Param Cleaned.\n")); for(it = 0 ; it < sizeof(RT_SUPPORT_TASKs) / sizeof(RT_SUPPORT_TASKs[0]); it++) @@ -798,7 +798,7 @@ wdi_TlvParser_Init( if(parser->bufSize < RT_SUPPORT_PROPERTYs[it].super.parsedTlvSize) parser->bufSize = RT_SUPPORT_PROPERTYs[it].super.parsedTlvSize; } - + PlatformAllocateMemory(pAdapter, &parser->buf, parser->bufSize); if(!parser->buf) @@ -815,10 +815,10 @@ wdi_TlvParser_Deinit( { // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_ASSERT(0 == parser->nonCleanedup, - ("%s(): some parsed tls not cleaned up before deinit: %u\n", + RT_ASSERT(0 == parser->nonCleanedup, + ("%s(): some parsed tls not cleaned up before deinit: %u\n", __FUNCTION__, parser->nonCleanedup)); - + if(parser->buf) { PlatformFreeMemory(parser->buf, parser->bufSize); @@ -826,7 +826,7 @@ wdi_TlvParser_Deinit( parser->buf = NULL; parser->bufSize = 0; parser->parsedTlv.param = NULL; - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("wdi_TlvParser_Deinit(): Param Cleaned.\n")); } else @@ -845,7 +845,7 @@ wdi_TlvParser_Parse( ) { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - + if(!cmdEntry->TlvParser) return NDIS_STATUS_SUCCESS; @@ -855,14 +855,14 @@ wdi_TlvParser_Parse( RT_ASSERT(parser->parsedTlv.param == NULL, ("%s(): parsedTlv param shall be NULL\n", __FUNCTION__)); // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_ASSERT(0 == parser->nonCleanedup, - ("%s(): there are parsed tlvs not cleanded up: %u\n", + RT_ASSERT(0 == parser->nonCleanedup, + ("%s(): there are parsed tlvs not cleanded up: %u\n", __FUNCTION__, parser->nonCleanedup)); do { PlatformZeroMemory(parser->buf, parser->bufSize); - parser->parsedTlv.param = NULL; + parser->parsedTlv.param = NULL; RT_TRACE( COMP_OID_SET, DBG_LOUD, ("wdi_TlvParser_Parse(): Param Cleaned.\n")); if(sizeof(WDI_MESSAGE_HEADER) == pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength) @@ -871,11 +871,11 @@ wdi_TlvParser_Parse( status = NDIS_STATUS_SUCCESS; break; } - + if(NDIS_STATUS_SUCCESS != (status = cmdEntry->TlvParser( pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength - sizeof(WDI_MESSAGE_HEADER), (pu1Byte)pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer + sizeof(WDI_MESSAGE_HEADER), - &pAdapter->pPortCommonInfo->WdiData.TlvContext, + &pAdapter->pPortCommonInfo->WdiData.TlvContext, parser->buf))) { RT_TRACE( COMP_OID_SET, DBG_LOUD, ("wdi_TlvParser_Parse(): cmdEntry->TlvParser return %s\n", status?"NOT SUCCESS":"SUCCESS")); @@ -886,7 +886,7 @@ wdi_TlvParser_Parse( parser->parsedTlv.param = parser->buf; parser->nonCleanedup++; - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("wdi_TlvParser_Parse(): Param Assigned.\n")); }while(FALSE); @@ -903,27 +903,27 @@ wdi_TlvParser_Cleanup( if(!cmdEntry->TlvCleaner) return; - + RT_ASSERT(cmdEntry->TlvParser, ("%s(): there's a cleaner but no parser\n", __FUNCTION__)); if(parser->parsedTlv.param) { RT_ASSERT(parser->parsedTlv.param, ("%s(): no parsed structure, parsedTlv.param is NULL\n", __FUNCTION__)); - + // Prefast warning C6328: Size mismatch ignore #pragma warning (disable: 6328) - RT_ASSERT(1 == parser->nonCleanedup, - ("%s(): incorrect # of non cleaned up parsed tlvs: %u\n", + RT_ASSERT(1 == parser->nonCleanedup, + ("%s(): incorrect # of non cleaned up parsed tlvs: %u\n", __FUNCTION__, parser->nonCleanedup)); - + cmdEntry->TlvCleaner(parser->parsedTlv.param); PlatformZeroMemory(parser->buf, parser->bufSize); parser->parsedTlv.param = NULL; parser->nonCleanedup--; - + RT_TRACE( COMP_OID_SET, DBG_LOUD, ("wdi_TlvParser_Cleanup(): Param Cleaned.\n")); } - + return; } @@ -955,7 +955,7 @@ OidHandle_VerifyTask( else { pEntry= (PRT_COMPLETE_ENTRY)RTGetHeadList(pTaskIndicationList); - + if(pEntry->Oid == WdiTaskOid) { bResult = TRUE; @@ -985,7 +985,7 @@ OidHandle_IndicateM3( NdisOIDHistoryUpdate(pAdapter, pNdisRequest, RT_OID_HISTORY_M3); - // Should we need to ndicate the actual status for each property command instead? e.g., pOidHandle->OidStatus + // Should we need to ndicate the actual status for each property command instead? e.g., pOidHandle->OidStatus NdisMOidRequestComplete( pAdapter->pNdisCommon->hNdisAdapter, pNdisRequest, @@ -1011,7 +1011,7 @@ OidHandle_IndicateM4( RT_TRACE(COMP_OID_SET, DBG_LOUD, ("==> OidHandle_IndicateM4 (%x)\n", pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.Oid)); NdisOIDHistoryUpdate(pAdapter, pOidHandle->pNdisRequest, RT_OID_HISTORY_M4); - + N6_ASSIGN_OBJECT_HEADER( statusIndication.Header, NDIS_OBJECT_TYPE_STATUS_INDICATION, @@ -1035,7 +1035,7 @@ OidHandle_IndicateM4( pAdapter->pNdisCommon->hNdisAdapter, &statusIndication ); - + return RT_STATUS_SUCCESS; } @@ -1054,7 +1054,7 @@ OidHandle_Cancel( // (1) Validate definition of abort from task table // (2) Validate OID/Transaction ID/Port ID // - + RT_STATUS RtStatus = RT_STATUS_INVALID_PARAMETER; PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData); @@ -1094,10 +1094,10 @@ OidHandle_Cancel( NdisAcquireSpinLock(&pWdi->TaskHandle.Lock); pWdi->TaskHandle.Status |= RT_OID_HANDLER_STATUS_CANCELED; NdisReleaseSpinLock(&pWdi->TaskHandle.Lock); - + OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_TASK); } - + break; } @@ -1140,10 +1140,10 @@ OidHandle_AbortAction( if(NULL != pTask->AbortFunc) pTask->AbortFunc(pTargetAdapter); - + } while(FALSE); - + RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<== OidHandle_AbortAction\n")); return RtStatus; } @@ -1167,9 +1167,9 @@ WDICommandCleanup( ) { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("==> WDICommandCleanup\n")); - + do { if(pOidHandle->Status & RT_OID_HANDLER_STATUS_RELEASED) @@ -1186,7 +1186,7 @@ WDICommandCleanup( break; } - if((!(pOidHandle->Status & RT_OID_HANDLER_STATUS_RETURNED)) && + if((!(pOidHandle->Status & RT_OID_HANDLER_STATUS_RETURNED)) && (!bAsync) && !(pAdapter->pPortCommonInfo->WdiData.bCommandHangHappened)) { @@ -1200,7 +1200,7 @@ WDICommandCleanup( pOidHandle->Status &= ~RT_OID_HANDLER_STATUS_SET; pOidHandle->Status &= ~RT_OID_HANDLER_STATUS_RETURNED; pOidHandle->Status &= ~RT_OID_HANDLER_STATUS_CANCELED; - + }while(FALSE); return status; @@ -1240,7 +1240,7 @@ OidHandle_Complete( pOidHandle = &pWdi->TaskHandle; pTaskIndicationList = &pWdi->TaskCompleteIndicationList; } - + entry = (RT_TASK_ENTRY *)pOidHandle->CmdEntry; wdiHdr = (WDI_MESSAGE_HEADER *)pOidHandle->pInputBuffer; //wdiHdr = (WDI_MESSAGE_HEADER *)pWdi->TaskHandle.pInputBuffer; @@ -1270,14 +1270,14 @@ OidHandle_Complete( { bAsync = TRUE; } - + if(entry->PreM4Cb != NULL) { entry->PreM4Cb(pAdapter, pOidHandle); } - RT_TRACE(COMP_OID_SET, DBG_TRACE, - ("OidHandle_Complete start to indicate M4. Oid:0x%x Port:%d TransactionId:0x%x\n", + RT_TRACE(COMP_OID_SET, DBG_TRACE, + ("OidHandle_Complete start to indicate M4. Oid:0x%x Port:%d TransactionId:0x%x\n", pWdi->TaskHandle.pNdisRequest->DATA.METHOD_INFORMATION.Oid, PortNumber, TransactionId)); @@ -1291,12 +1291,12 @@ OidHandle_Complete( { entry->PostM4Cb(pAdapter, &PortNumber); } - + } else if(OIDHANDLE_TYPE_PROPERTY == Type) { pOidHandle = &pWdi->PropertyHandle; - + pOidHandle->OidExecutionTime = (PlatformGetCurrentTime() - pOidHandle->OidStartTime); RT_TRACE(COMP_OID_SET, DBG_TRACE, ("Property CMD execution time:%dus\n", (ULONG)pOidHandle->OidExecutionTime)); @@ -1306,7 +1306,7 @@ OidHandle_Complete( } pDefaultAdapter = GetDefaultAdapter(pAdapter); - + OidHandle_IndicateM3(pDefaultAdapter, &pWdi->PropertyHandle); } else @@ -1318,7 +1318,7 @@ OidHandle_Complete( status = WDICommandCleanup(pAdapter, pOidHandle, bAsync); RT_TRACE(COMP_OID_SET, DBG_TRACE, ("==> OidHandle_Complete status:0x%x\n", status)); - + return status; } @@ -1339,7 +1339,7 @@ WDICommandHangComplete( BOOLEAN bResult = FALSE; PRT_COMPLETE_ENTRY pEntry = NULL; PADAPTER pDefaultAdapter = NULL; - + wdiHdr = (WDI_MESSAGE_HEADER *)pWdi->TaskHandle.pInputBuffer; PortNumber = (u2Byte)wdiHdr->PortId; TransactionId = wdiHdr->TransactionId; @@ -1353,7 +1353,7 @@ WDICommandHangComplete( else { pEntry= (PRT_COMPLETE_ENTRY)RTGetHeadList(&pWdi->TaskCompleteIndicationList); - + if(pEntry->Oid == pWdi->TaskHandle.pNdisRequest->DATA.METHOD_INFORMATION.Oid) { bResult = TRUE; @@ -1390,14 +1390,14 @@ WDICommandHangComplete( { bAsync = TRUE; } - + if(entry->PreM4Cb != NULL) { entry->PreM4Cb(pAdapter, &pWdi->TaskHandle); } - RT_TRACE(COMP_OID_SET, DBG_TRACE, - ("OidHandle_Complete start to indicate M4. Oid:0x%x Port:%d TransactionId:0x%x\n", + RT_TRACE(COMP_OID_SET, DBG_TRACE, + ("OidHandle_Complete start to indicate M4. Oid:0x%x Port:%d TransactionId:0x%x\n", pWdi->TaskHandle.pNdisRequest->DATA.METHOD_INFORMATION.Oid, PortNumber, TransactionId)); @@ -1443,7 +1443,7 @@ WDICommandHangCleanup( //if(pEntry->Oid == NdisOid && pEntry->TransactionId == TransactionId && pEntry->PortId == PortId) { //If real FW hang happen, LE should just complete the command without touch FW. - if(OID_WDI_TASK_P2P_DISCOVER == pEntry->Oid || + if(OID_WDI_TASK_P2P_DISCOVER == pEntry->Oid || OID_WDI_TASK_SCAN == pEntry->Oid ) { @@ -1455,7 +1455,7 @@ WDICommandHangCleanup( else { pWdi->TaskHandle.Status |= RT_OID_HANDLER_STATUS_CANCELED; - + //OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_TASK_POST_HANG); WDICommandHangComplete(pAdapter); } @@ -1466,7 +1466,7 @@ WDICommandHangCleanup( //Do nothing here since property cmd will return quickly without touch with FW(need double check) and it should not hang... //pWdi->PropertyHandle.Status |= RT_OID_HANDLER_STATUS_CANCELED; //OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_PROPERTY); - + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("WDICommandCancelForPLDR: Should Not happen for Property CMD\n")); } @@ -1665,7 +1665,7 @@ TaskCommandHandle( { RT_TRACE(COMP_OID_SET, DBG_TRACE, ("Sync:Task target is adapter\n")); } - + status = entry->Func(pTargetAdapter, pOidHandle); pOidHandle->Status |= RT_OID_HANDLER_STATUS_RETURNED; @@ -1711,7 +1711,7 @@ PropertyCommandHandle( { RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Property target is adapter\n")); } - + pOidHandle->OidStatus = entry->Func(pTargetAdapter, pOidHandle); pOidHandle->Status |= RT_OID_HANDLER_STATUS_RETURNED; @@ -1735,15 +1735,15 @@ WDICommandHandleInitInner( { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData); - + if(NDIS_STATUS_SUCCESS != wdi_TlvParser_Init(&pOidHandle->tlvParser, pAdapter)) { return NDIS_STATUS_FAILURE; } - + status = PlatformAllocateMemory( - pAdapter, - (PVOID*)&pOidHandle->pInputBuffer, + pAdapter, + (PVOID*)&pOidHandle->pInputBuffer, MAX_OID_INPUT_BUFFER_LEN ); if(NDIS_STATUS_SUCCESS != status) @@ -1765,10 +1765,10 @@ WDICommandHandleInitInner( if(pOidHandle == &pWdi->TaskHandle || pOidHandle == &pWdi->TaskPostHangHandle) { - status = PlatformInitializeWorkItem(pAdapter, + status = PlatformInitializeWorkItem(pAdapter, &(pOidHandle->WDICommandWorkitem), ( RT_WORKITEM_CALL_BACK) WDITaskCommandWorkItemCallback, - (PVOID) pAdapter, + (PVOID) pAdapter, "WDITaskCommandWorkitem" ); } @@ -1776,10 +1776,10 @@ WDICommandHandleInitInner( //Also prepare a workitem for property command if needed if(pOidHandle == &pWdi->PropertyHandle) { - status = PlatformInitializeWorkItem(pAdapter, + status = PlatformInitializeWorkItem(pAdapter, &(pOidHandle->WDICommandWorkitem), ( RT_WORKITEM_CALL_BACK) WDIPropertyCommandWorkItemCallback, - (PVOID) pAdapter, + (PVOID) pAdapter, "WDIPropertyCommandWorkitem" ); } @@ -1869,7 +1869,7 @@ WDICommandHandleDeinit( status = WDICommandHandleDeinitInner(pAdapter, pOidHandle); pOidHandle = &(pWdi->TaskPostHangHandle); - status = WDICommandHandleDeinitInner(pAdapter, pOidHandle); + status = WDICommandHandleDeinitInner(pAdapter, pOidHandle); // TODO: remove spinlock later when nobody use it, currently only abort command will use it. NdisFreeSpinLock(&pAdapter->pPortCommonInfo->WdiData.TaskCompleteIndicationLock); @@ -1893,7 +1893,7 @@ PreSetupCommand( RT_TRACE(COMP_OID_SET, DBG_SERIOUS, ("PreSetupCommand: OidHandle invalid state! 0x%x\n", pOidHandle->Status)); return NDIS_STATUS_INVALID_STATE; } - + pOidHandle->pNdisRequest = pNdisRequest; pOidHandle->OutputBufferLength = 0; pOidHandle->OidExecutionTime = 0; @@ -1906,7 +1906,7 @@ PreSetupCommand( if(pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength <= pOidHandle->AllocatedBufferLength) { PlatformMoveMemory( - pOidHandle->pInputBuffer, + pOidHandle->pInputBuffer, pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer, pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength); } @@ -1917,7 +1917,7 @@ PreSetupCommand( { pOidHandle->AllocatedBufferLength = pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength; PlatformMoveMemory( - pOidHandle->pInputBuffer, + pOidHandle->pInputBuffer, pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer, pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength); } @@ -1937,7 +1937,7 @@ PreSetupCommand( { RT_TRACE(COMP_OID_SET, DBG_SERIOUS, ("PreSetupCommand TLV Parser failure!\n")); } - + return status; } @@ -1990,7 +1990,7 @@ WDICommandHandle( { pOidHandle = &pWdi->TaskPostHangHandle; } - + if(taskentry->bWaitComplete) { PlatformScheduleWorkItem(&(pOidHandle->WDICommandWorkitem)); @@ -2014,7 +2014,7 @@ WDICommandHandle( // The command synchronization scope is adapter level scope. // Basic rule is task commands are serialized between M1 and M4, while property serialized between M1 and M3. // -// Note: +// Note: // 1. A subset of tasks can be aborted after they have been started. // 2. Data path is not serialized with the command path, expect for some specific cases. // @@ -2047,7 +2047,7 @@ N6WdiHandleOidRequest( pNdisRequest->DATA.METHOD_INFORMATION.BytesWritten = sizeof(WDI_MESSAGE_HEADER); pWdiHeader->Status = NDIS_STATUS_SUCCESS; - + do { if(NdisRequestMethod != pNdisRequest->RequestType) @@ -2056,7 +2056,7 @@ N6WdiHandleOidRequest( ndisStatus = NDIS_STATUS_NOT_RECOGNIZED; break; } - + if(NULL == (entry = wdi_GetCommandEntry(pNdisRequest->DATA.METHOD_INFORMATION.Oid))) { RT_TRACE(COMP_OID_SET, DBG_TRACE, ("N6WdiHandleOidRequestEx Not Recognized Oid:0x%x\n", pNdisRequest->DATA.METHOD_INFORMATION.Oid)); @@ -2065,7 +2065,7 @@ N6WdiHandleOidRequest( } if(NULL == (oidHandle = wdi_GetOidHandler(pWdi, entry))) - { + { RT_TRACE(COMP_OID_SET, DBG_WARNING, ("N6WdiHandleOidRequestEx Failed to get valid OidHandle\n")); ndisStatus = NDIS_STATUS_INVALID_DATA; break; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.c b/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.c index 0579c5275..9dd30af99 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.c @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: WDI_SendAction.c -// Description: +// Description: // // Author: haich // @@ -117,12 +117,12 @@ wdi_SendAction_PrepareReq( OffChnlTx_SetProbeEnabled(req, TRUE); OffChnlTx_SetTxChnl(req, chnl); OffChnlTx_SetTxAttemptCount(req, WDI_SEND_ACTION_RETRY_COUNT); - OffChnlTx_SetRetryIntermittentTime(req, - pAdapter->bInHctTest - ? WDI_SEND_ACTION_RETRY_INTERMITTENT_TIME_HCT_MS + OffChnlTx_SetRetryIntermittentTime(req, + pAdapter->bInHctTest + ? WDI_SEND_ACTION_RETRY_INTERMITTENT_TIME_HCT_MS : WDI_SEND_ACTION_RETRY_INTERMITTENT_TIME_MS ); - + return req; } @@ -136,13 +136,13 @@ add_MgntFrameMacHdr( ) { pu1Byte buf = NULL; - + if(NULL == (buf = FrameBuf_Add(pBuf, 24))) return; - + SET_80211_HDR_FRAME_CONTROL(buf, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(buf, typeSubtype); SET_80211_HDR_DURATION(buf, 0); - + SET_80211_HDR_FRAGMENT_SEQUENCE(buf, 0); SET_80211_HDR_ADDRESS1(buf, dest); SET_80211_HDR_ADDRESS2(buf, src); @@ -193,7 +193,7 @@ wdi_SendAction_PrepareReqEx( OffChnlTx_SetTxChnl(req, chnl); OffChnlTx_SetTxAttemptCount(req, WDI_SEND_ACTION_RETRY_COUNT); OffChnlTx_SetRetryIntermittentTime(req, WDI_SEND_ACTION_RETRY_INTERMITTENT_TIME_MS); - + return req; } @@ -312,7 +312,7 @@ wdi_SendAction_PdReq_PrepareData( RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("can't find peer in dev list\n")); return NDIS_STATUS_INVALID_STATE; } - + info->ProvisionRequestGroupCapability = param->ProvisionDiscoveryRequestInfo.RequestParams.GroupCapability; if(param->ProvisionDiscoveryRequestInfo.Optional.GroupID_IsPresent) @@ -325,8 +325,8 @@ wdi_SendAction_PdReq_PrepareData( // ssid info->uProvisionRequestGroupIDSSIDLength = (u1Byte)param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.ElementCount; PlatformMoveMemory( - info->ProvisionRequestGroupIDSSID, - param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.pElements, + info->ProvisionRequestGroupIDSSID, + param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.pElements, param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.ElementCount ); } @@ -338,7 +338,7 @@ wdi_SendAction_PdReq_PrepareData( if(param->VendorIEs.ElementCount) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_PROVISION_DISCOVERY_REQUEST, param->VendorIEs.ElementCount, param->VendorIEs.pElements @@ -385,12 +385,12 @@ wdi_SendAction_PdRsp_PrepareData( // token info->ProvisionResponseDialogToken = param->ResponseParams.DialogToken; - + // add ie if(param->VendorIEs.ElementCount) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_PROVISION_DISCOVERY_RESPONSE, param->VendorIEs.ElementCount, param->VendorIEs.pElements @@ -425,7 +425,7 @@ wdi_SendAction_InvitationReq_PrepareData( info->InvitationContext.Status = 0; info->InvitationContext.bInvitor = TRUE; PlatformMoveMemory( - info->InvitationContext.SsidBuf, + info->InvitationContext.SsidBuf, param->InvitationRequestInfo.GroupID.GroupSSID.pElements, param->InvitationRequestInfo.GroupID.GroupSSID.ElementCount ); @@ -465,7 +465,7 @@ wdi_SendAction_InvitationReq_PrepareData( if(param->InvitationRequestInfo.Optional.OperatingChannel_IsPresent) { info->bInvitationRequestUseSpecifiedOperatingChannel = TRUE; - info->uInvitationRequestOperatingChannelNumber = (u1Byte)param->InvitationRequestInfo.OperatingChannel.ChannelNumber; + info->uInvitationRequestOperatingChannelNumber = (u1Byte)param->InvitationRequestInfo.OperatingChannel.ChannelNumber; } else { @@ -527,7 +527,7 @@ wdi_SendAction_InvitationRsp_PrepareData( if(param->InvitationResponseInfo.Optional.OperatingChannel_IsPresent) { info->bInvitationResponseUseSpecifiedOperatingChannel = TRUE; - info->uInvitationResponseOperatingChannelNumber = (u1Byte)param->InvitationResponseInfo.OperatingChannel.ChannelNumber; + info->uInvitationResponseOperatingChannelNumber = (u1Byte)param->InvitationResponseInfo.OperatingChannel.ChannelNumber; } else { @@ -539,7 +539,7 @@ wdi_SendAction_InvitationRsp_PrepareData( if(param->VendorIEs.ElementCount) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_INVITATION_RESPONSE, param->VendorIEs.ElementCount, param->VendorIEs.pElements @@ -563,17 +563,17 @@ wdi_SendAction_GoNegReq_PrepareData( // // ref: N63C_SET_OID_DOT11_WFD_SEND_GO_NEGOTIATION_REQUEST // - + // config timeout info->GOConfigurationTimeout = (u1Byte)param->GONegotiationRequestInfo.RequestParams.GOConfigTimeout; info->ClientConfigurationTimeout = (u1Byte)param->GONegotiationRequestInfo.RequestParams.ClientConfigTimeout; - + // GroupCapability info->NegotiationRequestGroupCapability = param->GONegotiationRequestInfo.RequestParams.GroupCapability & ((u1Byte)(~gcP2PGroupOwner)); // Workaround since the pParameters->GroupCapability is wrong // go intent - info->GOIntent = - ((param->GONegotiationRequestInfo.RequestParams.GOIntent << 1) + info->GOIntent = + ((param->GONegotiationRequestInfo.RequestParams.GOIntent << 1) | param->GONegotiationRequestInfo.RequestParams.TieBreaker); // intf addr @@ -583,7 +583,7 @@ wdi_SendAction_GoNegReq_PrepareData( if(param->VendorIEs.ElementCount) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_GO_NEGOTIATION_REQUEST, param->VendorIEs.ElementCount, param->VendorIEs.pElements @@ -593,10 +593,10 @@ wdi_SendAction_GoNegReq_PrepareData( // Update the internal WPS Device Password ID attribute ---------------------------------------------------------- osWpsAttr.Octet = (u1Byte *)param->VendorIEs.pElements + 6; // Skip (0xDD, 0x??, 0x00, 0x50, 0xF2, 0x04) 6-Byte Header osWpsAttr.Length = (u2Byte)param->VendorIEs.ElementCount - 6; // Skip (0xDD, 0x??, 0x00, 0x50, 0xF2, 0x04) 6-Byte Header - + osDpid = P2PWpsIEGetAttribute(osWpsAttr, TRUE, P2P_WPS_ATTR_TAG_DEVICE_PASSWORD_ID); - if(osDpid.Length == 2) + if(osDpid.Length == 2) { info->WpsDevPasswdId = (WPS_DEVICE_PASSWD_ID) N2H2BYTE(*((pu2Byte)(osDpid.Octet))); } @@ -643,8 +643,8 @@ wdi_SendAction_GoNegRsp_PrepareData( info->NegotiationResponseStatus = param->GONegotiationResponseInfo.ResponseParams.StatusCode; // go intent - info->GOIntent = - ((param->GONegotiationResponseInfo.ResponseParams.GOIntent << 1) + info->GOIntent = + ((param->GONegotiationResponseInfo.ResponseParams.GOIntent << 1) | param->GONegotiationResponseInfo.ResponseParams.TieBreaker); // intf addr @@ -664,7 +664,7 @@ wdi_SendAction_GoNegRsp_PrepareData( // ssid info->uNegotiationResponseGroupIDSSIDLength = (u1Byte)param->GONegotiationResponseInfo.GroupID.GroupSSID.ElementCount; PlatformMoveMemory( - info->NegotiationResponseGroupIDSSID, + info->NegotiationResponseGroupIDSSID, param->GONegotiationResponseInfo.GroupID.GroupSSID.pElements, param->GONegotiationResponseInfo.GroupID.GroupSSID.ElementCount ); @@ -673,19 +673,19 @@ wdi_SendAction_GoNegRsp_PrepareData( { info->bNegotiationResponseUseGroupID = FALSE; } - + // add ie if(param->VendorIEs.ElementCount) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_GO_NEGOTIATION_RESPONSE, param->VendorIEs.ElementCount, param->VendorIEs.pElements ); } - // Update the state machine immediately + // Update the state machine immediately if(P2P_SC_SUCCESS == param->GONegotiationResponseInfo.ResponseParams.StatusCode) { info->State = P2P_STATE_GO_NEGO_RSP_SEND; @@ -697,7 +697,7 @@ wdi_SendAction_GoNegRsp_PrepareData( RT_TRACE_F(COMP_P2P, DBG_LOUD, ("update P2P state to 0x%x\n", info->State)); PlatformCancelTimer(info->pAdapter, &info->P2PMgntTimer); - PlatformSetTimer(info->pAdapter, &info->P2PMgntTimer, 0); + PlatformSetTimer(info->pAdapter, &info->P2PMgntTimer, 0); return status; } @@ -729,8 +729,8 @@ wdi_SendAction_GoNegConfirm_PrepareData( cpMacAddr(info->NegotiationConfirmGroupIDDeviceAddress, param->GONegotiationConfirmationInfo.GroupID.DeviceAddress.Address); info->uNegotiationConfirmGroupIDSSIDLength = (u1Byte)param->GONegotiationConfirmationInfo.GroupID.GroupSSID.ElementCount; PlatformMoveMemory( - info->NegotiationConfirmGroupIDSSID, - param->GONegotiationConfirmationInfo.GroupID.GroupSSID.pElements, + info->NegotiationConfirmGroupIDSSID, + param->GONegotiationConfirmationInfo.GroupID.GroupSSID.pElements, info->uNegotiationConfirmGroupIDSSIDLength ); } @@ -741,7 +741,7 @@ wdi_SendAction_GoNegConfirm_PrepareData( if(param->VendorIEs.ElementCount) { P2P_AddIe_Set( - &info->AdditionalIEs, + &info->AdditionalIEs, P2P_ADD_IE_GO_NEGOTIATION_CONFIRM, param->VendorIEs.ElementCount, param->VendorIEs.pElements @@ -782,7 +782,7 @@ WDI_SendAction_UpdateTxFrameDialogToken( P2P_DEV_TYPE devType = P2P_DEV_TYPE_LEGACY; RT_ASSERT(frame, ("%s(): buf is NULL!!!\n", __FUNCTION__)); - RT_ASSERT(FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN + 1 <= FrameBuf_Length(frame), + RT_ASSERT(FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN + 1 <= FrameBuf_Length(frame), ("%s(): invalid frame length: %u\n", __FUNCTION__, FrameBuf_Length(frame))); // determine dev type @@ -808,7 +808,7 @@ WDI_SendAction_UpdateTxFrameDialogToken( // update to the p2p dev list devAddr = Frame_Addr1(frame->os); - + if(P2P_DEV_TYPE_GO == devType && NULL != (pDev = p2p_DevList_GetGo(&info->devList, devAddr))) { mac = pDev->mac; @@ -819,16 +819,16 @@ WDI_SendAction_UpdateTxFrameDialogToken( { RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("bProvisionRequestUseGroupID is set but can't find the GO in dev list\n")); } - + mac = devAddr; } - p2p_DevList_TxUpdate(&info->devList, - wdi_SendAction_XlatFrameType(frameType), - mac, - devType, - frame, - token, + p2p_DevList_TxUpdate(&info->devList, + wdi_SendAction_XlatFrameType(frameType), + mac, + devType, + frame, + token, OffChnlTx_GetTxChnl(req)); info->DialogToken = token; @@ -842,9 +842,9 @@ WDI_SendAction_SkipProbeTemporarilly( ) { RT_STATUS status = RT_STATUS_SUCCESS; - + RT_ASSERT(req, ("%s(): req is NULL!!!\n", __FUNCTION__)); - + status = OffChnlTx_SkipProbeTemporarilly(req); return status; @@ -889,7 +889,7 @@ WDI_SendAction_PdReq( txChnl = (u1Byte)param->DeviceDescriptor.ChannelInfo.ChannelNumber; devType = P2P_DEV_TYPE_DEV; } - + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, txMac, txChnl, param->RequestParams.SendTimeout))) { return NULL; @@ -900,7 +900,7 @@ WDI_SendAction_PdReq( { u1Byte BoostInitGainValue = (u1Byte)(pP2PDeviceListEntry->RecvSignalPower+110); u2Byte boostDelaySec = WPS_HANDSHAKE_TIMEOUT_SEC; - + McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_START, &BoostInitGainValue, sizeof(u1Byte)); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS]: SignalStrength(%#x)\n", pP2PDeviceListEntry->RecvSignalPower)); McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); @@ -909,37 +909,37 @@ WDI_SendAction_PdReq( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_REQUEST, - WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, - pAdapter, - param->RequestParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_REQUEST, + WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, + pAdapter, + param->RequestParams.PeerDeviceAddress.Address, (P2P_DEV_TYPE_GO == devType) ? TRUE : FALSE, - param->RequestParams.DialogToken, + param->RequestParams.DialogToken, oldToken, - param->RequestParams.SendTimeout, - req, + param->RequestParams.SendTimeout, + req, P2P_EVENT_PROVISION_DISCOVERY_REQUEST_SEND_COMPLETE ); // flush action frames in dev list so we don't drop frames because of dialog token mismatch p2p_DevList_FlushActionFrames(&info->devList, txMac, devType); - + // construct pd req frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_PDReq(info, frame, param->RequestParams.PeerDeviceAddress.Address, param->RequestParams.DialogToken, 0); // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_REQ, - txMac, - devType, - frame, + p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_REQ, + txMac, + devType, + frame, ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), - txChnl); + txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-frame-pd-req"); - + return req; } @@ -976,9 +976,9 @@ WDI_SendAction_PdRsp( } // prepare off chnl tx req - if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->ResponseParams.SendTimeout))) { return NULL; @@ -990,34 +990,34 @@ WDI_SendAction_PdRsp( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, - WDI_P2P_ACTION_FRAME_MAX_VALUE, - pAdapter, - param->ResponseParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE, + WDI_P2P_ACTION_FRAME_MAX_VALUE, + pAdapter, + param->ResponseParams.PeerDeviceAddress.Address, FALSE, - param->ResponseParams.DialogToken, + param->ResponseParams.DialogToken, oldToken, - param->ResponseParams.SendTimeout, - req, + param->ResponseParams.SendTimeout, + req, P2P_EVENT_PROVISION_DISCOVERY_RESPONSE_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_PDRsp(info, param->ResponseParams.DialogToken, NULL, 0, frame, txMac); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_RSP, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_PD_RSP, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-pd-rsp"); - + return req; } @@ -1051,9 +1051,9 @@ WDI_SendAction_InvitationReq( } // prepare off chnl tx req - if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->RequestParams.SendTimeout))) { return NULL; @@ -1064,7 +1064,7 @@ WDI_SendAction_InvitationReq( { u1Byte BoostInitGainValue = (u1Byte)(pP2PDeviceListEntry->RecvSignalPower+110); u2Byte boostDelaySec = ASSOC_HANDSHAKE_DHCP_DELAY_SEC; - + McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_START, &BoostInitGainValue, sizeof(u1Byte)); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS]: SignalStrength(%#x)\n", pP2PDeviceListEntry->RecvSignalPower)); McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); @@ -1073,37 +1073,37 @@ WDI_SendAction_InvitationReq( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_INVITATION_REQUEST, - WDI_P2P_ACTION_FRAME_INVITATION_RESPONSE, - pAdapter, - param->RequestParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_INVITATION_REQUEST, + WDI_P2P_ACTION_FRAME_INVITATION_RESPONSE, + pAdapter, + param->RequestParams.PeerDeviceAddress.Address, param->ProvisionDiscoveryRequestInfo.Optional.GroupID_IsPresent ? TRUE : FALSE, - param->RequestParams.DialogToken, + param->RequestParams.DialogToken, oldToken, - param->RequestParams.SendTimeout, - req, + param->RequestParams.SendTimeout, + req, P2P_EVENT_INVITATION_REQUEST_SEND_COMPLETE ); - + // construct invitation req frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_InvitationReq(info, frame, txMac, param->RequestParams.DialogToken); // flush action frames in dev list so we don't remember old frames from previous connections p2p_DevList_FlushActionFrames(&info->devList, txMac, P2P_DEV_TYPE_DEV); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_REQ, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_REQ, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-frame-invitation-req"); - + return req; } @@ -1140,9 +1140,9 @@ WDI_SendAction_InvitationRsp( } // prepare off chnl tx req - if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->ResponseParams.SendTimeout))) { return NULL; @@ -1155,34 +1155,34 @@ WDI_SendAction_InvitationRsp( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_INVITATION_RESPONSE, - WDI_P2P_ACTION_FRAME_MAX_VALUE, - pAdapter, - param->ResponseParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_INVITATION_RESPONSE, + WDI_P2P_ACTION_FRAME_MAX_VALUE, + pAdapter, + param->ResponseParams.PeerDeviceAddress.Address, FALSE, - param->ResponseParams.DialogToken, + param->ResponseParams.DialogToken, oldToken, - param->ResponseParams.SendTimeout, - req, + param->ResponseParams.SendTimeout, + req, P2P_EVENT_INVITATION_RESPONSE_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_InvitationRsp(info, param->ResponseParams.DialogToken, frame, txMac); // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_RSP, - txMac, + p2p_DevList_TxUpdate(&info->devList, P2P_FID_INV_RSP, + txMac, P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-frame-invitation-rsp"); - + return req; } @@ -1218,9 +1218,9 @@ WDI_SendAction_GoNegReq( } // prepare off chnl tx req - if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->RequestParams.SendTimeout))) { return NULL; @@ -1231,7 +1231,7 @@ WDI_SendAction_GoNegReq( { u1Byte BoostInitGainValue = (u1Byte)(pP2PDeviceListEntry->RecvSignalPower+110); u2Byte boostDelaySec = WPS_HANDSHAKE_TIMEOUT_SEC; - + McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_START, &BoostInitGainValue, sizeof(u1Byte)); RT_TRACE(COMP_P2P, DBG_LOUD, ("[BOOST_INIT_GAIN_OS]: SignalStrength(%#x)\n", pP2PDeviceListEntry->RecvSignalPower)); McDynamicMachanismSet(pAdapter, MC_DM_INIT_GAIN_BOOST_END_DELAY_SEC, &boostDelaySec, sizeof(u2Byte)); @@ -1240,34 +1240,34 @@ WDI_SendAction_GoNegReq( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, - WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, - pAdapter, - param->RequestParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, + WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, + pAdapter, + param->RequestParams.PeerDeviceAddress.Address, FALSE, - param->RequestParams.DialogToken, + param->RequestParams.DialogToken, oldToken, - param->RequestParams.SendTimeout, - req, + param->RequestParams.SendTimeout, + req, P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE ); // construct pd req frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_GoNegReq(info, frame, txMac, param->RequestParams.DialogToken); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_REQ, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_REQ, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-frame-go-neg-req"); - + return req; } @@ -1304,9 +1304,9 @@ WDI_SendAction_GoNegRsp( } // prepare off chnl tx req - if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->ResponseParams.SendTimeout))) { return NULL; @@ -1318,34 +1318,34 @@ WDI_SendAction_GoNegRsp( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, - WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, - pAdapter, - param->ResponseParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, + WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, + pAdapter, + param->ResponseParams.PeerDeviceAddress.Address, FALSE, - param->ResponseParams.DialogToken, + param->ResponseParams.DialogToken, oldToken, - param->ResponseParams.SendTimeout, - req, + param->ResponseParams.SendTimeout, + req, P2P_EVENT_GO_NEGOTIATION_RESPONSE_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_GoNegRsp(info, param->ResponseParams.DialogToken, frame, txMac); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_RSP, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_RSP, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-frame-go-rsp"); - + return req; } @@ -1390,9 +1390,9 @@ WDI_SendAction_GoNegConfirm( } // prepare off chnl tx req - if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, - txMac, - txChnl, + if(NULL == (req = wdi_SendAction_PrepareReq(pAdapter, + txMac, + txChnl, param->ResponseParams.SendTimeout))) { return NULL; @@ -1405,34 +1405,34 @@ WDI_SendAction_GoNegConfirm( // setup cb ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); - wdi_SendAction_InitCtx(ctx, - WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, - WDI_P2P_ACTION_FRAME_MAX_VALUE, - pAdapter, - param->ResponseParams.PeerDeviceAddress.Address, + wdi_SendAction_InitCtx(ctx, + WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM, + WDI_P2P_ACTION_FRAME_MAX_VALUE, + pAdapter, + param->ResponseParams.PeerDeviceAddress.Address, FALSE, - param->ResponseParams.DialogToken, + param->ResponseParams.DialogToken, oldToken, - param->ResponseParams.SendTimeout, - req, + param->ResponseParams.SendTimeout, + req, P2P_EVENT_GO_NEGOTIATION_CONFIRM_SEND_COMPLETE ); - + // construct confirm frame = OffChnlTx_GetTxFrameBuf(req); p2p_Construct_GoNegConf(info, txToken, frame, txMac); - + // update to the p2p dev list - p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_CONF, - txMac, - P2P_DEV_TYPE_DEV, - frame, - ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), + p2p_DevList_TxUpdate(&info->devList, P2P_FID_GO_NEG_CONF, + txMac, + P2P_DEV_TYPE_DEV, + frame, + ReadEF1Byte(FrameBuf_Head(frame) + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN), txChnl); // issue req wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-p2p-action-frame-go-confirm"); - + return req; } @@ -1444,12 +1444,12 @@ ConstructGASActionFrame( ) { pu1Byte buf = NULL; - + if(NULL == (buf = FrameBuf_Add(frame, 24))) { return; } - + SET_80211_HDR_FRAME_CONTROL(buf, 0); SET_80211_HDR_TYPE_AND_SUBTYPE(buf, Type_Action); SET_80211_HDR_DURATION(buf, 0); @@ -1488,12 +1488,12 @@ WDI_SendAction_Req( //LE can further tune this value later. RT_TRACE(COMP_OID_SET, DBG_TRACE, ("WDI_SendAction_Req force set timeout=1000ms\n")); param->RequestParams.SendTimeout = 1000; - + // prepare off chnl tx req // Note: Use wdi_SendAction_PrepareReqEx to make PostACKDwellTime from UE take effect - if(NULL == (req = wdi_SendAction_PrepareReqEx(pAdapter, - (const u1Byte *)param->RequestParams.DestinationAddress.Address, - (u1Byte)param->RequestParams.ChannelNumber, + if(NULL == (req = wdi_SendAction_PrepareReqEx(pAdapter, + (const u1Byte *)param->RequestParams.DestinationAddress.Address, + (u1Byte)param->RequestParams.ChannelNumber, param->RequestParams.SendTimeout, param->RequestParams.PostACKDwellTime))) { @@ -1501,7 +1501,7 @@ WDI_SendAction_Req( return NULL; } - RT_TRACE(COMP_OID_SET, DBG_TRACE, ("WDI_SendAction_Req prepare OK! Chan:%d PostACKDwellTime:%d DA:%x-%x-%x-%x-%x-%x\n", + RT_TRACE(COMP_OID_SET, DBG_TRACE, ("WDI_SendAction_Req prepare OK! Chan:%d PostACKDwellTime:%d DA:%x-%x-%x-%x-%x-%x\n", param->RequestParams.ChannelNumber, param->RequestParams.PostACKDwellTime, param->RequestParams.DestinationAddress.Address[0], @@ -1510,20 +1510,20 @@ WDI_SendAction_Req( param->RequestParams.DestinationAddress.Address[3], param->RequestParams.DestinationAddress.Address[4], param->RequestParams.DestinationAddress.Address[5])); - + ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); // TODO: double check request/response type parameter - wdi_SendAction_InitCtx(ctx, - 0,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, - 1,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, - pAdapter, - (const u1Byte *)param->RequestParams.DestinationAddress.Address, + wdi_SendAction_InitCtx(ctx, + 0,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, + 1,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, + pAdapter, + (const u1Byte *)param->RequestParams.DestinationAddress.Address, FALSE, - 0,//param->RequestParams.DialogToken, + 0,//param->RequestParams.DialogToken, 0, - param->RequestParams.SendTimeout, - req, + param->RequestParams.SendTimeout, + req, ANQP_EVENT_REQUEST_SEND_COMPLETE//P2P_EVENT_GO_NEGOTIATION_REQUEST_SEND_COMPLETE ); @@ -1536,11 +1536,11 @@ WDI_SendAction_Req( frame->os.Length += (u2Byte)param->ActionFrameBody.ElementCount; DbgPrintEx(0, 0, "\nDump header of GAS Request Frame:\n"); - DbgPrintEx(0, 0, "0-7 0x%x-%x-%x-%x-%x-%x-%x-%x\n", - frame->os.Octet[0], - frame->os.Octet[1], - frame->os.Octet[2], - frame->os.Octet[3], + DbgPrintEx(0, 0, "0-7 0x%x-%x-%x-%x-%x-%x-%x-%x\n", + frame->os.Octet[0], + frame->os.Octet[1], + frame->os.Octet[2], + frame->os.Octet[3], frame->os.Octet[4], frame->os.Octet[5], frame->os.Octet[6], @@ -1573,9 +1573,9 @@ WDI_SendAction_Req( param->ActionFrameBody.pElements[5], param->ActionFrameBody.pElements[6], param->ActionFrameBody.pElements[7]); - + wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-action-frame-req"); - + return req; } @@ -1591,9 +1591,9 @@ WDI_SendAction_Rsp( WDI_SEND_ACTION_CTX *ctx = NULL; FRAME_BUF *frame = NULL; - if(NULL == (req = wdi_SendAction_PrepareReqEx(pAdapter, - (const u1Byte *)param->ResponseParams.DestinationAddress.Address, - (u1Byte)param->ResponseParams.ChannelNumber, + if(NULL == (req = wdi_SendAction_PrepareReqEx(pAdapter, + (const u1Byte *)param->ResponseParams.DestinationAddress.Address, + (u1Byte)param->ResponseParams.ChannelNumber, param->ResponseParams.SendTimeout, param->ResponseParams.PostACKDwellTime))) { @@ -1604,13 +1604,13 @@ WDI_SendAction_Rsp( ctx = (WDI_SEND_ACTION_CTX *)OffChnlTx_GetCliRsvdBuf(req); OffChnlTx_SetupCbCtx(req, stateCb, ctx); // TODO: double check request/response type parameter - wdi_SendAction_InitCtx(ctx, - 0,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, - 1,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, - pAdapter, - (const u1Byte *)param->ResponseParams.DestinationAddress.Address, + wdi_SendAction_InitCtx(ctx, + 0,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_REQUEST, + 1,//WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE, + pAdapter, + (const u1Byte *)param->ResponseParams.DestinationAddress.Address, FALSE, - 0,//param->RequestParams.DialogToken, + 0,//param->RequestParams.DialogToken, 0, param->ResponseParams.SendTimeout, req, @@ -1626,7 +1626,7 @@ WDI_SendAction_Rsp( frame->os.Length += (u2Byte)param->ActionFrameBody.ElementCount; wdi_SendAction_IssueReq(pAdapter, req, "wdi-send-action-frame-rsp"); - + return req; } diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.h b/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.h index 109bba617..5de30c0fa 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_SendAction.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: WDI_SendAction.h -// Description: +// Description: // // Author: haich // diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.c b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.c index c31391427..c898d70b6 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.c @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: WDI_Xlat.c -// Description: +// Description: // // Author: haich // @@ -23,7 +23,7 @@ wdi_xlat_Zalloc( IN UINT len ) { - // Note: Attempt to allocate pool with a tag that does not contain any + // Note: Attempt to allocate pool with a tag that does not contain any // letters or digits would irritate driver verifier. // The use of 'XLAT' is called multicharacter constant. if(NDIS_STATUS_SUCCESS == NdisAllocateMemoryWithTag(pp, len, 'XLAT')) @@ -54,7 +54,7 @@ wdi_xlat_ParamConstructor( ) { WDI_TASK_PARAM *param = (WDI_TASK_PARAM *)(buf + allocSize - sizeof(WDI_TASK_PARAM)); - + param->hTask = hTask; param->allocSize = allocSize; @@ -147,7 +147,7 @@ wdi_xlat_P2PScanType( RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("unknown WDI P2P scan type: %u, use passive instead\n", wdiType)); *type = dot11_wfd_scan_type_passive; } - + return; } @@ -226,7 +226,7 @@ Wdi_Xlat_FreeOid( ) { WDI_TASK_PARAM *param = (WDI_TASK_PARAM *)WDI_XLAT_GET_OID_MP_RSVD_0(req); - + wdi_xlat_Free(req, param->allocSize); return; @@ -389,7 +389,7 @@ Wdi_Xlat_AllocResetOid( ; DOT11_RESET_REQUEST *resetReq = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -429,8 +429,8 @@ Wdi_Xlat_AllocChangeOpModeOid( ; DOT11_CURRENT_OPERATION_MODE *opMode = NULL; - - + + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -447,9 +447,9 @@ Wdi_Xlat_AllocChangeOpModeOid( // Prep op mode wdi_xlat_OperationMode( - param->OperationMode, + param->OperationMode, (DOT11_CURRENT_OPERATION_MODE *)req->DATA.SET_INFORMATION.InformationBuffer); - + return req; } @@ -467,9 +467,9 @@ Wdi_Xlat_AllocWfdDiscoverOid( + param->VendorIEs.ElementCount // vendor IE + sizeof(WDI_TASK_PARAM) ; - + DOT11_WFD_DISCOVER_REQUEST *discReq = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -486,11 +486,11 @@ Wdi_Xlat_AllocWfdDiscoverOid( // Prep reset req, ignore resetReq->dot11MacAddress here discReq = (DOT11_WFD_DISCOVER_REQUEST *)req->DATA.SET_INFORMATION.InformationBuffer; - { + { // discover type wdi_xlat_P2PDiscoverType( - param->DiscoverMode.DiscoveryType, - (0 != param->DiscoverMode.ForcedDiscovery), + param->DiscoverMode.DiscoveryType, + (0 != param->DiscoverMode.ForcedDiscovery), &discReq->DiscoverType); // scan type @@ -512,10 +512,11 @@ Wdi_Xlat_AllocWfdDiscoverOid( discReq->uIEsLength = param->VendorIEs.ElementCount; discReq->uIEsOffset = sizeof(*discReq); NdisMoveMemory( - (u1Byte *)discReq + discReq->uIEsOffset, + (u1Byte *)discReq + discReq->uIEsOffset, param->VendorIEs.pElements, param->VendorIEs.ElementCount); } - } + + } return req; } @@ -536,7 +537,7 @@ Wdi_Xlat_AllocDevInfoOid( ; DOT11_WFD_DEVICE_INFO *devInfo = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -561,7 +562,7 @@ Wdi_Xlat_AllocDevInfoOid( devInfo->ConfigMethods = param->DeviceInfoParameters.ConfigurationMethods; devInfo->PrimaryDeviceType.CategoryID = param->DeviceInfoParameters.DeviceType.CategoryID; devInfo->PrimaryDeviceType.SubCategoryID = param->DeviceInfoParameters.DeviceType.SubcategoryID; - PlatformMoveMemory(devInfo->PrimaryDeviceType.OUI, + PlatformMoveMemory(devInfo->PrimaryDeviceType.OUI, param->DeviceInfoParameters.DeviceType.OUI, sizeof(param->DeviceInfoParameters.DeviceType.OUI)); @@ -589,7 +590,7 @@ Wdi_Xlat_AllocDevCapOid( ; DOT11_WFD_DEVICE_CAPABILITY_CONFIG *devCap = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -617,7 +618,7 @@ Wdi_Xlat_AllocDevCapOid( devCap->bDeviceLimitReached = TEST_FLAG(param->DeviceCapabilityBitmap , dcP2PDeviceLimit); RT_TRACE_F(COMP_P2P, DBG_LOUD, ("[%s] devCap: %02X \n", "p2pattr", param->DeviceCapabilityBitmap )); - + devCap->bInvitationProcedureEnabled = TEST_FLAG(param->DeviceCapabilityBitmap , dcP2PInvitationProcedure); devCap->WPSVersionsEnabled = param->WPSVersionsEnabled; @@ -640,7 +641,7 @@ Wdi_Xlat_AllocGrpCapOid( ; DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG *grpCap = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -688,7 +689,7 @@ Wdi_Xlat_AllocSecDevTypeOid( ULONG it = 0; DOT11_WFD_SECONDARY_DEVICE_TYPE_LIST *secDevTypeList = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -716,7 +717,7 @@ Wdi_Xlat_AllocSecDevTypeOid( secDevTypeList->SecondaryDeviceTypes[it].CategoryID = param->pElements[it].CategoryID; secDevTypeList->SecondaryDeviceTypes[it].SubCategoryID = param->pElements[it].SubcategoryID; - PlatformMoveMemory(secDevTypeList->SecondaryDeviceTypes[it].OUI, + PlatformMoveMemory(secDevTypeList->SecondaryDeviceTypes[it].OUI, param->pElements[it].OUI, sizeof(param->pElements[it].OUI)); } @@ -741,7 +742,7 @@ Wdi_Xlat_AllocListenStateDiscoverabilityOid( ; ULONG *listenStateDiscoverability = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -780,7 +781,7 @@ Wdi_Xlat_AllocListenChannelOid( ) { WDI_MESSAGE_HEADER *wdiHdr = (WDI_MESSAGE_HEADER *)hTask->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer; - + u1Byte *buf = NULL; NDIS_OID_REQUEST *req = NULL; WDI_TASK_PARAM *taskParam = NULL; @@ -790,7 +791,7 @@ Wdi_Xlat_AllocListenChannelOid( ; DOT11_WFD_DEVICE_LISTEN_CHANNEL *listenChnl = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -823,7 +824,7 @@ Wdi_Xlat_AllocGetDialogTokenOid( ) { WDI_MESSAGE_HEADER *wdiHdr = (WDI_MESSAGE_HEADER *)hTask->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer; - + u1Byte *buf = NULL; NDIS_OID_REQUEST *req = NULL; WDI_TASK_PARAM *taskParam = NULL; @@ -831,7 +832,7 @@ Wdi_Xlat_AllocGetDialogTokenOid( + sizeof(UCHAR) // the output buffer + sizeof(WDI_TASK_PARAM) ; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -866,7 +867,7 @@ Wdi_Xlat_AllocSendGONegReqReqOid( ; DOT11_SEND_GO_NEGOTIATION_REQUEST_PARAMETERS *reqParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -903,7 +904,7 @@ Wdi_Xlat_AllocSendGONegReqReqOid( reqParam->GroupCapability = param->GONegotiationRequestInfo.RequestParams.GroupCapability; } - + if(param->VendorIEs.ElementCount) { reqParam->uIEsLength = param->VendorIEs.ElementCount; @@ -931,7 +932,7 @@ Wdi_Xlat_AllocSendInvitationReqOid( ; DOT11_SEND_INVITATION_REQUEST_PARAMETERS *reqParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -972,18 +973,18 @@ Wdi_Xlat_AllocSendInvitationReqOid( reqParam->bUseSpecifiedOperatingChannel = TRUE; reqParam->OperatingChannel.ChannelNumber = (UCHAR)param->InvitationRequestInfo.OperatingChannel.ChannelNumber; reqParam->OperatingChannel.OperatingClass = param->InvitationRequestInfo.OperatingChannel.OperatingClass; - PlatformMoveMemory(reqParam->OperatingChannel.CountryRegionString, + PlatformMoveMemory(reqParam->OperatingChannel.CountryRegionString, param->InvitationRequestInfo.OperatingChannel.CountryOrRegionString, sizeof(param->InvitationRequestInfo.OperatingChannel.CountryOrRegionString)); } cpMacAddr(reqParam->GroupID.DeviceAddress, param->InvitationRequestInfo.GroupID.DeviceAddress.Address); reqParam->GroupID.SSID.uSSIDLength = param->InvitationRequestInfo.GroupID.GroupSSID.ElementCount; - PlatformMoveMemory(reqParam->GroupID.SSID.ucSSID, - param->InvitationRequestInfo.GroupID.GroupSSID.pElements, + PlatformMoveMemory(reqParam->GroupID.SSID.ucSSID, + param->InvitationRequestInfo.GroupID.GroupSSID.pElements, param->InvitationRequestInfo.GroupID.GroupSSID.ElementCount); reqParam->bLocalGO = param->InvitationRequestInfo.RequestParams.IsLocalGO; } - + if(param->VendorIEs.ElementCount) { reqParam->uIEsLength = param->VendorIEs.ElementCount; @@ -1011,7 +1012,7 @@ Wdi_Xlat_AllocSendPDReqOid( ; DOT11_SEND_PROVISION_DISCOVERY_REQUEST_PARAMETERS *reqParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -1039,13 +1040,13 @@ Wdi_Xlat_AllocSendPDReqOid( if(param->Optional.ProvisionDiscoveryRequestInfo_IsPresent) { reqParam->GroupCapability = param->ProvisionDiscoveryRequestInfo.RequestParams.GroupCapability; - + if(param->ProvisionDiscoveryRequestInfo.Optional.GroupID_IsPresent) { cpMacAddr(reqParam->GroupID.DeviceAddress, param->ProvisionDiscoveryRequestInfo.GroupID.DeviceAddress.Address); reqParam->GroupID.SSID.uSSIDLength = param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.ElementCount; - PlatformMoveMemory(reqParam->GroupID.SSID.ucSSID, - param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.pElements, + PlatformMoveMemory(reqParam->GroupID.SSID.ucSSID, + param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.pElements, param->ProvisionDiscoveryRequestInfo.GroupID.GroupSSID.ElementCount); reqParam->bUseGroupID = TRUE; } @@ -1093,7 +1094,7 @@ Wdi_Xlat_AllocSendGONegResponseOid( ; DOT11_SEND_GO_NEGOTIATION_RESPONSE_PARAMETERS *rspParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -1132,8 +1133,8 @@ Wdi_Xlat_AllocSendGONegResponseOid( { cpMacAddr(rspParam->GroupID.DeviceAddress, param->GONegotiationResponseInfo.GroupID.DeviceAddress.Address); rspParam->GroupID.SSID.uSSIDLength = param->GONegotiationResponseInfo.GroupID.GroupSSID.ElementCount; - PlatformMoveMemory(rspParam->GroupID.SSID.ucSSID, - param->GONegotiationResponseInfo.GroupID.GroupSSID.pElements, + PlatformMoveMemory(rspParam->GroupID.SSID.ucSSID, + param->GONegotiationResponseInfo.GroupID.GroupSSID.pElements, param->GONegotiationResponseInfo.GroupID.GroupSSID.ElementCount); rspParam->bUseGroupID = TRUE; } @@ -1167,7 +1168,7 @@ Wdi_Xlat_AllocSendGONegConfirmOid( ; DOT11_SEND_GO_NEGOTIATION_CONFIRMATION_PARAMETERS *rspParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -1201,8 +1202,8 @@ Wdi_Xlat_AllocSendGONegConfirmOid( { cpMacAddr(rspParam->GroupID.DeviceAddress, param->GONegotiationConfirmationInfo.GroupID.DeviceAddress.Address); rspParam->GroupID.SSID.uSSIDLength = param->GONegotiationConfirmationInfo.GroupID.GroupSSID.ElementCount; - PlatformMoveMemory(rspParam->GroupID.SSID.ucSSID, - param->GONegotiationConfirmationInfo.GroupID.GroupSSID.pElements, + PlatformMoveMemory(rspParam->GroupID.SSID.ucSSID, + param->GONegotiationConfirmationInfo.GroupID.GroupSSID.pElements, param->GONegotiationConfirmationInfo.GroupID.GroupSSID.ElementCount); rspParam->bUseGroupID = TRUE; } @@ -1235,7 +1236,7 @@ Wdi_Xlat_AllocSendInvitationRspOid( ; DOT11_SEND_INVITATION_RESPONSE_PARAMETERS *rspParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -1265,7 +1266,7 @@ Wdi_Xlat_AllocSendInvitationRspOid( rspParam->Status = param->InvitationResponseInfo.ResponseParams.StatusCode; rspParam->MinimumConfigTimeout.ClientTimeout = (UCHAR)param->InvitationResponseInfo.ResponseParams.ClientConfigTimeout; rspParam->MinimumConfigTimeout.GOTimeout = (UCHAR)param->InvitationResponseInfo.ResponseParams.GOConfigTimeout; - + if(param->InvitationResponseInfo.Optional.GroupBSSID_IsPresent) { cpMacAddr(rspParam->GroupBSSID, param->InvitationResponseInfo.GroupBSSID.Address); @@ -1277,12 +1278,12 @@ Wdi_Xlat_AllocSendInvitationRspOid( rspParam->bUseSpecifiedOperatingChannel = TRUE; rspParam->OperatingChannel.ChannelNumber = (UCHAR)param->InvitationResponseInfo.OperatingChannel.ChannelNumber; rspParam->OperatingChannel.OperatingClass = param->InvitationResponseInfo.OperatingChannel.OperatingClass; - PlatformMoveMemory(rspParam->OperatingChannel.CountryRegionString, + PlatformMoveMemory(rspParam->OperatingChannel.CountryRegionString, param->InvitationResponseInfo.OperatingChannel.CountryOrRegionString, sizeof(param->InvitationResponseInfo.OperatingChannel.CountryOrRegionString)); } } - + if(param->VendorIEs.ElementCount) { rspParam->uIEsLength = param->VendorIEs.ElementCount; @@ -1311,7 +1312,7 @@ Wdi_Xlat_AllocSendPDRspOid( ; DOT11_SEND_PROVISION_DISCOVERY_RESPONSE_PARAMETERS *rspParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -1337,7 +1338,7 @@ Wdi_Xlat_AllocSendPDRspOid( rspParam->DialogToken = param->ResponseParams.DialogToken; rspParam->RequestContext = NULL; rspParam->uSendTimeout = param->ResponseParams.SendTimeout; - + if(param->VendorIEs.ElementCount) { rspParam->uIEsLength = param->VendorIEs.ElementCount; @@ -1365,7 +1366,7 @@ Wdi_Xlat_AllocIncomingAssociationDecisionOid( ; DOT11_INCOMING_ASSOC_DECISION_V2 *xlatdParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; @@ -1420,7 +1421,7 @@ Wdi_Xlat_AllocWpsEnabledOid( // Ref N62C_SET_OID_DOT11_WPS_ENABLED BOOLEAN *xlatdParam = NULL; - + if(!wdi_xlat_Zalloc(&buf, allocSize)) return NULL; diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.h b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.h index de26d16ba..287d1f2b2 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Xlat.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // // File name: WDI_Xlat.h -// Description: +// Description: // // Author: haich // diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_def.h b/network/wlan/WDI/PLATFORM/NDIS6/WDI_def.h index 53973b199..a5c6a1513 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_def.h +++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_def.h @@ -97,7 +97,7 @@ typedef struct __RT_TLV_PARSER { // dbg info size_t nonCleanedup; - + // buffer u1Byte *buf; size_t bufSize; @@ -110,7 +110,7 @@ typedef struct _RT_OID_HANDLER { // Associate which NdisRequest to process PNDIS_OID_REQUEST pNdisRequest; - + // For task command, NdisRequest is returned with NDIS_STATUS_SUCCESS // So copy the content of NdisRequest NDIS_OID_REQUEST PendedRequest; @@ -145,7 +145,7 @@ typedef struct _RT_OID_HANDLER // Parsed TLV structure RT_TLV_PARSER tlvParser; - + // Oid returned status NDIS_STATUS OidStatus; @@ -184,14 +184,14 @@ typedef struct __RT_TASK_ENTRY IN PADAPTER pAdapter, IN PVOID pContext ); - + }RT_TASK_ENTRY, *PRT_TASK_ENTRY; typedef struct __RT_PROPERTY_ENTRY { RT_COMMAND_ENTRY super; - + NDIS_STATUS (*Func)( // The command handler function IN PADAPTER pAdapter, IN PRT_OID_HANDLER pOidHandle diff --git a/network/wlan/WDI/PLATFORM/NDIS6/new.cpp b/network/wlan/WDI/PLATFORM/NDIS6/new.cpp index 7f6b201e2..15d89a664 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/new.cpp +++ b/network/wlan/WDI/PLATFORM/NDIS6/new.cpp @@ -45,7 +45,7 @@ void* __cdecl operator new( NT_ASSERT( AllocationContext == 0 ); return pData; -} +} void __cdecl operator delete( diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.c b/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.c index 8c5f90a25..dcc396b33 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.c +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.c @@ -22,12 +22,12 @@ NDIS_STATUS NdisStatusFromRtStatus( IN u4Byte rtStatus ) -{ +{ switch(rtStatus) { default: return NDIS_STATUS_FAILURE; - + case RT_STATUS_SUCCESS: return NDIS_STATUS_SUCCESS; @@ -106,11 +106,11 @@ _PlatformInitializeSpinLock( case RT_SCAN_SPINLOCK: NdisAllocateSpinLock( &(pDevice->ScanSpinLock) ); break; - + case RT_LOG_SPINLOCK: NdisAllocateSpinLock( &(pDevice->LogSpinLock) ); break; - + case RT_BW_SPINLOCK: NdisAllocateSpinLock( &(pDevice->BwSpinLock) ); break; @@ -126,19 +126,19 @@ _PlatformInitializeSpinLock( case RT_INITIAL_SPINLOCK: NdisAllocateSpinLock( &(pDevice->InitialSpinLock)); break; - + case RT_RF_STATE_SPINLOCK: NdisAllocateSpinLock( &(pDevice->RFStateSpinLock)); - break; + break; case RT_PORT_SPINLOCK: NdisAllocateSpinLock(&(pDevice->PortLock) ); break; - + case RT_H2C_SPINLOCK: NdisAllocateSpinLock( &(pDevice->H2CSpinLock)); break; - + #if VISTA_USB_RX_REVISE case RT_USBRX_CONTEXT_SPINLOCK: NdisAllocateSpinLock( &(pDevice->UsbRxContextLock) ); @@ -163,11 +163,11 @@ _PlatformInitializeSpinLock( case RT_GEN_TEMP_BUF_SPINLOCK: NdisAllocateSpinLock(&(pDevice->GenBufSpinLock)); break; - + case RT_AWB_SPINLOCK: NdisAllocateSpinLock(&(pDevice->AwbSpinLock)); break; - + case RT_FW_PS_SPINLOCK: NdisAllocateSpinLock(&(pDevice->FwPSSpinLock)); break; @@ -175,7 +175,7 @@ _PlatformInitializeSpinLock( case RT_HW_TIMER_SPIN_LOCK: NdisAllocateSpinLock(&(pDevice->HwTimerSpinLock)); break; - + case RT_P2P_SPIN_LOCK: NdisAllocateSpinLock(&(pDevice->P2PSpinLock)); break; @@ -203,25 +203,25 @@ _PlatformInitializeSpinLock( case RT_PENDED_OID_SPINLOCK: NdisAllocateSpinLock( &(pDevice->PendedOidSpinLock)); break; - + case RT_INDIC_SPINLOCK: NdisAllocateSpinLock(&(pDevice->IndicSpinLock)); break; - + case RT_RFD_SPINLOCK: NdisAllocateSpinLock(&(pDevice->RfdSpinLock)); break; - + #if DRV_LOG_REGISTRY case RT_DRV_STATE_SPINLOCK: NdisAllocateSpinLock(&(pDevice->DrvStateSpinLock)); break; #endif -#if (AUTO_CHNL_SEL_NHM == 1) +#if (AUTO_CHNL_SEL_NHM == 1) case RT_ACS_SPINLOCK: NdisAllocateSpinLock(&(pDevice->AcsSpinLock)); - break; + break; #endif case RT_RX_REF_CNT_SPINLOCK: @@ -297,10 +297,10 @@ _PlatformFreeSpinLock( case RT_INITIAL_SPINLOCK: NdisFreeSpinLock( &(pDevice->InitialSpinLock)); break; - + case RT_RF_STATE_SPINLOCK: NdisFreeSpinLock( &(pDevice->RFStateSpinLock)); - break; + break; case RT_PORT_SPINLOCK: @@ -331,7 +331,7 @@ _PlatformFreeSpinLock( case RT_BUFFER_SPINLOCK: NdisFreeSpinLock( &(pDevice->BufferSpinLock) ); break; - + case RT_AWB_SPINLOCK: NdisFreeSpinLock(&(pDevice->AwbSpinLock)); break; @@ -366,31 +366,31 @@ _PlatformFreeSpinLock( case RT_CHNLLIST_SPINLOCK: NdisFreeSpinLock(&(pDevice->ChnlListSpinLock)); - break; - + break; + case RT_PENDED_OID_SPINLOCK: NdisFreeSpinLock( &(pDevice->PendedOidSpinLock)); break; case RT_RFD_SPINLOCK: NdisFreeSpinLock(&(pDevice->RfdSpinLock)); break; - + case RT_INDIC_SPINLOCK: NdisFreeSpinLock(&(pDevice->IndicSpinLock)); - break; + break; #if DRV_LOG_REGISTRY case RT_DRV_STATE_SPINLOCK: NdisFreeSpinLock(&(pDevice->DrvStateSpinLock)); break; -#endif - -#if (AUTO_CHNL_SEL_NHM == 1) +#endif + +#if (AUTO_CHNL_SEL_NHM == 1) case RT_ACS_SPINLOCK: NdisFreeSpinLock(&(pDevice->AcsSpinLock)); break; #endif - + case RT_RX_REF_CNT_SPINLOCK: NdisFreeSpinLock(&(pDevice->RxRefCntSpinLock)); break; @@ -398,7 +398,7 @@ case RT_RX_REF_CNT_SPINLOCK: case RT_SYNC_IO_CNT_SPINLOCK: NdisFreeSpinLock( &(pDevice->SyncIoCntSpinLock)); break; - + default: break; } @@ -466,20 +466,20 @@ _PlatformAcquireSpinLock( case RT_INITIAL_SPINLOCK: NdisAcquireSpinLock( &(pDevice->InitialSpinLock)); break; - + case RT_RF_STATE_SPINLOCK: NdisAcquireSpinLock( &(pDevice->RFStateSpinLock)); - break; + break; + - case RT_PORT_SPINLOCK: NdisAcquireSpinLock(&(pDevice->PortLock) ); break; case RT_H2C_SPINLOCK: NdisAcquireSpinLock(&(pDevice->H2CSpinLock) ); - break; - + break; + #if VISTA_USB_RX_REVISE case RT_USBRX_CONTEXT_SPINLOCK: NdisAcquireSpinLock(&(pDevice->UsbRxContextLock) ); @@ -507,8 +507,8 @@ _PlatformAcquireSpinLock( case RT_AWB_SPINLOCK: NdisAcquireSpinLock(&(pDevice->AwbSpinLock)); - break; - + break; + case RT_FW_PS_SPINLOCK: NdisAcquireSpinLock(&(pDevice->FwPSSpinLock)); break; @@ -524,11 +524,11 @@ _PlatformAcquireSpinLock( case RT_MPT_WI_SPINLOCK: NdisAcquireSpinLock(&(pDevice->MptWorkItemSpinLock)); break; - + case RT_DBG_SPIN_LOCK: NdisAcquireSpinLock(&(pDevice->ndisDbgWorkItemSpinLock)); break; - + case RT_IQK_SPINLOCK: NdisAcquireSpinLock(&(pDevice->IQKSpinLock)); break; @@ -544,7 +544,7 @@ _PlatformAcquireSpinLock( case RT_PENDED_OID_SPINLOCK: NdisAcquireSpinLock( &(pDevice->PendedOidSpinLock)); break; - + case RT_INDIC_SPINLOCK: NdisAcquireSpinLock(&(pDevice->IndicSpinLock)); break; @@ -556,15 +556,15 @@ _PlatformAcquireSpinLock( #if DRV_LOG_REGISTRY case RT_DRV_STATE_SPINLOCK: NdisAcquireSpinLock(&(pDevice->DrvStateSpinLock)); - break; + break; #endif - -#if (AUTO_CHNL_SEL_NHM == 1) + +#if (AUTO_CHNL_SEL_NHM == 1) case RT_ACS_SPINLOCK: NdisAcquireSpinLock(&(pDevice->AcsSpinLock)); break; #endif - + case RT_RX_REF_CNT_SPINLOCK: NdisAcquireSpinLock(&(pDevice->RxRefCntSpinLock)); break; @@ -577,7 +577,7 @@ _PlatformAcquireSpinLock( case RT_CUSTOM_SCAN_SPINLOCK: NdisAcquireSpinLock(&(pDevice->CustomScanSpinLock)); break; - + default: break; } @@ -597,7 +597,7 @@ _PlatformReleaseSpinLock( switch(type) { case RT_RX_SPINLOCK: - pDefaultAdapter->bRxLocked = FALSE; + pDefaultAdapter->bRxLocked = FALSE; NdisReleaseSpinLock( &(pDevice->RxSpinLock) ); break; @@ -610,7 +610,7 @@ _PlatformReleaseSpinLock( break; case RT_TX_SPINLOCK: - pDefaultAdapter->bTxLocked = FALSE; + pDefaultAdapter->bTxLocked = FALSE; NdisReleaseSpinLock( &(pDevice->TxSpinLock) ); break; @@ -645,7 +645,7 @@ _PlatformReleaseSpinLock( case RT_INITIAL_SPINLOCK: NdisReleaseSpinLock( &(pDevice->InitialSpinLock)); break; - + case RT_RF_STATE_SPINLOCK: NdisReleaseSpinLock( &(pDevice->RFStateSpinLock)); break; @@ -658,7 +658,7 @@ _PlatformReleaseSpinLock( case RT_H2C_SPINLOCK: NdisReleaseSpinLock( &(pDevice->H2CSpinLock)); break; - + #if VISTA_USB_RX_REVISE case RT_USBRX_CONTEXT_SPINLOCK: NdisReleaseSpinLock( &(pDevice->UsbRxContextLock) ); @@ -686,7 +686,7 @@ _PlatformReleaseSpinLock( case RT_AWB_SPINLOCK: NdisReleaseSpinLock(&(pDevice->AwbSpinLock)); - break; + break; case RT_FW_PS_SPINLOCK: NdisReleaseSpinLock(&(pDevice->FwPSSpinLock)); @@ -703,11 +703,11 @@ _PlatformReleaseSpinLock( case RT_MPT_WI_SPINLOCK: NdisReleaseSpinLock(&(pDevice->MptWorkItemSpinLock)); break; - + case RT_DBG_SPIN_LOCK: NdisReleaseSpinLock(&(pDevice->ndisDbgWorkItemSpinLock)); break; - + case RT_IQK_SPINLOCK: NdisReleaseSpinLock(&(pDevice->IQKSpinLock)); break; @@ -727,7 +727,7 @@ _PlatformReleaseSpinLock( case RT_RFD_SPINLOCK: NdisReleaseSpinLock(&(pDevice->RfdSpinLock)); break; - + case RT_INDIC_SPINLOCK: NdisReleaseSpinLock(&(pDevice->IndicSpinLock)); break; @@ -737,13 +737,13 @@ _PlatformReleaseSpinLock( NdisReleaseSpinLock(&(pDevice->DrvStateSpinLock)); break; #endif - -#if (AUTO_CHNL_SEL_NHM == 1) + +#if (AUTO_CHNL_SEL_NHM == 1) case RT_ACS_SPINLOCK: NdisReleaseSpinLock(&(pDevice->AcsSpinLock)); break; #endif - + case RT_RX_REF_CNT_SPINLOCK: NdisReleaseSpinLock(&(pDevice->RxRefCntSpinLock)); break; @@ -756,7 +756,7 @@ _PlatformReleaseSpinLock( case RT_CUSTOM_SCAN_SPINLOCK: NdisReleaseSpinLock(&(pDevice->CustomScanSpinLock)); break; - + default: break; } @@ -827,12 +827,12 @@ PlatformAcquireMutex( { LARGE_INTEGER lTimeout; - if (KeGetCurrentIrql() == DISPATCH_LEVEL) + if (KeGetCurrentIrql() == DISPATCH_LEVEL) { lTimeout.QuadPart = 0; KeWaitForMutexObject(Mutex, Executive, KernelMode, FALSE, &lTimeout); } - else + else KeWaitForMutexObject(Mutex, Executive, KernelMode, FALSE, NULL); } @@ -910,16 +910,16 @@ Ndis6EventTrigerThreadCallback( return; NdisAcquireSpinLock(&(pPlatformExt->Lock)); - + if(pRtThread->Status & RT_THREAD_STATUS_CANCEL) { RT_TRACE(COMP_INIT, DBG_LOUD, ("Ndis6EventTrigerThreadCallback CANCEL! \n")); - NdisReleaseSpinLock(&(pPlatformExt->Lock)); + NdisReleaseSpinLock(&(pPlatformExt->Lock)); goto Exit; } pRtThread->Status |=RT_THREAD_STATUS_FIRED; - NdisReleaseSpinLock(&(pPlatformExt->Lock)); + NdisReleaseSpinLock(&(pPlatformExt->Lock)); while(!RT_DRIVER_STOP(Adapter)) { @@ -931,11 +931,11 @@ Ndis6EventTrigerThreadCallback( } else NdisReleaseSpinLock(&(pPlatformExt->Lock)); - + if(NdisWaitEvent(&pPlatformExt->TrigerEvent, pPlatformExt->Period)) { NdisAcquireSpinLock(&(pPlatformExt->Lock)); - + NdisResetEvent(&(pPlatformExt->TrigerEvent)); if(pRtThread->Status & RT_THREAD_STATUS_CANCEL) @@ -947,20 +947,20 @@ Ndis6EventTrigerThreadCallback( NdisReleaseSpinLock(&(pPlatformExt->Lock)); pRtThread->CallbackFunc(pRtThread); - + NdisAcquireSpinLock(&(pPlatformExt->Lock)); pRtThread->ScheduleCnt++; NdisReleaseSpinLock(&(pPlatformExt->Lock)); } } - + Exit: if(pRtThread->PreTheradExitCb != NULL) - { - pRtThread->PreTheradExitCb(pRtThread); + { + pRtThread->PreTheradExitCb(pRtThread); } - + NdisAcquireSpinLock(&(pPlatformExt->Lock)); pRtThread->RefCnt--; pRtThread->Status &= ~RT_THREAD_STATUS_FIRED; @@ -971,12 +971,12 @@ Ndis6EventTrigerThreadCallback( if(Adapter->bSWInitReady) { NdisAcquireSpinLock(&(pNdisCommon->ThreadLock)); - + pNdisCommon->OutStandingThreadCnt--; // // Check if driver is waiting us to unload. - // + // if(pNdisCommon->OutStandingThreadCnt == 0) { NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); @@ -985,7 +985,7 @@ Ndis6EventTrigerThreadCallback( else { NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); - } + } } PsTerminateSystemThread(STATUS_SUCCESS);// terminate the thread. @@ -1006,40 +1006,40 @@ Ndis6ThreadCallback( return; NdisAcquireSpinLock(&(pPlatformExt->Lock)); - + if(pRtThread->Status & RT_THREAD_STATUS_CANCEL) { - NdisReleaseSpinLock(&(pPlatformExt->Lock)); + NdisReleaseSpinLock(&(pPlatformExt->Lock)); goto Exit; } pRtThread->Status |=RT_THREAD_STATUS_FIRED; - NdisReleaseSpinLock(&(pPlatformExt->Lock)); + NdisReleaseSpinLock(&(pPlatformExt->Lock)); if(!RT_DRIVER_STOP(Adapter)) { - + pRtThread->CallbackFunc(pRtThread); - + NdisAcquireSpinLock(&(pPlatformExt->Lock)); pRtThread->ScheduleCnt++; NdisReleaseSpinLock(&(pPlatformExt->Lock)); } - -Exit: + +Exit: NdisAcquireSpinLock(&(pPlatformExt->Lock)); pRtThread->RefCnt--; pRtThread->Status &= ~RT_THREAD_STATUS_FIRED; pRtThread->Status &= ~RT_THREAD_STATUS_SET; NdisSetEvent(&(pPlatformExt->CompleteEvent)); - NdisReleaseSpinLock(&(pPlatformExt->Lock)); + NdisReleaseSpinLock(&(pPlatformExt->Lock)); NdisAcquireSpinLock(&(pNdisCommon->ThreadLock)); pNdisCommon->OutStandingThreadCnt--; // // Check if driver is waiting us to unload. - // + // if(pNdisCommon->OutStandingThreadCnt == 0) { NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); @@ -1048,7 +1048,7 @@ Ndis6ThreadCallback( else { NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); - } + } PsTerminateSystemThread(STATUS_SUCCESS);// terminate the thread. } @@ -1057,7 +1057,7 @@ RT_STATUS PlatformInitializeThread( IN PADAPTER Adapter, IN PRT_THREAD pRtThread, - IN RT_THREAD_CALL_BACK CallBackFunc, + IN RT_THREAD_CALL_BACK CallBackFunc, IN const char* szID, IN BOOLEAN EventTriger, IN u4Byte Period, @@ -1084,11 +1084,11 @@ PlatformInitializeThread( NdisInitializeEvent(&(pPlatformExt->CompleteEvent)); NdisSetEvent(&(pPlatformExt->CompleteEvent)); NdisInitializeEvent(&(pPlatformExt->TrigerEvent)); - + NdisSetEvent(&(pPlatformExt->TrigerEvent)); pPlatformExt->Period = Period; - + pRtThread->bEventTriger = EventTriger; pRtThread->Adapter= Adapter; pRtThread->Status = RT_THREAD_STATUS_INITIALIZED; @@ -1096,7 +1096,7 @@ PlatformInitializeThread( pRtThread->ScheduleCnt = 0; pRtThread->CallbackFunc = CallBackFunc; pRtThread->PreTheradExitCb = NULL; - + if(szID != NULL) { ASCII_STR_COPY(pRtThread->szID, szID, 36); @@ -1104,7 +1104,7 @@ PlatformInitializeThread( pRtThread->Argc = 0; pRtThread->pContext = pContext; - + return RT_STATUS_SUCCESS; } @@ -1112,7 +1112,7 @@ RT_STATUS PlatformInitializeThreadEx( IN PADAPTER Adapter, IN PRT_THREAD pRtThread, - IN RT_THREAD_CALL_BACK CallBackFunc, + IN RT_THREAD_CALL_BACK CallBackFunc, IN RT_THREAD_CALL_BACK PreThreadExitCb, IN const char* szID, IN BOOLEAN EventTriger, @@ -1121,14 +1121,14 @@ PlatformInitializeThreadEx( ) { RT_STATUS status = RT_STATUS_SUCCESS; - + status = PlatformInitializeThread(Adapter, pRtThread, CallBackFunc, szID, EventTriger, Period, pContext); if(RT_STATUS_SUCCESS == status) { pRtThread->PreTheradExitCb = PreThreadExitCb; } - + return status; } @@ -1145,7 +1145,7 @@ PlatformSetEventToTrigerThread( return; NdisAcquireSpinLock(&(pPlatformExt->Lock)); - + if(pRtThread->Status & RT_THREAD_STATUS_CANCEL) { NdisReleaseSpinLock(&(pPlatformExt->Lock)); @@ -1155,7 +1155,7 @@ PlatformSetEventToTrigerThread( NdisReleaseSpinLock(&(pPlatformExt->Lock)); return; - + } RT_STATUS @@ -1178,15 +1178,15 @@ PlatformSetEventTrigerThread( if(RT_DRIVER_HALT(Adapter)) { - RT_TRACE(COMP_SYSTEM, DBG_LOUD, + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("driver is halted pRtThread(%s) cannot schedule !!!\n", pRtThread->szID)); return RT_STATUS_FAILURE; } - + NdisAcquireSpinLock(&(pPlatformExt->Lock)); if(pRtThread->Status & RT_THREAD_STATUS_RELEASED) { - RT_TRACE(COMP_SYSTEM, DBG_WARNING, + RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("pRtThread(%s) is alreadyreleased!!!\n", pRtThread->szID)); NdisReleaseSpinLock(&(pPlatformExt->Lock)); return RT_STATUS_FAILURE; @@ -1204,24 +1204,24 @@ PlatformSetEventTrigerThread( if(!NdisWaitEvent(&(pPlatformExt->CompleteEvent),2000)) { - RT_TRACE(COMP_SYSTEM, DBG_LOUD, + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("pRtThread(%s) is not Complete, cannot set again!!!\n", pRtThread->szID)); return RT_STATUS_FAILURE; } - NdisAcquireSpinLock(&(pPlatformExt->Lock)); + NdisAcquireSpinLock(&(pPlatformExt->Lock)); NdisResetEvent(&(pPlatformExt->CompleteEvent)); NdisReleaseSpinLock(&(pPlatformExt->Lock)); - + do { - InitializeObjectAttributes(&ObjectAttribs, + InitializeObjectAttributes(&ObjectAttribs, NULL, // ObjectName - OBJ_KERNEL_HANDLE, - NULL, // RootDir + OBJ_KERNEL_HANDLE, + NULL, // RootDir NULL); // Security Desc NdisAcquireSpinLock(&(pPlatformExt->Lock)); @@ -1241,7 +1241,7 @@ PlatformSetEventTrigerThread( NULL, // ClientId Ndis6EventTrigerThreadCallback, pRtThread); - + if (!NT_SUCCESS(Status)) { RT_TRACE(COMP_INIT, DBG_SERIOUS, ("Worker Thread creation failed with 0x%lx\n", Status)); @@ -1257,7 +1257,7 @@ PlatformSetEventTrigerThread( if(pNdisCommon->OutStandingThreadCnt == 0) NdisSetEvent(&(pNdisCommon->AllThreadCompletedEvent)); - + NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); } @@ -1265,7 +1265,7 @@ PlatformSetEventTrigerThread( NdisSetEvent(&(pPlatformExt->CompleteEvent)); NdisReleaseSpinLock(&(pPlatformExt->Lock)); - + break; } @@ -1275,7 +1275,7 @@ PlatformSetEventTrigerThread( KernelMode, &pPlatformExt->Thread, NULL); - //Need to check status return; + //Need to check status return; if (Priority != 0) { @@ -1310,11 +1310,11 @@ PlatformRunThread( if(RT_DRIVER_HALT(Adapter)) { - RT_TRACE(COMP_SYSTEM, DBG_LOUD, + RT_TRACE(COMP_SYSTEM, DBG_LOUD, ("driver is halted pRtThread(%s) cannot schedule !!!\n", pRtThread->szID)); return RT_STATUS_FAILURE; } - + NdisAcquireSpinLock(&(pPlatformExt->Lock)); if(pRtThread->Status & RT_THREAD_STATUS_RELEASED) @@ -1335,7 +1335,7 @@ PlatformRunThread( if(!NdisWaitEvent(&(pPlatformExt->CompleteEvent),2000)) { - RT_TRACE(COMP_SYSTEM, DBG_WARNING, + RT_TRACE(COMP_SYSTEM, DBG_WARNING, ("pRtThread(%s) is not Complete, cannot set again!!!\n", pRtThread->szID)); return RT_STATUS_FAILURE; } @@ -1345,15 +1345,15 @@ PlatformRunThread( NdisResetEvent(&(pPlatformExt->CompleteEvent)); NdisReleaseSpinLock(&(pPlatformExt->Lock)); - + do { - InitializeObjectAttributes(&ObjectAttribs, + InitializeObjectAttributes(&ObjectAttribs, NULL, // ObjectName - OBJ_KERNEL_HANDLE, - NULL, // RootDir + OBJ_KERNEL_HANDLE, + NULL, // RootDir NULL); // Security Desc - + NdisAcquireSpinLock(&(pPlatformExt->Lock)); pRtThread->RefCnt++; pRtThread->Status |= RT_THREAD_STATUS_SET; @@ -1384,13 +1384,13 @@ PlatformRunThread( if(pNdisCommon->OutStandingThreadCnt == 0) NdisSetEvent(&(pNdisCommon->AllThreadCompletedEvent)); - + NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); NdisAcquireSpinLock(&(pPlatformExt->Lock)); NdisSetEvent(&(pPlatformExt->CompleteEvent)); NdisReleaseSpinLock(&(pPlatformExt->Lock)); - + break; } @@ -1400,7 +1400,7 @@ PlatformRunThread( KernelMode, &pPlatformExt->Thread, NULL); - //Need to check status return; + //Need to check status return; if (Priority != 0) { @@ -1430,13 +1430,13 @@ PlatformCancelThread( NdisAcquireSpinLock(&(pPlatformExt->Lock)); - if(pRtThread->Status & RT_THREAD_STATUS_RELEASED || + if(pRtThread->Status & RT_THREAD_STATUS_RELEASED || (!(pRtThread->Status & RT_THREAD_STATUS_INITIALIZED))) { NdisReleaseSpinLock(&(pPlatformExt->Lock)); return; } - + if(pRtThread->Status & RT_THREAD_STATUS_FIRED) // already fired and not finish. waiting for the thread complete. { pRtThread->Status |= RT_THREAD_STATUS_CANCEL; @@ -1452,15 +1452,15 @@ PlatformCancelThread( NdisWaitEvent(&(pPlatformExt->CompleteEvent),0); } else - { + { NdisReleaseSpinLock(&(pPlatformExt->Lock)); // thread been canceled NdisAcquireSpinLock(&(pNdisCommon->ThreadLock)); - + if(pNdisCommon->OutStandingThreadCnt == 0) NdisSetEvent(&(pNdisCommon->AllThreadCompletedEvent)); - + NdisReleaseSpinLock(&(pNdisCommon->ThreadLock)); } } @@ -1479,12 +1479,12 @@ PlatformWaitThreadEnd( NdisAcquireSpinLock(&(pPlatformExt->Lock)); - if(pRtThread->Status & RT_THREAD_STATUS_RELEASED || + if(pRtThread->Status & RT_THREAD_STATUS_RELEASED || (!(pRtThread->Status & RT_THREAD_STATUS_INITIALIZED))) { NdisReleaseSpinLock(&(pPlatformExt->Lock)); return; - } + } if( !(pRtThread->Status & RT_THREAD_STATUS_SET) ) { @@ -1504,14 +1504,14 @@ PlatformReleaseThread( IN PADAPTER pAdapter, IN PRT_THREAD pRtThread) { - PRT_THREAD_PLATFORM_EXT pPlatformExt = (PRT_THREAD_PLATFORM_EXT)pRtThread->pPlatformExt; + PRT_THREAD_PLATFORM_EXT pPlatformExt = (PRT_THREAD_PLATFORM_EXT)pRtThread->pPlatformExt; if( pPlatformExt == NULL ) return ; NdisAcquireSpinLock(&(pPlatformExt->Lock)); - if(pRtThread->Status & RT_THREAD_STATUS_RELEASED || + if(pRtThread->Status & RT_THREAD_STATUS_RELEASED || (!(pRtThread->Status & RT_THREAD_STATUS_INITIALIZED))) { NdisReleaseSpinLock(&(pPlatformExt->Lock)); @@ -1521,18 +1521,18 @@ PlatformReleaseThread( pRtThread->Status |= RT_THREAD_STATUS_RELEASED; //Fix S3 BSOD, by YJ,120719 - pRtThread->pPlatformExt = NULL; - + pRtThread->pPlatformExt = NULL; + NdisReleaseSpinLock(&(pPlatformExt->Lock)); NdisFreeSpinLock(&(pPlatformExt->Lock)); // may have some issue? PlatformFreeMemory( pPlatformExt, sizeof(RT_THREAD_PLATFORM_EXT) ); - + } // // Description: -// This routine initializes a semaphore object with a specified count and +// This routine initializes a semaphore object with a specified count and // specifies an upper limit that the count can attain. // // Created by Roger, 2011.01.17. @@ -1545,14 +1545,14 @@ PlatformInitializeSemaphore( { // - // We create this semaphore with an initial count of zero to block access to the protected resource - // while the application is being initialized. After initialization, we can use ReleaseSemaphore to increment + // We create this semaphore with an initial count of zero to block access to the protected resource + // while the application is being initialized. After initialization, we can use ReleaseSemaphore to increment // the count to the maximum value. // KeInitializeSemaphore( - Sema, + Sema, InitCnt, // Count - SEMA_UPBND); // Limit + SEMA_UPBND); // Limit } @@ -1566,13 +1566,13 @@ RT_STATUS PlatformAcquireSemaphore( IN PPlatformSemaphore Sema ) -{ +{ RT_STATUS status = RT_STATUS_FAILURE; - + if( STATUS_SUCCESS == KeWaitForSingleObject(Sema, Executive, KernelMode, TRUE, NULL) ) - status = RT_STATUS_SUCCESS; + status = RT_STATUS_SUCCESS; - return status; + return status; } @@ -1589,9 +1589,9 @@ PlatformReleaseSemaphore( { if (Sema->Header.Type == 0) return; - + KeReleaseSemaphore( - Sema, + Sema, IO_NETWORK_INCREMENT, // Priority increment 1, // Adjustment, a value to be added FALSE ); // Will not be followed immediately by a call to one of the KeWaitXxx routines @@ -1599,7 +1599,7 @@ PlatformReleaseSemaphore( // // Description: -// This routine frees a semaphore object +// This routine frees a semaphore object // // Created by Roger, 2011.01.17. // @@ -1614,7 +1614,7 @@ PlatformFreeSemaphore( // // Description: -// This routine initializes a event object +// This routine initializes a event object // // Created by Cosa, 2012.01.09. // @@ -1703,15 +1703,15 @@ PlatformGetOverrideAddress( ) { PRT_NDIS_COMMON pNdisCommon = Adapter->pNdisCommon; - + return pNdisCommon->CurrentAddress; -} +} //=================================== -// If we are goting to stop vwifi support, then it will drop -// all connections connected with the vwifi and indicate +// If we are goting to stop vwifi support, then it will drop +// all connections connected with the vwifi and indicate // to OS that can't support anymore. Otherwise, when we -// need to support vwifi again, we need to +// need to support vwifi again, we need to // indicate to OS that we can sustain vwifi. //=================================== VOID @@ -1754,7 +1754,7 @@ Dot11_UpdateDefaultSetting( IN PADAPTER pAdapter ) { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_CHANNEL_INFO pChnlInfo = pMgntInfo->pChannelInfo; PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; EXTCHNL_OFFSET extchnl = EXTCHNL_OFFSET_NO_EXT; @@ -1763,9 +1763,9 @@ Dot11_UpdateDefaultSetting( CopySsid(pMgntInfo->Ssid.Octet, pMgntInfo->Ssid.Length, pNdisCommon->RegSSID.Octet, pNdisCommon->RegSSID.Length); // Default wireless mode. - pAdapter->RegOrigWirelessMode = (WIRELESS_MODE)(pNdisCommon->RegWirelessMode); + pAdapter->RegOrigWirelessMode = (WIRELESS_MODE)(pNdisCommon->RegWirelessMode); pAdapter->RegHTMode = (HT_MODE)(pNdisCommon->RegHTMode); - + if(pAdapter->RegHTMode == HT_MODE_UNDEFINED) { pAdapter->RegWirelessMode = pAdapter->RegOrigWirelessMode; @@ -1833,19 +1833,19 @@ Dot11_UpdateDefaultSetting( // Auto select channel. pMgntInfo->bAutoSelChnl = (BOOLEAN)pNdisCommon->RegAutoSelChnl; pMgntInfo->ChnlWeightMode = (u1Byte)pNdisCommon->RegChnlWeight; - + // Force Tx rate. pMgntInfo->ForcedDataRate = pNdisCommon->RegForcedDataRate; // Set the BeaconType By Bruce, 2011-01-18. pAdapter->HalFunc.SetHalDefVarHandler(pAdapter, HAL_DEF_HW_BEACON_SUPPORT, (pu1Byte)&(pNdisCommon->RegEnableSwBeacon)); - + // AP mode related. 2005.05.30, by rcnjko. pMgntInfo->Regdot11BeaconPeriod = (u2Byte)(pNdisCommon->RegBeaconPeriod); pMgntInfo->dot11BeaconPeriod = pMgntInfo->Regdot11BeaconPeriod; - pMgntInfo->Regdot11DtimPeriod = (u1Byte)(pNdisCommon->RegDtimPeriod); - pMgntInfo->dot11DtimPeriod = pMgntInfo->Regdot11DtimPeriod; - pMgntInfo->RegPreambleMode = (u1Byte)(pNdisCommon->RegPreambleMode); + pMgntInfo->Regdot11DtimPeriod = (u1Byte)(pNdisCommon->RegDtimPeriod); + pMgntInfo->dot11DtimPeriod = pMgntInfo->Regdot11DtimPeriod; + pMgntInfo->RegPreambleMode = (u1Byte)(pNdisCommon->RegPreambleMode); pMgntInfo->dot11CurrentPreambleMode = pMgntInfo->RegPreambleMode; #if 0 @@ -1860,12 +1860,12 @@ Dot11_UpdateDefaultSetting( { if(pMgntInfo->dot11CurrentChannelNumber == 1 || pMgntInfo->dot11CurrentChannelNumber == 9) extchnl = EXTCHNL_OFFSET_UPPER; - else + else extchnl = EXTCHNL_OFFSET_LOWER; } - else + else extchnl =(pMgntInfo->dot11CurrentChannelNumber<=7)? EXTCHNL_OFFSET_UPPER:EXTCHNL_OFFSET_LOWER; - } + } pMgntInfo->SettingBeforeScan.ChannelNumber = pMgntInfo->Regdot11ChannelNumber; pMgntInfo->SettingBeforeScan.ChannelBandwidth = pChnlInfo->RegBWSetting; pMgntInfo->SettingBeforeScan.Ext20MHzChnlOffsetOf40MHz = extchnl; @@ -1873,7 +1873,7 @@ Dot11_UpdateDefaultSetting( pMgntInfo->SettingBeforeScan.CenterFrequencyIndex1 = CHNL_GetCenterFrequency(pMgntInfo->SettingBeforeScan.ChannelNumber, pChnlInfo->RegBWSetting, extchnl); #endif -} +} VOID @@ -1881,7 +1881,7 @@ HT_UpdateDefaultSetting( IN PADAPTER pAdapter ) { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_HIGH_THROUGHPUT pHTInfo = GET_HT_INFO(pMgntInfo); PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; @@ -1901,7 +1901,7 @@ HT_UpdateDefaultSetting( // 11ac Bcm 256QAM support pMgntInfo->bRegIOTBcm256QAM = pNdisCommon->bRegIOTBcm256QAM; - + // CCK rate support in 40MHz channel if(pNdisCommon->RegBWSetting) pHTInfo->bRegSuppCCK = pNdisCommon->bRegHT_EnableCck; @@ -1911,13 +1911,13 @@ HT_UpdateDefaultSetting( // AMSDU related pHTInfo->nAMSDU_MaxSize = (u2Byte)pNdisCommon->RegAMSDU_MaxSize; pHTInfo->bAMSDU_Support = (BOOLEAN)pNdisCommon->RegAMSDU; - + pHTInfo->bHWAMSDU_Support = (BOOLEAN)pNdisCommon->RegHWAMSDU; // AMPDU related if(pAdapter->bInHctTest) pHTInfo->bAMPDUEnable = FALSE; - else + else pHTInfo->bAMPDUEnable = (BOOLEAN)pNdisCommon->bRegAMPDUEnable; pHTInfo->AMPDU_Factor = (u1Byte)pNdisCommon->RegAMPDU_Factor; @@ -1930,9 +1930,9 @@ HT_UpdateDefaultSetting( pHTInfo->SelfMimoPs = (u1Byte)pNdisCommon->RegMimoPs; if(pHTInfo->SelfMimoPs == 2) pHTInfo->SelfMimoPs = 3; - + // For Rx Reorder Control - // bRegRxReorderEnable default is FALSE if Rxreorder is swithed by TP since TP should be low as media just connect. + // bRegRxReorderEnable default is FALSE if Rxreorder is swithed by TP since TP should be low as media just connect. pHTInfo->bRegRxReorderEnable = ((pMgntInfo->RegRxReorder = pNdisCommon->RegRxReorder) ==2) ? FALSE : pNdisCommon->RegRxReorder; pHTInfo->RxReorderWinSize = pMgntInfo->RegRxReorder_WinSize = pNdisCommon->RegRxReorder_WinSize; pHTInfo->RxReorderPendingTime = pMgntInfo->RegRxReorder_PendTime = pNdisCommon->RegRxReorder_PendTime; @@ -1943,11 +1943,11 @@ HT_UpdateDefaultSetting( pHTInfo->bAMPDUManual = pNdisCommon->bRegAMPDUManual; pHTInfo->nTxSPStream = pNdisCommon->RegTxSPStream; - //IOT issue with Atheros AP. If set incorrect, the Rx rate will always be MCS4. + //IOT issue with Atheros AP. If set incorrect, the Rx rate will always be MCS4. if(pHTInfo->nRxSPStream == 0) { u1Byte Rf_Type = RT_GetRFType(pAdapter); - + if(Rf_Type == RF_1T2R || Rf_Type == RF_2T2R) pHTInfo->nRxSPStream = 2; else if(Rf_Type == RF_3T3R || Rf_Type == RF_2T4R || Rf_Type == RF_4T4R || Rf_Type == RF_2T3R) @@ -1966,12 +1966,12 @@ HT_UpdateDefaultSetting( pHTInfo->nTxSPStream = 3; else pHTInfo->nTxSPStream = 2; - + } // LDPC support CLEAR_FLAGS(pHTInfo->HtLdpcCap); - + // LDPC - Tx pAdapter->HalFunc.GetHalDefVarHandler(pAdapter, HAL_DEF_TX_LDPC, (PBOOLEAN)&bHwLDPCSupport); if(bHwLDPCSupport) @@ -2001,7 +2001,7 @@ HT_UpdateDefaultSetting( SET_FLAG(pHTInfo->HtStbcCap, STBC_HT_ENABLE_TX); } - + if(pMgntInfo->bWiFiConfg) bHwSTBCSupport = FALSE; else @@ -2049,11 +2049,11 @@ VHT_UpdateDefaultSetting( pVHTInfo->nTxSPStream = pNdisCommon->RegTxSPStream; pVHTInfo->nRxSPStream = pNdisCommon->RegRxSPStream; - //IOT issue with Atheros AP. If set incorrect, the Rx rate will always be MCS4. + //IOT issue with Atheros AP. If set incorrect, the Rx rate will always be MCS4. if(pVHTInfo->nRxSPStream == 0) { u1Byte Rf_Type = RT_GetRFType(pAdapter); - + if(Rf_Type == RF_1T2R || Rf_Type == RF_2T2R) pVHTInfo->nRxSPStream = 2; else if(Rf_Type == RF_3T3R || Rf_Type == RF_2T4R || Rf_Type == RF_4T4R || Rf_Type == RF_2T3R) @@ -2072,7 +2072,7 @@ VHT_UpdateDefaultSetting( pVHTInfo->nTxSPStream = 3; else pVHTInfo->nTxSPStream = 2; - + } // LDPC support @@ -2114,12 +2114,12 @@ VHT_UpdateDefaultSetting( } -VOID +VOID PSC_UpdateDefaultSetting( IN PADAPTER pAdapter ) { - PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); + PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo); PRT_NDIS_COMMON pNdisCommon = pAdapter->pNdisCommon; PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo); @@ -2130,7 +2130,7 @@ PSC_UpdateDefaultSetting( //3 All Power Save Mechanism. if((pAdapter->bInHctTest || pMgntInfo->bWiFiConfg) && !pMgntInfo->bSdioDpcIsr) { -#if 0 +#if 0 if(pAdapter->bDPCISRTest) { pPSC->bInactivePs = TRUE; @@ -2141,26 +2141,26 @@ PSC_UpdateDefaultSetting( DbgPrint("test set leisurePS and inactivePS to TRUE\n"); } else -#endif +#endif { pPSC->bInactivePs = FALSE; pNdisCommon->RegInactivePsMode = eIpsOff; - + pPSC->bLeisurePs = FALSE; - pNdisCommon->RegLeisurePsMode = eLpsOff; - + pNdisCommon->RegLeisurePsMode = eLpsOff; + pMgntInfo->keepAliveLevel =0; pPSC->bFwCtrlLPS = FALSE; pNdisCommon->bRegFwCtrlLPS =0; pPSC->bLeisurePsModeBackup = FALSE; - + pPSC->FWCtrlPSMode = FW_PS_ACTIVE_MODE; } - } + } else { - RT_TRACE(COMP_INIT, DBG_LOUD, ("pNdisCommon->RegInactivePsMode = %d\n", pNdisCommon->RegInactivePsMode)); + RT_TRACE(COMP_INIT, DBG_LOUD, ("pNdisCommon->RegInactivePsMode = %d\n", pNdisCommon->RegInactivePsMode)); if(pNdisCommon->RegInactivePsMode == eIpsAuto) pPSC->bInactivePs = FALSE; else @@ -2168,8 +2168,8 @@ PSC_UpdateDefaultSetting( pPSC->bLeisurePsModeBackup = FALSE; - //2008.08.25 - if( (pNdisCommon->RegLeisurePsMode==eLpsOn) && (pMgntInfo->dot11PowerSaveMode == eActive) ) + //2008.08.25 + if( (pNdisCommon->RegLeisurePsMode==eLpsOn) && (pMgntInfo->dot11PowerSaveMode == eActive) ) { RT_TRACE(COMP_INIT, DBG_LOUD, ("LeisurePs On!!\n")); pPSC->bLeisurePs = TRUE; @@ -2185,13 +2185,13 @@ PSC_UpdateDefaultSetting( pPSC->bLeisurePs = FALSE; } pMgntInfo->keepAliveLevel =pNdisCommon->RegKeepAliveLevel; - + //Fw Control LPS mode if(pNdisCommon->bRegFwCtrlLPS == 0) pPSC->bFwCtrlLPS = FALSE; else pPSC->bFwCtrlLPS = TRUE; - + // We need to assign the FW PS mode value even if we do not enable LPS mode. 2012.03.05. by tynli. if(pNdisCommon->bRegFwCtrlLPS == 0) pPSC->FWCtrlPSMode = FW_PS_ACTIVE_MODE; @@ -2202,14 +2202,14 @@ PSC_UpdateDefaultSetting( else if(pNdisCommon->bRegFwCtrlLPS == 3) pPSC->FWCtrlPSMode = FW_PS_SELF_DEFINED_MODE; - + //LPS 32K Support and Enable Deep Sleep //by sherry 20150910 if((pNdisCommon->RegLeisurePsMode != eLpsOff) && (pNdisCommon->bRegLowPowerEnable) && (pNdisCommon->bRegLPSDeepSleepEnable)) { RT_TRACE(COMP_INIT,DBG_LOUD,("PSC_UpdateDefaultSetting: Enable LPS Deep Sleep \n")); FwLPSDeepSleepInit(pAdapter); - } + } } pPSC->bIPSModeBackup = pPSC->bInactivePs; @@ -2218,7 +2218,7 @@ PSC_UpdateDefaultSetting( pPSC->RegAdvancedLPs = pNdisCommon->RegAdvancedLPs; pPSC->bGpioRfSw = pNdisCommon->bRegGpioRfSw; - + pPSC->RegLeisurePsMode = pNdisCommon->RegLeisurePsMode; pPSC->RegPowerSaveMode = pNdisCommon->RegPowerSaveMode; @@ -2242,7 +2242,7 @@ PSC_UpdateDefaultSetting( } else { - pPSC->WoWLANMode = eWoWLANDisable; + pPSC->WoWLANMode = eWoWLANDisable; } pPSC->bWakeOnDisconnect = pNdisCommon->bRegWakeOnDisconnect; @@ -2251,13 +2251,13 @@ PSC_UpdateDefaultSetting( pMgntInfo->bSupportPacketCoalescing = TRUE; else pMgntInfo->bSupportPacketCoalescing = FALSE; - + pPSC->APOffloadEnable = pNdisCommon->RegAPOffloadEnable; pPSC->WoWLANLPSLevel = pNdisCommon->RegWoWLANLPSLevel ; pPSC->WoWLANS5Support = pNdisCommon->RegWoWLANS5Support; pPSC->D2ListenIntvl = pNdisCommon->RegD2ListenIntvl; pPSC->bFakeWoWLAN = pNdisCommon->bRegFakeWoWLAN; - + pPSC->RegARPOffloadEnable = pNdisCommon->bRegARPOffloadEnable; pPSC->RegGTKOffloadEnable = pNdisCommon->bRegGTKOffloadEnable ; // support GTK offload after NDIS620. pPSC->ProtocolOffloadDecision = pNdisCommon->RegProtocolOffloadDecision; @@ -2305,7 +2305,7 @@ PlatformReadCommonDwordRegistry( UNICODE_STRING RegistryPath; KEY_VALUE_PARTIAL_INFORMATION result; ULONG resultLength; - + do { @@ -2317,7 +2317,7 @@ PlatformReadCommonDwordRegistry( OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL); - + if(STATUS_SUCCESS != (ntStatus = ZwOpenKey(&driverKey, KEY_READ, &objectAttributes))) { DbgPrint("ZwOpenKey Failed = 0x%x\n", ntStatus); @@ -2333,7 +2333,7 @@ PlatformReadCommonDwordRegistry( break; } memcpy(resultValue,result.Data,sizeof(u4Byte)); - //DbgPrint("Test result:%d Length:%d type:%d\n",*resultValue, result.DataLength, result.Type); + //DbgPrint("Test result:%d Length:%d type:%d\n",*resultValue, result.DataLength, result.Type); }while(FALSE); if(driverKey) @@ -2364,7 +2364,7 @@ PlatformWriteCommonDwordRegistry( NTSTATUS ntStatus = STATUS_SUCCESS; UNICODE_STRING ValueName; UNICODE_STRING RegistryPath; - + do { @@ -2374,7 +2374,7 @@ PlatformWriteCommonDwordRegistry( OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL); - + if(STATUS_SUCCESS != (ntStatus = ZwOpenKey(&driverKey, KEY_WRITE, &objectAttributes))) { DbgPrint("ZwOpenKey Failed = 0x%x\n", ntStatus); @@ -2389,7 +2389,7 @@ PlatformWriteCommonDwordRegistry( DbgPrint("ZwSetValueKey Failed = 0x%x\n", ntStatus); break; } - + }while(FALSE); if(driverKey) @@ -2413,8 +2413,8 @@ PlatformWriteBTAntPosDwordRegistry( NTSTATUS ntStatus = STATUS_SUCCESS; UNICODE_STRING ValueName; UNICODE_STRING RegistryPath; - ANSI_STRING AnsiString; - + ANSI_STRING AnsiString; + RT_TRACE(COMP_INIT, DBG_LOUD, ("### test\n")); do @@ -2423,13 +2423,13 @@ PlatformWriteBTAntPosDwordRegistry( RtlInitString(&AnsiString,"\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet001\\Services\\RtlWlans\\Parameters"); RtlAnsiStringToUnicodeString(&RegistryPath,&AnsiString,TRUE); RT_TRACE(COMP_INIT, DBG_LOUD, ("### PlatformWriteBTAntPosDwordRegistry(): RegistryPath = %wZ\n", &RegistryPath)); - + InitializeObjectAttributes(&objectAttributes, &RegistryPath, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL); - + if(STATUS_SUCCESS != (ntStatus = ZwOpenKey(&driverKey, KEY_WRITE, &objectAttributes))) { DbgPrint("ZwOpenKey Failed = 0x%x\n", ntStatus); @@ -2444,7 +2444,7 @@ PlatformWriteBTAntPosDwordRegistry( DbgPrint("ZwSetValueKey Failed = 0x%x\n", ntStatus); break; } - + }while(FALSE); if(driverKey) @@ -2453,7 +2453,7 @@ PlatformWriteBTAntPosDwordRegistry( driverKey = NULL; } - RtlFreeUnicodeString(&RegistryPath); + RtlFreeUnicodeString(&RegistryPath); return ntStatus; } @@ -2473,7 +2473,7 @@ PlatformReadBTFWLoaderDwordRegistry( ANSI_STRING AnsiString; KEY_VALUE_PARTIAL_INFORMATION result; ULONG resultLength; - + do { @@ -2486,7 +2486,7 @@ PlatformReadBTFWLoaderDwordRegistry( OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL); - + if(STATUS_SUCCESS != (ntStatus = ZwOpenKey(&driverKey, KEY_READ, &objectAttributes))) { DbgPrint("ZwOpenKey Failed = 0x%x\n", ntStatus); @@ -2502,7 +2502,7 @@ PlatformReadBTFWLoaderDwordRegistry( break; } memcpy(resultValue,result.Data,sizeof(u4Byte)); - //DbgPrint("Test result:%d Length:%d type:%d\n",*resultValue, result.DataLength, result.Type); + //DbgPrint("Test result:%d Length:%d type:%d\n",*resultValue, result.DataLength, result.Type); }while(FALSE); if(driverKey) diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.h b/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.h index 75561d1a9..9921c8970 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.h +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.h @@ -3,7 +3,7 @@ #define N6_LLC_SIZE 8 -#define MAX_STALL_TIME 50 //us. If the delay time is larger than 50us, it's better to call NdisMSleep +#define MAX_STALL_TIME 50 //us. If the delay time is larger than 50us, it's better to call NdisMSleep #define NDIS_ADAPTER_TYPE RT_SDIO_DEVICE @@ -220,7 +220,7 @@ typedef struct _RT8187DBGWIPARAM ULONG bDbgActCompleted; ULONG eDbgActType; ULONG IoOffset; - ULONG IoValue; + ULONG IoValue; ULONG outLen; UCHAR outBuf[200]; }RT8187DBGWIPARAM, *PRT8187DBGWIPARAM; @@ -250,12 +250,12 @@ VHT_UpdateDefaultSetting( IN PADAPTER pAdapter ); -VOID +VOID PSC_UpdateDefaultSetting( IN PADAPTER pAdapter ); -VOID +VOID HAL_UpdateDefaultSetting( IN PADAPTER pAdapter ); diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.c b/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.c index 6b459774b..a2f92be80 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.c +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.c @@ -41,9 +41,9 @@ ndbg_CheckBtRspStatus( RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], BT status : MP_BT_STATUS_UNKNOWN_STATUS_L\n")); break; } - + return retStatus; -} +} BT_CTRL_STATUS ndbg_CheckC2hFrame( @@ -53,7 +53,7 @@ ndbg_CheckC2hFrame( { BT_CTRL_STATUS c2hStatus=BT_STATUS_C2H_SUCCESS; PBT_EXT_C2H pExtC2h=(PBT_EXT_C2H)&GLCurBtC2hRsp[0]; - + RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], C2H rsp hex: \n"), pExtC2h, 6); RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], statusCode = 0x%x\n", pExtC2h->statusCode)); @@ -98,7 +98,7 @@ ndbg_SendH2c( for(i=0; ih2cReqNum++; pDbgCtx->h2cReqNum %= 16; if(PlatformWaitEvent(&pDbgCtx->dbgH2cRspEvent, 100)) @@ -166,7 +166,7 @@ ndbg_BtFwOpCodeProcess( h2cStatus = ndbg_SendH2c(Adapter, pH2c, h2cParaLen+2); if(BT_STATUS_H2C_SUCCESS == h2cStatus) { - // if reach here, it means H2C get the correct c2h response, + // if reach here, it means H2C get the correct c2h response, c2hStatus = ndbg_CheckC2hFrame(Adapter, pH2c); if(BT_STATUS_C2H_SUCCESS == c2hStatus) { @@ -219,7 +219,7 @@ ndbg_BtStackOpCodeProcess( } else retStatus = BT_STATUS_WRONG_LEVEL; - + return retStatus; } @@ -230,7 +230,7 @@ DbgWorkItemCallback( { PADAPTER pAdapter = (PADAPTER)pContext; PRT_NDIS_DBG_CONTEXT pDbgCtx = &(pAdapter->ndisDbgCtx); - + // Execute specified action. if(pDbgCtx->CurrDbgAct != NULL) { @@ -243,16 +243,16 @@ DbgWorkItemCallback( #if DBG EndTime = PlatformGetCurrentTime(); - RT_TRACE(COMP_DBG, DBG_LOUD, + RT_TRACE(COMP_DBG, DBG_LOUD, ("DbgActType: %d, time spent: %I64d us\n", - pDbgCtx->DbgActType, (EndTime-StartTime) )); + pDbgCtx->DbgActType, (EndTime-StartTime) )); #endif } PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); pDbgCtx->bDbgWorkItemInProgress = FALSE; PlatformReleaseSpinLock(pAdapter, RT_DBG_SPIN_LOCK); - + if(pDbgCtx->bDbgDrvUnload) { PlatformSetEvent( &(pDbgCtx->DbgWorkItemEvent) ); @@ -261,7 +261,7 @@ DbgWorkItemCallback( //----------------------------------------------------------------------------- // Description: -// Callback function of a workitem for IO. +// Callback function of a workitem for IO. // //----------------------------------------------------------------------------- VOID @@ -273,7 +273,7 @@ DbgIoCallback( PRT_NDIS_DBG_CONTEXT pDbgCtx = &(pAdapter->ndisDbgCtx); PRT_SDIO_DEVICE pDevice = GET_RT_SDIO_DEVICE(pAdapter); - RT_ASSERT((KeGetCurrentIrql() == PASSIVE_LEVEL), + RT_ASSERT((KeGetCurrentIrql() == PASSIVE_LEVEL), ("DbgIoCallback(): not in PASSIVE_LEVEL!\n")); switch(pDbgCtx->DbgActType) @@ -354,13 +354,13 @@ DbgIoCallback( else { // IO REG if(pDevice->SdioRegDbgCtrl & SDIO_REG_CTRL_CMD52) - PlatformEFSdioCmd52Write4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1, pDbgCtx->DbgIoOffset, (u4Byte)(pDbgCtx->DbgIoValue)); + PlatformEFSdioCmd52Write4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1, pDbgCtx->DbgIoOffset, (u4Byte)(pDbgCtx->DbgIoValue)); else PlatformEFIOWrite4Byte(pAdapter, pDbgCtx->DbgIoOffset, (u4Byte)(pDbgCtx->DbgIoValue)); } } break; - + case DBG_READ_MAC_1BYTE: if( IS_BB_REG_OFFSET_92S(pDbgCtx->DbgIoOffset) ) { @@ -384,7 +384,7 @@ DbgIoCallback( else { // IO REG if(pDevice->SdioRegDbgCtrl & SDIO_REG_CTRL_CMD52) - pDbgCtx->DbgIoValue = PlatformEFSdioCmd52Read1Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1,pDbgCtx->DbgIoOffset); + pDbgCtx->DbgIoValue = PlatformEFSdioCmd52Read1Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1,pDbgCtx->DbgIoOffset); else pDbgCtx->DbgIoValue = PlatformEFIORead1Byte(pAdapter, pDbgCtx->DbgIoOffset); } @@ -414,7 +414,7 @@ DbgIoCallback( else { // IO REG if(pDevice->SdioRegDbgCtrl & SDIO_REG_CTRL_CMD52) - pDbgCtx->DbgIoValue = PlatformEFSdioCmd52Read2Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1,pDbgCtx->DbgIoOffset); + pDbgCtx->DbgIoValue = PlatformEFSdioCmd52Read2Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1,pDbgCtx->DbgIoOffset); else pDbgCtx->DbgIoValue = PlatformEFIORead2Byte(pAdapter, pDbgCtx->DbgIoOffset); } @@ -436,7 +436,7 @@ DbgIoCallback( else { // IO REG if(pDevice->SdioRegDbgCtrl & SDIO_REG_CTRL_CMD52) - pDbgCtx->DbgIoValue = PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1,pDbgCtx->DbgIoOffset); + pDbgCtx->DbgIoValue = PlatformEFSdioCmd52Read4Byte(pAdapter, WLAN_IOREG_DEVICE_ID, 1,pDbgCtx->DbgIoOffset); else pDbgCtx->DbgIoValue = PlatformEFIORead4Byte(pAdapter, pDbgCtx->DbgIoOffset); } @@ -453,7 +453,7 @@ DbgIoCallback( PHY_SetBBReg(pAdapter, pDbgCtx->DbgIoOffset, bMaskDWord, pDbgCtx->DbgIoValue); break; - case DBG_READ_RF: + case DBG_READ_RF: pDbgCtx->DbgIoValue = PHY_QueryRFReg(pAdapter, (u1Byte)pDbgCtx->DbgRfPath, pDbgCtx->DbgIoOffset, bRFRegOffsetMask); break; @@ -503,9 +503,9 @@ DbgIoCallback( { u4Byte BufferLengthRead; u1Byte i=0; - + PlatformUsbSyncVendorRequest( - pAdapter, + pAdapter, TRUE, // bWrite 0x05, // bReq 0, // wValue @@ -533,10 +533,10 @@ DbgIoCallback( case DBG_READ_EFUSE_4BYTE: EFUSE_MaskedShadowRead(pAdapter, 4, (u2Byte)(pDbgCtx->DbgIoOffset), (UINT32 *)&pDbgCtx->DbgIoValue); break; - + case DBG_UPDATE_EFUSE: - pDbgCtx->DbgIoValue = EFUSE_ShadowUpdate(pAdapter, FALSE); - break; + pDbgCtx->DbgIoValue = EFUSE_ShadowUpdate(pAdapter, FALSE); + break; case DBG_WRITE_BT_EFUSE_1BYTE: EFUSE_ShadowWriteBT(pAdapter, 1, (u2Byte)pDbgCtx->DbgIoOffset, (UINT32)pDbgCtx->DbgIoValue); @@ -553,10 +553,10 @@ DbgIoCallback( case DBG_READ_BT_EFUSE_4BYTE: EFUSE_ShadowReadBT(pAdapter, 4, (u2Byte)(pDbgCtx->DbgIoOffset), (UINT32 *)&pDbgCtx->DbgIoValue); break; - + case DBG_UPDATE_BT_EFUSE: pDbgCtx->DbgIoValue = EFUSE_ShadowUpdateBT(pAdapter, FALSE); - break; + break; case DBG_SWITCH_ANTENNA: pAdapter->HalFunc.SetTxAntennaHandler(pAdapter, (u1Byte)pDbgCtx->DbgIoValue); @@ -565,7 +565,7 @@ DbgIoCallback( case DBG_SET_TXPWR_FOR_ALL_RATE: HAL_SetTxPowerForAllRate(pAdapter, pDbgCtx->DbgIoValue); break; - + default: break; } @@ -587,7 +587,7 @@ NDBG_Init( RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], NDBG_Init()\n")); pDbgCtx->bDbgDrvUnload = FALSE; - + PlatformInitializeEvent(&(pDbgCtx->DbgWorkItemEvent)); PlatformInitializeEvent(&pDbgCtx->dbgH2cRspEvent); PlatformInitializeEvent(&pDbgCtx->dbgBtC2hEvent); @@ -595,7 +595,7 @@ NDBG_Init( PlatformInitializeSpinLock(pAdapter, RT_DBG_SPIN_LOCK); PlatformInitializeWorkItem( pAdapter, - &(pDbgCtx->DbgWorkItem), + &(pDbgCtx->DbgWorkItem), (RT_WORKITEM_CALL_BACK)DbgWorkItemCallback, (PVOID)pAdapter, "DbgWorkItem"); @@ -626,14 +626,14 @@ NDBG_Halt( { PlatformWaitEvent(&(pDbgCtx->DbgWorkItemEvent), 2000); } - + PlatformFreeSpinLock(pAdapter, RT_DBG_SPIN_LOCK); } //----------------------------------------------------------------------------- // Description: -// Read MAC register. -// +// Read MAC register. +// //----------------------------------------------------------------------------- BOOLEAN DbgReadMacReg( @@ -651,7 +651,7 @@ DbgReadMacReg( pAdapter=GetDefaultAdapter(Adapter); else pAdapter=Adapter; - + pDbgCtx = &(pAdapter->ndisDbgCtx); switch(ulRegDataWidth) @@ -679,7 +679,7 @@ DbgReadMacReg( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgReadMacReg(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -702,8 +702,8 @@ DbgReadMacReg( //----------------------------------------------------------------------------- // Description: -// Write MAC register. -// +// Write MAC register. +// //----------------------------------------------------------------------------- BOOLEAN DbgWriteMacReg( @@ -742,7 +742,7 @@ DbgWriteMacReg( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgWriteMacReg(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -765,8 +765,8 @@ DbgWriteMacReg( //----------------------------------------------------------------------------- // Description: -// Read BB register. -// +// Read BB register. +// //----------------------------------------------------------------------------- BOOLEAN DbgReadBbReg( @@ -794,7 +794,7 @@ DbgReadBbReg( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgReadBbReg(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -817,8 +817,8 @@ DbgReadBbReg( //----------------------------------------------------------------------------- // Description: -// Write BB register. -// +// Write BB register. +// //----------------------------------------------------------------------------- BOOLEAN DbgWriteBbReg( @@ -847,7 +847,7 @@ DbgWriteBbReg( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgWriteBbReg(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -870,8 +870,8 @@ DbgWriteBbReg( //----------------------------------------------------------------------------- // Description: -// Read RF register. -// +// Read RF register. +// //----------------------------------------------------------------------------- BOOLEAN DbgReadRfReg( @@ -885,7 +885,7 @@ DbgReadRfReg( ULONG ulIoType; ULONG RF_PATH=0, INulRegOffset=0; - ulIoType = DBG_READ_RF; + ulIoType = DBG_READ_RF; RF_PATH = (ulRegDataWidth >> 4); // Get RF path INulRegOffset = ulRegOffset & 0x0fff; @@ -895,7 +895,7 @@ DbgReadRfReg( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgReadRfReg(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -908,7 +908,7 @@ DbgReadRfReg( pDbgCtx->bDbgWorkItemInProgress = TRUE; pDbgCtx->DbgActType = ulIoType; pDbgCtx->CurrDbgAct = DbgIoCallback; - + PlatformScheduleWorkItem( &(pDbgCtx->DbgWorkItem) ); } PlatformReleaseSpinLock(pAdapter, RT_DBG_SPIN_LOCK); @@ -919,8 +919,8 @@ DbgReadRfReg( //----------------------------------------------------------------------------- // Description: -// Write RF register. -// +// Write RF register. +// //----------------------------------------------------------------------------- BOOLEAN DbgWriteRfReg( @@ -946,7 +946,7 @@ DbgWriteRfReg( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgWriteRfReg(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -971,8 +971,8 @@ DbgWriteRfReg( //----------------------------------------------------------------------------- // Description: -// Read EEPROM for OID_RT_PRO_READ_EEPROM. -// +// Read EEPROM for OID_RT_PRO_READ_EEPROM. +// //----------------------------------------------------------------------------- BOOLEAN DbgReadEeprom( @@ -1031,7 +1031,7 @@ DbgReadEeprom( //----------------------------------------------------------------------------- // Description: // Write EEPROM for OID_RT_PRO_WRITE_EEPROM. -// +// //----------------------------------------------------------------------------- BOOLEAN DbgWriteEeprom( @@ -1066,7 +1066,7 @@ DbgWriteEeprom( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip Pro8187IoCallback(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1091,7 +1091,7 @@ DbgWriteEeprom( //----------------------------------------------------------------------------- // Description: // 87S-USB Out Command. -// +// //----------------------------------------------------------------------------- BOOLEAN DbgOutCmd( @@ -1105,13 +1105,13 @@ DbgOutCmd( ULONG ulIoType; ULONG i=0; - ulIoType = DBG_OUT_CMD; + ulIoType = DBG_OUT_CMD; // Perform IO via workitem. PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip Pro8187IoCallback(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1119,7 +1119,7 @@ DbgOutCmd( { PlatformZeroMemory(&pDbgCtx->DbgIoBuf, 64); pDbgCtx->DbgIoOffset = 0; - + pDbgCtx->DbgIoValue = ulOutCmdWidth; //use DbgIoValue to indicate OutCmd length PlatformMoveMemory(&pDbgCtx->DbgIoBuf, ulOutCmd, ulOutCmdWidth); @@ -1135,9 +1135,9 @@ DbgOutCmd( //----------------------------------------------------------------------------- // Description: -// Read EEPROM for OID_RT_PRO_READ_EFUSE. +// Read EEPROM for OID_RT_PRO_READ_EFUSE. // Added by Roger, 2008.11.10. -// +// //----------------------------------------------------------------------------- BOOLEAN DbgReadEFuse( @@ -1201,7 +1201,7 @@ DbgReadEFuse( // Description: // Write EEPROM for OID_RT_PRO_WRITE_EFUSE. // Added by Roger, 2008.11.10. -// +// //----------------------------------------------------------------------------- BOOLEAN DbgWriteEFuse( @@ -1219,7 +1219,7 @@ DbgWriteEFuse( { case 1: ulIoType = DBG_WRITE_EFUSE_1BYTE; - break; + break; default: bResult = FALSE; @@ -1232,7 +1232,7 @@ DbgWriteEFuse( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip Pro8187IoCallback(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1256,18 +1256,18 @@ DbgWriteEFuse( // Description: // Write EEPROM for OID_RT_PRO_WRITE_EFUSE. // Added by Roger, 2008.11.10. -// +// //----------------------------------------------------------------------------- BOOLEAN DbgUpdateEFuse( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { PRT_NDIS_DBG_CONTEXT pDbgCtx = &(pAdapter->ndisDbgCtx); BOOLEAN bResult = TRUE; ULONG ulIoType; - - ulIoType = DBG_UPDATE_EFUSE; + + ulIoType = DBG_UPDATE_EFUSE; if(bResult == TRUE) { @@ -1275,7 +1275,7 @@ DbgUpdateEFuse( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip Pro8187IoCallback(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1365,7 +1365,7 @@ DbgWriteBTEFuse( { case 1: ulIoType = DBG_WRITE_BT_EFUSE_1BYTE; - break; + break; default: bResult = FALSE; @@ -1378,7 +1378,7 @@ DbgWriteBTEFuse( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgWriteBTEFuse(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1401,14 +1401,14 @@ DbgWriteBTEFuse( BOOLEAN DbgUpdateBTEFuse( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ) { PRT_NDIS_DBG_CONTEXT pDbgCtx = &(pAdapter->ndisDbgCtx); BOOLEAN bResult = TRUE; ULONG ulIoType; - - ulIoType = DBG_UPDATE_BT_EFUSE; + + ulIoType = DBG_UPDATE_BT_EFUSE; if(bResult == TRUE) { @@ -1416,7 +1416,7 @@ DbgUpdateBTEFuse( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip DbgUpdateBTEFuse(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1443,7 +1443,7 @@ DbgSetTxAntenna( BOOLEAN bResult = TRUE; ULONG ulIoType; - ulIoType = DBG_SWITCH_ANTENNA; + ulIoType = DBG_SWITCH_ANTENNA; if(bResult == TRUE) { @@ -1451,7 +1451,7 @@ DbgSetTxAntenna( PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip Pro8187IoCallback(), IoType: %d.\n", ulIoType)); bResult = FALSE; } @@ -1466,7 +1466,7 @@ DbgSetTxAntenna( PlatformReleaseSpinLock(pAdapter, RT_DBG_SPIN_LOCK); } - return bResult; + return bResult; } BOOLEAN @@ -1517,14 +1517,14 @@ ndbg_BtControlStart( BOOLEAN bResult = TRUE; PRT_NDIS_DBG_CONTEXT pDbgCtx = &(pAdapter->ndisDbgCtx); ULONG ulIoType = DBG_BT_CONTROL; - + PlatformAcquireSpinLock(pAdapter, RT_DBG_SPIN_LOCK); if(pDbgCtx->bDbgWorkItemInProgress) { - RT_ASSERT(FALSE, + RT_ASSERT(FALSE, ("DbgWorkItem is in progress!, skip Pro8187IoCallback(), IoType: %d.\n", ulIoType)); - bResult = FALSE; + bResult = FALSE; } else { @@ -1577,7 +1577,7 @@ NDBG_BtControl( Status = NDIS_STATUS_INVALID_LENGTH; } } - + return Status; } @@ -1613,7 +1613,7 @@ NDBG_GetBtFwVersion( return FALSE; } else - { + { pu2Tmp = (pu2Byte)&pBtRspContent[0]; btRealFwVer = *pu2Tmp; btFwVer = pExtC2h->buf[2]; @@ -1634,7 +1634,7 @@ NDBG_FwC2hBtControl( PRT_NDIS_DBG_CONTEXT pDbgCtx=&(Adapter->ndisDbgCtx); PBT_EXT_C2H pExtC2h=(PBT_EXT_C2H)tmpBuf; - RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], NDBG_FwC2hBtControl(), hex: \n"), + RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], NDBG_FwC2hBtControl(), hex: \n"), tmpBuf, length); RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], pExtC2h->extendId=0x%x\n", pExtC2h->extendId)); @@ -1642,7 +1642,7 @@ NDBG_FwC2hBtControl( { case EXT_C2H_WIFI_FW_ACTIVE_RSP: RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], EXT_C2H_WIFI_FW_ACTIVE_RSP\n")); - RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], pExtC2h->buf hex: \n"), + RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], pExtC2h->buf hex: \n"), &pExtC2h->buf[0], (length-3)); PlatformSetEvent(&pDbgCtx->dbgH2cRspEvent); break; @@ -1653,7 +1653,7 @@ NDBG_FwC2hBtControl( RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], pExtC2h->retLen=0x%x\n", pExtC2h->retLen)); RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], pExtC2h->opCodeVer=0x%x\n", pExtC2h->opCodeVer)); RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], pExtC2h->reqNum=0x%x\n", pExtC2h->reqNum)); - RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], pExtC2h->buf hex: \n"), + RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], pExtC2h->buf hex: \n"), &pExtC2h->buf[0], (length-3)); PlatformSetEvent(&pDbgCtx->dbgBtC2hEvent); break; @@ -1680,10 +1680,10 @@ NDBG_StackBtCoexNotify( if(length) { PlatformMoveMemory(&pStackRsp->buf[0], tmpBuf, length); - RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], NDBG_StackBtCoexNotify(), hex: \n"), + RT_DISP_DATA(FBT, BT_DBG_CONTENT, ("[BTDBG], NDBG_StackBtCoexNotify(), hex: \n"), tmpBuf, length); } - RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], pStackRsp->opCode=0x%x, pStackRsp->opStatus=0x%x\n", + RT_DISP(FBT, BT_DBG_STATE, ("[BTDBG], pStackRsp->opCode=0x%x, pStackRsp->opStatus=0x%x\n", pStackRsp->opCode, pStackRsp->opStatus)); PlatformSetEvent(&pDbgCtx->dbgBtCoexEvent); } diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.h b/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.h index 48e77aa6d..76f8e4a50 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.h +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisDbg.h @@ -15,7 +15,7 @@ typedef enum _RTL_EXT_C2H_EVT // OP codes definition between the user layer and driver typedef enum _BT_CTRL_OPCODE_UPPER{ - BT_UP_OP_BT_READY = 0x00, + BT_UP_OP_BT_READY = 0x00, BT_UP_OP_BT_SET_MODE = 0x01, BT_UP_OP_BT_SET_TX_RX_PARAMETER = 0x02, BT_UP_OP_BT_SET_GENERAL = 0x03, @@ -25,9 +25,9 @@ typedef enum _BT_CTRL_OPCODE_UPPER{ }BT_CTRL_OPCODE_UPPER,*PBT_CTRL_OPCODE_UPPER; typedef enum _BT_SET_GENERAL{ - BT_GSET_REG = 0x00, - BT_GSET_RESET = 0x01, - BT_GSET_TARGET_BD_ADDR = 0x02, + BT_GSET_REG = 0x00, + BT_GSET_RESET = 0x01, + BT_GSET_TARGET_BD_ADDR = 0x02, BT_GSET_TX_PWR_FINETUNE = 0x03, BT_GSET_TRACKING_INTERVAL = 0x04, BT_GSET_THERMAL_METER = 0x05, @@ -37,7 +37,7 @@ typedef enum _BT_SET_GENERAL{ }BT_SET_GENERAL,*PBT_SET_GENERAL; typedef enum _BT_GET_GENERAL{ - BT_GGET_REG = 0x00, + BT_GGET_REG = 0x00, BT_GGET_STATUS = 0x01, BT_GGET_REPORT = 0x02, BT_GGET_AFH_MAP = 0x03, @@ -80,7 +80,7 @@ typedef enum _BT_REPORT_TYPE{ //OP codes definition between driver and bt fw typedef enum _BT_CTRL_OPCODE_LOWER{ - BT_LO_OP_GET_BT_VERSION = 0x00, + BT_LO_OP_GET_BT_VERSION = 0x00, BT_LO_OP_RESET = 0x01, BT_LO_OP_TEST_CTRL = 0x02, BT_LO_OP_SET_BT_MODE = 0x03, @@ -169,7 +169,7 @@ typedef enum _BT_CTRL_STATUS{ typedef enum _BT_OPCODE_STATUS{ BT_OP_STATUS_SUCCESS = 0x00, // Success - BT_OP_STATUS_VERSION_MISMATCH = 0x01, + BT_OP_STATUS_VERSION_MISMATCH = 0x01, BT_OP_STATUS_UNKNOWN_OPCODE = 0x02, BT_OP_STATUS_ERROR_PARAMETER = 0x03, BT_OP_STATUS_MAX @@ -395,7 +395,7 @@ DbgWriteEFuse( BOOLEAN DbgUpdateEFuse( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); BOOLEAN @@ -415,7 +415,7 @@ DbgWriteBTEFuse( BOOLEAN DbgUpdateBTEFuse( - IN PADAPTER pAdapter + IN PADAPTER pAdapter ); BOOLEAN diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.c b/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.c index e1bf69c17..5e99c102e 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.c +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.c @@ -176,7 +176,7 @@ OIDS_RTKWriteReg( if(InformationBufferLength < sizeof(ULONG)*3) { Status = NDIS_STATUS_INVALID_LENGTH; - *BytesNeeded = sizeof(ULONG)*3; + *BytesNeeded = sizeof(ULONG)*3; return Status; } // Get offset, data width, and value to write. @@ -212,7 +212,8 @@ OIDS_RTKWriteReg( break; case 4: if( IS_BB_REG_OFFSET_92S(ulRegOffset) ) - PHY_SetBBReg(Adapter, ulRegOffset, bMaskDWord, ulRegValue); + + PHY_SetBBReg(Adapter, ulRegOffset, bMaskDWord, ulRegValue); else PlatformEFIOWrite4Byte(Adapter, ulRegOffset, (u4Byte)(ulRegValue)); break; @@ -242,7 +243,7 @@ OIDS_RTKWriteRegSIC( if(InformationBufferLength < sizeof(ULONG)*3) { Status = NDIS_STATUS_INVALID_LENGTH; - *BytesNeeded = sizeof(ULONG)*3; + *BytesNeeded = sizeof(ULONG)*3; return Status; } // Get offset, data width, and value to write. @@ -271,7 +272,8 @@ OIDS_RTKWriteRegSIC( } break; case 4: - SIC_SetBBReg(Adapter, ulRegOffset, bMaskDWord, ulRegValue); + + SIC_SetBBReg(Adapter, ulRegOffset, bMaskDWord, ulRegValue); break; default: Status = NDIS_STATUS_INVALID_LENGTH; @@ -288,7 +290,7 @@ OIDS_RTKDbgControl( IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, - OUT PULONG BytesNeeded + OUT PULONG BytesNeeded ) { NDIS_STATUS Status=NDIS_STATUS_SUCCESS; @@ -296,13 +298,13 @@ OIDS_RTKDbgControl( pRTKDbg = (PRTK_DBG_CTRL_OIDS)InformationBuffer; - RT_DISP(FDBG_CTRL, DBG_CTRL_TRACE, ("[RTKDBG], Type=0x%x, Len=0x%x(%d)\n", + RT_DISP(FDBG_CTRL, DBG_CTRL_TRACE, ("[RTKDBG], Type=0x%x, Len=0x%x(%d)\n", pRTKDbg->ctrlType, pRTKDbg->ctrlDataLen, pRTKDbg->ctrlDataLen)); if(oids_RTKDbgInvalidLength(InformationBufferLength, pRTKDbg, BytesNeeded)) { RT_DISP(FDBG_CTRL, DBG_CTRL_TRACE, ("[RTKDBG], Invalid Length, return!!\n")); - Status = NDIS_STATUS_INVALID_LENGTH; + Status = NDIS_STATUS_INVALID_LENGTH; return Status; } else diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.h b/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.h index ef382bc99..bb5d136a3 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.h +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisOid.h @@ -9,7 +9,7 @@ typedef struct _RTK_DBG_CTRL_OIDS{ } RTK_DBG_CTRL_OIDS, *PRTK_DBG_CTRL_OIDS; typedef enum _RTK_DBG_TYPE_OIDS -{ +{ RTK_DBG_OIDS_BT_PROFILE =0, }RTK_DBG_TYPE_OIDS; #pragma pack() @@ -70,6 +70,6 @@ OIDS_RTKDbgControl( IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, - OUT PULONG BytesNeeded + OUT PULONG BytesNeeded ); #endif diff --git a/network/wlan/WDI/PLATFORM/NdisComm/sources.list b/network/wlan/WDI/PLATFORM/NdisComm/sources.list index a7fc814e5..74f8012c2 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/sources.list +++ b/network/wlan/WDI/PLATFORM/NdisComm/sources.list @@ -3,7 +3,7 @@ // //: Comment at the beginning // OS: * Ebd6 Ebd7 WinXP Vista Win7 Win8 WinBlue // +: Add for OS -// -: Remove for OS +// -: Remove for OS // +(*) [NdisComm.c] diff --git a/network/wlan/WDI/PLATFORM/NdisComm/sources.tpl.win b/network/wlan/WDI/PLATFORM/NdisComm/sources.tpl.win index 752bda83a..3469299a7 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/sources.tpl.win +++ b/network/wlan/WDI/PLATFORM/NdisComm/sources.tpl.win @@ -7,7 +7,7 @@ PRECOMPILED_PCH=precomp.pch PRECOMPILED_OBJ=precomp.obj # -# IC dependent directories are defined in +# IC dependent directories are defined in # the environment variable HAL_INC_DIRS. # INCLUDES= \ @@ -25,5 +25,5 @@ INCLUDES= \ !include $(SRC_ROOT)\$(PLATFORM_INC) SOURCES = - + diff --git a/network/wlan/ihvsampleui/IHVClassFactory.cpp b/network/wlan/ihvsampleui/IHVClassFactory.cpp index 7da337d51..3b0036edc 100644 --- a/network/wlan/ihvsampleui/IHVClassFactory.cpp +++ b/network/wlan/ihvsampleui/IHVClassFactory.cpp @@ -19,13 +19,13 @@ CIHVClassFactory::~CIHVClassFactory() { } -STDMETHODIMP_(ULONG) +STDMETHODIMP_(ULONG) CIHVClassFactory::AddRef() { return InterlockedIncrement(&m_refCount); } -STDMETHODIMP_(ULONG) +STDMETHODIMP_(ULONG) CIHVClassFactory::Release() { ULONG refCount = InterlockedDecrement(&m_refCount); @@ -36,9 +36,9 @@ CIHVClassFactory::Release() return refCount; } -STDMETHODIMP +STDMETHODIMP CIHVClassFactory::QueryInterface( - REFIID riid, + REFIID riid, void **ppvObject ) { @@ -59,7 +59,7 @@ CIHVClassFactory::QueryInterface( *ppvObject = NULL; return E_NOINTERFACE; } - reinterpret_cast(*ppvObject)->AddRef(); + reinterpret_cast(*ppvObject)->AddRef(); } return hr; @@ -69,10 +69,10 @@ CIHVClassFactory::QueryInterface( // // IClassFactory Implementaion // -STDMETHODIMP +STDMETHODIMP CIHVClassFactory::CreateInstance( - IUnknown *pUnkOuter, - REFIID riid, + IUnknown *pUnkOuter, + REFIID riid, void **ppvObject ) { @@ -91,7 +91,7 @@ CIHVClassFactory::CreateInstance( // Figure out which interface is wanted // the ui will call us only as IID_IDot11ExtUI - if (IID_IDot11SampleExtUI == riid || + if (IID_IDot11SampleExtUI == riid || IID_IDot11ExtUI == riid || IID_IWizardExtension == riid) { @@ -150,7 +150,7 @@ CIHVClassFactory::CreateInstance( } -STDMETHODIMP +STDMETHODIMP CIHVClassFactory::LockServer(BOOL fLock) { if (fLock) diff --git a/network/wlan/ihvsampleui/IHVRegistryHelper.cpp b/network/wlan/ihvsampleui/IHVRegistryHelper.cpp index ebe8622c9..ec0d39fed 100644 --- a/network/wlan/ihvsampleui/IHVRegistryHelper.cpp +++ b/network/wlan/ihvsampleui/IHVRegistryHelper.cpp @@ -40,13 +40,13 @@ typedef HRESULT (APIENTRY *UnregisterPageProc) ( #pragma warning (push) #pragma warning (disable:6262) -HRESULT +HRESULT CRegHelper::RegisterServer () { HRESULT hr = S_OK; - wchar_t wszModule[_MAX_PATH] = {0}; + wchar_t wszModule[_MAX_PATH] = {0}; DWORD result = 0; - + result = GetModuleFileName(g_hInst, wszModule, ARRAY_SIZE(wszModule)); if (result == 0) @@ -67,7 +67,7 @@ CRegHelper::RegisterServer () FAILHR(SetKeyAndValue(wszCLSIDKey, NULL, CLSID_CALLBACK_FRIENDLY_NAME)); // set the server path. FAILHR(SetKeyAndValue(wszCLSIDKey, INPROCSERVER32, wszModule)); - + // add the threading model information. hr = StringCchPrintfW(wszInprocKey, MAX_LENGTH + 2, L"%s\\%s", wszCLSIDKey, INPROCSERVER32); if(FAILED(hr)) @@ -75,19 +75,19 @@ CRegHelper::RegisterServer () hr = S_FALSE; return hr; } - + FAILHR(SetRegValue(wszInprocKey, THREADINGMODEL, FREETHREADING)); // register the extension UI wizard page - HINSTANCE hinstLib = LoadLibrary(TEXT("connect.dll")); - if (hinstLib != NULL) + HINSTANCE hinstLib = LoadLibrary(TEXT("connect.dll")); + if (hinstLib != NULL) { - + // get the export function used for registering - RegisterPageWithPageProc registerPageWithPageProc = + RegisterPageWithPageProc registerPageWithPageProc = (RegisterPageWithPageProc) GetProcAddress(hinstLib, (LPCSTR)("RegisterPageWithPage")); - if (NULL != registerPageWithPageProc) + if (NULL != registerPageWithPageProc) { hr = (registerPageWithPageProc) (NULL, // stand alone page (no parent) &GUID_SAMPLE_IHVUI_CLSID, // clsid of the extension UI wizard page @@ -95,10 +95,10 @@ CRegHelper::RegisterServer () CLSID_CALLBACK_FRIENDLY_NAME, // friendly name 0x2, // allow duplicate instances 0, // no user flags - NULL); // no command line + NULL); // no command line } - FreeLibrary(hinstLib); + FreeLibrary(hinstLib); } return hr; @@ -108,7 +108,7 @@ CRegHelper::RegisterServer () // // UnRegisterServer - Register the COM Server by creating required keys // -HRESULT +HRESULT CRegHelper::UnregisterServer() { HRESULT hr = S_OK; @@ -120,7 +120,7 @@ CRegHelper::UnregisterServer() StringCchCatW(wszCLSIDKey, MAX_LENGTH, L"\\"); StringCchCatW(wszCLSIDKey, MAX_LENGTH, CLSIDSTR_CALLBACK); StringCchCatW(wszCLSIDKey, MAX_LENGTH, L"\\"); - StringCchCatW(wszCLSIDKey, MAX_LENGTH, INPROCSERVER32); + StringCchCatW(wszCLSIDKey, MAX_LENGTH, INPROCSERVER32); // delete the sub key of the Class ID key @@ -134,24 +134,24 @@ CRegHelper::UnregisterServer() FAILHR(DeleteKey(wszCLSIDKey)); // unregister the extension UI wizard page - HINSTANCE hinstLib = LoadLibrary(TEXT("connect.dll")); - if (hinstLib != NULL) + HINSTANCE hinstLib = LoadLibrary(TEXT("connect.dll")); + if (hinstLib != NULL) { - + // get the export function used for unregistering - UnregisterPageProc unregisterPageProc = + UnregisterPageProc unregisterPageProc = (UnregisterPageProc) GetProcAddress(hinstLib, (LPCSTR)("UnregisterPage")); - if (NULL != unregisterPageProc) + if (NULL != unregisterPageProc) { hr = (unregisterPageProc) (&GUID_SAMPLE_IHVUI_CLSID, // clsid of the extension UI wizard page FALSE); // already unregistered from COM } - FreeLibrary(hinstLib); + FreeLibrary(hinstLib); } - return hr; + return hr; } @@ -159,7 +159,7 @@ CRegHelper::UnregisterServer() // Set an entry in the registry of the form: // HKEY_CLASSES_ROOT\wszKey\wszSubkey = wszValue // -BOOL +BOOL CRegHelper::SetKeyAndValue( const wchar_t* pwszKey, const wchar_t* pwszSubkey, @@ -181,41 +181,41 @@ CRegHelper::SetKeyAndValue( // create the registry key. if (RegCreateKeyEx( - HKEY_CLASSES_ROOT, - wszRegKey, - 0, + HKEY_CLASSES_ROOT, + wszRegKey, + 0, NULL, - REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, NULL, - &hKey, + &hKey, NULL) == ERROR_SUCCESS) { // set the value (if there is one). if (pwszValue != NULL) { RegSetValueEx( - hKey, - NULL, - 0, - REG_SZ, + hKey, + NULL, + 0, + REG_SZ, (BYTE *)pwszValue, (DWORD) ((wcslen(pwszValue) + 1) * sizeof (wchar_t)) ); } - - RegCloseKey(hKey); - + + RegCloseKey(hKey); + return TRUE; - } + } - return FALSE; + return FALSE; } // // SetRegValue - Open the key, create a new keyword and value pair under it. // -BOOL +BOOL CRegHelper::SetRegValue( const wchar_t* pwszKeyName, const wchar_t* pwszKeyword, @@ -226,25 +226,25 @@ CRegHelper::SetRegValue( // create the registration key. if (RegCreateKeyEx( - HKEY_CLASSES_ROOT, - pwszKeyName, - 0, + HKEY_CLASSES_ROOT, + pwszKeyName, + 0, NULL, - REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, + REG_OPTION_NON_VOLATILE, + KEY_ALL_ACCESS, NULL, - &hKey, + &hKey, NULL) == ERROR_SUCCESS) { // set the value (if there is one). if (pwszValue != NULL) { RegSetValueEx( - hKey, - pwszKeyword, - 0, - REG_SZ, - (BYTE *)pwszValue, + hKey, + pwszKeyword, + 0, + REG_SZ, + (BYTE *)pwszValue, (DWORD) ((wcslen(pwszValue) + 1) * sizeof (wchar_t)) ); } @@ -263,11 +263,11 @@ CRegHelper::SetRegValue( // Delete an entry in the registry of the form: // HKEY_CLASSES_ROOT\wszKey\wszSubkey = wszValue // -BOOL +BOOL CRegHelper::DeleteKey(const wchar_t* pwszSubkey) { DWORD result = 0; - + if (pwszSubkey != NULL) { // delete the registry key. diff --git a/network/wlan/ihvsampleui/IHVRegistryHelper.h b/network/wlan/ihvsampleui/IHVRegistryHelper.h index 76c85b1cc..a4f8e3bd9 100644 --- a/network/wlan/ihvsampleui/IHVRegistryHelper.h +++ b/network/wlan/ihvsampleui/IHVRegistryHelper.h @@ -24,17 +24,17 @@ class CRegHelper private: static BOOL SetKeyAndValue( - const wchar_t *pszKey, - const wchar_t *pszSubkey, - const wchar_t *pszValue + const wchar_t *pszKey, + const wchar_t *pszSubkey, + const wchar_t *pszValue ); - + static BOOL DeleteKey(const wchar_t *pszSubkey); - + static BOOL SetRegValue( - const wchar_t *pszKeyName, + const wchar_t *pszKeyName, const wchar_t *pszKeyword, - const wchar_t *pszValue + const wchar_t *pszValue ); }; diff --git a/network/wlan/ihvsampleui/IHVSample.idl b/network/wlan/ihvsampleui/IHVSample.idl index 81e051403..b4ec06627 100644 --- a/network/wlan/ihvsampleui/IHVSample.idl +++ b/network/wlan/ihvsampleui/IHVSample.idl @@ -15,7 +15,7 @@ interface IDot11SampleExtUIConProperty; interface IDot11SampleExtUISecProperty; [ - uuid(7ca89d4b-2c5b-4368-b53a-ffa14e031179), + uuid(7ca89d4b-2c5b-4368-b53a-ffa14e031179), helpstring(" Dot11 IHV Extensibility UI Interface"), dual ] @@ -27,7 +27,7 @@ interface IDot11SampleExtUI: IDot11ExtUI [ - uuid(61055513-2f27-4962-b29c-d6d7d1500fec), + uuid(61055513-2f27-4962-b29c-d6d7d1500fec), helpstring(" Dot11 IHV Extensibility UI Connection Properties Interface"), dual ] @@ -35,13 +35,13 @@ interface IDot11SampleExtUI: IDot11ExtUI interface IDot11SampleExtUIConProperty: IDot11ExtUIProperty { [id(1), hidden, helpstring("method Initialize")] - HRESULT + HRESULT Initialize([in] BSTR bstrPropertyName); } [ - uuid(12c211ae-1b6d-471c-9c1b-698bcc9b9d97), + uuid(12c211ae-1b6d-471c-9c1b-698bcc9b9d97), helpstring(" Dot11 IHV Extensibility UI Security Properties Interface"), dual ] @@ -49,13 +49,13 @@ interface IDot11SampleExtUIConProperty: IDot11ExtUIProperty interface IDot11SampleExtUISecProperty: IDot11ExtUIProperty { [id(1), hidden, helpstring("method Initialize")] - HRESULT + HRESULT Initialize([in] BSTR bstrPropertyName, [in] DWORD dwIhvSecurity); } [ - uuid(a18bae3c-39c2-4b34-ba49-0130e431d2ca), + uuid(a18bae3c-39c2-4b34-ba49-0130e431d2ca), helpstring(" Dot11 IHV Extensibility UI Key Properties Interface"), dual ] @@ -63,7 +63,7 @@ interface IDot11SampleExtUISecProperty: IDot11ExtUIProperty interface IDot11SampleExtUIKeyProperty: IDot11ExtUIProperty { [id(1), hidden, helpstring("method Initialize")] - HRESULT + HRESULT Initialize([in] BYTE* pvData); } diff --git a/network/wlan/ihvsampleui/IHVSampleExtUI.cpp b/network/wlan/ihvsampleui/IHVSampleExtUI.cpp index a5e60d7a9..5f2138085 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUI.cpp +++ b/network/wlan/ihvsampleui/IHVSampleExtUI.cpp @@ -9,7 +9,7 @@ extern HINSTANCE g_hInst; LPWSTR g_IHVAuthFriendlyName[] = { - L"IHVAuth V1", + L"IHVAuth V1", L"IHVAuth V2", L"IHVAuth V3" }; @@ -21,7 +21,7 @@ LPWSTR g_IHVCipherFriendlyName[] = { L"IHVCipher 3" }; -IHV_AUTH_CIPHER_CAPABILITY g_IHVOneXExtCapability = +IHV_AUTH_CIPHER_CAPABILITY g_IHVOneXExtCapability = { 3, { @@ -58,7 +58,7 @@ T* GetThis(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (sizeof(PROPSHEETPAGE) == ((LPPROPSHEETPAGE)lParam)->dwSize) { - // This corresponds to MSDN + // This corresponds to MSDN pThis = (T *)((LPPROPSHEETPAGE)lParam)->lParam; } else @@ -86,7 +86,7 @@ T* GetThis(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) CDot11SampleExtUI::CDot11SampleExtUI(): m_crefCount(0) { InterlockedIncrement(&g_objRefCount); - + m_pUnkSite = NULL; m_hFirstPagePsp = NULL; m_hLastPagePsp = NULL; @@ -95,13 +95,13 @@ CDot11SampleExtUI::CDot11SampleExtUI(): m_crefCount(0) CDot11SampleExtUI::~CDot11SampleExtUI() { - InterlockedDecrement(&g_objRefCount); + InterlockedDecrement(&g_objRefCount); if( m_pUIRequest) { delete m_pUIRequest; } - + if( m_pUnkSite) { m_pUnkSite ->Release(); @@ -111,7 +111,7 @@ CDot11SampleExtUI::~CDot11SampleExtUI() // Used to get the IHV friendly name STDMETHODIMP -CDot11SampleExtUI::GetDot11ExtUIFriendlyName( +CDot11SampleExtUI::GetDot11ExtUIFriendlyName( BSTR* bstrFriendlyName) { HRESULT hr = E_INVALIDARG; @@ -163,7 +163,7 @@ CDot11SampleExtUI::GetDot11ExtUIProperties( hr = E_NOTIMPL; break; } - + error: return hr; } @@ -174,7 +174,7 @@ STDMETHODIMP CDot11SampleExtUI::GetDot11ExtUIBalloonText( BSTR pIHVUIRequest, // the UI request structure from IHV BSTR* pwszBalloonText // the balloon text to be displayed - ) + ) { HRESULT hr = E_INVALIDARG; PDOT11EXT_IHV_UI_REQUEST pIhvUiRequest = (PDOT11EXT_IHV_UI_REQUEST) pIHVUIRequest; @@ -206,7 +206,7 @@ CDot11SampleExtUI::CreateConnectionProperties( IDot11SampleExtUIConProperty **pprgProps = NULL; uCount = PROP_COUNT_CONNECTION; - pprgProps = (IDot11SampleExtUIConProperty**) + pprgProps = (IDot11SampleExtUIConProperty**) CoTaskMemAlloc(sizeof(IDot11SampleExtUIConProperty*) * uCount); if (!pprgProps) @@ -215,7 +215,7 @@ CDot11SampleExtUI::CreateConnectionProperties( goto error; } - // Since we just have one property of each, we'll + // Since we just have one property of each, we'll // create one interface first and initialize it separately IDot11SampleExtUIConProperty *pTempIProp = NULL; hr = CoCreateInstance( @@ -239,12 +239,12 @@ CDot11SampleExtUI::CreateConnectionProperties( if (SUCCEEDED(hr)) { *pcExtensions = uCount; - *ppDot11ExtUIProperty = (IDot11ExtUIProperty*)pprgProps; + *ppDot11ExtUIProperty = (IDot11ExtUIProperty*)pprgProps; // Set the current pointer to NULL so it doesn't get freed at the bottom pprgProps = NULL; } - + error: if (FAILED(hr) && pprgProps) { @@ -270,7 +270,7 @@ CDot11SampleExtUI::CreateSecurityProperties( IDot11SampleExtUISecProperty **pprgProps = NULL; uCount = PROP_COUNT_SECURITY; - pprgProps = (IDot11SampleExtUISecProperty**) + pprgProps = (IDot11SampleExtUISecProperty**) CoTaskMemAlloc(sizeof(IDot11SampleExtUISecProperty*) * uCount); if (!pprgProps) @@ -279,7 +279,7 @@ CDot11SampleExtUI::CreateSecurityProperties( goto error; } - // Since we just have one property of each, we'll + // Since we just have one property of each, we'll // create one interface first and initialize it separately IDot11SampleExtUISecProperty *pTempIProp = NULL; @@ -311,21 +311,21 @@ CDot11SampleExtUI::CreateSecurityProperties( 128, wstrSecurityTypes[i] ); - + strName = SysAllocString(wbuf); hr = pTempIProp->Initialize(strName, i); pprgProps[i] = pTempIProp; } - + if (SUCCEEDED(hr)) { *pcExtensions = uCount; - *ppDot11ExtUIProperty = (IDot11ExtUIProperty*)pprgProps; + *ppDot11ExtUIProperty = (IDot11ExtUIProperty*)pprgProps; // Set the current pointer to NULL so it doesn't get freed at the bottom pprgProps = NULL; } - + error: if (FAILED(hr) && pprgProps) { @@ -351,7 +351,7 @@ CDot11SampleExtUI::CreateKeyProperties( uCount = g_IHVOneXExtCapability.dwAuthCount; - pprgProps = (IDot11SampleExtUIKeyProperty**) + pprgProps = (IDot11SampleExtUIKeyProperty**) CoTaskMemAlloc(sizeof(IDot11SampleExtUIKeyProperty*) * uCount); if (!pprgProps) @@ -360,7 +360,7 @@ CDot11SampleExtUI::CreateKeyProperties( goto error; } - // Since we just have one property of each, we'll + // Since we just have one property of each, we'll // create one interface first and initialize it separately IDot11SampleExtUIKeyProperty *pTempIProp = NULL; @@ -397,16 +397,16 @@ CDot11SampleExtUI::CreateKeyProperties( hr = pTempIProp->Initialize((BYTE *) &(g_IHVOneXExtCapability.IhvAuthCiphers[i])); pprgProps[i] = pTempIProp; } - + if (SUCCEEDED(hr)) { *pcExtensions = uCount; - *ppDot11ExtUIProperty = (IDot11ExtUIProperty*)pprgProps; + *ppDot11ExtUIProperty = (IDot11ExtUIProperty*)pprgProps; // Set the current pointer to NULL so it doesn't get freed at the bottom pprgProps = NULL; } - + error: if (FAILED(hr) && pprgProps) { @@ -418,7 +418,7 @@ CDot11SampleExtUI::CreateKeyProperties( } -HRESULT +HRESULT CDot11SampleExtUI::FinalConstruct() { m_pUnkSite = NULL; @@ -429,7 +429,7 @@ CDot11SampleExtUI::FinalConstruct() return S_OK; } -VOID +VOID CDot11SampleExtUI::FinalRelease() { if( m_pUnkSite) @@ -447,7 +447,7 @@ CDot11SampleExtUI::FinalRelease() } // IObjectWithSite -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUI::SetSite ( IUnknown* pUnkSite ) @@ -463,9 +463,9 @@ CDot11SampleExtUI::SetSite ( return S_OK; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUI::GetSite ( - REFIID riid, + REFIID riid, void** ppvSite ) { @@ -479,8 +479,8 @@ CDot11SampleExtUI::GetSite ( //IWizardExtension STDMETHODIMP CDot11SampleExtUI::AddPages ( - HPROPSHEETPAGE* aPages, - UINT cPages, + HPROPSHEETPAGE* aPages, + UINT cPages, UINT *pnPagesAdded ) { @@ -497,7 +497,7 @@ STDMETHODIMP CDot11SampleExtUI::AddPages ( WCHAR ihvKeyName[IHV_KEY_LENGTH]; GetClsidPropertyName ( - & GUID_SAMPLE_IHVUI_CLSID, + & GUID_SAMPLE_IHVUI_CLSID, (LPWSTR) c_szIhvUIRequest, ihvKeyName, IHV_KEY_LENGTH @@ -576,7 +576,7 @@ STDMETHODIMP CDot11SampleExtUI::AddPages ( { DestroyPropertySheetPage(hPsp); } - + if(m_hLastPagePsp) { DestroyPropertySheetPage(m_hLastPagePsp); @@ -584,7 +584,7 @@ STDMETHODIMP CDot11SampleExtUI::AddPages ( m_hFirstPagePsp = hPsp = m_hLastPagePsp = NULL; - return E_FAIL; + return E_FAIL; } } @@ -596,7 +596,7 @@ STDMETHODIMP CDot11SampleExtUI::GetFirstPage ( return S_OK; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUI::GetLastPage (HPROPSHEETPAGE *phpage) { * phpage = m_hLastPagePsp; @@ -604,22 +604,22 @@ CDot11SampleExtUI::GetLastPage (HPROPSHEETPAGE *phpage) } -BOOL CALLBACK +BOOL CALLBACK CDot11SampleExtUI::HelpDlgProc ( - HWND hwndDlg, + HWND hwndDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam + LPARAM lParam ) { - CDot11SampleExtUI* pthis = NULL; + CDot11SampleExtUI* pthis = NULL; switch (uMsg) { case WM_INITDIALOG: { - pthis = GetThis(hwndDlg, uMsg, wParam, lParam); + pthis = GetThis(hwndDlg, uMsg, wParam, lParam); if(pthis && pthis->m_pUIRequest) { // @@ -629,7 +629,7 @@ CDot11SampleExtUI::HelpDlgProc ( if (iBufferSize > 0) { WCHAR *pwszBuffer = new WCHAR[iBufferSize]; - + if (NULL != pwszBuffer) { pwszBuffer[0] = 0; @@ -645,7 +645,7 @@ CDot11SampleExtUI::HelpDlgProc ( } return TRUE; - case WM_DESTROY: + case WM_DESTROY: { // Don't release our properties here, wait // rather for Abort or Commit event notifications. @@ -668,7 +668,7 @@ CDot11SampleExtUI::HelpDlgProc ( IWizardSite *pIWizardSite = NULL; HRESULT hr = S_OK; - pthis = GetThis(hwndDlg, uMsg, wParam, lParam); + pthis = GetThis(hwndDlg, uMsg, wParam, lParam); if(pthis != NULL) { hr = pthis->m_pUnkSite->QueryInterface(IID_IWizardSite, (VOID **)&pIWizardSite); @@ -694,26 +694,26 @@ CDot11SampleExtUI::HelpDlgProc ( } -BOOL CALLBACK +BOOL CALLBACK CDot11SampleExtUI::GetKeyDlgProc ( - HWND hwndDlg, + HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) { - CDot11SampleExtUI* pthis = NULL; + CDot11SampleExtUI* pthis = NULL; switch (uMsg) { case WM_INITDIALOG: { - (VOID)GetThis(hwndDlg, uMsg, wParam, lParam); + (VOID)GetThis(hwndDlg, uMsg, wParam, lParam); } return TRUE; - case WM_DESTROY: + case WM_DESTROY: { // Don't release our properties here, wait // rather for Abort or Commit event notifications. @@ -750,11 +750,11 @@ CDot11SampleExtUI::GetKeyDlgProc ( WCHAR ihvKeyName[IHV_KEY_LENGTH] = {0}; pthis->GetClsidPropertyName( - &GUID_SAMPLE_IHVUI_CLSID, + &GUID_SAMPLE_IHVUI_CLSID, (LPWSTR) c_szIhvUIResponse, ihvKeyName, IHV_KEY_LENGTH - ); + ); // Make sure we remove the previous property if any hr = pIPropertyBag->Read(ihvKeyName, &v, NULL); @@ -766,7 +766,7 @@ CDot11SampleExtUI::GetKeyDlgProc ( // Write the updated property if any hr = pIPropertyBag->Write(ihvKeyName, &v); pIPropertyBag->Release(); - + // // hr is not used below // @@ -807,25 +807,25 @@ CDot11SampleExtUI::GetKeyDlgProc ( } -BOOL CALLBACK +BOOL CALLBACK CDot11SampleExtUI::LastPageDlgProc( - HWND hwndDlg, + HWND hwndDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam + LPARAM lParam ) { - CDot11SampleExtUI* pthis = NULL; + CDot11SampleExtUI* pthis = NULL; switch (uMsg) { case WM_INITDIALOG: { - (VOID)GetThis(hwndDlg, uMsg, wParam, lParam); + (VOID)GetThis(hwndDlg, uMsg, wParam, lParam); } return TRUE; - case WM_DESTROY: + case WM_DESTROY: { (VOID)GetThis(hwndDlg, uMsg, wParam, lParam); } @@ -897,7 +897,7 @@ CDot11SampleExtUI::LastPageDlgProc( } HRESULT CDot11SampleExtUI::GetClsidPropertyName ( - _In_ const CLSID* pCLSID, + _In_ const CLSID* pCLSID, _In_opt_ PCWSTR pwszPropertyName, _Out_writes_(maxResultLen) PWSTR pwszResultStr, _In_ UINT maxResultLen) @@ -908,10 +908,10 @@ HRESULT CDot11SampleExtUI::GetClsidPropertyName ( wchar_t *pwszKeyName = NULL; HRESULT hRetCode = S_OK; size_t iCharCount = 0; - + // Sanity //======= - + if( pCLSID == NULL || pwszResultStr == NULL || maxResultLen < MIN_BUFFER_SIZE @@ -919,53 +919,53 @@ HRESULT CDot11SampleExtUI::GetClsidPropertyName ( { return E_INVALIDARG; } - + // Convert CLSID to string //======================== - + hRetCode = StringFromCLSID(*pCLSID, &pwszCLSID); if(FAILED(hRetCode)) { goto Done; } - + // Allocate buffer for entire CLSID\PropertyName string //===================================================== - + iCharCount = wcslen(pwszCLSID) + 1; if(pwszPropertyName) { iCharCount += wcslen(pwszPropertyName); } - + pwszKeyName = new(std::nothrow) wchar_t[iCharCount]; if(pwszKeyName == NULL) { hRetCode = E_OUTOFMEMORY; goto Done; } - + swprintf_s(pwszKeyName, iCharCount, L"%s%s", pwszCLSID, pwszPropertyName ? pwszPropertyName : L""); - + // Copy as much as we can to the target buffer //============================================ - + wcsncpy_s(pwszResultStr, maxResultLen, pwszKeyName, _TRUNCATE); - + Done: if(pwszKeyName != NULL) { delete [] pwszKeyName; } - + if(pwszCLSID != NULL) { CoTaskMemFree(pwszCLSID); } return hRetCode; -} +} diff --git a/network/wlan/ihvsampleui/IHVSampleExtUI.h b/network/wlan/ihvsampleui/IHVSampleExtUI.h index 474c56a3f..779b91e45 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUI.h +++ b/network/wlan/ihvsampleui/IHVSampleExtUI.h @@ -21,7 +21,7 @@ extern long g_serverLock; // IHV Auth types typedef enum _IHV_AUTH_TYPE { - IHVAuthV1, + IHVAuthV1, IHVAuthV2, IHVAuthV3, IHVAuthInvalid @@ -54,7 +54,7 @@ typedef struct _IHV_SECURITY_CONFIG { IHV_CIPHER_TYPE Cipher; } IHV_SECURITY_CONFIG, *PIHV_SECURITY_CONFIG; -extern IHV_AUTH_CIPHER_CAPABILITY g_IHVOneXExtCapability; +extern IHV_AUTH_CIPHER_CAPABILITY g_IHVOneXExtCapability; extern LPWSTR g_IHVAuthFriendlyName[]; extern LPWSTR g_IHVCipherFriendlyName[]; @@ -65,7 +65,7 @@ extern LPWSTR g_IHVCipherFriendlyName[]; #define PROP_COUNT_SECURITY 2 #define PROP_COUNT_SEC_CIPHERS 2 typedef enum _IHV_SECURITY_TYPE { - IHVSecurityV1, + IHVSecurityV1, IHVSecurityV2, IHVSecurityInvalid } IHV_SECURITY_TYPE, *PIHV_SECURITY_TYPE; @@ -89,7 +89,7 @@ typedef struct _IHV_CIPHERS_FOR_AUTH_INFO static DOT11_EXT_UI_PROPERTY_DISPLAY_INFO cipherOne = {1, DOT11_EXT_UI_DISPLAY_INFO_CIPHER, 0}; static DOT11_EXT_UI_PROPERTY_DISPLAY_INFO cipherTwo = {2, DOT11_EXT_UI_DISPLAY_INFO_CIPHER, 0}; static DOT11_EXT_UI_PROPERTY_DISPLAY_INFO cipherThree = {3, DOT11_EXT_UI_DISPLAY_INFO_CIPHER, 0}; -static DOT11_EXT_UI_PROPERTY_DISPLAY_INFO ciphersInfoArray[MAX_IHV_AUTHS][MAX_IHV_CIPHERS] = {0}; +static DOT11_EXT_UI_PROPERTY_DISPLAY_INFO ciphersInfoArray[MAX_IHV_AUTHS][MAX_IHV_CIPHERS] = {0}; //////// structures for balloon ///////// @@ -123,7 +123,7 @@ class CDot11SampleExtUI: public IDot11SampleExtUI, public IWizardExtension, publ CDot11SampleExtUI(); ~CDot11SampleExtUI(); - + // IUnknown Implementation BEGIN_INTERFACE_TABLE() IMPLEMENTS_INTERFACE(IDot11ExtUI) @@ -155,7 +155,7 @@ class CDot11SampleExtUI: public IDot11SampleExtUI, public IWizardExtension, publ ULONG *pcExtensions, IDot11ExtUIProperty **ppDot11ExtUIProperty ); - + HRESULT CreateSecurityProperties( ULONG *pcExtensions, @@ -174,14 +174,14 @@ class CDot11SampleExtUI: public IDot11SampleExtUI, public IWizardExtension, publ ); STDMETHOD (GetSite) ( - REFIID riid, + REFIID riid, void** ppvSite ); //IWizardExtension STDMETHOD (AddPages) ( - HPROPSHEETPAGE* aPages, - UINT cPages, + HPROPSHEETPAGE* aPages, + UINT cPages, UINT *pnPagesAdded ); @@ -197,29 +197,29 @@ class CDot11SampleExtUI: public IDot11SampleExtUI, public IWizardExtension, publ HRESULT FinalConstruct(); void FinalRelease(); static BOOL CALLBACK GetKeyDlgProc ( - HWND hwndDlg, + HWND hwndDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam + LPARAM lParam ); - + static BOOL CALLBACK HelpDlgProc ( - HWND hwndDlg, + HWND hwndDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam + LPARAM lParam ); static BOOL CALLBACK LastPageDlgProc ( - HWND hwndDlg, + HWND hwndDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam + LPARAM lParam ); HRESULT GetClsidPropertyName ( - _In_ const CLSID* pCLSID, + _In_ const CLSID* pCLSID, _In_opt_ PCWSTR pwszPropertyName, _Out_writes_(maxResultLen) PWSTR pResultStr, _In_ UINT maxResultLen); @@ -227,9 +227,9 @@ class CDot11SampleExtUI: public IDot11SampleExtUI, public IWizardExtension, publ private: IHV_UI_REQUEST* m_pUIRequest; IHV_UI_RESPONSE m_UIResponse; - + IUnknown* m_pUnkSite; - + HPROPSHEETPAGE m_hFirstPagePsp; HPROPSHEETPAGE m_hLastPagePsp; }; diff --git a/network/wlan/ihvsampleui/IHVSampleExtUICon.cpp b/network/wlan/ihvsampleui/IHVSampleExtUICon.cpp index e5eeb6cd1..f292b6965 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUICon.cpp +++ b/network/wlan/ihvsampleui/IHVSampleExtUICon.cpp @@ -11,8 +11,8 @@ extern HINSTANCE g_hInst; CIhvConnectivityProfile* pIhvConProfile; -CDot11SampleExtUIConProperty::CDot11SampleExtUIConProperty(): - m_crefCount(0), m_fInitialized(false), +CDot11SampleExtUIConProperty::CDot11SampleExtUIConProperty(): + m_crefCount(0), m_fInitialized(false), m_ExtType(DOT11_EXT_UI_CONNECTION), m_fModified(FALSE) { m_bstrFN = NULL; @@ -22,14 +22,14 @@ CDot11SampleExtUIConProperty::CDot11SampleExtUIConProperty(): CDot11SampleExtUIConProperty::~CDot11SampleExtUIConProperty() { SysFreeString(m_bstrFN); - InterlockedDecrement(&g_objRefCount); + InterlockedDecrement(&g_objRefCount); } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::GetDot11ExtUIPropertyFriendlyName(BSTR* bstrPropertyName) { - HRESULT hr = E_INVALIDARG; + HRESULT hr = E_INVALIDARG; if (false == m_fInitialized) { return hr; @@ -45,18 +45,18 @@ CDot11SampleExtUIConProperty::GetDot11ExtUIPropertyFriendlyName(BSTR* bstrProper } //Used to extend property -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::DisplayDot11ExtUIProperty( - HWND hParent, // Parent Window Handle - BSTR bstrIHVProfile, // IHV data from the profile + HWND hParent, // Parent Window Handle + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ) { - HRESULT hr = S_OK; + HRESULT hr = S_OK; UNREFERENCED_PARAMETER(pIHVParams); - + if (!m_fInitialized) { hr = E_INVALIDARG; @@ -76,9 +76,9 @@ CDot11SampleExtUIConProperty::DisplayDot11ExtUIProperty( // Dialog will store the string in a member variable DialogBoxParam( - g_hInst, - MAKEINTRESOURCE(IDD_PROPPAGE_SMALL), - hParent, + g_hInst, + MAKEINTRESOURCE(IDD_PROPPAGE_SMALL), + hParent, SimpleDialogProcCon, (LPARAM)pIhvConProfile ); @@ -89,7 +89,7 @@ CDot11SampleExtUIConProperty::DisplayDot11ExtUIProperty( { if (m_fModified) { - pIhvConProfile->EmitXml(bstrModifiedIHVProfile); + pIhvConProfile->EmitXml(bstrModifiedIHVProfile); } } @@ -110,9 +110,9 @@ CDot11SampleExtUIConProperty::DisplayDot11ExtUIProperty( //Used to get the currently chosen entry to display as selected in the dropdown list -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::Dot11ExtUIPropertyGetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BOOL* pfIsSelected // flag denoting if this is the selected profile ) @@ -123,14 +123,14 @@ CDot11SampleExtUIConProperty::Dot11ExtUIPropertyGetSelected( // since there is only one connection profile always set it to true *pfIsSelected = TRUE; - + return hr; } //Used to set the current entry as chosen from the dropdown list -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::Dot11ExtUIPropertySetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified @@ -157,18 +157,18 @@ CDot11SampleExtUIConProperty::Dot11ExtUIPropertySetSelected( pIhvConProfile->EmitXml(bstrModifiedIHVProfile); *pbIsModified = pIhvConProfile->GetModified(); - + error: if(pIhvConProfile != NULL) { delete pIhvConProfile; pIhvConProfile = NULL; } - return hr; + return hr; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::Dot11ExtUIPropertyHasConfigurationUI( BOOL *fHasConfigurationUI ) @@ -179,10 +179,10 @@ CDot11SampleExtUIConProperty::Dot11ExtUIPropertyHasConfigurationUI( } //Used to get additional display data (ciphers for auth types) -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::Dot11ExtUIPropertyGetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be described - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings ULONG *pcEntries, // number of dependent strings ULONG *puDefaultSelection, // the entry in the array to be selected by default @@ -199,10 +199,10 @@ CDot11SampleExtUIConProperty::Dot11ExtUIPropertyGetDisplayInfo( return E_NOTIMPL; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIConProperty::Dot11ExtUIPropertySetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be modified - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings DOT11_EXT_UI_PROPERTY_DISPLAY_INFO *pDot11ExtUIProperty, // selected info structure BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile @@ -226,13 +226,13 @@ CDot11SampleExtUIConProperty::Dot11ExtUIPropertyIsStandardSecurity( { UNREFERENCED_PARAMETER(dot11ExtUISecurityType); *fIsStandardSecurity = FALSE; - return E_NOTIMPL; + return E_NOTIMPL; } STDMETHODIMP CDot11SampleExtUIConProperty::Initialize(BSTR bstrPropertyName) { - HRESULT hr = E_INVALIDARG; + HRESULT hr = E_INVALIDARG; if (false == m_fInitialized) { // Set the FriendlyName @@ -243,7 +243,7 @@ CDot11SampleExtUIConProperty::Initialize(BSTR bstrPropertyName) return hr; } -INT_PTR CALLBACK +INT_PTR CALLBACK SimpleDialogProcCon( HWND hwndDlg, UINT uMsg, @@ -262,7 +262,7 @@ SimpleDialogProcCon( { goto error; } - + switch(uMsg) { case WM_INITDIALOG: @@ -275,59 +275,59 @@ SimpleDialogProcCon( strDialogTitle, MAX_PATH ); - + SetWindowText(hwndDlg, strDialogTitle); } - + // check the checkbox if needed if(FAILED(pIhvConProfile->GetParamDWORD(&dwValue))) { dwValue = 0; } ::SendMessage( - GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), - BM_SETCHECK, - (WPARAM)(int)dwValue, + GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), + BM_SETCHECK, + (WPARAM)(int)dwValue, 0L ); - + // Set text in the textbox if(FAILED(pIhvConProfile->GetParamBSTR(&bstrText))) { bstrText = NULL; } SetWindowText(GetDlgItem(hwndDlg, IDC_PARAM_BOX), bstrText); - + fRetVal = TRUE; break; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case ID_OK: + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case ID_OK: GetWindowText(GetDlgItem(hwndDlg, IDC_PARAM_BOX), szBuf, 255); if(szBuf) { DWORD dwNewValue = 0; - + // get the button state and record it dwNewValue = (int)::SendMessage( - GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), - BM_GETCHECK, - 0L, + GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), + BM_GETCHECK, + 0L, 0L ); - pIhvConProfile->SetParamDWORD(dwNewValue); + pIhvConProfile->SetParamDWORD(dwNewValue); pIhvConProfile->SetParamBSTR(szBuf); - - // Notify the owner window to carry out the task. + + // Notify the owner window to carry out the task. EndDialog(hwndDlg, 1); - fRetVal = TRUE; + fRetVal = TRUE; } break; - case ID_CANCEL: + case ID_CANCEL: EndDialog(hwndDlg, 0); fRetVal = TRUE; break; diff --git a/network/wlan/ihvsampleui/IHVSampleExtUICon.h b/network/wlan/ihvsampleui/IHVSampleExtUICon.h index fd58c1063..2be9a38a6 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUICon.h +++ b/network/wlan/ihvsampleui/IHVSampleExtUICon.h @@ -12,62 +12,62 @@ class CDot11SampleExtUIConProperty: public IDot11SampleExtUIConProperty CDot11SampleExtUIConProperty(); ~CDot11SampleExtUIConProperty(); - + // IUnknown Implementation BEGIN_INTERFACE_TABLE() IMPLEMENTS_INTERFACE(IDot11SampleExtUIConProperty) END_INTERFACE_TABLE(); - STDMETHODIMP + STDMETHODIMP GetDot11ExtUIPropertyFriendlyName( BSTR* bstrPropertyName // IHV friendly name ); //Used to extend property - STDMETHODIMP + STDMETHODIMP DisplayDot11ExtUIProperty( - HWND hParent, // Parent Window Handle - BSTR bstrIHVProfile, // IHV data from the profile + HWND hParent, // Parent Window Handle + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ); //Used to get the currently chosen entry to display as selected in the dropdown list - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyGetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BOOL* pfIsSelected // flag denoting if this is the selected profile ); //Used to set the current entry as chosen from the dropdown list - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertySetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ); - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyHasConfigurationUI(BOOL *fHasConfigurationUI); //Used to get additional display data (ciphers for auth types) - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyGetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be described - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings ULONG *pcEntries, // number of dependent strings ULONG *puDefaultSelection, // the entry in the array to be selected by default DOT11_EXT_UI_PROPERTY_DISPLAY_INFO **ppDot11ExtUIProperty // array of returned info structure ); - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertySetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be modified - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings DOT11_EXT_UI_PROPERTY_DISPLAY_INFO *pDot11ExtUIProperty, // selected info structure BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile @@ -79,7 +79,7 @@ class CDot11SampleExtUIConProperty: public IDot11SampleExtUIConProperty BOOL *fIsStandardSecurity, // if this interface is a standard auth method DOT11_EXT_UI_SECURITY_TYPE *dot11ExtUISecurityType // which of the standard auth methods it is ); - + // initialize the connection page STDMETHODIMP Initialize(BSTR bstrPropertyName); @@ -92,7 +92,7 @@ class CDot11SampleExtUIConProperty: public IDot11SampleExtUIConProperty }; -INT_PTR CALLBACK +INT_PTR CALLBACK SimpleDialogProcCon( HWND hwndDlg, UINT uMsg, diff --git a/network/wlan/ihvsampleui/IHVSampleExtUIKey.cpp b/network/wlan/ihvsampleui/IHVSampleExtUIKey.cpp index 19c9610a2..46e950ae1 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUIKey.cpp +++ b/network/wlan/ihvsampleui/IHVSampleExtUIKey.cpp @@ -11,13 +11,13 @@ extern HINSTANCE g_hInst; CIhvSecurityProfile* pIhvKeyProfile; -CDot11SampleExtUIKeyProperty::CDot11SampleExtUIKeyProperty(): - m_crefCount(0), m_fInitialized(false), +CDot11SampleExtUIKeyProperty::CDot11SampleExtUIKeyProperty(): + m_crefCount(0), m_fInitialized(false), m_ExtType(DOT11_EXT_UI_KEYEXTENSION), m_fModified(FALSE) { InterlockedIncrement(&g_objRefCount); memset( - &m_IHVAuthCiphers, + &m_IHVAuthCiphers, 0, sizeof(IHV_AUTH_CIPHERS) ); @@ -29,15 +29,15 @@ CDot11SampleExtUIKeyProperty::~CDot11SampleExtUIKeyProperty() if(m_bstrFN != NULL) { SysFreeString(m_bstrFN); } - - InterlockedDecrement(&g_objRefCount); + + InterlockedDecrement(&g_objRefCount); } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::GetDot11ExtUIPropertyFriendlyName(BSTR* bstrPropertyName) { - HRESULT hr = E_INVALIDARG; + HRESULT hr = E_INVALIDARG; if (false == m_fInitialized) { return hr; @@ -53,18 +53,18 @@ CDot11SampleExtUIKeyProperty::GetDot11ExtUIPropertyFriendlyName(BSTR* bstrProper } //Used to extend property -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::DisplayDot11ExtUIProperty( - HWND hParent, // Parent Window Handle - BSTR bstrIHVProfile, // IHV data from the profile + HWND hParent, // Parent Window Handle + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ) { - HRESULT hr = S_OK; + HRESULT hr = S_OK; UNREFERENCED_PARAMETER(pIHVParams); - + if (!m_fInitialized) { hr = E_INVALIDARG; @@ -84,9 +84,9 @@ CDot11SampleExtUIKeyProperty::DisplayDot11ExtUIProperty( // Dialog will store the string in a member variable DialogBoxParam( - g_hInst, - MAKEINTRESOURCE(IDD_PROPPAGE_SMALL), - hParent, + g_hInst, + MAKEINTRESOURCE(IDD_PROPPAGE_SMALL), + hParent, SimpleDialogProcKey, (LPARAM)pIhvKeyProfile ); @@ -97,7 +97,7 @@ CDot11SampleExtUIKeyProperty::DisplayDot11ExtUIProperty( { if (m_fModified) { - pIhvKeyProfile->EmitXml(bstrModifiedIHVProfile); + pIhvKeyProfile->EmitXml(bstrModifiedIHVProfile); } } @@ -118,9 +118,9 @@ CDot11SampleExtUIKeyProperty::DisplayDot11ExtUIProperty( //Used to get the currently chosen entry to display as selected in the dropdown list -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyGetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BOOL* pfIsSelected // flag denoting if this is the selected profile ) @@ -143,7 +143,7 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyGetSelected( hr = E_OUTOFMEMORY; goto error; } - + pIhvKeyProfile->LoadXml(bstrIHVProfile); hr = pIhvKeyProfile->GetAuthType(¤tAuthType); @@ -160,20 +160,20 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyGetSelected( { *pfIsSelected = TRUE; } - + error: if(pIhvKeyProfile != NULL) { delete pIhvKeyProfile; pIhvKeyProfile = NULL; - } + } return hr; } //Used to set the current entry as chosen from the dropdown list -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertySetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified @@ -194,7 +194,7 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertySetSelected( hr = E_OUTOFMEMORY; goto error; } - + pIhvKeyProfile->LoadXml(bstrIHVProfile); pIhvKeyProfile->SetAuthType(m_IHVAuthCiphers.IHVAuth); @@ -202,18 +202,18 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertySetSelected( pIhvKeyProfile->EmitXml(bstrModifiedIHVProfile); *pbIsModified = pIhvKeyProfile->GetModified(); - + error: if(pIhvKeyProfile != NULL) { delete pIhvKeyProfile; pIhvKeyProfile = NULL; } - return hr; + return hr; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyHasConfigurationUI( BOOL *fHasConfigurationUI) { @@ -223,10 +223,10 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyHasConfigurationUI( } //Used to get additional display data (ciphers for auth types) -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyGetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be described - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings ULONG *pcEntries, // number of dependent strings ULONG *puDefaultSelection, // the entry in the array to be selected by default @@ -265,7 +265,7 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyGetDisplayInfo( dwDefaultSelection = i; } } - + // for the given auth type we want to return the list of compatible ciphers *ppDot11ExtUIProperty = ciphersInfoArray[m_IHVAuthCiphers.IHVAuth]; *pcEntries = m_IHVAuthCiphers.dwCipherCount; @@ -276,10 +276,10 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyGetDisplayInfo( } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertySetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be modified - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings DOT11_EXT_UI_PROPERTY_DISPLAY_INFO *pDot11ExtUIProperty, // selected info structure BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile @@ -317,7 +317,7 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertySetDisplayInfo( hr = IhvSecurityProfile.EmitXml(bstrModifiedIHVProfile); *pbIsModified = IhvSecurityProfile.GetModified(); - + error: return hr; } @@ -344,10 +344,10 @@ CDot11SampleExtUIKeyProperty::Dot11ExtUIPropertyIsStandardSecurity( STDMETHODIMP CDot11SampleExtUIKeyProperty::Initialize(BYTE* pbData) { - HRESULT hr = E_INVALIDARG; + HRESULT hr = E_INVALIDARG; PIHV_AUTH_CIPHERS pIhvAuthCiphers = NULL; pIhvAuthCiphers = (PIHV_AUTH_CIPHERS) pbData; - + if (false == m_fInitialized) { // Set the FriendlyName @@ -362,7 +362,7 @@ CDot11SampleExtUIKeyProperty::Initialize(BYTE* pbData) return hr; } -INT_PTR CALLBACK +INT_PTR CALLBACK SimpleDialogProcKey( HWND hwndDlg, UINT uMsg, @@ -381,7 +381,7 @@ SimpleDialogProcKey( { goto error; } - + switch(uMsg) { case WM_INITDIALOG: @@ -394,19 +394,19 @@ SimpleDialogProcKey( strDialogTitle, MAX_PATH ); - + SetWindowText(hwndDlg, strDialogTitle); } - + // check the checkbox if needed if(FAILED(pIhvKeyProfile->GetParamDWORD(&dwValue))) { dwValue = 0; } ::SendMessage( - GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), - BM_SETCHECK, - (WPARAM)(int)dwValue, + GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), + BM_SETCHECK, + (WPARAM)(int)dwValue, 0L ); @@ -416,14 +416,14 @@ SimpleDialogProcKey( bstrText = NULL; } SetWindowText(GetDlgItem(hwndDlg, IDC_PARAM_BOX), bstrText); - + fRetVal = TRUE; break; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case ID_OK: + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case ID_OK: GetWindowText(GetDlgItem(hwndDlg, IDC_PARAM_BOX), szBuf, 255); if(szBuf) { @@ -431,23 +431,23 @@ SimpleDialogProcKey( // get the button state and record it dwNewValue = (int)::SendMessage( - GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), - BM_GETCHECK, - 0L, + GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), + BM_GETCHECK, + 0L, 0L ); - pIhvKeyProfile->SetParamDWORD(dwNewValue); + pIhvKeyProfile->SetParamDWORD(dwNewValue); pIhvKeyProfile->SetParamBSTR(szBuf); pIhvKeyProfile->SetFullSecurityFlag(FALSE); - // Notify the owner window to carry out the task. + // Notify the owner window to carry out the task. EndDialog(hwndDlg, 1); - fRetVal = TRUE; + fRetVal = TRUE; } break; - case ID_CANCEL: + case ID_CANCEL: EndDialog(hwndDlg, 0); fRetVal = TRUE; break; diff --git a/network/wlan/ihvsampleui/IHVSampleExtUIKey.h b/network/wlan/ihvsampleui/IHVSampleExtUIKey.h index c106e549c..f4300cae0 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUIKey.h +++ b/network/wlan/ihvsampleui/IHVSampleExtUIKey.h @@ -12,62 +12,62 @@ class CDot11SampleExtUIKeyProperty: public IDot11SampleExtUIKeyProperty CDot11SampleExtUIKeyProperty(); ~CDot11SampleExtUIKeyProperty(); - + // IUnknown Implementation BEGIN_INTERFACE_TABLE() IMPLEMENTS_INTERFACE(IDot11SampleExtUIKeyProperty) END_INTERFACE_TABLE(); - STDMETHODIMP + STDMETHODIMP GetDot11ExtUIPropertyFriendlyName( BSTR* bstrPropertyName // IHV friendly name ); //Used to extend property - STDMETHODIMP + STDMETHODIMP DisplayDot11ExtUIProperty( - HWND hParent, // Parent Window Handle - BSTR bstrIHVProfile, // IHV data from the profile + HWND hParent, // Parent Window Handle + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ); //Used to get the currently chosen entry to display as selected in the dropdown list - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyGetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BOOL* pfIsSelected // flag denoting if this is the selected profile ); //Used to set the current entry as chosen from the dropdown list - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertySetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ); - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyHasConfigurationUI(BOOL *fHasConfigurationUI); //Used to get additional display data (ciphers for auth types) - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyGetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be described - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings ULONG *pcEntries, // number of dependent strings ULONG *puDefaultSelection, // the entry in the array to be selected by default DOT11_EXT_UI_PROPERTY_DISPLAY_INFO **ppDot11ExtUIProperty // array of returned info structure ); - - STDMETHODIMP + + STDMETHODIMP Dot11ExtUIPropertySetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be modified - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings DOT11_EXT_UI_PROPERTY_DISPLAY_INFO *pDot11ExtUIProperty, // selected info structure BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile @@ -79,7 +79,7 @@ class CDot11SampleExtUIKeyProperty: public IDot11SampleExtUIKeyProperty BOOL *fIsStandardSecurity, // if this interface is a standard auth method DOT11_EXT_UI_SECURITY_TYPE *dot11ExtUISecurityType // which of the standard auth methods it is ); - + // initialize the key extension page STDMETHODIMP Initialize(BYTE* pbData); @@ -93,7 +93,7 @@ class CDot11SampleExtUIKeyProperty: public IDot11SampleExtUIKeyProperty }; -INT_PTR CALLBACK +INT_PTR CALLBACK SimpleDialogProcKey( HWND hwndDlg, UINT uMsg, diff --git a/network/wlan/ihvsampleui/IHVSampleExtUISec.cpp b/network/wlan/ihvsampleui/IHVSampleExtUISec.cpp index 1cfa37149..27d22bd3b 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUISec.cpp +++ b/network/wlan/ihvsampleui/IHVSampleExtUISec.cpp @@ -10,9 +10,9 @@ extern HINSTANCE g_hInst; // used by the con prop extensions CIhvSecurityProfile* pIhvSecProfile; -CDot11SampleExtUISecProperty::CDot11SampleExtUISecProperty(): - m_crefCount(0), m_fInitialized(false), - m_ExtType(DOT11_EXT_UI_SECURITY), m_fModified(FALSE), +CDot11SampleExtUISecProperty::CDot11SampleExtUISecProperty(): + m_crefCount(0), m_fInitialized(false), + m_ExtType(DOT11_EXT_UI_SECURITY), m_fModified(FALSE), m_IhvSecurityType(IHVSecurityInvalid) { m_bstrFN = NULL; @@ -22,14 +22,14 @@ CDot11SampleExtUISecProperty::CDot11SampleExtUISecProperty(): CDot11SampleExtUISecProperty::~CDot11SampleExtUISecProperty() { SysFreeString(m_bstrFN); - InterlockedDecrement(&g_objRefCount); + InterlockedDecrement(&g_objRefCount); } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::GetDot11ExtUIPropertyFriendlyName(BSTR* bstrPropertyName) { - HRESULT hr = E_INVALIDARG; + HRESULT hr = E_INVALIDARG; if (false == m_fInitialized) { return hr; @@ -45,19 +45,19 @@ CDot11SampleExtUISecProperty::GetDot11ExtUIPropertyFriendlyName(BSTR* bstrProper } //Used to extend property -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::DisplayDot11ExtUIProperty( - HWND hParent, // Parent Window Handle - BSTR bstrIHVProfile, // IHV data from the profile + HWND hParent, // Parent Window Handle + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ) { - HRESULT hr = S_OK; + HRESULT hr = S_OK; UNREFERENCED_PARAMETER(pIHVParams); - + if (!m_fInitialized) { hr = E_INVALIDARG; @@ -76,9 +76,9 @@ CDot11SampleExtUISecProperty::DisplayDot11ExtUIProperty( // Dialog will store the string in a member variable DialogBoxParam( - g_hInst, - MAKEINTRESOURCE(IDD_PROPPAGE_SMALL), - hParent, + g_hInst, + MAKEINTRESOURCE(IDD_PROPPAGE_SMALL), + hParent, SimpleDialogProcSec, (LPARAM)pIhvSecProfile ); @@ -89,7 +89,7 @@ CDot11SampleExtUISecProperty::DisplayDot11ExtUIProperty( { if (m_fModified) { - pIhvSecProfile->EmitXml(bstrModifiedIHVProfile); + pIhvSecProfile->EmitXml(bstrModifiedIHVProfile); } } @@ -110,9 +110,9 @@ CDot11SampleExtUISecProperty::DisplayDot11ExtUIProperty( //Used to get the currently chosen entry to display as selected in the dropdown list -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::Dot11ExtUIPropertyGetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BOOL* pfIsSelected // flag denoting if this is the selected profile ) @@ -136,7 +136,7 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertyGetSelected( hr = E_OUTOFMEMORY; goto error; } - + pIhvSecProfile->LoadXml(bstrIHVProfile); hr = pIhvSecProfile->GetSecurityType(¤tSecurityType); @@ -152,20 +152,20 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertyGetSelected( { *pfIsSelected = TRUE; } - + error: if(pIhvSecProfile != NULL) { delete pIhvSecProfile; pIhvSecProfile = NULL; - } + } return hr; } //Used to set the current entry as chosen from the dropdown list -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::Dot11ExtUIPropertySetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified @@ -187,7 +187,7 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertySetSelected( hr = E_OUTOFMEMORY; goto error; } - + pIhvSecProfile->LoadXml(bstrIHVProfile); pIhvSecProfile->SetSecurityType(m_IhvSecurityType); @@ -195,18 +195,18 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertySetSelected( pIhvSecProfile->EmitXml(bstrModifiedIHVProfile ); *pbIsModified = pIhvSecProfile->GetModified(); - + error: if(pIhvSecProfile != NULL) { delete pIhvSecProfile; pIhvSecProfile = NULL; } - return hr; + return hr; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::Dot11ExtUIPropertyHasConfigurationUI( BOOL *fHasConfigurationUI) { @@ -216,10 +216,10 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertyHasConfigurationUI( } //Used to get additional display data (ciphers for auth types) -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::Dot11ExtUIPropertyGetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be described - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings ULONG *pcEntries, // number of dependent strings ULONG *puDefaultSelection, // the entry in the array to be selected by default @@ -252,7 +252,7 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertyGetDisplayInfo( ciphersInfoArray[m_IhvSecurityType][i].dot11ExtUIDisplayInfoType = DOT11_EXT_UI_DISPLAY_INFO_CIPHER; ciphersInfoArray[m_IhvSecurityType][i].bstrDisplayText = SysAllocString(g_IHVCipherFriendlyName[i]); } - + // for the given auth type we want to return the list of compatible ciphers *ppDot11ExtUIProperty = ciphersInfoArray[m_IhvSecurityType]; *pcEntries = PROP_COUNT_SEC_CIPHERS; @@ -262,10 +262,10 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertyGetDisplayInfo( return hr; } -STDMETHODIMP +STDMETHODIMP CDot11SampleExtUISecProperty::Dot11ExtUIPropertySetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be modified - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings DOT11_EXT_UI_PROPERTY_DISPLAY_INFO *pDot11ExtUIProperty, // selected info structure BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile @@ -303,7 +303,7 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertySetDisplayInfo( hr = IhvSecurityProfile.EmitXml(bstrModifiedIHVProfile); *pbIsModified = IhvSecurityProfile.GetModified(); - + error: return hr; } @@ -316,13 +316,13 @@ CDot11SampleExtUISecProperty::Dot11ExtUIPropertyIsStandardSecurity( { UNREFERENCED_PARAMETER(dot11ExtUISecurityType); *fIsStandardSecurity = FALSE; - return S_OK; + return S_OK; } STDMETHODIMP CDot11SampleExtUISecProperty::Initialize(BSTR bstrPropertyName, DWORD dwIhvSecurity) { - HRESULT hr = E_INVALIDARG; + HRESULT hr = E_INVALIDARG; if (false == m_fInitialized) { // Set the FriendlyName @@ -334,7 +334,7 @@ CDot11SampleExtUISecProperty::Initialize(BSTR bstrPropertyName, DWORD dwIhvSecur return hr; } -INT_PTR CALLBACK +INT_PTR CALLBACK SimpleDialogProcSec( HWND hwndDlg, UINT uMsg, @@ -343,7 +343,7 @@ SimpleDialogProcSec( ) { BOOL fRetVal = FALSE; - WCHAR szBuf[256] = {0}; + WCHAR szBuf[256] = {0}; DWORD dwValue = 0; BSTR bstrText = NULL; @@ -353,7 +353,7 @@ SimpleDialogProcSec( { goto error; } - + switch(uMsg) { case WM_INITDIALOG: @@ -366,36 +366,36 @@ SimpleDialogProcSec( strDialogTitle, MAX_PATH ); - + SetWindowText(hwndDlg, strDialogTitle); } - + // check the checkbox if needed if(FAILED(pIhvSecProfile->GetParamDWORD(&dwValue))) { dwValue = 0; } ::SendMessage( - GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), - BM_SETCHECK, - (WPARAM)(int)dwValue, + GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), + BM_SETCHECK, + (WPARAM)(int)dwValue, 0L ); - + // Set text in the textbox if(FAILED(pIhvSecProfile->GetParamBSTR(&bstrText))) { bstrText = NULL; } SetWindowText(GetDlgItem(hwndDlg, IDC_PARAM_BOX), bstrText); - + fRetVal = TRUE; break; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case ID_OK: + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case ID_OK: GetWindowText(GetDlgItem(hwndDlg, IDC_PARAM_BOX), szBuf, 255); if(szBuf) { @@ -403,23 +403,23 @@ SimpleDialogProcSec( // get the button state and record it dwNewValue = (int)::SendMessage( - GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), - BM_GETCHECK, - 0L, + GetDlgItem(hwndDlg, IDC_USE_FASTHANDOFF), + BM_GETCHECK, + 0L, 0L ); - pIhvSecProfile->SetParamDWORD(dwNewValue); + pIhvSecProfile->SetParamDWORD(dwNewValue); pIhvSecProfile->SetParamBSTR(szBuf); pIhvSecProfile->SetFullSecurityFlag(TRUE); - // Notify the owner window to carry out the task. + // Notify the owner window to carry out the task. EndDialog(hwndDlg, 1); - fRetVal = TRUE; + fRetVal = TRUE; } break; - case ID_CANCEL: + case ID_CANCEL: EndDialog(hwndDlg, 0); fRetVal = TRUE; break; diff --git a/network/wlan/ihvsampleui/IHVSampleExtUISec.h b/network/wlan/ihvsampleui/IHVSampleExtUISec.h index fc8caa2e5..8c065f270 100644 --- a/network/wlan/ihvsampleui/IHVSampleExtUISec.h +++ b/network/wlan/ihvsampleui/IHVSampleExtUISec.h @@ -12,62 +12,62 @@ class CDot11SampleExtUISecProperty: public IDot11SampleExtUISecProperty CDot11SampleExtUISecProperty(); ~CDot11SampleExtUISecProperty(); - + // IUnknown Implementation BEGIN_INTERFACE_TABLE() IMPLEMENTS_INTERFACE(IDot11SampleExtUISecProperty) END_INTERFACE_TABLE(); - STDMETHODIMP + STDMETHODIMP GetDot11ExtUIPropertyFriendlyName( BSTR* bstrPropertyName // IHV friendly name ); //Used to extend property - STDMETHODIMP + STDMETHODIMP DisplayDot11ExtUIProperty( - HWND hParent, // Parent Window Handle - BSTR bstrIHVProfile, // IHV data from the profile + HWND hParent, // Parent Window Handle + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ); //Used to get the currently chosen entry to display as selected in the dropdown list - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyGetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BOOL* pfIsSelected // flag denoting if this is the selected profile ); //Used to set the current entry as chosen from the dropdown list - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertySetSelected( - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile BOOL* pbIsModified // flag to denote if profile was modified ); - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyHasConfigurationUI(BOOL *fHasConfigurationUI); //Used to get additional display data (ciphers for auth types) - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertyGetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be described - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings ULONG *pcEntries, // number of dependent strings ULONG *puDefaultSelection, // the entry in the array to be selected by default DOT11_EXT_UI_PROPERTY_DISPLAY_INFO **ppDot11ExtUIProperty // array of returned info structure ); - STDMETHODIMP + STDMETHODIMP Dot11ExtUIPropertySetDisplayInfo( DOT11_EXT_UI_DISPLAY_INFO_TYPE dot11ExtUIDisplayInfoType, // the diapaly type to be modified - BSTR bstrIHVProfile, // IHV data from the profile + BSTR bstrIHVProfile, // IHV data from the profile PDOT11EXT_IHV_PARAMS pIHVParams, // Select profile MS security settings DOT11_EXT_UI_PROPERTY_DISPLAY_INFO *pDot11ExtUIProperty, // selected info structure BSTR* bstrModifiedIHVProfile, // modified IHV data to be stored in the profile @@ -79,7 +79,7 @@ class CDot11SampleExtUISecProperty: public IDot11SampleExtUISecProperty BOOL *fIsStandardSecurity, // if this interface is a standard auth method DOT11_EXT_UI_SECURITY_TYPE *dot11ExtUISecurityType // which of the standard auth methods it is ); - + // initialize the security page STDMETHODIMP Initialize(BSTR bstrPropertyName, DWORD dwIhvSecurity); @@ -94,7 +94,7 @@ class CDot11SampleExtUISecProperty: public IDot11SampleExtUISecProperty }; -INT_PTR CALLBACK +INT_PTR CALLBACK SimpleDialogProcSec( HWND hwndDlg, UINT uMsg, diff --git a/network/wlan/ihvsampleui/IHVSampleProfile.cpp b/network/wlan/ihvsampleui/IHVSampleProfile.cpp index 0b9bb8a26..206408634 100644 --- a/network/wlan/ihvsampleui/IHVSampleProfile.cpp +++ b/network/wlan/ihvsampleui/IHVSampleProfile.cpp @@ -234,7 +234,7 @@ CIhvProfileBase::EmitXml ////////////////////////////////////////////////////////// -WCHAR g_szDefaultConnectivityProfile[] = +WCHAR g_szDefaultConnectivityProfile[] = L"" L" 0" L" parameter value" @@ -453,7 +453,7 @@ LPCWSTR gppszIhvCipherTypes[] = }; -WCHAR g_szDefaultSecurityProfile[] = +WCHAR g_szDefaultSecurityProfile[] = L"" L" TRUE" L" IHVAuthV1" diff --git a/network/wlan/ihvsampleui/IHVSampleProfile.h b/network/wlan/ihvsampleui/IHVSampleProfile.h index 66e8ce3fe..1caf51346 100644 --- a/network/wlan/ihvsampleui/IHVSampleProfile.h +++ b/network/wlan/ihvsampleui/IHVSampleProfile.h @@ -64,7 +64,7 @@ class CIhvProfileBase BSTR* pbstrDefault ) = 0; - + HRESULT GetTextFromNode ( @@ -252,7 +252,7 @@ class CIhvSecurityProfile SetSecurityType ( IHV_SECURITY_TYPE SecurityType - ); + ); // Accessor and Modifier for CipherType HRESULT diff --git a/network/wlan/ihvsampleui/IHVSampleUI.cpp b/network/wlan/ihvsampleui/IHVSampleUI.cpp index f93218bc2..f1d70d469 100644 --- a/network/wlan/ihvsampleui/IHVSampleUI.cpp +++ b/network/wlan/ihvsampleui/IHVSampleUI.cpp @@ -58,10 +58,10 @@ STDAPI DllCanUnloadNow(void) -STDAPI +STDAPI DllGetClassObject( - _In_ REFCLSID rclsid, - _In_ REFIID riid, + _In_ REFCLSID rclsid, + _In_ REFIID riid, _Outptr_ LPVOID *ppv) { HRESULT hr = E_NOINTERFACE; @@ -75,7 +75,7 @@ DllGetClassObject( } } - if(NULL != g_pIHVClassFactory && + if(NULL != g_pIHVClassFactory && (rclsid == GUID_SAMPLE_IHVUI_CLSID || rclsid == IID_IWizardExtension)) { hr = g_pIHVClassFactory->QueryInterface(riid, ppv); @@ -97,13 +97,13 @@ DllGetClassObject( // Returns: BOOL WINAPI - TRUE - always // //+---------------------------------------------------------------------------- -extern "C" -BOOL WINAPI +extern "C" +BOOL WINAPI DllMain( - HINSTANCE hInstDLL, - DWORD fdwReason, + HINSTANCE hInstDLL, + DWORD fdwReason, LPVOID lpvReserved - ) + ) { UNREFERENCED_PARAMETER(lpvReserved); diff --git a/network/wlan/ihvsampleui/IHVSampleUI.rc b/network/wlan/ihvsampleui/IHVSampleUI.rc index 2c6563d8d..eb79cec08 100644 --- a/network/wlan/ihvsampleui/IHVSampleUI.rc +++ b/network/wlan/ihvsampleui/IHVSampleUI.rc @@ -112,7 +112,7 @@ END // String Table // -STRINGTABLE +STRINGTABLE BEGIN IDS_PROJNAME "SampleIHVExt" IDS_TITLE_GETKEY "IHV Get Key Page" diff --git a/network/wlan/ihvsampleui/precomp.h b/network/wlan/ihvsampleui/precomp.h index b7bff11f1..41dcbd93e 100644 --- a/network/wlan/ihvsampleui/precomp.h +++ b/network/wlan/ihvsampleui/precomp.h @@ -32,7 +32,7 @@ _Analysis_mode_(_Analysis_code_type_user_code_) #include "IHVClassFactory.h" #include -const GUID GUID_SAMPLE_IHVUI_CLSID = +const GUID GUID_SAMPLE_IHVUI_CLSID = { 0x4a01f9f9, 0x6012, 0x4343, { 0xa8, 0xc4, 0x10, 0xb5, 0xdf, 0x32, 0x67, 0x2a } }; diff --git a/network/wlan/ihvsampleui/utils.cpp b/network/wlan/ihvsampleui/utils.cpp index 1f9bbe103..41ceeb4fd 100644 --- a/network/wlan/ihvsampleui/utils.cpp +++ b/network/wlan/ihvsampleui/utils.cpp @@ -67,7 +67,7 @@ Wstr2Wstr { hr = E_OUTOFMEMORY; } - + error: return hr; } diff --git a/network/wsk/echosrv/wsksmple.c b/network/wsk/echosrv/wsksmple.c index 99a62361c..1f7830cda 100644 --- a/network/wsk/echosrv/wsksmple.c +++ b/network/wsk/echosrv/wsksmple.c @@ -8,13 +8,13 @@ Module Name: Abstract: - This module implements a simple kernel-mode application by using the + This module implements a simple kernel-mode application by using the Winsock Kernel (WSK) programming interface. The application accepts incoming connection requests and, on each connection, echoes all received data back to the peer until the connection is closed by the peer. The application is designed to use a single worker thread to perform all of - its processing. For better performance on MP machines, the sample may be - enhanced to use more worker threads. Operations on a given connection + its processing. For better performance on MP machines, the sample may be + enhanced to use more worker threads. Operations on a given connection should always be processed by the same worker thread. This provides a simple form of synchronization ensuring proper socket closure in a setting where multiple operations may be outstanding and completed asynchronously @@ -22,7 +22,7 @@ Module Name: enforce any limit on the number of connections accepted (other than the natural limit imposed by the available system memory) or on the amount of time a connection stays around. A full-fledged server application should be - designed with these points in mind from a security viewpoint. + designed with these points in mind from a security viewpoint. Author: @@ -88,7 +88,7 @@ typedef struct _WSKSAMPLE_WORK_QUEUE { // Worker thread pointer PETHREAD Thread; - + } WSKSAMPLE_WORK_QUEUE, *PWSKSAMPLE_WORK_QUEUE; // Structure that represents the context for a WSK socket operation. @@ -96,25 +96,25 @@ typedef struct _WSKSAMPLE_SOCKET_OP_CONTEXT { // Work queue linkage SLIST_ENTRY QueueEntry; - - // Pointer to the function that will handle the operation + + // Pointer to the function that will handle the operation PWSKSAMPLE_OP_HANDLER_FN OpHandler; - + // Pointer to the WSK socket context. PWSKSAMPLE_SOCKET_CONTEXT SocketContext; // IRP to use for the operation PIRP Irp; - + // Data buffer and MDL used by send and receive operations _Field_size_bytes_part_(BufferLength,DataLength) PVOID DataBuffer; PMDL DataMdl; SIZE_T BufferLength; // size of the buffer SIZE_T DataLength; // length of actual data stored in the buffer - + } WSKSAMPLE_SOCKET_OP_CONTEXT; -// Maximum number of operations that can be outstanding on a socket at any time +// Maximum number of operations that can be outstanding on a socket at any time #define WSKSAMPLE_OP_COUNT 2 // Structure that represents the context for a WSK socket. @@ -132,7 +132,7 @@ typedef struct _WSKSAMPLE_SOCKET_CONTEXT { // Peer has gracefully disconnected its half of the connection and we are // about to disconnect (or have disconnected) our half. BOOLEAN Disconnecting; - + // Stop accepting incoming connections. Valid for listening sockets only. BOOLEAN StopListening; @@ -141,12 +141,12 @@ typedef struct _WSKSAMPLE_SOCKET_CONTEXT { // sample preallocates a fixed number of operation contexts along with // the socket context for a new socket. WSKSAMPLE_SOCKET_OP_CONTEXT OpContext[WSKSAMPLE_OP_COUNT]; - + } WSKSAMPLE_SOCKET_CONTEXT; -// Forward declaration for WskAcceptEvent in WSK_CLIENT_LISTEN_DISPATCH +// Forward declaration for WskAcceptEvent in WSK_CLIENT_LISTEN_DISPATCH NTSTATUS -WSKAPI +WSKAPI WskSampleAcceptEvent( _In_ PVOID SocketContext, _In_ ULONG Flags, @@ -182,9 +182,9 @@ WSKSAMPLE_WORK_QUEUE WskSampleWorkQueue; // IPv6 wildcard address and port number 40007 to listen on SOCKADDR_IN6 IPv6ListeningAddress = { - AF_INET6, - 0x479c, // 40007 in hex in network byte order - 0, + AF_INET6, + 0x479c, // 40007 in hex in network byte order + 0, IN6ADDR_ANY_INIT, 0}; @@ -315,13 +315,13 @@ DriverEntry( { NTSTATUS status; WSK_CLIENT_NPI wskClientNpi; - + UNREFERENCED_PARAMETER(RegistryPath); PAGED_CODE(); ExInitializeDriverRuntime(DrvRtPoolNxOptIn); - + // Allocate a socket context that will be used for queueing an operation // to setup a listening socket that will accept incoming connections WskSampleListeningSocketContext = WskSampleAllocateSocketContext( @@ -353,16 +353,16 @@ DriverEntry( // Enqueue the first operation to setup the listening socket WskSampleEnqueueOp(&WskSampleListeningSocketContext->OpContext[0], WskSampleOpStartListen); - + // Everything has been initiated successfully. Now we can enable the // unload routine and return. DriverObject->DriverUnload = WskSampleUnload; // Initialize software tracing WPP_INIT_TRACING(DriverObject, RegistryPath); - + DoTraceMessage(TRCINFO, "LOADED"); - + return STATUS_SUCCESS; } @@ -371,7 +371,7 @@ VOID WskSampleUnload( _In_ PDRIVER_OBJECT DriverObject ) -{ +{ C_ASSERT(WSKSAMPLE_OP_COUNT >= 2); UNREFERENCED_PARAMETER(DriverObject); @@ -381,16 +381,16 @@ WskSampleUnload( DoTraceMessage(TRCINFO, "UNLOAD START"); // Enqueue an operation to stop listening for any new connections. - // This will close the listening socket, but there may still be + // This will close the listening socket, but there may still be // connection-oriented sockets that are open. The WskDeregister call // below will block until all sockets including the connection-oriented // ones that were accepted over the listening socket are closed. Since // this sample currently closes the connection-oriented sockets // only when an error occurs or when the remote peer disconnects, the - // unload of the driver will be blocked until the last connection is + // unload of the driver will be blocked until the last connection is // disconnected by the peer. If the requirements for a full-fledged // application are such that the unload of the driver (or any other - // similar event) proactively closes all the sockets (that may + // similar event) proactively closes all the sockets (that may // otherwise stay open indefinitely), then the application must keep // track of all the sockets in a fashion that allows enumerating them and // closing each socket. In such a scheme, the application must still ensure @@ -410,9 +410,9 @@ WskSampleUnload( // point, it's guaranteed that all socket are closed, which also means that // there can not be any further outstanding operations on any socket. So, // the worker thread can now safely stop processing the work queue if there - // are no queued items. Signal the worker thread to stop and wait for it. + // are no queued items. Signal the worker thread to stop and wait for it. WskSampleStopWorkQueue(&WskSampleWorkQueue); - + DoTraceMessage(TRCINFO, "UNLOAD END"); WPP_CLEANUP(DriverObject); @@ -428,7 +428,7 @@ WskSampleStartWorkQueue( HANDLE threadHandle; PAGED_CODE(); - + InitializeSListHead(&WorkQueue->Head); KeInitializeEvent(&WorkQueue->Event, SynchronizationEvent, FALSE); WorkQueue->Stop = FALSE; @@ -444,7 +444,7 @@ WskSampleStartWorkQueue( status = ObReferenceObjectByHandle( threadHandle, THREAD_ALL_ACCESS, NULL, KernelMode, &WorkQueue->Thread, NULL); - + ZwClose(threadHandle); if(!NT_SUCCESS(status)) { @@ -482,7 +482,7 @@ WskSampleAllocateSocketContext( ) { PWSKSAMPLE_SOCKET_CONTEXT socketContext; - + // Allocate and setup a socket context with optional data buffers, and // attach the socket to the given work queue. Even though this sample uses // only a single global work queue, the sample is designed to be easily @@ -554,9 +554,9 @@ WskSampleFreeSocketContext( // socket are completed and all enqueued operations for the socket // are dequeued. So, we can safely free the Irp, Mdl, and data buffer // pointed by the socket operation contexts. - + for(i = 0; i < WSKSAMPLE_OP_COUNT; i++) { - + if(SocketContext->OpContext[i].Irp != NULL) { IoFreeIrp(SocketContext->OpContext[i].Irp); SocketContext->OpContext[i].Irp = NULL; @@ -589,18 +589,18 @@ WskSampleEnqueueOp( SocketOpContext->OpHandler = OpHandler; #pragma warning(disable:4054) // turn off typecast warning - + if(NULL == InterlockedPushEntrySList( - &workQueue->Head, + &workQueue->Head, &SocketOpContext->QueueEntry)) { - DoTraceMessage(TRCINFO, "EnqueueOp: %p %p (%p) SetEvent", + DoTraceMessage(TRCINFO, "EnqueueOp: %p %p (%p) SetEvent", SocketOpContext->SocketContext, SocketOpContext, (PVOID)OpHandler); // Work queue was empty. So, signal the work queue event in case the // worker thread is waiting on the event for more operations. KeSetEvent(&workQueue->Event, 0, FALSE); } else - DoTraceMessage(TRCINFO, "EnqueueOp: %p %p (%p)", + DoTraceMessage(TRCINFO, "EnqueueOp: %p %p (%p)", SocketOpContext->SocketContext, SocketOpContext, (PVOID)OpHandler); #pragma warning(default:4054) // restore typecast warning @@ -614,13 +614,13 @@ WskSampleWorkerThread ( { PWSKSAMPLE_WORK_QUEUE workQueue; PSLIST_ENTRY listEntryRev, listEntry, next; - + PAGED_CODE(); workQueue = (PWSKSAMPLE_WORK_QUEUE)Context; for(;;) { - + // Flush all the queued operations into a local list listEntryRev = InterlockedFlushSList(&workQueue->Head); @@ -635,7 +635,7 @@ WskSampleWorkerThread ( DoTraceMessage(TRCINFO, "WorkerThread: WQ %p wait", workQueue); // Otherwise, wait for more operations to be enqueued. - KeWaitForSingleObject(&workQueue->Event, + KeWaitForSingleObject(&workQueue->Event, Executive, KernelMode, FALSE, 0); continue; } @@ -655,16 +655,16 @@ WskSampleWorkerThread ( while(listEntry) { PWSKSAMPLE_SOCKET_OP_CONTEXT socketOpContext = - CONTAINING_RECORD(listEntry, + CONTAINING_RECORD(listEntry, WSKSAMPLE_SOCKET_OP_CONTEXT, QueueEntry); PWSKSAMPLE_OP_HANDLER_FN opHandler = socketOpContext->OpHandler; - + listEntry = listEntry->Next; opHandler(socketOpContext); } } - + PsTerminateSystemThread(STATUS_SUCCESS); } @@ -683,10 +683,10 @@ WskSampleOpStartListen( // This operation is made up of multiple WSK calls, and no other // operations will be processed until this compound operation is // finished synchronously in the context of the worker thread. - + // Capture the WSK Provider NPI status = WskCaptureProviderNPI( - &WskSampleRegistration, + &WskSampleRegistration, WSK_INFINITE_WAIT, &wskProviderNpi); @@ -702,7 +702,7 @@ WskSampleOpStartListen( // WskCaptureProviderNPI will fail if WskDeregister is called // from the Driver Unload routine before the WSK subsystem // becomes ready. - DoTraceMessage(TRCINFO, + DoTraceMessage(TRCINFO, "OpStartListen: WskCaptureProviderNPI failed 0x%lx", status); } } @@ -724,7 +724,7 @@ WskSampleSetupListeningSocket( PIRP irp = SocketOpContext->Irp; PAGED_CODE(); - + KeInitializeEvent(&compEvent, SynchronizationEvent, FALSE); if(socketContext->Socket != NULL) { @@ -739,10 +739,10 @@ WskSampleSetupListeningSocket( // is being unloaded. So, there's no need to recreate it. return; } - + IoReuseIrp(irp, STATUS_UNSUCCESSFUL); - IoSetCompletionRoutine(irp, + IoSetCompletionRoutine(irp, WskSampleSyncIrpCompletionRoutine, &compEvent, TRUE, TRUE, TRUE); @@ -772,15 +772,15 @@ WskSampleSetupListeningSocket( NULL, NULL); if(!NT_SUCCESS(status)) { - DoTraceMessage(TRCERROR, + DoTraceMessage(TRCERROR, "SetupListeningSocket: WSK_SET_STATIC_EVENT_CALLBACKS FAIL 0x%lx", status); - goto failexit; + goto failexit; } } - + // Create a listening socket over AF_INET6 address family. Put the socket - // into dual-family mode by setting IPV6_V6ONLY option to FALSE so that + // into dual-family mode by setting IPV6_V6ONLY option to FALSE so that // AF_INET traffic is also handled over the same socket. IoSetCompletionRoutine(irp, @@ -801,7 +801,7 @@ WskSampleSetupListeningSocket( NULL, // Thread NULL, // SecurityDescriptor irp); - + KeWaitForSingleObject(&compEvent, Executive, KernelMode, FALSE, NULL); if(!NT_SUCCESS(irp->IoStatus.Status)) { @@ -812,12 +812,12 @@ WskSampleSetupListeningSocket( listeningSocket = (PWSK_SOCKET)irp->IoStatus.Information; dispatch = (PWSK_PROVIDER_LISTEN_DISPATCH)listeningSocket->Dispatch; - + // Set IPV6_V6ONLY to FALSE before the bind operation optionValue = 0; - IoReuseIrp(irp, STATUS_UNSUCCESSFUL); + IoReuseIrp(irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(irp, WskSampleSyncIrpCompletionRoutine, &compEvent, TRUE, TRUE, TRUE); @@ -835,7 +835,7 @@ WskSampleSetupListeningSocket( NULL, NULL, irp); - + KeWaitForSingleObject(&compEvent, Executive, KernelMode, FALSE, NULL); if(!NT_SUCCESS(irp->IoStatus.Status)) { @@ -873,17 +873,17 @@ WskSampleSetupListeningSocket( ASSERT(socketContext->Socket == NULL); socketContext->Socket = listeningSocket; - DoTraceMessage(TRCINFO, "SetupListeningSocket: %p %p", + DoTraceMessage(TRCINFO, "SetupListeningSocket: %p %p", socketContext, SocketOpContext); - + return; - + failexit: if(listeningSocket) { IoReuseIrp(irp, STATUS_UNSUCCESSFUL); - IoSetCompletionRoutine(irp, + IoSetCompletionRoutine(irp, WskSampleSyncIrpCompletionRoutine, &compEvent, TRUE, TRUE, TRUE); @@ -900,12 +900,12 @@ WskSampleSyncIrpCompletionRoutine( PIRP Irp, PVOID Context ) -{ +{ PKEVENT compEvent = (PKEVENT)Context; _Analysis_assume_(Context != NULL); UNREFERENCED_PARAMETER(Reserved); UNREFERENCED_PARAMETER(Irp); - KeSetEvent(compEvent, 2, FALSE); + KeSetEvent(compEvent, 2, FALSE); return STATUS_MORE_PROCESSING_REQUIRED; } @@ -921,11 +921,11 @@ WskSampleOpStopListen( socketContext = SocketOpContext->SocketContext; - DoTraceMessage(TRCINFO, "OpStopListen: %p %p", + DoTraceMessage(TRCINFO, "OpStopListen: %p %p", socketContext, SocketOpContext); socketContext->StopListening = TRUE; - + if(socketContext->Socket == NULL) { // Listening socket was NOT created due to some failure. // All we need to do is to free up the socket context. @@ -939,7 +939,7 @@ WskSampleOpStopListen( // Listening socket callback which is invoked whenever a new connection arrives. NTSTATUS -WSKAPI +WSKAPI WskSampleAcceptEvent( _In_ PVOID SocketContext, _In_ ULONG Flags, @@ -957,11 +957,11 @@ WskSampleAcceptEvent( UNREFERENCED_PARAMETER(Flags); UNREFERENCED_PARAMETER(LocalAddress); UNREFERENCED_PARAMETER(RemoteAddress); - + listeningSocketContext = (PWSKSAMPLE_SOCKET_CONTEXT)SocketContext; if(AcceptSocket == NULL) { - // If WSK provider makes a WskAcceptEvent callback with NULL + // If WSK provider makes a WskAcceptEvent callback with NULL // AcceptSocket, this means that the listening socket is no longer // functional. The WSK client may handle this situation by trying // to create a new listening socket or by restarting the driver, etc. @@ -973,7 +973,7 @@ WskSampleAcceptEvent( // WskSampleStartListen operation on the listening socket. The // WskSampleStartListen operation will close the existing listening // socket and create a new one. - WskSampleEnqueueOp(&listeningSocketContext->OpContext[0], + WskSampleEnqueueOp(&listeningSocketContext->OpContext[0], WskSampleOpStartListen); return STATUS_REQUEST_NOT_ACCEPTED; } @@ -981,7 +981,7 @@ WskSampleAcceptEvent( // Allocate socket context for the newly accepted socket. socketContext = WskSampleAllocateSocketContext( &WskSampleWorkQueue, WSKSAMPLE_DATA_BUFFER_LENGTH); - + if(socketContext == NULL) { return STATUS_REQUEST_NOT_ACCEPTED; } @@ -989,17 +989,17 @@ WskSampleAcceptEvent( socketContext->Socket = AcceptSocket; DoTraceMessage(TRCINFO, "AcceptEvent: %p", socketContext); - + // Enqueue receive operations on the accepted socket. Whenever a receive // operation is completed successfully, the received data will be echoed - // back to the peer via a send operation. Whenever a send operation is + // back to the peer via a send operation. Whenever a send operation is // completed, a new receive request will be issued over the connection. // This will continue until the connection is closed by the peer. for(i = 0; i < WSKSAMPLE_OP_COUNT; i++) { _Analysis_assume_(socketContext == socketContext->OpContext[i].SocketContext); WskSampleEnqueueOp(&socketContext->OpContext[i], WskSampleOpReceive); } - + // Since we will not use any callbacks on the accepted socket, we specify no // socketContext or callback dispatch table pointer for the accepted socket. *AcceptSocketContext = NULL; @@ -1023,7 +1023,7 @@ WskSampleOpReceive( if(socketContext->Closing || socketContext->Disconnecting) { // Do not call WskReceive if socket is being disconnected // or closed. The operation context will not be used any more. - DoTraceMessage(TRCINFO, "OpReceive: %p %p SKIP", + DoTraceMessage(TRCINFO, "OpReceive: %p %p SKIP", socketContext, SocketOpContext); } else { @@ -1041,7 +1041,7 @@ WskSampleOpReceive( WskSampleReceiveIrpCompletionRoutine, SocketOpContext, TRUE, TRUE, TRUE); - DoTraceMessage(TRCINFO, "OpReceive: %p %p %Iu", + DoTraceMessage(TRCINFO, "OpReceive: %p %p %Iu", socketContext, SocketOpContext, wskbuf.Length); // No need to check the return status here. The IRP completion @@ -1073,9 +1073,9 @@ WskSampleReceiveIrpCompletionRoutine( socketOpContext = (PWSKSAMPLE_SOCKET_OP_CONTEXT)Context; socketContext = socketOpContext->SocketContext; - DoTraceMessage(TRCINFO, - "ReceiveIrpCompletionRoutine: %p %p 0x%lx %Iu", - socketContext, socketOpContext, Irp->IoStatus.Status, + DoTraceMessage(TRCINFO, + "ReceiveIrpCompletionRoutine: %p %p 0x%lx %Iu", + socketContext, socketOpContext, Irp->IoStatus.Status, Irp->IoStatus.Information); if(!NT_SUCCESS(Irp->IoStatus.Status)) { @@ -1096,10 +1096,10 @@ WskSampleReceiveIrpCompletionRoutine( // queued. We just need to remember the actual length of // data received into the buffer. socketOpContext->DataLength = Irp->IoStatus.Information; - WskSampleEnqueueOp(socketOpContext, WskSampleOpSend); + WskSampleEnqueueOp(socketOpContext, WskSampleOpSend); } } - + return STATUS_MORE_PROCESSING_REQUIRED; } @@ -1118,7 +1118,7 @@ WskSampleOpSend( if(socketContext->Closing || socketContext->Disconnecting) { // Do not call WskSend if socket is being disconnected // or closed. The operation context will not be used any more. - DoTraceMessage(TRCINFO, "OpSend: %p %p SKIP", + DoTraceMessage(TRCINFO, "OpSend: %p %p SKIP", socketContext, SocketOpContext); } else { @@ -1136,7 +1136,7 @@ WskSampleOpSend( WskSampleSendIrpCompletionRoutine, SocketOpContext, TRUE, TRUE, TRUE); - DoTraceMessage(TRCINFO, "OpSend: %p %p %Iu", + DoTraceMessage(TRCINFO, "OpSend: %p %p %Iu", socketContext, SocketOpContext, wskbuf.Length); // No need to check the return status here. The IRP completion @@ -1168,7 +1168,7 @@ WskSampleSendIrpCompletionRoutine( socketOpContext = (PWSKSAMPLE_SOCKET_OP_CONTEXT)Context; socketContext = socketOpContext->SocketContext; - DoTraceMessage(TRCINFO, + DoTraceMessage(TRCINFO, "SendIrpCompletionRoutine: %p %p 0x%lx %Iu", socketContext, socketOpContext, Irp->IoStatus.Status, Irp->IoStatus.Information); @@ -1178,7 +1178,7 @@ WskSampleSendIrpCompletionRoutine( } else { // Send succeeded. Enqueue an operation to receive more data. - WskSampleEnqueueOp(socketOpContext, WskSampleOpReceive); + WskSampleEnqueueOp(socketOpContext, WskSampleOpReceive); } return STATUS_MORE_PROCESSING_REQUIRED; @@ -1201,7 +1201,7 @@ WskSampleOpDisconnect( // disconnected or closed. A disconnect operation may get // enqueued multiple times as a result of multiple outstanding // receive requests getting completed with success and 0 bytes. - DoTraceMessage(TRCINFO, "OpDisconnect: %p %p SKIP", + DoTraceMessage(TRCINFO, "OpDisconnect: %p %p SKIP", socketContext, SocketOpContext); } else { @@ -1210,13 +1210,13 @@ WskSampleOpDisconnect( dispatch = socketContext->Socket->Dispatch; socketContext->Disconnecting = TRUE; - + IoReuseIrp(SocketOpContext->Irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(SocketOpContext->Irp, WskSampleDisconnectIrpCompletionRoutine, SocketOpContext, TRUE, TRUE, TRUE); - DoTraceMessage(TRCINFO, "OpDisconnect: %p %p", + DoTraceMessage(TRCINFO, "OpDisconnect: %p %p", socketContext, SocketOpContext); // No need to check the return status here. The IRP completion @@ -1275,7 +1275,7 @@ WskSampleOpClose( // A close operation may get enqueued multiple times as a result // of multiple outstanding send/receive/disconnect operations // getting completed with failure. - DoTraceMessage(TRCINFO, "OpClose: %p %p SKIP", + DoTraceMessage(TRCINFO, "OpClose: %p %p SKIP", socketContext, SocketOpContext); } else { @@ -1289,7 +1289,7 @@ WskSampleOpClose( IoSetCompletionRoutine(SocketOpContext->Irp, WskSampleCloseIrpCompletionRoutine, SocketOpContext, TRUE, TRUE, TRUE); - + DoTraceMessage(TRCINFO,"OpClose: %p %p", socketContext,SocketOpContext); // No need to check the return status here. The IRP completion @@ -1325,16 +1325,16 @@ WskSampleCloseIrpCompletionRoutine( DoTraceMessage(TRCINFO, "CloseIrpCompletionRoutine: %p %p 0x%lx", socketContext, socketOpContext, Irp->IoStatus.Status); - - // Enqueue an operation to free the socket context. Since the + + // Enqueue an operation to free the socket context. Since the // completion of WskCloseSocket guarantees that there are no // outstanding requests or callbacks on the socket, we can // safely free the socket context. However, we still can NOT // free the socket context directly here since there may still be // queued operations not yet issued over the socket. Thus, we need - // to queue this "free" operation behind any other queued + // to queue this "free" operation behind any other queued // operations (which will not be issued over the socket since the - // socket context is marked as "closing"). Note that NO new + // socket context is marked as "closing"). Note that NO new // operations can be queued behind the "free" operation for a // given socket since we enqueue new operations only from the // context of IRP completions on the socket. diff --git a/network/wwan/cxwmbclass/datapipe.cpp b/network/wwan/cxwmbclass/datapipe.cpp index b753a9e9e..e6df8c8c8 100644 --- a/network/wwan/cxwmbclass/datapipe.cpp +++ b/network/wwan/cxwmbclass/datapipe.cpp @@ -361,18 +361,18 @@ Routine Description Target - Handle to the Iotarget to which teh Request was sent. COnceptually this is the BULK USB __out pipe(on of Data or beacon) CompletionParams - In case of USB this contains the USB status and amount of bytes transferred - + Context - This is the COntext we set in WdfRequestSend Arguments: - + Return Value: - + --*/ @@ -642,7 +642,7 @@ MbbBusWriteData(__in MBB_BUS_HANDLE BusHandle, __in MBB_REQUEST_HANDLE RequestHa if (WriteRequestZLP != NULL) { - + Status = WdfUsbTargetPipeFormatRequestForWrite(usbDeviceContext->BulkOutputPipe, WriteRequestZLP, NULL, NULL); if (!NT_SUCCESS(Status)) diff --git a/network/wwan/cxwmbclass/inc/align.h b/network/wwan/cxwmbclass/inc/align.h index 5c8117d39..8dfca7c38 100644 --- a/network/wwan/cxwmbclass/inc/align.h +++ b/network/wwan/cxwmbclass/inc/align.h @@ -62,9 +62,9 @@ Revision History: // There is a subtle issue with all these alignment methods // The way the alignment is done depends on the lValue assignment of these MACRO // For example: -// UINT64 fileSizeAlligned = ROUND_UP_COUNT(fileSize, pageSize) +// UINT64 fileSizeAlligned = ROUND_UP_COUNT(fileSize, pageSize) // will do a correct 64 bit aligned rounding up -// UINT32 pagesInFileCount = ROUND_UP_COUNT(fileSize, pageSize) / pageSize; +// UINT32 pagesInFileCount = ROUND_UP_COUNT(fileSize, pageSize) / pageSize; // this will truncate the pageSize to UINT32 when evaluating ~(Pow2-1) below // causing the result to truncate the most significant 32 bits in fileSize diff --git a/network/wwan/cxwmbclass/inc/mbbmessages.h b/network/wwan/cxwmbclass/inc/mbbmessages.h index 61957009f..97a52f43c 100644 --- a/network/wwan/cxwmbclass/inc/mbbmessages.h +++ b/network/wwan/cxwmbclass/inc/mbbmessages.h @@ -28,7 +28,7 @@ #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of #endif /* __RPCNDR_H_VERSION__ */ -#endif +#endif #ifndef __MbbMessages_h__ #define __MbbMessages_h__ @@ -45,18 +45,18 @@ #endif #endif -/* Forward Declarations */ +/* Forward Declarations */ /* header files for imported files */ // #include "wtypes.h" #ifdef __cplusplus extern "C"{ -#endif +#endif /* interface __MIDL_itf_MbbMessages_0000_0000 */ -/* [local] */ +/* [local] */ // // Copyright (C) Microsoft. All rights reserved. @@ -310,13 +310,13 @@ DEFINE_GUID(GUID_USB_CAPABILITY_DEVICE_TYPE, 0x146FED19, 0xEB71, 0x42A7, 0xB3, 0 typedef unsigned short MBB_TLV_TYPE; -typedef +typedef enum _USB_CAP_DEVICE_TYPE { USB_CAP_DEVICE_TYPE_USB = 0, USB_CAP_DEVICE_TYPE_UDE_MBIM = 1, USB_CAP_DEVICE_TYPE_UDE_MBIM_FASTIO = 2, - USB_CAP_DEVICE_TYPE_MAXIMUM = ( USB_CAP_DEVICE_TYPE_UDE_MBIM_FASTIO + 1 ) + USB_CAP_DEVICE_TYPE_MAXIMUM = ( USB_CAP_DEVICE_TYPE_UDE_MBIM_FASTIO + 1 ) } USB_CAP_DEVICE_TYPE; typedef struct _USB_CAP_DEVICE_INFO_HEADER @@ -336,15 +336,15 @@ typedef struct _USB_CAP_DEVICE_INFO typedef struct _USB_CAP_DEVICE_INFO *PUSB_CAP_DEVICE_INFO; -typedef +typedef enum _MBB_NBL_TYPE { MBB_NBL_TYPE_IP = 0, MBB_NBL_TYPE_DSS = 1, - MBB_NBL_TYPE_MAXIMUM = ( MBB_NBL_TYPE_DSS + 1 ) + MBB_NBL_TYPE_MAXIMUM = ( MBB_NBL_TYPE_DSS + 1 ) } MBB_NBL_TYPE; -typedef +typedef enum _MBB_STATUS { MBB_STATUS_SUCCESS = 0, @@ -404,10 +404,10 @@ enum _MBB_STATUS MBB_STATUS_UICC_START = 0x87430001, MBB_STATUS_UICC_SELECT_FAILED = 0x87430002, MBB_STATUS_UICC_INVALID_LOGICAL_CHANNEL = 0x87430003, - MBB_STATUS_UICC_END = ( MBB_STATUS_UICC_INVALID_LOGICAL_CHANNEL + 1 ) + MBB_STATUS_UICC_END = ( MBB_STATUS_UICC_INVALID_LOGICAL_CHANNEL + 1 ) } MBB_STATUS; -typedef +typedef enum _MBB_ERROR { MBB_ERROR_NONE = 0, @@ -421,7 +421,7 @@ enum _MBB_ERROR MBB_ERROR_MAX_TRANSFER = 8 } MBB_ERROR; -typedef +typedef enum _MBB_MESSAGE_TYPE { MBB_MESSAGE_TYPE_NONE = 0, @@ -436,7 +436,7 @@ enum _MBB_MESSAGE_TYPE MBB_MESSAGE_TYPE_INDICATE_STATUS = 0x80000007 } MBB_MESSAGE_TYPE; -typedef +typedef enum _MBB_COMMAND_TYPE { MBB_COMMAND_TYPE_QUERY = 0, @@ -575,7 +575,7 @@ typedef struct _MBB_ERROR_MESSAGE typedef struct _MBB_ERROR_MESSAGE *PMBB_ERROR_MESSAGE; -typedef +typedef enum _MBB_BASIC_CID { MBB_BASIC_CID_DEVICE_CAPS = 1, @@ -600,10 +600,10 @@ enum _MBB_BASIC_CID MBB_BASIC_CID_EMERGENCY_MODE = 22, MBB_BASIC_CID_PACKET_FILTERS = 23, MBB_BASIC_CID_MULTICARRIER_PROVIDERS = 24, - MBB_BASIC_CID_MAXIMUM = ( MBB_BASIC_CID_MULTICARRIER_PROVIDERS + 1 ) + MBB_BASIC_CID_MAXIMUM = ( MBB_BASIC_CID_MULTICARRIER_PROVIDERS + 1 ) } MBB_BASIC_CID; -typedef +typedef enum _MBB_SMS_CID { MBB_SMS_CID_CONFIGURATION = 1, @@ -611,76 +611,76 @@ enum _MBB_SMS_CID MBB_SMS_CID_SEND = 3, MBB_SMS_CID_DELETE = 4, MBB_SMS_CID_STATUS = 5, - MBB_SMS_CID_MAXIMUM = ( MBB_SMS_CID_STATUS + 1 ) + MBB_SMS_CID_MAXIMUM = ( MBB_SMS_CID_STATUS + 1 ) } MBB_SMS_CID; -typedef +typedef enum _MBB_VENDOR_CID { MBB_VENDOR_CID_MS_VENDOR_SPECIFIC = 1, - MBB_VENDOR_CID_MAXIMUM = ( MBB_VENDOR_CID_MS_VENDOR_SPECIFIC + 1 ) + MBB_VENDOR_CID_MAXIMUM = ( MBB_VENDOR_CID_MS_VENDOR_SPECIFIC + 1 ) } MBB_VENDOR_CID; -typedef +typedef enum _MBB_USSD_CID { MBB_USSD_CID_USSD = 1, - MBB_USSD_CID_MAXIMUM = ( MBB_USSD_CID_USSD + 1 ) + MBB_USSD_CID_MAXIMUM = ( MBB_USSD_CID_USSD + 1 ) } MBB_USSD_CID; -typedef +typedef enum _MBB_PHONEBOOK_CID { MBB_PHONEBOOK_CID_CONFIGURATION = 1, MBB_PHONEBOOK_CID_READ = 2, MBB_PHONEBOOK_CID_DELETE = 3, MBB_PHONEBOOK_CID_SAVE = 4, - MBB_PHONEBOOK_CID_MAXIMUM = ( MBB_PHONEBOOK_CID_SAVE + 1 ) + MBB_PHONEBOOK_CID_MAXIMUM = ( MBB_PHONEBOOK_CID_SAVE + 1 ) } MBB_PHONEBOOK_CID; -typedef +typedef enum _MBB_SAT_CID { MBB_SAT_CID_PAC = 1, MBB_SAT_CID_TERMINAL_RESPONSE = 2, MBB_SAT_CID_ENVELOPE = 3, - MBB_SAT_CID_MAXIMUM = ( MBB_SAT_CID_ENVELOPE + 1 ) + MBB_SAT_CID_MAXIMUM = ( MBB_SAT_CID_ENVELOPE + 1 ) } MBB_SAT_CID; -typedef +typedef enum _MBB_AUTH_CID { MBB_AUTH_CID_AKA = 1, MBB_AUTH_CID_AKAP = 2, MBB_AUTH_CID_SIM = 3, - MBB_AUTH_CID_MAXIUM = ( MBB_AUTH_CID_SIM + 1 ) + MBB_AUTH_CID_MAXIUM = ( MBB_AUTH_CID_SIM + 1 ) } MBB_AUTH_CID; -typedef +typedef enum _MBB_DSS_CID { MBB_DSS_CID_CONNECT = 1, - MBB_DSS_CID_MAXIUM = ( MBB_DSS_CID_CONNECT + 1 ) + MBB_DSS_CID_MAXIUM = ( MBB_DSS_CID_CONNECT + 1 ) } MBB_DSS_CID; -typedef +typedef enum _MBB_MULTICARRIER_CID { MBB_MULTICARRIER_CID_CAPABILITIES = 1, MBB_MULTICARRIER_CID_LOCATION_INFO = 2, MBB_MULTICARRIER_CID_CURRENT_CID_LIST = 3, - MBB_MULTICARRIER_CID_MAXIMUM = ( MBB_MULTICARRIER_CID_CURRENT_CID_LIST + 1 ) + MBB_MULTICARRIER_CID_MAXIMUM = ( MBB_MULTICARRIER_CID_CURRENT_CID_LIST + 1 ) } MBB_MULTICARRIER_CID; -typedef +typedef enum _MBB_HOSTSHUTDOWN_CID { MBB_HOSTSHUTDOWN_CID_ONE = 1, MBB_HOSTSHUTDOWN_CID_PRESHUTDOWN = 2, - MBB_HOSTSHUTDOWN_CID_MAX = ( MBB_HOSTSHUTDOWN_CID_PRESHUTDOWN + 1 ) + MBB_HOSTSHUTDOWN_CID_MAX = ( MBB_HOSTSHUTDOWN_CID_PRESHUTDOWN + 1 ) } MBB_HOSTSHUTDOWN_CID; -typedef +typedef enum _MBB_VOICEEXTENSIONS_CID { MBB_VOICEEXTENSIONS_CID_SYS_CAPS = 1, @@ -693,10 +693,10 @@ enum _MBB_VOICEEXTENSIONS_CID MBB_VOICEEXTENSIONS_CID_SIGNAL_STATE_V2 = 8, MBB_VOICEEXTENSIONS_CID_LOCATION_STATE = 9, MBB_VOICEEXTENSIONS_CID_NITZ = 10, - MBB_VOICEEXTENSIONS_CID_MAX = ( MBB_VOICEEXTENSIONS_CID_NITZ + 1 ) + MBB_VOICEEXTENSIONS_CID_MAX = ( MBB_VOICEEXTENSIONS_CID_NITZ + 1 ) } MBB_VOICEEXTENSIONS_CID; -typedef +typedef enum _MBB_UICC_CID { MBB_UICC_CID_ATR = 1, @@ -709,18 +709,18 @@ enum _MBB_UICC_CID MBB_UICC_CID_FILE_STATUS = 8, MBB_UICC_CID_ACCESS_BINARY = 9, MBB_UICC_CID_ACCESS_RECORD = 10, - MBB_UICC_CID_MAXIMUM = ( MBB_UICC_CID_ACCESS_RECORD + 1 ) + MBB_UICC_CID_MAXIMUM = ( MBB_UICC_CID_ACCESS_RECORD + 1 ) } MBB_UICC_CID; -typedef +typedef enum _MBB_SAR_CID { MBB_SAR_CID_CONFIG = 1, MBB_SAR_CID_TRANSMISSION_STATUS = 2, - MBB_SAR_CID_MAXIMUM = ( MBB_SAR_CID_TRANSMISSION_STATUS + 1 ) + MBB_SAR_CID_MAXIMUM = ( MBB_SAR_CID_TRANSMISSION_STATUS + 1 ) } MBB_SAR_CID; -typedef +typedef enum _MBB_BASICCONNECTEXT_CID { MBB_BASICCONNECTEXT_CID_PROVISIONED_CONTEXT_V2 = 1, @@ -742,48 +742,48 @@ enum _MBB_BASICCONNECTEXT_CID MBB_BASICCONNECTEXT_CID_REGISTRATION_PARAMS = 17, MBB_BASICCONNECTEXT_CID_NETWORK_PARAMS = 18, MBB_BASICCONNECTEXT_CID_WAKE_REASON = 19, - MBB_BASICCONNECTEXT_CID_MAXIMUM = ( MBB_BASICCONNECTEXT_CID_WAKE_REASON + 1 ) + MBB_BASICCONNECTEXT_CID_MAXIMUM = ( MBB_BASICCONNECTEXT_CID_WAKE_REASON + 1 ) } MBB_BASICCONNECTEXT_CID; -typedef +typedef enum _MBB_DEVICE_TYPE { MbbDeviceTypeUnknown = 0, MbbDeviceTypeEmbedded = 1, MbbDeviceTypeRemovable = 2, MbbDeviceTypeRemote = 3, - MbbDeviceTypeMaximum = ( MbbDeviceTypeRemote + 1 ) + MbbDeviceTypeMaximum = ( MbbDeviceTypeRemote + 1 ) } MBB_DEVICE_TYPE; -typedef +typedef enum _MBB_CELLULAR_CLASS { MbbCellularClassInvalid = 0, MbbCellularClassGsm = 1, MbbCellularClassCdma = 2, - MbbCellularClassMaximum = ( MbbCellularClassCdma + 1 ) + MbbCellularClassMaximum = ( MbbCellularClassCdma + 1 ) } MBB_CELLULAR_CLASS; -typedef +typedef enum _MBB_VOICE_CLASS { MbbVoiceClassInvalid = 0, MbbVoiceClassNoVoice = 1, MbbVoiceClassSeparateVoiceData = 2, MbbVoiceClassSimultaneousVoiceData = 3, - MbbVoiceClassMaximum = ( MbbVoiceClassSimultaneousVoiceData + 1 ) + MbbVoiceClassMaximum = ( MbbVoiceClassSimultaneousVoiceData + 1 ) } MBB_VOICE_CLASS; -typedef +typedef enum _MBB_SIM_CLASS { MbbSimClassInvalid = 0, MbbSimClassSimLogical = 1, MbbSimClassSimRemovable = 2, - MbbSimClassMaximum = ( MbbSimClassSimRemovable + 1 ) + MbbSimClassMaximum = ( MbbSimClassSimRemovable + 1 ) } MBB_SIM_CLASS; -typedef +typedef enum _MBB_DATA_CLASS_VALUE { MbbDataClassNone = 0, @@ -806,7 +806,7 @@ enum _MBB_DATA_CLASS_VALUE MbbDataClassCustom = 0x80000000 } MBB_DATA_CLASS_VALUE; -typedef +typedef enum _MBB_DATA_SUBCLASS_VALUE { MbbDataSubClassNone = 0, @@ -817,17 +817,17 @@ enum _MBB_DATA_SUBCLASS_VALUE MbbDataSubClassNGENDC = 0x10 } MBB_DATA_SUBCLASS_VALUE; -typedef +typedef enum _MBB_FREQUENCY_RANGE { MbbFrequencyRangeUnknown = 0, MbbFrequencyRange1 = 1, MbbFrequencyRange2 = 2, MbbFrequencyRange1AndRange2 = 3, - MbbFrequencyRangeMaximum = ( MbbFrequencyRange1AndRange2 + 1 ) + MbbFrequencyRangeMaximum = ( MbbFrequencyRange1AndRange2 + 1 ) } MBB_FREQUENCY_RANGE; -typedef +typedef enum _MBB_BAND_CLASS_VALUE { MbbBandClassUnknown = 0, @@ -852,7 +852,7 @@ enum _MBB_BAND_CLASS_VALUE MbbBandClassCustom = 0x80000000 } MBB_BAND_CLASS_VALUE; -typedef +typedef enum _MBB_SMS_CAPS_VALUE { MbbSmsCapsNone = 0, @@ -862,7 +862,7 @@ enum _MBB_SMS_CAPS_VALUE MbbSmsCapsTextSend = 0x8 } MBB_SMS_CAPS_VALUE; -typedef +typedef enum _MBB_CONTROL_CAPS_VALUE { MbbControlCapsNone = 0, @@ -876,7 +876,7 @@ enum _MBB_CONTROL_CAPS_VALUE MbbControlCapsSIMHotSwapCapable = 0x80 } MBB_CONTROL_CAPS_VALUE; -typedef +typedef enum _MBB_READY_STATE { MbbReadyStateOff = 0, @@ -887,33 +887,33 @@ enum _MBB_READY_STATE MbbReadyStateNotActivated = 5, MbbReadyStateDeviceLocked = 6, MbbReadyStateNoEsimProfile = 7, - MbbReadyStateMaximum = ( MbbReadyStateNoEsimProfile + 1 ) + MbbReadyStateMaximum = ( MbbReadyStateNoEsimProfile + 1 ) } MBB_READY_STATE; -typedef +typedef enum _MBB_READY_INFO_FLAGS { MbbReadyInfoFlagsNone = 0, MbbReadyInfoFlagsUniqueId = 1 } MBB_READY_INFO_FLAGS; -typedef +typedef enum _MBB_EMERGENCY_MODE { MbbEmergencyModeOff = 0, MbbEmergencyModeOn = 1, - MbbEmergencyModeMaximum = ( MbbEmergencyModeOn + 1 ) + MbbEmergencyModeMaximum = ( MbbEmergencyModeOn + 1 ) } MBB_EMERGENCY_MODE; -typedef +typedef enum _MBB_RADIO_STATE { MbbRadioStateOff = 0, MbbRadioStateOn = 1, - MbbRadioStateMaximum = ( MbbRadioStateOn + 1 ) + MbbRadioStateMaximum = ( MbbRadioStateOn + 1 ) } MBB_RADIO_STATE; -typedef +typedef enum _MBB_PIN_TYPE { MbbPinTypeNone = 0, @@ -936,46 +936,46 @@ enum _MBB_PIN_TYPE MbbPinTypeCorporatePuk = 17, MbbPinTypeNev = 18, MbbPinTypeAdm = 19, - MbbPinTypeMaximum = ( MbbPinTypeAdm + 1 ) + MbbPinTypeMaximum = ( MbbPinTypeAdm + 1 ) } MBB_PIN_TYPE; -typedef +typedef enum _MBB_PIN_STATE { MbbPinStateUnlocked = 0, MbbPinStateLocked = 1, - MbbPinStateMaximum = ( MbbPinStateLocked + 1 ) + MbbPinStateMaximum = ( MbbPinStateLocked + 1 ) } MBB_PIN_STATE; -typedef +typedef enum _MBB_PIN_OPERATION { MbbPinOperationEnter = 0, MbbPinOperationEnable = 1, MbbPinOperationDisable = 2, MbbPinOperationChange = 3, - MbbPinOperationMaximum = ( MbbPinOperationChange + 1 ) + MbbPinOperationMaximum = ( MbbPinOperationChange + 1 ) } MBB_PIN_OPERATION; -typedef +typedef enum _MBB_PIN_MODE { MbbPinModeNotSupported = 0, MbbPinModeEnabled = 1, MbbPinModeDisabled = 2, - MbbPinModeMaximum = ( MbbPinModeDisabled + 1 ) + MbbPinModeMaximum = ( MbbPinModeDisabled + 1 ) } MBB_PIN_MODE; -typedef +typedef enum _MBB_PIN_FORMAT { MbbPinFormatUnknown = 0, MbbPinFormatNumeric = 1, MbbPinFormatAlphaNumeric = 2, - MbbPinFormatMaximum = ( MbbPinFormatAlphaNumeric + 1 ) + MbbPinFormatMaximum = ( MbbPinFormatAlphaNumeric + 1 ) } MBB_PIN_FORMAT; -typedef +typedef enum _MBB_PROVIDER_STATE_VALUE { MbbProviderStateHome = 0x1, @@ -986,15 +986,15 @@ enum _MBB_PROVIDER_STATE_VALUE MbbProviderStatePreferredMulticarrier = 0x20 } MBB_PROVIDER_STATE_VALUE; -typedef +typedef enum _MBB_REGISTER_ACTION { MbbRegisterActionAutomatic = 0, MbbRegisterActionManual = 1, - MbbRegisterActionMaximum = ( MbbRegisterActionManual + 1 ) + MbbRegisterActionMaximum = ( MbbRegisterActionManual + 1 ) } MBB_REGISTER_ACTION; -typedef +typedef enum _MBB_REGISTER_STATE { MbbRegisterStateUnknown = 0, @@ -1004,27 +1004,27 @@ enum _MBB_REGISTER_STATE MbbRegisterStateRoaming = 4, MbbRegisterStatePartner = 5, MbbRegisterStateDenied = 6, - MbbRegisterStateMaximum = ( MbbRegisterStateDenied + 1 ) + MbbRegisterStateMaximum = ( MbbRegisterStateDenied + 1 ) } MBB_REGISTER_STATE; -typedef +typedef enum _MBB_REGISTER_MODE { MbbRegisterModeUnknown = 0, MbbRegisterModeAutomatic = 1, MbbRegisterModeManual = 2, - MbbRegisterModeMaximum = ( MbbRegisterModeManual + 1 ) + MbbRegisterModeMaximum = ( MbbRegisterModeManual + 1 ) } MBB_REGISTER_MODE; -typedef +typedef enum _MBB_PACKET_SERVICE_ACTION { MbbPacketServiceActionAttach = 0, MbbPacketServiceActionDetach = 1, - MbbPacketServiceActionMaximum = ( MbbPacketServiceActionDetach + 1 ) + MbbPacketServiceActionMaximum = ( MbbPacketServiceActionDetach + 1 ) } MBB_PACKET_SERVICE_ACTION; -typedef +typedef enum _MBB_PACKET_SERVICE_STATE { MbbPacketServiceStateUnknown = 0, @@ -1032,10 +1032,10 @@ enum _MBB_PACKET_SERVICE_STATE MbbPacketServiceStateAttached = 2, MbbPacketServiceStateDetaching = 3, MbbPacketServiceStateDetached = 4, - MbbPacketServiceStateMaximum = ( MbbPacketServiceStateDetached + 1 ) + MbbPacketServiceStateMaximum = ( MbbPacketServiceStateDetached + 1 ) } MBB_PACKET_SERVICE_STATE; -typedef +typedef enum _MBB_CONTEXT_IP_TYPE { MbbContextIPTypeDefault = 0, @@ -1043,37 +1043,37 @@ enum _MBB_CONTEXT_IP_TYPE MbbContextIPTypeIPv6 = 2, MbbContextIPTypeIPv4v6 = 3, MbbContextIPTypeIPv4AndIPv6 = 4, - MbbContextIPTypeMaximum = ( MbbContextIPTypeIPv4AndIPv6 + 1 ) + MbbContextIPTypeMaximum = ( MbbContextIPTypeIPv4AndIPv6 + 1 ) } MBB_CONTEXT_IP_TYPE; -typedef +typedef enum _MBB_ACTIVATION_COMMAND { MbbActivationCommandDeactivate = 0, MbbActivationCommandActivate = 1, MbbActivationCommandCancel = 2, - MbbActivationCommandMaximum = ( MbbActivationCommandCancel + 1 ) + MbbActivationCommandMaximum = ( MbbActivationCommandCancel + 1 ) } MBB_ACTIVATION_COMMAND; -typedef +typedef enum _MBB_COMPRESSION { MbbCompressionNone = 0, MbbCompressionEnable = 1, - MbbCompressionMaximum = ( MbbCompressionEnable + 1 ) + MbbCompressionMaximum = ( MbbCompressionEnable + 1 ) } MBB_COMPRESSION; -typedef +typedef enum _MBB_AUTH_PROTOCOL { MbbAuthProtocolNone = 0, MbbAuthProtocolPap = 1, MbbAuthProtocolChap = 2, MbbAuthProtocolMsChapV2 = 3, - MbbAuthProtocolMaximum = ( MbbAuthProtocolMsChapV2 + 1 ) + MbbAuthProtocolMaximum = ( MbbAuthProtocolMsChapV2 + 1 ) } MBB_AUTH_PROTOCOL; -typedef +typedef enum _MBB_ACTIVATION_STATE { MbbActivationStateUnknown = 0, @@ -1081,27 +1081,27 @@ enum _MBB_ACTIVATION_STATE MbbActivationStateActivating = 2, MbbActivationStateDeactivated = 3, MbbActivationStateDeactivating = 4, - MbbActivationStateMaximum = ( MbbActivationStateDeactivating + 1 ) + MbbActivationStateMaximum = ( MbbActivationStateDeactivating + 1 ) } MBB_ACTIVATION_STATE; -typedef +typedef enum _MBB_VOICE_CALL_STATE { MbbVoiceCallStateNone = 0, MbbVoiceCallStateInProgress = 1, MbbVoiceCallStateHangUp = 2, - MbbVoiceCallStateMaximum = ( MbbVoiceCallStateHangUp + 1 ) + MbbVoiceCallStateMaximum = ( MbbVoiceCallStateHangUp + 1 ) } MBB_VOICE_CALL_STATE; -typedef +typedef enum _MBB_SMS_FORMAT { MbbSmsFormatPdu = 0, MbbSmsFormatCdma = 1, - MbbSmsFormatMaximum = ( MbbSmsFormatCdma + 1 ) + MbbSmsFormatMaximum = ( MbbSmsFormatCdma + 1 ) } MBB_SMS_FORMAT; -typedef +typedef enum _MBB_SMS_FLAG { MbbSmsFlagAll = 0, @@ -1110,10 +1110,10 @@ enum _MBB_SMS_FLAG MbbSmsFlagOld = 3, MbbSmsFlagSent = 4, MbbSmsFlagDraft = 5, - MbbSmsFlagMaximum = ( MbbSmsFlagDraft + 1 ) + MbbSmsFlagMaximum = ( MbbSmsFlagDraft + 1 ) } MBB_SMS_FLAG; -typedef +typedef enum _MBB_SMS_CDMA_LANGUAGE { MbbSmsCdmaLanguageUnknown = 0, @@ -1124,10 +1124,10 @@ enum _MBB_SMS_CDMA_LANGUAGE MbbSmsCdmaLanguageKorean = 5, MbbSmsCdmaLanguageChinese = 6, MbbSmsCdmaLanguageHebrew = 7, - MbbSmsCdmaLanguageMaximum = ( MbbSmsCdmaLanguageHebrew + 1 ) + MbbSmsCdmaLanguageMaximum = ( MbbSmsCdmaLanguageHebrew + 1 ) } MBB_SMS_CDMA_LANGUAGE; -typedef +typedef enum _MBB_SMS_CDMA_ENCODING { MbbSmsCdmaEncodingOctet = 0, @@ -1140,20 +1140,20 @@ enum _MBB_SMS_CDMA_ENCODING MbbSmsCdmaEncodingLatinHebrew = 7, MbbSmsCdmaEncodingLatin = 8, MbbSmsCdmaEncodingGsm7Bit = 9, - MbbSmsCdmaEncodingMaximum = ( MbbSmsCdmaEncodingGsm7Bit + 1 ) + MbbSmsCdmaEncodingMaximum = ( MbbSmsCdmaEncodingGsm7Bit + 1 ) } MBB_SMS_CDMA_ENCODING; -typedef +typedef enum _MBB_SMS_MESSAGE_STATUS { MbbSmsMessageStatusNew = 0, MbbSmsMessageStatusOld = 1, MbbSmsMessageStatusDraft = 2, MbbSmsMessageStatusSent = 3, - MbbSmsMessageStatusMaximum = ( MbbSmsMessageStatusSent + 1 ) + MbbSmsMessageStatusMaximum = ( MbbSmsMessageStatusSent + 1 ) } MBB_SMS_MESSAGE_STATUS; -typedef +typedef enum _MBB_REG_FLAGS_VALUE { MbbRegFlagsNone = 0, @@ -1161,7 +1161,7 @@ enum _MBB_REG_FLAGS_VALUE MbbRegFlagsPSAutoAttach = 0x2 } MBB_REG_FLAGS_VALUE; -typedef +typedef enum _MBB_SMS_STATUS_FLAGS_VALUE { MbbSmsFlagNone = 0, @@ -1193,7 +1193,7 @@ typedef struct _MBB_ARRAY_ELEMENT2 typedef struct _MBB_ARRAY_ELEMENT2 *PMBB_ARRAY_ELEMENT2; -typedef +typedef enum _MBB_DSS_PAYLOAD_SUPPORT { MbbDssPayloadNone = 0, @@ -1201,14 +1201,14 @@ enum _MBB_DSS_PAYLOAD_SUPPORT MbbDssPayloadDeviceToHost = 0x2 } MBB_DSS_PAYLOAD_SUPPORT; -typedef +typedef enum _MBB_DSS_LINK_STATE { MbbDssLinkDeactivate = 0, MbbDssLinkActivate = 0x1 } MBB_DSS_LINK_STATE; -typedef +typedef enum _MBB_IP_CONFIGURATION_FLAGS_VALUE { MbbIpFlagsNone = 0, @@ -1218,54 +1218,54 @@ enum _MBB_IP_CONFIGURATION_FLAGS_VALUE MbbIpFlagsMTUAvailable = 0x8 } MBB_IP_CONFIGURATION_FLAGS_VALUE; -typedef +typedef enum _MBB_NETWORK_IDLE_HINT_STATE { MbbNetworkIdleHintDisabled = 0, MbbNetworkIdleHintEnabled = 1 } MBB_NETWORK_IDLE_HINT_STATE; -typedef +typedef enum _MBB_SAR_BACKOFF_STATE { MbbSarBackoffStatusDisabled = 0, MbbSarBackoffStatusEnabled = 1, - MbbSarBackoffStatusMaximum = ( MbbSarBackoffStatusEnabled + 1 ) + MbbSarBackoffStatusMaximum = ( MbbSarBackoffStatusEnabled + 1 ) } MBB_SAR_BACKOFF_STATE; -typedef +typedef enum _MBB_SAR_CONTROL_MODE { MbbSarControlModeDevice = 0, MbbSarControlModeOS = 1, - MbbSarControlModeMaximum = ( MbbSarControlModeOS + 1 ) + MbbSarControlModeMaximum = ( MbbSarControlModeOS + 1 ) } MBB_SAR_CONTROL_MODE; -typedef +typedef enum _MBB_SAR_WIFI_HARDWARE_INTEGRATION { MbbSarWifiHardwareNotIntegrated = 0, MbbSarWifiHardwareIntegrated = 1, - MbbSarWifiHardwareIntegrationMaximum = ( MbbSarWifiHardwareIntegrated + 1 ) + MbbSarWifiHardwareIntegrationMaximum = ( MbbSarWifiHardwareIntegrated + 1 ) } MBB_SAR_WIFI_HARDWARE_INTEGRATION; -typedef +typedef enum _MBB_SAR_TRANSMISSION_STATUS_NOTIFICATION_STATE { MbbTransmissionNotificationDisabled = 0, MbbTransmissionNotificationEnabled = 1, - MbbTransmissionNotificationMaximum = ( MbbTransmissionNotificationEnabled + 1 ) + MbbTransmissionNotificationMaximum = ( MbbTransmissionNotificationEnabled + 1 ) } MBB_SAR_TRANSMISSION_STATUS_NOTIFICATION_STATE; -typedef +typedef enum _MBB_SAR_TRANSMISSION_STATUS { MbbTransmissionStateInactive = 0, MbbTransmissionStateActive = 1, - MbbTransmissionStateMaximum = ( MbbTransmissionStateActive + 1 ) + MbbTransmissionStateMaximum = ( MbbTransmissionStateActive + 1 ) } MBB_SAR_TRANSMISSION_STATUS; -typedef +typedef enum _MBB_BASICCONNECTEXT_CONTEXT_ROAMING_CONTROL { MbbMsContextRoamingControlHomeOnly = 0, @@ -1275,27 +1275,27 @@ enum _MBB_BASICCONNECTEXT_CONTEXT_ROAMING_CONTROL MbbMsContextRoamingControlHomeAndNonPartner = 4, MbbMsContextRoamingControlPartnerAndNonPartner = 5, MbbMsContextRoamingControlAllowAll = 6, - MbbMsContextRoamingControlMaximum = ( MbbMsContextRoamingControlAllowAll + 1 ) + MbbMsContextRoamingControlMaximum = ( MbbMsContextRoamingControlAllowAll + 1 ) } MBB_BASICCONNECTEXT_CONTEXT_ROAMING_CONTROL; -typedef +typedef enum _MBB_BASICCONNECTEXT_CONTEXT_MEDIA_TYPE { MbbMsContextMediaTypeCellularOnly = 0, MbbMsContextMediaTypeWifiOnly = 1, MbbMsContextMediaTypeAll = 2, - MbbMsContextMediaTypeMaximum = ( MbbMsContextMediaTypeAll + 1 ) + MbbMsContextMediaTypeMaximum = ( MbbMsContextMediaTypeAll + 1 ) } MBB_BASICCONNECTEXT_CONTEXT_MEDIA_TYPE; -typedef +typedef enum _MBB_BASICCONNECTEXT_CONTEXT_ENABLE { MbbMsContextDisabled = 0, MbbMsContextEnabled = 1, - MbbMsContextEnableMaximum = ( MbbMsContextEnabled + 1 ) + MbbMsContextEnableMaximum = ( MbbMsContextEnabled + 1 ) } MBB_BASICCONNECTEXT_CONTEXT_ENABLE; -typedef +typedef enum _MBB_BASICCONNECTEXT_CONTEXT_SOURCE { MbbMsContextSourceAdmin = 0, @@ -1303,61 +1303,61 @@ enum _MBB_BASICCONNECTEXT_CONTEXT_SOURCE MbbMsContextSourceOperator = 2, MbbMsContextSourceModem = 3, MbbMsContextSourceDevice = 4, - MbbMsContextSourceMaximum = ( MbbMsContextSourceDevice + 1 ) + MbbMsContextSourceMaximum = ( MbbMsContextSourceDevice + 1 ) } MBB_BASICCONNECTEXT_CONTEXT_SOURCE; -typedef +typedef enum _MBB_BASICCONNECTEXT_CONTEXT_OPERATIONS { MbbMsContextOperationDefault = 0, MbbMsContextOperationDelete = 1, MbbMsContextOperationRestoreFactory = 2, - MbbMsContextOperationMaximum = ( MbbMsContextOperationRestoreFactory + 1 ) + MbbMsContextOperationMaximum = ( MbbMsContextOperationRestoreFactory + 1 ) } MBB_BASICCONNECTEXT_CONTEXT_OPERATIONS; -typedef +typedef enum _MBB_BASICCONNECTEXT_NETWORK_BLACKLIST_STATE { MbbMsNetworkBlacklistStateNotActuated = 0, MbbMsNetworkBlacklistSIMProviderActuated = 1, MbbMsNetworkBlacklistNetworkProviderActuated = 2, - MbbMsNetworkBlacklistStateMaximum = ( MbbMsNetworkBlacklistNetworkProviderActuated + 1 ) + MbbMsNetworkBlacklistStateMaximum = ( MbbMsNetworkBlacklistNetworkProviderActuated + 1 ) } MBB_BASICCONNECTEXT_NETWORK_BLACKLIST_STATE; -typedef +typedef enum _MBB_BASICCONNECTEXT_NETWORK_BLACKLIST_TYPE { MbbMsNetworkBlacklistTypeSIM = 0, MbbMsNetworkBlacklistTypeNetwork = 1, - MbbMsNetworkBlacklistTypeMaximum = ( MbbMsNetworkBlacklistTypeNetwork + 1 ) + MbbMsNetworkBlacklistTypeMaximum = ( MbbMsNetworkBlacklistTypeNetwork + 1 ) } MBB_BASICCONNECTEXT_NETWORK_BLACKLIST_TYPE; -typedef +typedef enum _MBB_BASICCONNECTEXT_LTEATTACH_ROAMING_CONTROL { MbbMsLteAttachContextRoamingControlHome = 0, MbbMsLteAttachContextRoamingControlPartner = 1, MbbMsLteAttachContextRoamingControlNonPartner = 2, - MbbMsLteAttachContextRoamingControlMaximum = ( MbbMsLteAttachContextRoamingControlNonPartner + 1 ) + MbbMsLteAttachContextRoamingControlMaximum = ( MbbMsLteAttachContextRoamingControlNonPartner + 1 ) } MBB_BASICCONNECTEXT_LTEATTACH_ROAMING_CONTROL; -typedef +typedef enum _MBB_BASICCONNECTEXT_LTEATTACH_CONTEXT_OPERATIONS { MbbMsLteAttachContextOperationDefault = 0, MbbMsLteAttachContextOperationRestoreFactory = 1, - MbbMsLteAttachContextOperationMaximum = ( MbbMsLteAttachContextOperationRestoreFactory + 1 ) + MbbMsLteAttachContextOperationMaximum = ( MbbMsLteAttachContextOperationRestoreFactory + 1 ) } MBB_BASICCONNECTEXT_LTEATTACH_CONTEXT_OPERATIONS; -typedef +typedef enum _MBB_BASICCONNECTEXT_LTEATTACH_STATE { MbbMsLteAttachStateDetached = 0, MbbMsLteAttachStateAttached = 1, - MbbMsLteAttachStateMaximum = ( MbbMsLteAttachStateAttached + 1 ) + MbbMsLteAttachStateMaximum = ( MbbMsLteAttachStateAttached + 1 ) } MBB_BASICCONNECTEXT_LTEATTACH_STATE; -typedef +typedef enum _MBB_BASICCONNECTEXT_UICCSLOT_STATE { MbbMsUiccSlotStateUnknown = 0, @@ -1371,7 +1371,7 @@ enum _MBB_BASICCONNECTEXT_UICCSLOT_STATE MbbMsUiccSlotStateActiveEsimNoProfiles = 8 } MBB_BASICCONNECTEXT_UICCSLOT_STATE; -typedef +typedef enum _MBB_BASICCONNECTEXT_MODEM_LOGGING_LEVEL_CONFIG { MbbMsModemLoggingLevelProd = 0, @@ -1379,15 +1379,15 @@ enum _MBB_BASICCONNECTEXT_MODEM_LOGGING_LEVEL_CONFIG MbbMsModemLoggingLevelLabMedium = 2, MbbMsModemLoggingLevelLabLow = 3, MbbMsModemLoggingLevelOem = 4, - MbbMsModemLoggingLevelMaximum = ( MbbMsModemLoggingLevelOem + 1 ) + MbbMsModemLoggingLevelMaximum = ( MbbMsModemLoggingLevelOem + 1 ) } MBB_BASICCONNECTEXT_MODEM_LOGGING_LEVEL_CONFIG; -typedef +typedef enum _MBB_PCO_TYPE { MbbPcoTypeComplete = 0, MbbPcoTypePartial = 1, - MbbPcoTypeMaximum = ( MbbPcoTypePartial + 1 ) + MbbPcoTypeMaximum = ( MbbPcoTypePartial + 1 ) } MBB_PCO_TYPE; typedef struct _MBB_DEVICE_CAPS @@ -1421,7 +1421,7 @@ typedef struct _MBB_SUBSCRIBER_READY_INFO typedef struct _MBB_SUBSCRIBER_READY_INFO *PMBB_SUBSCRIBER_READY_INFO; -typedef +typedef enum _MBB_SUBSCRIBER_READY_STATUS_FLAGS { MbbSubscriberReadyStatusFlagNone = 0, @@ -1639,13 +1639,13 @@ typedef struct _MBB_SET_CONTEXT_STATE typedef struct _MBB_SET_CONTEXT_STATE *PMBB_SET_CONTEXT_STATE; -typedef +typedef enum _MBB_ACCESS_MEDIA_PREF { MbbAccessMediaPrefNone = 0, MbbAccessMediaPref3GPP = 1, MbbAccessMediaPref3GPPPreferred = 2, - MbbAccessMediaPrefMaximum = ( MbbAccessMediaPref3GPPPreferred + 1 ) + MbbAccessMediaPrefMaximum = ( MbbAccessMediaPref3GPPPreferred + 1 ) } MBB_ACCESS_MEDIA_PREF; typedef struct _MBB_SET_CONTEXT_STATE_EX3 @@ -1796,12 +1796,12 @@ typedef struct _MBB_PACKET_STATISTICS typedef struct _MBB_PACKET_STATISTICS *PMBB_PACKET_STATISTICS; -typedef +typedef enum _MBB_VISIBLE_PROVIDERS_ACTION_VALUE { MbbVisibleProvidersActionFull = 0, MbbVisibleProvidersActionMulticarrier = 0x1, - MbbVisibleProvidersActionMax = ( MbbVisibleProvidersActionMulticarrier + 1 ) + MbbVisibleProvidersActionMax = ( MbbVisibleProvidersActionMulticarrier + 1 ) } MBB_VISIBLE_PROVIDERS_ACTION_VALUE; typedef struct _MBB_GET_VISIBLE_PROVIDERS @@ -1811,7 +1811,7 @@ typedef struct _MBB_GET_VISIBLE_PROVIDERS typedef struct _MBB_GET_VISIBLE_PROVIDERS *PMBB_GET_VISIBLE_PROVIDERS; -typedef +typedef enum _MBB_SMS_STORAGE_STATE { MbbSmsStorageNotInitialized = 0, @@ -1937,7 +1937,7 @@ typedef struct _MBB_SMS_STATUS typedef struct _MBB_SMS_STATUS *PMBB_SMS_STATUS; -typedef +typedef enum _MBB_USSD_ACTION { MbbUSSDInitiate = 0, @@ -1945,7 +1945,7 @@ enum _MBB_USSD_ACTION MbbUSSDCancel = 2 } MBB_USSD_ACTION; -typedef +typedef enum _MBB_USSD_RESPONSE { MbbUSSDNoActionRequired = 0, @@ -1956,7 +1956,7 @@ enum _MBB_USSD_RESPONSE MbbUSSDNetworkTimeOut = 5 } MBB_USSD_RESPONSE; -typedef +typedef enum _MBB_USSD_SESSION_STATE { MbbUSSDNewSession = 0, @@ -2145,7 +2145,7 @@ typedef struct _MBB_MULTICARRIER_CURRENT_CID_LIST typedef struct _MBB_MULTICARRIER_CURRENT_CID_LIST *PMBB_MULTICARRIER_CURRENT_CID_LIST; -typedef +typedef enum _MBB_UICC_APP_TYPE { MbbUiccAppTypeUnknown = 0, @@ -2155,7 +2155,7 @@ enum _MBB_UICC_APP_TYPE MbbUiccAppTypeUSIM = 4, MbbUiccAppTypeCSIM = 5, MbbUiccAppTypeISIM = 6, - MbbUiccAppTypeMax = ( MbbUiccAppTypeISIM + 1 ) + MbbUiccAppTypeMax = ( MbbUiccAppTypeISIM + 1 ) } MBB_UICC_APP_TYPE; typedef struct _MBB_UICC_APP_INFO @@ -2181,26 +2181,26 @@ typedef struct _MBB_UICC_APP_LIST typedef struct _MBB_UICC_APP_LIST *PMBB_UICC_APP_LIST; -typedef +typedef enum _MBB_UICC_FILE_ACCESSIBILITY { MbbUiccFileAccessibilityUnknown = 0, MbbUiccFileAccessibilityNotShareable = 1, MbbUiccFileAccessibilityShareable = 2, - MbbUiccFileAccessibilityMax = ( MbbUiccFileAccessibilityShareable + 1 ) + MbbUiccFileAccessibilityMax = ( MbbUiccFileAccessibilityShareable + 1 ) } MBB_UICC_FILE_ACCESSIBILITY; -typedef +typedef enum _MBB_UICC_FILE_TYPE { MbbUiccFileTypeUnknown = 0, MbbUiccFileTypeWorkingEf = 1, MbbUiccFileTypeInternalEf = 2, MbbUiccFileTypeDfOrAdf = 3, - MbbUiccFileTypeMax = ( MbbUiccFileTypeDfOrAdf + 1 ) + MbbUiccFileTypeMax = ( MbbUiccFileTypeDfOrAdf + 1 ) } MBB_UICC_FILE_TYPE; -typedef +typedef enum _MBB_UICC_FILE_STRUCTURE { MbbUiccFileStructureUnknown = 0, @@ -2208,7 +2208,7 @@ enum _MBB_UICC_FILE_STRUCTURE MbbUiccFileStructureCyclic = 2, MbbUiccFileStructureLinear = 3, MbbUiccFileStructureBertlv = 4, - MbbUiccFileStructureMax = ( MbbUiccFileStructureBertlv + 1 ) + MbbUiccFileStructureMax = ( MbbUiccFileStructureBertlv + 1 ) } MBB_UICC_FILE_STRUCTURE; typedef struct _MBB_UICC_FILE_PATH @@ -2332,7 +2332,7 @@ typedef struct _MBB_DEVICE_SLOT_MAPPING_INFO typedef struct _MBB_DEVICE_SLOT_MAPPING_INFO *PMBB_DEVICE_SLOT_MAPPING_INFO; -typedef +typedef enum _MBB_UICCSLOT_STATE { MbbUiccSlotStateOffEmpty = 0, @@ -2366,14 +2366,14 @@ typedef struct _MBB_DEVICE_BINDINGS_INFO typedef struct _MBB_DEVICE_BINDINGS_INFO *PMBB_DEVICE_BINDINGS_INFO; -typedef +typedef enum _MBB_REGISTRATION_VOICE_CLASS { MbbRegistrationVoiceClassVoiceCentric = 0, MbbRegistrationVoiceClassDataCentric = 1 } MBB_REGISTRATION_VOICE_CLASS; -typedef +typedef enum _MBB_REGISTRATION_VOICE_DOMAIN_PREFERENCE { MbbRegistrationVoiceDomainPreferenceCsOnly = 0, @@ -2382,7 +2382,7 @@ enum _MBB_REGISTRATION_VOICE_DOMAIN_PREFERENCE MbbRegistrationVoiceDomainPreferenceImsOnly = 3 } MBB_REGISTRATION_VOICE_DOMAIN_PREFERENCE; -typedef +typedef enum _MBB_REGISTRATION_VOICE_SUPPORT { MbbRegistrationVoiceSupportNone = 0, @@ -2394,7 +2394,7 @@ enum _MBB_REGISTRATION_VOICE_SUPPORT MbbRegistrationVoiceSupportCsEmergency = 0x20 } MBB_REGISTRATION_VOICE_SUPPORT; -typedef +typedef enum _MBB_REGISTRATION_CDMA_ROAM_MODE { MbbRegistrationCdmaRoamModeAutomatic = 0, @@ -2457,7 +2457,7 @@ typedef struct _MBB_REGISTRATION_STATE_INFO_V2 typedef struct _MBB_REGISTRATION_STATE_INFO_V2 *PMBB_REGISTRATION_STATE_INFO_V2; -typedef +typedef enum _MBB_IMS_VOICE_STATUS { MbbImsVoiceStatusUnknown = 0, @@ -2544,7 +2544,7 @@ typedef struct _MBB_SIGNAL_STATE_INFOS_V2 typedef struct _MBB_SIGNAL_STATE_INFOS_V2 *PMBB_SIGNAL_STATE_INFOS_V2; -typedef +typedef enum _MBB_LOCATION_TRIGGER_MODE { MbbLocationTriggerNone = 0, @@ -2628,14 +2628,14 @@ typedef struct _MBB_UICC_CLOSE_CHANNEL_INFO typedef struct _MBB_UICC_CLOSE_CHANNEL_INFO *PMBB_UICC_CLOSE_CHANNEL_INFO; -typedef +typedef enum _MBB_UICC_SECURE_MESSAGING { MbbUiccSecureMessagingNone = 0, MbbUiccSecureMessagingNoHdrAuth = 1 } MBB_UICC_SECURE_MESSAGING; -typedef +typedef enum _MBB_UICC_CLASS_BYTE_TYPE { MbbUiccClassByteTypeInterindustry = 0, @@ -2685,14 +2685,14 @@ typedef struct _MBB_UICC_TERMINAL_CAPABILITY_INFO typedef struct _MBB_UICC_TERMINAL_CAPABILITY_INFO *PMBB_UICC_TERMINAL_CAPABILITY_INFO; -typedef +typedef enum _MBB_UICC_PASSTHROUGH_ACTION { MbbUiccPassThroughDisable = 0, MbbUiccPassThroughEnable = 1 } MBB_UICC_PASSTHROUGH_ACTION; -typedef +typedef enum _MBB_UICC_PASSTHROUGH_STATUS { MbbUiccPassThroughDisabled = 0, @@ -3061,13 +3061,13 @@ typedef struct _MBB_TLV_IE typedef struct _MBB_TLV_IE *PMBB_TLV_IE; -typedef +typedef enum _MBB_ACCESS_TYPE { MbbAccessUnknown = 0, MbbAccess3GPP = 1, MbbAccessNon3GPP = 2, - MbbAccessMaximum = ( MbbAccessNon3GPP + 1 ) + MbbAccessMaximum = ( MbbAccessNon3GPP + 1 ) } MBB_ACCESS_TYPE; typedef struct _MBB_PRE_DFLT_NSSAI_INFO @@ -3129,13 +3129,13 @@ typedef struct _MBB_LADN typedef struct _MBB_LADN *PMBB_LADN; -typedef +typedef enum _MBB_MODEM_CONFIG_STATUS { ModemConfigStatusUnknown = 0, ModemConfigStatusStarted = 1, ModemConfigStatusCompleted = 2, - ModemConfigStatusMaximum = ( ModemConfigStatusCompleted + 1 ) + ModemConfigStatusMaximum = ( ModemConfigStatusCompleted + 1 ) } MBB_MODEM_CONFIG_STATUS; typedef struct _MBB_MODEM_CONFIG_INFO @@ -3146,17 +3146,17 @@ typedef struct _MBB_MODEM_CONFIG_INFO typedef struct _MBB_MODEM_CONFIG_INFO *PMBB_MODEM_CONFIG_INFO; -typedef +typedef enum _MBB_MICO_MODE { MicoModeDisabled = 0, MicoModeEnabled = 1, MicoModeUnsupported = 2, MBIMMicoModeDefault = 3, - MicoModeMaximum = ( MBIMMicoModeDefault + 1 ) + MicoModeMaximum = ( MBIMMicoModeDefault + 1 ) } MBB_MICO_MODE; -typedef +typedef enum _MBB_DRX_PARAMS { DRXNotSpecified = 0, @@ -3165,23 +3165,23 @@ enum _MBB_DRX_PARAMS DRXCycle64 = 3, DRXCycle128 = 4, DRXCycle256 = 5, - DRXCycleMaximum = ( DRXCycle256 + 1 ) + DRXCycleMaximum = ( DRXCycle256 + 1 ) } MBB_DRX_PARAMS; -typedef +typedef enum _MBB_DEFAULT_PDU_HINT { MBIMDefaultPDUSessionActivationUnlikely = 0, MBIMDefaultPDUSessionActivationLikely = 1, - DefaultPDUMaximum = ( MBIMDefaultPDUSessionActivationLikely + 1 ) + DefaultPDUMaximum = ( MBIMDefaultPDUSessionActivationLikely + 1 ) } MBB_DEFAULT_PDU_HINT; -typedef +typedef enum _MBB_MS_LADN_IND { LADNInfoNotNeeded = 0, LADNInfoRequested = 1, - LADNInfoMaximum = ( LADNInfoRequested + 1 ) + LADNInfoMaximum = ( LADNInfoRequested + 1 ) } MBB_MS_LADN_IND; typedef struct _MBB_REGISTRATION_PARAMS_INFO @@ -3195,7 +3195,7 @@ typedef struct _MBB_REGISTRATION_PARAMS_INFO typedef struct _MBB_REGISTRATION_PARAMS_INFO *PMBB_REGISTRATION_PARAMS_INFO; -typedef +typedef enum _MBB_MICO_IND { RaaiTypeRaNotAllocated = 0, @@ -3219,7 +3219,7 @@ typedef struct _MBB_NW_PARAMS_INFO typedef struct _MBB_NW_PARAMS_INFO *PMBB_NW_PARAMS_INFO; -typedef +typedef enum _MBB_WAKE_TYPE { WakeTypeCIDResponse = 0, diff --git a/network/wwan/cxwmbclass/rxqueue.cpp b/network/wwan/cxwmbclass/rxqueue.cpp index 836201a56..19153ac5e 100644 --- a/network/wwan/cxwmbclass/rxqueue.cpp +++ b/network/wwan/cxwmbclass/rxqueue.cpp @@ -271,7 +271,7 @@ MbbRecvNtbUnpackIpNdp32(_In_ PMBB_RECEIVE_NDP_CONTEXT ReceiveNdpContext, _In_ PN } incompletedDatagramLength = MBB_NDP32_GET_DATAGRAM_LENGTH(Ndp32, *IncompletedDatagramIndex); - + UINT32 const fragmentIndex = fr->BeginIndex; fragment = NetRingGetFragmentAtIndex(fr, fragmentIndex); fragment->Capacity = incompletedDatagramLength; @@ -296,7 +296,7 @@ MbbRecvNtbUnpackIpNdp32(_In_ PMBB_RECEIVE_NDP_CONTEXT ReceiveNdpContext, _In_ PN packet->Layout = {}; pr->BeginIndex = NetRingIncrementIndex(pr, pr->BeginIndex); - fr->BeginIndex = NetRingIncrementIndex(fr, fr->BeginIndex); + fr->BeginIndex = NetRingIncrementIndex(fr, fr->BeginIndex); } return status; } @@ -354,7 +354,7 @@ MbbRecvNtbUnpackIpNdp16(_In_ PMBB_RECEIVE_NDP_CONTEXT ReceiveNdpContext, _In_ PN packet->Layout = {}; pr->BeginIndex = NetRingIncrementIndex(pr, pr->BeginIndex); - fr->BeginIndex = NetRingIncrementIndex(fr, fr->BeginIndex); + fr->BeginIndex = NetRingIncrementIndex(fr, fr->BeginIndex); } return status; @@ -581,7 +581,7 @@ void EvtRxQueueCancel(_In_ NETPACKETQUEUE RxQueue) } NET_RING * fr = NetRingCollectionGetFragmentRing(rings); - fr->BeginIndex = fr->EndIndex; + fr->BeginIndex = fr->EndIndex; // Cancel received Ndps which may be received after EvtRxQueueCancel started, these Ndps may never be processed by EvtRxQueueAdvance MbbRecvCancelNdps(deviceContext, netAdapterContext->SessionId); From cb9e2ac8cb1e49fa5e676a0e605d04b7be7e702b Mon Sep 17 00:00:00 2001 From: Andre Muezerie Date: Fri, 15 May 2026 17:44:45 -0400 Subject: [PATCH 2/2] Revert file development_note2012.txt and revert section in rtchnlplan.h which has wrong encoding --- .../WDI/HAL/phydm/development_note2012.txt | 1478 ++++++++--------- network/wlan/WDI/HAL/phydm/rtchnlplan.h | 448 ++--- 2 files changed, 963 insertions(+), 963 deletions(-) diff --git a/network/wlan/WDI/HAL/phydm/development_note2012.txt b/network/wlan/WDI/HAL/phydm/development_note2012.txt index 880e2e3e1..a5b3b057e 100644 --- a/network/wlan/WDI/HAL/phydm/development_note2012.txt +++ b/network/wlan/WDI/HAL/phydm/development_note2012.txt @@ -6,14 +6,14 @@ Modified Files: Change Notes: 1. Fix the coding error of 92E Power tracking in assigning pathA/B CCK-11M TX power - + Verification Before Checked-In: 1. N62 build all ok ----------------------------------------------------------------------------------------------------- -<2014/04/18 19:00 James> +<2014/04/18 19:00 James> Modified Files: -Change Notes: +Change Notes: HAL/OUTSRC/odm_debug.c HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.c HAL/OUTSRC/rtl8814a/HalPhyRf_8814A.h @@ -22,17 +22,17 @@ Change Notes: HAL/rtl8814A/Hal8814ACom.c HAL/rtl8814A/rtl8814as/Hal8814ASdioGen.c 1. Refine 8814A IQK function - + Verification Before Checked-In: 1. N62/N63 buildall OK 2. Mp buildall OK ----------------------------------------------------------------------------------------------------- -<08/08/2012 19:50 LukeLee> +<08/08/2012 19:50 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Merge WIN Trunk v2908 2. [8812A] Update MAC_PHY Reg V021 for MP chip @@ -41,7 +41,7 @@ Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/08/2012 13:45 LukeLee> +<08/08/2012 13:45 LukeLee> Modified Files: HAL/OUTSRC/odm_debug.c @@ -62,7 +62,7 @@ Modified Files: HAL/rtl8188E/Hal8812Firmware.c -Change Notes: +Change Notes: 1. [8723A] Update MAC_PHY_REG v001 2. [8821A] Update FW v001 @@ -71,7 +71,7 @@ Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/07/2012 20:55 LukeLee> +<08/07/2012 20:55 LukeLee> Modified Files: HAL/OUTSRC/rtl8188e/BB/AGC_TAB_1T.txt @@ -81,7 +81,7 @@ Modified Files: HAL/OUTSRC/rtl8188e/MAC/MAC_REG.txt HAL/OUTSRC/rtl8188e/RF/RadioA_1T.txt -Change Notes: +Change Notes: 1. [8188E] Update MAC_PHY_REG v035 @@ -89,7 +89,7 @@ Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/07/2012 19:50 LukeLee> +<08/07/2012 19:50 LukeLee> Modified Files: HAL/OUTSRC/rtl8812a/BB/AGC_TAB.txt @@ -107,7 +107,7 @@ Modified Files: HAL/OUTSRC/rtl8821a/MAC/MAC_REG.txt HAL/OUTSRC/rtl8821a/RF/RadioA.txt -Change Notes: +Change Notes: 1. [8812A] Update MAC_PHY_REG v021 2. [8821A] Update MAC_PHY_REG v006 @@ -115,10 +115,10 @@ Change Notes: Verification Before Checked-In: 1. N62 buildall OK ----------------------------------------------------------------------------------------------------- -<08/06/2012 11:40 LukeLee> +<08/06/2012 11:40 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Merge WIN Trunk v2897 2. Update Img2Header.exe @@ -127,7 +127,7 @@ Verification Before Checked-In: 1. N62/N5 buildall OK ----------------------------------------------------------------------------------------------------- -<07/31/2012 17:10 LukeLee> +<07/31/2012 17:10 LukeLee> Modified Files: \rtl8812a\BB\AGC_TAB.c @@ -138,7 +138,7 @@ Modified Files: \rtl8812a\HalHWImg8812A_TestChip_BB.c \rtl8812a\HalHWImg8812A_TestChip_RF.c -Change Notes: +Change Notes: 1. [8812A] Update MAC_PHY_REG v20 @@ -158,20 +158,20 @@ Change Notes: Verification Before Checked-In: 1. N63 buildall ok. ----------------------------------------------------------------------------------------------------- -<07/31/2012 11:35 Georgia> +<07/31/2012 11:35 Georgia> Modified Files: -Change Notes: +Change Notes: 1. Fixed incorrect data rate in wireless BG mode. Verification Before Checked-In: 1. 8188EUS CE driver test OK. ----------------------------------------------------------------------------------------------------- -<07/30/2012 12:25 LukeLee> +<07/30/2012 12:25 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Fix compile error of ODM v364 @@ -179,10 +179,10 @@ Verification Before Checked-In: 1. N62/N5 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/30/2012 13:50 LukeLee> +<07/30/2012 13:50 LukeLee> Modified Files: -Change Notes: +Change Notes: 1. Merge Trunk V2285 @@ -190,9 +190,9 @@ Verification Before Checked-In: 1. N62/N5 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/23/2012 15:50 Kordan> +<07/23/2012 15:50 Kordan> Modified Files: -Change Notes: +Change Notes: 1. Update Image2Header: a. A single-line comment is now allowable with if-else body. b. Bug fixed: #endif is missed when translating FW_AP.bin. @@ -200,12 +200,12 @@ Change Notes: Verification Before Checked-In: 1. Translation OK. - + ----------------------------------------------------------------------------------------------------- -<07/23/2012 15:50 Kordan> +<07/23/2012 15:50 Kordan> Modified Files: -Change Notes: +Change Notes: 1. Update Image2Header: a. A single-line comment is now allowable with if-else body. b. Bug fixed: #endif is missed when translating FW_AP.bin. @@ -213,9 +213,9 @@ Change Notes: Verification Before Checked-In: 1. Translation OK. - + ----------------------------------------------------------------------------------------------------- -<07/19/2012 16:06 LukeLee> +<07/19/2012 16:06 LukeLee> Modified Files: /rtl8188e/Hal8188ERateAdaptive.c @@ -256,16 +256,16 @@ Removed Files: HalComDMOutSrc.c HalComDMOutSrc.h -Change Notes: +Change Notes: - 1. Replace ODM_MP with ODM_WIN + 1. Replace ODM_MP with ODM_WIN 2. Remove redundancy files Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/18/2012 15:45 LukeLee> +<07/18/2012 15:45 LukeLee> Modified Files: /rtl8188e/BB/AGC_TAB_1T.txt @@ -276,17 +276,17 @@ Modified Files: /rtl8812a/HalHWImg8188E_BB.c /rtl8812a/HalHWImg8188E_FW.c -Change Notes: +Change Notes: 1. [8188E] Release MAC_PHY_Reg V033 2. Img2Header.exe has problem, must add #endif in the end of HalHWImg8188E_FW.c - + Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/17/2012 23:15 LukeLee> +<07/17/2012 23:15 LukeLee> Modified Files: /rtl8812a/BB/AGC_TAB.txt @@ -299,46 +299,46 @@ Modified Files: /rtl8812a/HalHWImg8812A_BB_testchip.c /rtl8812a/HalHWImg8812A_RF_testhcip.c -Change Notes: +Change Notes: 1. [8812A] Release MAC_PHY_Reg V019 - + Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/17/2012 17:47 NeilChen> +<07/17/2012 17:47 NeilChen> Modified Files: odm.c odm_interface.c -Change Notes: +Change Notes: - 1. Initialize SW Antenna diversity ANT flag by efuse PG Setting for all + 1. Initialize SW Antenna diversity ANT flag by efuse PG Setting for all 8723A Series IC MP 2. Fix H2C cmd Issue in odm_interface.c - + Verification Before Checked-In: 1. N62 buildall OK. ----------------------------------------------------------------------------------------------------- -<07/11/2012 19:18 NeilChen> +<07/11/2012 19:18 NeilChen> Modified Files: odm.c hal\rtl8192c\rtl8192ce\hal8192CEGen.c -Change Notes: +Change Notes: 1.Fix 8723A SW ANT DIV Bug in MP temporality - + Verification Before Checked-In: 1. N62 buildall OK. 2. 8723AS_VAU testing OK ------------------------------------------------------------------------------------------------------ -<07/11/2012 17:45 Luke.Lee> +<07/11/2012 17:45 Luke.Lee> Modified Files: - /rtl8812a/RF/RadioA.txt + /rtl8812a/RF/RadioA.txt /rtl8812a/RF/RadioB.txt /rtl8812a/HalHWImg8812A_RF.c /rtl8812a/HalHWImg8812A_TestChip_RF.c @@ -346,9 +346,9 @@ Modified Files: odm_precomp.h odm_types.h -Change Notes: +Change Notes: - /OUTSRC/*.c, *.h + /OUTSRC/*.c, *.h 1.[8812A] revise PHY Reg files /HAL/rtl8188E/Hal8812Firmware.c @@ -356,27 +356,27 @@ Change Notes: /HAL/rtl8192C/Hal8192CFirmware.c 3.[8723A] add back ODM v344 feature - + Verification Before Checked-In: 1. N62 buildall OK. 2. 8812AE vs 8812AP DL:280Mbps, UL:330Mbps - 3. 8812AE vs 8812AE AdHoc 400Mbps(force 2SS MCS6) + 3. 8812AE vs 8812AE AdHoc 400Mbps(force 2SS MCS6) ------------------------------------------------------------------------------------------------------ -<07/10/2012 16:40 Luke.Lee> -Modified Files: - -Change Notes: +<07/10/2012 16:40 Luke.Lee> +Modified Files: +Change Notes: + 1.Copy Merge_Temp v2836 except OUTSRC - + Verification Before Checked-In: - 1. N62 buildall OK. + 1. N62 buildall OK. ------------------------------------------------------------------------------------------------------ -<07/09/2012 14:30 Luke.Lee> -Modified Files: +<07/09/2012 14:30 Luke.Lee> +Modified Files: /8812a/HalHWImg8812A_BB.c /8812a/HalHWImg8812A_BB.h @@ -394,31 +394,31 @@ Modified Files: odm_types.h -Change Notes: - +Change Notes: + 1.[8812A] Modify Reg Init Flow (Currently is TestChip only) - + Verification Before Checked-In: - 1. N62 buildall OK. + 1. N62 buildall OK. ------------------------------------------------------------------------------------------------------ -<07/06/2012 15:00 Luke.Lee> -Modified Files: +<07/06/2012 15:00 Luke.Lee> +Modified Files: HAL/OUTSRC/HalPhyRf.c HAL/OUTSRC/HalPhyRf.h HAL/OUTSRC/odm_precomp.h HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.h -Change Notes: - +Change Notes: + 1.Remove AP compile error - + Verification Before Checked-In: 1. N5/N62 buildall OK. - 2. AP compile OK + 2. AP compile OK ----------------------------------------------------------------------------------------------- +---------------------------------------------------------------------------------------------- <07/06/2012 15:00 lena_yang> New Files: Modified Files: @@ -430,45 +430,45 @@ Verification Before Checked-In: ------------------------------------------------------------------------------------------------------ -<07/06/2012 14:30 Cherry> -Modified Files: -Change Notes: - +<07/06/2012 14:30 Cherry> +Modified Files: +Change Notes: + HAL\HalDM.c HAL\OUTSRC\odm.c - 1. Enable 8812 EDCA TUREBO mode. - + 1. Enable 8812 EDCA TUREBO mode. + Verification Before Checked-In: - 1. N5/N62 buildall OK. + 1. N5/N62 buildall OK. ------------------------------------------------------------------------------------------------------ <07/06/2012 10:40 Mingzhi> New Files: -Modified Files: +Modified Files: odm.c Change Notes: 1. modify EDCA turbo for MP - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. ---------------------------------------------------------------------------------------------- <07/04/2012 14:30 Kordan> New Files: -Modified Files: +Modified Files: HAL/rtl8188E/rtl8188ee/Hal8188EEGen.c HAL/rtl8188E/rtl8188es/Hal8188ESdioGen.c Change Notes: 1. Fix compilation error. - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. - + ------------------------------------------------------------------------------------------- -<07/03/2012 17:00 Kordan> -Modified Files: +<07/03/2012 17:00 Kordan> +Modified Files: HAL/OUTSRC/HalPhyRf.c HAL/OUTSRC/HalPhyRf.h HAL/OUTSRC/rtl8812a/HalPhyRf_8812A.c @@ -478,25 +478,25 @@ Modified Files: HAL/rtl8188E/rtl8188es/Hal8188ESdioGen.c PLATFORM/NDIS5/N5C_Req.c -Change Notes: +Change Notes: 1. Implement 8812A IQK prototype. Verification Before Checked-In: 1. MP Buildall ok. 2. For test only. - + ------------------------------------------------------------------------------------------- -<06/25/2012 21:25 LukeLee> Modified Files: +<06/25/2012 21:25 LukeLee> Modified Files: odm.c -Change Notes: +Change Notes: 1. [8723A]modify odm_CommonInfoSelfInit() to enable SW AntDiv Verification Before Checked-In: 1. WIN N62 Buildall ok. ------------------------------------------------------------------------------------------- -<06/22/2012 18:30 LukeLee> Modified Files: +<06/22/2012 18:30 LukeLee> Modified Files: rtl8188e\HalHWImg8188E_BB.c rtl8188e\HalHWImg8188E_FW.c rtl8188e\HalHWImg8188E_FW.h @@ -504,25 +504,25 @@ Verification Before Checked-In: rtl8188e\HalHWImg8188E_RF.c rtl8188e\BB\PHY_REG_1T.txt -Change Notes: +Change Notes: 1. [88E]release 88E MAC_PHY_REG v032 for default ant setting Verification Before Checked-In: 1. WIN N62 Buildall ok. ------------------------------------------------------------------------------------------- -<06/22/2012 14:36 NeilChen> Modified Files: +<06/22/2012 14:36 NeilChen> Modified Files: odm.c odm.h Hal8192CFirmware.c -Change Notes: +Change Notes: 1. Fix PSD for BT3.0 TP issue 2. if BT3.0 is running, PSD scan times will be to decrease Verification Before Checked-In: 1. WIN N5 Buildall ok. 2. 8723AE Testing OK. -------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------- <06/22/2012 14:25 button> Modified Files: OUTSRC/rtl8188e/HalPhyRf_8188e.c @@ -535,102 +535,102 @@ Verification Before Checked-In: 1. AP platform compile ok. ------------------------------------------------------------------------------------------ <06/19/2012 19:40 Alexchou> -Modified Files: - +Modified Files: + OUTSRC/rtl8812a/FW/FW_NIC.BIN OUTSRC/rtl8812a/FW/FW_WoWLAN.BIN OUTSRC/rtl8812a/HalHWImg8812A_FW.c OUTSRC/rtl8812a/HalHWImg8812A_FW.h - -Change Notes: + +Change Notes: 1. Update 8812 testchip formal firmware V0003. - + Verification Before Checked-In: 1. ImgTransfer ok. - + ------------------------------------------------------------------------------------------- <06/18/2012 16:50 NeilChen> -Modified Files: +Modified Files: odm.c odm.h odm_RTL8188E.h HalDMOutSrc8192C_AP.c - HalDMOutSrc8192C_CE.c - -Change Notes: - 1. To integrate ANT definition for SW ANT DIV and ANT detect of ODM + HalDMOutSrc8192C_CE.c + +Change Notes: + 1. To integrate ANT definition for SW ANT DIV and ANT detect of ODM mechanism 2. MAIN_ANT is use to replace Antenna_A and ANT_Main - 3. AUX_ANT is use to replace Antenna_B and ANT_Aux - + 3. AUX_ANT is use to replace Antenna_B and ANT_Aux + Verification Before Checked-In: 1.WIN N5 Buildall ok. - + ------------------------------------------------------------------------------------------- <06/13/2012 16:30 Georgia> -Modified Files: +Modified Files: rtl8188e/HalHWImg8188E_FW.c -Change Notes: +Change Notes: 1. Fixed symbol:Array_8188E_FW_NIC undefine error for 88E. - + Verification Before Checked-In: 1.CE DRV make all ok. 1.WIN N5 buildall ok. - + ------------------------------------------------------------------------------------------- <06/13/2012 15:30 Georgia> -Modified Files: +Modified Files: rtl8188e/HalPhyRf_8188e.c -Change Notes: +Change Notes: 1. Fixed compile error for CE Platform. - + Verification Before Checked-In: 1.CE DRV make all ok. - + -------------------------------------------------------------------------------------------- <06/11/2012 21:00 LukeLee> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: HAL\OUTSRC\odm.c 1. Revise Single/Dual Ant Detection for 88C - + Verification Before Checked-In: 1. WIN N62 buildall ok. - 2. 88CE ant detection OK + 2. 88CE ant detection OK -------------------------------------------------------------------------------------------- <06/08/2012 16:12 James> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: 1. Update 8812 BB/MAC/RF parameters to V13 - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. 2. 8812AU XP scan ok. 8812AU link with WPA-2 AES AP ok. -------------------------------------------------------------------------------------------- <06/07/2012 16:04 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: HAL\OUTSRC\odm.c 1. Remove 8812 DM init return. - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. - 2. 8812AU win7 scan ok. 8812AU signal strength display ok. - + 2. 8812AU win7 scan ok. 8812AU signal strength display ok. + -------------------------------------------------------------------------------------------- <06/06/2012 19:04 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: COMMON &\HAL\Non-ODM & PLATFORM 1. Merge from windows driver trunk v2764-2766. Support 8812AU dual band scan. - - + + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. - 2. 8812AE/AU win7 scan ok. 8812AU reload test for 100 rounds ok. + 2. 8812AE/AU win7 scan ok. 8812AU reload test for 100 rounds ok. 3. 88CU win7 simple test ok. S3/S4/Reload/ Unlpg ok. -------------------------------------------------------------------------------------------- @@ -652,22 +652,22 @@ Modified Files: rtl8723a/HalHWImg8723A_MAC.c rtl8723a/HalHWImg8723A_RF.c rtl8723a/odm_RegConfig8723A.c - -Change Notes: + +Change Notes: 1. Fix compile error. - + Verification Before Checked-In: 1. CE Platform ,make all ok. -------------------------------------------------------------------------------------------- <06/06/2012 19:04 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: COMMON &\HAL\Non-ODM & PLATFORM 1. Merge from windows driver trunk v2744-2763. ODM 1. Revise compile error for windows driver. - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. 2. 8812AE/AU win7 scan ok. 8812AU reload test for 100 rounds ok. @@ -677,7 +677,7 @@ Verification Before Checked-In: -------------------------------------------------------------------------------------------- <06/06/2012 15:44 Georgia> -Modified Files: +Modified Files: HalPhyRf.c odm.c odm.h @@ -704,8 +704,8 @@ Modified Files: rtl8723a/HalHWImg8723A_MAC.c rtl8723a/HalHWImg8723A_RF.c rtl8723a/odm_RegConfig8723A.c - -Change Notes: + +Change Notes: 1. Add RefreshRAMask for CE platform. 2. Move releated marco of TX_RPT prasing to Hal8188ERateAdaptive.h. 3. Change data type of ODM_PHY_INFO_T - RxPWDBAll to u1Byte. @@ -716,25 +716,25 @@ Verification Before Checked-In: 2. 88EUS/89ES auto-test ok. -------------------------------------------------------------------------------------------- <06/06/2012 14:35 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: Merge from 2718 to 2743. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EE ping ok. But s4/reload fail!!?. -------------------------------------------------------------------------------------------- <06/06/2012 14:15 MH_Chen> -Deleted Files: -Change Notes: +Deleted Files: +Change Notes: COMMON &\HAL\Non-ODM & PLATFORM 1. Merge from windows driver trunk v2718-2743. HAL\OUTSRC\rtl8812a\BB\AGC_TAB.txt.... 1. Use MP trunk driver HW parameters to replace ODM\MP parameters and scan ok. 2. Use new img2header to transfer MP trunk 8812 parametes. 3. RF delay pattern change back to 0xFE?? or 0xFFE?? - + Verification Before Checked-In: 1. WIN N5/N62 buildall ok. 2. 8812AE/AU win7 scan ok. @@ -744,39 +744,39 @@ Verification Before Checked-In: -------------------------------------------------------------------------------------------- <06/04/2012 21:55 Gimmy> -Deleted Files: +Deleted Files: \HAL\OUTSRC\rtl8188e\FW\RTL8188EFW_A_CUT_T.BIN -Change Notes: +Change Notes: 1. delete \HAL\OUTSRC\rtl8188e\FW\RTL8188EFW_A_CUT_T.BIN - + Verification Before Checked-In: 1. NONE. 2. ImgTransfer ok. -------------------------------------------------------------------------------------------- <06/04/2012 20:35 LukeLee> -Modified Files: +Modified Files: \rtl8188e\BB\PHY_REG_1T.txt \rtl8188e\HalHWImg8188E_BB.c \rtl8188e\HalHWImg8188E_FW.c \rtl8188e\HalHWImg8188E_FW.h \rtl8812a\HalHWImg8812A_BB.c -Change Notes: +Change Notes: 1. [88E]Release MAC_PHY_REG v031 for BB swing issue 2. [8812A] manually add "0" to patch Img2Header.exe bug - + Verification Before Checked-In: 1. N62 buildall OK 2. 88EE BB QC test OK --------------------------------------------------------------------------------------------- <06/04/2012 14:45 Gimmy> -New Files: +New Files: HAL/OUTSRC/rtl8188e/FW/FW_AP.BIN -Modified Files: +Modified Files: HAL/OUTSRC/rtl8188e/FW/FW_NIC.BIN HAL/OUTSRC/rtl8188e/FW/FW_WoWLAN.BIN HAL/OUTSRC/rtl8188e/HalHWImg8188E_FW.c @@ -785,76 +785,76 @@ Modified Files: Change Notes: 1. Update 88E formal firmware. V004. - + Verification Before Checked-In: 1. NONE. 2. ImgTransfer ok. -------------------------------------------------------------------------------------------- <06/01/2012 20:00 LukeLee> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c -Change Notes: +Change Notes: 1. [88E]Fix TP bad issue caused by V321 - + Verification Before Checked-In: 1. N62 buildall OK 2. 88EE TP test OK -------------------------------------------------------------------------------------------- <06/01/2012 18:50 LukeLee> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_RegDefine11AC.h HAL/OUTSRC/odm_RegDefine11N.h -Change Notes: +Change Notes: 1. Define bCckHighPower & RFPathRxEnable for Jaguar series 2. Revise if/else conidition of odm_HwAntDiv and odm_SwAntDivChkAntSwitch - + Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------------------- <05/30/2012 22:10 LukeLee> -Modified Files: +Modified Files: HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm.c -Change Notes: +Change Notes: 1. Modify odm_RxPhyStatusJaguarSeries_Parsing() 2. Add Back compile flag in Odm.c for CE team - - + + Verification Before Checked-In: 1. N62 buildall OK 2. 88EE Ad-Hoc ping OK, RSSI report OK -------------------------------------------------------------------------------------------- <05/30/2012 21:26 Alexchou> -Modified Files: -Change Notes: - +Modified Files: +Change Notes: + rtl8812a/FW/FW_NIC.BIN rtl8812a/HalHWImg8812A_FW.c rtl8812a/HalHWImg8812A_FW.h rtl8812a/FW/FW_WoWLAN.BIN 1. update 8812 testchip fw v0002 for new Img2header.exe - + rtl8812a/FW/RTL8812FW_Test_T.BIN rtl8812a/HalHWImg8812A_TestChip_FW.c rtl8812a/HalHWImg8812A_TestChip_FW.h 1. remove unused files - - + + Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/30/2012 20:17 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: COMMON\TransmitDesc.c 1. Support new ODM relative AID for luke. HAL\DESC @@ -862,16 +862,16 @@ Change Notes: HAL\ODM 1. Revise for PHY query inRX side and TX side TXFILLDESC. HAL\HalDM.c - - + + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU simple test ok. AP mode RSSI parsing ok. But vwifi fail. -------------------------------------------------------------------------------------------- <05/30/2012 17:40 Kordan> -Modified Files: -Change Notes: +Modified Files: +Change Notes: 1. Support 8188E/8812A MAC, BB, RF, and FW configuration. Buildrtwe.bat Buildrtws.bat @@ -894,7 +894,7 @@ Change Notes: HAL/sources.list.WlanE HAL/sources.list.WlanS HAL/sources.list.WlanU - + 2. Minor bug fixed and some improvement on Image2Header. 3. Supports batch conversion. HAL/OUTSRC/Image2Header.exe @@ -904,69 +904,69 @@ Change Notes: HAL/PHY/Hal8192CPhyCfg.c HAL/OUTSRC/OutputHWImg.bat - 4. Fix compilation error and revise the code of 88E ODM power tracking. + 4. Fix compilation error and revise the code of 88E ODM power tracking. HAL/MPT/MPT_Bt.c HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.h - + Verification Before Checked-In: 1. N5/N62/MP buildall OK. 2. 88EE MP T/Rx ok. - 3. The PHY reg package of both 8188E and 8812A might be wrong, + 3. The PHY reg package of both 8188E and 8812A might be wrong, please update the PHY reg and convert again from scratch. -------------------------------------------------------------------------------------------- <05/30/2012 17:05 Alexchou> -Modified Files: -Change Notes: +Modified Files: +Change Notes: rtl8812a/FW/RTL8812FW_Test_T.BIN rtl8812a/HalHWImg8812A_TestChip_FW.c 1. update 8812 testchip fw v0002 - + Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/30/2012 15:05 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: 1. DESC relative code to fix PHY query status. 2. ODM DIG MP abort case revise. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU simple test ok. -------------------------------------------------------------------------------------------- <05/30/2012 13:10 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: Remove MP relative cofr out of ODM folder. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU ping ok. -------------------------------------------------------------------------------------------- <05/29/2012 21:10 MH_Chen> -Modified Files: -Change Notes: +Modified Files: +Change Notes: Windows Driver relative RXdesc resive 1. ODM pHY status query must input raw data. 2. Add GPL declaration for MP_Precomp.h 3. Revise ODM data structure defintion. - + Verification Before Checked-In: 1. N5/N62 buildall. 2. 88EU ping ok. -------------------------------------------------------------------------------------------- <05/29/2012 17:00 Alexchou> -Modified Files: +Modified Files: Change Notes: rtl8195/ 1. deleted rtl8195 folder - + rtl8812a/ rtl8812a/BB/ rtl8812a/FW/ @@ -978,40 +978,40 @@ Change Notes: 1. Create rtl8812a relative folders. 2. update 8812 testchip fw v0001 - + Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/23/2012 17:28 MH_Chen> -Modified Files: +Modified Files: Change Notes: ODM relative file. 1. Add MP driver MP_Precomp.h to increase compile speed. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 92CU/92DU/8723AU/88EU simple test ok. -------------------------------------------------------------------------------------------- <05/23/2012 14:54 MH_Chen> -Modified Files: +Modified Files: Change Notes: HAL\DESC\Hal8192CRxDesc.c 1. Fix ODM PHY & packet info strcucture for 92C &8812 seies. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 92CU simple test ok. -------------------------------------------------------------------------------------------- <05/22/2012 22:40 MH_Chen> -Modified Files: +Modified Files: Change Notes: HAL\DESC\Hal8188ERxDesc.c HAL\DESC\Hal8812Desc.c HAL\OUTSRC\odm_HWConfig.c 1. Revise ODM PHY & packet info strcucture to fix 88E serries PHy query. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88EU simple test ok. @@ -1035,11 +1035,11 @@ Modified Files: Change Notes: 1. Prevent from "warning: no newline at end of file" 2. Fix comile error for CE Platform - + Verification Before Checked-In: 1. Make all ok. 2. 88EU auto-test ok. - + -------------------------------------------------------------------------------------------- <05/17/2012 11:40 LukeLee> Modified Files: @@ -1117,14 +1117,14 @@ Modified Files: Change Notes: 1. Support power tracking in AP platform 2. Refine RA threshold for AP - 3. Fix STA array number + 3. Fix STA array number Verification Before Checked-In: 1. AP buildall OK. -------------------------------------------------------------------------------------------- -<05/12/2012 12:30 LukeLee> -Modified Files: +<05/12/2012 12:30 LukeLee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\rtl8188e\odm_RTL8188E.c @@ -1136,31 +1136,31 @@ Modified Files: HAL\DESC\Hal8188ESdioTxDesc.c Change Notes: - 1. [88E]Enable CCK AntDiv and fix some AntDiv bugs - + 1. [88E]Enable CCK AntDiv and fix some AntDiv bugs + Verification Before Checked-In: 1. N62 buildall OK. 2. 88EE DL:53Mbps UL:49Mbps 88EU DL:51Mbps UL:47Mbps -------------------------------------------------------------------------------------------- <05/10/2012 16:00 MH_Chen> -New Files: -Modified Files: +New Files: +Modified Files: Change Notes: - 1. Merge from MP driver V2680 to V2685. - + 1. Merge from MP driver V2680 to V2685. + Verification Before Checked-In: 1. N5/N62 buildall OK. 2. 88EU ping ok S3/S4/reload/unplug ok. -------------------------------------------------------------------------------------------- <05/08/2012 23:00 MH_Chen> -New Files: -Modified Files: +New Files: +Modified Files: Change Notes: 1. Merge from MP driver V2560 to V2671. Many modification hard to describe.~~!! Please refer to MP driver lable v2560-2671. - + Verification Before Checked-In: 1. N5/N6/N62 buildall OK. 2. 88EU ping ok S3/S4/reload/unplug ok. @@ -1172,11 +1172,11 @@ Modified Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\BB\PHY_REG_1T.txt -Change Notes: +Change Notes: 1. remove compile error - 2. [88E] Update MAC_PHY_REG V030 for change RX default ant to CG + 2. [88E] Update MAC_PHY_REG V030 for change RX default ant to CG -Verification Before Checked-In: +Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------------------- @@ -1185,13 +1185,13 @@ Modified Files: HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm_types.h -Change Notes: +Change Notes: 1. Add two definitions in RT_SPINLOCK_TYPE. 2. [88E] Support PHY_REG_MP.txt configuration.(But disabled now) -Verification Before Checked-In: +Verification Before Checked-In: 1. None - + -------------------------------------------------------------------------------------------- <05/07/2012 11:40 LukeLee> Modified Files: @@ -1201,10 +1201,10 @@ Modified Files: Removed Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_MP.txt -Change Notes: +Change Notes: 1. [88E]Update right MAC_PHY_REG V029 (remove PHY_REG_MP.txt) -Verification Before Checked-In: +Verification Before Checked-In: 1. N62 buildall OK -------------------------------------------------------------------------------------------- @@ -1214,10 +1214,10 @@ New Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.h -Change Notes: +Change Notes: 1. [88E]Update MAC_PHY_REG V029 for power by rate -Verification Before Checked-In: +Verification Before Checked-In: 1. 88EE RX:99Mbps, TX:83.5Mbps -------------------------------------------------------------------------------------------- @@ -1225,10 +1225,10 @@ Verification Before Checked-In: New Files: HEADER\RegCommon.h -Change Notes: +Change Notes: 1. [88E]Modify registry AntennaDivType -Verification Before Checked-In: +Verification Before Checked-In: 1. 88EE RX:98Mbps, TX:84Mbps 2. 88EE antenna diversity enable OK @@ -1238,16 +1238,16 @@ New Files: HAL\OUTSRC\odm_RegDefine11AC.h HAL\OUTSRC\odm_RegDefine11N.h -Change Notes: +Change Notes: 1. fix compile error -Verification Before Checked-In: +Verification Before Checked-In: 1. None -------------------------------------------------------------------------------------------- <05/03/2012 16:00 LukeLee> New Files: -Modified Files: +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\odm_interface.h @@ -1258,32 +1258,32 @@ New Files: HAL\OUTSRC\odm_RegDefine11AC.h HAL\OUTSRC\odm_RegDefine11N.h -Change Notes: +Change Notes: 1. [8812] Reg Define and DIG modified 2. restrict dynamic functions for 11AC series 3. Add SupportICtype ODM_RTL8812 - 4. enable odm_DynamicEDCCA() for all 11N series + 4. enable odm_DynamicEDCCA() for all 11N series -Verification Before Checked-In: +Verification Before Checked-In: 1. Buildall OK - 2. 88EU DL=94Mbps, UL=78Mbps, ODM v285 has the same issue! + 2. 88EU DL=94Mbps, UL=78Mbps, ODM v285 has the same issue! -------------------------------------------------------------------------------------------- <05/03/2012 11:00 JueYang> New Files: -Modified Files: +Modified Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c -Change Notes: - 1. Revise CCK PowerByRate. +Change Notes: + 1. Revise CCK PowerByRate. -Verification Before Checked-In: - 1. OFDM and CCK PowerByRate OK. +Verification Before Checked-In: + 1. OFDM and CCK PowerByRate OK. -------------------------------------------------------------------------------------------- <04/28/2012 12:00 JueYang> New Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_PG.txt -Modified Files: +Modified Files: HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.h HAL\OUTSRC\rtl8188e\HalHWImg8188E_TestChip_BB.c @@ -1296,7 +1296,7 @@ Modified Files: HAL\PHY\HalComPhyCfg.h HAL\rtl8188E\rtl8188ee\Hal8188EEGen.c -Change Notes: +Change Notes: HAL\OUTSRC\rtl8188e\BB\PHY_REG_PG.txt HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.h @@ -1308,18 +1308,18 @@ Change Notes: HAL\PHY\Hal8188EPhyCfg.c HAL\PHY\HalComPhyCfg.c HAL\PHY\HalComPhyCfg.h - 1. Add PowerByRate and update PHY_REG_PG to V003. + 1. Add PowerByRate and update PHY_REG_PG to V003. HAL\rtl8188E\rtl8188ee\Hal8188EEGen.c - 1. Fix some bugs. + 1. Fix some bugs. -Verification Before Checked-In: - 1. N62 Buildall ok +Verification Before Checked-In: + 1. N62 Buildall ok -------------------------------------------------------------------------------------------- <04/27/2012 19:25 Georgia> New Files: -Modified Files: +Modified Files: odm.c odm.h odm_debug.c @@ -1333,19 +1333,19 @@ Modified Files: rtl8192c/odm_RTL8192C.c Change Notes: - 1. Remove CE compile error + 1. Remove CE compile error Verification Before Checked-In: 1. Make all ok. 2. 88EU auto-test ok. - + -------------------------------------------------------------------------------------------- <04/27/2012 17:33 MH_Chen> New Files: -Modified Files: +Modified Files: Change Notes: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c/h - 1. Revise TX power tracking mechanism. Prevent BB swing fail. + 1. Revise TX power tracking mechanism. Prevent BB swing fail. Verification Before Checked-In: 1. N5/N62 buildall ok. @@ -1383,56 +1383,56 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V028 for 20M mode noise resistence - + Verification Before Checked-In: 1. 88E Static Analysis OK -------------------------------------------------------------------------------------------- <04/13/2012 23:00 MH_Chen> -New Files: -Modified Files: +New Files: +Modified Files: Change Notes: 1. Merge from MP driver V2471 to V2561. Mant modification hard to describe.~~!! - + Verification Before Checked-In: 1. N5/N62 buildall OK. 2. 88EU/92CU ping ok S3/S4/reload/unplug ok. --------------------------------------------------------------------------------------------- <04/13/2012 20:10 LukeLee> -New Files: +New Files: HAL\HalDM.c -Modified Files: +Modified Files: Change Notes: 1. [8812]enable RSSI Monitor - + Verification Before Checked-In: 1. buildall OK --------------------------------------------------------------------------------------------- <04/13/2012 19:55 LukeLee> -New Files: +New Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm_HWConfig.c HAL\HalDM.c -Modified Files: +Modified Files: Change Notes: 1. [8812]enable DIG only 2. [8812]CCK RSSI format as 88E - + Verification Before Checked-In: 1. buildall OK --------------------------------------------------------------------------------------------- <04/13/2012 16:38 Gimmy> -New Files: +New Files: HAL\OUTSRC\rtl8188e\FW -Modified Files: +Modified Files: Change Notes: 1. Update first version 88E formal firmware. V001. - + Verification Before Checked-In: 1. NONE. 2. ImgTransfer ok. @@ -1449,7 +1449,7 @@ Modified Files: Change Notes: 1.[All IC except 8723A]Modify DIG 2.[88E] Modify AntDiv - + Verification Before Checked-In: 1. buildall ok. 2. 88EE test OK @@ -1465,8 +1465,8 @@ Modified Files: Change Notes: 1.[88E]Fix AntDiv type decision in init flow - - + + Verification Before Checked-In: 1. buildall ok. 2. 88EE test OK @@ -1490,16 +1490,16 @@ Verification Before Checked-In: <04/11/2012 10:20 JueYang> Modified Files: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c - + HAL\OUTSRC\odm.c Change Notes: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c 1. [88E] Fix BOSD. - + HAL\OUTSRC\odm.c 1. [88E] Add break. - + Verification Before Checked-In: 1. buildall ok. @@ -1511,7 +1511,7 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V026 - + Verification Before Checked-In: 1. 88EU TP dynamic rage test OK @@ -1526,25 +1526,25 @@ Modified Files: HEADER/RegCommon.h PLATFORM/NDIS5/N5C_Init.c HAL/EFUSE/Hal8188EEfuse.c - + Change Notes: 1. Change the default setting of AntennaDivType to "AUTO". 2. Ignore 0xC1[3] when 0xC9 is "1" or "2". - + Verification Before Checked-In: 1. MP buildall ok. - + --------------------------------------------------------------------------------------------- <04/02/2012 20:50 Luke.Lee> Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\rtl8188e\odm_RTL8188E.c - + Change Notes: 1. [88E] remove DbgPrint in odm_RTL8188E.c 2. [88C] modify ODM_SingleDualAntennaDetection() - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88CE TP test OK @@ -1572,12 +1572,12 @@ Modified Files: HAL/OUTSRC/rtl8188e/odm_RTL8188E.c HAL/EFUSE/Hal8188EEfuse.c MPBuild.bat - + Change Notes: 1. Add an option AUTO in advanced setting. (When AUTO is not selected, EFUSE setting would be ignored.) 2. Revise the registry setting and default value of Antenna diversity. 3. Fix compilation errors. - + Verification Before Checked-In: 1. N5/N62/MP buildall ok. 2. 88EE MP T/Rx OK. @@ -1590,21 +1590,21 @@ Modified Files: HAL\OUTSRC\odm_HWConfig.c HAL\OUTSRC\rtl8188e\odm_RTL8188E.c HAL\OUTSRC\rtl8188e\odm_RTL8188E.h - + Change Notes: 1. [88E]Modify Antenna Diversity ODM_SetTxAntByAntDiv() needs to be executed in TXDESC in each platform - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88EE TP test OK --------------------------------------------------------------------------------------------- <03/27/2012 23:05 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Merge from MP driver V2467 to V2470 to support 8821AU and fix some problem. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 882EU ping ok. @@ -1617,7 +1617,7 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V025 - + Verification Before Checked-In: 1. None @@ -1629,7 +1629,7 @@ Modified Files: Change Notes: 1. [88E] Update MAC_PHY_REG V024 - + Verification Before Checked-In: 1. Power training is verified by Wilson @@ -1644,7 +1644,7 @@ Modified Files: Change Notes: 1. Fix wrong MACRO definition: READ_AND_CONFIG 2. Minor changes for MP driver. - + Verification Before Checked-In: 1. N5/N62/MP buildall OK. @@ -1655,8 +1655,8 @@ Modified Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_1T.txt Change Notes: - 1. Update MAC_PHY Reg V023 - + 1. Update MAC_PHY Reg V023 + Verification Before Checked-In: 1. None @@ -1685,11 +1685,11 @@ Change Notes: HEADER/PrecompInc.h HEADER/RegCommon.h HEADER/TypeDef.h - + 1. [8188E] Read antenna diversity type (0xC9 in EFUSE) into TRxAntDivType. 2. [8188E] New OIDs to Set/Query the antenna diversity type. 3. odm_FastAntTrainingInit for MP driver. - + PLATFORM/MACOSX/PMC_Init.cpp PLATFORM/NDIS5/N5C_Init.c PLATFORM/NDIS5/Ndis5Common.h @@ -1702,7 +1702,7 @@ Change Notes: PLATFORM/WinInf/PCI/rtwlanemp.inf PLATFORM/WinInf/USB/netrtwlanu.inf PLATFORM/WinInf/USB/rtwlanump.inf - + 4. New TRxAntDivType setting in the advance property page of the device manager. Verification Before Checked-In: @@ -1718,8 +1718,8 @@ Modified Files: HAL\OUTSRC\rtl8188e\RF\RadioA_1T.txt Change Notes: - 1. Update MAC_PHY Reg V022 - + 1. Update MAC_PHY Reg V022 + Verification Before Checked-In: 1. 88EE shielding room TP test OK @@ -1730,10 +1730,10 @@ Modified Files: Change Notes: 1. Bug fixed: wrong output array name of MP chip. - + Verification Before Checked-In: 1. None - + --------------------------------------------------------------------------------------------- <03/09/2012 21:45 Kordan> Modified Files: @@ -1767,7 +1767,7 @@ Change Notes: a. This feature is now only enabled in 8188EE. b. You can #define RTL8188E_FOR_TEST_CHIP 2 to supprt both MP and test chip. c. Also, #define RTL8188E_FOR_TEST_CHIP 0/1 could reduce the code size. - + Verification Before Checked-In: 1. N5/N62/MP buildall OK. @@ -1785,23 +1785,23 @@ Verification Before Checked-In: 1. AP platform compile OK. --------------------------------------------------------------------------------------------- -<03/08/2012 21:10 Kordan> -Modified Files: +<03/08/2012 21:10 Kordan> +Modified Files: HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c HEADER/Precomp.h.WlanE.Windows HEADER/Precomp.h.WlanU.Windows - + Change Notes: 1. Fix switch channel bug which causes OS hung. 2. Set TEST_CHIP flag to 0. 3. Fix MP compilation error. - + Verification Before Checked-In: 1. N5/N62 buildall OK. - + --------------------------------------------------------------------------------------------- -<03/05/2012 16:10 Luke.Lee> -Modified Files: +<03/05/2012 16:10 Luke.Lee> +Modified Files: HAL/OUTSRC/rtl8188e/HalHWImg8188E_MAC.c HAL/OUTSRC/rtl8188e/HalHWImg8188E_RF.c HAL/OUTSRC/rtl8188e/MAC/MAC_REG.txt @@ -1815,13 +1815,13 @@ Added Files: Change Notes: 1. Update RTL8188E_MAC_PHY_ForMPChip_v021.zip 2. Rename original MAC/BB/RF files as testchip files - + Verification Before Checked-In: 2. 8188ES test OK. --------------------------------------------------------------------------------------------- -<03/02/2012 19:00 Kordan> -Modified Files: +<03/02/2012 19:00 Kordan> +Modified Files: COMMON/Debug.c HAL/OUTSRC/Image2Header.exe HAL/OUTSRC/rtl8188e/*.c @@ -1831,13 +1831,13 @@ COMMON/Debug.c Change Notes: 1. Update HWIMG headers and Image2Header to handle if-else case. 2. Turn off RATE_ADAPTIVE_SUPPORT for MP driver. - + Verification Before Checked-In: 1. N5/N62 buildall OK. 2. 8188EE ping OK. --------------------------------------------------------------------------------------------- -<03/02/2012 17:30 Luke.Lee> -Modified Files: +<03/02/2012 17:30 Luke.Lee> +Modified Files: odm.c odm.h \rtl8188e\odm_RTL8188E.c @@ -1845,31 +1845,31 @@ Modified Files: Change Notes: 1. Simplify timer callback of fast antenna training - + Verification Before Checked-In: 1. N5/N62 buildall OK 2. 88EE hang in Win7 from label v234 3. 88EU workitem does not work if it is started by timer in WatchDog --------------------------------------------------------------------------------------------- -<02/29/2012 19:40 Georgia> -Modified Files: +<02/29/2012 19:40 Georgia> +Modified Files: odm.c rtl8188e/Hal8188ERateAdaptive.c rtl8723a/Hal8723UHWImg_CE.c rtl8723a/Hal8723UHWImg_CE.h Change Notes: - 1. Fix incorrect data type usage in func:ODM_RAInfo_Init_all. + 1. Fix incorrect data type usage in func:ODM_RAInfo_Init_all. 2. Fix compile error for CE Platform. - + Verification Before Checked-In: 1. Make all ok. 2. RTL8723A-VAL auto-test ok. 3. RTL8189E auto-test ok. --------------------------------------------------------------------------------------------- -<02/24/2012 18:30 Georgia> -Modified Files: +<02/24/2012 18:30 Georgia> +Modified Files: HalPhyRf.c HalPhyRf.h odm.c @@ -1883,80 +1883,80 @@ Modified Files: rtl8188e/odm_RTL8188E.c Change Notes: - 1. Fix compile error for CE platform. + 1. Fix compile error for CE platform. 2. Add GPL announce. 3. Remove useless codes. - + Verification Before Checked-In: 1. Make all ok. 2. RTL8723A-VAL auto-test ok. 3. RTL8189E auto-test ok. - + --------------------------------------------------------------------------------------------- -<02/23/2012 17:10 Kordan> -Modified Files: +<02/23/2012 17:10 Kordan> +Modified Files: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c Change Notes: 1. Update IQK setting and flow. - + Verification Before Checked-In: 1. None --------------------------------------------------------------------------------------------- -<02/23/2012 22:50 MH_Chen> -Modified Files: +<02/23/2012 22:50 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Revise CCK path diversity timer and workitem architecture. 2. ResetAllHw timer and cancel Hw timer will call ODM relative API.. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. --------------------------------------------------------------------------------------------- -<02/23/2012 21:35 MH_Chen> -Modified Files: +<02/23/2012 21:35 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Revise path diversity timer and workitem architecture. 2. Deleate HAL layer ODM path diversity timer and workitem declaation. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. - + --------------------------------------------------------------------------------------------- -<02/23/2012 20:35 MH_Chen> -Modified Files: +<02/23/2012 20:35 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Revise all ODM timer/workitem init/cancel.release flow. 2. Add cancel timer API to prevent BSOD and system resource leakage. 3. Fix unplug fail issue. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. 3. A special flow bug fixed ==> S3/S4 and then disable or unplug OK in NB111_WIN7. --------------------------------------------------------------------------------------------- -<02/22/2012 16:35 MH_Chen> -Modified Files: +<02/22/2012 16:35 MH_Chen> +Modified Files: Change Notes: HAL\OUTSRC\odm.c\h 1. Merge from MP 2444 to 2459. 2. Some odm code is moved from MP to ODM code base. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 92CU WIN7 S3/S4/S5 reload/unplug ok. 3. A special under investigation ==> S3/S4 and then disable or unplug fail. And then cause all USB port detection fail in QC NB111. --------------------------------------------------------------------------------------------- -<02/22/2012 15:35 Kordan> -Modified Files: +<02/22/2012 15:35 Kordan> +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c @@ -1964,21 +1964,21 @@ Modified Files: Change Notes: 1. Revise PHY_ResetIQKResult to ODM format, ODM_ResetIQKResult. 2. Move TxPowerTrackControl initialization to odm_TXPowerTrackingThermalMeterInit. - + Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK --------------------------------------------------------------------------------------------- -<02/21/2012 23:10 Kordan> -Modified Files: +<02/21/2012 23:10 Kordan> +Modified Files: HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c Change Notes: 1. Merge TxPower Tracking from trunk to ODM. - 2. Replace EOF pattern, 0xFF, of ParaFiles with 0xFFFF. - + 2. Replace EOF pattern, 0xFF, of ParaFiles with 0xFFFF. + Verification Before Checked-In: - 1. N5/N62 buildall OK - + 1. N5/N62 buildall OK + --------------------------------------------------------------------------------------------- <02/21/2012 14:45 button> Modified Files: @@ -2014,21 +2014,21 @@ Verification Before Checked-In: 2. Ping 65500 OK. --------------------------------------------------------------------------------------------- -<02/17/2012 18:05 Kordan> -Modified Files: +<02/17/2012 18:05 Kordan> +Modified Files: HAL/OUTSRC/rtl8188e/HalPhyRf_8188e.c Change Notes: - 1. When delta temperature is equal to or larger than 20 centigrade(index delta is about 8), + 1. When delta temperature is equal to or larger than 20 centigrade(index delta is about 8), do IQK and LCK. - 2. Update last thermal value to prevent from running IQK and LCK every time. + 2. Update last thermal value to prevent from running IQK and LCK every time. Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK --------------------------------------------------------------------------------------------- -<02/17/2012 16:45 Luke.Lee> -Modified Files: +<02/17/2012 16:45 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h @@ -2037,93 +2037,93 @@ Change Notes: 2. Add init and free all workitems for MP platform Verification Before Checked-In: - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK 2. 88EE web brouse OK - + --------------------------------------------------------------------------------------------- -<02/17/2012 14:18 MH_Chen> -Modified Files: +<02/17/2012 14:18 MH_Chen> +Modified Files: Change Notes: 1. Add workitem relative API. Not enabled now, so we need not test. Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/16/2012 22:30 LukeLee> -Modified Files: +<02/16/2012 22:30 LukeLee> +Modified Files: HAL\OUTSRC\rtl8188e\odm_RTL8188E.c - + Change Notes: 1. [8188E]Modify fast antenna training Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/16/2012 17:00 Mingzhi> -Modified Files: +<02/16/2012 17:00 Mingzhi> +Modified Files: HAL\OUTSRC\odm.c - + Change Notes: 1. for CE platform, BE TXOP in B/G/BG/A mode is 0x5e(3ms) 2. for AP/ADSL platform: fix a bug in BE TXOP Verification Before Checked-In: - 1. N5/N62 buildrtwu/buildrtwe ok. + 1. N5/N62 buildrtwu/buildrtwe ok. --------------------------------------------------------------------------------------------- -<02/16/2012 15:00 Luke.Lee> -Modified Files: +<02/16/2012 15:00 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm_precomp.h New Files: HAL\OUTSRC\rtl8188e\odm_RTL8188E.c HAL\OUTSRC\rtl8188e\odm_RTL8188E.h - + Change Notes: 1. [8188E]Move Fast antenna training into 88E folder Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/14/2012 23:12 MH_Chen> -Modified Files: +<02/14/2012 23:12 MH_Chen> +Modified Files: Change Notes: 1. FIX ODM tracking list item 60. Revise ODM 88E rate adaptive ability support. Verification Before Checked-In: - 1. N5/N62 buildall ok. - 2. 8188EU ping test ok. + 1. N5/N62 buildall ok. + 2. 8188EU ping test ok. --------------------------------------------------------------------------------------------- -<02/14/2012 22:12 MH_Chen> -Modified Files: +<02/14/2012 22:12 MH_Chen> +Modified Files: Change Notes: 1. FIX ODM tracking list item 58. Revise ODM ability support. Verification Before Checked-In: - 1. N5/N62 buildall ok. - 2. 8188EU ping test ok. + 1. N5/N62 buildall ok. + 2. 8188EU ping test ok. --------------------------------------------------------------------------------------------- -<02/14/2012 15:40 Georgia> -Modified Files: +<02/14/2012 15:40 Georgia> +Modified Files: odm.c odm_debug.h - + Change Notes: 1.Turn on EDCA Turbo function for BG mode (CE Platform) Verification Before Checked-In: - 1. CE Platform make ok. - 2. 8188E-SDIO auto-test ok. + 1. CE Platform make ok. + 2. 8188E-SDIO auto-test ok. --------------------------------------------------------------------------------------------- -<02/13/2012 17:45 Luke.Lee> -Modified Files: +<02/13/2012 17:45 Luke.Lee> +Modified Files: HAL\OUTSRC\rtl8188e\MAC\MAC_REG.txt HAL\OUTSRC\rtl8188e\HalHWImg8188E_MAC.c @@ -2136,8 +2136,8 @@ Verification Before Checked-In: 1. None --------------------------------------------------------------------------------------------- -<02/13/2012 17:30 Luke.Lee> -Modified Files: +<02/13/2012 17:30 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h @@ -2148,11 +2148,11 @@ Change Notes: 1.Modify fast antenna training (default disabled) Verification Before Checked-In: - 1. N62 buildall ok. + 1. N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/10/2012 19:20 JueYang> -Modified Files: +<02/10/2012 19:20 JueYang> +Modified Files: COMMON\MgntLink.c HAL\DESC\Hal8188EETxDesc.c @@ -2174,7 +2174,7 @@ Change Notes: 2. Tune 3U Throughput for DIR 655. Reserved at least 2 packets in Tx FIFO to triggle early mode but avoid single AMPDU. HAL\DESC\Hal8188EETxDesc.c - 1. Fix DTM Fuzz BOSD for memory overflow when move memory for ealy mode dummy. Some codes are not covered by pHalData->bEarlyModeEnable. + 1. Fix DTM Fuzz BOSD for memory overflow when move memory for ealy mode dummy. Some codes are not covered by pHalData->bEarlyModeEnable. HAL\OUTSRC\rtl8188e\Hal8188ERateAdaptive.c HAL\OUTSRC\rtl8188e\odm_RegConfig8188E.c @@ -2190,13 +2190,13 @@ Change Notes: 1. Fix RX Hang after RF Off and RF On. Enable TRX DMA(REG[0x301]=0) during intialization. Verification Before Checked-In: - 1. N62 buildall ok. + 1. N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/09/2012 22:41 MH_Chen> -Modified Files: +<02/09/2012 22:41 MH_Chen> +Modified Files: Change Notes: - MERGE MP V2435. + MERGE MP V2435. 1. Increase build speed and revise aarchitecture. Verification Before Checked-In: @@ -2204,8 +2204,8 @@ Verification Before Checked-In: 1. 88EU reload/s3 ping ok. --------------------------------------------------------------------------------------------- -<02/09/2012 17:20 Kordan> -Modified Files: +<02/09/2012 17:20 Kordan> +Modified Files: HAL\OUTSRC\Image2Header.exe Change Notes: @@ -2215,8 +2215,8 @@ Verification Before Checked-In: 1. None. --------------------------------------------------------------------------------------------- -<02/08/2012 17:50 Luke.Lee> -Modified Files: +<02/08/2012 17:50 Luke.Lee> +Modified Files: HAL\OUTSRC\rtl8188e\BB\PHY_REG_1T.txt HAL\OUTSRC\rtl8188e\RF\RadioA_1T.txt HAL\OUTSRC\rtl8188e\HalHWImg8188E_BB.c @@ -2226,12 +2226,12 @@ Change Notes: 1. Update MAC_PHY reg v019 Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EE run chariot ok. --------------------------------------------------------------------------------------------- -<02/08/2012 17:20 Luke.Lee> -Modified Files: +<02/08/2012 17:20 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm_HWConfig.c @@ -2240,12 +2240,12 @@ Change Notes: 2. [8188E] modify fast antenna training (default disabled) Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EE run chariot ok. --------------------------------------------------------------------------------------------- -<02/07/2012 21:30 MH_Chen> -Modified Files: +<02/07/2012 21:30 MH_Chen> +Modified Files: Change Notes: 1. Revise all batch file for MP. To fasten build speed. 2. We do not request ODM to check buildrtwee/eu/es. The batch files will be removed later. @@ -2253,16 +2253,16 @@ Change Notes: 4. Prevent SDIO build error by modifying buildclean all. Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EU ping ok. --------------------------------------------------------------------------------------------- -<02/07/2012 21:10 Luke.Lee> -Modified Files: +<02/07/2012 21:10 Luke.Lee> +Modified Files: HAL\OUTSRC\odm.c HAL\OUTSRC\odm.h HAL\OUTSRC\odm_HWConfig.c - + Change Notes: 1. [8188E] Modify fast antenna training (default disabled) @@ -2270,69 +2270,69 @@ Verification Before Checked-In: 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/07/2012 13:35 JueYang> -Modified Files: +<02/07/2012 13:35 JueYang> +Modified Files: HAL\DESC\Hal8188EETxDesc.c HAL\PHY\HalComPhyCfg.c - + Change Notes: 1. [8188E] Revise Power Trainning. Verification Before Checked-In: - 1. N62 buildrtwe ok. + 1. N62 buildrtwe ok. --------------------------------------------------------------------------------------------- -<02/07/2012 11:05 JueYang> -Modified Files: +<02/07/2012 11:05 JueYang> +Modified Files: HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c - + Change Notes: 1. [8188EE] Fix pbScanInProcess error which cause initialize 88ee delayed 3 seconds. Verification Before Checked-In: - 1. N62 buildrtwe ok. + 1. N62 buildrtwe ok. --------------------------------------------------------------------------------------------- -<02/06/2012 21:30 Luke.Lee> -Modified Files: +<02/06/2012 21:30 Luke.Lee> +Modified Files: 1. rtl8188e/* - + Change Notes: 1. [8188E] Update 88E MAC_PHY_REG v018 Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. --------------------------------------------------------------------------------------------- -<02/06/2012 20:30 Luke.Lee> -Modified Files: +<02/06/2012 20:30 Luke.Lee> +Modified Files: 1. rtl8188e/* - + Change Notes: 1. [8188E] Update 88E MAC_PHY_REG v017 Verification Before Checked-In: - 1. N5/N62 buildall ok. + 1. N5/N62 buildall ok. 2. 88EU vs Cisco1252 20M mode DL/UL:48Mbps --------------------------------------------------------------------------------------------- -<02/06/2012 13:30 Kordan> -Modified Files: +<02/06/2012 13:30 Kordan> +Modified Files: 1. Image2Header.exe 2. rtl8723a/* 3. rtl8188e/* - + Change Notes: 1. Update Image2Header to remove the redundant code. Verification Before Checked-In: - 1. N5/N6/N62 buildall ok. - + 1. N5/N6/N62 buildall ok. + --------------------------------------------------------------------------------------------- -<02/06/2012 11:24 MH_Chen> +<02/06/2012 11:24 MH_Chen> New Files: Delete FIles: -Modified Files: +Modified Files: Change Notes: 1. MErge MP V2516 to fix TX short cut and SDIO build error. @@ -2341,7 +2341,7 @@ Verification Before Checked-In: 2. 88EU ping ok. --------------------------------------------------------------------------------------------- -<02/03/2012 18:20 Georgia> +<02/03/2012 18:20 Georgia> New Files: Delete FIles: Modified Files: @@ -2356,19 +2356,19 @@ Verification Before Checked-In: 3. 8188E-SDIO auto-test ok. --------------------------------------------------------------------------------------------- -<02/03/2012 17:35 MH_Chen> +<02/03/2012 17:35 MH_Chen> New Files: Delete FIles: Modified Files: Change Notes: 1. Revise 88E MAC init flow. - + Verification Before Checked-In: 1. N6/N5 buildall OK. except sdio driver.. 2. 92CU S3/S5/Reload/Unplug and ping WPA2-AES ok. --------------------------------------------------------------------------------------------- -<02/03/2012 14:30 MH_Chen> +<02/03/2012 14:30 MH_Chen> New Files: Delete FIles: Modified Files: @@ -2377,7 +2377,7 @@ Change Notes: COMMON\WOLPattern.c 1. Support ODM for AP engine in MP. 2. Fix SDIO compile error. - + HAL\BTCoexist\HalBtCoexist.c\h HAL\DESC\Hal8192CRxDesc.c HAL\HWIMG\HalHWImg.h @@ -2386,23 +2386,23 @@ Change Notes: HAL\OUTSRC\rtl8188e\Hal8188ERateAdaptive.c HAL\OUTSRC\rtl8188e\HalPhyRf_8188e.c 1. Fix MP compile error. - + HAL\PHY\Hal8188EPhyCfg.c\h HAL\PHY\Hal8192CPhyCfg.c\h HAL\PHY\Hal8192DPhyCfg.h HAL\PHY\HalComPhyCfg.h 1. Disable original RF calibraet power tracking mechanism in MP old drv. 2. Georgia move some constant declare from MP old position to ODM. - + HEADER\... 1. Define IC support flag. 2. Revise precomp for SDIO build. - + Build batch files: 1. Support MP all IC with ODM module. 2. Support all SDIO driver build. 3. Spport 8812E build. - + Verification Before Checked-In: 1. N6/N5 buildall OK. We do not check EE/EU/ES sereis build batch file. 2. 92CU S3/S5/Reload/Unplug and ping WPA2-AES ok. @@ -2456,7 +2456,7 @@ Change Notes: Hal8188EEHWImg.c Hal8188EEHWImg.h Hal8188EUHWImg.c - Hal8188EUHWImg.h + Hal8188EUHWImg.h Hal8188ESHWImg.c Hal8188ESHWImg.h 1. Update 8188E HWImg header file. @@ -2490,7 +2490,7 @@ Change Notes: Verification Before Checked-In: 1. none - + --------------------------------------------------------------------------------------------- <02/01/2012 22:10 Kordan> Change Notes: @@ -2538,69 +2538,69 @@ Verification Before Checked-In: 2. Ping FAIL. --------------------------------------------------------------------------------------------- -<01/31/2012 17:00 Luke.Lee> -Modified Files: +<01/31/2012 17:00 Luke.Lee> +Modified Files: Change Notes: 1. Fix 88EU TX DESC bug 2. Add Fast Antenna Training Mechanism (default disabled) 3. enable 88EU auto RTS 4. Add control flag pAntDivCfg to SW AntDiv - + Verification Before Checked-In: 1. N6/N5 buildall OK 2. 92CU run TP OK but 88EU TP bad --------------------------------------------------------------------------------------------- -<01/31/2012 16:07 MH_Chen> -Modified Files: +<01/31/2012 16:07 MH_Chen> +Modified Files: Change Notes: 1. Merge MP SDIO driver for ODM module test. Unti version 2412. 2. Revise for MP common binary & ODM compatiable. - + Verification Before Checked-In: 1. N5/N62 Buildall ok. 2. 92CU win7 unplug/reload/S3/S5 ok. --------------------------------------------------------------------------------------------- -<01/30/2012 21:13 MH_Chen> -Modified Files: +<01/30/2012 21:13 MH_Chen> +Modified Files: Change Notes: 1. Fix rtwlan SDIO source file for MP. 2. Revise precomp header file and batch file for MP SDIO driver. - + Verification Before Checked-In: 1. N5 Build SDIO driver ok. --------------------------------------------------------------------------------------------- -<01/30/2012 20:40 MH_Chen> -Modified Files: +<01/30/2012 20:40 MH_Chen> +Modified Files: Change Notes: 1. Revise ODM phy rx desc query for MP. 2. Revise precomp header file for USB. - + Verification Before Checked-In: 1. N5/N62 buildall ok. N5 Build 8723AS fail. 2. 92CU test ok. Link with WPA2-AES AP. Unplug/reload/S3 ok. --------------------------------------------------------------------------------------------- -<01/29/2012 17:00 JueYang> +<01/29/2012 17:00 JueYang> Modified Files: HAL\OUTSRC\odm.c - + PLATFORM\NDIS6\USB\N6Usb_DrvIF.c - + Change Notes: HAL\OUTSRC\odm.c 1. Fix RA info not initialized. - + PLATFORM\NDIS6\USB\N6Usb_DrvIF.c 1. Fix a mistake in writing which cause USB memory leak. - + Verification Before Checked-In: 1. N5/N62 buildall ok. 2. 88EE\88CE\88CU test ok. --------------------------------------------------------------------------------------------- -<01/29/2012 13:20 JueYang> +<01/29/2012 13:20 JueYang> Modified Files: COMMON\WOLPattern.c HAL\rtl8188E\rtl8188eu\Hal8188EUsbGen.c @@ -2618,12 +2618,12 @@ Modified Files: PLATFORM\NDIS6\USB\Mp_Req.c PLATFORM\NDIS6\USB\N6Usb_main.c PLATFORM\NDIS6\N62C_SetOID.c - + HAL\EFUSE\Hal8192CEfuse.c HAL\EFUSE\HalEfuse.h HAL\OUTSRC\odm.c HEADER\RegCommon.h - + Change Notes: COMMON\WOLPattern.c HAL\rtl8188E\rtl8188eu\Hal8188EUsbGen.c @@ -2642,17 +2642,17 @@ Change Notes: PLATFORM\NDIS6\USB\N6Usb_main.c PLATFORM\NDIS6\N62C_SetOID.c 1. Use MAX_SUPPORT_WOL_PATTERN_NUM(Adapter) instead of MAX_SUPPORT_WOL_PATTERN_NUM. - + HAL\EFUSE\Hal8192CEfuse.c HAL\EFUSE\HalEfuse.h HAL\OUTSRC\odm.c HEADER\RegCommon.h 1. Remove HAL_SUPPORT_88E_92C. - + Verification Before Checked-In: 1. N5/N62 buildall ok --------------------------------------------------------------------------------------------- -<01/29/2012 11:20 JueYang> +<01/29/2012 11:20 JueYang> Modified Files: COMMON\MgntGen.c COMMON\sources.Ebd @@ -2693,39 +2693,39 @@ Modified Files: Precomp.h.WlanE.Windows HEADER\PrecompInc.h HEADER\TypeDef.h - + Change Notes: 1. Move RA from COMMON\ to HAL\OURSRC\RTL8188E. 2. Support 88E and other chips when RATE_ADAPTIVE_SUPPORT=1. - + Verification Before Checked-In: 1. N5/N62 buildall ok ---------------------------------------------------------------------------------------------- <01/20/2012 19:07 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP V 2401-2410. - + Verification Before Checked-IN 1. N5/N6 buildall ok. 2. 92CU win7 ping test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 22:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Support 8188E power tracking mechanism in odm folder for MP. - + Verification Before Checked-IN 1. N5/N6 buildall ok. 2. 92CU win7 ping test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 21:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP V 2384-2400 to support new 88EU/8812U features. - + Verification Before Checked-IN 1. N5/N6 buildall ok. 2. 92CU win7 ping test ok. @@ -2733,16 +2733,16 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/19/2012 20:00 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. According to chariot test. 88EU will fail in RX side, we found that the reason is due to precomp.h setting. If you want to test 88E series IC Please use below setting. We will fix the problem later. - + #if 1 // For 92C/92D/8723A #define HAL_SUPPORT_88E_92C 0 #if (HAL_SUPPORT_88E_92C ==1) - #undef RTL8192D_DUAL_MAC_MODE_SWITCH + #undef RTL8192D_DUAL_MAC_MODE_SWITCH #define RTL8192D_DUAL_MAC_MODE_SWITCH 0 #undef RTL8192D_EASY_SMART_CONCURRENT #define RTL8192D_EASY_SMART_CONCURRENT 0 @@ -2753,7 +2753,7 @@ Change Note: #else // for 88E #define HAL_SUPPORT_88E_92C 1 #if (HAL_SUPPORT_88E_92C ==1) - #undef RTL8192D_DUAL_MAC_MODE_SWITCH + #undef RTL8192D_DUAL_MAC_MODE_SWITCH #define RTL8192D_DUAL_MAC_MODE_SWITCH 0 #undef RTL8192D_EASY_SMART_CONCURRENT #define RTL8192D_EASY_SMART_CONCURRENT 0 @@ -2764,96 +2764,96 @@ Change Note: #endif #endif - + Verification Before Checked-IN - 1. 88EU/92CU chariot throughput test ok. + 1. 88EU/92CU chariot throughput test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 16:00 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Move 8188E PHY calibrate relative code from HAL\PHY to HAL\ODM\rtl8188e 2. Revise MP source & build environment for testing ok. - + Verification Before Checked-IN 1. MP N5/N6 buildall ok. 2. 92CU win7 ping test ok. ---------------------------------------------------------------------------------------------- <01/19/2012 11:50 Georgia> -Modified Files: +Modified Files: odm_HWConfig.c - + Change Note: 1. Fix compile error and wrning for CE. 2. Fix system crash for CE. (in func:odm_Process_RSSIForDM incorrect condition judgment) - + Verification Before Checked-IN 1. CE mak all ok. 2. 92DU-VS auto-test ok. ---------------------------------------------------------------------------------------------- <01/17/2012 23:03 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge PHY-RF relative API for HW out source share. 2. Disable MP PHY-RF calibrate relative function. 3. Revise MP build environment for compile pass. - + Verification Before Checked-IN 1. N5/N62 buildall OK. 2. CU Win7/XP ping with WPA2-AES AO OK. ---------------------------------------------------------------------------------------------- <01/16/2012 18:20 Luke.Lee> -Modified Files: +Modified Files: Change Note: 1. Fix ODM_CmnInfoInit() - + Verification Before Checked-IN 1. N5/N62 buildall OK 2. 88EU Win7 ping OK ---------------------------------------------------------------------------------------------- <01/16/2012 11:30 Luke.Lee> -Modified Files: +Modified Files: Change Note: 1. Modify 88E CCK RSSI formula. - + Verification Before Checked-IN 1. N5/N62 buildall OK 2. 88CE Win7 ping OK ---------------------------------------------------------------------------------------------- <01/13/2012 17:32 Georgia> -Modified Files: +Modified Files: Change Note: 1. Fix compile error for CE. - + Verification Before Checked-IN 1. CE Platform make ok. 2. 88CU/92DU-VS/8723AU/8723AS/8188ES Auto-test ok. - + ---------------------------------------------------------------------------------------------- <01/13/2012 16:35 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Revise common binary arch for 88EE/88EU. 2. Fine tune build environment for MP driver. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. XP platform 88EU ping and reload ok. 3. Vista platform 92CU link with dir-655 and ping ok. 4. WIn7 platform 88CU/92DU-VS/8723AU work at the same with rtwlanu.sys. Ping with dir-655 wpa2-aes S3/S5/reload ok. - - + + ---------------------------------------------------------------------------------------------- <01/12/2012 23:50 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP V 2383 to support 88EU/8812U in the same binary. - + Verification Before Checked-IN 1. N5/N62 buildall ok. 2. Vista platform 92CU link with dir-655 and ping ok. S3 fail~~!!! Under investigation. @@ -2862,46 +2862,46 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/12/2012 22:46 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Support default & AP mode STA info revise for MP. 2. Fix tracking list item 23/44. 3. Add more universal interface for power tracking and rf calibrate. - + Verification Before Checked-IN 1. N5/N62 buildall ok. 2. Vista platform 92CU link with dir-655 and ping ok. ---------------------------------------------------------------------------------------------- <01/12/2012 22:02 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge mp driver to v2382. 2. Revise MP DM entry arch. - + Verification Before Checked-IN 1. N5/N62 buildall ok. - + ---------------------------------------------------------------------------------------------- <01/12/2012 17:20 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge mp driver to v2382. 2. Revise MP DM entry arch. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. 88CU/8723AU/92DU test in the win7 platfrom. Ping with DIR-655 WPA2-AES ok. ---------------------------------------------------------------------------------------------- <01/12/2012 16:20 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Fix 92CU BSOD in win7 platfrom due to ODM deinit with null ptr. 2. Delete MP useless folder. 3. Revise driver linked & compilerd object. 4. Revise indlud file flow. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. 88CU/8723AU/92DU test in the win7 platfrom. S3/S4/reload unplug with DIR-655 WPA2-AES @@ -2909,10 +2909,10 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/11/2012 22:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Enable 8723 ODM HW config mode. - + Verification Before Checked-IN 1. N62 buildrtwu ok. 2. 88CU/8723AU/92DU test in the win7 platfrom. S3/S4/reload unplug with DIR-655 WPA1-AES @@ -2920,12 +2920,12 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/11/2012 21:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP driver from v2258 to v2377. 2. Revise ODM structure for MP. 3. Mere 88E/8812/8821 common binary. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. CU WIN7/Vista DIR-655 WPA2/AES S3/S4/S5 reload and ping ok. @@ -2934,25 +2934,25 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/10/2012 10:07 Mingzhi> -Modified Files: +Modified Files: Change Note: 1. fix a bug which will cause BSOD -Modified Files: +Modified Files: 1. odm.c 2. odm_RTL8192D.c - + Verification Before Checked-IN 1. N5 buildrtwu/buildrtwe ok 2. 88CE plug ok ---------------------------------------------------------------------------------------------- <01/10/2012 21:30 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Merge MP driver from v2218 to v2258. 2. Revise ODM structure for MP. 3. Mere 88E common binary. - + Verification Before Checked-IN 1. N5/N6/N62 buildall ok. 2. WIN7/Vista DIR-655 WPA2/AES S3/S4/S5 reload and ping ok. @@ -2960,28 +2960,28 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <01/10/2012 16:15 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Fix unload fail when deinit haldm in platform layer. - + Verification Before Checked-IN 1. ping with dir-655 and reload ok in vista. ---------------------------------------------------------------------------------------------- <01/09/2012 20:08 MH_Chen> -Modified Files: +Modified Files: Change Note: 1. Fix compile error in MP. 2. Fix USB init fail for inithaldm in platfrom or hal layer. - + Verification Before Checked-IN 1. N5/N62 buildall ok. 2. 8188CUS Vista & win7 ping with DIR-655 wpa2 aes ok. ---------------------------------------------------------------------------------------------- <01/09/2012 18:45 Georgia> -Modified Files: - odm.c +Modified Files: + odm.c odm.h odm_HWConfig.c rtl8723a/odm_RegConfig8723A.c @@ -2996,9 +2996,9 @@ Verification Before Checked-IN 2. 8188CUS with SW-ANT-DIV auto-test ok. ---------------------------------------------------------------------------------------------- <01/09/2012 13:05 Kordan> -Modified Files: +Modified Files: HAL/OUTSRC/odm_precomp.h - + Added Files: rtl8723a/odm_RegConfig8723A.h rtl8723a/odm_RegConfig8723A.c @@ -3010,18 +3010,18 @@ Change Note: Verification Before Checked-IN 1. MP N5/6/62 buildall ok. ---------------------------------------------------------------------------------------------- -<01/09/2012 10:40 MH_Chen> -Modified Files: +<01/09/2012 10:40 MH_Chen> +Modified Files: Change Note: 1.Fix N5/N6/ All IC compile error in MP. - + Verification Before Checked-IN 1.N5/N62 buildall OK 2. Link with DIR-655 with 92CU but performance is very bad~~~!! Connect and disconnect periodically~~~!! 3. Try another RTK AP also meet hard to link problem. ---------------------------------------------------------------------------------------------- -<01/06/2012 15:40 Georgia> +<01/06/2012 15:40 Georgia> Added Files: rtl8192c/Hal8192CEFWImg_CE.c rtl8192c/Hal8192CEFWImg_CE.h @@ -3051,24 +3051,24 @@ Added Files: rtl8723a/Hal8723SHWImg_CE.h rtl8723a/Hal8723UHWImg_CE.c rtl8723a/Hal8723UHWImg_CE.h - -Modified Files: + +Modified Files: odm.c odm_precomp.h rtl8192c/HalDMOutSrc8192C_CE.c rtl8192c/HalDMOutSrc8192C_CE.h - + Change Note: 1.)add related phy-parameters for CE. 2.)remove useless code of SW-Ant-div for CE. - + Verification Before Checked-IN 1. CE-Platform make OK. 2. 8188CUS With SW-ANT-DIV auto-test OK. ---------------------------------------------------------------------------------------------- -<01/05/2012 20:00 Luke.Lee> -Modified Files: +<01/05/2012 20:00 Luke.Lee> +Modified Files: odm.c odm_HWConfig.c odm_HWConfig.h @@ -3079,13 +3079,13 @@ Change Note: 1.Fix DIG error in some condition 2.include 88E modification from MERGE_TEMP 3.remove 64bit division - + Verification Before Checked-IN 1.N5/N62 buildall OK ---------------------------------------------------------------------------------------------- -<01/04/2012 18:30 Georgia> -Modified Files: +<01/04/2012 18:30 Georgia> +Modified Files: odm.c odm.h odm_precomp.h @@ -3094,14 +3094,14 @@ Modified Files: Change Note: 1.Fix compile error for CE. - + Verification Before Checked-IN 1.CE-platform make ok. 2.92DU-VS autotest ok. - + ---------------------------------------------------------------------------------------------- -<01/04/2012 16:00 Mingzhi> -Modified Files: +<01/04/2012 16:00 Mingzhi> +Modified Files: 1.odm.c 2.odm_RTL8192D.c @@ -3113,7 +3113,7 @@ Verification Before Checked-IN 1. N5 buildrtwu/buildrtwe ok ---------------------------------------------------------------------------------------------- -<01/02/2012 17:40 Kordan> +<01/02/2012 17:40 Kordan> Removed Files: HAL/OUTSRC/rtl8723/* HAL/OUTSRC/rtl8723a/Hal8723HWImg* @@ -3128,13 +3128,13 @@ Verification Before Checked-IN 1. none ---------------------------------------------------------------------------------------------- <01/02/2012 17:35 Kordan> -Modified Files: +Modified Files: HAL/HWIMG/HalHWImg.h HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm_precomp.h - + Added Files: HAL/OUTSRC/odm_HWConfigCallee.h @@ -3191,17 +3191,17 @@ Added Files: Change Note: 1. add & modify related code for rtl8723a. - + Verification Before Checked-IN: 1.CE-Platform make ok. - 2.8188CUS auto-test (with PS) ok. + 2.8188CUS auto-test (with PS) ok. 2.8723AU auto-test ok. - + ---------------------------------------------------------------------------------------------- <12/29/2011 18:00 Mingzhi> Modified Files: 1.odm.c - 2.odm_RTL8192D.c + 2.odm_RTL8192D.c Change Note: 1. fix a bug in ODM_Write_CCK_CCA_Thres/ODM_Write_CCK_CCA_Thres_92D 2. fix a bug which may cause 92D can't enter false alarm counter statistics function @@ -3214,9 +3214,9 @@ Verification Before Checked-IN: ---------------------------------------------------------------------------------------------- <12/28/2011 22:45 MH_Chen> -Modified Files: +Modified Files: Change Note: - 1. fix compile error for Ra structure. + 1. fix compile error for Ra structure. Verification Before Checked-IN 1. MP N5/6/62 buildall ok. @@ -3281,7 +3281,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/26/2011 21:00 Mingzhi> -Modified Files: +Modified Files: Odm.c Change Noet: @@ -3293,7 +3293,7 @@ Verification Before Checked-IN 2. 92DU-VC test ok ---------------------------------------------------------------------------------------------- <12/26/2011 15:20 Georgia> -Modified Files: +Modified Files: Odm.c Change Noet: 1. Fixed null pointer exception in func:odm_CmnInfoHook_Debug @@ -3304,7 +3304,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/23/2011 21:30 Mingzhi> -Modified Files: +Modified Files: Odm.h Odm.c Change Noet: @@ -3317,7 +3317,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/23/2011 20:50 Georgia> -Modified Files: +Modified Files: odm.c odm_RTL8192D.c @@ -3329,7 +3329,7 @@ Verification Before Checked-IN 2. 92DU-VS autotest ok ---------------------------------------------------------------------------------------------- <12/23/2011 18:00 Kordan> -Modified Files: +Modified Files: Image2Header.exe HW Configuration source/header/text files @@ -3347,7 +3347,7 @@ Added Files: HW_Integration_Status_20111221.xls Deleted Files: HW_Integration_Status_20111215.xls -Modified Files: +Modified Files: odm.h odm_interface.c odm_interface.h @@ -3361,7 +3361,7 @@ Verification Before Checked-IN 1. CE Platform make ok. ---------------------------------------------------------------------------------------------- <12/20/2011 21:20 Georgia> -Modified Files: +Modified Files: odm.c odm.h odm_interface.c @@ -3377,7 +3377,7 @@ Verification Before Checked-IN 2. 8188CUS Auto-test oK. ---------------------------------------------------------------------------------------------- <12/20/2011 11:07 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Fix 92C/92D init fail for scan fail issue. 2. Fix ODM HT Channel width setting. @@ -3385,10 +3385,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK 2. Link with DIr-655 reload/unplug/S3/S4/S5 and ping ok. - + ---------------------------------------------------------------------------------------------- <12/20/2011 10:50 Kordan> -Modified Files: +Modified Files: HAL/rtl8192C/rtl8192ce/Hal8192CEGen.c HAL/rtl8192S/rtl8192su/Hal8192SUsbGen.c @@ -3399,7 +3399,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/20/2011 10:13 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3410,7 +3410,7 @@ Verification Before Checked-IN 1. N5 buildrtwu/buildrtwe fail ---------------------------------------------------------------------------------------------- <12/19/2011 20:20 Georgia> -Modified Files: +Modified Files: odm.c Deleted Files: odm_TimerCallbacks.h @@ -3419,10 +3419,10 @@ Change Noet: 1. Move odm_SwAntDivChkAntSwitchCallback APIs back to odm.c Verification Before Checked-IN - 1. CE Platform make OK + 1. CE Platform make OK ---------------------------------------------------------------------------------------------- <12/19/2011 19:40 Kordan> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_interface.c @@ -3432,10 +3432,10 @@ Change Noet: 1. Move ODM_InitAllTimers/ODM_CancelAllTimers APIs back to odm.c Verification Before Checked-IN - 1. N5/N62 buildall OK + 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 18:10 Kordan> -Modified Files: +Modified Files: none Change Noet: 1. Add missing odm_TimerCallbacks.h @@ -3444,7 +3444,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 18:05 Kordan> -Modified Files: +Modified Files: HalDM.c OUTSRC/odm.c OUTSRC/odm_interface.c @@ -3452,7 +3452,7 @@ Modified Files: rtl8192C/rtl8192ce/Hal8192CEGen.c rtl8192C/rtl8192cs/Hal8192CSdioGen.c rtl8192C/rtl8192cu/Hal8192CUsbGen.c - HEADER/HTType.h + HEADER/HTType.h Change Noet: 1. Fix RF performance issue: The hardware capability only supports 20M. @@ -3466,13 +3466,13 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 17:02 Button> -Modified Files: +Modified Files: odm.c odm.h odm_interface.c odm_types.h rtl8192c/HALDMOutSrc8192C_AP.c - + Change Noet: 1. Fix compile error in AP platform. 2. Add delay, timer, memory function @@ -3483,7 +3483,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/19/2011 13:29 Kordan> -Modified Files: +Modified Files: odm.c Hal8192CUsbGen.c @@ -3494,7 +3494,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/19/2011 10:25 Kordan> -Modified Files: +Modified Files: odm.h HAL/PHY/Hal8192CRf6052.c @@ -3505,7 +3505,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/16/2011 18:30 Georgia> -Modified Files: +Modified Files: HAL/OUTSRC/odm.c HAL/OUTSRC/odm.h HAL/OUTSRC/odm_interface.c @@ -3528,7 +3528,7 @@ Verification Before Checked-IN 2. 8188CUS/8188CU(With Antenna_Div)/92DU-VS(With 2.4G) Auto-test ok. ---------------------------------------------------------------------------------------------- <12/16/2011 11:23 Kordan> -Modified Files: +Modified Files: HAL/HWIMG/HalHWImg.h HAL/OUTSRC/odm_HWConfig.c HAL/OUTSRC/odm_HWConfig.h @@ -3547,7 +3547,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/15/2011 14:04 Annie> -Modified Files: +Modified Files: odm.c odm_debug.h @@ -3559,12 +3559,12 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/14/2011 17:52 Annie> -Modified Files: +Modified Files: odm.c odm.h odm_debug.c odm_debug.h - + Change Noet: 1. Fix compiler error in ADSL platform. 2. Correct debug message code about ODM_COMP_ANT_DIV functions. @@ -3575,11 +3575,11 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/14/2011 13:30 Kordan> -Modified Files: +Modified Files: odm_types.h odm_HWConfig.c odm_HWConfig.h - + Change Noet: 1. Define HAL_STATUS status code in odm_types.h 2. Replace ODM_ConfigXxxWithHeaderFile(...) return value with HAL_STATUS. @@ -3588,7 +3588,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/14/2011 09:55 Kordan> -Modified Files: +Modified Files: odm.c odm_HWConfig.c odm_HWConfig.h @@ -3596,7 +3596,7 @@ Modified Files: rtl8192C/rtl8192cu/Hal8192CUsbGen.c NDIS5/USB/usb_main.c NDIS6/USB/N6Usn_main.c - + Change Noet: 1. Put InitHalDM right after NicIFReadAdapter to avoid null adapter. 2. ODM_ConfigMACWithHeaderFile prototype changed. @@ -3606,12 +3606,12 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/13/2011 23:58 Georgia> -Modified Files: +Modified Files: odm.c odm_precomp.h rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/HalDMOutSrc8192D_CE.c - + Change Noet: 1. odm_DynamicTxPowerNIC integration. @@ -3620,7 +3620,7 @@ Verification Before Checked-IN 2. 8188CUS Autotest ok. ---------------------------------------------------------------------------------------------- <12/13/2011 20:00 Georgia> -Modified Files: +Modified Files: odm.c odm.h odm_HWConfig.h @@ -3629,7 +3629,7 @@ Modified Files: rtl8192c/HalDMOutSrc8192C_CE.h rtl8192d/HalDMOutSrc8192D_CE.c rtl8192d/HalDMOutSrc8192D_CE.h - + Change Noet: 1. Fix compiler error in CE platform @@ -3638,7 +3638,7 @@ Verification Before Checked-IN 2. 8188CUS Autotest(with PS-IPS/LPS) ok. ---------------------------------------------------------------------------------------------- <12/12/2011 20:01 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3649,7 +3649,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/12/2011 14:30 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3659,7 +3659,7 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/09/2011 14:30 Mingzhi> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3669,17 +3669,17 @@ Verification Before Checked-IN 1. N5/N62 buildall OK ---------------------------------------------------------------------------------------------- <12/07/2011 22:33 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Revise SW antenna diversity atchitecture. Verification Before Checked-IN 1. N5/N62 buildall OK 2. 92CU win7 ping WPA2-AES AP ok. - + ---------------------------------------------------------------------------------------------- <12/07/2011 19:16 Mingzhi> -Modified Files: +Modified Files: odm.h odm.c @@ -3693,7 +3693,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/07/2011 17:00 Kordan> -Modified Files: +Modified Files: odm_HWConfig.c odm.h @@ -3707,7 +3707,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/07/2011 16:55 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Enable all support abilit for chanel emurator test in MP driver. 2. Fix BSOD in Edca turbo scheme. @@ -3719,7 +3719,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/07/2011 13:10 Kordan> -Modified Files: +Modified Files: odm_interface.c odm_interface.h odm_HWConfig.c @@ -3729,10 +3729,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK - + ---------------------------------------------------------------------------------------------- <12/07/2011 13:10 Kordan> -Modified Files: +Modified Files: odm_interface.c odm_interface.h odm_HWConfig.c @@ -3743,10 +3743,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK - + ---------------------------------------------------------------------------------------------- <12/06/2011 14:40 Kordan> -Modified Files: +Modified Files: odm_HWConfig.h odm_precomp.h rtl8723/* @@ -3758,10 +3758,10 @@ Change Noet: Verification Before Checked-IN 1. N5/N62 buildall OK - + ---------------------------------------------------------------------------------------------- <12/05/2011 20:20 LukeLee> -Modified Files: +Modified Files: odm.c Change Noet: @@ -3773,7 +3773,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/02/2011 20:25 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Merge MP code base from V1990 to V2218. 2. Support 88E and 8812 Jaguar code base for MP. @@ -3807,7 +3807,7 @@ Modified Files: Change Noet: 1. Use ODM_REG for EDCA_PARAM registers. - 2. Buug fix: correct SupportICType in ADSL path, remove REG_NAMING_RULE_TEST + 2. Buug fix: correct SupportICType in ADSL path, remove REG_NAMING_RULE_TEST and ODM_RegisterOffsetTestFunction(). 3. Disable ODM_GlobalDebugLevel and ODM_GlobalDebugComponents. @@ -3818,7 +3818,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/01/2011 16:40 MH_Chen> -Modified Files: +Modified Files: Change Noet: 1. Fix compiler error in V92 for different declaration. @@ -3828,9 +3828,9 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <12/01/2011 16:30 MH_Chen> -Modified Files: +Modified Files: Change Noet: - 1. Revise debug module to fix compile error. + 1. Revise debug module to fix compile error. 2. Fix BSOD in MP EDUCA init case temporarily. Verification Before Checked-IN @@ -3845,7 +3845,7 @@ Modified Files: odm_debug.h Change Noet: - 1. ODM_CmnInfoUpdate(): add ODM_CMNINFO_DBG_COMP/ODM_CMNINFO_DBG_LEVEL to + 1. ODM_CmnInfoUpdate(): add ODM_CMNINFO_DBG_COMP/ODM_CMNINFO_DBG_LEVEL to update DebugComponents/DebugLevel. Verification Before Checked-IN @@ -3878,7 +3878,7 @@ Change Noet: Verification Before Checked-IN 1.CE Platform make ok - + ---------------------------------------------------------------------------------------------- <11/30/2011 23:40 Georgia> Modified Files: @@ -3896,7 +3896,7 @@ Change Noet: Verification Before Checked-IN 1.CE Platform make ok - + ---------------------------------------------------------------------------------------------- <11/30/2011 23:20 Georgia> Modified Files: @@ -3942,7 +3942,7 @@ Modified Files: odm.h Change Notes: - 1. Merge SW AntDiv + 1. Merge SW AntDiv Verification Before Checked-IN 1. BuildAll ok. @@ -3953,7 +3953,7 @@ Modified Files: PrecompInc.h Change Notes: - 1. 8192CS compilation error fixed + 1. 8192CS compilation error fixed Verification Before Checked-IN 1. BuildAll ok. @@ -3995,7 +3995,7 @@ Change Notes: 3. The bug of transferring FW Binary to HW image is fixed. Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/28/2011 14:00 Kordan> Modified Files: @@ -4007,7 +4007,7 @@ Change Notes: 2. Replace COMP_INIT, DBG_LOUD with ODM-prefixed definition Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/28/2011 11:30 Kordan> Modified Files: @@ -4021,7 +4021,7 @@ Change Notes: 3. Minor bugs fixed Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/25/2011 20:45 Annie> Modified Files: @@ -4060,7 +4060,7 @@ Modified Files: rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/HalDMOutSrc8192D_CE.c rtl8192d/HalDMOutSrc8192D_CE.h - + Change Notes: 1. remove related pack(1) statement. 2. add sleep/delay funcs. @@ -4088,7 +4088,7 @@ Change Notes: 3. Arguments of Image2Header.exe now are case-insensitive. Verification Before Checked-IN - 1. WinXP/Win7 Buildrtwu.bat OK + 1. WinXP/Win7 Buildrtwu.bat OK ---------------------------------------------------------------------------------------------- <11/24/2011 21:12 button> @@ -4122,7 +4122,7 @@ Verification Before Checked-IN <11/23/2011 22:30 LukeLee> Modified Files: HW_Integration_Status_Luke.xls - odm.c + odm.c odm_RTL8192D.c odm_debug.c odm_HWConfig.c @@ -4139,7 +4139,7 @@ Verification Before Checked-IN <11/23/2011 17:30 LukeLee> Modified Files: HW_Integration_Status_Luke.xls - odm.c + odm.c odm.h odm_debug.c odm_HWConfig.c @@ -4167,7 +4167,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/21/2011 15:50 Mingzhi> Modified Files: - odm.c + odm.c odm.h Change Notes: @@ -4182,14 +4182,14 @@ Verification Before Checked-IN Modified Files: Image2Header.exe odm_HWConfig.c - odm_precomp.h + odm_precomp.h Change Notes: 1. Add three ODM_ConfigXxxWithHeaderFile(...) APIs in odm_HWConfig.c. 2. Image2Header.exe is updated. 3. Notes: a. HWImg header files should be included in OUTSRC\odm_precomp.h - b. HWImg source files should be added in source file, + b. HWImg source files should be added in source file, for example, HAL\rtl8192C\rtl8192cu\sources.WlanU.Win c. By now, text files under the folders are just for testing. @@ -4256,7 +4256,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/18/2011 17:50 LukeLee> -Modified Files: +Modified Files: Change Notes: 1. Move bLinked and RSSI_Min to ODM_CmnInfoUpdate() @@ -4277,7 +4277,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/18/2011 00:01 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Support ODM PHY status query. @@ -4288,7 +4288,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/17/2011 23:15 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Add more universal interface template and MP can work. @@ -4298,7 +4298,7 @@ Verification Before Checked-IN ---------------------------------------------------------------------------------------------- <11/17/2011 21:06 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Revise #include flow to be compatiable with other SW team. @@ -4310,18 +4310,18 @@ Verification Before Checked-IN <11/17/2011 20:30 LukeLee> Modified Files: HW_Itegration_Status.xls - + Change Notes: - 1. update status + 1. update status Verification Before Checked-IN None ---------------------------------------------------------------------------------------------- <11/17/2011 16:48 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Add new API for spin lock and memory allocate. - 2. Revise MP include flow to default setting. + 2. Revise MP include flow to default setting. Verification Before Checked-IN 1. N5/N62 buildall ok. @@ -4333,8 +4333,8 @@ Modified Files: odm.c Change Notes: - 1. fix a bug in dynamic_early_mode - + 1. fix a bug in dynamic_early_mode + Verification Before Checked-IN 1. MP platfrom N5 build ok @@ -4347,7 +4347,7 @@ Modified Files: Change Notes: 1. add variable bDefAdapter_APMode/bDefAdapter_ClientMode/bExtAdapter_APMode/bExtClientMode in Common info 2. remove ACTING_AS_AP() from dynamic_early_mode - + Verification Before Checked-IN 1. MP platfrom N5 build ok @@ -4361,13 +4361,13 @@ Change Notes: 2. Add new Image2Header.exe to SVN Verification Before Checked-IN - 1. Usage: Image2Header.exe IC_TYPE FILE_TYPE - - Example: If you want to convert text files in OUTSRC/rtl8192cu/BB/, - you could type the following command. The output files will be + 1. Usage: Image2Header.exe IC_TYPE FILE_TYPE + + Example: If you want to convert text files in OUTSRC/rtl8192cu/BB/, + you could type the following command. The output files will be put under OUTSRC/rtl8192cu/. $ Image2Header.exe rtl8192cu BB (case-sensitive) - + ---------------------------------------------------------------------------------------------- <17/11/2011 10:34 Mingzhi> Modified Files: @@ -4380,12 +4380,12 @@ Verification Before Checked-IN 1. MP platfrom N5 build ok ---------------------------------------------------------------------------------------------- <11/16/2011 22:22 MH_Chen> -Modified Files: +Modified Files: Change Notes: 1. Revise Dual mac band definition to prevent scan fail. Need to adjust later. Verification Before Checked-In: - 1. MP platform N5/N62 build ok. + 1. MP platform N5/N62 build ok. 2. 92CU/92CE ping with open AP ok. But CU scan stop after a while. ---------------------------------------------------------------------------------------------- @@ -4399,7 +4399,7 @@ Modified Files: Change Notes: 1. Move AP team's tx power control to ODM module 2. rename macro IS_STA_VALID - 3. GlobalDebugComponents => ODM_GlobalDebugComponents , + 3. GlobalDebugComponents => ODM_GlobalDebugComponents , GlobalDebugLevel => ODM_GlobalDebugLevel Verification Before Checked-In: @@ -4426,7 +4426,7 @@ Change Notes: Verification Before Checked-In: 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) 2. 88CE Win7X86 cannot show scan list since v0049 3. #include <../Mp_Promcomp.h> is not allowable in MP platform @@ -4440,7 +4440,7 @@ Change Notes: Verification Before Checked-In: 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) ---------------------------------------------------------------------------------------------- <11/15/2011 13:00 LukeLee> @@ -4460,7 +4460,7 @@ Change Notes: Verification Before Checked-In: 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c/odm_RTL8192C.c/odm_RTL8192D.c) ---------------------------------------------------------------------------------------------- <11/14/2011 21:15 button> @@ -4478,7 +4478,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/14/2011 16:50 MH_Chen> Modified Files: - odm.h + odm.h odm.c odm_debug.c odm_HWConfig.c @@ -4488,12 +4488,12 @@ Change Notes: 2. Revise some universal interface definition compatiable with other SW team. Verification Before Checked-In: - 1. MP platform N5/N62 build ok. + 1. MP platform N5/N62 build ok. ---------------------------------------------------------------------------------------------- <11/14/2011 13:00 LukeLee> Modified Files: - odm.h + odm.h odm.c odm_debug.c odm_HWConfig.c @@ -4503,8 +4503,8 @@ Change Notes: 2. add odm_IsLinked() and odm_InitCommonInfo() for ODM internal common info Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <14/11/2011 10:56 Mingzhi> Modified Files: @@ -4515,12 +4515,12 @@ Change Notes: Verification Before Checked-IN 1. MP platfrom N5 build ok - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/11/2011 17:20 LukeLee> Modified Files: - odm.h + odm.h odm.h odm_debug.h odm_HWConfig.c @@ -4530,11 +4530,11 @@ Change Notes: 2. Define debug tracing components Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/11/2011 10:00 LukeLee> -Modified Files: +Modified Files: odm.h Change Notes: @@ -4546,7 +4546,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/10/2011 23:00 LukeLee> Modified Files: - odm.c + odm.c odm.h Change Notes: @@ -4557,27 +4557,27 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/10/2011 16:40 MH_Chen> -Modified Files: +Modified Files: odm.c - odm.h + odm.h Change Notes: - 1. bRFPathRxEnable �Q�@�U�A�o���ӬO�]�w�� ODM write variable�A�Ҧ� team �����ݭn�]�w�~��A - �p�G�q�ڭ̪� HAL copy �L�h���Ӥ��X�z�C�ҥH���ӬO�b ODM ����update �o��value �� PHY query �ɨϥΡA - �쥻 code base �]���]�~�A�ڭ����ӧאּ bit oriented coding style�A�o�����ڷ| update�C - 2. MacPhyMode �ק令 ptr reference�A�ثe�u��MP�Ψ�Lteam follow - 3. BTCoexist �ק令 ptr reference �ק令�u�� ON/OFF boolean ��ܡA�ѩ󦳥i�঳ driver ���䴩�A - �کw�q�@�� pseudo ptr in DM structure for all team reference?�C - 4. �U���������� prt reference�A�u�� init �]�w�@���C - 5. �U����ij�]�� run-time �]�w�ȡA�קאּ ptr reference�A���� HAL �@�ήɴN�ק����p~~~!! - 6. �ѩ��ʤ@��ptr �]�w�A�i��|����Lteam compile���L�ٽ�����~~~!!! ����o�W����ij�O�_�i�H support ��?? �p�G�����ٽЭק� execel �[�c�A���¡C - 7. �ڭ̤U���ݭn review �@�U���ǬO ODM/Driver write ���Τ@�U���c�W���C + 1. bRFPathRxEnable ·Q¤@¤U¡A³oÀ³¸Ó¬O³]©w¬° ODM write variable¡A©Ò¦³ team ³£¤£»Ý­n³]©w¤~¹ï¡A + ¦pªG±q§Ú­Ìªº HAL copy ¹L¥hÀ³¸Ó¤£¦X²z¡C©Ò¥HÀ³¸Ó¬O¦b ODM ¤§¤¤update ³o­Óvalue µ¹ PHY query ®É¨Ï¥Î¡A + ­ì¥» code base ¤]¦³¤]»~¡A§Ú­ÌÀ³¸Ó§ï¬° bit oriented coding style¡A³o³¡¤À§Ú·| update¡C + 2. MacPhyMode ­×§ï¦¨ ptr reference¡A¥Ø«e¥u¦³MP¥Î¨ä¥Lteam follow + 3. BTCoexist ­×§ï¦¨ ptr reference ­×§ï¦¨¥u¦³ ON/OFF boolean ¿ï¾Ü¡A¥Ñ©ó¦³¥i¯à¦³ driver ³¡¤ä´©¡A + §Ú©w¸q¤@­Ó pseudo ptr in DM structure for all team reference?¡C + 4. ¤U­±¥þ³¡²¾¬° prt reference¡A¥u¦³ init ³]©w¤@¦¸¡C + 5. ¤U­±«ØÄ³¤]¥Ñ run-time ³]©w­È¡A­×§ï¬° ptr reference¡A¤§«á HAL ¦@¥Î®É´N­×§ï¤ñ¸û¤p~~~!! + 6. ¥Ñ©ó§ó°Ê¤@¨Çptr ³]©w¡A¥i¯à·|Åý¨ä¥Lteam compile¤£¹LÁÙ½ÐÀ°¦£~~~!!! ¤£¾å±o¤W­±«ØÄ³¬O§_¥i¥H support °Ú?? ¦pªG¤£¦æÁٽЭקï execel ¬[ºc¡AÁÂÁ¡C + 7. §Ú­Ì¤U¦¸»Ý­n review ¤@¤U­þ¨Ç¬O ODM/Driver write ¤Á³Î¤@¤Uµ²ºc³W¹º¡C Verification Before Checked-In: 1. N5N62 buildall ok. ---------------------------------------------------------------------------------------------- <11/09/2011 23:10 Annie> -Modified Files: +Modified Files: odm.c odm.h odm_interface.h @@ -4599,10 +4599,10 @@ Modified Files: Change Notes: 1. clean compile errors - + Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/09/2011 22:00 LukeLee> Modified Files: @@ -4611,10 +4611,10 @@ Modified Files: Change Notes: 1. Merge DIG function into ODM structure - + Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/09/2011 21:45 Button> Modified Files: @@ -4631,7 +4631,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/09/2011 17:00 LukeLee> -Removed Files: +Removed Files: HalDMOutSrc.c HalDMOutSrc.h HalHWOutSrc.c @@ -4649,14 +4649,14 @@ Change Notes: HalHWOutSrc.c/h -> odm_HWConfig.c/h 2. add common info for BTDM and DMSP 3. remove compile errors in MP platform - + Verification Before Checked-In: - 1. MP platform N5/N62 build ok. - (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) + 1. MP platform N5/N62 build ok. + (need to include Mp_Precomp.h in odm_debug.c/odm_interface.c/odm.c/odm_HWConfig.c) ---------------------------------------------------------------------------------------------- <11/09/2011 14:40 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h HalHWOutSrc.c @@ -4667,25 +4667,25 @@ Change Notes: 1. Revise related source of odm_DynamicBBPowerSaving for MP driver compile ok. 2. Removed useless code of CE team driver. 3. Revise customer id for AP/ADSL driver compiler ok. - + Verification Before Checked-In: - 1. CE platform build ok. - + 1. CE platform build ok. + ---------------------------------------------------------------------------------------------- <11/08/2011 14:20 Georgia> -Modified Files: +Modified Files: HalHWOutSrc.c HalHWOutSrc.h Change Notes: 1. Removed useless code. - + Verification Before Checked-In: - 1. CE platform build ok. - + 1. CE platform build ok. + ---------------------------------------------------------------------------------------------- <11/08/2011 12:00 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h HalHWOutSrc.c @@ -4693,13 +4693,13 @@ Modified Files: Change Notes: 1. fixed phy_staus parsing error in func odm_RxPhyStatus92CSeries_Parsing - + Verification Before Checked-In: - 1. CE platform build ok. + 1. CE platform build ok. ---------------------------------------------------------------------------------------------- <11/07/2011 17:00 LukeLee> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h @@ -4708,12 +4708,12 @@ Change Notes: 2. divide common info OPMode into several BOOLEAN variables Verification Before Checked-In: - 1. MP platform build ok. - (need to include Mp_Precomp.h in odm_interface.c/HalDMOutSrc.c/HalHWOutSrc.c) + 1. MP platform build ok. + (need to include Mp_Precomp.h in odm_interface.c/HalDMOutSrc.c/HalHWOutSrc.c) ---------------------------------------------------------------------------------------------- <11/04/2011 16:14 Annie> -Modified Files: +Modified Files: odm_interface.h Change Notes: @@ -4725,7 +4725,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/04/2011 13:23 Annie> -Modified Files: +Modified Files: odm_interface.h Change Notes: @@ -4740,7 +4740,7 @@ Verification Before Checked-In: New Files: rtl8195/Hal8195Reg.h odm_reg.h -Modified Files: +Modified Files: rtl8188e/Hal8188EReg.h rtl8192c/Hal8192CReg.h rtl8192d/Hal8192DReg.h @@ -4761,7 +4761,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/02/2011 22:47 MH_Chen> -Modified Files: +Modified Files: HAL\rtl8192C\sources.WlanE/U/S HAL\HalDM.c Change Notes: @@ -4777,7 +4777,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/02/2011 21:30 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.h rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/HalDMOutSrc8192D_CE.c @@ -4791,7 +4791,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <11/02/2011 20:00 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.h HalHWOutSrc.c odm_types.h @@ -4809,8 +4809,8 @@ Verification Before Checked-In: New Files: HalHWOutSrc.c HalHWOutSrc.h - -Modified Files: + +Modified Files: HalDMOutSrc.c HalDMOutSrc.h odm_debug.c @@ -4823,11 +4823,11 @@ Modified Files: rtl8192c/HalDMOutSrc8192C_CE.c rtl8192d/Hal8192DReg.h rtl8192d/HalDMOutSrc8192D_CE.c - + Removed Files: rtl8192c/odm_phy_info.h rtl8192d/odm_phy_info.h - + Change Notes: 1. Add Func ODM_PhyStatusQuery. 2. Modify INT8/INT16.. series declaration. @@ -4963,44 +4963,44 @@ Verification Before Checked-In: <10/21/2011 18:26 MH> New Files: Add odm debug & interface . -Modified Files: +Modified Files: Change Notes: 1. Support ODM independent I/O and debug interface. Verification Before Checked-In: - 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) + 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) ---------------------------------------------------------------------------------------------- <10/21/2011 16:20 Georgia> New Files: rtl8192c/odm_phy_info.h rtl8192d/odm_phy_info.h -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h odm_precomp.h odm_types.h Change Notes: - 1. Add data struct declaration of phy_info and rx_desc(must discuss the data member declaration method which different HW interface). + 1. Add data struct declaration of phy_info and rx_desc(must discuss the data member declaration method which different HW interface). 2. Add related statement for pack(1). - 3. Fixed some compiler warning and error in linux platform. + 3. Fixed some compiler warning and error in linux platform. Verification Before Checked-In: 1. CE make ok. ---------------------------------------------------------------------------------------------- <10/20/2011 23:44 MH> -Modified Files: +Modified Files: HAL\OUTSRC\HalDMOutSrc.c\h HAL\HalDM.c HEADER\TypeDef.h Change Notes: - 1. Add common info interface init/hook/update/array pointer hook. + 1. Add common info interface init/hook/update/array pointer hook. 2. MP driver can hook all common info interface. You can refer to API dm_ODMStructureInit() - 3. Revise code architecture for common interface hook readbility. + 3. Revise code architecture for common interface hook readbility. Verification Before Checked-In: - 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) + 1. N5/N62 buildall ok. (Except N5 SDIO due to PSD ODM) ---------------------------------------------------------------------------------------------- <10/20/2011 21:30 LukeLee> @@ -5044,7 +5044,7 @@ Verification Before Checked-In: <10/13/2011 21:40 Georgia> New Files: - + Modified Files: HalDMOutSrc.c HalDMOutSrc.h @@ -5097,7 +5097,7 @@ Modified Files: Change Notes: 1. Modify common code for ADSL project compiler. - - Add a workaround flag: "ADSL_AP_BUILD_WORKAROUND", + - Add a workaround flag: "ADSL_AP_BUILD_WORKAROUND", it should be eliminated before final stage. Verification Before Checked-In: @@ -5105,7 +5105,7 @@ Verification Before Checked-In: ---------------------------------------------------------------------------------------------- <10/07/2011 17:12 Georgia> -Modified Files: +Modified Files: HalDMOutSrc.c HalDMOutSrc.h odm_types.h @@ -5119,7 +5119,7 @@ Change Notes: Verification Before Checked-In: 1. CE Team linux driver make ok. - + ---------------------------------------------------------------------------------------------- <10/06/2011 22:12 Jensonlee> Modified Files: @@ -5140,7 +5140,7 @@ Change Notes: Verification Before Checked-In: 1. AP platform 8196c+8192c build ok, connect with STA ok. - + ---------------------------------------------------------------------------------------------- <10/06/2011 21:22 Annie> Modified Files: @@ -5150,18 +5150,18 @@ Modified Files: 3. rtl8192c/Hal8192CEPHYImg_ADSL.h 4. odm_types.h -Change Notes: +Change Notes: 1. Update parameter files: try to sync with sd7 ODM svn. Verification Before Checked-In: - 1. ADSL platform make ok. + 1. ADSL platform make ok. ---------------------------------------------------------------------------------------------- <10/05/2011 22:50 Luke> New Files: Modified Files: /HalDMOutSrc.h -Change Notes: +Change Notes: 1. Add common info and STA structure Verification Before Checked-In: @@ -5176,34 +5176,34 @@ New Files: 3. Hal8192CEPHYImg_ADSL.c 4. Hal8192CEPHYImg_ADSL.h -Change Notes: +Change Notes: 1. Add 8192ce MAC/BB/RF parameter files for current ADSL platform. Verification Before Checked-In: - 1. ADSL platform make ok. + 1. ADSL platform make ok. ---------------------------------------------------------------------------------------------- <10/05/2011 12:00 Georgia> -New Files: +New Files: Modified Files: -Change Notes: +Change Notes: 1. Add odm_types.h. - 2. Remove useless img files. - + 2. Remove useless img files. + Verification Before Checked-In: - 1. CE Team linux driver make ok. + 1. CE Team linux driver make ok. ---------------------------------------------------------------------------------------------- <09/30/2011 17:50 MH_Chen> -New Files: +New Files: Modified Files: -Change Notes: +Change Notes: 1. Revise HW integration architecture. 2. Add MAC relative image.c. - 3. Update the newest HW parameters. - + 3. Update the newest HW parameters. + Verification Before Checked-In: - 1. Windows N5/N62 compiler buildall ok. + 1. Windows N5/N62 compiler buildall ok. ---------------------------------------------------------------------------------------------- <09/23/2011 11:30 Georgia> @@ -5225,16 +5225,16 @@ New Files: rtl8192d/HalDMOutSrc8192D_CE.c rtl8192d/HalDMOutSrc8192D_CE.h Modified Files: -Change Notes: - 1. Add related files for SD4- NIC Linux - +Change Notes: + 1. Add related files for SD4- NIC Linux + Verification Before Checked-In: - 1. CE,CU,DE,DU buildall ok. + 1. CE,CU,DE,DU buildall ok. ---------------------------------------------------------------------------------------------- <09/22/2011 23:09 MH_Chen> New Files: Modified Files: -Change Notes: +Change Notes: 1. Revise batch file for MP driver PCIE/USB/SDIO compile pass. 2. Revise all architecture for differemt team shaer common iinterface. 3. Revise coding style for readbility. @@ -5248,7 +5248,7 @@ Verification Before Checked-In: <09/20/2011 23:01 MH_Chen> New Files: Modified Files: -Change Notes: +Change Notes: 1. Add new out source interface for AP/Linux/ADSL/Windows team. HAL\OUTSRC ==> common interface HAL\OUTSRC\rtl8192c ==> independent out src files for different team temporarily. diff --git a/network/wlan/WDI/HAL/phydm/rtchnlplan.h b/network/wlan/WDI/HAL/phydm/rtchnlplan.h index 132f27adf..a3a61d0b3 100644 --- a/network/wlan/WDI/HAL/phydm/rtchnlplan.h +++ b/network/wlan/WDI/HAL/phydm/rtchnlplan.h @@ -102,158 +102,158 @@ typedef enum _RT_CHANNEL_DOMAIN_NEW Countries "Country Abbreviation" Domain Code SKU's Ch# of 20MHz 2G 5G Ch# of 40MHz -"Albania�����ڥ���" AL Local Test - -"Algeria�����ΧQ��" DZ CE TCF - -"Antigua & Barbuda�w���ʮq&�ڥ��F" AG 2G_WORLD FCC TCF - -"Argentina���ڧ�" AR 2G_WORLD Local Test - -"Armenia�Ȭ�����" AM 2G_WORLD ETSI - -"Aruba���|�ڮq" AW 2G_WORLD FCC TCF - -"Australia�D�w" AU 2G_WORLD 5G_ETSI2 - -"Austria���a�Q" AT 2G_WORLD 5G_ETSI1 CE - -"Azerbaijan�������" AZ 2G_WORLD CE TCF - -"Bahamas�ګ���" BS 2G_WORLD - -"Barbados�ڤڦh��" BB 2G_WORLD FCC TCF - -"Belgium��Q��" BE 2G_WORLD 5G_ETSI1 CE - -"Bermuda�ʼ}�F" BM 2G_WORLD FCC TCF - -"Brazil�ڦ�" BR 2G_WORLD Local Test - -"Bulgaria�O�[�Q��" BG 2G_WORLD 5G_ETSI1 CE - +"Albania�����ڥ���" AL Local Test + +"Algeria�����ΧQ��" DZ CE TCF + +"Antigua & Barbuda�w���ʮq&�ڥ��F" AG 2G_WORLD FCC TCF + +"Argentina���ڧ�" AR 2G_WORLD Local Test + +"Armenia�Ȭ�����" AM 2G_WORLD ETSI + +"Aruba���|�ڮq" AW 2G_WORLD FCC TCF + +"Australia�D�w" AU 2G_WORLD 5G_ETSI2 + +"Austria���a�Q" AT 2G_WORLD 5G_ETSI1 CE + +"Azerbaijan�������" AZ 2G_WORLD CE TCF + +"Bahamas�ګ���" BS 2G_WORLD + +"Barbados�ڤڦh��" BB 2G_WORLD FCC TCF + +"Belgium��Q��" BE 2G_WORLD 5G_ETSI1 CE + +"Bermuda�ʼ}�F" BM 2G_WORLD FCC TCF + +"Brazil�ڦ�" BR 2G_WORLD Local Test + +"Bulgaria�O�[�Q��" BG 2G_WORLD 5G_ETSI1 CE + "Canada�[���j" CA 2G_FCC1 5G_FCC7 IC / FCC IC / FCC - -"Cayman Islands�}�Ҹs�q" KY 2G_WORLD 5G_ETSI1 CE - -"Chile���Q" CL 2G_WORLD FCC TCF - -"China����" CN 2G_WORLD 5G_FCC5 �H��?�i2002�j353? - -"Columbia���ۤ��" CO 2G_WORLD Voluntary - -"Costa Rica�����F���[" CR 2G_WORLD FCC TCF - -"Cyprus�������" CY 2G_WORLD 5G_ETSI1 CE - -"Czech ���J" CZ 2G_WORLD 5G_ETSI1 CE - -"Denmark����" DK 2G_WORLD 5G_ETSI1 CE - -"Dominican Republic�h�����[�@�M��" DO 2G_WORLD FCC TCF - -"Egypt�J��" EG 2G_WORLD CE T CF - -"El Salvador�ĺ��˦h" SV 2G_WORLD Voluntary - -"Estonia�R�F����" EE 2G_WORLD 5G_ETSI1 CE - -"Finland����" FI 2G_WORLD 5G_ETSI1 CE - -"France�k��" FR 5G_E TSI1 CE - -"Germany�w��" DE 2G_WORLD 5G_ETSI1 CE - -"Greece ��þ" GR 2G_WORLD 5G_ETSI1 CE - -"Guam���q" GU 2G_WORLD - -"Guatemala�ʦa����" GT 2G_WORLD - -"Haiti���a" HT 2G_WORLD FCC TCF - -"Honduras�����Դ�" HN 2G_WORLD FCC TCF - -"Hungary�I���Q" HU 2G_WORLD 5G_ETSI1 CE - -"Iceland�B�q" IS 2G_WORLD 5G_ETSI1 CE - -"India�L��" IN 2G_WORLD 5G_FCC3 FCC/CE TCF - -"Ireland�R����" IE 2G_WORLD 5G_ETSI1 CE - -"Israel�H��C" IL 5G_F CC6 CE TCF - -"Italy�q�j�Q" IT 2G_WORLD 5G_ETSI1 CE - + +"Cayman Islands�}�Ҹs�q" KY 2G_WORLD 5G_ETSI1 CE + +"Chile���Q" CL 2G_WORLD FCC TCF + +"China����" CN 2G_WORLD 5G_FCC5 �H��?�i2002�j353? + +"Columbia���ۤ��" CO 2G_WORLD Voluntary + +"Costa Rica�����F���[" CR 2G_WORLD FCC TCF + +"Cyprus�������" CY 2G_WORLD 5G_ETSI1 CE + +"Czech ���J" CZ 2G_WORLD 5G_ETSI1 CE + +"Denmark����" DK 2G_WORLD 5G_ETSI1 CE + +"Dominican Republic�h�����[�@�M��" DO 2G_WORLD FCC TCF + +"Egypt�J��" EG 2G_WORLD CE T CF + +"El Salvador�ĺ��˦h" SV 2G_WORLD Voluntary + +"Estonia�R�F����" EE 2G_WORLD 5G_ETSI1 CE + +"Finland����" FI 2G_WORLD 5G_ETSI1 CE + +"France�k��" FR 5G_E TSI1 CE + +"Germany�w��" DE 2G_WORLD 5G_ETSI1 CE + +"Greece ��þ" GR 2G_WORLD 5G_ETSI1 CE + +"Guam���q" GU 2G_WORLD + +"Guatemala�ʦa����" GT 2G_WORLD + +"Haiti���a" HT 2G_WORLD FCC TCF + +"Honduras�����Դ�" HN 2G_WORLD FCC TCF + +"Hungary�I���Q" HU 2G_WORLD 5G_ETSI1 CE + +"Iceland�B�q" IS 2G_WORLD 5G_ETSI1 CE + +"India�L��" IN 2G_WORLD 5G_FCC3 FCC/CE TCF + +"Ireland�R����" IE 2G_WORLD 5G_ETSI1 CE + +"Israel�H��C" IL 5G_F CC6 CE TCF + +"Italy�q�j�Q" IT 2G_WORLD 5G_ETSI1 CE + "Japan�饻" JP 2G_MKK1 5G_MKK1 MKK MKK - + "Korea����" KR 2G_WORLD 5G_KCC1 KCC KCC - -"Latvia�Բ����" LV 2G_WORLD 5G_ETSI1 CE - -"Lithuania�߳��{" LT 2G_WORLD 5G_ETSI1 CE - -"Luxembourg�c�˳�" LU 2G_WORLD 5G_ETSI1 CE - -"Malaysia���Ӧ��" MY 2G_WORLD Local Test - -"Malta�����L" MT 2G_WORLD 5G_ETSI1 CE - -"Mexico�����" MX 2G_WORLD 5G_FCC3 Local Test - -"Morocco������" MA CE TCF - -"Netherlands����" NL 2G_WORLD 5G_ETSI1 CE - -"New Zealand���" NZ 2G_WORLD 5G_ETSI2 - -"Norway����" NO 2G_WORLD 5G_ETSI1 CE - -"Panama�ڮ��� " PA 2G_FCC1 Voluntary - -"Philippines��߻�" PH 2G_WORLD FCC TCF - -"Poland�i��" PL 2G_WORLD 5G_ETSI1 CE - -"Portugal�����" PT 2G_WORLD 5G_ETSI1 CE - -"Romaniaù������" RO 2G_WORLD 5G_ETSI1 CE - -"Russia�Xù��" RU 2G_WORLD 5G_ETSI3 CE TCF - -"Saudi Arabia�F�a���ԧB" SA 2G_WORLD CE TCF - -"Singapore�s�[�Y" SG 2G_WORLD - -"Slovakia������J" SK 2G_WORLD 5G_ETSI1 CE - -"Slovenia����������" SI 2G_WORLD 5G_ETSI1 CE - -"South Africa�n�D" ZA 2G_WORLD CE TCF - -"Spain��Z��" ES 5G_ETSI1 CE - -"Sweden���" SE 2G_WORLD 5G_ETSI1 CE - -"Switzerland��h" CH 2G_WORLD 5G_ETSI1 CE - -"Taiwan�O�W" TW 2G_FCC1 5G_NCC1 NCC - -"Thailand����" TH 2G_WORLD FCC/CE TCF - -"Turkey�g�ը�" TR 2G_WORLD - -"Ukraine�Q�J��" UA 2G_WORLD Local Test - + +"Latvia�Բ����" LV 2G_WORLD 5G_ETSI1 CE + +"Lithuania�߳��{" LT 2G_WORLD 5G_ETSI1 CE + +"Luxembourg�c�˳�" LU 2G_WORLD 5G_ETSI1 CE + +"Malaysia���Ӧ��" MY 2G_WORLD Local Test + +"Malta�����L" MT 2G_WORLD 5G_ETSI1 CE + +"Mexico�����" MX 2G_WORLD 5G_FCC3 Local Test + +"Morocco������" MA CE TCF + +"Netherlands����" NL 2G_WORLD 5G_ETSI1 CE + +"New Zealand���" NZ 2G_WORLD 5G_ETSI2 + +"Norway����" NO 2G_WORLD 5G_ETSI1 CE + +"Panama�ڮ��� " PA 2G_FCC1 Voluntary + +"Philippines��߻�" PH 2G_WORLD FCC TCF + +"Poland�i��" PL 2G_WORLD 5G_ETSI1 CE + +"Portugal�����" PT 2G_WORLD 5G_ETSI1 CE + +"Romaniaù������" RO 2G_WORLD 5G_ETSI1 CE + +"Russia�Xù��" RU 2G_WORLD 5G_ETSI3 CE TCF + +"Saudi Arabia�F�a���ԧB" SA 2G_WORLD CE TCF + +"Singapore�s�[�Y" SG 2G_WORLD + +"Slovakia������J" SK 2G_WORLD 5G_ETSI1 CE + +"Slovenia����������" SI 2G_WORLD 5G_ETSI1 CE + +"South Africa�n�D" ZA 2G_WORLD CE TCF + +"Spain��Z��" ES 5G_ETSI1 CE + +"Sweden���" SE 2G_WORLD 5G_ETSI1 CE + +"Switzerland��h" CH 2G_WORLD 5G_ETSI1 CE + +"Taiwan�O�W" TW 2G_FCC1 5G_NCC1 NCC + +"Thailand����" TH 2G_WORLD FCC/CE TCF + +"Turkey�g�ը�" TR 2G_WORLD + +"Ukraine�Q�J��" UA 2G_WORLD Local Test + "United Kingdom�^��" GB 2G_WORLD 5G_ETSI1 CE ETSI - + "United States����" US 2G_FCC1 5G_FCC7 FCC FCC - -"Venezuela�e�����" VE 2G_WORLD 5G_FCC4 FCC TCF - -"Vietnam�V�n" VN 2G_WORLD FCC/CE TCF - + +"Venezuela�e�����" VE 2G_WORLD 5G_FCC4 FCC TCF + +"Vietnam�V�n" VN 2G_WORLD FCC/CE TCF + */ @@ -261,83 +261,83 @@ Countries "Country Abbreviation" Domain Code SKU's Ch# of 20MHz // Counter abbervation. typedef enum _RT_COUNTRY_DEFINE_NUM { - RT_CTRY_AL, // "Albania�����ڥ���" - RT_CTRY_DZ, // "Algeria�����ΧQ��" - RT_CTRY_AG, // "Antigua & Barbuda�w���ʮq&�ڥ��F" - RT_CTRY_AR, // "Argentina���ڧ�" - RT_CTRY_AM, // "Armenia�Ȭ�����" - RT_CTRY_AW, // "Aruba���|�ڮq" - RT_CTRY_AU, // "Australia�D�w" - RT_CTRY_AT, // "Austria���a�Q" - RT_CTRY_AZ, // "Azerbaijan�������" - RT_CTRY_BS, // "Bahamas�ګ���" - RT_CTRY_BB, // "Barbados�ڤڦh��" - RT_CTRY_BE, // "Belgium��Q��" - RT_CTRY_BM, // "Bermuda�ʼ}�F" - RT_CTRY_BR, // "Brazil�ڦ�" - RT_CTRY_BG, // "Bulgaria�O�[�Q��" - RT_CTRY_CA, // "Canada�[���j" - RT_CTRY_KY, // "Cayman Islands�}�Ҹs�q" - RT_CTRY_CL, // "Chile���Q" - RT_CTRY_CN, // "China����" - RT_CTRY_CO, // "Columbia���ۤ��" - RT_CTRY_CR, // "Costa Rica�����F���[" - RT_CTRY_CY, // "Cyprus�������" - RT_CTRY_CZ, // "Czech ���J" - RT_CTRY_DK, // "Denmark����" - RT_CTRY_DO, // "Dominican Republic�h�����[�@�M��" - RT_CTRY_CE, // "Egypt�J��" EG 2G_WORLD - RT_CTRY_SV, // "El Salvador�ĺ��˦h" - RT_CTRY_EE, // "Estonia�R�F����" - RT_CTRY_FI, // "Finland����" - RT_CTRY_FR, // "France�k��" - RT_CTRY_DE, // "Germany�w��" - RT_CTRY_GR, // "Greece ��þ" - RT_CTRY_GU, // "Guam���q" - RT_CTRY_GT, // "Guatemala�ʦa����" - RT_CTRY_HT, // "Haiti���a" - RT_CTRY_HN, // "Honduras�����Դ�" - RT_CTRY_HU, // "Hungary�I���Q" - RT_CTRY_IS, // "Iceland�B�q" - RT_CTRY_IN, // "India�L��" - RT_CTRY_IE, // "Ireland�R����" - RT_CTRY_IL, // "Israel�H��C" - RT_CTRY_IT, // "Italy�q�j�Q" - RT_CTRY_JP, // "Japan�饻" - RT_CTRY_KR, // "Korea����" - RT_CTRY_LV, // "Latvia�Բ����" - RT_CTRY_LT, // "Lithuania�߳��{" - RT_CTRY_LU, // "Luxembourg�c�˳�" - RT_CTRY_MY, // "Malaysia���Ӧ��" - RT_CTRY_MT, // "Malta�����L" - RT_CTRY_MX, // "Mexico�����" - RT_CTRY_MA, // "Morocco������" - RT_CTRY_NL, // "Netherlands����" - RT_CTRY_NZ, // "New Zealand���" - RT_CTRY_NO, // "Norway����" - RT_CTRY_PA, // "Panama�ڮ��� " - RT_CTRY_PH, // "Philippines��߻�" - RT_CTRY_PL, // "Poland�i��" - RT_CTRY_PT, // "Portugal�����" - RT_CTRY_RO, // "Romaniaù������" - RT_CTRY_RU, // "Russia�Xù��" - RT_CTRY_SA, // "Saudi Arabia�F�a���ԧB" - RT_CTRY_SG, // "Singapore�s�[�Y" - RT_CTRY_SK, // "Slovakia������J" - RT_CTRY_SI, // "Slovenia����������" - RT_CTRY_ZA, // "South Africa�n�D" - RT_CTRY_ES, // "Spain��Z��" - RT_CTRY_SE, // "Sweden���" - RT_CTRY_CH, // "Switzerland��h" - RT_CTRY_TW, // "Taiwan�O�W" - RT_CTRY_TH, // "Thailand����" - RT_CTRY_TR, // "Turkey�g�ը�" - RT_CTRY_UA, // "Ukraine�Q�J��" - RT_CTRY_GB, // "United Kingdom�^��" - RT_CTRY_US, // "United States����" - RT_CTRY_VE, // "Venezuela�e�����" - RT_CTRY_VN, // "Vietnam�V�n" - RT_CTRY_MAX, // + RT_CTRY_AL, // "Albania�����ڥ���" + RT_CTRY_DZ, // "Algeria�����ΧQ��" + RT_CTRY_AG, // "Antigua & Barbuda�w���ʮq&�ڥ��F" + RT_CTRY_AR, // "Argentina���ڧ�" + RT_CTRY_AM, // "Armenia�Ȭ�����" + RT_CTRY_AW, // "Aruba���|�ڮq" + RT_CTRY_AU, // "Australia�D�w" + RT_CTRY_AT, // "Austria���a�Q" + RT_CTRY_AZ, // "Azerbaijan�������" + RT_CTRY_BS, // "Bahamas�ګ���" + RT_CTRY_BB, // "Barbados�ڤڦh��" + RT_CTRY_BE, // "Belgium��Q��" + RT_CTRY_BM, // "Bermuda�ʼ}�F" + RT_CTRY_BR, // "Brazil�ڦ�" + RT_CTRY_BG, // "Bulgaria�O�[�Q��" + RT_CTRY_CA, // "Canada�[���j" + RT_CTRY_KY, // "Cayman Islands�}�Ҹs�q" + RT_CTRY_CL, // "Chile���Q" + RT_CTRY_CN, // "China����" + RT_CTRY_CO, // "Columbia���ۤ��" + RT_CTRY_CR, // "Costa Rica�����F���[" + RT_CTRY_CY, // "Cyprus�������" + RT_CTRY_CZ, // "Czech ���J" + RT_CTRY_DK, // "Denmark����" + RT_CTRY_DO, // "Dominican Republic�h�����[�@�M��" + RT_CTRY_CE, // "Egypt�J��" EG 2G_WORLD + RT_CTRY_SV, // "El Salvador�ĺ��˦h" + RT_CTRY_EE, // "Estonia�R�F����" + RT_CTRY_FI, // "Finland����" + RT_CTRY_FR, // "France�k��" + RT_CTRY_DE, // "Germany�w��" + RT_CTRY_GR, // "Greece ��þ" + RT_CTRY_GU, // "Guam���q" + RT_CTRY_GT, // "Guatemala�ʦa����" + RT_CTRY_HT, // "Haiti���a" + RT_CTRY_HN, // "Honduras�����Դ�" + RT_CTRY_HU, // "Hungary�I���Q" + RT_CTRY_IS, // "Iceland�B�q" + RT_CTRY_IN, // "India�L��" + RT_CTRY_IE, // "Ireland�R����" + RT_CTRY_IL, // "Israel�H��C" + RT_CTRY_IT, // "Italy�q�j�Q" + RT_CTRY_JP, // "Japan�饻" + RT_CTRY_KR, // "Korea����" + RT_CTRY_LV, // "Latvia�Բ����" + RT_CTRY_LT, // "Lithuania�߳��{" + RT_CTRY_LU, // "Luxembourg�c�˳�" + RT_CTRY_MY, // "Malaysia���Ӧ��" + RT_CTRY_MT, // "Malta�����L" + RT_CTRY_MX, // "Mexico�����" + RT_CTRY_MA, // "Morocco������" + RT_CTRY_NL, // "Netherlands����" + RT_CTRY_NZ, // "New Zealand���" + RT_CTRY_NO, // "Norway����" + RT_CTRY_PA, // "Panama�ڮ��� " + RT_CTRY_PH, // "Philippines��߻�" + RT_CTRY_PL, // "Poland�i��" + RT_CTRY_PT, // "Portugal�����" + RT_CTRY_RO, // "Romaniaù������" + RT_CTRY_RU, // "Russia�Xù��" + RT_CTRY_SA, // "Saudi Arabia�F�a���ԧB" + RT_CTRY_SG, // "Singapore�s�[�Y" + RT_CTRY_SK, // "Slovakia������J" + RT_CTRY_SI, // "Slovenia����������" + RT_CTRY_ZA, // "South Africa�n�D" + RT_CTRY_ES, // "Spain��Z��" + RT_CTRY_SE, // "Sweden���" + RT_CTRY_CH, // "Switzerland��h" + RT_CTRY_TW, // "Taiwan�O�W" + RT_CTRY_TH, // "Thailand����" + RT_CTRY_TR, // "Turkey�g�ը�" + RT_CTRY_UA, // "Ukraine�Q�J��" + RT_CTRY_GB, // "United Kingdom�^��" + RT_CTRY_US, // "United States����" + RT_CTRY_VE, // "Venezuela�e�����" + RT_CTRY_VN, // "Vietnam�V�n" + RT_CTRY_MAX, // }RT_COUNTRY_NAME, *PRT_COUNTRY_NAME;