Skip to content

Commit

Permalink
Fix WDI sample build
Browse files Browse the repository at this point in the history
  • Loading branch information
guhetier committed Apr 3, 2020
1 parent 2dc195e commit b184812
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,9 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'">
<Link>
<AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\NdisComm.lib;$(SolutionDir)\LIB\x86\hal.lib;$(SolutionDir)\LIB\x86\rtklibcom.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ndis.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ntoskrnl.lib;$(WindowsSDK_LibraryPath_x86)km\x86\sdbus.lib;$(WindowsSDK_LibraryPath_x86)km\x86\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies>
<Driver>
</Driver>
<TreatLinkerWarningAsErrors>
</TreatLinkerWarningAsErrors>
<!-- warning LNK4099: PDB 'rtklibcom.pdb' was not found with 'rtklibcom.lib(multichannels.obj)' -->
<AdditionalOptions>$(AdditionalOptions) /IGNORE:4099</AdditionalOptions>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<LinkStatus>
</LinkStatus>
</Link>
<ClCompile>
<PreprocessorDefinitions>_X86_;DBG;NDIS60_MINIPORT;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down Expand Up @@ -425,6 +421,8 @@
<DebugInformationFormat>None</DebugInformationFormat>
</ClCompile>
<Link>
<!-- warning LNK4099: PDB 'rtklibcom.pdb' was not found with 'rtklibcom.lib(multichannels.obj)' -->
<AdditionalOptions>$(AdditionalOptions) /IGNORE:4099</AdditionalOptions>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\NdisComm.lib;$(SolutionDir)\LIB\x86\hal.lib;$(SolutionDir)\LIB\x86\rtklibcom.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ndis.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ntoskrnl.lib;$(WindowsSDK_LibraryPath_x86)km\x86\sdbus.lib;$(WindowsSDK_LibraryPath_x86)km\x86\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies>
<GenerateDebugInformation>
Expand Down Expand Up @@ -626,6 +624,8 @@
</ClCompile>
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<!-- warning LNK4099: PDB 'rtklibcom.pdb' was not found with 'rtklibcom.lib(multichannels.obj)' -->
<AdditionalOptions>$(AdditionalOptions) /IGNORE:4099</AdditionalOptions>
<AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\$(Platform)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\$(Platform)\NdisComm.lib;$(SolutionDir)\LIB\x64\hal.lib;$(SolutionDir)\LIB\x64\rtklibcom.lib;$(WindowsSDK_LibraryPath_x64)km\x64\ndis.lib;$(WindowsSDK_LibraryPath_x64)km\x64\ntoskrnl.lib;$(WindowsSDK_LibraryPath_x64)km\x64\sdbus.lib;$(WindowsSDK_LibraryPath_x64)km\x64\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies>
</Link>
<ProjectReference>
Expand Down
10 changes: 5 additions & 5 deletions network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -3191,24 +3191,24 @@ Wdi_Set_Add_Pm_Protocol_Offload(


//2 DOT11 RSN REKey Offload
if(Params->DOT11RSNREKeyOffload.ProtocolOffloadId)
if(Params->DOT11RSNREKeyOffload.RsnKeyInfo.ProtocolOffloadId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("ProtocolOffloadId = %d\n",
Params->DOT11RSNREKeyOffload.ProtocolOffloadId));
Params->DOT11RSNREKeyOffload.RsnKeyInfo.ProtocolOffloadId));

pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eGTKOffloadIdx]
= Params->DOT11RSNREKeyOffload.ProtocolOffloadId;
= Params->DOT11RSNREKeyOffload.RsnKeyInfo.ProtocolOffloadId;

//Copy kck, kek
PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara.KCK),
Params->DOT11RSNREKeyOffload.KCK_CONTENT, 32);
&Params->DOT11RSNREKeyOffload.RsnKeyInfo.KCK_CONTENT, 32);

RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("KCK_CONTENT:\n"),
pMgntInfo->PMDot11RSNRekeyPara.KCK, 16);
RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("KEK_CONTENT:\n"),
pMgntInfo->PMDot11RSNRekeyPara.KEK, 16);

pMgntInfo->PMDot11RSNRekeyPara.KeyReplayCounter = Params->DOT11RSNREKeyOffload.ReplayCounter;
pMgntInfo->PMDot11RSNRekeyPara.KeyReplayCounter = Params->DOT11RSNREKeyOffload.RsnKeyInfo.ReplayCounter;

if(pPSC->RegGTKOffloadEnable)
pPSC->GTKOffloadEnable = TRUE;
Expand Down

1 comment on commit b184812

@Braghadees
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 3204 Changes: "&Params->DOT11RSNREKeyOffload.RsnKeyInfo.KCK_CONTENT, 32);"
"WDI_PRIVATE_BYTE_BLOB KCK_CONTENT;" is not compatible with "UCHAR KCK [DOT11_RSN_MAX_CIPHER_KEY_LENGTH];".
How do you copy 32 bytes and say you have both KCK and KEK?
Isn't this a memory corruption?

//
// Container for 802.11 Rsn Key information.
//
typedef struct _WDI_PM_RSN_KEY_INFO_CONTAINER
{
UINT32_CONTAINER ProtocolOffloadId;
UINT64_CONTAINER ReplayCounter;
WDI_PRIVATE_BYTE_BLOB KCK_CONTENT;
WDI_PRIVATE_BYTE_BLOB KEK_CONTENT;
#ifdef __cplusplus
_WDI_PM_RSN_KEY_INFO_CONTAINER() : ProtocolOffloadId( (UINT32_CONTAINER)0 ), ReplayCounter( (UINT64_CONTAINER)0 )
{
};
#endif // __cplusplus
} WDI_PM_RSN_KEY_INFO_CONTAINER, *PWDI_PM_RSN_KEY_INFO_CONTAINER;

Please sign in to comment.