第一行相关的错误信息显示的是:SDNdis: Failed to get active path key (0xC0000001)。
代码是原厂提供的,理论上我应该不用修改。
为什么在初始化NDIS时候会出错呢?我是否还缺少组件没有加?目前加入的组件包括:SD Memory,SDIO standard host controller, SDIO WIFI(sychip),还有Networking-LAN下面的和wifi有关的都加上去了,NDIS在哪里增加呢?
谢谢
Adapter->ConfigurationHandle= WrapperConfigurationContext;
Adapter->ShutDown= FALSE;
Status= SDNdisGetSDDeviceHandle(Adapter);// tt wled if( Status != NDIS_STATUS_SUCCESS )/*
Need to check hDevice for avoiding a data abort if driver could not get a valid
device handle.*/if( Status!= NDIS_STATUS_SUCCESS|| Adapter->hDevice== NULL )// tt wled {// Only adapter object itself has been created up to// this point//MRVDRV_FREE_MEM((PVOID)Adapter, sizeof(MRVDRV_ADAPTER)); DBGPRINT(DBG_LOAD| DBG_ERROR, (L"*** SDNdisGetSDDeviveHandleFailed %d\n", Status));return NDIS_STATUS_FAILURE;
}if ( SDIOInitialization(Adapter)!= NDIS_STATUS_SUCCESS )
{// Only adapter object itself has been created up to// this point//MRVDRV_FREE_MEM((PVOID)Adapter, sizeof(MRVDRV_ADAPTER)); DBGPRINT(DBG_LOAD| DBG_ERROR, (L"*** SDIOInitialization FAILED! ***\n"));return NDIS_STATUS_FAILURE;
}return Status;
}
debug信息表明,在执行第一个函数SDNdisGetSDDeviceHandle的时候就已经出错了,代码如下:
C/C++ code
NDIS_STATUS SDNdisGetSDDeviceHandle(PMRVDRV_ADAPTER pAdapter)
{
NDIS_STATUS status;// intermediate status NDIS_HANDLE configHandle;
NDIS_STRING activePathKey= NDIS_STRING_CONST("ActivePath");
PNDIS_CONFIGURATION_PARAMETER pConfigParm;// open a handle to our configuration in the registry NdisOpenConfiguration(&status,&configHandle,
pAdapter->ConfigurationHandle);if (!NDIS_SUCCESS(status)) {
DBGPRINT(DBG_LOAD| DBG_ERROR,
(L"SDNdis: NdisOpenConfiguration failed (0x%08X)\n",
status));return status;
}// read the ActivePath key set by the NDIS loader driver NdisReadConfiguration(&status,&pConfigParm,
configHandle,&activePathKey,
NdisParameterString);if (!NDIS_SUCCESS(status)) {
DBGPRINT(DBG_LOAD| DBG_ERROR,
(L"SDNdis: Failed to get active path key (0x%08X)\n",
status));// close our registry configuration NdisCloseConfiguration(configHandle);return status;
}if (NdisParameterString!= pConfigParm->ParameterType) {
DBGPRINT(DBG_LOAD| DBG_ERROR,
(L"SDNdis: PARAMETER TYPE NOT STRING!!!\n"));// close our registry configuration NdisCloseConfiguration(configHandle);return status;
}if (pConfigParm->ParameterData.StringData.Length>sizeof(pAdapter->ActivePath)) {
DBGPRINT(DBG_LOAD| DBG_ERROR,
(L"SDNdis: Active path too long!\n"));
NdisCloseConfiguration(configHandle);return NDIS_STATUS_FAILURE;
}// copy the counted string over memcpy(pAdapter->ActivePath,
pConfigParm->ParameterData.StringData.Buffer,
pConfigParm->ParameterData.StringData.Length);if ( pConfigParm->ParameterData.StringData.Length==0 )
{
DBGPRINT(DBG_LOAD| DBG_WARNING,
(L"SDNdis: Active path str length is 0, perhaps no card!\n"));
NdisCloseConfiguration(configHandle);return NDIS_STATUS_FAILURE;
}else{
DBGPRINT(DBG_LOAD| DBG_WARNING,
(L"SDNdis: Active path str == %s\n",pConfigParm->ParameterData.StringData.Buffer));
}
NdisCloseConfiguration(configHandle);
DBGPRINT(DBG_LOAD| DBG_LOAD,
(L"SDNdis: Active Path Retrieved: %s \n",pAdapter->ActivePath));// now get the device handle pAdapter->hDevice= SDGetDeviceHandle((DWORD)pAdapter->ActivePath, NULL);return NDIS_STATUS_SUCCESS;
}
第一行相关的错误信息显示的是:SDNdis: Failed to get active path key (0xC0000001)。
代码是原厂提供的,理论上我应该不用修改。
为什么在初始化NDIS时候会出错呢?我是否还缺少组件没有加?目前加入的组件包括:SD Memory,SDIO standard host controller, SDIO WIFI(sychip),还有Networking-LAN下面的和wifi有关的都加上去了,NDIS在哪里增加呢?
谢谢