19,503
社区成员
发帖
与我相关
我的任务
分享
BOOL InitializeWirelessConfig(
PMRVDRV_ADAPTER Adapter
)
{
PVOID InfoBuffer = NULL;
NDIS_STATUS Status;
DWORD dwWaitStatus;
NdisFillMemory(Adapter->CurrentAddr, MRVDRV_ETH_ADDR_LEN, 0xff);
NdisFillMemory(Adapter->PermanentAddr, MRVDRV_ETH_ADDR_LEN, 0xff);
PrepareAndSendCommand(
Adapter,
HostCmd_CMD_GET_HW_SPEC,
0,
HostCmd_OPTION_USE_INT,
(NDIS_OID)0,
HostCmd_PENDING_ON_NONE,
0,
FALSE,
NULL,
NULL,
NULL,
NULL);
dwWaitStatus = WaitForSingleObjectWithCancel( Adapter, Adapter->hHwSpecEvent, ASYNC_OID_QUERY_TIMEOUT );
if ( dwWaitStatus != WAIT_OBJECT_0 )
{
DBGPRINT( DBG_CUSTOM, (L"[MRVL] * ERROR, timeout (%d sec) for waiting HW Spec!\r\n", ASYNC_OID_QUERY_TIMEOUT) );
return FALSE;
}
else
{
DBGPRINT( DBG_CUSTOM, (L"[MRVL] * Got HW Spec!\r\n") );
DBGPRINT(DBG_CUSTOM,(L"[MRVL] * PermanentAddr %02x.%02x.%02x.%02x.%02x.%02x ***\r\n",
Adapter->PermanentAddr[0],
Adapter->PermanentAddr[1],
Adapter->PermanentAddr[2],
Adapter->PermanentAddr[3],
Adapter->PermanentAddr[4],
Adapter->PermanentAddr[5]
));
}