Commit 240df39c authored by Alexandre Julliard's avatar Alexandre Julliard

ndis.sys: Use nameless unions/structs.

parent 194b4025
......@@ -21,7 +21,6 @@
#include <stdarg.h>
#define NONAMELESSUNION
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
......@@ -48,7 +47,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
if (irpsp->Parameters.DeviceIoControl.InputBufferLength != sizeof(oid))
{
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
return;
}
oid = *(DWORD *)irp->AssociatedIrp.SystemBuffer;
......@@ -60,19 +59,19 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
{
if (len < sizeof(NDIS_MEDIUM))
{
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
break;
}
*(NDIS_MEDIUM *)response = netdev->MediaType;
irp->IoStatus.Information = sizeof(netdev->MediaType);
irp->IoStatus.u.Status = STATUS_SUCCESS;
irp->IoStatus.Status = STATUS_SUCCESS;
break;
}
case OID_802_3_PERMANENT_ADDRESS:
{
irp->IoStatus.Information = netdev->PhysicalAddressLength;
if (len < netdev->PhysicalAddressLength)
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
else
memcpy( response, netdev->PermanentPhysicalAddress, sizeof(netdev->PermanentPhysicalAddress) );
break;
......@@ -81,7 +80,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
{
irp->IoStatus.Information = netdev->PhysicalAddressLength;
if (len < netdev->PhysicalAddressLength)
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
else
memcpy( response, netdev->PhysicalAddress, sizeof(netdev->PhysicalAddress) );
break;
......@@ -89,7 +88,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev)
}
default:
FIXME( "Unsupported OID %lx\n", oid );
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
break;
}
}
......@@ -112,11 +111,11 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp)
break;
default:
FIXME( "ioctl %lx not supported\n", irpsp->Parameters.DeviceIoControl.IoControlCode );
irp->IoStatus.u.Status = STATUS_NOT_SUPPORTED;
irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
break;
}
status = irp->IoStatus.u.Status;
status = irp->IoStatus.Status;
IoCompleteRequest( irp, IO_NO_INCREMENT );
return status;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment