Author: cgutman
Date: Fri May 22 04:42:51 2009
New Revision: 41037
URL:
http://svn.reactos.org/svn/reactos?rev=41037&view=rev
Log:
- Implement NdisReadEisaSlotInformation
Modified:
trunk/reactos/drivers/network/ndis/ndis/40stubs.c
trunk/reactos/drivers/network/ndis/ndis/hardware.c
Modified: trunk/reactos/drivers/network/ndis/ndis/40stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/40stubs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/40stubs.c [iso-8859-1] Fri May 22 04:42:51
2009
@@ -336,22 +336,6 @@
}
-
-/*
- * @unimplemented
- */
-VOID
-EXPORT
-NdisReadEisaSlotInformation(
- OUT PNDIS_STATUS Status,
- IN NDIS_HANDLE WrapperConfigurationContext,
- OUT PUINT SlotNumber,
- OUT PNDIS_EISA_FUNCTION_INFORMATION EisaData)
-{
- UNIMPLEMENTED
-}
-
-
/*
* @unimplemented
*/
Modified: trunk/reactos/drivers/network/ndis/ndis/hardware.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/hardware.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/hardware.c [iso-8859-1] Fri May 22 04:42:51
2009
@@ -194,4 +194,48 @@
Buffer, Offset, Length);
}
+
+/*
+ * @implemented
+ */
+VOID
+EXPORT
+NdisReadEisaSlotInformation(
+ OUT PNDIS_STATUS Status,
+ IN NDIS_HANDLE WrapperConfigurationContext,
+ OUT PUINT SlotNumber,
+ OUT PNDIS_EISA_FUNCTION_INFORMATION EisaData)
+{
+ PNDIS_WRAPPER_CONTEXT Wrapper = WrapperConfigurationContext;
+ ULONG Ret;
+ PVOID Buffer;
+
+ /* We are called only at PASSIVE_LEVEL */
+ Buffer = ExAllocatePool(PagedPool, sizeof(NDIS_EISA_FUNCTION_INFORMATION));
+ if (!Buffer) {
+ *Status = NDIS_STATUS_RESOURCES;
+ return;
+ }
+
+ Ret = HalGetBusData(EisaConfiguration,
+ Wrapper->BusNumber,
+ Wrapper->SlotNumber,
+ Buffer,
+ sizeof(NDIS_EISA_FUNCTION_INFORMATION));
+
+ if (Ret == 0 || Ret == 2) {
+ ExFreePool(Buffer);
+ *Status = NDIS_STATUS_FAILURE;
+ return;
+ }
+
+ *SlotNumber = Wrapper->SlotNumber;
+
+ RtlCopyMemory(EisaData, Buffer, sizeof(NDIS_EISA_FUNCTION_INFORMATION));
+
+ ExFreePool(Buffer);
+
+ *Status = NDIS_STATUS_SUCCESS;
+}
+
/* EOF */