Hardened device type checks

Removed obsolete code
This commit is contained in:
Benjamin Höglinger-Stelzer
2020-05-12 17:37:16 +02:00
parent b5ebcca496
commit fe1dcddc6a
5 changed files with 37 additions and 107 deletions

View File

@@ -367,71 +367,3 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
return STATUS_SUCCESS;
}
//
// Sends a report update to an XUSB PDO.
//
EXTERN_C NTSTATUS Bus_XusbSubmitReport(WDFDEVICE Device, ULONG SerialNo, PXUSB_SUBMIT_REPORT Report, BOOLEAN FromInterface)
{
TraceEvents(TRACE_LEVEL_VERBOSE, TRACE_BUSENUM, "%!FUNC! Entry");
return Bus_SubmitReport(Device, SerialNo, Report, FromInterface);
}
//
// Queues an inverted call to receive XUSB-specific updates.
//
EXTERN_C NTSTATUS Bus_QueueNotification(WDFDEVICE Device, ULONG SerialNo, WDFREQUEST Request)
{
NTSTATUS status;
EmulationTargetPDO* pdo;
TraceDbg(TRACE_BUSENUM, "%!FUNC! Entry");
// Validate child
if (!EmulationTargetPDO::GetPdoBySerial(Device, SerialNo, &pdo))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_BUSENUM,
"PDO with serial %d not found",
SerialNo);
return STATUS_NO_SUCH_DEVICE;
}
status = pdo->EnqueueNotification(Request);
status = (NT_SUCCESS(status)) ? STATUS_PENDING : status;
TraceDbg(TRACE_BUSENUM, "%!FUNC! Exit with status %!STATUS!", status);
return status;
}
//
// Sends a report update to a DS4 PDO.
//
NTSTATUS Bus_Ds4SubmitReport(WDFDEVICE Device, ULONG SerialNo, PDS4_SUBMIT_REPORT Report, BOOLEAN FromInterface)
{
TraceEvents(TRACE_LEVEL_VERBOSE, TRACE_BUSENUM, "%!FUNC! Entry");
return Bus_SubmitReport(Device, SerialNo, Report, FromInterface);
}
EXTERN_C NTSTATUS Bus_SubmitReport(WDFDEVICE Device, ULONG SerialNo, PVOID Report, BOOLEAN FromInterface)
{
EmulationTargetPDO* pdo;
UNREFERENCED_PARAMETER(FromInterface);
// Validate child
if (!EmulationTargetPDO::GetPdoBySerial(Device, SerialNo, &pdo))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_BUSENUM,
"PDO with serial %d not found",
SerialNo);
return STATUS_NO_SUCH_DEVICE;
}
return pdo->SubmitReport(Report);
}