Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ndis.sys/tests/ndis.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/ndis.sys/tests/ndis.c b/dlls/ndis.sys/tests/ndis.c index d6a2db0fd9d..caece671476 100644 --- a/dlls/ndis.sys/tests/ndis.c +++ b/dlls/ndis.sys/tests/ndis.c @@ -58,6 +58,15 @@ static void test_device(const WCHAR *service_name, const MIB_IF_ROW2 *row) return; }
+ oid = 0xdeadbeef; + iosb.Status = 0xdeadbeef; + iosb.Information = 0xdeadbeef; + status = NtDeviceIoControlFile( netdev, NULL, NULL, NULL, &iosb, + IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid), &medium, sizeof(medium) ); + todo_wine ok(status == STATUS_INVALID_PARAMETER, "got status %#x\n", status); + ok(iosb.Status == 0xdeadbeef, "got %#x\n", iosb.Status); + ok(iosb.Information == 0xdeadbeef, "got size %#Ix\n", iosb.Information); + oid = OID_GEN_MEDIA_SUPPORTED; ret = DeviceIoControl( netdev, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid), &medium, sizeof(medium), &size, NULL );
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51757 Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ndis.sys/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/ndis.sys/main.c b/dlls/ndis.sys/main.c index 94c19ffca53..e1517f77700 100644 --- a/dlls/ndis.sys/main.c +++ b/dlls/ndis.sys/main.c @@ -98,6 +98,7 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); MIB_IF_ROW2 *netdev = device->DeviceExtension; + NTSTATUS status;
TRACE( "ioctl %x insize %u outsize %u\n", irpsp->Parameters.DeviceIoControl.IoControlCode, @@ -115,8 +116,9 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp) break; }
+ status = irp->IoStatus.u.Status; IoCompleteRequest( irp, IO_NO_INCREMENT ); - return STATUS_SUCCESS; + return status; }
static void add_key(const WCHAR *guidstrW, const MIB_IF_ROW2 *netdev)
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ndis.sys/main.c | 2 +- dlls/ndis.sys/tests/ndis.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ndis.sys/main.c b/dlls/ndis.sys/main.c index e1517f77700..a0d2581aaa9 100644 --- a/dlls/ndis.sys/main.c +++ b/dlls/ndis.sys/main.c @@ -89,7 +89,7 @@ static void query_global_stats(IRP *irp, const MIB_IF_ROW2 *netdev) } default: FIXME( "Unsupported OID %x\n", oid ); - irp->IoStatus.u.Status = STATUS_NOT_SUPPORTED; + irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER; break; } } diff --git a/dlls/ndis.sys/tests/ndis.c b/dlls/ndis.sys/tests/ndis.c index caece671476..3349f1dae97 100644 --- a/dlls/ndis.sys/tests/ndis.c +++ b/dlls/ndis.sys/tests/ndis.c @@ -63,7 +63,7 @@ static void test_device(const WCHAR *service_name, const MIB_IF_ROW2 *row) iosb.Information = 0xdeadbeef; status = NtDeviceIoControlFile( netdev, NULL, NULL, NULL, &iosb, IOCTL_NDIS_QUERY_GLOBAL_STATS, &oid, sizeof(oid), &medium, sizeof(medium) ); - todo_wine ok(status == STATUS_INVALID_PARAMETER, "got status %#x\n", status); + ok(status == STATUS_INVALID_PARAMETER, "got status %#x\n", status); ok(iosb.Status == 0xdeadbeef, "got %#x\n", iosb.Status); ok(iosb.Information == 0xdeadbeef, "got size %#Ix\n", iosb.Information);