USB_DEVICE_CLASS_HUMAN_INTERFACE,
-1,
-1);
+ if (!InterfaceDescriptor)
+ {
+ //
+ // bogus configuration descriptor
+ //
+ return STATUS_INVALID_PARAMETER;
+ }
//
// sanity check
//
// no interface class
//
- DPRINT1("[HIDUSB] HID Class found\n");
+ DPRINT1("[HIDUSB] HID Interface descriptor not found\n");
return STATUS_UNSUCCESSFUL;
}
ASSERT(InterfaceDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE);
ASSERT(InterfaceDescriptor->bLength == sizeof(USB_INTERFACE_DESCRIPTOR));
- //
- // now set the device idle
- //
- Hid_SetIdle(DeviceObject);
-
//
// move to next descriptor
//
//
// done
//
- DPRINT("[HIDUSB] SelectConfiguration %x\n", Status);
+ DPRINT1("[HIDUSB] SelectConfiguration %x\n", Status);
if (NT_SUCCESS(Status))
{
+ //
+ // now set the device idle
+ //
+ Hid_SetIdle(DeviceObject);
+
//
// get protocol
//
return Status;
}
}
-
- //
- // FIXME parse hid descriptor
- //
- UNIMPLEMENTED
- ASSERT(FALSE);
-
- //
- // get protocol
- //
- Hid_GetProtocol(DeviceObject);
- return STATUS_SUCCESS;
+ else
+ {
+ //
+ // FIXME parse hid descriptor
+ // select configuration
+ // set idle
+ // and get protocol
+ //
+ UNIMPLEMENTED
+ ASSERT(FALSE);
+ }
+ return Status;
}