Author: cgutman
Date: Fri May 22 04:56:49 2009
New Revision: 41038
URL:
http://svn.reactos.org/svn/reactos?rev=41038&view=rev
Log:
- Implement NdisReadPcmciaAttributeMemory and NdisWritePcmciaAttributeMemory
- Add some debug prints to NdisReadEisaSlotInformation
Modified:
trunk/reactos/drivers/network/ndis/ndis/50stubs.c
trunk/reactos/drivers/network/ndis/ndis/hardware.c
Modified: trunk/reactos/drivers/network/ndis/ndis/50stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/50stubs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/50stubs.c [iso-8859-1] Fri May 22 04:56:49
2009
@@ -270,52 +270,6 @@
/*
* @unimplemented
*/
-ULONG
-EXPORT
-NdisReadPcmciaAttributeMemory(
- IN NDIS_HANDLE NdisAdapterHandle,
- IN ULONG Offset,
- IN PVOID Buffer,
- IN ULONG Length)
-/*
- * FUNCTION:
- * ARGUMENTS:
- * NOTES:
- * NDIS 5.0
- */
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
-ULONG
-EXPORT
-NdisWritePcmciaAttributeMemory(
- IN NDIS_HANDLE NdisAdapterHandle,
- IN ULONG Offset,
- IN PVOID Buffer,
- IN ULONG Length)
-/*
- * FUNCTION:
- * ARGUMENTS:
- * NOTES:
- * NDIS 5.0
- */
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
VOID
EXPORT
NdisIMAssociateMiniport(
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:56:49
2009
@@ -210,9 +210,12 @@
ULONG Ret;
PVOID Buffer;
+ NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
+
/* We are called only at PASSIVE_LEVEL */
Buffer = ExAllocatePool(PagedPool, sizeof(NDIS_EISA_FUNCTION_INFORMATION));
if (!Buffer) {
+ NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
*Status = NDIS_STATUS_RESOURCES;
return;
}
@@ -224,6 +227,7 @@
sizeof(NDIS_EISA_FUNCTION_INFORMATION));
if (Ret == 0 || Ret == 2) {
+ NDIS_DbgPrint(MIN_TRACE, ("HalGetBusData failed.\n"));
ExFreePool(Buffer);
*Status = NDIS_STATUS_FAILURE;
return;
@@ -238,4 +242,64 @@
*Status = NDIS_STATUS_SUCCESS;
}
+
+/*
+ * @implemented
+ */
+ULONG
+EXPORT
+NdisReadPcmciaAttributeMemory(
+ IN NDIS_HANDLE NdisAdapterHandle,
+ IN ULONG Offset,
+ IN PVOID Buffer,
+ IN ULONG Length)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ * NDIS 5.0
+ */
+{
+ PLOGICAL_ADAPTER Adapter = NdisAdapterHandle;
+
+ NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
+
+ return HalGetBusDataByOffset(PCMCIAConfiguration,
+ Adapter->NdisMiniportBlock.BusNumber,
+ Adapter->NdisMiniportBlock.SlotNumber,
+ Buffer,
+ Offset,
+ Length);
+}
+
+
+/*
+ * @implemented
+ */
+ULONG
+EXPORT
+NdisWritePcmciaAttributeMemory(
+ IN NDIS_HANDLE NdisAdapterHandle,
+ IN ULONG Offset,
+ IN PVOID Buffer,
+ IN ULONG Length)
+/*
+ * FUNCTION:
+ * ARGUMENTS:
+ * NOTES:
+ * NDIS 5.0
+ */
+{
+ PLOGICAL_ADAPTER Adapter = NdisAdapterHandle;
+
+ NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
+
+ return HalSetBusDataByOffset(PCMCIAConfiguration,
+ Adapter->NdisMiniportBlock.BusNumber,
+ Adapter->NdisMiniportBlock.SlotNumber,
+ Buffer,
+ Offset,
+ Length);
+}
+
/* EOF */