Author: cgutman
Date: Wed Mar 11 00:33:36 2009
New Revision: 39939
URL:
http://svn.reactos.org/svn/reactos?rev=39939&view=rev
Log:
- Read the network address in all cases
Modified:
branches/aicom-network-fixes/drivers/network/dd/ne2000/ne2000/main.c
Modified: branches/aicom-network-fixes/drivers/network/dd/ne2000/ne2000/main.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/dd/ne2000/ne2000/main.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/dd/ne2000/ne2000/main.c [iso-8859-1] Wed
Mar 11 00:33:36 2009
@@ -238,6 +238,9 @@
UINT i;
NDIS_STATUS Status;
PNIC_ADAPTER Adapter;
+ NDIS_HANDLE ConfigurationHandle;
+ UINT *RegNetworkAddress = 0;
+ UINT RegNetworkAddressLength = 0;
ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
@@ -284,10 +287,7 @@
if (Status != NDIS_STATUS_SUCCESS)
{
PNDIS_CONFIGURATION_PARAMETER ConfigurationParameter;
- NDIS_HANDLE ConfigurationHandle;
UNICODE_STRING Keyword;
- UINT *RegNetworkAddress = 0;
- UINT RegNetworkAddressLength = 0;
NdisOpenConfiguration(&Status, &ConfigurationHandle,
WrapperConfigurationContext);
if (Status == NDIS_STATUS_SUCCESS)
@@ -328,6 +328,23 @@
else
{
NDIS_DbgPrint(MIN_TRACE,("NdisOpenConfiguration returned error
0x%x\n", Status));
+ }
+ } else {
+ NdisOpenConfiguration(&Status, &ConfigurationHandle,
WrapperConfigurationContext);
+ if (Status == NDIS_STATUS_SUCCESS)
+ {
+ NdisReadNetworkAddress(&Status, (PVOID *)&RegNetworkAddress,
&RegNetworkAddressLength, ConfigurationHandle);
+ if(Status == NDIS_STATUS_SUCCESS && RegNetworkAddressLength ==
DRIVER_LENGTH_OF_ADDRESS)
+ {
+ int i;
+ NDIS_DbgPrint(MID_TRACE,("NdisReadNetworkAddress returned
successfully, address %x:%x:%x:%x:%x:%x\n",
+ RegNetworkAddress[0], RegNetworkAddress[1], RegNetworkAddress[2],
RegNetworkAddress[3],
+ RegNetworkAddress[4], RegNetworkAddress[5]));
+ for(i = 0; i < DRIVER_LENGTH_OF_ADDRESS; i++)
+ Adapter->StationAddress[i] = RegNetworkAddress[i];
+ }
+
+ NdisCloseConfiguration(ConfigurationHandle);
}
}