1
0
Fork 0
forked from len0rd/rockbox

update the bNumInterfaces field in the configuration descriptor correctly

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16485 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2008-03-02 18:53:52 +00:00
parent 411b92948a
commit b3ab788411

View file

@ -657,7 +657,6 @@ static void usb_core_control_request_handler(struct usb_ctrlrequest* req)
if(usb_core_benchmark_enabled){
benchmark_ep_in_descriptor.wMaxPacketSize=max_packet_size;
benchmark_ep_out_descriptor.wMaxPacketSize=max_packet_size;
config_descriptor.bNumInterfaces=interface_number;
memcpy(&response_data[size],&benchmark_interface_descriptor,sizeof(struct usb_interface_descriptor));
size += sizeof(struct usb_interface_descriptor);
@ -667,6 +666,7 @@ static void usb_core_control_request_handler(struct usb_ctrlrequest* req)
size += sizeof(struct usb_endpoint_descriptor);
}
#endif
config_descriptor.bNumInterfaces=interface_number;
config_descriptor.wTotalLength = size;
memcpy(&response_data[0],&config_descriptor,sizeof(struct usb_config_descriptor));